first commit

This commit is contained in:
沈昭朝 2024-06-11 14:56:22 +08:00
commit 4befdd00bc
192 changed files with 28030 additions and 0 deletions

14
.editorconfig Normal file
View File

@ -0,0 +1,14 @@
# http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

5
.env.development Normal file
View File

@ -0,0 +1,5 @@
# just a flag
ENV = 'development'
# base api
VUE_APP_BASE_API = '/dev-api'

7
.env.production Normal file
View File

@ -0,0 +1,7 @@
# just a flag
ENV = 'production'
# base api
VUE_APP_BASE_API = '/prod-api'
# VUE_APP_BASE_API = 'http://139.219.4.195:8002'

8
.env.staging Normal file
View File

@ -0,0 +1,8 @@
NODE_ENV = production
# just a flag
ENV = 'staging'
# base api
VUE_APP_BASE_API = '/stage-api'

4
.eslintignore Normal file
View File

@ -0,0 +1,4 @@
build/*.js
src/assets
public
dist

198
.eslintrc.js Normal file
View File

@ -0,0 +1,198 @@
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true,
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],
// add your custom rules here
//it is base on https://github.com/vuejs/eslint-config-vue
rules: {
"vue/max-attributes-per-line": [2, {
"singleline": 10,
"multiline": {
"max": 1,
"allowFirstLine": false
}
}],
"vue/singleline-html-element-content-newline": "off",
"vue/multiline-html-element-content-newline":"off",
"vue/name-property-casing": ["error", "PascalCase"],
"vue/no-v-html": "off",
'accessor-pairs': 2,
'arrow-spacing': [2, {
'before': true,
'after': true
}],
'block-spacing': [2, 'always'],
'brace-style': [2, '1tbs', {
'allowSingleLine': true
}],
'camelcase': [0, {
'properties': 'always'
}],
'comma-dangle': [2, 'never'],
'comma-spacing': [2, {
'before': false,
'after': true
}],
'comma-style': [2, 'last'],
'constructor-super': 2,
'curly': [2, 'multi-line'],
'dot-location': [2, 'property'],
'eol-last': 2,
'eqeqeq': ["error", "always", {"null": "ignore"}],
'generator-star-spacing': [2, {
'before': true,
'after': true
}],
'handle-callback-err': [2, '^(err|error)$'],
'indent': [2, 2, {
'SwitchCase': 1
}],
'jsx-quotes': [2, 'prefer-single'],
'key-spacing': [2, {
'beforeColon': false,
'afterColon': true
}],
'keyword-spacing': [2, {
'before': true,
'after': true
}],
'new-cap': [2, {
'newIsCap': true,
'capIsNew': false
}],
'new-parens': 2,
'no-array-constructor': 2,
'no-caller': 2,
'no-console': 'off',
'no-class-assign': 2,
'no-cond-assign': 2,
'no-const-assign': 2,
'no-control-regex': 0,
'no-delete-var': 2,
'no-dupe-args': 2,
'no-dupe-class-members': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-empty-character-class': 2,
'no-empty-pattern': 2,
'no-eval': 2,
'no-ex-assign': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-boolean-cast': 2,
'no-extra-parens': [2, 'functions'],
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-func-assign': 2,
'no-implied-eval': 2,
'no-inner-declarations': [2, 'functions'],
'no-invalid-regexp': 2,
'no-irregular-whitespace': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-labels': [2, {
'allowLoop': false,
'allowSwitch': false
}],
'no-lone-blocks': 2,
'no-mixed-spaces-and-tabs': 2,
'no-multi-spaces': 2,
'no-multi-str': 2,
'no-multiple-empty-lines': [2, {
'max': 1
}],
'no-native-reassign': 2,
'no-negated-in-lhs': 2,
'no-new-object': 2,
'no-new-require': 2,
'no-new-symbol': 2,
'no-new-wrappers': 2,
'no-obj-calls': 2,
'no-octal': 2,
'no-octal-escape': 2,
'no-path-concat': 2,
'no-proto': 2,
'no-redeclare': 2,
'no-regex-spaces': 2,
'no-return-assign': [2, 'except-parens'],
'no-self-assign': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-shadow-restricted-names': 2,
'no-spaced-func': 2,
'no-sparse-arrays': 2,
'no-this-before-super': 2,
'no-throw-literal': 2,
'no-trailing-spaces': 2,
'no-undef': 2,
'no-undef-init': 2,
'no-unexpected-multiline': 2,
'no-unmodified-loop-condition': 2,
'no-unneeded-ternary': [2, {
'defaultAssignment': false
}],
'no-unreachable': 2,
'no-unsafe-finally': 2,
'no-unused-vars': [2, {
'vars': 'all',
'args': 'none'
}],
'no-useless-call': 2,
'no-useless-computed-key': 2,
'no-useless-constructor': 2,
'no-useless-escape': 0,
'no-whitespace-before-property': 2,
'no-with': 2,
'one-var': [2, {
'initialized': 'never'
}],
'operator-linebreak': [2, 'after', {
'overrides': {
'?': 'before',
':': 'before'
}
}],
'padded-blocks': [2, 'never'],
'quotes': [2, 'single', {
'avoidEscape': true,
'allowTemplateLiterals': true
}],
'semi': [2, 'never'],
'semi-spacing': [2, {
'before': false,
'after': true
}],
'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, 'never'],
'space-in-parens': [2, 'never'],
'space-infix-ops': 2,
'space-unary-ops': [2, {
'words': true,
'nonwords': false
}],
'spaced-comment': [2, 'always', {
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
}],
'template-curly-spacing': [2, 'never'],
'use-isnan': 2,
'valid-typeof': 2,
'wrap-iife': [2, 'any'],
'yield-star-spacing': [2, 'both'],
'yoda': [2, 'never'],
'prefer-const': 2,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'object-curly-spacing': [2, 'always', {
objectsInObjects: false
}],
'array-bracket-spacing': [2, 'never']
}
}

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
node_modules

5
.travis.yml Normal file
View File

@ -0,0 +1,5 @@
language: node_js
node_js: 10
script: npm run test
notifications:
email: false

5
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"recommendations": [
"ms-ceintl.vscode-language-pack-zh-hans"
]
}

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017-present PanJiaChen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

14
babel.config.js Normal file
View File

@ -0,0 +1,14 @@
module.exports = {
presets: [
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
'@vue/cli-plugin-babel/preset'
],
'env': {
'development': {
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
// https://panjiachen.github.io/vue-element-admin-site/guide/advanced/lazy-loading.html
'plugins': ['dynamic-import-node']
}
}
}

35
build/index.js Normal file
View File

@ -0,0 +1,35 @@
const { run } = require('runjs')
const chalk = require('chalk')
const config = require('../vue.config.js')
const rawArgv = process.argv.slice(2)
const args = rawArgv.join(' ')
if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
const report = rawArgv.includes('--report')
run(`vue-cli-service build ${args}`)
const port = 9526
const publicPath = config.publicPath
var connect = require('connect')
var serveStatic = require('serve-static')
const app = connect()
app.use(
publicPath,
serveStatic('./dist', {
index: ['index.html', '/']
})
)
app.listen(port, function () {
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
if (report) {
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
}
})
} else {
run(`vue-cli-service build ${args}`)
}

BIN
dist/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

1
dist/index.html vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/static/css/app.64732b27.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.user-container[data-v-01f0f342]{margin:30px}.user-container .button-headers[data-v-01f0f342]{margin-bottom:10px}.user-container .add-delete-buttons[data-v-01f0f342]{margin-bottom:30px}

View File

@ -0,0 +1 @@
.container[data-v-61a7e56c]{width:100%;height:100%;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;list-style:none}.component[data-v-61a7e56c]{height:2em;background:-webkit-gradient(linear,left top,right top,from(#aabe52),to(#6c9));background:linear-gradient(90deg,#aabe52,#6c9);font-size:1.5em;color:#fff}.component[data-v-61a7e56c],.navigation[data-v-61a7e56c]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.navigation[data-v-61a7e56c]{height:calc(100vh - 2em);background-color:#f0f0f0}.nav-grid[data-v-61a7e56c]{display:-webkit-box;display:-ms-flexbox;display:flex;background-color:#f3f3f0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-left:10px;padding-top:10px;overflow-x:auto}.nav-grid span[data-v-61a7e56c]{line-height:50px;font-size:26px;font-family:Siemens Sans Bold,Arial Black,sans-serif}.nav-button[data-v-61a7e56c]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:300px;height:300px;text-decoration:none;background-size:cover;background-position:50%;background-repeat:no-repeat;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out;margin:0 10px;background-color:#f7f7f7;-webkit-box-shadow:0 4px 8px rgba(0,0,0,.1);box-shadow:0 4px 8px rgba(0,0,0,.1);border-radius:8px;background-image:url(../../static/img/test.72839d9a.png)}.nav-button[data-v-61a7e56c]:hover{-webkit-transform:scale(1.05);transform:scale(1.05)}body[data-v-61a7e56c]{background-color:#f7f7f7;font-family:Siemens Sans Bold,Arial Black,sans-serif}.component[data-v-61a7e56c]{background:-webkit-gradient(linear,left top,right top,from(#4ca1af),to(#c4e0e5));background:linear-gradient(90deg,#4ca1af,#c4e0e5)}.navigation[data-v-61a7e56c]{background-color:#e0e0e0}.nav-button[data-v-61a7e56c]{color:#fff}

View File

@ -0,0 +1 @@
.container[data-v-74bbedb0]{position:relative}.container .personal-info-container[data-v-74bbedb0]{width:580px;height:475px;border-radius:3px;position:absolute;top:150px;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.container .personal-info-container .card-body .update-pwd-form[data-v-74bbedb0],.container .personal-info-container .card-header[data-v-74bbedb0]{text-align:center}.container .personal-info-container .card-body .update-pwd-form .el-form-item[data-v-74bbedb0]{margin:40px 20px;text-align:center}.container .personal-info-container .card-body .update-pwd-form .buttons[data-v-74bbedb0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}

View File

@ -0,0 +1 @@
.role-container[data-v-7df9ce71]{margin:30px}.role-container .header-buttons[data-v-7df9ce71]{display:-webkit-box;display:-ms-flexbox;display:flex;padding:20px 0 0 0;margin:0 0 40px 0;background-color:#008f91;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.1);box-shadow:0 2px 4px rgba(0,0,0,.1)}.role-container .add-delete-buttons[data-v-7df9ce71]{margin-bottom:30px}.el-form-item[data-v-7df9ce71] .el-form-item__label{color:#fff}.table-block[data-v-7df9ce71]{width:100%!important;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.1);box-shadow:0 2px 4px rgba(0,0,0,.1)}.header-buttons[data-v-7df9ce71]:hover,.table-block[data-v-7df9ce71]:hover{-webkit-box-shadow:0 4px 8px rgba(0,0,0,.2);box-shadow:0 4px 8px rgba(0,0,0,.2)}.emphasis-box[data-v-7df9ce71]{display:inline-block;padding:5px 10px;margin-right:5px;border-radius:10px;font-weight:700;color:#333;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.1);box-shadow:0 2px 4px rgba(0,0,0,.1);-webkit-transition:background-color .3s ease;transition:background-color .3s ease}.emphasis-box[data-v-7df9ce71]:hover{background-color:#e0e0e0}.engineer-info[data-v-7df9ce71]{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:1rem}.engineer-info[data-v-7df9ce71],.transfer-container[data-v-7df9ce71]{border:3px solid #ebeef5;border-radius:4px;padding:1rem;display:-webkit-box;display:-ms-flexbox;display:flex}.transfer-container[data-v-7df9ce71]{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.info-row[data-v-7df9ce71]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.info-row strong[data-v-7df9ce71]{margin-right:.5rem}[data-v-7df9ce71] .el-tag.el-tag--info{background-color:#008f91;border-color:#396afe;color:#fff;margin-top:10px}[data-v-7df9ce71] .el-cascader__tags .el-tag:not(.is-hit){border-color:#396afe}[data-v-7df9ce71] .el-cascader__search-input{margin-top:10px}.dropDownPanel{max-height:600px;overflow-y:auto;background:#008f91;border:1px solid #396afe}.dropDownPanel[x-placement^=bottom] .popper__arrow{display:none}.dropDownPanel .el-cascader-menu{width:auto;height:auto;color:#fff;border-right:1px solid #396afe}.dropDownPanel .el-scrollbar__wrap{overflow:hidden;margin-bottom:0!important;margin-right:0!important;height:100%}.dropDownPanel .el-cascader-node.in-active-path,.dropDownPanel .el-cascader-node.is-active{color:#38b4c1}.dropDownPanel .el-cascader-node:not(.is-disabled):focus,.dropDownPanel .el-cascader-node:not(.is-disabled):hover{background-color:#008f91!important}

View File

@ -0,0 +1 @@
.extra-column[data-v-248cf186]{display:none}.el-table__row:hover .extra-column[data-v-248cf186]{display:block}.current-day[data-v-248cf186]{background-color:#dddb52}.weekend[data-v-248cf186]{font-weight:700}.week-day[data-v-248cf186]{border-top:1px solid #ebeef5;font-size:10px}.dashboard-text[data-v-248cf186]{font-size:30px;line-height:46px}.change-month-button-group[data-v-248cf186]{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:10px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;position:relative}.year-month-span[data-v-248cf186]{position:relative;margin-bottom:10px}.status-desc-group[data-v-248cf186]{display:-webkit-box;display:-ms-flexbox;display:flex;margin-top:10px;border-radius:10px;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.status-desc-group span[data-v-248cf186]:nth-child(odd){margin-right:5px}.status-desc-group span[data-v-248cf186]:nth-child(2n){margin-right:15px}[data-v-248cf186] .el-table .cell{padding:0}[data-v-248cf186] .el-table .el-table__cell{padding:0;height:30px;width:50px}.el-select-dropdown__item[data-v-248cf186]:hover,[data-v-248cf186] .el-select-dropdown__item.hover{background-color:#f5f7fa!important}.status-span[data-v-248cf186]{display:block;width:100%;height:100%}.status-span[data-v-248cf186]:hover{cursor:pointer!important}.siemens-button[data-v-248cf186]{background-color:#009c99;color:#fff;font-weight:700;font-size:13px}.emphasis-box[data-v-248cf186]{display:inline-block;padding:5px 10px;margin-right:5px;border-radius:10px;font-weight:700;color:#333;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.1);box-shadow:0 2px 4px rgba(0,0,0,.1);-webkit-transition:background-color .3s ease;transition:background-color .3s ease}.emphasis-box[data-v-248cf186]:hover{background-color:#e0e0e0}[data-v-248cf186] .el-cascader__search-input,[data-v-248cf186] .el-tag.el-tag--info{margin-top:10px}.dropDownPanel{max-height:600px;overflow-y:auto}.dropDownPanel[x-placement^=bottom] .popper__arrow{display:none}.dropDownPanel .el-cascader-menu{width:auto;height:auto}.dropDownPanel .el-scrollbar__wrap{overflow:hidden;margin-bottom:0!important;margin-right:0!important;height:100%}

View File

@ -0,0 +1 @@
.permission-container[data-v-646c3902]{padding:20px}.permission-container .button-group[data-v-646c3902]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.permission-container .button-group .addFirstMenu[data-v-646c3902]{width:130px;margin:10px}

View File

@ -0,0 +1 @@
.role-container[data-v-49f96228]{margin:30px}.role-container .header-buttons[data-v-49f96228]{margin-bottom:10px}.role-container .add-delete-buttons[data-v-49f96228]{margin-bottom:30px}

View File

@ -0,0 +1 @@
.SkillType-container[data-v-3be2b7e9]{margin:30px}.SkillType-container .header-buttons[data-v-3be2b7e9]{margin-bottom:10px}.SkillType-container .add-delete-buttons[data-v-3be2b7e9]{margin-bottom:30px}

View File

@ -0,0 +1 @@
.role-container[data-v-2e0c9668]{margin:30px}.role-container .header-buttons[data-v-2e0c9668]{margin-bottom:10px}.role-container .add-delete-buttons[data-v-2e0c9668]{margin-bottom:30px}

View File

@ -0,0 +1 @@
.wscn-http404-container[data-v-c095f994]{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);position:absolute;top:40%;left:50%}.wscn-http404[data-v-c095f994]{position:relative;width:1200px;padding:0 50px;overflow:hidden}.wscn-http404 .pic-404[data-v-c095f994]{position:relative;float:left;width:600px;overflow:hidden}.wscn-http404 .pic-404__parent[data-v-c095f994]{width:100%}.wscn-http404 .pic-404__child[data-v-c095f994]{position:absolute}.wscn-http404 .pic-404__child.left[data-v-c095f994]{width:80px;top:17px;left:220px;opacity:0;-webkit-animation-name:cloudLeft-data-v-c095f994;animation-name:cloudLeft-data-v-c095f994;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-delay:1s;animation-delay:1s}.wscn-http404 .pic-404__child.mid[data-v-c095f994]{width:46px;top:10px;left:420px;opacity:0;-webkit-animation-name:cloudMid-data-v-c095f994;animation-name:cloudMid-data-v-c095f994;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-delay:1.2s;animation-delay:1.2s}.wscn-http404 .pic-404__child.right[data-v-c095f994]{width:62px;top:100px;left:500px;opacity:0;-webkit-animation-name:cloudRight-data-v-c095f994;animation-name:cloudRight-data-v-c095f994;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-delay:1s;animation-delay:1s}@-webkit-keyframes cloudLeft-data-v-c095f994{0%{top:17px;left:220px;opacity:0}20%{top:33px;left:188px;opacity:1}80%{top:81px;left:92px;opacity:1}to{top:97px;left:60px;opacity:0}}@keyframes cloudLeft-data-v-c095f994{0%{top:17px;left:220px;opacity:0}20%{top:33px;left:188px;opacity:1}80%{top:81px;left:92px;opacity:1}to{top:97px;left:60px;opacity:0}}@-webkit-keyframes cloudMid-data-v-c095f994{0%{top:10px;left:420px;opacity:0}20%{top:40px;left:360px;opacity:1}70%{top:130px;left:180px;opacity:1}to{top:160px;left:120px;opacity:0}}@keyframes cloudMid-data-v-c095f994{0%{top:10px;left:420px;opacity:0}20%{top:40px;left:360px;opacity:1}70%{top:130px;left:180px;opacity:1}to{top:160px;left:120px;opacity:0}}@-webkit-keyframes cloudRight-data-v-c095f994{0%{top:100px;left:500px;opacity:0}20%{top:120px;left:460px;opacity:1}80%{top:180px;left:340px;opacity:1}to{top:200px;left:300px;opacity:0}}@keyframes cloudRight-data-v-c095f994{0%{top:100px;left:500px;opacity:0}20%{top:120px;left:460px;opacity:1}80%{top:180px;left:340px;opacity:1}to{top:200px;left:300px;opacity:0}}.wscn-http404 .bullshit[data-v-c095f994]{position:relative;float:left;width:300px;padding:30px 0;overflow:hidden}.wscn-http404 .bullshit__oops[data-v-c095f994]{font-size:32px;line-height:40px;color:#1482f0;margin-bottom:20px;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.wscn-http404 .bullshit__headline[data-v-c095f994],.wscn-http404 .bullshit__oops[data-v-c095f994]{font-weight:700;opacity:0;-webkit-animation-name:slideUp-data-v-c095f994;animation-name:slideUp-data-v-c095f994;-webkit-animation-duration:.5s;animation-duration:.5s}.wscn-http404 .bullshit__headline[data-v-c095f994]{font-size:20px;line-height:24px;color:#222;margin-bottom:10px;-webkit-animation-delay:.1s;animation-delay:.1s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.wscn-http404 .bullshit__info[data-v-c095f994]{font-size:13px;line-height:21px;color:grey;margin-bottom:30px;-webkit-animation-delay:.2s;animation-delay:.2s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.wscn-http404 .bullshit__info[data-v-c095f994],.wscn-http404 .bullshit__return-home[data-v-c095f994]{opacity:0;-webkit-animation-name:slideUp-data-v-c095f994;animation-name:slideUp-data-v-c095f994;-webkit-animation-duration:.5s;animation-duration:.5s}.wscn-http404 .bullshit__return-home[data-v-c095f994]{display:block;float:left;width:110px;height:36px;background:#1482f0;border-radius:100px;text-align:center;color:#fff;font-size:14px;line-height:36px;cursor:pointer;-webkit-animation-delay:.3s;animation-delay:.3s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@-webkit-keyframes slideUp-data-v-c095f994{0%{-webkit-transform:translateY(60px);transform:translateY(60px);opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}@keyframes slideUp-data-v-c095f994{0%{-webkit-transform:translateY(60px);transform:translateY(60px);opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}

View File

@ -0,0 +1 @@
.main-box{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:calc(100vh - 50px)}.chart-container,.main-box{display:-webkit-box;display:-ms-flexbox;display:flex}.chart-container{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%;height:100%}.chart{-ms-flex-preferred-size:30%;flex-basis:30%;height:80%;padding-top:10%}.DCAllDept{-ms-flex-preferred-size:70%;flex-basis:70%;height:86%;padding-top:7%}.radio-group{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.chart-radio,.radio-group{display:-webkit-box;display:-ms-flexbox;display:flex}.chart-radio{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.chart1{display:-webkit-box;display:-ms-flexbox;display:flex;height:90%;padding-top:2%}

View File

@ -0,0 +1 @@
@supports(-webkit-mask:none) and (not (cater-color:#fff)){.login-container .el-input input{color:#fff}}.login-container{background:-webkit-gradient(linear,left top,left bottom,from(#000129),to(#009898));background:linear-gradient(180deg,#000129,#009898)}.login-container .el-input{display:inline-block;height:47px;width:85%}.login-container .el-input input{background:transparent;border:0;-webkit-appearance:none;border-radius:0;padding:12px 5px 12px 15px;color:#fff;height:47px;caret-color:#fff}.login-container .el-input input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #283443 inset!important;box-shadow:inset 0 0 0 1000px #283443!important;-webkit-text-fill-color:#fff!important}.login-container .el-form-item{border:1px solid hsla(0,0%,100%,.1);background:rgba(0,0,0,.1);border-radius:5px;color:#454545}.login-container[data-v-1c118c79]{min-height:100%;width:100%;background-color:#2d3a4b;overflow:hidden}.login-container .login-form[data-v-1c118c79]{position:relative;width:562px;max-width:100%;padding:160px 35px 0;margin:0 auto;overflow:hidden}.login-container .tips[data-v-1c118c79]{font-size:14px;color:#fff;margin-bottom:10px}.login-container .tips span[data-v-1c118c79]:first-of-type{margin-right:16px}.login-container .svg-container[data-v-1c118c79]{padding:6px 5px 6px 15px;color:#889aa4;vertical-align:middle;width:30px;display:inline-block}.login-container .title-container[data-v-1c118c79]{position:relative}.login-container .title-container .title[data-v-1c118c79]{font-size:32px;color:#eee;margin:0 auto 40px auto;text-align:center;font-weight:100;font-family:Siemens Sans Bold,Arial Black,sans-serif}.login-container .show-pwd[data-v-1c118c79]{position:absolute;right:10px;top:7px;font-size:16px;color:#889aa4;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sie-logo[data-v-1c118c79]{position:relative;top:36px;left:74px}.login-button[data-v-1c118c79]{width:100%;margin-bottom:30px;background:-webkit-gradient(linear,left top,right top,from(#00ffb9),to(#00e6dc));background:linear-gradient(90deg,#00ffb9,#00e6dc);color:#000028!important;font-weight:900;font-size:20px;border-radius:15px}.login-button[data-v-1c118c79]:hover{background:#00ffb9!important;-webkit-transition:none;transition:none}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:inherit;font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}[hidden],template{display:none}#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;-webkit-box-shadow:0 0 10px #29d,0 0 5px #29d;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translateY(-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;-webkit-box-sizing:border-box;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}

Binary file not shown.

Binary file not shown.

BIN
dist/static/img/404.a57b6f31.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
dist/static/img/404_cloud.0f4bc32b.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
dist/static/img/dashboard.43ad4337.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

BIN
dist/static/img/skill.0a6e2a55.jpeg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

BIN
dist/static/img/task.5d4d9ac7.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB

BIN
dist/static/img/test.72839d9a.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

BIN
dist/static/img/user.ee02013a.jpeg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 KiB

1
dist/static/js/app.d07d1ad0.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1d323fae"],{6674:function(t,e,n){"use strict";n.r(e);var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[t._m(0),n("div",{staticClass:"navigation"},t._l(t.menuItems,(function(e){return e.isLoaded?n("div",{staticClass:"nav-grid"},[n("el-popover",{attrs:{placement:"top",width:"300",trigger:"hover"}},[n("router-link",{key:e.path,staticClass:"nav-button",style:{backgroundImage:"url("+e.backgroundImage+")"},attrs:{slot:"reference",to:e.path},slot:"reference"}),n("span",[t._v(t._s(e.description))])],1),n("span",{attrs:{slot:"reference"},slot:"reference"},[t._v(t._s(e.tag))])],1):t._e()})),0)])},a=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"component"},[n("h2",[t._v("欢迎来到CS DC工程师管理平台!")])])}],r=n("5530"),o=(n("d3b7"),n("159b"),{data:function(){return{allRoutes:[]}},computed:{menuItems:function(){var t=this;return this.$store.state.user.resultAllRoutes.forEach((function(e){if(!e.hidden&&e.children.some((function(t){return!t.hidden}))){var n=Object(r["a"])(Object(r["a"])({},e),{},{isLoaded:!1});t.allRoutes.push(n)}})),this.allRoutes}},mounted:function(){this.preloadImages()},methods:{preloadImages:function(){var t=this;this.menuItems.forEach((function(e){var n=new Image;n.src=e.backgroundImage,n.onload=function(){t.$set(e,"isLoaded",!0)}}))}}}),i=o,c=(n("b6c8"),n("2877")),u=Object(c["a"])(i,s,a,!1,null,"61a7e56c",null);e["default"]=u.exports},b6c8:function(t,e,n){"use strict";n("f80d")},f80d:function(t,e,n){}}]);

View File

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2434af3e"],{"0514":function(t,r,e){"use strict";e("a6fd")},"1bf0":function(t,r,e){"use strict";e.r(r);var a=function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("div",{staticClass:"container"},[e("el-card",{staticClass:"personal-info-container"},[e("div",{staticClass:"card-header",attrs:{slot:"header"},slot:"header"},[t._v("修改密码")]),e("div",{staticClass:"card-body"},[e("el-form",{ref:"dataForm",staticClass:"update-pwd-form",attrs:{rules:t.dataRule,model:t.dataForm,"label-width":"auto"}},[e("el-form-item",{attrs:{label:"原密码",prop:"password"}},[e("el-input",{attrs:{type:"password"},model:{value:t.dataForm.password,callback:function(r){t.$set(t.dataForm,"password",r)},expression:"dataForm.password"}})],1),e("el-form-item",{attrs:{label:"新密码",prop:"newPassword"}},[e("el-input",{attrs:{type:"password"},model:{value:t.dataForm.newPassword,callback:function(r){t.$set(t.dataForm,"newPassword",r)},expression:"dataForm.newPassword"}})],1),e("el-form-item",{attrs:{label:"确认密码",prop:"confirmPassword"}},[e("el-input",{attrs:{type:"password"},model:{value:t.dataForm.confirmPassword,callback:function(r){t.$set(t.dataForm,"confirmPassword",r)},expression:"dataForm.confirmPassword"}})],1),e("el-form-item",{staticClass:"buttons"},[e("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("保存")]),e("el-button",{on:{click:t.onCancel}},[t._v("取消")])],1)],1)],1)])],1)},o=[],n=e("b047c"),s=e.n(n),i={name:"PersonalPassword",data:function(){return{dataForm:{password:"",newPassword:"",confirmPassword:""}}},computed:{dataRule:function(){return{password:[{required:!0,message:"请输入密码",trigger:"blur"}],newPassword:[{required:!0,message:"请输入新密码",trigger:"blur"}],confirmPassword:[{required:!0,message:"请输入确认密码",trigger:"blur"},{validator:this.validateConfirmPassword,trigger:"blur"}]}}},methods:{onCancel:function(){this.$router.go(-1)},onSubmit:s()((function(){var t=this;this.$refs.dataForm.validate((function(r){if(!r)return!1;t.$API.user.updatePassword(t.dataForm).then((function(r){if(console.log(r),0!==r.code)return t.$message.error(r.msg);t.$message({message:"修改密码成功",type:"success",duration:3e3,onClose:function(){t.$store.dispatch("user/logout").then((function(){t.$router.push("/login")}))}})})).catch((function(){}))}))}),1e3,{leading:!0,trailing:!1}),validateConfirmPassword:function(t,r,e){this.dataForm.newPassword!==r?e(new Error("确认密码与新密码不一致")):e()}}},u=i,c=(e("0514"),e("2877")),d=Object(c["a"])(u,a,o,!1,null,"74bbedb0",null);r["default"]=d.exports},"408c":function(t,r,e){var a=e("2b3e"),o=function(){return a.Date.now()};t.exports=o},"4cef":function(t,r){var e=/\s/;function a(t){var r=t.length;while(r--&&e.test(t.charAt(r)));return r}t.exports=a},"8d74":function(t,r,e){var a=e("4cef"),o=/^\s+/;function n(t){return t?t.slice(0,a(t)+1).replace(o,""):t}t.exports=n},a6fd:function(t,r,e){},b047c:function(t,r,e){var a=e("1a8c"),o=e("408c"),n=e("b4b0"),s="Expected a function",i=Math.max,u=Math.min;function c(t,r,e){var c,d,f,l,m,p,w=0,v=!1,b=!1,g=!0;if("function"!=typeof t)throw new TypeError(s);function h(r){var e=c,a=d;return c=d=void 0,w=r,l=t.apply(a,e),l}function P(t){return w=t,m=setTimeout(F,r),v?h(t):l}function y(t){var e=t-p,a=t-w,o=r-e;return b?u(o,f-a):o}function x(t){var e=t-p,a=t-w;return void 0===p||e>=r||e<0||b&&a>=f}function F(){var t=o();if(x(t))return $(t);m=setTimeout(F,y(t))}function $(t){return m=void 0,g&&c?h(t):(c=d=void 0,l)}function C(){void 0!==m&&clearTimeout(m),w=0,c=p=d=m=void 0}function k(){return void 0===m?l:$(o())}function T(){var t=o(),e=x(t);if(c=arguments,d=this,p=t,e){if(void 0===m)return P(p);if(b)return clearTimeout(m),m=setTimeout(F,r),h(p)}return void 0===m&&(m=setTimeout(F,r)),l}return r=n(r)||0,a(e)&&(v=!!e.leading,b="maxWait"in e,f=b?i(n(e.maxWait)||0,r):f,g="trailing"in e?!!e.trailing:g),T.cancel=C,T.flush=k,T}t.exports=c},b4b0:function(t,r,e){var a=e("8d74"),o=e("1a8c"),n=e("ffd6"),s=NaN,i=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;function f(t){if("number"==typeof t)return t;if(n(t))return s;if(o(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=o(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=a(t);var e=u.test(t);return e||c.test(t)?d(t.slice(2),e?2:8):i.test(t)?s:+t}t.exports=f},ffd6:function(t,r,e){var a=e("3729"),o=e("1310"),n="[object Symbol]";function s(t){return"symbol"==typeof t||o(t)&&a(t)==n}t.exports=s}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-94d3c3c4"],{"0870":function(t,s,a){},"0a5f":function(t,s,a){"use strict";a("0870")},"26fc":function(t,s,a){t.exports=a.p+"static/img/404_cloud.0f4bc32b.png"},"8cdb":function(t,s,a){"use strict";a.r(s);var c=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"wscn-http404-container"},[a("div",{staticClass:"wscn-http404"},[t._m(0),a("div",{staticClass:"bullshit"},[a("div",{staticClass:"bullshit__oops"},[t._v("OOPS!")]),t._m(1),a("div",{staticClass:"bullshit__headline"},[t._v(t._s(t.message))]),a("div",{staticClass:"bullshit__info"},[t._v("Please check that the URL you entered is correct, or click the button below to return to the homepage.")]),a("a",{staticClass:"bullshit__return-home",attrs:{href:""}},[t._v("Back to home")])])])])},e=[function(){var t=this,s=t.$createElement,c=t._self._c||s;return c("div",{staticClass:"pic-404"},[c("img",{staticClass:"pic-404__parent",attrs:{src:a("a36b"),alt:"404"}}),c("img",{staticClass:"pic-404__child left",attrs:{src:a("26fc"),alt:"404"}}),c("img",{staticClass:"pic-404__child mid",attrs:{src:a("26fc"),alt:"404"}}),c("img",{staticClass:"pic-404__child right",attrs:{src:a("26fc"),alt:"404"}})])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"bullshit__info"},[t._v("All rights reserved "),a("a",{staticStyle:{color:"#20a0ff"},attrs:{href:"https://wallstreetcn.com",target:"_blank"}},[t._v("wallstreetcn")])])}],i={name:"Page404",computed:{message:function(){return"The webmaster said that you can not enter this page..."}}},l=i,n=(a("0a5f"),a("2877")),r=Object(n["a"])(l,c,e,!1,null,"c095f994",null);s["default"]=r.exports},a36b:function(t,s,a){t.exports=a.p+"static/img/404.a57b6f31.png"}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

66
dist/static/js/chunk-libs.d7361f81.js vendored Normal file

File diff suppressed because one or more lines are too long

BIN
eng_management_version6.zip Normal file

Binary file not shown.

24
jest.config.js Normal file
View File

@ -0,0 +1,24 @@
module.exports = {
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest'
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
snapshotSerializers: ['jest-serializer-vue'],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
],
collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
coverageDirectory: '<rootDir>/tests/unit/coverage',
// 'collectCoverage': true,
'coverageReporters': [
'lcov',
'text-summary'
],
testURL: 'http://localhost/'
}

9
jsconfig.json Normal file
View File

@ -0,0 +1,9 @@
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": ["node_modules", "dist"]
}

57
mock/index.js Normal file
View File

@ -0,0 +1,57 @@
const Mock = require('mockjs')
const { param2Obj } = require('./utils')
const user = require('./user')
const table = require('./table')
const mocks = [
...user,
...table
]
// for front mock
// please use it cautiously, it will redefine XMLHttpRequest,
// which will cause many of your third-party libraries to be invalidated(like progress event).
function mockXHR() {
// mock patch
// https://github.com/nuysoft/Mock/issues/300
Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
Mock.XHR.prototype.send = function() {
if (this.custom.xhr) {
this.custom.xhr.withCredentials = this.withCredentials || false
if (this.responseType) {
this.custom.xhr.responseType = this.responseType
}
}
this.proxy_send(...arguments)
}
function XHR2ExpressReqWrap(respond) {
return function(options) {
let result = null
if (respond instanceof Function) {
const { body, type, url } = options
// https://expressjs.com/en/4x/api.html#req
result = respond({
method: type,
body: JSON.parse(body),
query: param2Obj(url)
})
} else {
result = respond
}
return Mock.mock(result)
}
}
for (const i of mocks) {
Mock.mock(new RegExp(i.url), i.type || 'get', XHR2ExpressReqWrap(i.response))
}
}
module.exports = {
mocks,
mockXHR
}

86
mock/mock-server.js Normal file
View File

@ -0,0 +1,86 @@
const chokidar = require('chokidar')
const bodyParser = require('body-parser')
const chalk = require('chalk')
const path = require('path')
const Mock = require('mockjs')
const mockDir = path.join(process.cwd(), 'mock')
function registerRoutes(app) {
let mockLastIndex
const { mocks } = require('./index.js')
const mocksForServer = mocks.map(route => {
return responseFake(route.url, route.type, route.response)
})
for (const mock of mocksForServer) {
// app[mock.type](mock.url, mock.response) //注释
app[mock.type](mock.url, bodyParser.json(), bodyParser.urlencoded({ //添加
extended: true
}), mock.response)
mockLastIndex = app._router.stack.length
}
const mockRoutesLength = Object.keys(mocksForServer).length
return {
mockRoutesLength: mockRoutesLength,
mockStartIndex: mockLastIndex - mockRoutesLength
}
}
function unregisterRoutes() {
Object.keys(require.cache).forEach(i => {
if (i.includes(mockDir)) {
delete require.cache[require.resolve(i)]
}
})
}
// for mock server
const responseFake = (url, type, respond) => {
return {
url: new RegExp(`${process.env.VUE_APP_BASE_API}${url}`),
type: type || 'get',
response(req, res) {
console.log('request invoke:' + req.path)
res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
}
}
}
module.exports = app => {
// parse app.body
// https://expressjs.com/en/4x/api.html#req.body
// app.use(bodyParser.json())
// app.use(bodyParser.urlencoded({
// extended: true
// }))
const mockRoutes = registerRoutes(app)
var mockRoutesLength = mockRoutes.mockRoutesLength
var mockStartIndex = mockRoutes.mockStartIndex
// watch files, hot reload mock server
chokidar.watch(mockDir, {
ignored: /mock-server/,
ignoreInitial: true
}).on('all', (event, path) => {
if (event === 'change' || event === 'add') {
try {
// remove mock routes stack
app._router.stack.splice(mockStartIndex, mockRoutesLength)
// clear routes cache
unregisterRoutes()
const mockRoutes = registerRoutes(app)
mockRoutesLength = mockRoutes.mockRoutesLength
mockStartIndex = mockRoutes.mockStartIndex
console.log(chalk.magentaBright(`\n > Mock Server hot reload success! changed ${path}`))
} catch (error) {
console.log(chalk.redBright(error))
}
}
})
}

29
mock/table.js Normal file
View File

@ -0,0 +1,29 @@
const Mock = require('mockjs')
const data = Mock.mock({
'items|30': [{
id: '@id',
title: '@sentence(10, 20)',
'status|1': ['published', 'draft', 'deleted'],
author: 'name',
display_time: '@datetime',
pageviews: '@integer(300, 5000)'
}]
})
module.exports = [
{
url: '/vue-admin-template/table/list',
type: 'get',
response: config => {
const items = data.items
return {
code: 20000,
data: {
total: items.length,
items: items
}
}
}
}
]

84
mock/user.js Normal file
View File

@ -0,0 +1,84 @@
const tokens = {
admin: {
token: 'admin-token'
},
editor: {
token: 'editor-token'
}
}
const users = {
'admin-token': {
roles: ['admin'],
introduction: 'I am a super administrator',
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
name: 'Super Admin'
},
'editor-token': {
roles: ['editor'],
introduction: 'I am an editor',
avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
name: 'Normal Editor'
}
}
module.exports = [
// user login
{
url: '/vue-admin-template/user/login',
type: 'post',
response: config => {
const { username } = config.body
const token = tokens[username]
// mock error
if (!token) {
return {
code: 60204,
message: 'Account and password are incorrect.'
}
}
return {
code: 20000,
data: token
}
}
},
// get user info
{
url: '/vue-admin-template/user/info\.*',
type: 'get',
response: config => {
const { token } = config.query
const info = users[token]
// mock error
if (!info) {
return {
code: 50008,
message: 'Login failed, unable to get user details.'
}
}
return {
code: 20000,
data: info
}
}
},
// user logout
{
url: '/vue-admin-template/user/logout',
type: 'post',
response: _ => {
return {
code: 20000,
data: 'success'
}
}
}
]

25
mock/utils.js Normal file
View File

@ -0,0 +1,25 @@
/**
* @param {string} url
* @returns {Object}
*/
function param2Obj(url) {
const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
if (!search) {
return {}
}
const obj = {}
const searchArr = search.split('&')
searchArr.forEach(v => {
const index = v.indexOf('=')
if (index !== -1) {
const name = v.substring(0, index)
const val = v.substring(index + 1, v.length)
obj[name] = val
}
})
return obj
}
module.exports = {
param2Obj
}

