From 8ef40fb1f6a9e184884c2f4692d0ef6451b6bead Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 03 七月 2026 11:32:59 +0800
Subject: [PATCH] 原材料下单:报告下载添加审批状态校验,避免跳转页面报错问题&配置修改

---
 .env.staging                                                                |    8 +++++++-
 .env.development                                                            |    7 +++++--
 .gitignore                                                                  |    1 +
 vue.config.js                                                               |    4 ++--
 src/main.js                                                                 |    3 ++-
 src/views/business/materialOrderComponents/materialOrder/downFileDialog.vue |    8 ++++++++
 .env.production                                                             |    5 ++++-
 7 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/.env.development b/.env.development
index 77fc3a8..cac0595 100644
--- a/.env.development
+++ b/.env.development
@@ -1,11 +1,14 @@
 # 椤甸潰鏍囬
-VUE_APP_TITLE = LIMS瀹為獙瀹ょ鐞嗙郴缁�
+VUE_APP_TITLE = 涓ぉ瑁呭LIMS
 
 # 寮�鍙戠幆澧冮厤缃�
 ENV = 'development'
 
 # LIMS瀹為獙瀹ょ鐞嗙郴缁�/寮�鍙戠幆澧�
-VUE_APP_BASE_API = ''
+VUE_APP_BASE_API = '/dev-api'
+
+# 鏈湴鐜ip+绔彛
+VUE_APP_BASE_URL = 'http://127.0.0.1:8001/lims'
 
 # 璺敱鎳掑姞杞�
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
diff --git a/.env.production b/.env.production
index 23d226f..393c337 100644
--- a/.env.production
+++ b/.env.production
@@ -1,8 +1,11 @@
 # 椤甸潰鏍囬
-VUE_APP_TITLE = LIMS瀹為獙瀹ょ鐞嗙郴缁�
+VUE_APP_TITLE = 涓ぉ瑁呭LIMS
 
 # 鐢熶骇鐜閰嶇疆
 ENV = 'production'
 
 # LIMS瀹為獙瀹ょ鐞嗙郴缁�/鐢熶骇鐜
 VUE_APP_BASE_API = '/prod-api'
+
+# 鐢熶骇鐜ip+绔彛
+VUE_APP_BASE_URL = 'http://192.168.21.53:8001/lims'
diff --git a/.env.staging b/.env.staging
index 020f0c7..cf1b4c7 100644
--- a/.env.staging
+++ b/.env.staging
@@ -1,5 +1,5 @@
 # 椤甸潰鏍囬
-VUE_APP_TITLE = LIMS瀹為獙瀹ょ鐞嗙郴缁�
+VUE_APP_TITLE = 涓ぉ瑁呭LIMS
 
 BABEL_ENV = staging
 
@@ -10,3 +10,9 @@
 
 # LIMS瀹為獙瀹ょ鐞嗙郴缁�/娴嬭瘯鐜
 VUE_APP_BASE_API = '/stage-api'
+
+# 娴嬭瘯鐜ip+绔彛
+VUE_APP_BASE_URL = http://127.0.0.1:8001/lims
+
+# 杩愯绔彛
+PORT= '80'
diff --git a/.gitignore b/.gitignore
index 78a752d..2529fec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,4 @@
 
 package-lock.json
 yarn.lock
+.nvmdrc
diff --git a/src/main.js b/src/main.js
index 78d6bf8..ed0d00e 100644
--- a/src/main.js
+++ b/src/main.js
@@ -65,7 +65,8 @@
 Vue.prototype.HaveJson = (val) => {
   return JSON.parse(JSON.stringify(val));
 };
-Vue.prototype.javaApi = process.env.NODE_ENV === "production"?"http://192.168.21.53:8001/lims":"http://127.0.0.1:8001";
+// Vue.prototype.javaApi = process.env.NODE_ENV === "production"?"http://192.168.21.53:8001/lims":"http://127.0.0.1:8001/lims";
+Vue.prototype.javaApi = process.env.VUE_APP_BASE_URL && process.env.NODE_ENV==='production'?process.env.VUE_APP_BASE_URL : "http://127.0.0.1:8001/lims";
 Vue.prototype.checkPermi = checkPermi;
 Vue.prototype.uploadHeader = {
   Authorization: "Bearer " + getToken(),
diff --git a/src/views/business/materialOrderComponents/materialOrder/downFileDialog.vue b/src/views/business/materialOrderComponents/materialOrder/downFileDialog.vue
index 63b475c..c2cfb6a 100644
--- a/src/views/business/materialOrderComponents/materialOrder/downFileDialog.vue
+++ b/src/views/business/materialOrderComponents/materialOrder/downFileDialog.vue
@@ -44,6 +44,10 @@
   methods: {
     // 杩涘巶妫�楠屾姤鍛婁笅杞�
     downLoad0 () {
+      if(this.downLoadInfo.enterRatifyStatus !== 1){
+        this.$message.error("鎶ュ憡鏈鎵规垨瀹℃壒鏈�氳繃锛屾棤娉曚笅杞�")
+        return
+      }
       let url = this.downLoadInfo.enterUrlS ? this.downLoadInfo.enterUrlS : this.downLoadInfo.enterUrl
       if(url){
         url = url.split('.')[0]+'.pdf'
@@ -56,6 +60,10 @@
     },
     // 瀛e害妫�楠屾姤鍛婁笅杞�
     downLoad1 () {
+      if(this.downLoadInfo.quarterRatifyStatus !== 1){
+        this.$message.error("鎶ュ憡鏈鎵规垨瀹℃壒鏈�氳繃锛屾棤娉曚笅杞�")
+        return
+      }
       let url = this.downLoadInfo.quarterUrlS ? this.downLoadInfo.quarterUrlS : this.downLoadInfo.quarterUrl
       if(url){
         url = url.split('.')[0]+'.pdf'
diff --git a/vue.config.js b/vue.config.js
index 6a49ef2..b465775 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -7,7 +7,7 @@
 
 const CompressionPlugin = require("compression-webpack-plugin");
 
-const name = process.env.VUE_APP_TITLE || "鑻ヤ緷绠$悊绯荤粺"; // 缃戦〉鏍囬
+const name = process.env.VUE_APP_TITLE || "LIMS瀹為獙瀹ょ鐞嗙郴缁�"; // 缃戦〉鏍囬
 
 const port = process.env.port || process.env.npm_config_port || 80; // 绔彛
 
@@ -36,7 +36,7 @@
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://localhost:8001`,
+        target: `http://127.0.0.1:8001/lims`,
         changeOrigin: true,
         pathRewrite: {
           ["^" + process.env.VUE_APP_BASE_API]: "",

--
Gitblit v1.9.3