|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<el-dialog :modal-append-to-body='false' :title="$t('SandboxManage.SandFlow.add_link')" :visible.sync="show"
|
|
|
- :close-on-click-modal="false" width="872px" top="5vh">
|
|
|
+ :close-on-click-modal="false" width="872px" top="5vh" @close="cancelHandle">
|
|
|
<div class="add-link-box">
|
|
|
<div class="link-box-option">
|
|
|
<el-select v-model="addLinkSearchParams.linkType" placeholder="链接类型" style="width: 240px;" @change="changeLinkType">
|
|
@@ -191,7 +191,7 @@ import * as sheetInterface from "@/api/modules/sheetApi.js";
|
|
|
import mPage from "@/components/mPage.vue";
|
|
|
import Chart from '../../../dataEntry_manage/components/chart.vue'
|
|
|
import { dataBaseInterface,reportlist} from '@/api/api.js';
|
|
|
-
|
|
|
+import * as preDictEdbInterface from '@/api/modules/predictEdbApi.js';
|
|
|
export default {
|
|
|
components:{
|
|
|
mPage,Chart
|
|
@@ -262,9 +262,15 @@ 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.activeItemRId=''
|
|
|
+ this.linkClick(firstCheckedLink)
|
|
|
+ }else{
|
|
|
+ this.addLinkSearchParams.linkType=1
|
|
|
+ }
|
|
|
+ this.changeLinkType()
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -305,6 +311,7 @@ import { dataBaseInterface,reportlist} from '@/api/api.js';
|
|
|
reportTotal:0,
|
|
|
editingLabel:'',
|
|
|
activeItemRId:'',
|
|
|
+ activeItem:''
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -386,10 +393,12 @@ import { dataBaseInterface,reportlist} from '@/api/api.js';
|
|
|
this.getDatabaseList();
|
|
|
},
|
|
|
getDatabaseList(){
|
|
|
- dataBaseInterface.targetList({
|
|
|
+ // 0-普通指标 1-预测指标
|
|
|
+ let api = this.activeItem.databaseType==0?(dataBaseInterface.targetList):(preDictEdbInterface.edbDataInfo)
|
|
|
+ api({
|
|
|
PageSize: 20,
|
|
|
CurrentIndex: this.databasePageNo,
|
|
|
- EdbInfoId: this.search_dataBaseId,
|
|
|
+ EdbInfoId: this.search_dataBaseId || this.activeItem.Id,
|
|
|
}).then(res => {
|
|
|
if(res.Ret === 200) {
|
|
|
if(res.Data) {
|
|
@@ -435,34 +444,48 @@ 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.activeItem = item
|
|
|
+ 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) {
|