16726
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

68
package.json Normal file
View File

@ -0,0 +1,68 @@
{
"name": "vue-admin-template",
"version": "4.4.0",
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
"author": "Pan <panfree23@gmail.com>",
"scripts": {
"dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
"lint": "eslint --ext .js,.vue src",
"test:unit": "jest --clearCache && vue-cli-service test:unit",
"test:ci": "npm run lint && npm run test:unit"
},
"dependencies": {
"axios": "0.18.1",
"core-js": "3.6.5",
"echarts": "^5.4.2",
"echarts-gl": "^2.0.9",
"el-tree-transfer": "^2.4.7",
"element-china-area-data": "^5.0.2",
"element-ui": "^2.15.7",
"js-cookie": "2.2.0",
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"screenfull": "^4.2.1",
"v-fit-columns": "^0.2.0",
"vue": "2.6.10",
"vue-router": "3.0.6",
"vuex": "3.1.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.4.4",
"@vue/cli-plugin-eslint": "4.4.4",
"@vue/cli-plugin-unit-jest": "4.4.4",
"@vue/cli-service": "4.4.4",
"@vue/test-utils": "1.0.0-beta.29",
"autoprefixer": "9.5.1",
"babel-eslint": "10.1.0",
"babel-jest": "23.6.0",
"babel-plugin-dynamic-import-node": "2.3.3",
"chalk": "2.4.2",
"connect": "3.6.6",
"eslint": "6.7.2",
"eslint-plugin-vue": "6.2.2",
"html-webpack-plugin": "3.2.0",
"mockjs": "1.0.1-beta3",
"runjs": "4.3.2",
"sass": "1.26.8",
"sass-loader": "8.0.2",
"script-ext-html-webpack-plugin": "2.1.3",
"serve-static": "1.13.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.2",
"vue-template-compiler": "2.6.10"
},
"browserslist": [
"> 1%",
"last 2 versions"
],
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"license": "MIT"
}

