zhuliu vor 7 Monaten
Ursprung
Commit
bc0253edf6

+ 2 - 0
src/views/report/components/dialog/components/handelPersonTable.vue

@@ -207,6 +207,7 @@ export default {
               this.$message.success('移除成功')
               this.loading = false
               this.getList()
+              this.$emit('isUpdate',true)
               this.IPREmailList={
                 queryParams:{
                   current:0,
@@ -264,6 +265,7 @@ export default {
           if(row.id){
             this.editMessage = {}
           }
+          this.$emit('isUpdate',true)
         }
       }).catch(error=>{
         this.loading = false

+ 12 - 3
src/views/report/components/dialog/handlePerson.vue

@@ -1,10 +1,10 @@
 <template>
   <div>
     <el-dialog  title="配案人员" :visible.sync="visible" width="1000px" :close-on-click-modal="false"  :before-close="handleClose" append-to-body>
-      <div style="height:calc(100vh - 250px)">
-        <handelPersonTable :reportId="reportId" title="IPR" :type="1"></handelPersonTable>
+      <div style="height:calc(100vh - 250px)" v-if="visible">
+        <handelPersonTable :reportId="reportId" title="IPR" :type="1" @isUpdate="isUpdate"></handelPersonTable>
         <div style="margin-top:25px">
-          <handelPersonTable :reportId="reportId" title="代理所" :type="2"></handelPersonTable>
+          <handelPersonTable :reportId="reportId" title="代理所" :type="2" @isUpdate="isUpdate"></handelPersonTable>
         </div>
         
       </div>
@@ -23,6 +23,7 @@ export default {
     return {
         visible:false,
         reportId:null,
+        update:false
     };
   },
   watch: {},
@@ -32,11 +33,19 @@ export default {
   methods: {
     open(reportId){
       this.reportId =reportId
+      this.update = false
       this.visible = true
     },
     handleClose(){
         this.visible = false
+        if(this.update){
+         this.$emit('updateHandlePerson',this.reportId) 
+        }
+        
     },
+    isUpdate(val){
+      this.update = true
+    }
     
   },
 };

+ 23 - 1
src/views/report/components/index.vue

@@ -69,7 +69,7 @@
     <!-- 联系邮箱 -->
     <IPREmailDialog ref="IPREmailDialog"></IPREmailDialog>
     <!-- 配案人员/实际处理人 -->
-    <handlePersonDialog ref="handlePersonDialog"></handlePersonDialog>
+    <handlePersonDialog ref="handlePersonDialog" @updateHandlePerson="updateHandlePerson"></handlePersonDialog>
   </div>
 </template>
 
@@ -260,6 +260,28 @@ export default {
     this.showViews()
   },
   methods: {
+    //更新配案人员
+    updateHandlePerson(projectId){
+      let index = this.dataList.findIndex(item=>{
+        return item.id == projectId
+      })
+      if(index==-1){
+        return
+      }
+      let params = {
+        searchQuery: `id=${projectId}`,//检索条件
+        orderDTOList: [],
+      }
+      this.$api.queryReportProject(params).then(res => {
+        if (res.code == 200) {
+          if (res.data.data.length > 0) {
+            this.dataList[index] = res.data.data[0]
+          } 
+        }
+      }).catch(error => {
+        
+      })
+    },
     //联系邮箱
     IPREmail(){
       this.$refs.IPREmailDialog.open()