From 28972c351ea79b4721750f6970e88263b64c64aa Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 13 三月 2025 16:03:36 +0800
Subject: [PATCH] 表格样式整体修改

---
 src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue |   70 +++--------------------------------
 1 files changed, 6 insertions(+), 64 deletions(-)

diff --git a/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue b/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue
index 0548ea4..647782b 100644
--- a/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue
+++ b/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue
@@ -18,7 +18,7 @@
       </div>
       <div class="btns" style="padding-left: 30px;">
         <el-button v-if="addPower" size="small" type="primary"
-          @click="addDialogVisible = true, addInfo = {}, radio = '鍙戞斁'">娣诲姞鍙戞斁璁板綍</el-button>
+          @click="addDialogVisible = true, addInfo = {}, radio = '鍙戞斁', file = null">娣诲姞鍙戞斁璁板綍</el-button>
         <el-button v-if="outPower" :loading="outLoading" size="small" type="primary" @click="handleOut">瀵煎嚭</el-button>
       </div>
     </div>
@@ -245,7 +245,7 @@
               clickFun: (row) => {
                 this.handleDelete(row);
               },
-              disabFun: (row, index) => {
+              disabled: (row, index) => {
                 return row.documentState == '閫氳繃'
               }
             },
@@ -255,7 +255,7 @@
               clickFun: (row) => {
                 this.handleLook(row);
               },
-              disabFun: (row, index) => {
+              disabled: (row, index) => {
                 return !row.url
               }
             },
@@ -265,7 +265,7 @@
               clickFun: (row) => {
                 this.handleCheck(row);
               },
-              disabFun: (row, index) => {
+              disabled: (row, index) => {
                 return row.receiveUser != this.userId || row.documentState == '閫氳繃'
               }
             },
@@ -288,38 +288,6 @@
     this.selectEnumByCategory()
   },
   methods: {
-    getPower() {
-      let power = JSON.parse(sessionStorage.getItem('power'))
-      let out = false
-      let del = false
-      let add = false
-      // let check = false
-      for (var i = 0; i < power.length; i++) {
-        if (power[i].menuMethod == 'exportManageDocumentIssueRecycle') {
-          out = true
-        }
-        if (power[i].menuMethod == 'addManageDocumentIssueRecycle') {
-          add = true
-        }
-        if (power[i].menuMethod == 'delManageDocumentIssueRecycle') {
-          del = true
-        }
-        // if (power[i].menuMethod == 'checkManageDocumentControlled') {
-        //   check = true
-        // }
-      }
-      // if (!check) {
-      //   this.componentData.do.splice(2, 1)
-      // }
-      if (!del) {
-        this.componentData.do.splice(1, 1)
-      }
-      if (!add) {
-        this.componentData.do.splice(0, 1)
-      }
-      this.addPower = add
-      this.outPower = out
-    },
     getList() {
       this.tableLoading = true;
       let param = { ...this.queryParams, ...this.page };
@@ -394,33 +362,7 @@
       exportManageDocumentIssueRecycle(this.queryParams).then(res => {
         this.outLoading = false
         const blob = new Blob([res], { type: 'application/octet-stream' });
-        // this.$download.saveAs(blob, '鍙戞斁鍥炴敹璁板綍.xlsx')
-        //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆
-        let reader = new FileReader();
-        reader.readAsText(blob, 'utf-8');
-        reader.onload = () => {
-          try {
-            let result = JSON.parse(reader.result);
-            if (result.message) {
-              this.$message.error(result.message);
-            } else {
-              const url = URL.createObjectURL(blob);
-              const link = document.createElement('a');
-              link.href = url;
-              link.download = '鍙戞斁鍥炴敹璁板綍.xlsx';
-              link.click();
-              this.$message.success('瀵煎嚭鎴愬姛')
-            }
-          } catch (err) {
-            console.log(err);
-            const url = URL.createObjectURL(blob);
-            const link = document.createElement('a');
-            link.href = url;
-            link.download = '鍙戞斁鍥炴敹璁板綍.xlsx';
-            link.click();
-            this.$message.success('瀵煎嚭鎴愬姛')
-          }
-        }
+        this.$download.saveAs(blob, '鍙戞斁鍥炴敹璁板綍.xlsx');
       })
     },
     changeFileList(e) {
@@ -505,6 +447,7 @@
     handleUpdate(row) {
       this.addInfo = this.HaveJson(row)
       this.radio = '鍥炴敹'
+      this.file = null
       this.addDialogVisible = true
     },
     // 瀹℃牳
@@ -567,7 +510,6 @@
       })
         .then(() => {
           delManageDocumentIssueRecycle({ id: row.id }).then((res) => {
-            if (res.code == 201) return;
             this.$message.success("鍒犻櫎鎴愬姛");
             this.refresh();
           });

--
Gitblit v1.9.3