diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index c4e9c78..b34b450 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -292,7 +292,7 @@ }, fetchDevice() { this.loading = true - getDeviceSimpleList('6', '0').then(response => { + getDeviceSimpleList('8', '0').then(response => { this.loading = false this.devices = response.data }) diff --git a/src/views/deviceConfig/components/editNoiseConfig.vue b/src/views/deviceConfig/components/editNoiseConfig.vue index c4e9c78..b34b450 100644 --- a/src/views/deviceConfig/components/editNoiseConfig.vue +++ b/src/views/deviceConfig/components/editNoiseConfig.vue @@ -292,7 +292,7 @@ }, fetchDevice() { this.loading = true - getDeviceSimpleList('6', '0').then(response => { + getDeviceSimpleList('8', '0').then(response => { this.loading = false this.devices = response.data }) diff --git a/vue.config.js b/vue.config.js index 4a967eb..bcb6df3 100644 --- a/vue.config.js +++ b/vue.config.js @@ -12,10 +12,10 @@ const port = process.env.port || process.env.npm_config_port || 9527 // dev port module.exports = { - // publicPath: '/', - publicPath: process.env.NODE_ENV === 'production' - ? '/smartwell/' - : '/', + publicPath: './', + // publicPath: process.env.NODE_ENV === 'production' + // ? './' + // : './', assetsDir: 'static', outputDir: 'dist', lintOnSave: process.env.NODE_ENV === 'development', // 是否开启eslint @@ -24,7 +24,7 @@ // 它支持webPack-dev-server的所有选项 devServer: { port: port, // 端口号 - open: true, // 配置自动启动浏览器 + open: true // 配置自动启动浏览器 // before: require('./mock/mock-server.js') }, configureWebpack: (config) => { @@ -55,9 +55,9 @@ } }, externals: { - 'AMap': 'AMap', + 'AMap': 'AMap' // 'mars3d-cesium': 'Cesium' - }, //排除使用 mars3d-cesium + }, // 排除使用 mars3d-cesium module: { unknownContextCritical: false }, // 配置加载的模块类型,cesium时必须配置 plugins: plugins } @@ -99,28 +99,28 @@ // 包含在默认 vendor 中显然不合适,每次用户都要加载这么大的文件体验不好,所以要单独打包: 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 + 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 + } } - } - }) + }) // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk config.optimization.runtimeChunk('single') }