├── .gitignore
├── LICENSE
├── README.md
├── index.html
├── resouces
├── .babelrc
├── .editorconfig
├── mock-server
│ ├── api.json
│ └── server.js
├── package.json
├── proxy.js
├── src
│ ├── App.vue
│ ├── actions
│ │ ├── approvals.js
│ │ ├── community_approvals.js
│ │ ├── index.js
│ │ ├── root.js
│ │ ├── tasks.js
│ │ └── users.js
│ ├── components
│ │ ├── LoadingIndicator.vue
│ │ ├── Select.vue
│ │ └── Table.vue
│ ├── constants
│ │ ├── actions.js
│ │ └── api.js
│ ├── containers
│ │ ├── CommunityApproval.vue
│ │ ├── Settings.vue
│ │ ├── Tasks.vue
│ │ ├── TranslatorApproval.vue
│ │ └── Users.vue
│ ├── index_dev.html
│ ├── index_prod.html
│ ├── layouts
│ │ ├── css
│ │ │ ├── core
│ │ │ │ ├── base.less
│ │ │ │ ├── common.less
│ │ │ │ ├── font.less
│ │ │ │ ├── index.less
│ │ │ │ ├── normalize.less
│ │ │ │ └── reset.less
│ │ │ ├── index.less
│ │ │ ├── mixins
│ │ │ │ ├── compatibility.less
│ │ │ │ ├── iconfont.less
│ │ │ │ ├── index.less
│ │ │ │ ├── opacity.less
│ │ │ │ └── size.less
│ │ │ └── themes
│ │ │ │ └── default.less
│ │ ├── fonts
│ │ │ └── antd
│ │ │ │ ├── iconfont.eot
│ │ │ │ ├── iconfont.svg
│ │ │ │ ├── iconfont.ttf
│ │ │ │ └── iconfont.woff
│ │ └── img
│ │ │ ├── avatar.png
│ │ │ └── logo.png
│ ├── mutations
│ │ ├── approvals.js
│ │ ├── community_approvals.js
│ │ ├── index.js
│ │ ├── root.js
│ │ ├── tasks.js
│ │ └── users.js
│ ├── root.js
│ ├── router.js
│ ├── store
│ │ └── index.js
│ └── utils
│ │ └── api.js
├── webpack.config.js
├── webpack.dev.config.js
└── webpack.prod.config.js
├── screenshoots
├── 1.png
└── 2.png
└── static
├── css
└── commons_58c11.css
├── fonts
├── element-icons.ttf
├── element-icons.woff
├── iconfont.eot
├── iconfont.svg
├── iconfont.ttf
└── iconfont.woff
└── js
├── apps_58c11.js
├── manifest_d41d8.js
└── vendors_e06ed.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_STORE
2 | node_modules
3 | .module-cache
4 | *.log*
5 | .idea
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 TCL-MIG-FE
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 基于Vue 2.0 + Vuex + Element-UI 的开发工程模板
2 |
3 |
4 | ## 构建项目
5 |
6 | ```bash
7 | git clone https://github.com/TCL-MIG-FE/vue-web-spa-startkit.git
8 | cd TCL-MIG-FE/vue-web-spa-startkit/resouces && npm install
9 | ```
10 |
11 | ```bash
12 | npm run start # 开发环境自动编译并开启mock服务,访问http://localhost:3000
13 | npm run build # 打包到static目录,同时在上级文件夹中生成index.jsp,支持J2EE应用上下文
14 | ```
15 |
16 | ## 截图
17 |
18 | 
19 |
20 | 
21 |
22 |
23 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 自媒体管理
6 |
7 |
8 |
9 |
10 |
11 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/resouces/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": [
3 | "transform-runtime"
4 | ],
5 | "presets": [
6 | "es2015",
7 | "stage-0"
8 | ],
9 | "comments": false
10 | }
11 |
--------------------------------------------------------------------------------
/resouces/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig is awesome: http://EditorConfig.org
2 |
3 | # top-most EditorConfig file
4 | root = true
5 |
6 | # Unix-style newlines with a newline ending every file
7 | [**]
8 | charset = utf-8
9 | end_of_line = lf
10 | indent_style = space
11 | indent_size = 4
12 | trim_trailing_whitespace = true
13 | insert_final_newline = true
14 |
15 |
16 | [*.{js,vue}]
17 | quote_type = single
18 |
--------------------------------------------------------------------------------
/resouces/mock-server/api.json:
--------------------------------------------------------------------------------
1 | {
2 | "Demo": [
3 | {
4 | "url": "/admin/task/list",
5 | "desc": "获取任务列表",
6 | "mock": true,
7 | "res": {
8 | "code": 200,
9 | "msg": "Get address successfully.",
10 | "data": {
11 | "pageSize": 10,
12 | "pageNo": 2,
13 | "totalCount": 92,
14 | "items|5-10": [
15 | {
16 | "processId|+1": 1,
17 | "title": "@cword(10,60)",
18 | "source": "@url",
19 | "content": "@cword(200,500)",
20 | "reward|1-20": 1,
21 | "status": "@pick(1,11,12)"
22 | }
23 | ]
24 | }
25 | }
26 | },
27 | {
28 | "url": "/admin/translate/view",
29 | "desc": "获取翻译后的文章",
30 | "mock": true,
31 | "res": {
32 | "code": 200,
33 | "msg": "Get address successfully.",
34 | "data": {
35 | "processId|+1": 1,
36 | "title": "@cword(20)",
37 | "translateTitle": "@cword(20)",
38 | "content": "@cword(900)
",
39 | "translateContent": "@cword(900)
"
40 | }
41 | }
42 | },
43 | {
44 | "url": "/admin/approving/list",
45 | "desc": "获取翻译审核列表",
46 | "mock": true,
47 | "res": {
48 | "code": 200,
49 | "msg": "Get address successfully.",
50 | "data": {
51 | "pageSize": 10,
52 | "pageNo": 3,
53 | "totalCount": 52,
54 | "items|5-10": [
55 | {
56 | "processId|+1": 1,
57 | "title": "@title",
58 | "content": "
@paragraph(50)
",
59 | "reward|1-20": 1,
60 | "dateTime": "@date('yyyy-MM-dd HH:mm:ss')"
61 | }
62 | ]
63 | }
64 | }
65 | },
66 | {
67 | "url": "/admin/community/list",
68 | "desc": "获取社区用户审核列表",
69 | "mock": true,
70 | "res": {
71 | "code": 200,
72 | "msg": "Get address successfully.",
73 | "data": {
74 | "pageSize": 10,
75 | "pageNo": 3,
76 | "totalCount": 52,
77 | "items|5-10": [
78 | {
79 | "processId|+1": 1,
80 | "title": "@title",
81 | "content": "
@paragraph(50)
",
82 | "author": "@cname()",
83 | "dateTime": "@date('yyyy-MM-dd HH:mm:ss')"
84 | }
85 | ]
86 | }
87 | }
88 | },
89 | {
90 | "url": "/admin/community/view",
91 | "desc": "获取社区的文章",
92 | "mock": true,
93 | "res": {
94 | "code": 200,
95 | "msg": "Get address successfully.",
96 | "data": {
97 | "processId|+1": 1,
98 | "title": "@cword(20)",
99 | "categoryCode": "100000015",
100 | "content": "@cword(900)
"
101 | }
102 | }
103 | },
104 | {
105 | "url": "/admin/userLog/list",
106 | "desc": "获取用户信息",
107 | "mock": true,
108 | "res": {
109 | "code": 200,
110 | "msg": "Get address successfully.",
111 | "data": {
112 | "pageSize": 10,
113 | "pageNo": 3,
114 | "totalCount": 52,
115 | "items|5-10": [
116 | {
117 | "userId|+1": 1,
118 | "userName": "@cname()",
119 | "roleKey": "@pick('翻译用户','其他用户')",
120 | "translateCounts|1-20": 1,
121 | "overtimeCount|1-20": 1,
122 | "createTime": "@date('yyyy-MM-dd HH:mm:ss')"
123 | }
124 | ]
125 | }
126 | }
127 | },
128 | {
129 | "url": "/admin/category/list",
130 | "desc": "获取文章分类信息",
131 | "mock": true,
132 | "res": {
133 | "code": 200,
134 | "msg": "Get address successfully.",
135 | "data": [
136 | {
137 | "categoryCode": "100000001",
138 | "categoryName": "recommend",
139 | "description": "Recommend"
140 | },
141 | {
142 | "categoryCode": "100000015",
143 | "categoryName": "BijXhHjx",
144 | "description": "Reality"
145 | },
146 | {
147 | "categoryCode": "100000005",
148 | "categoryName": "Политика",
149 | "description": "Politics"
150 | }
151 | ]
152 | }
153 | },
154 | {
155 | "url": "/",
156 | "desc": "Index",
157 | "mock": true,
158 | "res": {
159 | "code": 200,
160 | "msg": "Hi, this is mock server.",
161 | "data": ""
162 | }
163 | }
164 | ]
165 | }
166 |
167 |
168 |
169 |
170 |
171 |
172 |
--------------------------------------------------------------------------------
/resouces/mock-server/server.js:
--------------------------------------------------------------------------------
1 |
2 | var path = require('path');
3 | var fs = require('fs');
4 | var mock = require("mockjs");
5 | var app = require('express')();
6 | var port = process.argv.slice(2)[0] || 8080;
7 | var server = app.listen(port, function() {
8 | console.info('Mock server is listening at ' + port);
9 | });
10 |
11 | const prefix = '/api';
12 |
13 | var api = {};
14 | var apiPath = path.join(__dirname, './api.json');
15 | function getApis() {
16 | fs.readFile(apiPath, 'utf-8', function(err, content) {
17 | api = JSON.parse(content);
18 | });
19 | }
20 | //监听api.json变化
21 | fs.watchFile(apiPath, function(curr) {
22 | console.log('API is updated.', curr.mtime);
23 | getApis();
24 | });
25 | getApis();
26 |
27 | //支持callback
28 | app.set('jsonp callback name', 'callback');
29 | app.use(function(req, res) {
30 | var data = undefined;
31 | var delay = 0;
32 | for(var group in api) {
33 | if(api[group].find(function(reqData) {
34 | if(reqData.regexp) {
35 | if(!new RegExp(reqData.url).test(req.originalUrl)) {
36 | return false;
37 | }
38 | } else if(req.originalUrl.indexOf(prefix + reqData.url) !== 0) {
39 | return false;
40 | }
41 |
42 | var apiRes = reqData.res;
43 | data = reqData.mock ? mock.mock(apiRes) : apiRes;
44 | delay = reqData.delay || 0;
45 | return true;
46 | }) !== undefined) {
47 | break;
48 | }
49 | }
50 | res.set('Access-Control-Allow-Origin', '*');
51 | res.set('Access-Control-Allow-Methods', 'POST, GET, PUT, DELETE, OPTIONS');
52 | res.set('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept, Authorization');
53 | data !== undefined ? setTimeout(() => res.jsonp(data), delay) : res.sendStatus(404);
54 | });
55 |
--------------------------------------------------------------------------------
/resouces/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "VUE-SPA-PROJECT",
3 | "version": "1.0.0",
4 | "description": "VUE PROJECT BASED ON VUE+VUEX+ELEMENT-UI",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "run-p start_dev mock",
8 | "start_dev": "webpack-dev-server --inline --hot --host 0.0.0.0 --port 3000 --devtool source-maps --progress --colors --content-base .",
9 | "build": "cross-env NODE_ENV=production webpack --progress --colors",
10 | "mock": "node ./mock-server/server.js 2618"
11 | },
12 | "license": "MIT",
13 | "devDependencies": {
14 | "autoprefixer": "^6.7.7",
15 | "autoprefixer-loader": "^3.2.0",
16 | "babel-core": "^6.3.26",
17 | "babel-helper-vue-jsx-merge-props": "^2.0.2",
18 | "babel-loader": "^6.2.0",
19 | "babel-plugin-component": "^0.4.1",
20 | "babel-plugin-syntax-jsx": "^6.18.0",
21 | "babel-plugin-transform-object-assign": "^6.8.0",
22 | "babel-plugin-transform-runtime": "^6.3.13",
23 | "babel-plugin-transform-vue-jsx": "^3.4.3",
24 | "babel-preset-es2015": "^6.24.1",
25 | "babel-preset-react": "^6.3.13",
26 | "babel-preset-stage-0": "^6.3.13",
27 | "babel-runtime": "^6.3.19",
28 | "clean-webpack-plugin": "^0.1.16",
29 | "cross-env": "^1.0.8",
30 | "css-loader": "^0.23.1",
31 | "express": "^4.13.4",
32 | "extract-text-webpack-plugin": "^2.1.0",
33 | "file-loader": "^0.8.4",
34 | "html-webpack-plugin": "^2.10.0",
35 | "inline-manifest-webpack-plugin": "^3.0.1",
36 | "less": "^2.6.1",
37 | "less-loader": "^2.2.2",
38 | "mockjs": "^1.0.1-beta2",
39 | "npm-run-all": "^2.3.0",
40 | "postcss-loader": "^2.0.5",
41 | "url-loader": "^0.5.7",
42 | "vue-loader": "^12.0.3",
43 | "vue-style-loader": "^3.0.1",
44 | "vue-template-compiler": "^2.3.3",
45 | "webpack": "^2.2.0",
46 | "webpack-bundle-analyzer": "^2.6.0",
47 | "webpack-chunk-hash": "^0.4.0",
48 | "webpack-dev-server": "^2.2.0"
49 | },
50 | "dependencies": {
51 | "classnames": "^2.2.5",
52 | "element-ui": "^1.3.1",
53 | "es6-promise": "^3.2.1",
54 | "lodash.isempty": "^4.4.0",
55 | "vue": "^2.3.3",
56 | "vue-router": "^2.5.3",
57 | "vuex": "^2.3.1",
58 | "vuex-router-sync": "^3.0.0",
59 | "whatwg-fetch": "^1.0.0"
60 | },
61 | "repository": {
62 | "type": "git",
63 | "url": "git+https://github.com/TCL-MIG-FE/react-web-spa-startkit.git"
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/resouces/proxy.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | '/api/*': {
3 | target: 'http://127.0.0.1:2618',
4 | secure: false
5 | }
6 | };
7 |
--------------------------------------------------------------------------------
/resouces/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
35 |
36 |
37 |
74 |
75 |
76 |
162 |
163 |
164 |
--------------------------------------------------------------------------------
/resouces/src/actions/approvals.js:
--------------------------------------------------------------------------------
1 | import * as C from "../constants/api";
2 | import Api, {createAction} from "../utils/api";
3 |
4 | const metaCreator = ({processId}) =>({processId});
5 |
6 | export default {
7 |
8 | getApprovalList: createAction(C.APPROVAL_LIST, Api.getApprovalList),
9 |
10 | acceptApproval: createAction(C.APPROVAL_ACCEPTED, Api.acceptApproval, metaCreator),
11 |
12 | rejectApproval: createAction(C.APPROVAL_REJECTED, Api.rejectApproval, metaCreator),
13 |
14 | getTranslatedArticle: createAction(C.ARTICLE_VIEW, Api.getTranslatedArticle),
15 |
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/resouces/src/actions/community_approvals.js:
--------------------------------------------------------------------------------
1 | import * as C from "../constants/api";
2 | import Api, {createAction} from "../utils/api";
3 |
4 | const metaCreator = ({processId}) =>({processId});
5 |
6 | export default {
7 |
8 | getCommunityApprovalList: createAction(C.COMMUNITY_APPROVAL_LIST, Api.getCommunityApprovalList),
9 |
10 | acceptCommunityApproval: createAction(C.COMMUNITY_APPROVAL_ACCEPTED, Api.acceptCommunityApproval, metaCreator),
11 |
12 | rejectCommunityApproval: createAction(C.COMMUNITY_APPROVAL_REJECTED, Api.rejectCommunityApproval, metaCreator),
13 |
14 | getCommunityArticle: createAction(C.COMMUNITY_ARTICLE_VIEW, Api.getCommunityArticle),
15 |
16 | getCommunityArticleCategory: createAction(C.COMMUNITY_ARTICLE_CATEGORY, Api.getCommunityArticleCategory),
17 |
18 | applyCategoryToArticle: createAction(C.COMMUNITY_ARTICLE_CATEGORY_APPLIED,Api.applyCategoryToCommunityArticle)
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/resouces/src/actions/index.js:
--------------------------------------------------------------------------------
1 | import rootActions from "./root";
2 | import tasksActions from "./tasks";
3 | import approvalsActions from "./approvals";
4 | import communityApprovalsActions from "./community_approvals";
5 | import usersActions from "./users";
6 |
7 | export default {
8 | ...rootActions,
9 | ...tasksActions,
10 | ...approvalsActions,
11 | ...communityApprovalsActions,
12 | ...usersActions
13 | }
14 |
--------------------------------------------------------------------------------
/resouces/src/actions/root.js:
--------------------------------------------------------------------------------
1 | import {SHOW_PAGE_LOADING, HIDE_PAGE_LOADING, GET_CURRENT_USER} from "../constants/actions";
2 | import {createAction} from "../utils/api";
3 |
4 | export default {
5 |
6 | showPageLoading: createAction(SHOW_PAGE_LOADING),
7 | hidePageLoading: createAction(HIDE_PAGE_LOADING),
8 | getCurrentUser: createAction(GET_CURRENT_USER),
9 | }
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/resouces/src/actions/tasks.js:
--------------------------------------------------------------------------------
1 | import * as C from "../constants/api";
2 | import Api, {createAction} from "../utils/api";
3 |
4 | const metaCreator = ({processIds, reserveRecord}) =>({processIds: processIds.split(','), reserveRecord});
5 |
6 | export default {
7 |
8 | getTasks: createAction(C.TASK_LIST, Api.getTasks),
9 |
10 | publishTasks: createAction(C.TASKS_PUBLISH, Api.publishTasks, metaCreator),
11 |
12 | unPublishTasks: createAction(C.TASKS_UNPUBLISHED, Api.unPublishTasks, metaCreator),
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/resouces/src/actions/users.js:
--------------------------------------------------------------------------------
1 | import * as C from "../constants/api";
2 | import Api, {createAction} from "../utils/api";
3 | export default {
4 |
5 | getUsers: createAction(C.USERS_LIST, Api.getUsers),
6 |
7 | updateUserPwd:createAction(C.USER_PASSWORD_UPDATED, Api.updateUserPwd),
8 |
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/resouces/src/components/LoadingIndicator.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
24 |
25 |
26 |
77 |
--------------------------------------------------------------------------------
/resouces/src/components/Select.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
13 |
26 |
--------------------------------------------------------------------------------
/resouces/src/components/Table.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
61 |
62 |
67 |
--------------------------------------------------------------------------------
/resouces/src/constants/actions.js:
--------------------------------------------------------------------------------
1 | export const SHOW_PAGE_LOADING = 'SHOW_PAGE_LOADING';
2 | export const HIDE_PAGE_LOADING = 'HIDE_PAGE_LOADING';
3 |
4 | export const GET_CURRENT_USER = 'GET_CURRENT_USER';
5 |
6 |
7 |
--------------------------------------------------------------------------------
/resouces/src/constants/api.js:
--------------------------------------------------------------------------------
1 | if (__DEV__) {
2 | window.config && (window.config = {
3 | context: '/api',
4 | currentUser: 'larry.zhao'
5 | });
6 | }
7 |
8 | const getApi = (url) => `${window.config.context}/admin/${url}`;
9 |
10 | export const CODE_SUCCESS = 200;
11 |
12 | export const CODE_NOT_LOGIN = 401;
13 |
14 | export const MAX_CONTENTS_LENGTH = 1000;
15 |
16 | export const UN_PUBLISHED = 1;
17 | export const PUBLISHED = 11;
18 | export const HAVE_ACCEPTED = 12;
19 |
20 | //翻译用户
21 | export const TRANSLATED_USER_ROLE = 1;
22 |
23 | // 社区用户
24 | export const COMMUNITY_USER_ROLE = 2;
25 |
26 |
27 |
28 | export const TASK_LIST = getApi('task/list');
29 | export const TASKS_PUBLISH = getApi('task/publish');
30 | export const TASKS_UNPUBLISHED = getApi('task/unpublish');
31 |
32 | export const APPROVAL_LIST = getApi('approving/list');
33 | export const APPROVAL_ACCEPTED = getApi('translate/pass');
34 | export const APPROVAL_REJECTED = getApi('translate/unpass');
35 | export const ARTICLE_VIEW = getApi('translate/view');
36 |
37 |
38 | export const COMMUNITY_APPROVAL_LIST = getApi('community/list');
39 | export const COMMUNITY_APPROVAL_ACCEPTED = getApi('community/pass');
40 | export const COMMUNITY_APPROVAL_REJECTED = getApi('community/unpass');
41 | export const COMMUNITY_ARTICLE_VIEW = getApi('community/view');
42 | export const COMMUNITY_ARTICLE_CATEGORY = getApi('category/list');
43 | export const COMMUNITY_ARTICLE_CATEGORY_APPLIED = getApi('community/category');
44 |
45 | export const USERS_LIST = getApi('userLog/list');
46 | export const USER_PASSWORD_UPDATED = getApi('user/updatePwd');
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/resouces/src/containers/CommunityApproval.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
14 |
15 |
16 |
18 | View
19 |
20 |
21 | Accept
22 |
23 |
24 | Refuse
25 |
26 |
27 |
28 |
29 |
30 |
31 | No contents available.
32 |
33 |
34 |
35 |
41 |
51 |
52 |
53 |
54 |
55 |
189 |
190 |
191 |
214 |
215 |
--------------------------------------------------------------------------------
/resouces/src/containers/Settings.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | 提交
13 |
14 |
15 |
16 |
17 |
18 |
19 |
98 |
99 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/resouces/src/containers/Tasks.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
8 |
9 | Publish
13 |
14 |
15 | Withdraw
19 |
20 |
21 |
27 |
28 |
29 |
30 |
31 | ${{row.reward}}
32 |
33 |
34 |
35 |
36 | Unpublished
37 | Published
38 | Accepted
39 |
40 |
41 |
42 |
43 |
44 |
45 | View
46 | Publish
48 |
49 | Withdraw
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
65 |
68 |
69 |
70 |
71 |
72 |
73 |
193 |
194 |
195 |
228 |
229 |
--------------------------------------------------------------------------------
/resouces/src/containers/TranslatorApproval.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
14 | ${{props.row.reward}}
15 |
16 |
17 |
18 |
20 | View
21 |
22 |
23 | Accept
24 |
25 |
26 | Refuse
27 |
28 |
29 |
30 |
31 |
32 |
33 | No contents available.
34 |
35 |
36 |
37 |
50 |
53 |
54 |
55 |
56 |
57 |
157 |
158 |
159 |
194 |
195 |
--------------------------------------------------------------------------------
/resouces/src/containers/Users.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
9 |
10 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | No users are available
27 |
28 |
29 |
30 |
31 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/resouces/src/index_dev.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 自媒体管理
6 | <% for (var css in htmlWebpackPlugin.files.css) { %>
7 |
8 | <% } %>
9 |
10 |
11 |
17 |
18 |
19 | <%=htmlWebpackPlugin.files.webpackManifest%>
20 | <% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
21 |
22 | <% } %>
23 |
24 |
25 |
--------------------------------------------------------------------------------
/resouces/src/index_prod.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 自媒体管理
6 | <% for (var css in htmlWebpackPlugin.files.css) { %>
7 |
8 | <% } %>
9 |
10 |
11 |
17 |
18 |
19 | <%=htmlWebpackPlugin.files.webpackManifest%>
20 | <% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
21 |
22 | <% } %>
23 |
24 |
25 |
--------------------------------------------------------------------------------
/resouces/src/layouts/css/core/base.less:
--------------------------------------------------------------------------------
1 | @import "normalize";
2 | @import "../mixins/size";
3 | @import "../themes/default";
4 |
5 | * {
6 | box-sizing: border-box;
7 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); // remove tap highlight color for mobile safari
8 | }
9 |
10 | *:before,
11 | *:after {
12 | box-sizing: border-box;
13 | }
14 |
15 | // HTML & Body reset
16 | html, body {
17 | .square(100%);
18 | }
19 |
20 | body {
21 | font-family: @font-family;
22 | font-size: @font-size-base;
23 | line-height: @line-height-base;
24 | color: @text-color;
25 | background-color: @body-background;
26 | }
27 |
28 | // unify the setting of elements's margin and padding for browsers
29 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,hr,button,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
30 | margin: 0;
31 | padding: 0;
32 | }
33 |
34 | // Reset fonts for relevant elements
35 | button,input,select,textarea {
36 | font-family: inherit;
37 | font-size: inherit;
38 | line-height: inherit;
39 | color: inherit;
40 | }
41 |
42 | ul,
43 | ol {
44 | list-style: none;
45 | }
46 |
47 | // Remove the clear button of a text input control in IE10+
48 | input::-ms-clear, input::-ms-reveal {
49 | display: none;
50 | }
51 |
52 | ::selection {
53 | background: @primary-color;
54 | color: #fff;
55 | }
56 |
57 | // Links
58 | a {
59 | color: @link-color;
60 | background: transparent;
61 | text-decoration: none;
62 | outline: none;
63 | cursor: pointer;
64 | transition: color .3s ease;
65 |
66 | &:hover {
67 | color: @link-hover-color;
68 | }
69 |
70 | &:active {
71 | color: @link-active-color;
72 | }
73 |
74 | &:active,
75 | &:hover {
76 | outline: 0;
77 | text-decoration: none;
78 | }
79 |
80 | &[disabled] {
81 | color: #ccc;
82 | cursor: not-allowed;
83 | pointer-events: none;
84 | }
85 | }
86 |
87 |
88 | .pull-left {
89 | float: left;
90 | }
91 | .pull-right {
92 | float: right;
93 | }
94 | .hide {
95 | display: none !important;
96 | }
97 | .show {
98 | display: block !important;
99 | }
100 | .invisible {
101 | visibility: hidden;
102 | }
103 |
104 | .ant-divider {
105 | margin: 0 4px;
106 | color: #999;
107 | display: inline-block;
108 | height: 8px;
109 | width: 1px;
110 | background: #ccc;
111 | }
112 |
113 | code,
114 | kbd,
115 | pre,
116 | samp {
117 | font-family: @code-family;
118 | }
119 |
--------------------------------------------------------------------------------
/resouces/src/layouts/css/core/common.less:
--------------------------------------------------------------------------------
1 | @import "../themes/default";
2 |
3 | .m10 {
4 | margin: 10px;
5 | }
6 |
7 | .ml5{
8 | margin-left:5px;
9 | }
10 |
11 | .mr5 {
12 | margin-right: 5px;
13 | }
14 |
15 | .mr10 {
16 | margin-right: 10px;
17 | }
18 |
19 | .mb10 {
20 | margin-bottom: 10px;
21 | }
22 |
23 | .mb20 {
24 | margin-bottom: 20px;
25 | }
26 |
27 | .mt30 {
28 | margin-top: 30px;
29 | }
30 |
31 | .p20 {
32 | padding: 20px;
33 | }
34 |
35 | .pt20 {
36 | padding-top: 20px;
37 | }
38 |
39 | .text-center {
40 | text-align: center;
41 | }
42 |
43 | .inline-block {
44 | display: inline-block;
45 | }
46 |
47 | .vb{
48 | vertical-align: bottom;
49 | }
50 |
51 | .clearfix {
52 | zoom: 1
53 |
54 | }
55 |
56 | .clearfix:after, .clearfix:before {
57 | content: " ";
58 | display: table
59 | }
60 |
61 | .clearfix:after {
62 | clear: both;
63 | visibility: hidden;
64 | font-size: 0;
65 | height: 0
66 | }
67 |
--------------------------------------------------------------------------------
/resouces/src/layouts/css/core/font.less:
--------------------------------------------------------------------------------
1 | @icon-url : '../../fonts/antd/iconfont';
2 | @iconfont-css-prefix : anticon;
3 |
4 | @font-face {
5 | font-family: 'anticon';
6 | src: url('@{icon-url}.eot'); /* IE9*/
7 | src: url('@{icon-url}.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
8 | url('@{icon-url}.woff') format('woff'), /* chrome、firefox */
9 | url('@{icon-url}.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
10 | url('@{icon-url}.svg#iconfont') format('svg'); /* iOS 4.1- */
11 | }
12 |
13 |
14 | .@{iconfont-css-prefix} {
15 | .iconfont-mixin();
16 | }
17 |
18 | .@{iconfont-css-prefix}-caret-circle-o-up:before {content:"\e60c";}
19 | .@{iconfont-css-prefix}-android:before {content:"\e64f";}
20 | .@{iconfont-css-prefix}-chrome:before {content:"\e65c";}
21 | .@{iconfont-css-prefix}-appstore-o:before {content:"\e6b2";}
22 | .@{iconfont-css-prefix}-appstore:before {content:"\e64d";}
23 | .@{iconfont-css-prefix}-apple:before {content:"\e64e";}
24 | .@{iconfont-css-prefix}-github:before {content:"\e674";}
25 | .@{iconfont-css-prefix}-inbox:before {content:"\e67b";}
26 | .@{iconfont-css-prefix}-ie:before {content:"\e67c";}
27 | .@{iconfont-css-prefix}-smile:before {content:"\e677";}
28 | .@{iconfont-css-prefix}-smile-circle:before {content:"\e676";}
29 | .@{iconfont-css-prefix}-meh-circle:before {content:"\e678";}
30 | .@{iconfont-css-prefix}-frown:before {content:"\e673";}
31 | .@{iconfont-css-prefix}-frown-circle:before {content:"\e672";}
32 | .@{iconfont-css-prefix}-meh:before {content:"\e679";}
33 | .@{iconfont-css-prefix}-pie-chart:before {content:"\e68a";}
34 | .@{iconfont-css-prefix}-tags:before {content:"\e656";}
35 | .@{iconfont-css-prefix}-tags-o:before {content:"\e657";}
36 | .@{iconfont-css-prefix}-tag:before {content:"\e658";}
37 | .@{iconfont-css-prefix}-tag-o:before {content:"\e659";}
38 | .@{iconfont-css-prefix}-cloud:before {content:"\e65a";}
39 | .@{iconfont-css-prefix}-cloud-upload-o:before {content:"\e697";}
40 | .@{iconfont-css-prefix}-cloud-download-o:before {content:"\e698";}
41 | .@{iconfont-css-prefix}-cloud-upload:before {content:"\e696";}
42 | .@{iconfont-css-prefix}-cloud-o:before {content:"\e699";}
43 | .@{iconfont-css-prefix}-cloud-download:before {content:"\e65b";}
44 | .@{iconfont-css-prefix}-star-o:before {content:"\e693";}
45 | .@{iconfont-css-prefix}-star:before {content:"\e694";}
46 | .@{iconfont-css-prefix}-environment:before {content:"\e665";}
47 | .@{iconfont-css-prefix}-environment-o:before {content:"\e666";}
48 | .@{iconfont-css-prefix}-eye:before {content:"\e66e";}
49 | .@{iconfont-css-prefix}-eye-o:before {content:"\e66d";}
50 | .@{iconfont-css-prefix}-camera:before {content:"\e653";}
51 | .@{iconfont-css-prefix}-camera-o:before {content:"\e652";}
52 | .@{iconfont-css-prefix}-aliwangwang:before {content:"\e64b";}
53 | .@{iconfont-css-prefix}-aliwangwang-o:before {content:"\e64a";}
54 | .@{iconfont-css-prefix}-windows:before {content:"\e6a0";}
55 | .@{iconfont-css-prefix}-shopping-cart:before {content:"\e692";}
56 | .@{iconfont-css-prefix}-unlock:before {content:"\e69f";}
57 | .@{iconfont-css-prefix}-lock:before {content:"\e69d";}
58 | .@{iconfont-css-prefix}-save:before {content:"\e69e";}
59 | .@{iconfont-css-prefix}-user:before {content:"\e69c";}
60 | .@{iconfont-css-prefix}-video-camera:before {content:"\e69b";}
61 | .@{iconfont-css-prefix}-to-top:before {content:"\e69a";}
62 | .@{iconfont-css-prefix}-team:before {content:"\e680";}
63 | .@{iconfont-css-prefix}-tablet:before {content:"\e695";}
64 | .@{iconfont-css-prefix}-solution:before {content:"\e68f";}
65 | .@{iconfont-css-prefix}-poweroff:before {content:"\e691";}
66 | .@{iconfont-css-prefix}-search:before {content:"\e690";}
67 | .@{iconfont-css-prefix}-share-alt:before {content:"\e68e";}
68 | .@{iconfont-css-prefix}-setting:before {content:"\e68d";}
69 | .@{iconfont-css-prefix}-poweroff:before {content:"\e68b";}
70 | .@{iconfont-css-prefix}-picture:before {content:"\e689";}
71 | .@{iconfont-css-prefix}-phone:before {content:"\e688";}
72 | .@{iconfont-css-prefix}-paper-clip:before {content:"\e687";}
73 | .@{iconfont-css-prefix}-notification:before {content:"\e686";}
74 | .@{iconfont-css-prefix}-mobile:before {content:"\e685";}
75 | .@{iconfont-css-prefix}-menu-fold:before {content:"\e684";}
76 | .@{iconfont-css-prefix}-menu-unfold:before {content:"\e683";}
77 | .@{iconfont-css-prefix}-mail:before {content:"\e682";}
78 | .@{iconfont-css-prefix}-logout:before {content:"\e681";}
79 | .@{iconfont-css-prefix}-link:before {content:"\e67e";}
80 | .@{iconfont-css-prefix}-line-chart:before {content:"\e67f";}
81 | .@{iconfont-css-prefix}-home:before {content:"\e67d";}
82 | .@{iconfont-css-prefix}-laptop:before {content:"\e67a";}
83 | .@{iconfont-css-prefix}-hdd:before {content:"\e675";}
84 | .@{iconfont-css-prefix}-folder-open:before {content:"\e671";}
85 | .@{iconfont-css-prefix}-folder:before {content:"\e670";}
86 | .@{iconfont-css-prefix}-filter:before {content:"\e66f";}
87 | .@{iconfont-css-prefix}-file-text:before {content:"\e66c";}
88 | .@{iconfont-css-prefix}-file:before {content:"\e66b";}
89 | .@{iconfont-css-prefix}-file-unknown:before {content:"\e6a6";}
90 | .@{iconfont-css-prefix}-file-excel:before {content:"\e6ac";}
91 | .@{iconfont-css-prefix}-file-pdf:before {content:"\e6ab";}
92 | .@{iconfont-css-prefix}-file-jpg:before {content:"\e6aa";}
93 | .@{iconfont-css-prefix}-file-ppt:before {content:"\e6a7";}
94 | .@{iconfont-css-prefix}-exception:before {content:"\e66a";}
95 | .@{iconfont-css-prefix}-export:before {content:"\e669";}
96 | .@{iconfont-css-prefix}-desktop:before {content:"\e662";}
97 | .@{iconfont-css-prefix}-edit:before {content:"\e668";}
98 | .@{iconfont-css-prefix}-ellipsis:before {content:"\e667";}
99 | .@{iconfont-css-prefix}-upload:before {content:"\e664";}
100 | .@{iconfont-css-prefix}-download:before {content:"\e663";}
101 | .@{iconfont-css-prefix}-delete:before {content:"\e661";}
102 | .@{iconfont-css-prefix}-copy:before {content:"\e660";}
103 | .@{iconfont-css-prefix}-customerservice:before {content:"\e65e";}
104 | .@{iconfont-css-prefix}-credit-card:before {content:"\e65f";}
105 | .@{iconfont-css-prefix}-code:before {content:"\e65d";}
106 | .@{iconfont-css-prefix}-calendar:before {content:"\e654";}
107 | .@{iconfont-css-prefix}-book:before {content:"\e655";}
108 | .@{iconfont-css-prefix}-bars:before {content:"\e650";}
109 | .@{iconfont-css-prefix}-bar-chart:before {content:"\e651";}
110 | .@{iconfont-css-prefix}-area-chart:before {content:"\e64c";}
111 | .@{iconfont-css-prefix}-question-circle-o:before {content:"\e648";}
112 | .@{iconfont-css-prefix}-question:before {content:"\e649";}
113 | .@{iconfont-css-prefix}-question-circle:before {content:"\e647";}
114 | .@{iconfont-css-prefix}-pause-circle:before {content:"\e644";}
115 | .@{iconfont-css-prefix}-pause:before {content:"\e646";}
116 | .@{iconfont-css-prefix}-pause-circle-o:before {content:"\e645";}
117 | .@{iconfont-css-prefix}-clock-circle:before {content:"\e642";}
118 | .@{iconfont-css-prefix}-clock-circle-o:before {content:"\e643";}
119 | .@{iconfont-css-prefix}-swap:before {content:"\e641";}
120 | .@{iconfont-css-prefix}-swap-left:before {content:"\e63f";}
121 | .@{iconfont-css-prefix}-swap-right:before {content:"\e640";}
122 | .@{iconfont-css-prefix}-plus-circle:before {content:"\e63d";}
123 | .@{iconfont-css-prefix}-plus:before {content:"\e63e";}
124 | .@{iconfont-css-prefix}-plus-circle-o:before {content:"\e63c";}
125 | .@{iconfont-css-prefix}-minus:before {content:"\e63b";}
126 | .@{iconfont-css-prefix}-minus-circle-o:before {content:"\e63a";}
127 | .@{iconfont-css-prefix}-minus-circle:before {content:"\e639";}
128 | .@{iconfont-css-prefix}-plus-square:before {content:"\e6ae";}
129 | .@{iconfont-css-prefix}-minus-square:before {content:"\e6ad";}
130 | .@{iconfont-css-prefix}-info-circle-o:before {content:"\e638";}
131 | .@{iconfont-css-prefix}-info-circle:before {content:"\e637";}
132 | .@{iconfont-css-prefix}-info:before {content:"\e636";}
133 | .@{iconfont-css-prefix}-exclamation-circle:before {content:"\e634";}
134 | .@{iconfont-css-prefix}-exclamation-circle-o:before {content:"\e635";}
135 | .@{iconfont-css-prefix}-exclamation:before {content:"\e633";}
136 | .@{iconfont-css-prefix}-cross-circle:before {content:"\e631";}
137 | .@{iconfont-css-prefix}-cross-circle-o:before {content:"\e632";}
138 | .@{iconfont-css-prefix}-check-circle:before {content:"\e62f";}
139 | .@{iconfont-css-prefix}-check-circle-o:before {content:"\e630";}
140 | .@{iconfont-css-prefix}-cross:before {content:"\e62d";}
141 | .@{iconfont-css-prefix}-check:before {content:"\e62e";}
142 | .@{iconfont-css-prefix}-verticle-right:before {content:"\e62c";}
143 | .@{iconfont-css-prefix}-verticle-left:before {content:"\e62b";}
144 | .@{iconfont-css-prefix}-rollback:before {content:"\e62a";}
145 | .@{iconfont-css-prefix}-enter:before {content:"\e6b6";}
146 | .@{iconfont-css-prefix}-retweet:before {content:"\e627";}
147 | .@{iconfont-css-prefix}-shrink:before {content:"\e628";}
148 | .@{iconfont-css-prefix}-arrow-salt:before {content:"\e629";}
149 | .@{iconfont-css-prefix}-reload:before {content:"\e626";}
150 | .@{iconfont-css-prefix}-double-right:before {content:"\e625";}
151 | .@{iconfont-css-prefix}-double-left:before {content:"\e624";}
152 | .@{iconfont-css-prefix}-arrow-right:before {content:"\e621";}
153 | .@{iconfont-css-prefix}-arrow-up:before {content:"\e622";}
154 | .@{iconfont-css-prefix}-arrow-down:before {content:"\e623";}
155 | .@{iconfont-css-prefix}-arrow-left:before {content:"\e620";}
156 | .@{iconfont-css-prefix}-left:before {content:"\e601";}
157 | .@{iconfont-css-prefix}-right:before {content:"\e600";}
158 | .@{iconfont-css-prefix}-down:before {content:"\e603";}
159 | .@{iconfont-css-prefix}-up:before {content:"\e602";}
160 | .@{iconfont-css-prefix}-play-circle:before {content:"\e61e";}
161 | .@{iconfont-css-prefix}-play-circle-o:before {content:"\e61f";}
162 | .@{iconfont-css-prefix}-circle-left:before {content:"\e61b";}
163 | .@{iconfont-css-prefix}-circle-up:before {content:"\e61c";}
164 | .@{iconfont-css-prefix}-circle-down:before {content:"\e61d";}
165 | .@{iconfont-css-prefix}-circle-right:before {content:"\e61a";}
166 | .@{iconfont-css-prefix}-circle-o-right:before {content:"\e616";}
167 | .@{iconfont-css-prefix}-circle-o-up:before {content:"\e618";}
168 | .@{iconfont-css-prefix}-circle-o-down:before {content:"\e617";}
169 | .@{iconfont-css-prefix}-circle-o-left:before {content:"\e619";}
170 | .@{iconfont-css-prefix}-step-backward:before {content:"\e614";}
171 | .@{iconfont-css-prefix}-step-forward:before {content:"\e615";}
172 | .@{iconfont-css-prefix}-fast-backward:before {content:"\e613";}
173 | .@{iconfont-css-prefix}-fast-forward:before {content:"\e612";}
174 | .@{iconfont-css-prefix}-caret-left:before {content:"\e60f";}
175 | .@{iconfont-css-prefix}-caret-right:before {content:"\e60a";}
176 | .@{iconfont-css-prefix}-caret-down:before {content:"\e611";}
177 | .@{iconfont-css-prefix}-caret-up:before {content:"\e610";}
178 | .@{iconfont-css-prefix}-forward:before {content:"\e608";}
179 | .@{iconfont-css-prefix}-backward:before {content:"\e609";}
180 | .@{iconfont-css-prefix}-caret-circle-o-down:before {content:"\e60e";}
181 | .@{iconfont-css-prefix}-caret-circle-o-right:before {content:"\e60d";}
182 | .@{iconfont-css-prefix}-caret-circle-o-left:before {content:"\e60b";}
183 | .@{iconfont-css-prefix}-caret-circle-left:before {content:"\e604";}
184 | .@{iconfont-css-prefix}-caret-circle-right:before {content:"\e605";}
185 | .@{iconfont-css-prefix}-caret-circle-up:before {content:"\e606";}
186 | .@{iconfont-css-prefix}-caret-circle-down:before {content:"\e607";}
187 | .@{iconfont-css-prefix}-qrcode:before {content:"\e6a5";}
188 | .@{iconfont-css-prefix}-scan:before {content:"\e6af";}
189 | .@{iconfont-css-prefix}-like:before {content:"\e6a3";}
190 | .@{iconfont-css-prefix}-dislike:before {content:"\e6a2";}
191 | .@{iconfont-css-prefix}-pay-circle:before {content:"\e6a8";}
192 | .@{iconfont-css-prefix}-pay-circle-o:before {content:"\e6a9";}
193 | .@{iconfont-css-prefix}-message:before {content:"\e6a4";}
194 | .@{iconfont-css-prefix}-heart:before {content:"\e68c";}
195 | .@{iconfont-css-prefix}-heart-o:before {content:"\e6b0";}
196 | .@{iconfont-css-prefix}-calculator:before {content:"\e6b1";}
197 | .@{iconfont-css-prefix}-pushpin:before {content:"\e6b5";}
198 | .@{iconfont-css-prefix}-pushpin-o:before {content:"\e6b3";}
199 | .@{iconfont-css-prefix}-loading:before {
200 | display: inline-block;
201 | animation: loadingCircle 1s infinite linear;
202 | content:"\e6a1";
203 | }
204 |
--------------------------------------------------------------------------------
/resouces/src/layouts/css/core/index.less:
--------------------------------------------------------------------------------
1 | @import "../mixins/index";
2 | @import "./base";
3 | @import "./font";
4 | @import "reset";
5 | @import "common";
6 |
--------------------------------------------------------------------------------
/resouces/src/layouts/css/core/normalize.less:
--------------------------------------------------------------------------------
1 | /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
2 |
3 | /**
4 | * 1. Change the default font family in all browsers (opinionated).
5 | * 2. Prevent adjustments of font size after orientation changes in IE and iOS.
6 | */
7 |
8 | html {
9 | font-family: sans-serif; /* 1 */
10 | -ms-text-size-adjust: 100%; /* 2 */
11 | -webkit-text-size-adjust: 100%; /* 2 */
12 | }
13 |
14 | /**
15 | * Remove the margin in all browsers (opinionated).
16 | */
17 |
18 | body {
19 | margin: 0;
20 | }
21 |
22 | /* HTML5 display definitions
23 | ========================================================================== */
24 |
25 | /**
26 | * Add the correct display in IE 9-.
27 | * 1. Add the correct display in Edge, IE, and Firefox.
28 | * 2. Add the correct display in IE.
29 | */
30 |
31 | article,
32 | aside,
33 | details, /* 1 */
34 | figcaption,
35 | figure,
36 | footer,
37 | header,
38 | main, /* 2 */
39 | menu,
40 | nav,
41 | section,
42 | summary { /* 1 */
43 | display: block;
44 | }
45 |
46 | /**
47 | * Add the correct display in IE 9-.
48 | */
49 |
50 | audio,
51 | canvas,
52 | progress,
53 | video {
54 | display: inline-block;
55 | }
56 |
57 | /**
58 | * Add the correct display in iOS 4-7.
59 | */
60 |
61 | audio:not([controls]) {
62 | display: none;
63 | height: 0;
64 | }
65 |
66 | /**
67 | * Add the correct vertical alignment in Chrome, Firefox, and Opera.
68 | */
69 |
70 | progress {
71 | vertical-align: baseline;
72 | }
73 |
74 | /**
75 | * Add the correct display in IE 10-.
76 | * 1. Add the correct display in IE.
77 | */
78 |
79 | template, /* 1 */
80 | [hidden] {
81 | display: none;
82 | }
83 |
84 | /* Links
85 | ========================================================================== */
86 |
87 | /**
88 | * 1. Remove the gray background on active links in IE 10.
89 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
90 | */
91 |
92 | a {
93 | background-color: transparent; /* 1 */
94 | -webkit-text-decoration-skip: objects; /* 2 */
95 | }
96 |
97 | /**
98 | * Remove the outline on focused links when they are also active or hovered
99 | * in all browsers (opinionated).
100 | */
101 |
102 | a:active,
103 | a:hover {
104 | outline-width: 0;
105 | }
106 |
107 | /* Text-level semantics
108 | ========================================================================== */
109 |
110 | /**
111 | * 1. Remove the bottom border in Firefox 39-.
112 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
113 | */
114 |
115 | abbr[title] {
116 | border-bottom: none; /* 1 */
117 | text-decoration: underline; /* 2 */
118 | text-decoration: underline dotted; /* 2 */
119 | }
120 |
121 | /**
122 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
123 | */
124 |
125 | b,
126 | strong {
127 | font-weight: inherit;
128 | }
129 |
130 | /**
131 | * Add the correct font weight in Chrome, Edge, and Safari.
132 | */
133 |
134 | b,
135 | strong {
136 | font-weight: bolder;
137 | }
138 |
139 | /**
140 | * Add the correct font style in Android 4.3-.
141 | */
142 |
143 | dfn {
144 | font-style: italic;
145 | }
146 |
147 | /**
148 | * Correct the font size and margin on `h1` elements within `section` and
149 | * `article` contexts in Chrome, Firefox, and Safari.
150 | */
151 |
152 | h1 {
153 | font-size: 2em;
154 | margin: 0.67em 0;
155 | }
156 |
157 | /**
158 | * Add the correct background and color in IE 9-.
159 | */
160 |
161 | mark {
162 | background-color: #ff0;
163 | color: #000;
164 | }
165 |
166 | /**
167 | * Add the correct font size in all browsers.
168 | */
169 |
170 | small {
171 | font-size: 80%;
172 | }
173 |
174 | /**
175 | * Prevent `sub` and `sup` elements from affecting the line height in
176 | * all browsers.
177 | */
178 |
179 | sub,
180 | sup {
181 | font-size: 75%;
182 | line-height: 0;
183 | position: relative;
184 | vertical-align: baseline;
185 | }
186 |
187 | sub {
188 | bottom: -0.25em;
189 | }
190 |
191 | sup {
192 | top: -0.5em;
193 | }
194 |
195 | /* Embedded content
196 | ========================================================================== */
197 |
198 | /**
199 | * Remove the border on images inside links in IE 10-.
200 | */
201 |
202 | img {
203 | border-style: none;
204 | }
205 |
206 | /**
207 | * Hide the overflow in IE.
208 | */
209 |
210 | svg:not(:root) {
211 | overflow: hidden;
212 | }
213 |
214 | /* Grouping content
215 | ========================================================================== */
216 |
217 | /**
218 | * 1. Correct the inheritance and scaling of font size in all browsers.
219 | * 2. Correct the odd `em` font sizing in all browsers.
220 | */
221 |
222 | code,
223 | kbd,
224 | pre,
225 | samp {
226 | font-family: monospace, monospace; /* 1 */
227 | font-size: 1em; /* 2 */
228 | }
229 |
230 | /**
231 | * Add the correct margin in IE 8.
232 | */
233 |
234 | figure {
235 | margin: 1em 40px;
236 | }
237 |
238 | /**
239 | * 1. Add the correct box sizing in Firefox.
240 | * 2. Show the overflow in Edge and IE.
241 | */
242 |
243 | hr {
244 | box-sizing: content-box; /* 1 */
245 | height: 0; /* 1 */
246 | overflow: visible; /* 2 */
247 | }
248 |
249 | /* Forms
250 | ========================================================================== */
251 |
252 | /**
253 | * 1. Change font properties to `inherit` in all browsers (opinionated).
254 | * 2. Remove the margin in Firefox and Safari.
255 | */
256 |
257 | button,
258 | input,
259 | select,
260 | textarea {
261 | font: inherit; /* 1 */
262 | margin: 0; /* 2 */
263 | }
264 |
265 | /**
266 | * Restore the font weight unset by the previous rule.
267 | */
268 |
269 | optgroup {
270 | font-weight: bold;
271 | }
272 |
273 | /**
274 | * Show the overflow in IE.
275 | * 1. Show the overflow in Edge.
276 | */
277 |
278 | button,
279 | input { /* 1 */
280 | overflow: visible;
281 | }
282 |
283 | /**
284 | * Remove the inheritance of text transform in Edge, Firefox, and IE.
285 | * 1. Remove the inheritance of text transform in Firefox.
286 | */
287 |
288 | button,
289 | select { /* 1 */
290 | text-transform: none;
291 | }
292 |
293 | /**
294 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
295 | * controls in Android 4.
296 | * 2. Correct the inability to style clickable types in iOS and Safari.
297 | */
298 |
299 | button,
300 | html [type="button"], /* 1 */
301 | [type="reset"],
302 | [type="submit"] {
303 | -webkit-appearance: button; /* 2 */
304 | }
305 |
306 | /**
307 | * Remove the inner border and padding in Firefox.
308 | */
309 |
310 | button::-moz-focus-inner,
311 | [type="button"]::-moz-focus-inner,
312 | [type="reset"]::-moz-focus-inner,
313 | [type="submit"]::-moz-focus-inner {
314 | border-style: none;
315 | padding: 0;
316 | }
317 |
318 | /**
319 | * Restore the focus styles unset by the previous rule.
320 | */
321 |
322 | button:-moz-focusring,
323 | [type="button"]:-moz-focusring,
324 | [type="reset"]:-moz-focusring,
325 | [type="submit"]:-moz-focusring {
326 | outline: 1px dotted ButtonText;
327 | }
328 |
329 | /**
330 | * Change the border, margin, and padding in all browsers (opinionated).
331 | */
332 |
333 | fieldset {
334 | border: 1px solid #c0c0c0;
335 | margin: 0 2px;
336 | padding: 0.35em 0.625em 0.75em;
337 | }
338 |
339 | /**
340 | * 1. Correct the text wrapping in Edge and IE.
341 | * 2. Correct the color inheritance from `fieldset` elements in IE.
342 | * 3. Remove the padding so developers are not caught out when they zero out
343 | * `fieldset` elements in all browsers.
344 | */
345 |
346 | legend {
347 | box-sizing: border-box; /* 1 */
348 | color: inherit; /* 2 */
349 | display: table; /* 1 */
350 | max-width: 100%; /* 1 */
351 | padding: 0; /* 3 */
352 | white-space: normal; /* 1 */
353 | }
354 |
355 | /**
356 | * Remove the default vertical scrollbar in IE.
357 | */
358 |
359 | textarea {
360 | overflow: auto;
361 | }
362 |
363 | /**
364 | * 1. Add the correct box sizing in IE 10-.
365 | * 2. Remove the padding in IE 10-.
366 | */
367 |
368 | [type="checkbox"],
369 | [type="radio"] {
370 | box-sizing: border-box; /* 1 */
371 | padding: 0; /* 2 */
372 | }
373 |
374 | /**
375 | * Correct the cursor style of increment and decrement buttons in Chrome.
376 | */
377 |
378 | [type="number"]::-webkit-inner-spin-button,
379 | [type="number"]::-webkit-outer-spin-button {
380 | height: auto;
381 | }
382 |
383 | input[type=number] {
384 | -moz-appearance:textfield;
385 | }
386 |
387 | /**
388 | * 1. Correct the odd appearance in Chrome and Safari.
389 | * 2. Correct the outline style in Safari.
390 | */
391 |
392 | [type="search"] {
393 | -webkit-appearance: textfield; /* 1 */
394 | outline-offset: -2px; /* 2 */
395 | }
396 |
397 | /**
398 | * Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
399 | */
400 |
401 | [type="search"]::-webkit-search-cancel-button,
402 | [type="search"]::-webkit-search-decoration {
403 | -webkit-appearance: none;
404 | }
405 |
406 | /**
407 | * Correct the text style of placeholders in Chrome, Edge, and Safari.
408 | */
409 |
410 | ::-webkit-input-placeholder {
411 | color: inherit;
412 | opacity: 0.54;
413 | }
414 |
415 | /**
416 | * 1. Correct the inability to style clickable types in iOS and Safari.
417 | * 2. Change font properties to `inherit` in Safari.
418 | */
419 |
420 | ::-webkit-file-upload-button {
421 | -webkit-appearance: button; /* 1 */
422 | font: inherit; /* 2 */
423 | }
424 |
425 |
426 |
--------------------------------------------------------------------------------
/resouces/src/layouts/css/core/reset.less:
--------------------------------------------------------------------------------
1 | /** element-ui的对话框会给body增加样式,导致导航栏右侧出现空白 **/
2 | body{
3 | padding-right:0 !important;
4 | }
5 |
6 | /** 解决element-ui中表格有复选框是,选择按钮不居中的问题 **/
7 | .el-checkbox__input .el-checkbox__inner::after {
8 | top: 3px;
9 | left: 6px;
10 | }
11 |
12 | /** 限制element-ui的tooltip宽度**/
13 | .el-tooltip__popper {
14 | width: 400px !important;
15 |
16 | a {
17 | color: #fff;
18 | line-height: 20px;
19 | }
20 | }
21 |
22 | /** 调整对话框大小 **/
23 | .el-dialog--large {
24 | min-width: 900px;
25 | top: 20px !important;
26 | }
27 |
28 | /** 调整element-ui的消息提示,免得文字超长时比较难看 **/
29 | .el-message__group p {
30 | white-space: normal;
31 | text-align: initial;
32 | }
33 |
34 | /** element-ui的分页跳转处理,显示为英文,隐藏中文 **/
35 | span.el-pagination__jump{
36 | font-size:0;
37 | position:relative;
38 | margin-left: 30px;
39 | &:before{
40 | width: 20px;
41 | height: 20px;
42 | top: 0;
43 | left: -20px;
44 | font-size:13px;
45 | position: absolute;
46 | content: 'Go';
47 | }
48 |
49 | input{
50 | font-size:13px;
51 | width:35px !important;
52 | }
53 | }
54 |
55 |
56 | /** 当下拉框位于dialog的footer中时,下拉框无法显示出来 **/
57 | .el-select-dropdown{
58 | z-index:3000;
59 | }
60 |
--------------------------------------------------------------------------------
/resouces/src/layouts/css/index.less:
--------------------------------------------------------------------------------
1 | @import "./core/index";
2 |
--------------------------------------------------------------------------------
/resouces/src/layouts/css/mixins/compatibility.less:
--------------------------------------------------------------------------------
1 | // Compatibility for browsers.
2 |
3 |
4 | // Placeholder text
5 | .placeholder(@color: @input-placeholder-color) {
6 | // Firefox
7 | &::-moz-placeholder {
8 | color: @color;
9 | opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
10 | }
11 | // Internet Explorer 10+
12 | &:-ms-input-placeholder {
13 | color: @color;
14 | }
15 | // Safari and Chrome
16 | &::-webkit-input-placeholder {
17 | color: @color;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/resouces/src/layouts/css/mixins/iconfont.less:
--------------------------------------------------------------------------------
1 | .iconfont-mixin() {
2 | display: inline-block;
3 | font-style: normal;
4 | vertical-align: baseline;
5 | text-align: center;
6 | text-transform: none;
7 | text-rendering: auto;
8 | line-height: 1;
9 | text-rendering: optimizeLegibility;
10 | -webkit-font-smoothing: antialiased;
11 | -moz-osx-font-smoothing: grayscale;
12 | &:before {
13 | display: block;
14 | font-family: "anticon" !important;
15 | }
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/resouces/src/layouts/css/mixins/index.less:
--------------------------------------------------------------------------------
1 | @import "opacity";
2 | @import "size";
3 | @import "compatibility";
4 | @import "iconfont";
5 |
--------------------------------------------------------------------------------
/resouces/src/layouts/css/mixins/opacity.less:
--------------------------------------------------------------------------------
1 | // Opacity
2 |
3 | .opacity(@opacity) {
4 | opacity: @opacity;
5 | // IE8 filter
6 | @opacity-ie: (@opacity * 100);
7 | filter: ~"alpha(opacity=@{opacity-ie})";
8 | }
9 |
--------------------------------------------------------------------------------
/resouces/src/layouts/css/mixins/size.less:
--------------------------------------------------------------------------------
1 | // Sizing shortcuts
2 |
3 | .size(@width; @height) {
4 | width: @width;
5 | height: @height;
6 | }
7 |
8 | .square(@size) {
9 | .size(@size; @size);
10 | }
11 |
--------------------------------------------------------------------------------
/resouces/src/layouts/css/themes/default.less:
--------------------------------------------------------------------------------
1 | // Color
2 | @body-width : 1280px;
3 | @header-height : 64px;
4 | @header-color : #0096E0;
5 | @primary-color : #2db7f5;
6 | // ------ Base & Require ------
7 | @body-background : #fff;
8 |
9 | @font-family : "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
10 | @code-family : Consolas,Menlo,Courier,monospace;
11 | @text-color : #666;
12 | @font-size-base : 13px;
13 | @line-height-base : 1.5;
14 | @line-height-computed : floor((@font-size-base * @line-height-base));
15 | @border-radius-base : 6px;
16 | @border-radius-sm : 4px;
17 |
18 |
19 |
20 | // LINK
21 | @link-color : #2db7f5;
22 | @link-hover-color : tint(@link-color, 20%);
23 | @link-active-color : shade(@link-color, 5%);
24 | @link-hover-decoration : none;
25 |
--------------------------------------------------------------------------------
/resouces/src/layouts/fonts/antd/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TCL-MIG-FE/vue-web-spa-startkit/470308e1194daf5072437005ec9e8adc2da029de/resouces/src/layouts/fonts/antd/iconfont.eot
--------------------------------------------------------------------------------
/resouces/src/layouts/fonts/antd/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TCL-MIG-FE/vue-web-spa-startkit/470308e1194daf5072437005ec9e8adc2da029de/resouces/src/layouts/fonts/antd/iconfont.ttf
--------------------------------------------------------------------------------
/resouces/src/layouts/fonts/antd/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TCL-MIG-FE/vue-web-spa-startkit/470308e1194daf5072437005ec9e8adc2da029de/resouces/src/layouts/fonts/antd/iconfont.woff
--------------------------------------------------------------------------------
/resouces/src/layouts/img/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TCL-MIG-FE/vue-web-spa-startkit/470308e1194daf5072437005ec9e8adc2da029de/resouces/src/layouts/img/avatar.png
--------------------------------------------------------------------------------
/resouces/src/layouts/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TCL-MIG-FE/vue-web-spa-startkit/470308e1194daf5072437005ec9e8adc2da029de/resouces/src/layouts/img/logo.png
--------------------------------------------------------------------------------
/resouces/src/mutations/approvals.js:
--------------------------------------------------------------------------------
1 | import * as C from "../constants/api";
2 |
3 | const state = {
4 | approvalsList: {
5 | items: [],
6 | pageSize: 10,
7 | pageNo: 1,
8 | totalCount: 0
9 | },
10 |
11 | translatedArticle: {}
12 | };
13 | const mutations = {
14 |
15 | [C.APPROVAL_LIST](state, {payload}){
16 | state.approvalsList = payload;
17 | },
18 |
19 | [C.APPROVAL_ACCEPTED](state, {meta:{processId}}){
20 | const items = state.approvalsList.items;
21 | state.approvalsList.items = items.filter(item => item.processId !== processId);
22 | },
23 |
24 | [C.APPROVAL_REJECTED](state, {meta:{processId}}){
25 | const items = state.approvalsList.items;
26 | state.approvalsList.items = items.filter(item => item.processId !== processId);
27 | },
28 |
29 |
30 | [C.ARTICLE_VIEW](state, {payload}){
31 | state.translatedArticle = payload || {} ;
32 | },
33 |
34 | };
35 |
36 | export default{
37 | state,
38 | mutations
39 | }
40 |
--------------------------------------------------------------------------------
/resouces/src/mutations/community_approvals.js:
--------------------------------------------------------------------------------
1 | import * as C from "../constants/api";
2 |
3 | const state = {
4 | approvalsList: {
5 | items: [],
6 | pageSize: 10,
7 | pageNo: 1,
8 | totalCount: 0
9 | },
10 |
11 | article: {},
12 |
13 | articleCategories:[],
14 | };
15 | const mutations = {
16 |
17 | [C.COMMUNITY_APPROVAL_LIST](state, {payload}){
18 | state.approvalsList = payload;
19 | },
20 |
21 | [C.COMMUNITY_APPROVAL_ACCEPTED](state, {meta:{processId}}){
22 | const items = state.approvalsList.items;
23 | state.approvalsList.items = items.filter(item => item.processId !== processId);
24 | },
25 |
26 | [C.COMMUNITY_APPROVAL_REJECTED](state, {meta:{processId}}){
27 | const items = state.approvalsList.items;
28 | state.approvalsList.items = items.filter(item => item.processId !== processId);
29 | },
30 |
31 |
32 | [C.COMMUNITY_ARTICLE_VIEW](state, {payload}){
33 | state.article = payload || {};
34 | },
35 |
36 | [C.COMMUNITY_ARTICLE_CATEGORY](state, {payload}){
37 | state.articleCategories = payload;
38 | },
39 |
40 | [C.COMMUNITY_ARTICLE_CATEGORY_APPLIED](state){
41 | // pass
42 | }
43 | };
44 |
45 | export default{
46 | state,
47 | mutations
48 | }
49 |
--------------------------------------------------------------------------------
/resouces/src/mutations/index.js:
--------------------------------------------------------------------------------
1 | import root from "./root";
2 | import tasks from "./tasks";
3 | import approvals from "./approvals";
4 | import communityApprovals from "./community_approvals";
5 | import users from "./users";
6 |
7 | export default {
8 | root,
9 | tasks,
10 | approvals,
11 | communityApprovals,
12 | users
13 | }
14 |
--------------------------------------------------------------------------------
/resouces/src/mutations/root.js:
--------------------------------------------------------------------------------
1 | import {SHOW_PAGE_LOADING, HIDE_PAGE_LOADING, GET_CURRENT_USER} from "../constants/actions";
2 |
3 | const state = {
4 | pageLoading: false,
5 | currentUser: 'anonymous'
6 |
7 | };
8 | const mutations = {
9 |
10 | [SHOW_PAGE_LOADING](state){
11 | state.pageLoading = true;
12 | },
13 |
14 | [HIDE_PAGE_LOADING](state){
15 | state.pageLoading = false;
16 | },
17 |
18 | [GET_CURRENT_USER](state){
19 | var user = window.config && window.config.currentUser;
20 | user && ( state.currentUser = user);
21 | }
22 |
23 | };
24 |
25 | export default{
26 | state,
27 | mutations
28 | }
29 |
--------------------------------------------------------------------------------
/resouces/src/mutations/tasks.js:
--------------------------------------------------------------------------------
1 | import * as C from "../constants/api";
2 |
3 | const state = {
4 | tasksList: {
5 | items: [],
6 | pageSize: 10,
7 | pageNo: 1,
8 | totalCount: 0
9 | }
10 | };
11 | const mutations = {
12 |
13 | [C.TASK_LIST](state, {payload}){
14 | state.tasksList = payload;
15 | state.tasksList.pageNo = payload.pageNo;
16 | },
17 |
18 | [C.TASKS_PUBLISH](state, {meta:{processIds, reserveRecord}}){
19 | const items = state.tasksList.items;
20 | if( reserveRecord ){
21 | state.tasksList.items = items.map( item =>{
22 | processIds.forEach( processId =>{
23 | processId == item.processId && ( item.status = C.PUBLISHED);
24 | });
25 | return item;
26 | })
27 | }else{
28 | state.tasksList.items = items.filter(item => {
29 | return !processIds.some(processId => processId == item.processId);
30 | })
31 | }
32 |
33 | },
34 |
35 | [C.TASKS_UNPUBLISHED](state, {meta:{processIds, reserveRecord}}){
36 | const items = state.tasksList.items;
37 | if( reserveRecord ){
38 | state.tasksList.items = items.map( item =>{
39 | processIds.forEach( processId =>{
40 | processId == item.processId && ( item.status = C.UN_PUBLISHED);
41 | });
42 | return item;
43 | })
44 | }else{
45 | state.tasksList.items = items.filter(item => {
46 | return !processIds.some(processId => processId == item.processId);
47 | })
48 | }
49 | }
50 | };
51 |
52 | export default{
53 | state,
54 | mutations
55 | }
56 |
--------------------------------------------------------------------------------
/resouces/src/mutations/users.js:
--------------------------------------------------------------------------------
1 | import * as C from "../constants/api";
2 |
3 | const state = {
4 | usersList: {
5 | items: [],
6 | pageSize: 10,
7 | pageNo: 1,
8 | totalCount: 0
9 | },
10 | };
11 | const mutations = {
12 |
13 | [C.USERS_LIST](state, {payload}){
14 | state.usersList = payload || 'anonymous';
15 | },
16 |
17 | [C.USER_PASSWORD_UPDATED](state){
18 | },
19 |
20 | };
21 |
22 | export default{
23 | state,
24 | mutations
25 | }
26 |
--------------------------------------------------------------------------------
/resouces/src/root.js:
--------------------------------------------------------------------------------
1 |
2 | import Vue from "vue";
3 | import store from "./store";
4 | import router from "./router";
5 | import {sync} from "vuex-router-sync";
6 | import App from './App'
7 |
8 | sync(store, router);
9 |
10 | new Vue({
11 | el:'#root',
12 | store,
13 | router,
14 | render: h => h(App)
15 |
16 | });
17 |
18 |
--------------------------------------------------------------------------------
/resouces/src/router.js:
--------------------------------------------------------------------------------
1 | import Vue from "vue"
2 | import VueRouter from "vue-router"
3 | import Tasks from "./containers/Tasks"
4 | import TranslatorApproval from "./containers/TranslatorApproval"
5 | import CommunityApproval from "./containers/CommunityApproval"
6 | import Users from "./containers/Users"
7 | import Settings from "./containers/Settings"
8 | Vue.use(VueRouter);
9 |
10 | const Router = new VueRouter({
11 | routes: [
12 | {path: '/', redirect: '/tasks'},
13 | {path: '/tasks', component: Tasks},
14 | {path: '/translator/approval', component: TranslatorApproval},
15 | {path: '/community/approval', component: CommunityApproval},
16 | {path: '/userManager', component: Users},
17 | {path: '/settings', component: Settings},
18 | ]
19 | });
20 |
21 |
22 | export default Router;
23 |
24 |
25 |
--------------------------------------------------------------------------------
/resouces/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from "vue";
2 | import Vuex from "vuex";
3 | import actions from "../actions";
4 | import mutations from "../mutations";
5 |
6 | Vue.use(Vuex);
7 |
8 | Vue.config.devtools = __DEV__;
9 |
10 | !__DEV__ && (Vue.config.errorHandler = function (err, vm) {
11 |
12 | vm.$store.dispatch("hidePageLoading");
13 | console.error(err.message);
14 | vm.$message(({message: '很抱歉,貌似出现错误了,请刷新页面重新尝试 :-)', type: 'error', showClose:true}));
15 | });
16 |
17 | export default new Vuex.Store({
18 | actions,
19 | modules: mutations,
20 | strict: false,
21 | })
22 |
--------------------------------------------------------------------------------
/resouces/src/utils/api.js:
--------------------------------------------------------------------------------
1 | import "es6-promise";
2 | import "whatwg-fetch";
3 | import {Message} from "element-ui";
4 | import qs from "querystring";
5 | import isEmpty from "lodash.isempty";
6 | import * as API from "../constants/api";
7 |
8 | const METHODS = {
9 | GET: 'get',
10 | POST: 'post',
11 | PUT: 'put',
12 | DELETE: 'delete'
13 | };
14 |
15 | const request = (url, params, method = METHODS.GET, jsonType = false) => {
16 | var options = {
17 | headers: {
18 | 'Content-Type': jsonType ? 'application/json;charset=UTF-8' : 'application/x-www-form-urlencoded',
19 | 'Accept': 'text/javascript,*/*'
20 | },
21 | method: method,
22 | credentials: 'include'
23 | };
24 | if (method !== METHODS.GET && !isEmpty(params)) {
25 | options.body = jsonType ? JSON.stringify(params) : qs.stringify(params)
26 | } else if (method === METHODS.GET && !isEmpty(params)) {
27 | const newParams = ( ~url.lastIndexOf('?') ? '&' : '?' ) + qs.stringify(params);
28 | url += newParams;
29 |
30 | }
31 | return fetch(url, options).then(checkRespStatus);
32 | };
33 |
34 | const post = (url, params) => request(url, params, METHODS.POST, true);
35 |
36 | // check resp status
37 | const checkRespStatus = (respPromise) => {
38 | if (respPromise.status === 403) {
39 | // 后台session过期。passport会返回invalidSession,同时status为403
40 | window.location.reload();
41 | return;
42 | }
43 | return respPromise.json().then(resp => {
44 | return new Promise((resolve, reject) => {
45 | if (resp && resp.code == API.CODE_SUCCESS) {
46 | resolve(resp.data);
47 | } else if (resp && resp.code == API.CODE_NOT_LOGIN) {
48 | // 页面超时,重新刷新页面
49 | window.location.reload();
50 | } else {
51 | resp.msg && Message({message: resp.msg, type: 'warning', showClose: true});
52 | reject(resp);
53 | }
54 | });
55 | });
56 | };
57 |
58 |
59 | export const createAction = (type, payloadCreator, metaCreator) => {
60 | const identity = (...args) => args[0];
61 | const isFunc = (fn) => typeof(fn) === 'function';
62 | const isPromise = obj => typeof(obj) === 'object' && isFunc(obj.then);
63 | const finalPayloadCreator = isFunc(payloadCreator) ? payloadCreator : identity;
64 |
65 | return ({commit, dispatch}, ...args) => {
66 | const payload = finalPayloadCreator(...args);
67 | const action = {type, payload};
68 |
69 | if (isFunc(metaCreator)) {
70 | action.meta = metaCreator(...args);
71 | }
72 |
73 | if (isPromise(payload)) {
74 | return payload.then(result => {
75 | commit(type, Object.assign(action, {payload: result}));
76 | return result;
77 | }).catch(error => {
78 | commit(type, Object.assign(action, {error: true, msg: error.msg}));
79 | return error;
80 | });
81 | }
82 |
83 | return commit(type, Object.assign(action, {payload}));
84 | };
85 | };
86 |
87 |
88 | export default {
89 |
90 | // 获取所用的任务列表
91 | getTasks: params => request(API.TASK_LIST, params),
92 |
93 | publishTasks: params => post(API.TASKS_PUBLISH, params),
94 |
95 | unPublishTasks: params => post(API.TASKS_UNPUBLISHED, params),
96 |
97 |
98 | // 获取所有的翻译内容审核列表
99 | getApprovalList: params => request(API.APPROVAL_LIST, params),
100 |
101 | acceptApproval: params => post(API.APPROVAL_ACCEPTED, params),
102 |
103 | rejectApproval: params => post(API.APPROVAL_REJECTED, params),
104 |
105 | // 获取翻译的详情
106 | getTranslatedArticle: processId => request(API.ARTICLE_VIEW, {processId}),
107 |
108 |
109 | // 获取社区内容审核列表
110 | getCommunityApprovalList: params => request(API.COMMUNITY_APPROVAL_LIST, params),
111 |
112 | acceptCommunityApproval: params => post(API.COMMUNITY_APPROVAL_ACCEPTED, params),
113 |
114 | rejectCommunityApproval: params => post(API.COMMUNITY_APPROVAL_REJECTED, params),
115 |
116 | // 获取指定社区文章的详情
117 | getCommunityArticle: processId => request(API.COMMUNITY_ARTICLE_VIEW, {processId}),
118 |
119 | // 获取文章分类
120 | getCommunityArticleCategory: params => request(API.COMMUNITY_ARTICLE_CATEGORY, params),
121 |
122 | // 给文章设置分类
123 | applyCategoryToCommunityArticle: params => post(API.COMMUNITY_ARTICLE_CATEGORY_APPLIED, params),
124 |
125 |
126 | getUsers: params => request(API.USERS_LIST, params),
127 |
128 | updateUserPwd: params =>post(API.USER_PASSWORD_UPDATED, params)
129 | };
130 |
131 |
--------------------------------------------------------------------------------
/resouces/webpack.config.js:
--------------------------------------------------------------------------------
1 |
2 | if (process.env.NODE_ENV != 'production') {
3 | config = require("./webpack.dev.config.js");
4 | } else {
5 | config = require("./webpack.prod.config.js");
6 | }
7 |
8 |
9 |
10 | module.exports = config;
11 |
--------------------------------------------------------------------------------
/resouces/webpack.dev.config.js:
--------------------------------------------------------------------------------
1 | var path = require("path"),
2 | webpack = require("webpack"),
3 | proxy = require("./proxy");
4 |
5 | var SRC_PATH = path.join(__dirname, 'src'),
6 | DIST_PATH = path.join(__dirname, '../static');
7 |
8 | var HtmlWebpackPlugin = require('html-webpack-plugin');
9 |
10 |
11 | var config = {
12 | entry: {
13 | apps: path.join(SRC_PATH, 'root.js'),
14 | vendors: [
15 | 'vue',
16 | 'vuex',
17 | 'vue-router',
18 | 'vuex-router-sync',
19 | 'whatwg-fetch',
20 | 'es6-promise',
21 | 'querystring'
22 | ]
23 | },
24 |
25 | resolve: {
26 | modules: [SRC_PATH, "node_modules"],
27 | extensions: [".less", ".css", ".js", ".vue", ".json"]
28 | },
29 |
30 | output: {
31 | path: DIST_PATH,
32 | publicPath: '',
33 | filename: "js/[name].js"
34 | },
35 |
36 |
37 | plugins: [
38 | new webpack.optimize.CommonsChunkPlugin({
39 | names: ['vendors', 'manifest']
40 | }),
41 | new webpack.DefinePlugin({
42 | 'process.env.NODE_ENV': JSON.stringify('development'),
43 | '__DEV__': true
44 | }),
45 |
46 | new HtmlWebpackPlugin({
47 | inject: false,
48 | filename: './index.html',
49 | template: path.join(SRC_PATH, 'index_dev.html')
50 | })
51 |
52 | ],
53 |
54 | module: {
55 |
56 |
57 | rules: [{
58 | test: /\.vue$/,
59 | loader: 'vue-loader'
60 | }, {
61 | test: /\.js$/,
62 | loader: "babel-loader",
63 | include: SRC_PATH
64 | },
65 |
66 | {
67 | test: /\.css$/,
68 | use: [
69 | "style-loader",
70 | "css-loader",
71 | "autoprefixer-loader"
72 | ]
73 | },
74 |
75 | {
76 | test: /\.less$/,
77 | use: [
78 | "style-loader",
79 | "css-loader",
80 | "autoprefixer-loader",
81 | "less-loader"
82 | ]
83 | },
84 |
85 | {
86 | test: /\.(png|jpg|gif)$/,
87 | loader: "url-loader",
88 | options: {
89 | limit: 8192,
90 | name: 'imgs/[name].[ext]'
91 | }
92 | },
93 |
94 | {
95 | test: /\.(eot|woff|woff2|ttf|svg)/,
96 | loader: "url-loader",
97 | options: {
98 | limit: 100,
99 | name: 'fonts/[name].[ext]'
100 | }
101 | }
102 | ]
103 | },
104 |
105 |
106 | devServer: {
107 | proxy: proxy
108 | }
109 | };
110 |
111 |
112 | console.log("initializing webpack developent build....");
113 |
114 | module.exports = config;
115 |
--------------------------------------------------------------------------------
/resouces/webpack.prod.config.js:
--------------------------------------------------------------------------------
1 | var path = require("path"),
2 | webpack = require("webpack");
3 |
4 | var SRC_PATH = path.join(__dirname, 'src'),
5 | DIST_PATH = path.join(__dirname, '../static'),
6 | CHUNK_FILE_HASH_TAG = '_[chunkhash:5]';
7 |
8 | var HtmlWebpackPlugin = require('html-webpack-plugin'),
9 | ExtractTextPlugin = require("extract-text-webpack-plugin"),
10 | CleanWebpackPlugin = require('clean-webpack-plugin'),
11 | WebpackChunkHash = require("webpack-chunk-hash"),
12 | InlineManifestWebpackPlugin = require('inline-manifest-webpack-plugin');
13 |
14 |
15 | var config = {
16 | entry: {
17 | apps: path.join(SRC_PATH, 'root.js'),
18 | vendors: [
19 | 'vue',
20 | 'vuex',
21 | 'vue-router',
22 | 'vuex-router-sync',
23 | 'whatwg-fetch',
24 | 'es6-promise',
25 | 'querystring'
26 | ]
27 | },
28 |
29 | resolve: {
30 | modules: [SRC_PATH, "node_modules"],
31 | extensions: [".less", ".css", ".js", ".vue", ".json"]
32 | },
33 |
34 | output: {
35 | path: DIST_PATH,
36 | publicPath: '',
37 | filename: `js/[name]${CHUNK_FILE_HASH_TAG}.js`,
38 | chunkFilename: `js/[id].[name]${CHUNK_FILE_HASH_TAG}.js`
39 | },
40 |
41 |
42 | plugins: [
43 |
44 | new CleanWebpackPlugin("static", {
45 | root: path.join(__dirname, "../"),
46 | verbose: true
47 | }),
48 |
49 | new webpack.DefinePlugin({
50 | 'process.env.NODE_ENV': JSON.stringify('production'),
51 | '__DEV__': false
52 | }),
53 |
54 | new webpack.optimize.CommonsChunkPlugin({
55 | name: ["vendors", "manifest"],
56 | minChunks: Infinity
57 | }),
58 |
59 | new webpack.HashedModuleIdsPlugin(),
60 | new WebpackChunkHash(),
61 | new InlineManifestWebpackPlugin(),
62 |
63 | new ExtractTextPlugin(`css/commons${CHUNK_FILE_HASH_TAG}.css`),
64 |
65 | new webpack.LoaderOptionsPlugin({
66 | minimize: true,
67 | debug: false
68 | }),
69 |
70 | new webpack.optimize.UglifyJsPlugin({
71 | comments: false
72 | }),
73 |
74 | new HtmlWebpackPlugin({
75 | inject: false,
76 | filename: '../index.html',
77 | template: path.join(SRC_PATH, 'index_prod.html'),
78 | })
79 | ],
80 |
81 | module: {
82 |
83 | rules: [{
84 | test: /\.js$/,
85 | loader: "babel-loader",
86 | exclude: /node_modules/
87 | }, {
88 | test: /\.vue$/,
89 | loader: 'vue-loader',
90 | options: {
91 | preserveWhitespace: false,
92 | loaders: {
93 | less: ExtractTextPlugin.extract({
94 | loader: ['css-loader', 'autoprefixer-loader', 'less-loader'],
95 | fallbackLoader: 'vue-style-loader',
96 | publicPath: "../"
97 | })
98 | }
99 |
100 | }
101 | },
102 |
103 | {
104 | test: /\.(png|jpg|gif)$/,
105 | loader: "url-loader",
106 | options: {
107 | limit: 8192,
108 | name: `images/[name].[ext]`
109 | }
110 | },
111 |
112 | {
113 | test: /\.(eot|woff|woff2|ttf|svg)/,
114 | loader: "url-loader",
115 | options: {
116 | limit: 100,
117 | name: 'fonts/[name].[ext]'
118 | }
119 | }
120 | ]
121 | }
122 | };
123 |
124 |
125 | console.log("initializing webpack production build....");
126 |
127 | module.exports = config;
128 |
--------------------------------------------------------------------------------
/screenshoots/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TCL-MIG-FE/vue-web-spa-startkit/470308e1194daf5072437005ec9e8adc2da029de/screenshoots/1.png
--------------------------------------------------------------------------------
/screenshoots/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TCL-MIG-FE/vue-web-spa-startkit/470308e1194daf5072437005ec9e8adc2da029de/screenshoots/2.png
--------------------------------------------------------------------------------
/static/fonts/element-icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TCL-MIG-FE/vue-web-spa-startkit/470308e1194daf5072437005ec9e8adc2da029de/static/fonts/element-icons.ttf
--------------------------------------------------------------------------------
/static/fonts/element-icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TCL-MIG-FE/vue-web-spa-startkit/470308e1194daf5072437005ec9e8adc2da029de/static/fonts/element-icons.woff
--------------------------------------------------------------------------------
/static/fonts/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TCL-MIG-FE/vue-web-spa-startkit/470308e1194daf5072437005ec9e8adc2da029de/static/fonts/iconfont.eot
--------------------------------------------------------------------------------
/static/fonts/iconfont.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
644 |
--------------------------------------------------------------------------------
/static/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TCL-MIG-FE/vue-web-spa-startkit/470308e1194daf5072437005ec9e8adc2da029de/static/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/static/fonts/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TCL-MIG-FE/vue-web-spa-startkit/470308e1194daf5072437005ec9e8adc2da029de/static/fonts/iconfont.woff
--------------------------------------------------------------------------------
/static/js/manifest_d41d8.js:
--------------------------------------------------------------------------------
1 | !function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,c,u){for(var i,a,f,s=0,p=[];s