From 16040a9dd6f69ce11a459b65ec2e7823eacd9029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Mon, 8 May 2023 17:39:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=96=B9=E6=B3=95=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=8D=E8=AF=BBconfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/basic/corpMaintain/corpExport.vue | 486 +++++++++--------- src/views/basic/corpMaintain/corpImport.vue | 9 +- src/views/basic/product/udiInfoImport.vue | 8 +- src/views/basic/product/udiinfoExport.vue | 462 +++++++++-------- src/views/thirdSys/busType/index.vue | 6 +- src/views/thirdSys/corps/thrCorpsExport.vue | 5 +- .../thirdSys/corps/thrCorpsExportSmp.vue | 5 +- src/views/thirdSys/corps/thrCorpsImport.vue | 6 +- .../invProducts/thrInvProductsExport.vue | 8 +- .../invProducts/thrInvProductsImport.vue | 8 +- src/views/thirdSys/order/thrOrderExport.vue | 5 +- src/views/thirdSys/order/thrOrderImport.vue | 11 +- .../thirdSys/product/thrProductsExport.vue | 6 +- .../thirdSys/product/thrProductsImport.vue | 9 +- 14 files changed, 498 insertions(+), 536 deletions(-) diff --git a/src/views/basic/corpMaintain/corpExport.vue b/src/views/basic/corpMaintain/corpExport.vue index 8dcd4047..2da0c8c9 100644 --- a/src/views/basic/corpMaintain/corpExport.vue +++ b/src/views/basic/corpMaintain/corpExport.vue @@ -1,265 +1,263 @@ diff --git a/src/views/basic/corpMaintain/corpImport.vue b/src/views/basic/corpMaintain/corpImport.vue index 8db5c6e0..2925f72e 100644 --- a/src/views/basic/corpMaintain/corpImport.vue +++ b/src/views/basic/corpMaintain/corpImport.vue @@ -94,6 +94,7 @@ import corpImportDetail from "./corpImportDetail"; export default { data() { return { + BASE_URL: process.env.VUE_APP_BASE_API, showSearch: true, filterQuery: { genKey: null, @@ -212,15 +213,9 @@ export default { this.loading = false; this.list = []; }); - axios.get("./config.json").then(res => { - // 基础地址 - let response = res.data.BASE_URL; + let response = this.BASE_URL; this.uploadFileUrl = response + "/udiwms/corps/importLog/upload"; - }); - axios.get("./config.json").then(res => { - let response = res.data.SERVER_IP; this.templateDlUrl = response + "/已对照往来单位模板.xlsx"; - }); }, jumpDl() { window.open(this.templateDlUrl, '_blank'); diff --git a/src/views/basic/product/udiInfoImport.vue b/src/views/basic/product/udiInfoImport.vue index 313610fd..e29efe3b 100644 --- a/src/views/basic/product/udiInfoImport.vue +++ b/src/views/basic/product/udiInfoImport.vue @@ -86,6 +86,7 @@ export default { data() { return { + BASE_URL: process.env.VUE_APP_BASE_API, showSearch: true, filterQuery: { genKey: null, @@ -212,14 +213,9 @@ this.loading = false; this.list = []; }); - axios.get("./config.json").then(res => { - let response = res.data.BASE_URL; + let response = this.BASE_URL; this.uploadFileUrl = response + "/udiwms/products/importLog/upload"; - }); - axios.get("./config.json").then(res => { - let response = res.data.SERVER_IP; this.templateDlUrl = response + "/已对照产品信息模板.xlsx"; - }); }, jumpDl() { window.open(this.templateDlUrl, '_blank'); diff --git a/src/views/basic/product/udiinfoExport.vue b/src/views/basic/product/udiinfoExport.vue index d36f5659..d29f6984 100644 --- a/src/views/basic/product/udiinfoExport.vue +++ b/src/views/basic/product/udiinfoExport.vue @@ -1,68 +1,69 @@ diff --git a/src/views/thirdSys/busType/index.vue b/src/views/thirdSys/busType/index.vue index a0e22496..6e8362ae 100644 --- a/src/views/thirdSys/busType/index.vue +++ b/src/views/thirdSys/busType/index.vue @@ -136,6 +136,7 @@ import {isBlank} from "@/utils/strUtil"; export default { data() { return { + BASE_URL: process.env.VUE_APP_BASE_API, filterQuery: { thirdSys: null, key: "", @@ -408,11 +409,8 @@ export default { }, init() { - axios.get("./config.json").then(res => { - // 基础地址 - let response = res.data.BASE_URL; + let response = this.BASE_URL; this.uploadFileUrl = response + "udiwms/busstiness/file/upload"; - }); }, handleChange(response, files, fileList) { if (response.code != 20000) { diff --git a/src/views/thirdSys/corps/thrCorpsExport.vue b/src/views/thirdSys/corps/thrCorpsExport.vue index 6c3928f1..25fdfeed 100644 --- a/src/views/thirdSys/corps/thrCorpsExport.vue +++ b/src/views/thirdSys/corps/thrCorpsExport.vue @@ -71,6 +71,7 @@ import {formatDate} from "@/utils/date"; export default { data() { return { + BASE_URL: process.env.VUE_APP_BASE_API, showSearch: true, filterQuery: { genKey: null, @@ -154,8 +155,7 @@ export default { this.thrCorpSelectVisible = true; }, downloadExcel(row) { - axios.get("./config.json").then(res => { - let baseUrl = res.data.BASE_URL; + let baseUrl = this.BASE_URL let href = baseUrl + "/udiwms/thrCorp/exportLog/download" + "?genKey=" + row.genKey; let a = document.createElement("a"); @@ -170,7 +170,6 @@ export default { a.click(); this.getList(); }); - }); }, cancelDialog(val) { diff --git a/src/views/thirdSys/corps/thrCorpsExportSmp.vue b/src/views/thirdSys/corps/thrCorpsExportSmp.vue index dc68186b..aa9fc76d 100644 --- a/src/views/thirdSys/corps/thrCorpsExportSmp.vue +++ b/src/views/thirdSys/corps/thrCorpsExportSmp.vue @@ -68,6 +68,7 @@ import axios from "axios"; export default { data() { return { + BASE_URL: process.env.VUE_APP_BASE_API, showSearch: true, filterQuery: { genKey: null, @@ -153,8 +154,7 @@ export default { this.thrCorpSelectVisible = true; }, downloadExcel(row) { - axios.get("./config.json").then(res => { - let baseUrl = res.data.BASE_URL; + let baseUrl = this.BASE_URL let href = baseUrl + "/udiwms/thrCorp/exportLog/download" + "?genKey=" + row.genKey; let a = document.createElement("a"); @@ -171,7 +171,6 @@ export default { a.click(); this.getList(); }); - }); }, cancelDialog(val) { diff --git a/src/views/thirdSys/corps/thrCorpsImport.vue b/src/views/thirdSys/corps/thrCorpsImport.vue index 9e220ff4..3cc93a99 100644 --- a/src/views/thirdSys/corps/thrCorpsImport.vue +++ b/src/views/thirdSys/corps/thrCorpsImport.vue @@ -126,6 +126,7 @@ import axios from "axios"; export default { data() { return { + BASE_URL: process.env.VUE_APP_BASE_API, showSearch: true, filterQuery: { genKey: null, @@ -334,11 +335,8 @@ export default { this.list = []; }); this.uploadData.thirdSys = this.filterQuery.thirdSysFk; - axios.get("./config.json").then(res => { - let response = res.data.SERVER_IP; + let response = this.BASE_URL; this.templateDlUrl = response + "/第三方往来单位信息导入模板.xlsx"; - }); - } , downloadDatas() { diff --git a/src/views/thirdSys/invProducts/thrInvProductsExport.vue b/src/views/thirdSys/invProducts/thrInvProductsExport.vue index e3bb9e80..f3f438cd 100644 --- a/src/views/thirdSys/invProducts/thrInvProductsExport.vue +++ b/src/views/thirdSys/invProducts/thrInvProductsExport.vue @@ -108,6 +108,7 @@ import axios from "axios"; export default { data() { return { + BASE_URL: process.env.VUE_APP_BASE_API, showSearch: true, filterQuery: { genKey: null, @@ -191,8 +192,7 @@ export default { this.thrInvProductsSelectVisible = true; }, downloadExcel(row) { - axios.get("./config.json").then(res => { - let baseUrl = res.data.BASE_URL; + let baseUrl = this.BASE_URL let href = baseUrl + "/udiwms/invProducts/exportLog/download" + "?genKey=" + row.genKey; let a = document.createElement("a"); fetch(href) @@ -208,10 +208,6 @@ export default { a.click(); this.getList(); }); - - }); - - }, cancelDialog(val) { diff --git a/src/views/thirdSys/invProducts/thrInvProductsImport.vue b/src/views/thirdSys/invProducts/thrInvProductsImport.vue index 5cd3e497..22c389e0 100644 --- a/src/views/thirdSys/invProducts/thrInvProductsImport.vue +++ b/src/views/thirdSys/invProducts/thrInvProductsImport.vue @@ -176,6 +176,7 @@ import axios from "axios"; export default { data() { return { + BASE_URL: process.env.VUE_APP_BASE_API, showSearch: true, filterQuery: { genKey: null, @@ -327,12 +328,9 @@ export default { this.loading = false; this.list = []; }); - axios.get("./config.json").then(res => { - let response = res.data.SERVER_IP; - this.templateDlUrl = response + "/第三方库存产品信息导入模板.xlsx"; - console.log(this.templateDlUrl); - }); + let response = this.BASE_URL; + this.templateDlUrl = response + "/第三方库存产品信息导入模板.xlsx"; }, jumpDl() { diff --git a/src/views/thirdSys/order/thrOrderExport.vue b/src/views/thirdSys/order/thrOrderExport.vue index 8cf505fa..bf712d10 100644 --- a/src/views/thirdSys/order/thrOrderExport.vue +++ b/src/views/thirdSys/order/thrOrderExport.vue @@ -75,6 +75,7 @@ import {formatDate} from "@/utils/date"; export default { data() { return { + BASE_URL: process.env.VUE_APP_BASE_API, showSearch: true, filterQuery: { type: 1, @@ -158,8 +159,7 @@ export default { this.thrOrderSelectVisible = true; }, downloadExcel(row) { - axios.get("./config.json").then(res => { - let baseUrl = res.data.BASE_URL; + let baseUrl = this.BASE_URL let href = baseUrl + "/udiwms/thrOrder/exportLog/download" + "?genKey=" + row.genKey; let a = document.createElement("a"); var timestamp = formatDate(new Date(), "yyyyMMddhhmmss") @@ -173,7 +173,6 @@ export default { a.click(); this.getList(); }); - }); }, cancelDialog(val) { diff --git a/src/views/thirdSys/order/thrOrderImport.vue b/src/views/thirdSys/order/thrOrderImport.vue index 98ad6f67..e9dc1de7 100644 --- a/src/views/thirdSys/order/thrOrderImport.vue +++ b/src/views/thirdSys/order/thrOrderImport.vue @@ -129,6 +129,7 @@ import {selectIp} from "@/api/param/systemParamConfig"; export default { data() { return { + BASE_URL: process.env.VUE_APP_BASE_API, showSearch: true, filterQuery: { genKey: null, @@ -278,14 +279,8 @@ export default { this.loading = false; this.list = []; }); - axios.get("./config.json").then(res => { - // 基础地址 - let response = res.data.BASE_URL; - // this.uploadFileUrl = response + "/udiwms/thrOrder/importLog/upload"; - let response2 = res.data.SERVER_IP; - this.templateDlUrl = response2 + "/第三方业务单据导入模板.xlsx"; - console.log(res.data.BASE_URL + "\n"); - }); + let response = this.BASE_URL; + this.templateDlUrl = response + "/第三方业务单据导入模板.xlsx"; }, selectSysParam() { diff --git a/src/views/thirdSys/product/thrProductsExport.vue b/src/views/thirdSys/product/thrProductsExport.vue index 5b64bd58..8b11fc1f 100644 --- a/src/views/thirdSys/product/thrProductsExport.vue +++ b/src/views/thirdSys/product/thrProductsExport.vue @@ -78,6 +78,7 @@ import {formatDate} from "../../../utils/date"; export default { data() { return { + BASE_URL: process.env.VUE_APP_BASE_API, showSearch: true, filterQuery: { genKey: null, @@ -158,8 +159,7 @@ export default { this.thrProductsSelectVisible = true; }, downloadExcel(row) { - axios.get("./config.json").then(res => { - let baseUrl = res.data.BASE_URL; + let baseUrl = this.BASE_URL let href = baseUrl + "/udiwms/thrProducts/exportLog/download" + "?genKey=" + row.genKey; let a = document.createElement("a"); var timestamp = formatDate(new Date(), "yyyyMMddhhmmss") @@ -173,8 +173,6 @@ export default { a.click(); this.getList(); }); - }); - }, cancelDialog(val) { diff --git a/src/views/thirdSys/product/thrProductsImport.vue b/src/views/thirdSys/product/thrProductsImport.vue index d13a980b..4f324c16 100644 --- a/src/views/thirdSys/product/thrProductsImport.vue +++ b/src/views/thirdSys/product/thrProductsImport.vue @@ -135,6 +135,7 @@ import axios from "axios"; export default { data() { return { + BASE_URL: process.env.VUE_APP_BASE_API, showSearch: true, filterQuery: { genKey: null, @@ -296,13 +297,9 @@ export default { this.loading = false; this.list = []; }); - axios.get("./config.json").then(res => { - let response = res.data.SERVER_IP; - this.templateDlUrl = response + "/第三方产品信息导入模板.xls"; - console.log(this.templateDlUrl); - - }); + let response = this.BASE_URL; + this.templateDlUrl = response + "/第三方产品信息导入模板.xls"; }, selectSysParam() { let query = {