8
postcss.config.js Normal file
View File

@ -0,0 +1,8 @@
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
'plugins': {
// to edit target browsers: use "browserslist" field in package.json
'autoprefixer': {}
}
}

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

17
public/index.html Normal file
View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= webpackConfig.name %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

15
src/App.vue Normal file
View File

@ -0,0 +1,15 @@
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
export default {
name: 'App'
}
</script>
<style lang="scss" scoped>
</style>

13
src/api/acl/permission.js Normal file
View File

@ -0,0 +1,13 @@
import request from '@/utils/request'
export const getPermissionList = () => request({ url: `/WRD-admin/sys/menu/list`, method: 'get' });
// 新增菜单
export const reqAddPermission = (menu) => request({ url: `/WRD-admin/sys/menu`, method: 'post', data: menu });
// 修改菜单
export const reqUpdatePermission = (menu) => request({ url: `/WRD-admin/sys/menu`, method: 'put', data: menu });
// 删除菜单
export const reqDeletePermission = (id) => request({
url: `/WRD-admin/sys/menu/${id}`, method: 'delete'
})

12
src/api/acl/role.js Normal file
View File

@ -0,0 +1,12 @@
import request from '@/utils/request'
export const reqGetRoleList = () => request({ url: `/WRD-admin/sys/role/list`, method: 'get' });
// 新增角色
export const reqAddRole = (role) => request({ url: `/WRD-admin/sys/role`, method: 'post', data: role });
// 修改角色
export const reqUpdateRole = (role) => request({ url: `/WRD-admin/sys/role`, method: 'put', data: role });
// 删除角色
export const reqDeleteRole = (ids) => request({
url: `/WRD-admin/sys/role`, method: 'delete', data: ids
});

