Explorar o código

ETA逻辑图,节点添加/编辑链接弹窗显示问题

hbchen hai 9 meses
pai
achega
2704720f77
Modificáronse 1 ficheiros con 29 adicións e 11 borrados
  1. 29 11
      src/views/sandbox_manage/sandFlowNew/components/addLInkDia.vue

+ 29 - 11
src/views/sandbox_manage/sandFlowNew/components/addLInkDia.vue

@@ -232,9 +232,14 @@ import { dataBaseInterface,reportlist} from '@/api/api.js';
       },
       show(value){
         if(value){
-          this.addLinkSearchParams.linkType=1
-          this.changeLinkType()
           this.checkedLinkList = JSON.parse(JSON.stringify(this.linkList))
+          let firstCheckedLink = this.checkedLinkList[0]
+          if(firstCheckedLink){
+            this.linkClick(firstCheckedLink,{noInfo:true})
+          }else{
+            this.addLinkSearchParams.linkType=1
+          }
+          this.changeLinkType()
         }
       }
     },
@@ -359,7 +364,7 @@ import { dataBaseInterface,reportlist} from '@/api/api.js';
         dataBaseInterface.targetList({
           PageSize: 20,
           CurrentIndex: this.databasePageNo,
-          EdbInfoId: this.search_dataBaseId,
+          EdbInfoId: this.search_dataBaseId || (+this.activeItemRId.split('-')[1]),
         }).then(res => {
           if(res.Ret === 200) {
             if(res.Data) {
@@ -404,34 +409,47 @@ import { dataBaseInterface,reportlist} from '@/api/api.js';
           this.$refs.labelEditInput[0].focus();
         });
       },
-      linkClick(item){
+      // 链接点击
+      /*
+        config.noInfo - 研报类型的不提示
+      */
+      linkClick(item,config={}){
         if(this.activeItemRId == item.RId) return
         this.activeItemRId = item.RId
+        this.addLinkSearchParams.linkType=item.Type
         if(item.Type==3){
-          this.$message.info('研报类型的暂无回显')
-        }else if(item.Type==1){
-          this.addLinkSearchParams.linkType=item.Type
+          if(!config.noInfo){
+            this.$message.info('研报类型的暂无回显')
+          }
+        }else if(item.Type==1){          
           this.changeLinkType()
           this.initGetData() 
         }else if(item.Type==2){
-          this.addLinkSearchParams.linkType=item.Type
           this.changeLinkType()
           this.getChartDetail(item.Id)
         }
 
       },
       linkDelete(item,index){
-        if(this.activeItemRId == item.RId){
-          this.activeItemRId=""
+        let rId = item.RId
+        this.checkedLinkList.splice(index,1)
+        if(this.activeItemRId == rId){
+          let firstCheckedLink = this.checkedLinkList[0]
+          if(firstCheckedLink){
+            this.linkClick(firstCheckedLink,{noInfo:true})
+          }else{
+            this.activeItemRId = ""
+            this.addLinkSearchParams.linkType=1
+          }
           this.changeLinkType()
         }
+
         if(item.Type==3){
           let deleteId=this.selections.filter(it=> it.Id==item.Id)
           if(deleteId[0]){
             this.$refs.reportTable && this.$refs.reportTable.toggleRowSelection(deleteId[0],false)
           }
         }
-        this.checkedLinkList.splice(index,1)
       },
       editLinkNameFinish(item){
         if (this.editingLabel) {