Showing
3 changed files
with
85 additions
and
72 deletions
| ... | @@ -5,8 +5,10 @@ VUE_APP_BASE_ENV = "dev" | ... | @@ -5,8 +5,10 @@ VUE_APP_BASE_ENV = "dev" |
| 5 | 5 | ||
| 6 | VUE_APP_Version = '1.0.0' | 6 | VUE_APP_Version = '1.0.0' |
| 7 | 7 | ||
| 8 | +VUE_APP_BASE_URL = 'https://declaration.fedex.com.cn/EcomExp' | ||
| 8 | # FedEx 在线申报工具/开发环境 | 9 | # FedEx 在线申报工具/开发环境 |
| 9 | -VUE_APP_BASE_API = 'http://101.132.100.41:7001/EcomExp' | 10 | +# http://101.132.100.41:7001/EcomExp |
| 11 | +VUE_APP_BASE_API = /EcomExp | ||
| 10 | 12 | ||
| 11 | VUE_APP_BASE_ROUTE = '/EcomDev' | 13 | VUE_APP_BASE_ROUTE = '/EcomDev' |
| 12 | 14 | ... | ... |
| ... | @@ -311,7 +311,7 @@ | ... | @@ -311,7 +311,7 @@ |
| 311 | ref="allLogDataReceiptStatusPopover" | 311 | ref="allLogDataReceiptStatusPopover" |
| 312 | dataKey="allLogDataReceiptStatus" | 312 | dataKey="allLogDataReceiptStatus" |
| 313 | idKey="declareId" | 313 | idKey="declareId" |
| 314 | - :parentDom="$refs.entryTable" | 314 | + :parentDom="$refs.tableRef" |
| 315 | :receiptDataHead="logDataHead" | 315 | :receiptDataHead="logDataHead" |
| 316 | :rowData="selectedLogRow" | 316 | :rowData="selectedLogRow" |
| 317 | :tableData="tableData" | 317 | :tableData="tableData" |
| ... | @@ -1001,6 +1001,7 @@ export default { | ... | @@ -1001,6 +1001,7 @@ export default { |
| 1001 | 1001 | ||
| 1002 | //查询申报数据 | 1002 | //查询申报数据 |
| 1003 | search(val) { | 1003 | search(val) { |
| 1004 | + this.visiblePopover.flag = false; | ||
| 1004 | this.loadings.sreachLoading = true; | 1005 | this.loadings.sreachLoading = true; |
| 1005 | this.selected = []; | 1006 | this.selected = []; |
| 1006 | if (val == 0) { | 1007 | if (val == 0) { |
| ... | @@ -1259,6 +1260,7 @@ export default { | ... | @@ -1259,6 +1260,7 @@ export default { |
| 1259 | this.$forceUpdate(); | 1260 | this.$forceUpdate(); |
| 1260 | }, | 1261 | }, |
| 1261 | popoverCloseNew(row, declareId, type) { | 1262 | popoverCloseNew(row, declareId, type) { |
| 1263 | + this.visiblePopover.flag = false; | ||
| 1262 | row[`${type}${declareId}`] = false; | 1264 | row[`${type}${declareId}`] = false; |
| 1263 | this.$forceUpdate(); | 1265 | this.$forceUpdate(); |
| 1264 | }, | 1266 | }, |
| ... | @@ -1390,8 +1392,8 @@ export default { | ... | @@ -1390,8 +1392,8 @@ export default { |
| 1390 | item.popoverData = []; | 1392 | item.popoverData = []; |
| 1391 | }); | 1393 | }); |
| 1392 | this.selectedLogRow.allLogDataReceiptStatusPopoverType = false; | 1394 | this.selectedLogRow.allLogDataReceiptStatusPopoverType = false; |
| 1393 | - this.$refs.entryTable.$refs.tables.$refs.bodyWrapper.style.overflowY = | 1395 | + // this.$refs.tableRef.$refs.tables.$refs.bodyWrapper.style.overflowY = |
| 1394 | - "auto"; | 1396 | + // "auto"; |
| 1395 | }, | 1397 | }, |
| 1396 | tableSelect(val) { | 1398 | tableSelect(val) { |
| 1397 | console.log(val.records); | 1399 | console.log(val.records); |
| ... | @@ -1404,10 +1406,12 @@ export default { | ... | @@ -1404,10 +1406,12 @@ export default { |
| 1404 | //分页 | 1406 | //分页 |
| 1405 | currentChange(val) { | 1407 | currentChange(val) { |
| 1406 | console.log(val); | 1408 | console.log(val); |
| 1409 | + this.visiblePopover.flag = false; | ||
| 1407 | this.page.pageIndex = val; | 1410 | this.page.pageIndex = val; |
| 1408 | this.search(1); | 1411 | this.search(1); |
| 1409 | }, | 1412 | }, |
| 1410 | sizeChange(val) { | 1413 | sizeChange(val) { |
| 1414 | + this.visiblePopover.flag = false; | ||
| 1411 | this.page.pageSize = val; | 1415 | this.page.pageSize = val; |
| 1412 | this.search(1); | 1416 | this.search(1); |
| 1413 | }, | 1417 | }, | ... | ... |
| 1 | -'use strict' | 1 | +"use strict"; |
| 2 | -const path = require('path') | 2 | +const path = require("path"); |
| 3 | -const defaultSettings = require('./src/settings.js') | 3 | +const defaultSettings = require("./src/settings.js"); |
| 4 | 4 | ||
| 5 | function resolve(dir) { | 5 | function resolve(dir) { |
| 6 | - return path.join(__dirname, dir) | 6 | + return path.join(__dirname, dir); |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | -const name = defaultSettings.title || '跨境电商在线申报' // 标题 | 9 | +const name = defaultSettings.title || "跨境电商在线申报"; // 标题 |
| 10 | 10 | ||
| 11 | -const port = process.env.port || process.env.npm_config_port || 8080 // 端口 | 11 | +const port = process.env.port || process.env.npm_config_port || 8080; // 端口 |
| 12 | -const timeStamp = new Date().getTime() | 12 | +const timeStamp = new Date().getTime(); |
| 13 | // vue.config.js 配置说明 | 13 | // vue.config.js 配置说明 |
| 14 | //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions | 14 | //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions |
| 15 | // 这里只列一部分,具体配置参考文档 | 15 | // 这里只列一部分,具体配置参考文档 |
| 16 | module.exports = { | 16 | module.exports = { |
| 17 | // 部署生产环境和开发环境下的URL。 | 17 | // 部署生产环境和开发环境下的URL。 |
| 18 | // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 | 18 | // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 |
| 19 | - publicPath: process.env.NODE_ENV === "production" ? process.env.VUE_APP_BASE_ROUTE : "/", | 19 | + publicPath: |
| 20 | + process.env.NODE_ENV === "production" | ||
| 21 | + ? process.env.VUE_APP_BASE_ROUTE | ||
| 22 | + : "/", | ||
| 20 | // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) | 23 | // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) |
| 21 | - outputDir: 'dist_' + process.env.ENV, | 24 | + outputDir: "dist_" + process.env.ENV, |
| 22 | // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) | 25 | // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) |
| 23 | - assetsDir: 'static', | 26 | + assetsDir: "static", |
| 24 | // 是否开启eslint保存检测,有效值:ture | false | 'error' | 27 | // 是否开启eslint保存检测,有效值:ture | false | 'error' |
| 25 | - lintOnSave: process.env.NODE_ENV === 'development', | 28 | + lintOnSave: process.env.NODE_ENV === "development", |
| 26 | // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 | 29 | // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 |
| 27 | productionSourceMap: false, | 30 | productionSourceMap: false, |
| 28 | // webpack-dev-server 相关配置 | 31 | // webpack-dev-server 相关配置 |
| 29 | devServer: { | 32 | devServer: { |
| 30 | - host: '0.0.0.0', | 33 | + host: "0.0.0.0", |
| 31 | port: port, | 34 | port: port, |
| 32 | open: true, | 35 | open: true, |
| 33 | proxy: { | 36 | proxy: { |
| 34 | // detail: https://cli.vuejs.org/config/#devserver-proxy | 37 | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| 38 | + // [process.env.VUE_APP_BASE_API]: { | ||
| 39 | + // target: `http://localhost:8080`, | ||
| 40 | + // changeOrigin: true, | ||
| 41 | + // pathRewrite: { | ||
| 42 | + // ['^' + process.env.VUE_APP_BASE_API]: '' | ||
| 43 | + // } | ||
| 44 | + // } | ||
| 35 | [process.env.VUE_APP_BASE_API]: { | 45 | [process.env.VUE_APP_BASE_API]: { |
| 36 | - target: `http://localhost:8080`, | 46 | + target: process.env.VUE_APP_BASE_URL, // 后端地址 |
| 37 | changeOrigin: true, | 47 | changeOrigin: true, |
| 38 | pathRewrite: { | 48 | pathRewrite: { |
| 39 | - ['^' + process.env.VUE_APP_BASE_API]: '' | 49 | + ["^" + process.env.VUE_APP_BASE_API]: "", |
| 40 | - } | ||
| 41 | - } | ||
| 42 | }, | 50 | }, |
| 43 | - disableHostCheck: true | 51 | + }, |
| 52 | + }, | ||
| 53 | + disableHostCheck: true, | ||
| 44 | }, | 54 | }, |
| 45 | configureWebpack: { | 55 | configureWebpack: { |
| 46 | - output: { // 输出重构 打包编译后的js文件名称,添加时间戳. | 56 | + output: { |
| 57 | + // 输出重构 打包编译后的js文件名称,添加时间戳. | ||
| 47 | filename: `static/js/js[name].${timeStamp}.js`, | 58 | filename: `static/js/js[name].${timeStamp}.js`, |
| 48 | - chunkFilename: `static/js/chunk.[id].${timeStamp}.js` | 59 | + chunkFilename: `static/js/chunk.[id].${timeStamp}.js`, |
| 49 | }, | 60 | }, |
| 50 | // 关闭 webpack 的性能提示 | 61 | // 关闭 webpack 的性能提示 |
| 51 | performance: { | 62 | performance: { |
| 52 | - hints: false | 63 | + hints: false, |
| 53 | }, | 64 | }, |
| 54 | name: name, | 65 | name: name, |
| 55 | resolve: { | 66 | resolve: { |
| 56 | alias: { | 67 | alias: { |
| 57 | - '@': resolve('src') | 68 | + "@": resolve("src"), |
| 58 | - } | 69 | + }, |
| 59 | - } | 70 | + }, |
| 60 | }, | 71 | }, |
| 61 | css: { | 72 | css: { |
| 62 | - extract: { // 打包后css文件名称添加时间戳 | 73 | + extract: { |
| 74 | + // 打包后css文件名称添加时间戳 | ||
| 63 | filename: `static/css/[name].${timeStamp}.css`, | 75 | filename: `static/css/[name].${timeStamp}.css`, |
| 64 | - chunkFilename: `static/css/chunk.[id].${timeStamp}.css` | 76 | + chunkFilename: `static/css/chunk.[id].${timeStamp}.css`, |
| 65 | - } | 77 | + }, |
| 66 | }, | 78 | }, |
| 67 | chainWebpack(config) { | 79 | chainWebpack(config) { |
| 68 | - config.plugins.delete('preload') // TODO: need test | 80 | + config.plugins.delete("preload"); // TODO: need test |
| 69 | - config.plugins.delete('prefetch') // TODO: need test | 81 | + config.plugins.delete("prefetch"); // TODO: need test |
| 70 | 82 | ||
| 71 | // set svg-sprite-loader | 83 | // set svg-sprite-loader |
| 84 | + config.module.rule("svg").exclude.add(resolve("src/assets/icons")).end(); | ||
| 72 | config.module | 85 | config.module |
| 73 | - .rule('svg') | 86 | + .rule("icons") |
| 74 | - .exclude.add(resolve('src/assets/icons')) | ||
| 75 | - .end() | ||
| 76 | - config.module | ||
| 77 | - .rule('icons') | ||
| 78 | .test(/\.svg$/) | 87 | .test(/\.svg$/) |
| 79 | - .include.add(resolve('src/assets/icons')) | 88 | + .include.add(resolve("src/assets/icons")) |
| 80 | .end() | 89 | .end() |
| 81 | - .use('svg-sprite-loader') | 90 | + .use("svg-sprite-loader") |
| 82 | - .loader('svg-sprite-loader') | 91 | + .loader("svg-sprite-loader") |
| 83 | .options({ | 92 | .options({ |
| 84 | - symbolId: 'icon-[name]' | 93 | + symbolId: "icon-[name]", |
| 85 | }) | 94 | }) |
| 86 | - .end() | 95 | + .end(); |
| 87 | 96 | ||
| 97 | + config.when(process.env.NODE_ENV !== "development", (config) => { | ||
| 88 | config | 98 | config |
| 89 | - .when(process.env.NODE_ENV !== 'development', | 99 | + .plugin("ScriptExtHtmlWebpackPlugin") |
| 90 | - config => { | 100 | + .after("html") |
| 91 | - config | 101 | + .use("script-ext-html-webpack-plugin", [ |
| 92 | - .plugin('ScriptExtHtmlWebpackPlugin') | 102 | + { |
| 93 | - .after('html') | ||
| 94 | - .use('script-ext-html-webpack-plugin', [{ | ||
| 95 | // `runtime` must same as runtimeChunk name. default is `runtime` | 103 | // `runtime` must same as runtimeChunk name. default is `runtime` |
| 96 | - inline: /runtime\..*\.js$/ | 104 | + inline: /runtime\..*\.js$/, |
| 97 | - }]) | 105 | + }, |
| 98 | - .end() | 106 | + ]) |
| 99 | - config | 107 | + .end(); |
| 100 | - .optimization.splitChunks({ | 108 | + config.optimization.splitChunks({ |
| 101 | - chunks: 'all', | 109 | + chunks: "all", |
| 102 | cacheGroups: { | 110 | cacheGroups: { |
| 103 | libs: { | 111 | libs: { |
| 104 | - name: 'chunk-libs', | 112 | + name: "chunk-libs", |
| 105 | test: /[\\/]node_modules[\\/]/, | 113 | test: /[\\/]node_modules[\\/]/, |
| 106 | priority: 10, | 114 | priority: 10, |
| 107 | - chunks: 'initial' // only package third parties that are initially dependent | 115 | + chunks: "initial", // only package third parties that are initially dependent |
| 108 | }, | 116 | }, |
| 109 | elementUI: { | 117 | elementUI: { |
| 110 | - name: 'chunk-elementUI', // split elementUI into a single package | 118 | + name: "chunk-elementUI", // split elementUI into a single package |
| 111 | priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app | 119 | priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app |
| 112 | - test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm | 120 | + test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm |
| 113 | }, | 121 | }, |
| 114 | commons: { | 122 | commons: { |
| 115 | - name: 'chunk-commons', | 123 | + name: "chunk-commons", |
| 116 | - test: resolve('src/components'), // can customize your rules | 124 | + test: resolve("src/components"), // can customize your rules |
| 117 | minChunks: 3, // minimum common number | 125 | minChunks: 3, // minimum common number |
| 118 | priority: 5, | 126 | priority: 5, |
| 119 | - reuseExistingChunk: true | 127 | + reuseExistingChunk: true, |
| 120 | - } | 128 | + }, |
| 121 | - } | 129 | + }, |
| 122 | - }) | 130 | + }); |
| 123 | - config.optimization.runtimeChunk('single'), | 131 | + config.optimization.runtimeChunk("single"), |
| 124 | { | 132 | { |
| 125 | - from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件 | 133 | + from: path.resolve(__dirname, "./public/robots.txt"), //防爬虫文件 |
| 126 | - to: './', //到根目录下 | 134 | + to: "./", //到根目录下 |
| 127 | - } | 135 | + }; |
| 128 | - } | 136 | + }); |
| 129 | - ) | 137 | + }, |
| 130 | - } | 138 | +}; |
| 131 | -} | ... | ... |
-
Please register or login to post a comment