22
src/api/acl/user.js Normal file
View File

@ -0,0 +1,22 @@
import request from '@/utils/request'
// 查询用户
export const reqGetUserList = (queryInfo) => request({ url: `/WRD-admin/sys/user/pageAllUser`, method: 'get', params: queryInfo })
// 查询用户+技能
export const reqGetUserPageWithSkills = (queryInfo) => request({ url: `/WRD-admin/sys/user/pageWithSkills`, method: 'get', params: queryInfo })
// 新增用户
export const reqAddUser = (user) => request({ url: `/WRD-admin/sys/user`, method: 'post', data: user })
// 修改用户
export const reqUpdateUser = (user) => request({ url: `/WRD-admin/sys/user`, method: 'put', data: user })
// 删除用户
export const reqDeleteUser = (ids) => request({
url: `/WRD-admin/sys/user`, method: 'delete', data: ids
})
// 修改密码
export const updatePassword = (dataForm) => request({
url: '/WRD-admin/sys/user/password',
method: 'put',
data: dataForm
})

15
src/api/index.js Normal file
View File

@ -0,0 +1,15 @@
import * as select from './select'
import * as user from './acl/user'
import * as role from './acl/role'
import * as permission from './acl/permission'
import * as skilltype from './skill/type'
import * as skilldata from './skill/data'
export default {
select: select,
user: user,
role: role,
permission: permission,
skilltype: skilltype,
skilldata: skilldata
}

