Quellcode durchsuchen

业务信息为空导致下载问题修改

zishan-an vor 11 Monaten
Ursprung
Commit
6c7c811fcf
3 geänderte Dateien mit 12 neuen und 4 gelöschten Zeilen
  1. 1 1
      package.json
  2. 5 2
      src/views/system/business.vue
  3. 6 1
      src/views/system/businessInfo.vue

+ 1 - 1
package.json

@@ -4,7 +4,7 @@
   "private": true,
   "scripts": {
     
-    "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
+    "serve": "vue-cli-service serve",
     "build": "vue-cli-service build"
   },
   "dependencies": {

+ 5 - 2
src/views/system/business.vue

@@ -165,7 +165,7 @@ export default {
             var j = parseInt(res.data.business_list.total)
             this.totalSize = j
             this.showSize = this.totalSize
-  
+
           }
       )
   },
@@ -216,6 +216,7 @@ export default {
               {
                 this.businessData=res.data.business_list.list;
                 this.businessShowData = this.businessData
+
               }
           )
         }
@@ -284,7 +285,9 @@ export default {
             var j = parseInt(res.data.business_list.total)
             this.totalSize = j
             this.showSize = this.totalSize
-  
+            console.log("阿斯蒂芬贵哦")
+
+            console.log(this.businessShowData)
           }
       )
       },

+ 6 - 1
src/views/system/businessInfo.vue

@@ -331,7 +331,8 @@
       findCustomInfoByHead(this.headInfId).then(
               res=>
               {
-                this.customInfoData=res.data.custom_info;
+                if(res.data.custom_info){
+                this.customInfoData=res.data.custom_info;}
               }
           )
       reportFileList(this.businessNum).then(
@@ -494,6 +495,10 @@
   
       // 文件下载
       fileDown: function (){
+        if (this.downSelected2.length+this.downSelected.length==0) {
+          this.$alert("请选择下载文件");
+          return;
+        }
         for (let i = 0; i < this.downSelected2.length; i++) {
           const modname = this.downSelected2[i]; // 要下载的文件名
           request.get(`/report/downloadMod/${modname}`).then(res => {