From 1c373822ee3266baec000a05b25a21805b460769 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Mon, 4 Nov 2019 10:33:45 +0800 Subject: [PATCH] =?UTF-8?q?desc:=20=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/zh/index.js | 60 ++--- src/views/planMonitor/detail.vue | 5 +- src/views/screenMonitor/detail/index.vue | 252 --------------------- src/views/screenMonitor/home.vue | 98 -------- src/views/screenMonitor/index.vue | 71 ------ src/views/screenMonitor/list/demonList.vue | 147 ------------ vue.config.js | 241 ++++++++++---------- 7 files changed, 153 insertions(+), 721 deletions(-) delete mode 100644 src/views/screenMonitor/detail/index.vue delete mode 100644 src/views/screenMonitor/home.vue delete mode 100644 src/views/screenMonitor/index.vue delete mode 100644 src/views/screenMonitor/list/demonList.vue diff --git a/src/i18n/langs/zh/index.js b/src/i18n/langs/zh/index.js index cfaa99bdb..004486c75 100644 --- a/src/i18n/langs/zh/index.js +++ b/src/i18n/langs/zh/index.js @@ -30,34 +30,34 @@ import login from './login'; import designPlatform from './designPlatform'; export default { - ...cnLocale, - map, - global, - router, - lesson, - error, - teach, - rules, - scriptRecord, - tip, - system, - orderAuthor, - publish, - permission, - replay, - planMonitor, - screenMonitor, - demonstration, - exam, - dashboard, - jlmap3d, - display, - joinTraining, - trainRoom, - menu, - ibp, - approval, - systemGenerate, - login, - designPlatform + ...cnLocale, + map, + global, + router, + lesson, + error, + teach, + rules, + scriptRecord, + tip, + system, + orderAuthor, + publish, + permission, + replay, + planMonitor, + screenMonitor, + demonstration, + exam, + dashboard, + jlmap3d, + display, + joinTraining, + trainRoom, + menu, + ibp, + approval, + systemGenerate, + login, + designPlatform }; diff --git a/src/views/planMonitor/detail.vue b/src/views/planMonitor/detail.vue index a1d3f8001..947c71a46 100644 --- a/src/views/planMonitor/detail.vue +++ b/src/views/planMonitor/detail.vue @@ -92,7 +92,6 @@ export default { } }, created() { - debugger; this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.skinCode); }, mounted() { @@ -209,8 +208,8 @@ export default { }); }, handelRevert(row) { - this.$confirm(this.$t('tip.cancelRunPlanTips'), this.$t('tip.hint'), { - confirmButtonText: this.$t('tip.confirm'), + this.$confirm(this.$t('tip.cancelRunPlanTips'), this.$t('tip.hint'), { + confirmButtonText: this.$t('tip.confirm'), cancelButtonText: this.$t('tip.cancel'), type:'warning' }).then(() => { diff --git a/src/views/screenMonitor/detail/index.vue b/src/views/screenMonitor/detail/index.vue deleted file mode 100644 index 7b6a03f4f..000000000 --- a/src/views/screenMonitor/detail/index.vue +++ /dev/null @@ -1,252 +0,0 @@ - - - - - diff --git a/src/views/screenMonitor/home.vue b/src/views/screenMonitor/home.vue deleted file mode 100644 index 82bbd39b0..000000000 --- a/src/views/screenMonitor/home.vue +++ /dev/null @@ -1,98 +0,0 @@ - - - - diff --git a/src/views/screenMonitor/index.vue b/src/views/screenMonitor/index.vue deleted file mode 100644 index 05c2994e4..000000000 --- a/src/views/screenMonitor/index.vue +++ /dev/null @@ -1,71 +0,0 @@ - - - - diff --git a/src/views/screenMonitor/list/demonList.vue b/src/views/screenMonitor/list/demonList.vue deleted file mode 100644 index 2eadafb6f..000000000 --- a/src/views/screenMonitor/list/demonList.vue +++ /dev/null @@ -1,147 +0,0 @@ - - - diff --git a/vue.config.js b/vue.config.js index b2e7bb0a5..cd7b21d7e 100644 --- a/vue.config.js +++ b/vue.config.js @@ -7,7 +7,7 @@ const defaultSettings = require('./src/settings.js'); const CopyWebpackPlugin = require('copy-webpack-plugin'); function resolve(dir) { - return path.join(__dirname, dir); + return path.join(__dirname, dir); } const name = defaultSettings.title; // page title @@ -15,134 +15,135 @@ const port = 9527; // dev port // All configuration item explanations can be find in https://cli.vuejs.org/config/ module.exports = { - /** + /** * You will need to set publicPath if you plan to deploy your site under a sub path, * for example GitHub Pages. If you plan to deploy your site to https://foo.github.io/bar/, * then publicPath should be set to "/bar/". * In most cases please use '/' !!! * Detail: https://cli.vuejs.org/config/#publicpath */ - publicPath: '/', - outputDir: 'dist', - assetsDir: 'static', - lintOnSave: false, - productionSourceMap: false, - devServer: { - port: port, - open: true, - overlay: { - warnings: false, - errors: true - } - // proxy: { - // // change xxx-api/login => mock/login - // // detail: https://cli.vuejs.org/config/#devserver-proxy - // [process.env.VUE_APP_BASE_API]: { - // target: `http://localhost:${port}/mock`, - // changeOrigin: true, - // pathRewrite: { - // ['^' + process.env.VUE_APP_BASE_API]: '' - // } - // } - // }, - // after: require('./mock/mock-server.js') - }, - configureWebpack: { - // provide the app's title in webpack's name field, so that - // it can be accessed in index.html to inject the correct title. - name: name, - resolve: { - extensions: ['.js', '.vue', '.json'], - alias: { - '@': resolve('src') - } - }, - plugins: [ - new CopyWebpackPlugin([ - { - from: path.resolve(__dirname, './static'), - to: 'static', - ignore: ['.*'] - } - ]) - ] - }, - chainWebpack(config) { - config.plugins.delete('preload'); // TODO: need test - config.plugins.delete('prefetch'); // TODO: need test + publicPath: '/', + outputDir: 'dist', + assetsDir: 'static', + lintOnSave: false, + productionSourceMap: false, + cssSourceMap: true, + devServer: { + port: port, + open: true, + overlay: { + warnings: false, + errors: true + } + // proxy: { + // // change xxx-api/login => mock/login + // // detail: https://cli.vuejs.org/config/#devserver-proxy + // [process.env.VUE_APP_BASE_API]: { + // target: `http://localhost:${port}/mock`, + // changeOrigin: true, + // pathRewrite: { + // ['^' + process.env.VUE_APP_BASE_API]: '' + // } + // } + // }, + // after: require('./mock/mock-server.js') + }, + configureWebpack: { + // provide the app's title in webpack's name field, so that + // it can be accessed in index.html to inject the correct title. + name: name, + resolve: { + extensions: ['.js', '.vue', '.json'], + alias: { + '@': resolve('src') + } + }, + plugins: [ + new CopyWebpackPlugin([ + { + from: path.resolve(__dirname, './static'), + to: 'static', + ignore: ['.*'] + } + ]) + ] + }, + chainWebpack(config) { + config.plugins.delete('preload'); // TODO: need test + config.plugins.delete('prefetch'); // TODO: need test - // set svg-sprite-loader - config.module - .rule('svg') - .exclude.add(resolve('src/icons')) - .end(); - config.module - .rule('icons') - .test(/\.svg$/) - .include.add(resolve('src/icons')) - .end() - .use('svg-sprite-loader') - .loader('svg-sprite-loader') - .options({ - symbolId: 'icon-[name]' - }) - .end(); + // set svg-sprite-loader + config.module + .rule('svg') + .exclude.add(resolve('src/icons')) + .end(); + config.module + .rule('icons') + .test(/\.svg$/) + .include.add(resolve('src/icons')) + .end() + .use('svg-sprite-loader') + .loader('svg-sprite-loader') + .options({ + symbolId: 'icon-[name]' + }) + .end(); - // set preserveWhitespace - config.module - .rule('vue') - .use('vue-loader') - .loader('vue-loader') - .tap(options => { - options.compilerOptions.preserveWhitespace = true; - return options; - }) - .end(); + // set preserveWhitespace + config.module + .rule('vue') + .use('vue-loader') + .loader('vue-loader') + .tap(options => { + options.compilerOptions.preserveWhitespace = true; + return options; + }) + .end(); - config - // https://webpack.js.org/configuration/devtool/#development - .when(process.env.NODE_ENV === 'development', - config => config.devtool('cheap-source-map') - ); + config + // https://webpack.js.org/configuration/devtool/#development + .when(process.env.NODE_ENV === 'development', + config => config.devtool('cheap-source-map') + ); - config - .when(process.env.NODE_ENV !== 'development', - config => { - config - .plugin('ScriptExtHtmlWebpackPlugin') - .after('html') - .use('script-ext-html-webpack-plugin', [{ - // `runtime` must same as runtimeChunk name. default is `runtime` - inline: /runtime\..*\.js$/ - }]) - .end(); - config - .optimization.splitChunks({ - chunks: 'all', - cacheGroups: { - libs: { - name: 'chunk-libs', - test: /[\\/]node_modules[\\/]/, - priority: 10, - chunks: 'initial' // only package third parties that are initially dependent - }, - elementUI: { - name: 'chunk-elementUI', // split elementUI into a single package - priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app - test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm - }, - commons: { - name: 'chunk-commons', - test: resolve('src/components'), // can customize your rules - minChunks: 3, // minimum common number - priority: 5, - reuseExistingChunk: true - } - } - }); - config.optimization.runtimeChunk('single'); - } - ); - } + config + .when(process.env.NODE_ENV !== 'development', + config => { + config + .plugin('ScriptExtHtmlWebpackPlugin') + .after('html') + .use('script-ext-html-webpack-plugin', [{ + // `runtime` must same as runtimeChunk name. default is `runtime` + inline: /runtime\..*\.js$/ + }]) + .end(); + config + .optimization.splitChunks({ + chunks: 'all', + cacheGroups: { + libs: { + name: 'chunk-libs', + test: /[\\/]node_modules[\\/]/, + priority: 10, + chunks: 'initial' // only package third parties that are initially dependent + }, + elementUI: { + name: 'chunk-elementUI', // split elementUI into a single package + priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app + test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm + }, + commons: { + name: 'chunk-commons', + test: resolve('src/components'), // can customize your rules + minChunks: 3, // minimum common number + priority: 5, + reuseExistingChunk: true + } + } + }); + config.optimization.runtimeChunk('single'); + } + ); + } };