46
src/api/select.js Normal file
View File

@ -0,0 +1,46 @@
import request from '@/utils/request'
// 获取部门列表
export const reqGetDepartments = () => request({ url: `/WRD-admin/sys/dept/list`, method: 'get' })
// 不带部门
// export const reqSelectEngiStatus = (year, month, page, limit) => request({ url: `/WRD-admin/sys/workorder/page`, method: 'get', params: { year, month, page, limit } });
// 带部门
export const reqSelectEngiStatusByDept = (year, month, deptId, page, limit) => request({ url: `/WRD-admin/sys/workorder/pageSelect`, method: 'get', params: { year, month, deptId, page, limit }})
// 工程师状态查询
export const reqSelectEngiStatusByMap = (year, month, page, limit) => request({ url: `/WRD-admin/sys/workorder/pageSelect`, method: 'get', params: { year, month, page, limit }})
// 工程师状态添加
export const reqAddEngiStatus = (statusFormToSend) => request({ url: `/WRD-admin/sys/workorder`, method: 'post', data: statusFormToSend })
// export const reqAddEngiStatus = (gid, statusId, startTime, endTime, remark) => request({ url: `/WRD-admin/sys/workorder`, method: 'post', data: { gid, statusId, startTime, endTime, remark } });
// 工程师工作记录删除
export const reqDelEngiWorkOrder = (ids) => request({ url: `/WRD-admin/sys/workorder`, method: 'delete', data: ids })
// 工程师状态修改
export const reqEditEngiStatus = (statusFormToSend) => request({ url: `/WRD-admin/sys/workorder`, method: 'put', data: statusFormToSend })
// 状态id查询
// export const reqGetStatusInfo = () => request({url:``, method:'get'});
// 全部用户查询
// export const reqSelectAllUser = (page, limit) => request({ url: `/WRD-admin/sys/user/pageAllUser`, method: 'get', params: { page, limit } });
// 全部工程师查询
export const reqSelectAllEngis = (page, limit) => request({ url: `/WRD-admin/sys/user/page`, method: 'get', params: { page, limit }})
// 根据部门查工程师
export const reqSelectEngisByDept = (page, limit, deptId) => request({ url: `/WRD-admin/sys/user/page`, method: 'get', params: { page, limit, deptId }})
// 查询全部项目名称
export const reqSelectProjectTitle = (projectName) => request({ url: `/WRD-admin/sys/projects/list`, method: 'get', params: { projectName }})
// 查询全部成本中心号
export const reqSelectCostCenter = (costCenter) => request({ url: `/WRD-admin/sys/workorder/listCostCenter`, method: 'get', params: { costCenter }})
// 查询各部门工作效率
export const getDeptEfficiency = (startDate, endDate) => request({ url: `/WRD-admin/sys/workorder/productivity`, method: 'get', params: { startDate, endDate }})
// 查询各部门工作效率
export const getDC6WeekAverage = (dates) => request({ url: `/WRD-admin/sys/workorder/productivityAvgOfDC`, method: 'post', data: dates })

