From 5c8aaba66c16b1a143fdec27e29ad36eaefd1e3a Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期二, 31 十二月 2024 14:33:25 +0800
Subject: [PATCH] 无源器件检验开发

---
 src/components/view/a8-periodic-document-review-records.vue |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/src/components/view/a8-periodic-document-review-records.vue b/src/components/view/a8-periodic-document-review-records.vue
index 129b328..d7a0a46 100644
--- a/src/components/view/a8-periodic-document-review-records.vue
+++ b/src/components/view/a8-periodic-document-review-records.vue
@@ -12,7 +12,7 @@
         <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower" style="display:inline-block;margin-left: 20px;">瀵煎嚭</el-button>
       </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 class="search">
           <div class="search_thing">
@@ -32,11 +32,11 @@
             <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
           </div>
           <div class="btns">
-            <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
+            <el-button size="medium" type="primary" @click="openAdd" 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 type="primary" size="medium">瀵煎叆</el-button></el-upload>
           </div>
         </div>
@@ -161,7 +161,7 @@
   },
   data() {
     return {
-      activeName:'濉啓',
+      activeName:'鍘嗗彶璁板綍',
       title0:'鏂板',
       addPower:true,
       outPower:true,
@@ -188,13 +188,13 @@
           id: 'delete',
           font: '鍒犻櫎',
           type: 'text',
-          method: 'doDiy',
+          method: 'doDiy'
         }, {
           id: 'handleEdit',
           font: '淇敼',
           type: 'text',
           method: 'handleEdit',
-          field:[],
+          field:[]
         }],
         tagField: {
           // documentType:{
@@ -295,6 +295,17 @@
       return this.javaApi +this.$api.manageRecordIntervals.exportInManageRecordIntervals
     }
   },
+  watch: {
+    'activeName' (val1, val2) {
+      if(val1=='濉啓'){
+        this.componentData.do.forEach((item)=>{
+          item.disabFun = (row, index) => {
+            return !this.addPower||!!this.currentInfo.ratifyUserName
+          }
+        })
+      }
+    }
+  },
   mounted() {
     this.entityCopy = this.HaveJson(this.componentData.entity);
     this.entityCopy0 = this.HaveJson(this.componentData0.entity);
@@ -361,7 +372,7 @@
         this.outLoading = false
         if(res.code==201) return this.$message.error('瀵煎嚭澶辫触')
         this.$message.success('瀵煎嚭鎴愬姛')
-        let url = this.javaApi+'word/'+res.message
+        let url = this.javaApi+'/word/'+res.message
         const link = document.createElement('a');
         link.href = url;
         link.download = '鏂囦欢瀹氭湡瀹℃煡璁板綍';
@@ -511,7 +522,7 @@
       }
     },
     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+' 鎵�鏈夋枃浠跺畾鏈熸鏌ヨ褰�';
@@ -541,6 +552,11 @@
       this.title0 = '鎵瑰噯'
       this.commonFun(row)
     },
+    tabClick(e){
+      if(e.index==0){
+        this.currentInfo = this.$refs['ValueTable0'].tableData[0]
+      }
+    }
   }
 }
 </script>

--
Gitblit v1.9.3