├── .babelrc
├── .editorconfig
├── .gitignore
├── .postcssrc.js
├── README.md
├── build
├── build.js
├── check-versions.js
├── logo.png
├── utils.js
├── vue-loader.conf.js
├── webpack.base.conf.js
├── webpack.dev.conf.js
└── webpack.prod.conf.js
├── config
├── dev.env.js
├── index.js
└── prod.env.js
├── document
├── Thumbs.db
├── xm.png
├── xm2.png
└── xm3.png
├── index.html
├── package-lock.json
├── package.json
├── src
├── App.vue
├── AxiosRequest.js
├── assets
│ ├── font
│ │ └── font.css
│ ├── image
│ │ ├── chlogo.png
│ │ ├── favicon.ico
│ │ ├── login-bg2.png
│ │ └── logo.png
│ └── less
│ │ ├── layout.css
│ │ └── layout.less
├── base.js
├── components
│ ├── company
│ │ ├── AdvancedSearch.vue
│ │ ├── Audit.vue
│ │ ├── BusinessDetails.vue
│ │ └── Company.vue
│ ├── equipment
│ │ ├── AddPerson.vue
│ │ ├── Advanced.vue
│ │ ├── Category.vue
│ │ ├── Equipment.vue
│ │ ├── EquipmentAdd.vue
│ │ ├── Redact.vue
│ │ └── RedactAdd.vue
│ ├── equipmentArchives
│ │ └── EquipmentArchives.vue
│ ├── global
│ │ └── Global.vue
│ ├── home
│ │ └── Home.vue
│ ├── information
│ │ └── Information.vue
│ ├── knowledgeBase
│ │ └── KnowledgeBase.vue
│ ├── login
│ │ ├── ForgetThePassword.vue
│ │ └── Login.vue
│ ├── message
│ │ ├── Message.vue
│ │ └── MsgDetails.vue
│ ├── operation
│ │ ├── BreakDetails.vue
│ │ ├── Breakdown.vue
│ │ ├── Operation.vue
│ │ ├── TurnaroundPlans.vue
│ │ ├── breakdown
│ │ │ ├── Audit.vue
│ │ │ └── Personnel.vue
│ │ ├── turnaroundPlans
│ │ │ ├── AddPlan.vue
│ │ │ ├── AmendPlan.vue
│ │ │ ├── AuditTurnaround.vue
│ │ │ ├── PersonnelTurnaround.vue
│ │ │ ├── TurnaroundPlansAdd.vue
│ │ │ └── TurnaroundPlansAmend.vue
│ │ └── upkeep
│ │ │ ├── AddPlan.vue
│ │ │ ├── AmendPlan.vue
│ │ │ ├── AuditUPkeep.vue
│ │ │ ├── PersonnelUpkeep.vue
│ │ │ ├── Upkeep.vue
│ │ │ ├── UpkeepAdd.vue
│ │ │ └── UpkeepAmend.vue
│ ├── organization
│ │ ├── Add.vue
│ │ ├── Organization.vue
│ │ └── Revise.vue
│ ├── personnel
│ │ ├── Modification.vue
│ │ ├── PersnnelAdd.vue
│ │ └── Personnel.vue
│ ├── roleManagement
│ │ └── RoleManagement.vue
│ ├── system
│ │ └── System.vue
│ ├── user
│ │ └── User.vue
│ └── workOrder
│ │ └── WorkOrder.vue
├── main.js
├── router
│ └── index.js
└── store
│ ├── equipment_statr.js
│ ├── index.js
│ ├── operation_state.js
│ ├── personnel_state.js
│ └── token_state.js
└── static
└── .gitkeep
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | "modules": false,
5 | "targets": {
6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7 | }
8 | }],
9 | "stage-2"
10 | ],
11 | "plugins": ["transform-vue-jsx", "transform-runtime"]
12 | }
13 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | config/
4 | /dist/
5 | npm-debug.log*
6 | yarn-debug.log*
7 | yarn-error.log*
8 |
9 | # Editor directories and files
10 | .idea
11 | .vscode
12 | *.suo
13 | *.ntvs*
14 | *.njsproj
15 | *.sln
16 |
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | "postcss-import": {},
6 | "postcss-url": {},
7 | // to edit target browsers: use "browserslist" field in package.json
8 | "autoprefixer": {}
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # chsby
2 |
3 | > A Vue.js project
4 |
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:8080
12 | npm run dev
13 |
14 | # build for production with minification
15 | npm run build
16 |
17 | # build for production and view the bundle analyzer report
18 | npm run build --report
19 | ```
20 |
21 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
22 |
--------------------------------------------------------------------------------
/build/build.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | require('./check-versions')()
3 |
4 | process.env.NODE_ENV = 'production'
5 |
6 | const ora = require('ora')
7 | const rm = require('rimraf')
8 | const path = require('path')
9 | const chalk = require('chalk')
10 | const webpack = require('webpack')
11 | const config = require('../config')
12 | const webpackConfig = require('./webpack.prod.conf')
13 |
14 | const spinner = ora('building for production...')
15 | spinner.start()
16 |
17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
18 | if (err) throw err
19 | webpack(webpackConfig, (err, stats) => {
20 | spinner.stop()
21 | if (err) throw err
22 | process.stdout.write(stats.toString({
23 | colors: true,
24 | modules: false,
25 | children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
26 | chunks: false,
27 | chunkModules: false
28 | }) + '\n\n')
29 |
30 | if (stats.hasErrors()) {
31 | console.log(chalk.red(' Build failed with errors.\n'))
32 | process.exit(1)
33 | }
34 |
35 | console.log(chalk.cyan(' Build complete.\n'))
36 | console.log(chalk.yellow(
37 | ' Tip: built files are meant to be served over an HTTP server.\n' +
38 | ' Opening index.html over file:// won\'t work.\n'
39 | ))
40 | })
41 | })
42 |
--------------------------------------------------------------------------------
/build/check-versions.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const chalk = require('chalk')
3 | const semver = require('semver')
4 | const packageConfig = require('../package.json')
5 | const shell = require('shelljs')
6 |
7 | function exec (cmd) {
8 | return require('child_process').execSync(cmd).toString().trim()
9 | }
10 |
11 | const versionRequirements = [
12 | {
13 | name: 'node',
14 | currentVersion: semver.clean(process.version),
15 | versionRequirement: packageConfig.engines.node
16 | }
17 | ]
18 |
19 | if (shell.which('npm')) {
20 | versionRequirements.push({
21 | name: 'npm',
22 | currentVersion: exec('npm --version'),
23 | versionRequirement: packageConfig.engines.npm
24 | })
25 | }
26 |
27 | module.exports = function () {
28 | const warnings = []
29 |
30 | for (let i = 0; i < versionRequirements.length; i++) {
31 | const mod = versionRequirements[i]
32 |
33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
34 | warnings.push(mod.name + ': ' +
35 | chalk.red(mod.currentVersion) + ' should be ' +
36 | chalk.green(mod.versionRequirement)
37 | )
38 | }
39 | }
40 |
41 | if (warnings.length) {
42 | console.log('')
43 | console.log(chalk.yellow('To use this template, you must update following to modules:'))
44 | console.log()
45 |
46 | for (let i = 0; i < warnings.length; i++) {
47 | const warning = warnings[i]
48 | console.log(' ' + warning)
49 | }
50 |
51 | console.log()
52 | process.exit(1)
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/build/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weishere-huang/device-could/bb1701f838ef3902cf5d2c3d7bf6e60ca53b292b/build/logo.png
--------------------------------------------------------------------------------
/build/utils.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const path = require('path')
3 | const config = require('../config')
4 | const ExtractTextPlugin = require('extract-text-webpack-plugin')
5 | const packageConfig = require('../package.json')
6 |
7 | exports.assetsPath = function (_path) {
8 | const assetsSubDirectory = process.env.NODE_ENV === 'production'
9 | ? config.build.assetsSubDirectory
10 | : config.dev.assetsSubDirectory
11 |
12 | return path.posix.join(assetsSubDirectory, _path)
13 | }
14 |
15 | exports.cssLoaders = function (options) {
16 | options = options || {}
17 |
18 | const cssLoader = {
19 | loader: 'css-loader',
20 | options: {
21 | sourceMap: options.sourceMap
22 | }
23 | }
24 |
25 | const postcssLoader = {
26 | loader: 'postcss-loader',
27 | options: {
28 | sourceMap: options.sourceMap
29 | }
30 | }
31 |
32 | // generate loader string to be used with extract text plugin
33 | function generateLoaders (loader, loaderOptions) {
34 | const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
35 |
36 | if (loader) {
37 | loaders.push({
38 | loader: loader + '-loader',
39 | options: Object.assign({}, loaderOptions, {
40 | sourceMap: options.sourceMap
41 | })
42 | })
43 | }
44 |
45 | // Extract CSS when that option is specified
46 | // (which is the case during production build)
47 | if (options.extract) {
48 | return ExtractTextPlugin.extract({
49 | use: loaders,
50 | fallback: 'vue-style-loader'
51 | })
52 | } else {
53 | return ['vue-style-loader'].concat(loaders)
54 | }
55 | }
56 |
57 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html
58 | return {
59 | css: generateLoaders(),
60 | postcss: generateLoaders(),
61 | less: generateLoaders('less'),
62 | sass: generateLoaders('sass', { indentedSyntax: true }),
63 | scss: generateLoaders('sass'),
64 | stylus: generateLoaders('stylus'),
65 | styl: generateLoaders('stylus')
66 | }
67 | }
68 |
69 | // Generate loaders for standalone style files (outside of .vue)
70 | exports.styleLoaders = function (options) {
71 | const output = []
72 | const loaders = exports.cssLoaders(options)
73 |
74 | for (const extension in loaders) {
75 | const loader = loaders[extension]
76 | output.push({
77 | test: new RegExp('\\.' + extension + '$'),
78 | use: loader
79 | })
80 | }
81 |
82 | return output
83 | }
84 |
85 | exports.createNotifierCallback = () => {
86 | const notifier = require('node-notifier')
87 |
88 | return (severity, errors) => {
89 | if (severity !== 'error') return
90 |
91 | const error = errors[0]
92 | const filename = error.file && error.file.split('!').pop()
93 |
94 | notifier.notify({
95 | title: packageConfig.name,
96 | message: severity + ': ' + error.name,
97 | subtitle: filename || '',
98 | icon: path.join(__dirname, 'logo.png')
99 | })
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/build/vue-loader.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const utils = require('./utils')
3 | const config = require('../config')
4 | const isProduction = process.env.NODE_ENV === 'production'
5 | const sourceMapEnabled = isProduction
6 | ? config.build.productionSourceMap
7 | : config.dev.cssSourceMap
8 |
9 | module.exports = {
10 | loaders: utils.cssLoaders({
11 | sourceMap: sourceMapEnabled,
12 | extract: isProduction
13 | }),
14 | cssSourceMap: sourceMapEnabled,
15 | cacheBusting: config.dev.cacheBusting,
16 | transformToRequire: {
17 | video: ['src', 'poster'],
18 | source: 'src',
19 | img: 'src',
20 | image: 'xlink:href'
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/build/webpack.base.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const path = require('path')
3 | const utils = require('./utils')
4 | const config = require('../config')
5 | const vueLoaderConfig = require('./vue-loader.conf')
6 | var webpack = require('webpack')
7 |
8 | function resolve(dir) {
9 | return path.join(__dirname, '..', dir)
10 | }
11 |
12 |
13 |
14 | module.exports = {
15 | context: path.resolve(__dirname, '../'),
16 | entry: {
17 | app: './src/main.js'
18 | },
19 | output: {
20 | path: config.build.assetsRoot,
21 | filename: '[name].js',
22 | publicPath: process.env.NODE_ENV === 'production' ?
23 | config.build.assetsPublicPath : config.dev.assetsPublicPath
24 | },
25 | resolve: {
26 | extensions: ['.js', '.vue', '.json'],
27 | alias: {
28 | 'vue$': 'vue/dist/vue.esm.js',
29 | '@': resolve('src'),
30 | 'jquery': 'jquery'
31 | }
32 | },
33 | module: {
34 | rules: [{
35 | test: /\.vue$/,
36 | loader: 'vue-loader',
37 | options: vueLoaderConfig
38 | },
39 | {
40 | test: /\.js$/,
41 | loader: 'babel-loader',
42 | include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
43 | },
44 | {
45 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
46 | loader: 'url-loader',
47 | options: {
48 | limit: 10000,
49 | name: utils.assetsPath('img/[name].[hash:7].[ext]')
50 | }
51 | },
52 | {
53 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
54 | loader: 'url-loader',
55 | options: {
56 | limit: 10000,
57 | name: utils.assetsPath('media/[name].[hash:7].[ext]')
58 | }
59 | },
60 | {
61 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
62 | loader: 'url-loader',
63 | options: {
64 | limit: 10000,
65 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
66 | }
67 | }
68 | ]
69 | },
70 | node: {
71 | // prevent webpack from injecting useless setImmediate polyfill because Vue
72 | // source contains it (although only uses it if it's native).
73 | setImmediate: false,
74 | // prevent webpack from injecting mocks to Node native modules
75 | // that does not make sense for the client
76 | dgram: 'empty',
77 | fs: 'empty',
78 | net: 'empty',
79 | tls: 'empty',
80 | child_process: 'empty'
81 | },
82 | plugins: [
83 | new webpack.optimize.CommonsChunkPlugin('common.js'),
84 | new webpack.ProvidePlugin({
85 | jQuery: "jquery",
86 | $: "jquery"
87 | })
88 | ]
89 | }
90 |
--------------------------------------------------------------------------------
/build/webpack.dev.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const utils = require('./utils')
3 | const webpack = require('webpack')
4 | const config = require('../config')
5 | const merge = require('webpack-merge')
6 | const path = require('path')
7 | const baseWebpackConfig = require('./webpack.base.conf')
8 | const CopyWebpackPlugin = require('copy-webpack-plugin')
9 | const HtmlWebpackPlugin = require('html-webpack-plugin')
10 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
11 | const portfinder = require('portfinder')
12 |
13 | const HOST = process.env.HOST
14 | const PORT = process.env.PORT && Number(process.env.PORT)
15 |
16 | const devWebpackConfig = merge(baseWebpackConfig, {
17 | module: {
18 | rules: utils.styleLoaders({
19 | sourceMap: config.dev.cssSourceMap,
20 | usePostCSS: true
21 | })
22 | },
23 | // cheap-module-eval-source-map is faster for development
24 | devtool: config.dev.devtool,
25 |
26 | // these devServer options should be customized in /config/index.js
27 | devServer: {
28 | clientLogLevel: 'warning',
29 | historyApiFallback: {
30 | rewrites: [{
31 | from: /.*/,
32 | to: path.posix.join(config.dev.assetsPublicPath, 'index.html')
33 | }, ],
34 | },
35 | hot: true,
36 | contentBase: false, // since we use CopyWebpackPlugin.
37 | compress: true,
38 | host: HOST || config.dev.host,
39 | port: PORT || config.dev.port,
40 | open: config.dev.autoOpenBrowser,
41 | overlay: config.dev.errorOverlay ? {
42 | warnings: false,
43 | errors: true
44 | } : false,
45 | publicPath: config.dev.assetsPublicPath,
46 | proxy: config.dev.proxyTable,
47 | quiet: true, // necessary for FriendlyErrorsPlugin
48 | watchOptions: {
49 | poll: config.dev.poll,
50 | }
51 |
52 | },
53 | plugins: [
54 | new webpack.DefinePlugin({
55 | 'process.env': require('../config/dev.env')
56 | }),
57 | new webpack.HotModuleReplacementPlugin(),
58 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
59 | new webpack.NoEmitOnErrorsPlugin(),
60 | // https://github.com/ampedandwired/html-webpack-plugin
61 | new HtmlWebpackPlugin({
62 | filename: 'index.html',
63 | template: 'index.html',
64 | inject: true,
65 | favicon: path.resolve('./src/assets/image/favicon.ico') // 增加
66 | }),
67 | // new HtmlWebpackPlugin({
68 | // template: '/src/assets/image/favicon.ico',
69 | // favicon: './favicon.ico'
70 | // }),
71 | // copy custom static assets
72 | new CopyWebpackPlugin([{
73 | from: path.resolve(__dirname, '../static'),
74 | to: config.dev.assetsSubDirectory,
75 | ignore: ['.*']
76 | }]),
77 | new webpack.ProvidePlugin({
78 | axios: 'axios',
79 | jQuery: "jquery",
80 | $: "jquery"
81 | })
82 | ]
83 | })
84 |
85 | module.exports = new Promise((resolve, reject) => {
86 | portfinder.basePort = process.env.PORT || config.dev.port
87 | portfinder.getPort((err, port) => {
88 | if (err) {
89 | reject(err)
90 | } else {
91 | // publish the new Port, necessary for e2e tests
92 | process.env.PORT = port
93 | // add port to devServer config
94 | devWebpackConfig.devServer.port = port
95 |
96 | // Add FriendlyErrorsPlugin
97 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
98 | compilationSuccessInfo: {
99 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
100 | },
101 | onErrors: config.dev.notifyOnErrors ?
102 | utils.createNotifierCallback() : undefined
103 | }))
104 |
105 | resolve(devWebpackConfig)
106 | }
107 | })
108 | })
109 |
--------------------------------------------------------------------------------
/build/webpack.prod.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const path = require('path')
3 | const utils = require('./utils')
4 | const webpack = require('webpack')
5 | const config = require('../config')
6 | const merge = require('webpack-merge')
7 | const baseWebpackConfig = require('./webpack.base.conf')
8 | const CopyWebpackPlugin = require('copy-webpack-plugin')
9 | const HtmlWebpackPlugin = require('html-webpack-plugin')
10 | const ExtractTextPlugin = require('extract-text-webpack-plugin')
11 | const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
12 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
13 |
14 | const env = require('../config/prod.env')
15 |
16 | const webpackConfig = merge(baseWebpackConfig, {
17 | module: {
18 | rules: utils.styleLoaders({
19 | sourceMap: config.build.productionSourceMap,
20 | extract: true,
21 | usePostCSS: true
22 | })
23 | },
24 | devtool: config.build.productionSourceMap ? config.build.devtool : false,
25 | output: {
26 | path: config.build.assetsRoot,
27 | filename: utils.assetsPath('js/[name].[chunkhash].js'),
28 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
29 | },
30 | plugins: [
31 | // http://vuejs.github.io/vue-loader/en/workflow/production.html
32 | new webpack.DefinePlugin({
33 | 'process.env': env
34 | }),
35 | new UglifyJsPlugin({
36 | uglifyOptions: {
37 | compress: {
38 | warnings: false
39 | }
40 | },
41 | sourceMap: config.build.productionSourceMap,
42 | parallel: true
43 | }),
44 | // extract css into its own file
45 | new ExtractTextPlugin({
46 | filename: utils.assetsPath('css/[name].[contenthash].css'),
47 | // Setting the following option to `false` will not extract CSS from codesplit chunks.
48 | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
49 | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
50 | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
51 | allChunks: true,
52 | }),
53 | // Compress extracted CSS. We are using this plugin so that possible
54 | // duplicated CSS from different components can be deduped.
55 | new OptimizeCSSPlugin({
56 | cssProcessorOptions: config.build.productionSourceMap
57 | ? { safe: true, map: { inline: false } }
58 | : { safe: true }
59 | }),
60 | // generate dist index.html with correct asset hash for caching.
61 | // you can customize output by editing /index.html
62 | // see https://github.com/ampedandwired/html-webpack-plugin
63 | new HtmlWebpackPlugin({
64 | filename: config.build.index,
65 | template: 'index.html',
66 | inject: true,
67 | inject: true,
68 | favicon: path.resolve('./src/assets/image/favicon.ico'), // 增加
69 | minify: {
70 | removeComments: true,
71 | collapseWhitespace: true,
72 | removeAttributeQuotes: true
73 | // more options:
74 | // https://github.com/kangax/html-minifier#options-quick-reference
75 | },
76 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin
77 | chunksSortMode: 'dependency'
78 | }),
79 | // keep module.id stable when vendor modules does not change
80 | new webpack.HashedModuleIdsPlugin(),
81 | // enable scope hoisting
82 | new webpack.optimize.ModuleConcatenationPlugin(),
83 | // split vendor js into its own file
84 | new webpack.optimize.CommonsChunkPlugin({
85 | name: 'vendor',
86 | minChunks (module) {
87 | // any required modules inside node_modules are extracted to vendor
88 | return (
89 | module.resource &&
90 | /\.js$/.test(module.resource) &&
91 | module.resource.indexOf(
92 | path.join(__dirname, '../node_modules')
93 | ) === 0
94 | )
95 | }
96 | }),
97 | // extract webpack runtime and module manifest to its own file in order to
98 | // prevent vendor hash from being updated whenever app bundle is updated
99 | new webpack.optimize.CommonsChunkPlugin({
100 | name: 'manifest',
101 | minChunks: Infinity
102 | }),
103 | // This instance extracts shared chunks from code splitted chunks and bundles them
104 | // in a separate chunk, similar to the vendor chunk
105 | // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
106 | new webpack.optimize.CommonsChunkPlugin({
107 | name: 'app',
108 | async: 'vendor-async',
109 | children: true,
110 | minChunks: 3
111 | }),
112 |
113 | // copy custom static assets
114 | new CopyWebpackPlugin([
115 | {
116 | from: path.resolve(__dirname, '../static'),
117 | to: config.build.assetsSubDirectory,
118 | ignore: ['.*']
119 | }
120 | ])
121 | ]
122 | })
123 |
124 | if (config.build.productionGzip) {
125 | const CompressionWebpackPlugin = require('compression-webpack-plugin')
126 |
127 | webpackConfig.plugins.push(
128 | new CompressionWebpackPlugin({
129 | asset: '[path].gz[query]',
130 | algorithm: 'gzip',
131 | test: new RegExp(
132 | '\\.(' +
133 | config.build.productionGzipExtensions.join('|') +
134 | ')$'
135 | ),
136 | threshold: 10240,
137 | minRatio: 0.8
138 | })
139 | )
140 | }
141 |
142 | if (config.build.bundleAnalyzerReport) {
143 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
144 | webpackConfig.plugins.push(new BundleAnalyzerPlugin())
145 | }
146 |
147 | module.exports = webpackConfig
148 |
--------------------------------------------------------------------------------
/config/dev.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const prodEnv = require('./prod.env')
4 |
5 | module.exports = merge(prodEnv, {
6 | NODE_ENV: '"development"'
7 | })
8 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | // Template version: 1.3.1
3 | // see http://vuejs-templates.github.io/webpack for documentation.
4 |
5 | const path = require('path')
6 |
7 |
8 | module.exports = {
9 | dev: {
10 |
11 | // Paths
12 | assetsSubDirectory: 'static',
13 | assetsPublicPath: '/',
14 | proxyTable: {
15 | '/api': {
16 | // target: 'http://www.hyazi.com:9881',
17 | //target: 'http://localhost:8888',
18 | target: 'http://192.168.1.105:8080',
19 | pathRewrite: {
20 | "^/api": ""
21 | },
22 | changeOrigin: true,
23 | secure: false
24 | }
25 | },
26 |
27 | // Various Dev Server settings
28 | host: 'localhost', // can be overwritten by process.env.HOST
29 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
30 | autoOpenBrowser: false,
31 | errorOverlay: true,
32 | notifyOnErrors: true,
33 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
34 |
35 |
36 | /**
37 | * Source Maps
38 | */
39 |
40 | // https://webpack.js.org/configuration/devtool/#development
41 | devtool: 'cheap-module-eval-source-map',
42 |
43 | // If you have problems debugging vue-files in devtools,
44 | // set this to false - it *may* help
45 | // https://vue-loader.vuejs.org/en/options.html#cachebusting
46 | cacheBusting: true,
47 |
48 | cssSourceMap: true
49 | },
50 |
51 | build: {
52 | // Template for index.html
53 | index: path.resolve(__dirname, '../dist/index.html'),
54 |
55 | // Paths
56 | assetsRoot: path.resolve(__dirname, '../dist'),
57 | assetsSubDirectory: 'static',
58 | assetsPublicPath: '/',
59 |
60 | /**
61 | * Source Maps
62 | */
63 |
64 | productionSourceMap: true,
65 | // https://webpack.js.org/configuration/devtool/#production
66 | devtool: '#source-map',
67 |
68 | // Gzip off by default as many popular static hosts such as
69 | // Surge or Netlify already gzip all static assets for you.
70 | // Before setting to `true`, make sure to:
71 | // npm install --save-dev compression-webpack-plugin
72 | productionGzip: false,
73 | productionGzipExtensions: ['js', 'css'],
74 |
75 | // Run the build command with an extra argument to
76 | // View the bundle analyzer report after build finishes:
77 | // `npm run build --report`
78 | // Set to `true` or `false` to always turn it on or off
79 | bundleAnalyzerReport: process.env.npm_config_report
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | module.exports = {
3 | NODE_ENV: '"production"'
4 | }
5 |
--------------------------------------------------------------------------------
/document/Thumbs.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weishere-huang/device-could/bb1701f838ef3902cf5d2c3d7bf6e60ca53b292b/document/Thumbs.db
--------------------------------------------------------------------------------
/document/xm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weishere-huang/device-could/bb1701f838ef3902cf5d2c3d7bf6e60ca53b292b/document/xm.png
--------------------------------------------------------------------------------
/document/xm2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weishere-huang/device-could/bb1701f838ef3902cf5d2c3d7bf6e60ca53b292b/document/xm2.png
--------------------------------------------------------------------------------
/document/xm3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weishere-huang/device-could/bb1701f838ef3902cf5d2c3d7bf6e60ca53b292b/document/xm3.png
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 长虹智能终端设备生产管理云平台
8 |
9 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "chsby",
3 | "version": "1.0.0",
4 | "description": "A Vue.js project",
5 | "author": "",
6 | "private": true,
7 | "scripts": {
8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
9 | "start": "npm run dev",
10 | "build": "node build/build.js"
11 | },
12 | "dependencies": {
13 | "axios": "^0.18.0",
14 | "element-ui": "^2.4.9",
15 | "jquery": "^3.3.1",
16 | "normalize.css": "^8.0.1",
17 | "vue": "^2.5.2",
18 | "vue-router": "^3.0.1",
19 | "vuex": "^3.0.1"
20 | },
21 | "devDependencies": {
22 | "autoprefixer": "^7.1.2",
23 | "babel-core": "^6.22.1",
24 | "babel-helper-vue-jsx-merge-props": "^2.0.3",
25 | "babel-loader": "^7.1.1",
26 | "babel-plugin-syntax-jsx": "^6.18.0",
27 | "babel-plugin-transform-runtime": "^6.22.0",
28 | "babel-plugin-transform-vue-jsx": "^3.5.0",
29 | "babel-preset-env": "^1.3.2",
30 | "babel-preset-stage-2": "^6.22.0",
31 | "chalk": "^2.0.1",
32 | "copy-webpack-plugin": "^4.0.1",
33 | "crypto-js": "^3.1.9-1",
34 | "css-loader": "^0.28.0",
35 | "extract-text-webpack-plugin": "^3.0.0",
36 | "file-loader": "^1.1.4",
37 | "friendly-errors-webpack-plugin": "^1.6.1",
38 | "html-webpack-plugin": "^2.30.1",
39 | "js-md5": "^0.7.3",
40 | "less": "^3.8.1",
41 | "less-loader": "^4.1.0",
42 | "node-notifier": "^5.1.2",
43 | "optimize-css-assets-webpack-plugin": "^3.2.0",
44 | "ora": "^1.2.0",
45 | "portfinder": "^1.0.13",
46 | "postcss-import": "^11.0.0",
47 | "postcss-loader": "^2.0.8",
48 | "postcss-url": "^7.2.1",
49 | "rimraf": "^2.6.0",
50 | "semver": "^5.3.0",
51 | "shelljs": "^0.7.6",
52 | "uglifyjs-webpack-plugin": "^1.1.1",
53 | "url-loader": "^0.5.8",
54 | "vue-easytable": "^1.7.1",
55 | "vue-loader": "^13.3.0",
56 | "vue-style-loader": "^3.0.1",
57 | "vue-template-compiler": "^2.5.2",
58 | "webpack": "^3.6.0",
59 | "webpack-bundle-analyzer": "^2.9.0",
60 | "webpack-dev-server": "^2.9.1",
61 | "webpack-merge": "^4.1.0"
62 | },
63 | "engines": {
64 | "node": ">= 6.0.0",
65 | "npm": ">= 3.0.0"
66 | },
67 | "browserslist": [
68 | "> 1%",
69 | "last 2 versions",
70 | "not ie <= 8"
71 | ]
72 | }
73 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |

7 |
8 |
105 |
109 |
113 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 | - 欢迎您:管理员
125 | -
126 |
132 |
133 |
134 |
135 | -
136 |
142 |
143 |
144 |
145 | -
146 |
152 |
153 |
154 |
155 | -
156 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 | 长虹智能终端设备生产管理云平台
173 |
174 |
175 |
176 |
177 |
178 |
179 |
204 |
205 |
322 |
--------------------------------------------------------------------------------
/src/AxiosRequest.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: weisheres.huang
3 | * @Date: 2018-11-28 15:31:51
4 | * @Last Modified by: weishere.huang
5 | * @Last Modified time: 2018-11-29 11:10:11
6 | */
7 | import axios from 'axios';
8 | import global from './components/global/Global';
9 | import { Message,Loading } from 'element-ui';
10 | axios.defaults.withCredentials = true;
11 |
12 | export default ({ url, type, params, config,loadingConfig},vue) => {
13 | //api的url加入统一前缀
14 | url=`${global.apiSrc}${url}`;
15 | // if (process.env.NODE_ENV === 'development') {
16 | // url = `/api${url}`;
17 | // }
18 |
19 | return new Promise((resolve, reject) => {
20 | //这里加一个通用的数据重置后门
21 | if (params.reset === true) {
22 | resolve({ code: 0, data: params.resetData });
23 | return;
24 | }
25 | window.setTimeout(()=>{
26 | const loading=Loading.service(Object.assign({
27 | lock: true,
28 | text: '玩命加载中,请稍候...',
29 | spinner: 'el-icon-loading',
30 | background: 'rgba(255,255,255, 0.8)',
31 | target: document.querySelector('.mainContentWrapper'),
32 | customClass:'loadingStyle'
33 | },loadingConfig||{}));
34 |
35 | axios[type||'post'](url, {params:params}, config || {}).then(res => {
36 | if (res.status === 200 && res.data.code === 200) {
37 | //success && success(res.data);
38 | Message.success({message:'请求成功', customClass:'e-message', duration:1500});
39 | resolve(res);
40 | } else {
41 | //faild && faild(res.data);
42 | console.log(info);
43 | Message.error({message:`${res.data.msg}(${res.data.code})`,customClass:'e-message', duration:5000});
44 | reject({ type: 'faild', info: res.data });
45 | }
46 | loading.close();
47 | }).catch(res => {
48 | //error && error(res);
49 | loading.close();
50 | //console.log(info);
51 | Message.error({message:`网络异常:${res.message}`,customClass:'e-message', duration:5000});
52 | reject({ type: 'error', info: res });
53 | // dispatch({
54 | // type: 'FAILED',
55 | // payload: res
56 | // });
57 | window.setTimeout(() => {
58 | //2秒后自动重置错误信息
59 | // dispatch({
60 | // type: 'RESET_FAILED'
61 | // });
62 | }, 2000);
63 | })
64 | },10)
65 |
66 |
67 | })
68 | }
69 |
--------------------------------------------------------------------------------
/src/assets/font/font.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: "iconfont";
3 | src: url('//at.alicdn.com/t/font_907587_1912fiyb694.eot?t=1542193022740');
4 | /* IE9*/
5 | src: url('//at.alicdn.com/t/font_907587_1912fiyb694.eot?t=1542193022740#iefix') format('embedded-opentype'),
6 | /* IE6-IE8 */
7 | url('data:application/x-font-woff;charset=utf-8;base64,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') format('woff'),
8 | url('//at.alicdn.com/t/font_907587_1912fiyb694.ttf?t=1542193022740') format('truetype'),
9 | /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
10 | url('//at.alicdn.com/t/font_907587_1912fiyb694.svg?t=1542193022740#iconfont') format('svg');
11 | /* iOS 4.1- */
12 | }
13 |
14 | .iconfont {
15 | font-family: "iconfont" !important;
16 | font-size: 16px;
17 | font-style: normal;
18 | -webkit-font-smoothing: antialiased;
19 | -moz-osx-font-smoothing: grayscale;
20 | }
21 |
22 | .icon-jia:before {
23 | content: "\e65b";
24 | }
25 |
26 | .icon-jian:before {
27 | content: "\e643";
28 | }
29 |
30 | .icon-leimupinleifenleileibie:before {
31 | content: "\e7f9";
32 | }
33 |
34 | .icon-xiewrite18:before {
35 | content: "\e9ca";
36 | }
37 |
38 | .icon-shanchu1:before {
39 | content: "\e635";
40 | }
41 |
42 | .icon-shebeiguanli:before {
43 | content: "\e62a";
44 | }
45 |
46 | .icon-shuqian:before {
47 | content: "\e602";
48 | }
49 |
--------------------------------------------------------------------------------
/src/assets/image/chlogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weishere-huang/device-could/bb1701f838ef3902cf5d2c3d7bf6e60ca53b292b/src/assets/image/chlogo.png
--------------------------------------------------------------------------------
/src/assets/image/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weishere-huang/device-could/bb1701f838ef3902cf5d2c3d7bf6e60ca53b292b/src/assets/image/favicon.ico
--------------------------------------------------------------------------------
/src/assets/image/login-bg2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weishere-huang/device-could/bb1701f838ef3902cf5d2c3d7bf6e60ca53b292b/src/assets/image/login-bg2.png
--------------------------------------------------------------------------------
/src/assets/image/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weishere-huang/device-could/bb1701f838ef3902cf5d2c3d7bf6e60ca53b292b/src/assets/image/logo.png
--------------------------------------------------------------------------------
/src/assets/less/layout.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'iconfont';
3 | /* project id 940294 */
4 | src: url('//at.alicdn.com/t/font_940294_148brnff08t.eot');
5 | src: url('//at.alicdn.com/t/font_940294_148brnff08t.eot?#iefix') format('embedded-opentype'), url('//at.alicdn.com/t/font_940294_148brnff08t.woff') format('woff'), url('//at.alicdn.com/t/font_940294_148brnff08t.ttf') format('truetype'), url('//at.alicdn.com/t/font_940294_148brnff08t.svg#iconfont') format('svg');
6 | }
7 | .iconfont {
8 | font-family: "iconfont" !important;
9 | font-size: 12px;
10 | font-style: normal;
11 | -webkit-font-smoothing: antialiased;
12 | -moz-osx-font-smoothing: grayscale;
13 | }
14 | html,
15 | body {
16 | height: 100%;
17 | }
18 | #app,
19 | .mainWrapper {
20 | height: 100%;
21 | }
22 | .siderWrapper {
23 | width: auto !important;
24 | position: relative;
25 | height: 100%;
26 | display: flex;
27 | overflow: hidden;
28 | flex-direction: column;
29 | background: linear-gradient(135deg, #2F4050 0%, #3a4753 100%);
30 | }
31 | .siderWrapper ul {
32 | flex: 1;
33 | overflow: auto;
34 | background: linear-gradient(135deg, #2F4050 0%, #3a4753 100%) !important;
35 | }
36 | .siderWrapper .el-submenu__title:hover {
37 | background: linear-gradient(135deg, transparent 0%, #171f27 50%, transparent 100%);
38 | }
39 | .siderWrapper .el-menu {
40 | border-right: 0;
41 | }
42 | .siderWrapper .el-menu i {
43 | font-size: 16px;
44 | margin-right: 5px;
45 | }
46 | .siderWrapper .el-menu-item {
47 | background: #202c36;
48 | }
49 | .siderWrapper .el-menu-item:hover {
50 | background: linear-gradient(135deg, transparent 0%, #263441 50%, transparent 100%);
51 | }
52 | .siderWrapper .el-menu-item.is-active {
53 | background: linear-gradient(135deg, transparent 0%, #263441 50%, transparent 100%);
54 | }
55 | .siderWrapper .logoWrap {
56 | width: 218px;
57 | text-align: center;
58 | z-index: 100;
59 | right: 0;
60 | top: 0;
61 | padding: 5px;
62 | position: absolute;
63 | }
64 | .siderWrapper .isCollapse-group {
65 | font-size: 18px;
66 | text-align: center;
67 | display: inline-block;
68 | background: #304151;
69 | color: #fff;
70 | height: 40px;
71 | line-height: 40px;
72 | }
73 | .siderWrapper .isCollapse-group:hover {
74 | background: #42596e;
75 | }
76 | .el-header {
77 | background: #f3f3f4;
78 | border-bottom: solid 1px #e3e6e8;
79 | padding-left: 0;
80 | position: relative;
81 | }
82 | .el-menu--popup {
83 | background: #333 !important;
84 | }
85 | .el-menu--popup li:hover {
86 | background: #666 !important;
87 | }
88 | .el-radio-button {
89 | display: block;
90 | }
91 | .el-radio-button.is-active {
92 | display: none;
93 | }
94 | .el-footer {
95 | height: 30px !important;
96 | border-top: solid 1px #eee;
97 | line-height: 30px;
98 | text-align: right;
99 | font-size: 12px;
100 | color: #666;
101 | }
102 |
--------------------------------------------------------------------------------
/src/assets/less/layout.less:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'iconfont';
3 | /* project id 940294 */
4 | src: url('//at.alicdn.com/t/font_940294_148brnff08t.eot');
5 | src: url('//at.alicdn.com/t/font_940294_148brnff08t.eot?#iefix') format('embedded-opentype'), url('//at.alicdn.com/t/font_940294_148brnff08t.woff') format('woff'), url('//at.alicdn.com/t/font_940294_148brnff08t.ttf') format('truetype'), url('//at.alicdn.com/t/font_940294_148brnff08t.svg#iconfont') format('svg');
6 | }
7 |
8 | .iconfont {
9 | font-family: "iconfont" !important;
10 | font-size: 12px;
11 | font-style: normal;
12 | -webkit-font-smoothing: antialiased;
13 | -moz-osx-font-smoothing: grayscale;
14 | }
15 |
16 | html,
17 | body {
18 | height: 100%;
19 | }
20 |
21 | #app,
22 | .mainWrapper {
23 | height: 100%;
24 | }
25 |
26 | .siderWrapper {
27 | width: auto !important;
28 | position: relative;
29 | height: 100%;
30 | display: flex;
31 | overflow: hidden;
32 | flex-direction: column;
33 | background: linear-gradient(135deg, #2F4050 0%, rgb(58, 71, 83) 100%);
34 | ul {
35 | flex: 1;
36 | overflow: auto; //height: 100%; //background: linear-gradient(135deg, #07a7e3 0%, #32dac3 100%);
37 | //-webkit-transition: all .2s linear !important;
38 | //background-color: #2F4050 !important;
39 | background: linear-gradient(135deg, #2F4050 0%, rgb(58, 71, 83) 100%) !important;
40 | }
41 | .el-submenu__title {
42 | //-webkit-transition: all 1s linear !important;
43 | &:hover {
44 | background: linear-gradient(135deg, transparent 0%, rgb(23, 31, 39) 50%, transparent 100%)
45 | }
46 | }
47 | .el-menu {
48 | border-right: 0;
49 | i {
50 | font-size: 16px;
51 | margin-right: 5px;
52 | }
53 | }
54 | .el-menu-item {
55 | background: #202c36;
56 | &:hover {
57 | background: linear-gradient(135deg, transparent 0%, rgb(38, 52, 65) 50%, transparent 100%)
58 | }
59 | &.is-active {
60 | background: linear-gradient(135deg, transparent 0%, rgb(38, 52, 65) 50%, transparent 100%)
61 | }
62 | }
63 | .logoWrap {
64 | width: 218px;
65 | text-align: center;
66 | z-index: 100;
67 | right: 0;
68 | top: 0;
69 | padding: 5px;
70 | position: absolute
71 | }
72 | .isCollapse-group {
73 | font-size: 18px; //padding: 3px 5px;
74 | text-align: center;
75 | display: inline-block;
76 | background: #304151;
77 | color: #fff;
78 | height: 40px;
79 | line-height: 40px;
80 | &:hover {
81 | background: #42596e;
82 | }
83 | }
84 | }
85 |
86 | .el-header {
87 | background: #f3f3f4;
88 | border-bottom: solid 1px #e3e6e8;
89 | padding-left: 0;
90 | position: relative;
91 | }
92 |
93 | .el-menu--popup {
94 | background: #333 !important;
95 | li {
96 | &:hover {
97 | background: #666 !important;
98 | }
99 | }
100 | }
101 |
102 | .el-radio-button {
103 | display: block;
104 | &.is-active {
105 | display: none
106 | }
107 | }
108 |
109 | .el-footer {
110 | height: 30px !important;
111 | border-top: solid 1px #eee;
112 | line-height: 30px;
113 | text-align: right;
114 | font-size: 12px;
115 | color: #666;
116 | }
117 |
118 | .e-message{
119 | height: 15px;
120 | padding: 10px 25px;
121 | top:0;
122 | font-size: 12px;
123 | }
124 | .loadingStyle{
125 | p,i{
126 | color: #666 !important;
127 | font-size: 18px !important;
128 | }
129 | }
--------------------------------------------------------------------------------
/src/base.js:
--------------------------------------------------------------------------------
1 | exports.install = function (Vue, options) {
2 | Vue.prototype.messageSuccess = function (msg) {
3 | this.$message({
4 | message: msg,
5 | type: 'success'
6 | });
7 | Vue.prototype.messageError = function (msg) {
8 | this.$message.error(msg);
9 | };
10 |
11 | Vue.prototype.affirm = function (msg) {
12 | this.$confirm(msg, '提示', {
13 | confirmButtonText: '确定',
14 | cancelButtonText: '取消',
15 | type: 'warning'
16 | }).then(() => {
17 | this.$message({
18 | type: 'success',
19 | message: '删除成功!'
20 | });
21 | }).catch(() => {
22 | this.$message({
23 | type: 'info',
24 | message: '已取消删除'
25 | });
26 | });
27 | };
28 |
29 | Vue.prototype.tableResize = function (fn) {
30 | console.log('tableResize');
31 | };
32 | };
33 | }
34 |
--------------------------------------------------------------------------------
/src/components/company/AdvancedSearch.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 待审核
11 | 正常
12 | 已禁用
13 | 未通过
14 |
15 |
16 |
17 |
18 | 取消
19 | 搜索
20 |
21 |
22 |
23 |
24 |
98 |
99 |
128 |
--------------------------------------------------------------------------------
/src/components/company/Audit.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
企业信息
5 |
6 |
7 |
8 | 企业主体信息
9 | -
10 |
11 |
12 |
13 | -
14 |
15 |
16 |
17 | -
18 |
19 |
20 |
21 | -
22 |
23 |
24 |
25 | -
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
36 |
37 |
38 |
39 | 返回
40 | 驳回
41 | 通过
42 |
43 |
44 |
45 |
46 |

47 |
48 |
49 |
50 |
51 |
123 |
190 |
--------------------------------------------------------------------------------
/src/components/company/BusinessDetails.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
企业信息
6 |
7 |
8 |
9 | 企业主体信息
10 | -
11 |
12 |
13 |
14 | -
15 |
16 |
18 |
19 | -
20 |
21 |
22 |
23 | -
24 |
25 |
26 |
27 | -
28 |
29 |
31 |
32 |
33 |
34 |
35 |
36 | 驳回原因:
37 |
38 |
39 | {{detailsValue.auditOpinion}}
40 |
41 |
42 |
43 | 返回
44 |
45 |
46 |
47 |

48 |
49 |
50 |
51 |
52 |
84 |
148 |
--------------------------------------------------------------------------------
/src/components/equipment/AddPerson.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
组织机构
13 |
14 |
22 |
26 | {{ data.name }}
27 |
28 |
29 |
30 |
31 |
32 |
33 |
38 | 搜索
39 | 最近搜索:
40 |
41 |
42 |
70 |
71 |
72 |
清空
73 |
保存
74 |
75 |
76 | - {{item}}
80 | x
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
249 |
250 |
365 |
--------------------------------------------------------------------------------
/src/components/equipment/Advanced.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | 在用
25 | 停用
26 | 出租
27 | 封存
28 | 报废
29 |
30 |
31 |
32 |
33 | 取消
34 | 搜索
35 |
36 |
37 |
38 |
39 |
113 |
114 |
144 |
--------------------------------------------------------------------------------
/src/components/equipment/Category.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
类别名称
6 |
7 |
8 | {{ data.categoryName}}
9 |
10 |
11 | 添加
12 |
13 |
14 | 修改
15 |
16 |
17 | 删除
18 |
19 |
20 |
21 |
22 |
23 |
37 |
38 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | 保存
52 |
53 |
54 |
55 |
56 |
57 |
183 |
234 |
--------------------------------------------------------------------------------
/src/components/equipmentArchives/EquipmentArchives.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 设备档案
4 |
5 |
--------------------------------------------------------------------------------
/src/components/global/Global.vue:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/src/components/home/Home.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 默认页面
4 |
5 |
6 |
39 |
45 |
--------------------------------------------------------------------------------
/src/components/information/Information.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
--------------------------------------------------------------------------------
/src/components/knowledgeBase/KnowledgeBase.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 知识库
4 |
5 |
--------------------------------------------------------------------------------
/src/components/login/ForgetThePassword.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
重置登录密码
5 |
6 | (确认账号)
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | 看不清?换一张
15 |
16 |
17 | 下一步
18 |
19 |
20 |
21 |
22 |
(选择验证方式)
23 |
24 | 通过手机短信验证
25 |
26 |
27 | 下一步
28 |
29 |
30 |
31 |
32 |
(手机短信验证)
33 |
34 |
35 | 您绑定的手机号:
36 | 12345678901
37 | 获取验证码
38 |
39 |
40 |
41 |
42 |
43 |
44 | 下一步
45 |
46 |
47 |
48 |
49 |
50 |
(设置新密码)
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | 确认
61 |
62 |
63 |
64 |
65 |
66 |
67 | 返回登录
68 |
69 |
70 |
71 |
72 |
73 | 您的密码已重置成功,请妥善保管您的密码!
74 |
75 |
76 | 立即登录
77 |
78 |
79 |
80 |
81 |
133 |
223 |
--------------------------------------------------------------------------------
/src/components/message/MsgDetails.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 返回
6 |
7 |
8 |
消息详情
9 |
10 | -
11 | 消息标题:
12 | {{msgDetail.msgTitle}}
13 |
14 | -
15 | 消息内容:
16 | {{msgDetail.msgContent}}
17 |
18 |
19 |
20 |
21 |
22 | -
23 | 发送时间:
24 | {{msgDetail.gmtCreate}}
25 |
26 | -
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
109 |
177 |
--------------------------------------------------------------------------------
/src/components/operation/Breakdown.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
审核
9 |
故障消除
13 |
删除
14 |
15 |
21 | 搜索
25 | 高级搜索
26 |
27 |
28 |
57 |
58 |
59 |
60 |
64 |
65 |
66 |
71 |
72 |
73 |
74 |
317 |
318 |
362 |
--------------------------------------------------------------------------------
/src/components/operation/Operation.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 运维管理
4 |
5 |
--------------------------------------------------------------------------------
/src/components/operation/breakdown/Audit.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 同意
8 | 驳回
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
54 |
55 |
99 |
--------------------------------------------------------------------------------
/src/components/operation/breakdown/Personnel.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 搜索
8 | 最近搜索:{{searchs}}
9 |
10 |
11 |
17 |
18 |
19 |
20 |
21 |
115 |
157 |
--------------------------------------------------------------------------------
/src/components/operation/turnaroundPlans/AddPlan.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 添加设备
6 |
9 |
10 |
11 |
12 |
设备类别
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | 搜索
23 | 最近搜索:{{searchs}}
24 |
25 |
26 |
32 |
33 |
34 |
清空
35 |
保存
36 |
37 |
38 | - {{item}}
39 | x
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
231 |
232 |
347 |
--------------------------------------------------------------------------------
/src/components/operation/turnaroundPlans/AmendPlan.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 添加设备
6 |
9 |
10 |
11 |
12 |
组织机构
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | 搜索
22 | 最近搜索:{{searchs}}
23 |
24 |
25 |
31 |
32 |
33 |
清空
34 |
保存
35 |
36 |
37 | - {{item}}
38 | x
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
250 |
251 |
366 |
--------------------------------------------------------------------------------
/src/components/operation/turnaroundPlans/AuditTurnaround.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 同意
8 | 驳回
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
53 |
54 |
98 |
--------------------------------------------------------------------------------
/src/components/operation/turnaroundPlans/PersonnelTurnaround.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 搜索
8 | 最近搜索:{{searchs}}
9 |
10 |
11 |
17 |
18 |
19 |
20 |
21 |
117 |
159 |
--------------------------------------------------------------------------------
/src/components/operation/upkeep/AddPlan.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 添加设备
6 |
9 |
10 |
11 |
12 |
组织机构
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | 搜索
23 | 最近搜索:{{searchs}}
24 |
25 |
26 |
32 |
33 |
34 |
清空
35 |
保存
36 |
37 |
38 | - {{item}}
39 | x
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
248 |
249 |
364 |
--------------------------------------------------------------------------------
/src/components/operation/upkeep/AuditUPkeep.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
20 |
21 | 同意
25 | 驳回
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
73 |
74 |
118 |
--------------------------------------------------------------------------------
/src/components/operation/upkeep/PersonnelUpkeep.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 | 搜索
13 | 最近搜索:{{searchs}}
14 |
15 |
16 |
42 |
43 |
44 |
45 |
46 |
142 |
184 |
--------------------------------------------------------------------------------
/src/components/organization/Add.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | -
9 |
10 |
11 |
12 | -
13 |
14 |
15 |
16 |
17 |
18 |
19 | -
20 |
21 |
22 |
23 |
24 | -
25 | 取消
29 | 保存
30 |
31 |
32 |
33 |
34 |
35 |
36 |
112 |
159 |
--------------------------------------------------------------------------------
/src/components/organization/Organization.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
企业名称
6 |
7 |
备注
8 | 类别
9 |
10 |
17 |
21 | {{ data.name }}
22 |
23 |
28 | 添加
29 |
30 |
35 | 修改
36 |
37 |
42 | 删除
43 |
44 |
45 |
46 | {{ data.organizeType }}
47 | {{ data.organizeInfo }}
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
252 |
348 |
--------------------------------------------------------------------------------
/src/components/organization/Revise.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | -
9 |
10 |
15 |
16 | -
17 |
18 |
23 |
29 |
30 |
31 |
32 | -
33 |
34 |
39 |
40 |
41 | -
42 | 取消
46 | 保存
47 |
48 |
49 |
50 |
51 |
52 |
53 |
113 |
159 |
--------------------------------------------------------------------------------
/src/components/personnel/Personnel.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
添加
6 |
修改
7 |
启用
8 |
禁用
9 |
删除
10 |
11 |
12 | 搜索
13 |
14 |
15 |
23 |
24 |
25 |
26 |
300 |
336 |
337 |
--------------------------------------------------------------------------------
/src/components/system/System.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 系统管理
4 |
5 |
--------------------------------------------------------------------------------
/src/components/user/User.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
启用
6 |
停用
7 |
删除
8 |
9 |
10 | 搜索
11 |
12 |
13 |
25 |
26 |
27 |
28 |
262 |
291 |
--------------------------------------------------------------------------------
/src/components/workOrder/WorkOrder.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
61 |
62 |
64 |
65 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | // The Vue build version to load with the `import` command
2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3 | import Vue from 'vue'
4 | import App from './App'
5 | import router from './router'
6 | import store from './store'
7 | import ElementUI from 'element-ui'
8 | import 'element-ui/lib/theme-chalk/index.css'
9 | import axios from 'axios'
10 | import Axios from './AxiosRequest';
11 | import vuex from 'vuex'
12 | import $ from 'jquery'
13 | import 'vue-easytable/libs/themes-base/index.css';
14 | import md5 from 'js-md5/src/md5.js'
15 | import CryptoJS from 'crypto-js'
16 | import 'normalize.css'
17 | import './assets/less/layout.less'
18 | import {
19 | VTable,
20 | VPagination
21 | } from 'vue-easytable'
22 | import global from './components/global/Global'
23 | import base from "./base.js";
24 |
25 |
26 | Vue.use(base)
27 | // import {
28 | // Message,
29 | // MessageBox
30 | // } from 'element-ui'
31 | Vue.prototype.global = global;
32 | // Vue.pototyype.message = function (msg) {
33 | // this.$message('这是一条消息提示')
34 | // }
35 | Vue.use(ElementUI)
36 | Vue.component(VTable.name, VTable)
37 | Vue.component(VPagination.name, VPagination)
38 | Vue.use(vuex);
39 | Vue.config.productionTip = false
40 | Vue.prototype.axios = axios;
41 | Vue.prototype.Axios = Axios;
42 | axios.defaults.withCredentials = true;
43 | window.EventBus = new Vue();
44 |
45 | let AUTH_TOKEN = (function () {
46 | return sessionStorage.getItem("token");
47 | })();
48 | var instance = axios.create({});
49 | instance.defaults.headers.common["token"] = sessionStorage.getItem("token");
50 | // instance.interceptors.request.use(function (config) {
51 | // console.log(config)
52 | // let url = config.url;
53 | // if (url.indexOf("login") > -1) {
54 | // sessionStorage.setItem('token', "");
55 | // config.headers.token = "";
56 | // }
57 | // if (url.indexOf("user") > -1 && url.indexOf("login") < 0) {
58 | // config.headers.token = sessionStorage.getItem("token");
59 | // }
60 | // return config;
61 | // }, function (err) {
62 | // return Promise.reject(err);
63 | // });
64 | // instance.interceptors.response.use(function (res) {
65 | // if (res.headers.token) {
66 | // sessionStorage.setItem('token', res.headers.token);
67 | // }
68 | // return res;
69 | // }, function (err) {
70 | // return err;
71 | // });
72 | // export default instance;
73 |
74 | new Vue({
75 | el: '#app',
76 | router,
77 | components: {
78 | App
79 | },
80 | template: '',
81 | ElementUI,
82 | axios,
83 | store
84 | })
85 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 | import Login from '@/components/login/Login'
4 | import ForgetThePassword from '@/components/login/ForgetThePassword'
5 | import Home from '@/components/home/Home'
6 | import Information from '@/components/information/Information'
7 | import Company from '@/components/company/Company'
8 | import BusinessDetails from '@/components/company/BusinessDetails'
9 | import Equipment from '@/components/equipment/Equipment'
10 | import Category from '@/components/equipment/Category'
11 | import EquipmentAdd from '@/components/equipment/EquipmentAdd'
12 | import Redact from '@/components/equipment/Redact'
13 | import Operation from '@/components/operation/Operation'
14 | import Upkeep from '@/components/operation/upkeep/Upkeep'
15 | import AmendPlan from '@/components/operation/upkeep/AmendPlan'
16 | import UpkeepAdd from '@/components/operation/upkeep/UpkeepAdd'
17 | import UpkeepAmend from '@/components/operation/upkeep/UpkeepAmend'
18 | import TurnaroundPlansAdd from '@/components/operation/turnaroundPlans/TurnaroundPlansAdd'
19 | import TurnaroundPlansAmend from '@/components/operation/turnaroundPlans/TurnaroundPlansAmend'
20 | import Breakdown from '@/components/operation/Breakdown'
21 | import TurnaroundPlans from '@/components/operation/TurnaroundPlans'
22 | import BreakDetails from '@/components/operation/BreakDetails'
23 | import Organization from '@/components/organization/Organization'
24 | import Add from '@/components/organization/Add'
25 | import Personnel from '@/components/personnel/Personnel'
26 | import PersnnelAdd from '@/components/personnel/PersnnelAdd'
27 | import Modification from '@/components/personnel/Modification'
28 | import User from '@/components/user/User'
29 | import EquipmentArchives from '@/components/equipmentArchives/EquipmentArchives'
30 | import WorkOrder from '@/components/workOrder/WorkOrder'
31 | import KnowledgeBase from '@/components/knowledgeBase/KnowledgeBase'
32 | import Message from '@/components/message/Message'
33 | import System from '@/components/system/System'
34 | import RoleManagement from '@/components/roleManagement/RoleManagement'
35 | import AdvancedSearch from '@/components/company/AdvancedSearch'
36 | import Audit from '@/components/company/Audit'
37 | import MsgDetails from '@/components/message/MsgDetails'
38 | Vue.use(Router)
39 |
40 | const router = new Router({
41 | mode: 'history',
42 | routes: [{
43 | path: '/',
44 | redirect: '/Login'
45 | },
46 | {
47 | path: '/Login',
48 | name: 'Login',
49 | component: Login
50 | },
51 | {
52 | path: '/Home',
53 | name: 'Home',
54 | component: Home,
55 | meta: {
56 | requireAuth: true
57 | },
58 | },
59 | {
60 | path: '/ForgetThePassword',
61 | name: 'ForgetThePassword',
62 | component: ForgetThePassword,
63 | meta: {
64 | requireAuth: true
65 | },
66 | },
67 | {
68 | path: '/Information',
69 | name: 'Information',
70 | component: Information,
71 | meta: {
72 | requireAuth: true
73 | },
74 | },
75 | {
76 | path: '/Company',
77 | name: 'Company',
78 | component: Company,
79 | meta: {
80 | requireAuth: true
81 | },
82 | },
83 | {
84 | path: '/Audit',
85 | name: 'Audit',
86 | component: Audit,
87 | meta: {
88 | requireAuth: true
89 | },
90 | },
91 | {
92 | path: '/AdvancedSearch',
93 | name: 'AdvancedSearch',
94 | component: AdvancedSearch,
95 | meta: {
96 | requireAuth: true
97 | },
98 | },
99 | {
100 | path: '/Category',
101 | name: 'Category',
102 | component: Category,
103 | meta: {
104 | requireAuth: true
105 | },
106 | },
107 | {
108 | path: '/BusinessDetails',
109 | name: 'BusinessDetails',
110 | component: BusinessDetails,
111 | meta: {
112 | requireAuth: true
113 | },
114 | },
115 | {
116 | path: '/Equipment',
117 | name: 'Equipment',
118 | component: Equipment,
119 | meta: {
120 | requireAuth: true
121 | },
122 | },
123 | {
124 | path: '/EquipmentAdd',
125 | name: 'EquipmentAdd',
126 | component: EquipmentAdd,
127 | meta: {
128 | requireAuth: true
129 | },
130 | },
131 | {
132 | path: '/UpkeepAmend',
133 | name: 'UpkeepAmend',
134 | component: UpkeepAmend,
135 | meta: {
136 | requireAuth: true
137 | },
138 | },
139 | {
140 | path: '/AmendPlan',
141 | name: 'AmendPlan',
142 | component: AmendPlan,
143 | meta: {
144 | requireAuth: true
145 | },
146 | },
147 | {
148 | path: '/Redact/:id/',
149 | name: 'Redact',
150 | component: Redact,
151 | meta: {
152 | requireAuth: true
153 | },
154 | },
155 | {
156 | path: '/Operation',
157 | name: 'Operation',
158 | component: Operation,
159 | meta: {
160 | requireAuth: true
161 | },
162 | },
163 | {
164 | path: '/Upkeep',
165 | name: 'Upkeep',
166 | component: Upkeep,
167 | meta: {
168 | requireAuth: true
169 | },
170 | },
171 | {
172 | path: '/UpkeepAdd',
173 | name: 'UpkeepAdd',
174 | component: UpkeepAdd,
175 | meta: {
176 | requireAuth: true
177 | },
178 | },
179 | {
180 | path: '/TurnaroundPlansAdd',
181 | name: 'TurnaroundPlansAdd',
182 | component: TurnaroundPlansAdd,
183 | meta: {
184 | requireAuth: true
185 | },
186 | },
187 | {
188 | path: '/TurnaroundPlansAmend',
189 | name: 'TurnaroundPlansAmend',
190 | component: TurnaroundPlansAmend,
191 | meta: {
192 | requireAuth: true
193 | },
194 | },
195 | {
196 | path: '/BreakDetails',
197 | name: 'BreakDetails',
198 | component: BreakDetails,
199 | meta: {
200 | requireAuth: true
201 | },
202 | },
203 | {
204 | path: '/Breakdown',
205 | name: 'Breakdown',
206 | component: Breakdown,
207 | meta: {
208 | requireAuth: true
209 | },
210 | },
211 | {
212 | path: '/TurnaroundPlans',
213 | name: 'TurnaroundPlans',
214 | component: TurnaroundPlans,
215 | meta: {
216 | requireAuth: true
217 | },
218 | },
219 | {
220 | path: '/Organization',
221 | name: 'Organization',
222 | component: Organization,
223 | meta: {
224 | requireAuth: true
225 | },
226 | },
227 | {
228 | path: '/Add',
229 | name: 'Add',
230 | component: Add,
231 | meta: {
232 | requireAuth: true
233 | },
234 | },
235 | {
236 | path: '/Personnel',
237 | name: 'Personnel',
238 | component: Personnel,
239 | meta: {
240 | requireAuth: true
241 | },
242 | },
243 | {
244 | path: '/PersnnelAdd',
245 | name: 'PersnnelAdd',
246 | component: PersnnelAdd,
247 | meta: {
248 | requireAuth: true
249 | },
250 | },
251 | {
252 | path: '/Modification',
253 | name: 'Modification',
254 | component: Modification,
255 | meta: {
256 | requireAuth: true
257 | },
258 | },
259 | {
260 | path: '/User',
261 | name: 'User',
262 | component: User,
263 | meta: {
264 | requireAuth: true
265 | },
266 | },
267 | {
268 | path: '/EquipmentArchives',
269 | name: 'EquipmentArchives',
270 | component: EquipmentArchives,
271 | meta: {
272 | requireAuth: true
273 | },
274 | },
275 | {
276 | path: '/WorkOrder',
277 | name: 'WorkOrder',
278 | component: WorkOrder,
279 | meta: {
280 | requireAuth: true
281 | },
282 | },
283 | {
284 | path: '/KnowledgeBase',
285 | name: 'KnowledgeBase',
286 | component: KnowledgeBase,
287 | meta: {
288 | requireAuth: true
289 | },
290 | },
291 | {
292 | path: '/Message',
293 | name: 'Message',
294 | component: Message,
295 | meta: {
296 | requireAuth: true
297 | },
298 | },
299 | {
300 | path: '/MsgDetails',
301 | name: 'MsgDetails',
302 | component: MsgDetails,
303 | meta: {
304 | requireAuth: true
305 | },
306 | },
307 | {
308 | path: '/RoleManagement',
309 | name: 'RoleManagement',
310 | component: RoleManagement,
311 | meta: {
312 | requireAuth: true
313 | },
314 | },
315 | {
316 | path: '/System',
317 | name: 'System',
318 | component: System,
319 | meta: {
320 | requireAuth: true
321 | },
322 | }
323 | ]
324 | })
325 |
326 | router.beforeEach((to, from, next) => {
327 | if (to.matched.some(res => res.meta.requireAuth)) { // 判断是否需要登录权限
328 | if (sessionStorage.getItem('token')) { // 判断是否登录
329 | next()
330 | } else if (sessionStorage.getItem('token') === "") { // 没登录则跳转到登录界面
331 | next({
332 | path: '/Login',
333 | query: {
334 | redirect: to.fullPath
335 | }
336 | })
337 | }
338 | } else {
339 | next()
340 | }
341 | })
342 | export default router
343 |
--------------------------------------------------------------------------------
/src/store/equipment_statr.js:
--------------------------------------------------------------------------------
1 | export default {
2 | state: {
3 | person: "",
4 | details:""
5 | },
6 | mutations: {
7 | equipmentRedact(state, data) {
8 | state.person = data
9 | },
10 | findOne(state,data){
11 | state.details=data
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import vuex from 'vuex'
3 | import personnel_state from './personnel_state'
4 | import equipment_statr from './equipment_statr'
5 | import operation_state from './operation_state'
6 | import token_state from "./token_state";
7 | Vue.use(vuex);
8 | export default new vuex.Store({
9 | modules: {
10 | personnel: personnel_state,
11 | equipment: equipment_statr,
12 | operation: operation_state,
13 | token: token_state
14 | }
15 | })
16 |
--------------------------------------------------------------------------------
/src/store/operation_state.js:
--------------------------------------------------------------------------------
1 | export default {
2 | state: {
3 | upkeep: "",
4 | turnround:""
5 | },
6 | mutations: {
7 | upkeepAmend(state, data) {
8 | state.upkeep = data
9 | },
10 | turnaroundPlans(state, data) {
11 | state.turnround=data
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/store/personnel_state.js:
--------------------------------------------------------------------------------
1 | export default {
2 | state: {
3 | imId: ""
4 | },
5 | mutations: {
6 | personnel(state, data) {
7 | state.imId = data
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/store/token_state.js:
--------------------------------------------------------------------------------
1 | export default {
2 | state: {
3 | tokenNub: ""
4 | },
5 | mutations: {
6 | tokenSrc(state, data) {
7 | state.toeknNub = data
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/weishere-huang/device-could/bb1701f838ef3902cf5d2c3d7bf6e60ca53b292b/static/.gitkeep
--------------------------------------------------------------------------------