18
src/api/skill/data.js Normal file
View File

@ -0,0 +1,18 @@
import request from '@/utils/request'
// 带部门查询技能
export const reqGetSkillList = (limit, page, skilltypeId) => request({ url: `/WRD-admin/sys/skills/page`, method: 'get', params: { limit, page, skilltypeId }})
// 查询技能
// export const reqGetSkillList = () => request({ url: `/WRD-admin/sys/skills/page`, method: 'get' });
// 新增技能
export const reqAddSkill = (skill) => request({ url: `/WRD-admin/sys/skills`, method: 'post', data: skill })
// 修改技能
export const reqUpdateSkill = (skill) => request({ url: `/WRD-admin/sys/skills`, method: 'put', data: skill })
// 删除技能
export const reqDeleteSkill = (ids) => request({ url: `/WRD-admin/sys/skills`, method: 'delete', data: ids })
// 给用户绑定技能列表
export const reqUserBindSkills = (skill) => request({ url: `/WRD-admin/sys/skills/userBindSkills`, method: 'post', data: skill })

16
src/api/skill/type.js Normal file
View File

@ -0,0 +1,16 @@
import request from '@/utils/request'
// 查询技能种类
export const reqGetSkillTypeList = () => request({ url: `/WRD-admin/sys/skilltype/list`, method: 'get' })
// 查询技能列表
export const reqGetSkillTypeWithLabels = () => request({ url: `/WRD-admin/sys/skilltype/typewithlabels`, method: 'get' })
// 根据userid获取技能种类以及技能列表
export const reqGetSkillByUser = (userId) => request({ url: `/WRD-admin/sys/skilltype/getSkillsByUserId/${userId}`, method: 'get' })
// 新增技能种类
export const reqAddSkillType = (skillType) => request({ url: `/WRD-admin/sys/skilltype`, method: 'post', data: skillType })
// 修改技能种类
export const reqUpdateSkillType = (skillType) => request({ url: `/WRD-admin/sys/skilltype`, method: 'put', data: skillType })
// 删除技能种类
export const reqDeleteSkillType = (ids) => request({
url: `/WRD-admin/sys/skilltype`, method: 'delete', data: ids
})

9
src/api/table.js Normal file
View File

@ -0,0 +1,9 @@
import request from '@/utils/request'
export function getList(params) {
return request({
url: '/vue-admin-template/table/list',
method: 'get',
params
})
}

31
src/api/user.js Normal file
View File

@ -0,0 +1,31 @@
import request from '@/utils/request'
export function login(data) {
return request({
// url: '/WRD-admin/loginWithoutcaptcha',
url: '/WRD-admin/login',
method: 'post',
data
})
}
export function getInfo() {
return request({
url: '/WRD-admin/sys/user/info',
method: 'get'
})
}
export function getUserPermission() {
return request({
url: '/WRD-admin/sys/menu/permissions',
method: 'get'
})
}
export function logout() {
return request({
url: '/WRD-admin/logout',
method: 'post'
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
src/assets/FirstPage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 KiB

BIN
src/assets/Siemens-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 903 KiB

BIN
src/assets/nav_images/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

BIN
src/assets/nav_images/2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 KiB

BIN
src/assets/nav_images/3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Some files were not shown because too many files have changed in this diff Show More