From 4bd9ecdb092c88d050e58d5a150b62e5e90b65b0 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 14 三月 2025 16:10:14 +0800
Subject: [PATCH] 删除无用代码

---
 src/views/CNAS/systemManagement/documentControl/components/FileList.vue |   51 +++++++++++++++++++++------------------------------
 1 files changed, 21 insertions(+), 30 deletions(-)

diff --git a/src/views/CNAS/systemManagement/documentControl/components/FileList.vue b/src/views/CNAS/systemManagement/documentControl/components/FileList.vue
index 4a77a2a..3720194 100644
--- a/src/views/CNAS/systemManagement/documentControl/components/FileList.vue
+++ b/src/views/CNAS/systemManagement/documentControl/components/FileList.vue
@@ -121,10 +121,18 @@
         {
           label: "绫诲埆", prop: "type", width: "120px", dataType: "tag",
           formatData: (params) => {
-            return this.fileType.find((m) => m.value == params).label;
+            if (this.fileType.find((m) => m.value == params)) {
+              return this.fileType.find((m) => m.value == params).label;
+            } else {
+              return null
+            }
           },
           formatType: (params) => {
-            return this.fileType.find((m) => m.value == params).type;
+            if (this.fileType.find((m) => m.value == params)) {
+              return this.fileType.find((m) => m.value == params).type;
+            } else {
+              return null
+            }
           },
         },
         {
@@ -137,10 +145,18 @@
         {
           label: "鏂囦欢鐘舵��", prop: "state", dataType: "tag",
           formatData: (params) => {
-            return this.fileState.find((m) => m.value == params).label;
+            if (this.fileState.find((m) => m.value == params)) {
+              return this.fileState.find((m) => m.value == params).label;
+            } else {
+              return null
+            }
           },
           formatType: (params) => {
-            return this.fileState.find((m) => m.value == params).type;
+            if (this.fileState.find((m) => m.value == params)) {
+              return this.fileState.find((m) => m.value == params).type;
+            } else {
+              return null
+            }
           },
         },
         {
@@ -252,37 +268,13 @@
     // 涓嬭浇鏂囦欢
     handleDown(row) {
       if (!row.url) return this.$message.warning('鏂囦欢鏈笂浼�')
-      this.$download.downloadFileFromUrl(row.url, row.url);
+      this.$download.saveAs(row.url, row.url);
     },
     // 鏌ョ湅鏂囦欢
     handleLook(row) {
       if (!row.url) return this.$message.warning('鏂囦欢鏈笂浼�')
       this.currentInfo = row
       this.lookDialogVisible = true
-    },
-    getPower() {
-      let power = JSON.parse(sessionStorage.getItem('power'))
-      let up = false
-      let upFile = false
-      let add = false
-      for (var i = 0; i < power.length; i++) {
-        if (power[i].menuMethod == 'doManageDocumentList') {
-          up = true
-        }
-        if (power[i].menuMethod == 'exportManageDocumentList') {
-          add = true
-        }
-        if (power[i].menuMethod == 'uploadFileManageDocumentList') {
-          upFile = true
-        }
-      }
-      if (!upFile) {
-        this.componentData.do.splice(1, 1)
-      }
-      if (!up) {
-        this.componentData.do.splice(0, 1)
-      }
-      this.addPower = add
     },
     // 涓婁紶鏂囦欢
     handleUp(row) {
@@ -360,7 +352,6 @@
       })
         .then(() => {
           delManageDocumentList({ id: row.id }).then((res) => {
-            if (res.code == 201) return;
             this.$message.success("鍒犻櫎鎴愬姛");
             this.refresh();
           });

--
Gitblit v1.9.3