From c7f9bd08d96ddd5af1b518783f682601d659628d Mon Sep 17 00:00:00 2001 From: MO <448233645@qq.com> Date: Tue, 10 Oct 2023 15:55:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E5=B1=80=E9=85=8D=E7=BD=AE=E5=9C=A8?= =?UTF-8?q?=E7=BA=BF=E9=A2=84=E8=A7=88=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.local | 7 +- .env.prod | 3 + src/views/accounting/attachment/index.vue | 8 +- src/views/accounting/book/index.vue | 16 +- src/views/accounting/invoices/index.vue | 6 +- src/views/accounting/other/index.vue | 6 +- src/views/ea/electronicContracts/index.vue | 597 ++++++++++++++------- 7 files changed, 433 insertions(+), 210 deletions(-) diff --git a/.env.local b/.env.local index 3e21c0ed..44c09a2f 100644 --- a/.env.local +++ b/.env.local @@ -5,8 +5,8 @@ ENV = 'development' VUE_APP_TITLE = 链友融财务数字一体化信息系统 # 芋道管理系统/本地环境 -# VUE_APP_BASE_API = '/proxy-api' -VUE_APP_BASE_API = 'http://127.0.0.1:48080' +VUE_APP_BASE_API = '/proxy-api' +# VUE_APP_BASE_API = 'http://127.0.0.1:48080' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true @@ -22,3 +22,6 @@ VUE_APP_DOC_ENABLE = true # 百度统计 VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab + +#线上预览 +VUE_APP_ONLINE_API = 'http://139.224.253.31:48012' diff --git a/.env.prod b/.env.prod index 4d5d31e8..68059cd2 100644 --- a/.env.prod +++ b/.env.prod @@ -23,3 +23,6 @@ VUE_APP_DOC_ENABLE = false # 百度统计 VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab + +#线上预览 +VUE_APP_ONLINE_API = 'http://139.224.253.31:48012' diff --git a/src/views/accounting/attachment/index.vue b/src/views/accounting/attachment/index.vue index 8acf8d42..c21ac4c6 100644 --- a/src/views/accounting/attachment/index.vue +++ b/src/views/accounting/attachment/index.vue @@ -310,9 +310,11 @@ export default { * @param fileUrl */ openLink(fileUrl) { - const url = `http://139.224.253.31:48012/onlinePreview?url=${encodeURIComponent( - this.base64Encode(fileUrl) - )}`; + console.log(process.env.VUE_APP_ONLINE_API); + // const url = `http://139.224.253.31:48012/onlinePreview?url=${encodeURIComponent(this.base64Encode(fileUrl))}`; + const url = + process.env.VUE_APP_ONLINE_API + + `/onlinePreview?url=${encodeURIComponent(this.base64Encode(fileUrl))}`; window.open(url); }, /** 取消按钮 */ diff --git a/src/views/accounting/book/index.vue b/src/views/accounting/book/index.vue index f3b0d706..14ee386d 100644 --- a/src/views/accounting/book/index.vue +++ b/src/views/accounting/book/index.vue @@ -79,11 +79,11 @@ - + @@ -359,12 +359,12 @@ export default { // * 文件预览 // * @param fileUrl // */ - // openLink(fileUrl) { - // const url = `http://139.224.253.31:48012/onlinePreview?url=${encodeURIComponent( - // this.base64Encode(fileUrl) - // )}`; - // window.open(url); - // }, + openLink(fileUrl) { + const url = + process.env.VUE_APP_ONLINE_API + + `/onlinePreview?url=${encodeURIComponent(this.base64Encode(fileUrl))}`; + window.open(url); + }, /** 查询列表 */ getList() { this.loading = true; diff --git a/src/views/accounting/invoices/index.vue b/src/views/accounting/invoices/index.vue index 51f8222e..2f7545f1 100644 --- a/src/views/accounting/invoices/index.vue +++ b/src/views/accounting/invoices/index.vue @@ -918,9 +918,9 @@ export default { * @param fileUrl */ openLink(fileUrl) { - const url = `http://139.224.253.31:48012/onlinePreview?url=${encodeURIComponent( - this.base64Encode(fileUrl) - )}`; + const url = + process.env.VUE_APP_ONLINE_API + + `/onlinePreview?url=${encodeURIComponent(this.base64Encode(fileUrl))}`; window.open(url); }, handleClick(tab) { diff --git a/src/views/accounting/other/index.vue b/src/views/accounting/other/index.vue index 2664ef6a..6519d207 100644 --- a/src/views/accounting/other/index.vue +++ b/src/views/accounting/other/index.vue @@ -340,9 +340,9 @@ export default { * @param fileUrl 地址 */ openLink(fileUrl) { - const url = `http://139.224.253.31:48012/onlinePreview?url=${encodeURIComponent( - this.base64Encode(fileUrl) - )}`; + const url = + process.env.VUE_APP_ONLINE_API + + `/onlinePreview?url=${encodeURIComponent(this.base64Encode(fileUrl))}`; window.open(url); }, /** 查询列表 */ diff --git a/src/views/ea/electronicContracts/index.vue b/src/views/ea/electronicContracts/index.vue index fa104aa6..c4ebb880 100644 --- a/src/views/ea/electronicContracts/index.vue +++ b/src/views/ea/electronicContracts/index.vue @@ -1,67 +1,121 @@