From ee2882cff02d3545b66c7591f88ed4800f730a9a Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 21 五月 2025 10:00:17 +0800
Subject: [PATCH] 消息通知数据自动筛选

---
 src/components/view/a8-external-document-confirmation-records.vue |   36 ++++++++++++++++++++++++++----------
 1 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/src/components/view/a8-external-document-confirmation-records.vue b/src/components/view/a8-external-document-confirmation-records.vue
index 9ca85f3..af466c7 100644
--- a/src/components/view/a8-external-document-confirmation-records.vue
+++ b/src/components/view/a8-external-document-confirmation-records.vue
@@ -4,17 +4,17 @@
     <el-row class="title">
       <el-col :span="20" style="padding-left: 20px;text-align: left;">澶栨潵鏂囦欢纭璁板綍</el-col>
     </el-row>
-    <el-tabs type="border-card" v-model="activeName" style="height: 100%;">
+    <el-tabs type="border-card" v-model="activeName" style="height: 100%;" @tab-click="tabClick">
       <el-tab-pane label="濉啓" name="濉啓" style="height: 100%;">
         <div style="display: flex;align-items: center;justify-content: flex-end;margin-right: 20px;">
-          <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;" v-if="addPower">鏂板</el-button>
+          <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;" v-if="addPower&&!currentInfo.ratifyUserName">鏂板</el-button>
           <el-upload :action="action" :multiple="false"
               :show-file-list="false"
           accept='.doc,.docx' :headers="headers" :on-change="beforeUpload"
-          :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
+          :on-error="onError" ref='upload' v-if="upPower&&!currentInfo.ratifyUserName" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
           <el-button size="small" type="primary" :loading="upLoading">瀵煎叆</el-button></el-upload>
         </div>
-        <div class="table" style="height: calc(100% - 200px)" v-if="activeName=='鍘嗗彶璁板綍'">
+        <div class="table" style="height: calc(100% - 200px)" v-if="activeName=='濉啓'">
           <ValueTable ref="ValueTable0" :url="$api.manageRecordTotal.pageManageRecordVerify"
       :componentData="componentData0" :key="upIndex0" :delUrl="$api.manageRecordTotal.delManageRecordVerify" :upUrl="$api.manageRecordTotal.doManageRecordVerify" />
         </div>
@@ -37,7 +37,7 @@
             <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
           </div>
         </div>
-        <div class="table">
+        <div class="table" v-if="activeName=='鍘嗗彶璁板綍'">
           <ValueTable ref="ValueTable" :url="$api.manageRecordTotal.pageManageRecordTotal"
             :componentData="componentData" :key="upIndex"/>
         </div>
@@ -69,7 +69,7 @@
   data(){
     return{
       title0:'鏌ョ湅',
-      activeName:'濉啓',
+      activeName:'鍘嗗彶璁板綍',
       lookDialogVisible:false,
       noCheckLoading:false,
       checkLoading:false,
@@ -141,12 +141,12 @@
             id: 'update',
             font: '淇敼',
             type: 'text',
-            method: 'doDiy'
+            method: 'doDiy',
           },{
             id: 'delete',
             font: '鍒犻櫎',
             type: 'text',
-            method: 'doDiy'
+            method: 'doDiy',
           }],
           tagField: {},
           selectField: {},
@@ -174,6 +174,17 @@
     },
     action() {
       return this.javaApi +this.$api.manageRecordTotal.exportManageRecordVerify
+    }
+  },
+  watch: {
+    'activeName' (val1, val2) {
+      if(val1=='濉啓'){
+        this.componentData0.do.forEach((item)=>{
+          item.disabFun = (row, index) => {
+            return !this.addPower||!!this.currentInfo.ratifyUserName
+          }
+        })
+      }
     }
   },
   mounted() {
@@ -281,10 +292,10 @@
       }).catch(err=>{});
     },
     handleDown0(row){
-      let url = this.javaApi+'word/'+row.url
+      let url = this.javaApi+'/word/'+row.url
       const link = document.createElement('a');
       link.href = url;
-      link.download = row.month+' 澶栨潵鏂囦欢纭璁板綍';
+      link.download = row.month+' 澶栨潵鏂囦欢纭璁板綍.docx';
       link.click();
     },
     // 鎻愪氦
@@ -332,6 +343,11 @@
         this.lookDialogVisible = false
       }).catch(err=>{});
     },
+    tabClick(e){
+      if(e.index==0){
+        this.currentInfo = this.$refs['ValueTable'].tableData[0]
+      }
+    }
   }
 }
 </script>

--
Gitblit v1.9.3