Jelajahi Sumber

Merge branch 'ETA_1.5.7'

hbchen 5 bulan lalu
induk
melakukan
1b2736cf2a

+ 1 - 1
src/lang/modules/EtaBase/En.js

@@ -62,7 +62,7 @@ export default {
     origin_edb: 'Original Indicator',
     replace: 'Replace to',
     replace_all: 'Replace all',
-    replace_tip: 'Tip: After the replacement, charts and calculated indicators that refer to the original indicator will be replaced by the replacement indicator.',
+    replace_tip: 'Note: After replacement, all references to the original metric in charts, tables, calculated metrics, and logic diagrams will be substituted with the replacement metric.',
     replace_success_msg: 'This replacement will last for a longer period of time, confirm the replacement?',
     replace_ing_msg: 'The replacement is currently in progress, please be patient',
     input_origin_vaild: 'Original Indicator can not be empty',

+ 1 - 1
src/lang/modules/EtaBase/Zh.js

@@ -62,7 +62,7 @@ export default {
     origin_edb: '原指标',
     replace: '替换为',
     replace_all: '全部替换',
-    replace_tip: '提示:替换后,图表和计算指标引用到原指标的会全部由替换指标替代',
+    replace_tip: '提示:替换后,图、表、计算指标和逻辑图引用到原指标的会全部由替换指标替代',
     replace_success_msg: '本次替换将持续较长时间,是否确认替换?',
     replace_ing_msg: '当前正在替换中,请耐心等待',
     input_origin_vaild: '原指标不能为空',

+ 21 - 1
src/lang/modules/EtaBase/commonLang.js

@@ -48,6 +48,22 @@ export default {
     zh:'查看数据',
     en:'View indicators'
   },
+  detail_formula_btn: {
+    zh:'查看公式',
+    en:'Formula'
+  },
+  detail_related_charts_btn: {
+    zh:'关联图',
+    en:'Related Charts'
+  },
+  detail_related_metrics_btn: {
+    zh:'关联指标',
+    en:'Related Metrics'
+  },
+  detail_return_btn:{
+    zh:'返回',
+    en:'Return'
+  },
   detail_del_btn:{
     zh:'删除',
     en:'Delete'
@@ -1213,7 +1229,11 @@ export default {
     },
     del_edb_use_chart: {
       zh: '当前指标已用作画图,不可删除',
-      en: 'The current indicator is being used for drawing and cannot be deleted.'
+      en: 'The current metric is in use for charting and cannot be deleted.'
+    },
+    del_edb_use_table: {
+      zh: '当前指标已被表格引用,不可删除',
+      en: 'The current metric is referenced by a table and cannot be deleted.'
     },
     del_menu_confirm: {
       zh: '确定删除当前目录吗?',

+ 82 - 0
src/views/dataEntry_manage/components/edbHasUsedDia.vue

@@ -0,0 +1,82 @@
+<template>
+  <el-dialog
+  :modal-append-to-body='false'
+  :title="$t('Edb.MsgPrompt.del_failed')" 
+  :visible.sync="show"
+  :close-on-click-modal="false"
+  @close="cancelHandle"
+  custom-class="dateDialog"
+  width="650px">
+    <div class="dialog-main">
+      <div class="main-title">
+        <i class="el-icon-error"  style="color: #F56C6C;"></i>
+        <span>{{ $t('Edb.MsgPrompt.del_edb_use_table') }}</span>
+      </div>
+      <div class="main-list">
+        <div class="used-item" v-for="(data,index) in dataList" :key="data.id">
+          <span>{{ index+1 }}、</span><span @click="navigateTo(data.routeUrl)">{{ data.ExcelName }}</span>
+        </div>
+      </div>
+    </div>
+    <div class="dia-bot">
+      <el-button @click="cancelHandle" type="primary" style="width: 120px;"><!-- 知道了 -->{{$t('Dialog.known')}}</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  export default {
+    name:"",
+    props:{
+      show:{
+        type:Boolean,
+        default:false
+      },
+      dataList:{
+        type:Array,
+        default:()=>[]
+      }
+    },
+    methods:{
+      navigateTo(url){
+        console.log(url);
+        if(!url) return
+        window.open(url, '_blank'); 
+      },
+      cancelHandle(){
+        this.$emit('update:show',false)
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+.main-title{
+  display: flex;
+  align-items: center;
+  font-size: 15px;
+  i{
+    font-size: 20px;
+    margin-right: 10px
+  }
+}
+.main-list{
+  margin: 20px 0 0 30px;
+  max-height: 420px;
+  overflow: auto;
+  .used-item{
+    span{
+      color:#333333 ;
+      cursor: pointer;
+      &:hover{
+        text-decoration: underline
+      }
+    }
+  }
+
+}
+.dia-bot{
+  display: flex;
+  justify-content: flex-end
+}
+</style>

+ 25 - 1
src/views/dataEntry_manage/databaseComponents/dataAssociateChart.vue

@@ -1,10 +1,14 @@
 <template>
     <div class="associate-chart">
         <div v-if="list.length===0&&finished" style="text-align:center;display:block" class="empty-list">
+            <span class="return-btn" @click="()=>{$emit('returnHandle')}">{{$t('Edb.detail_return_btn')}}</span>
             <tableNoData :text="$t('EtaBasePage.no_quote_chart')"/>
         </div>
         <template v-else>
-        <p style="position:relative;font-size:16px">{{$t('Chart.total_chart_show',{limit: chartTotal})}}</p>
+        <p class="associate-chart-title">
+            <span>{{$t('Chart.total_chart_show',{limit: chartTotal})}}</span>
+            <span class="return-btn-tow" @click="()=>{$emit('returnHandle')}">{{$t('Edb.detail_return_btn')}}</span>
+        </p>
         <div
             class="chart-public-list"
             v-infinite-scroll="load"
@@ -203,11 +207,31 @@ export default {
     display: flex;
     flex-direction: column;
 }
+.associate-chart-title{
+    position:relative;
+    font-size:16px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .return-btn-tow{
+        color: #409eff;
+        font-size: 14px;
+        cursor: pointer;
+    }
+}
 .empty-list{
     min-height: calc(100vh - 300px);
     background-color: #fff;
     margin-top: -30px;
     padding-top: 100px;
+    position: relative;
+    .return-btn{
+        position: absolute;
+        top: 32px;
+        right: 2px;
+        cursor: pointer;
+        color: #409eff;
+    }
 }
 .chart-public-list{
     flex: 1;

+ 11 - 0
src/views/dataEntry_manage/databaseComponents/dataAssociateComputeData.vue

@@ -1,10 +1,12 @@
 <template>
     <div class="main-box">
+        <p class="return-btn" @click="()=>{$emit('returnHandle')}">{{$t('Edb.detail_return_btn')}}</p>
         <el-table 
             :data="list" 
             ref="tableRef" 
             highlight-current-row 
             border
+            style="margin-top: 18px;"
         >
             <el-table-column
                 v-for="item in tableColums"
@@ -134,5 +136,14 @@ export default {
     padding: 30px;
     height: 100%;
     overflow-y: auto;
+    position: relative;
+    .return-btn{
+        color: #409eff;
+        font-size: 14px;
+        cursor: pointer;
+        position: absolute;
+        right: 16px;
+        top: 12px;
+    }
 }
 </style>

+ 85 - 18
src/views/dataEntry_manage/databaseList.vue

@@ -143,12 +143,12 @@
 								style="display: flex; align-items: center"
 								v-if="select_node===data.UniqueCode&&data.HaveOperaAuth"
 							>
-								<img
+								<!-- <img
 									src="~@/assets/img/data_m/move_ico.png"
 									alt=""
 									style="width: 14px; height: 14px; margin-right: 8px"
 									v-if="data.Button.MoveButton&&isEdbBtnShow('moveCatalog')"
-								/>
+								/> -->
 								<!-- 添加子项 -->
 								<img
 									src="~@/assets/img/set_m/add.png"
@@ -175,25 +175,25 @@
 									v-if="!data.EdbCode&&(data.Button.DeleteButton)&&isEdbBtnShow('deleteCatalog')"
 								/>
 								<!-- 查看计算指标 -->
-								<i class="el-icon-view" 
+								<!-- <i class="el-icon-view" 
 									v-if="data.EdbType===2&&![58,59,67,68,74].includes(data.Source)&&isEdbBtnShow('checkCalcChart')" 
-									@click.stop="viewNode(node,data)"></i>
+									@click.stop="viewNode(node,data)"></i> -->
 								<!-- 查看关联图表 -->
-								<img 
+								<!-- <img 
 									v-if="data.Button.ShowChartRelation&&isEdbBtnShow('checkRelatedChart')" 
 									@click.stop="showAssociateChart=true,showAssociateComputeData=false"
 									src="~@/assets/img/icons/associate_chart.png" 
 									style="width: 14px; height: 14px;margin-left: 8px"
 									alt=""
-								/>
+								/> -->
 								<!-- 查看关联指标 -->
-								<img 
+								<!-- <img 
 									v-if="data.Button.ShowEdbRelation&&isEdbBtnShow('checkRelatedEdb')" 
 									@click.stop="showAssociateComputeData=true,showAssociateChart=false"
 									src="~@/assets/img/icons/associate_data.png" 
 									style="width: 14px; height: 14px;margin-left: 8px"
 									alt=""
-								/>
+								/> -->
 							</span>
 						</span>
 					</el-tree>
@@ -219,10 +219,10 @@
 			</div>
 			<!-- 指标关联图模块 -->
 			<div class="main-right right" id="right" style="background:transparent;border:none;box-shadow:none" v-if="showAssociateChart">
-				<dataAssociateChart :edbInfoId="selected_edbid"></dataAssociateChart>
+				<dataAssociateChart :edbInfoId="selected_edbid" @returnHandle="showAssociateChart=false,showAssociateComputeData=false"></dataAssociateChart>
 			</div>
 			<div class="main-right right" id="right" style="background:transparent;border:none;box-shadow:none;padding-top: 30px;box-sizing: border-box;" v-if="showAssociateComputeData">
-				<dataAssociateComputeData :edbInfoId="selected_edbid"></dataAssociateComputeData>
+				<dataAssociateComputeData :edbInfoId="selected_edbid" @returnHandle="showAssociateChart=false,showAssociateComputeData=false"></dataAssociateComputeData>
 			</div>
 			<!-- 指标图表列表 -->
 			<div class="main-right right list" id="right" v-show="isShowList">
@@ -316,6 +316,21 @@
 										type="text" 
 										@click="copyCode"
 									>{{$t('Edb.detail_copydata_btn')}}<!-- 复制数据 --></el-button>
+									<el-button 
+									v-if="EdbData.EdbType===2&&![58,59,67,68,74].includes(EdbData.Source)&&isEdbBtnShow('checkCalcChart')" 
+										type="text" 
+										@click.stop="viewNode"
+									>{{$t('Edb.detail_formula_btn')}}<!-- 查看公式 --></el-button>
+									<el-button 
+										v-if="EdbData.Button.ShowChartRelation&&isEdbBtnShow('checkRelatedChart')"
+										type="text" 
+										@click="showAssociateChart=true,showAssociateComputeData=false" 
+									>{{$t('Edb.detail_related_charts_btn')}}<!-- 关联图 --></el-button>
+									<el-button 
+										v-if="EdbData.Button.ShowEdbRelation&&isEdbBtnShow('checkRelatedEdb')" 
+										type="text"
+										@click="showAssociateComputeData=true,showAssociateChart=false"
+									>{{$t('Edb.detail_related_metrics_btn')}}<!-- 关联指标 --></el-button>
 									<el-button 
 										v-if="EdbData.Button.DeleteButton&&isEdbBtnShow('deleteEdb')"
 										type="text" 
@@ -567,6 +582,10 @@
 			@updateLang="updateLang"
 			cType="ebd" 
 		/>
+
+		<!-- 指标已经被引用 -->
+		<edbHasUsedDia :show.sync="edbHasUsedDiaShow" :dataList="hasUsedList"/>
+
 	</div>
 </template>
 
@@ -597,6 +616,7 @@ import edbDetailData from './databaseComponents/edbDetailData.vue';
 import SmoothEdbDialog from './databaseComponents/smoothEdbDialog.vue';
 import batchComputedV2 from './databaseComponents/batchComputedV2.vue';
 import setLangInfoDia from './components/setLangInfo.vue'
+import edbHasUsedDia from './components/edbHasUsedDia.vue';
 export default {
 	name: '',
 	components: {
@@ -622,7 +642,8 @@ export default {
 		edbDetailData,
 		SmoothEdbDialog,
 		batchComputedV2,
-		setLangInfoDia
+		setLangInfoDia,
+		edbHasUsedDia
 	},
 	directives: {
 		drag(el, bindings,vnode) {
@@ -757,7 +778,10 @@ export default {
 			showBatchComputedPop:false,
 
 			/* 修改对应版本信息弹窗  替换原有设置英文*/
-			isLangInfoDia: false
+			isLangInfoDia: false,
+
+			edbHasUsedDiaShow:false,
+			hasUsedList:[]
 		};
 	},
 	watch: {
@@ -1492,15 +1516,23 @@ export default {
 					 * 0 可删除
 					 * 1 关联指标
 					 * 2 有子目录无指标
+					 * 4 当前指标已用作指标运算,不可删除
+					 * 5 当前指标已用作预测指标,不可删除
+					 * 6 当前指标已被表格引用,不可删除
+					 * 7 当前指标已添加到跨品种分析,不可删除
 					*/
 					const deleteLabelMap = {
 						1: /* '该目录关联指标不可删除' */this.$t('Edb.MsgPrompt.del_not_relate_edb'),
 						2: /* '确认删除当前目录及包含的子目录吗?' */this.$t('Edb.MsgPrompt.del_confirm_menu_or_children'),
 						3: /* '当前指标已用作画图,不可删除' */this.$t('Edb.MsgPrompt.del_edb_use_chart'),
-						4: res.Data.TipsMsg
+						4: res.Data.TipsMsg,
+						5: res.Data.TipsMsg,
+						6: res.Data.TipsMsg,
+						7: res.Data.TipsMsg,
 					}
 
-					if([1,3,4].includes(res.Data.DeleteStatus)) this.$confirm(
+					if([1,3,4,5,7].includes(res.Data.DeleteStatus)){
+						this.$confirm(
 							deleteLabelMap[res.Data.DeleteStatus],
 							/* '删除失败' */this.$t('Edb.MsgPrompt.del_failed'),
 							{
@@ -1508,7 +1540,12 @@ export default {
 							showCancelButton:false,
 							type: 'error'
 						})
-					else if([0,2].includes(res.Data.DeleteStatus)) this.$confirm(
+					}else if(res.Data.DeleteStatus == 6){
+						this.edbHasUsedDiaShow=true
+						this.hasUsedList=res.Data.TableList.map(it =>{
+							return {...it,routeUrl:this.getRouteUrl(it)}
+						})
+					}else if([0,2].includes(res.Data.DeleteStatus)) this.$confirm(
 							res.Data.DeleteStatus === 2 
 							? deleteLabelMap[res.Data.DeleteStatus]
 							: data.EdbCode? this.$t('Edb.MsgPrompt.del_edb_confirm')/* '删除后指标和指标值均不可使用,确认删除吗?' */:/* '确定删除当前目录吗?' */this.$t('Edb.MsgPrompt.del_menu_confirm'), 
@@ -1525,6 +1562,36 @@ export default {
 			})
 
 		},
+		getRouteUrl(table){
+			/**
+			 	1 // 自定义excel
+				2 // 时间序列表格
+				3 // 混合表格
+				4 // 自定义分析表格
+				5 // 平衡表
+			 */
+			let url=''
+			switch (table.Source) {
+				case 1:
+					url = this.$router.resolve({ path: '/sheetAnalysisList',query:{code:table.UniqueCode,id:table.ExcelInfoId}}).href;
+					break;
+				case 2:
+					url = this.$router.resolve({ path: '/sheetTimeList',query:{code:table.UniqueCode,id:table.ExcelInfoId}}).href;
+					break;
+				case 3:
+					url = this.$router.resolve({ path: '/sheetMixedList',query:{code:table.UniqueCode,id:table.ExcelInfoId}}).href;
+					break;
+				case 4:
+					url = this.$router.resolve({ path: '/sheetList',query:{code:table.UniqueCode,id:table.ExcelInfoId}}).href;
+					break;
+				case 5:
+					url = this.$router.resolve({ path: '/viewBalanceSheet',query:{id:table.ExcelInfoId}}).href;
+					break;
+				default:
+					break;
+			}
+			return url
+		},
 		/* 删除方法 */
 		delHandle(ClassifyId,EdbInfoId) {
 			dataBaseInterface.nodeDelete({
@@ -1785,7 +1852,7 @@ export default {
 
 		/* 查看计算公式 打开弹窗 */
 		viewNode(node,data) {
-			const { EdbInfoId,Source } = data;
+			const { EdbInfoId,Source } = this.EdbData;
 
 			//代码运算指标
 			if( Source === 27 ) return this.$router.push({
@@ -1801,7 +1868,7 @@ export default {
 			}).then(res => {
 				if(res.Ret !== 200) return
 				this.setComputedDialogForm(Source,res.Data,true);
-				switch (data.Source) {
+				switch (this.EdbData.Source) {
 					case 23: 
 					case 24: 
 						this.computed_type = 'joint';
@@ -1811,7 +1878,7 @@ export default {
 						this.computed_type = 'alpha';
 						break
 					default:
-						this.computed_type = data.Source;
+						this.computed_type = this.EdbData.Source;
 						break
 				}
 			})

+ 24 - 9
src/views/predictEdb_manage/predictEdb.vue

@@ -115,12 +115,12 @@
 								style="display: flex; align-items: center"
 								v-if="select_node===data.UniqueCode&&data.HaveOperaAuth"
 							>
-								<img
+								<!-- <img
 									src="~@/assets/img/data_m/move_ico.png"
 									alt=""
 									style="width: 14px; height: 14px; margin-right: 8px"
 									v-if="data.Button.MoveButton"
-								/>
+								/> -->
 								<!-- 添加子项 -->
 								<img
 									src="~@/assets/img/set_m/add.png"
@@ -147,23 +147,23 @@
 									v-if="data.Button.DeleteButton&&!data.EdbInfoId&&isEdbBtnShow('edbPreData_classifyOpt_delete')"
 								/>
 								<!-- 查看预测规则 -->
-								<i class="el-icon-view" v-if="data.EdbInfoId&&isEdbBtnShow('edbPreData_checkPreRule')" @click.stop="viewNode(node,data)"></i>
+								<!-- <i class="el-icon-view" v-if="data.EdbInfoId&&isEdbBtnShow('edbPreData_checkPreRule')" @click.stop="viewNode(node,data)"></i> -->
 								<!-- 查看关联图表 -->
-								<img 
+								<!-- <img 
 									v-if="data.Button.ShowChartRelation&&isEdbBtnShow('edbPreData_checkRelatedChart')" 
 									@click.stop="showAssociateChart=true,showAssociateComputeData=false"
 									src="~@/assets/img/icons/associate_chart.png" 
 									style="width: 14px; height: 14px;margin-left: 8px"
 									alt=""
-								/>
+								/> -->
 								<!-- 查看关联指标 -->
-								<img 
+								<!-- <img 
 									v-if="data.Button.ShowEdbRelation&&isEdbBtnShow('edbPreData_checkRelatedEdb')" 
 									@click.stop="showAssociateComputeData=true,showAssociateChart=false"
 									src="~@/assets/img/icons/associate_data.png" 
 									style="width: 14px; height: 14px;margin-left: 8px"
 									alt=""
-								/>
+								/> -->
 							</span>
 						</span>
 					</el-tree>
@@ -248,6 +248,21 @@
 										type="text" 
 										@click="updateEdbHandle"
 									>{{$t('Edb.detail_recalculate_btn')}}<!-- 重新计算 --></el-button>
+									<el-button 
+										v-if="isEdbBtnShow('edbPreData_checkPreRule')"
+										type="text" 
+										@click.stop="viewNode"
+									>{{$t('Edb.detail_formula_btn')}}<!-- 查看公式 --></el-button>
+									<el-button 
+										v-if="edbButton.ShowChartRelation&&isEdbBtnShow('edbPreData_checkRelatedChart')"
+										type="text" 
+										@click="showAssociateChart=true,showAssociateComputeData=false" 
+									>{{$t('Edb.detail_related_charts_btn')}}<!-- 关联图 --></el-button>
+									<el-button 
+										v-if="edbButton.ShowEdbRelation&&isEdbBtnShow('edbPreData_checkRelatedEdb')"
+										type="text"
+										@click="showAssociateComputeData=true,showAssociateChart=false"
+									>{{$t('Edb.detail_related_metrics_btn')}}<!-- 关联指标 --></el-button>
 									<el-button 
 										class="deletesty" 
 										@click="delEdbHandle" 
@@ -318,10 +333,10 @@
 
 				<!-- 指标关联图模块 -->
 				<div class="edb-detail-wrapper" style="padding: 30px 20px;" v-if="showAssociateChart&&select_id">
-					<dataAssociateChart :edbInfoId="select_id"></dataAssociateChart>
+					<dataAssociateChart :edbInfoId="select_id" @returnHandle="showAssociateChart=false,showAssociateComputeData=false"></dataAssociateChart>
 				</div>
 				<div class="edb-detail-wrapper" style="padding: 30px 20px;" v-if="showAssociateComputeData&&select_id">
-					<dataAssociateComputeData :edbInfoId="select_id"></dataAssociateComputeData>
+					<dataAssociateComputeData :edbInfoId="select_id" @returnHandle="showAssociateChart=false,showAssociateComputeData=false"></dataAssociateComputeData>
 				</div>
 			</div>
 		</div>

+ 21 - 2
src/views/sandbox_manage/index_new_version.vue

@@ -1143,9 +1143,28 @@ import {reportVarietyInterence} from '@/api/modules/reportVariety'
                 let EdbInfoIdList = res.Data.EdbInfoIdList || []
                 let ChartInfoIdList = res.Data.ChartInfoIdList || []
                 let ReportIdList = res.Data.ReportIdList || []
-                this.checkedLinkList = currentLinks.filter(link =>{
-                  return EdbInfoIdList.includes(link.Id) || ChartInfoIdList.includes(link.Id) || ReportIdList.includes(link.Id)
+                this.checkedLinkList=[]
+                // detailParams的参数改从后端取 
+                EdbInfoIdList.map(edbIt=>{
+                  let item = currentLinks.find(it=>it.Id == edbIt.Id)
+                  if(item){
+                    this.checkedLinkList.push({...item,detailParams:{classifyId:edbIt.ClassifyId,code:edbIt.UniqueCode,id:edbIt.Id}})
+                  }
+                })
+                ChartInfoIdList.map(chartIt=>{
+                  let item = currentLinks.find(it=>it.Id == chartIt.Id)
+                  if(item){
+                    this.checkedLinkList.push({...item,detailParams:{classifyId:chartIt.ClassifyId,code:chartIt.UniqueCode,id:chartIt.Id}})
+                  }
+                })
+                ReportIdList.map(reportIt=>{
+                  let item = currentLinks.find(it=>it.Id == reportIt.Id)
+                  if(item){
+                    this.checkedLinkList.push({...item,detailParams:{code:reportIt.UniqueCode,id:reportIt.Id}})
+                  }
                 })
+                // 绑定的链接是否 被删除光了
+                if(!(this.checkedLinkList && this.checkedLinkList.length>0)) return 
                 let clinetPositon=graph.localToClient(node.position())
                 let size=node.size()
                 this.popoverTriggerDom.style.left = clinetPositon.x+size.width/2 + 'px';

+ 33 - 16
src/views/sandbox_manage/sandFlowNew/index.vue

@@ -657,6 +657,7 @@ import addLInkDia from './components/addLInkDia.vue';
           this.linkNode = node
           let isMindmap = node.shape.indexOf('mindmap')!=-1
           this.contextMenuOption.map(item =>{
+            // 思维导图里面的节点不得复制
             if(item.key=='copy'){
               item.show=!isMindmap
             }
@@ -678,29 +679,45 @@ import addLInkDia from './components/addLInkDia.vue';
                 let EdbInfoIdList = res.Data.EdbInfoIdList || []
                 let ChartInfoIdList = res.Data.ChartInfoIdList || []
                 let ReportIdList = res.Data.ReportIdList || []
-                this.linkList = currentLinks.filter(link =>{
-                  return EdbInfoIdList.includes(link.Id) || ChartInfoIdList.includes(link.Id) || ReportIdList.includes(link.Id)
+                this.linkList=[]
+                // detailParams的参数改从后端取更新 
+                EdbInfoIdList.map(edbIt=>{
+                  let item = currentLinks.find(it=>it.Id == edbIt.Id)
+                  if(item){
+                    this.linkList.push({...item,detailParams:{classifyId:edbIt.ClassifyId,code:edbIt.UniqueCode,id:edbIt.Id}})
+                  }
+                })
+                ChartInfoIdList.map(chartIt=>{
+                  let item = currentLinks.find(it=>it.Id == chartIt.Id)
+                  if(item){
+                    this.linkList.push({...item,detailParams:{classifyId:chartIt.ClassifyId,code:chartIt.UniqueCode,id:chartIt.Id}})
+                  }
+                })
+                ReportIdList.map(reportIt=>{
+                  let item = currentLinks.find(it=>it.Id == reportIt.Id)
+                  if(item){
+                    this.linkList.push({...item,detailParams:{code:reportIt.UniqueCode,id:reportIt.Id}})
+                  }
+                })
+
+                // check过滤后的,回传
+                data.linkData=this.linkList
+
+                this.contextMenuOption.map(item =>{
+                  if(item.key=='addLink'){
+                    item.label=(this.linkList && this.linkList.length>0)?this.$t('SandboxManage.SandFlow.edit_link'):this.$t('SandboxManage.SandFlow.add_link')
+                  }else if(item.key=='deleteLink'){
+                    item.show=(this.linkList && this.linkList.length>0)
+                  }
                 })
+                // 绑定的链接是否 被删除光了
+                if(!(this.linkList && this.linkList.length>0)) return 
                 let clinetPositon=this.graph.localToClient(node.position())
                 let size=node.size()
                 this.popoverTriggerDom.style.left = clinetPositon.x+size.width/2 + 'px';
                 this.popoverTriggerDom.style.top = clinetPositon.y + 'px';
                 this.popoverVisible=true
-                if(!(this.linkList.length>0)){
-                  if(item.key=='addLink'){
-                    item.label=this.$t('SandboxManage.SandFlow.add_link')
-                  }else if(item.key=='deleteLink'){
-                    item.show=false
-                  }
-                }
               }
-              this.contextMenuOption.map(item =>{
-                if(item.key=='addLink'){
-                  item.label=this.$t('SandboxManage.SandFlow.edit_link')
-                }else if(item.key=='deleteLink'){
-                  item.show=true
-                }
-              })
             })
           }else{
             this.contextMenuOption.map(item =>{

+ 0 - 84
src/views/sandbox_manage/sandFlowNew/popover.vue

@@ -1,84 +0,0 @@
-<!-- "@antv/x6-vue-shape": "1.5.4", "@vue/composition-api": "^1.5.0", -->
-<template>
-  <el-popover
-    placement="top"
-    trigger="manual"
-    v-model="popoverVisible">
-    <div id="link-popover" :style="{height:popoverFlod?'20px':'unset'}">
-      <div class="link-box">
-        <div v-for="item in checkedLinkList" :key="item.RId" class="link-item">
-          {{ item.Name }}
-        </div>
-      </div>
-      <img src="~@/assets/img/sand_new/arrow_black_down.png" class="link-fold" 
-      :style="{transform:popoverFlod?'':'rotate(180deg)'}" v-show="checkedLinkList.length>1"
-      @click="foldLink"/>
-    </div>
-    <div id="link-reference" slot="reference">不可拖拽</div>
-  </el-popover>
-</template>
-
-<script>
-  export default {
-    name:'linkPopover',
-    inject: ["getGraph", "getNode"],
-    data() {
-      return {
-        checkedLinkList:[],
-        popoverFlod:true,
-        node:null,
-        popoverVisible:false
-      }
-    },
-    mounted(){
-      const self = this;
-      this.node = this.getNode();
-      const graph = this.getGraph()
-      console.log(this.node,'this.node');
-      graph.on("node:mouseenter", ({ node, e }) => {
-        console.log(node, e);
-        this.popoverVisible=true
-        if(node.data){
-          this.checkedLinkList = node.data.linkData || []
-        }
-        console.log(this.checkedLinkList);
-      });
-    },
-    methods:{
-      foldLink(){
-        this.popoverFlod=!this.popoverFlod 
-        if(this.node.data){
-          this.node.data.linkFold = this.popoverFlod
-        }
-        this.popoverVisible=false
-        this.$nextTick(()=>{
-          this.popoverVisible=true
-        })
-      },
-    }
-  }
-</script>
-
-<style lang="scss" scoped>
-  #link-popover{
-    display: flex;
-    justify-content: space-between;
-    transition: all 0.3s ease;
-    overflow: hidden;
-    .link-box{
-      .link-item{
-        &:hover{
-          text-decoration: underline;
-          color: #0052D9;
-          cursor: pointer;
-        }
-      }
-    }
-    .link-fold{
-      transition: all 0.3s ease;
-      height: 16px;
-      width: 16px;
-      cursor: pointer;
-    }
-  }
-</style>