Explorar el Código

逻辑图-预测指标显示

hbchen hace 7 meses
padre
commit
2eb435b872

+ 8 - 4
src/views/sandbox_manage/sandFlowNew/components/addLInkDia.vue

@@ -1,6 +1,6 @@
 <template>
     <el-dialog :modal-append-to-body='false' title="添加链接" :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">
@@ -161,7 +161,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
@@ -281,6 +281,7 @@ import { dataBaseInterface,reportlist} from '@/api/api.js';
         reportTotal:0,
         editingLabel:'',
         activeItemRId:'',
+        activeItem:''
       }
     },
     methods: {
@@ -362,10 +363,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 || (+this.activeItemRId.split('-')[1]),
+          EdbInfoId: this.search_dataBaseId || this.activeItem.Id,
         }).then(res => {
           if(res.Ret === 200) {
             if(res.Data) {
@@ -417,6 +420,7 @@ import { dataBaseInterface,reportlist} from '@/api/api.js';
       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){
           if(!config.noInfo){