|
@@ -1,6 +1,7 @@
|
|
|
<template>
|
|
|
- <el-dialog :modal-append-to-body='false' :title="$t('SandboxManage.SandFlow.add_node_data')" :visible.sync="show"
|
|
|
- :close-on-click-modal="false" width="1000px" top="5vh" @close="cancelHandle">
|
|
|
+ <div>
|
|
|
+ <el-dialog v-dialogDrag :modal-append-to-body='false' :title="$t('SandboxManage.SandFlow.add_node_data')" :visible.sync="show"
|
|
|
+ :close-on-click-modal="false" width="1000px" top="5vh" @close="cancelHandle" v-show="!dialogDisplayNone">
|
|
|
<div class="add-link-box">
|
|
|
<div class="link-box-option">
|
|
|
<el-select v-model="addLinkSearchParams.linkType" placeholder="节点数据类型" style="width: 240px;" @change="changeLinkType">
|
|
@@ -121,7 +122,13 @@
|
|
|
:key="item.source"
|
|
|
class="link-count-item"
|
|
|
:class="{'link-count-item-un':!handleCountChoose(item),'link-count-item-on':handleCountChoose(item)}"
|
|
|
- @click="clickCountItem(item)">{{ item.label }}</li>
|
|
|
+ @click="clickCountItem(item)">
|
|
|
+ <span>{{ item.label }}</span>
|
|
|
+ <img v-if="handleCountChoose(item) && item.source != 98 && item.source != 99"
|
|
|
+ src="~@/assets/img/sand_new/blue_edit_icon.png"
|
|
|
+ style="width: 13px;height: 13px;margin-left: 8px;"
|
|
|
+ @click.stop="handleEditCal(item)">
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
<div v-if="threeCalculation && threeCalculation.length > 0" class="calculate-result-wrap">
|
|
|
<div class="calculate-result-title">{{ $t('ETableChildren.calculate_result') }}</div>
|
|
@@ -176,7 +183,8 @@
|
|
|
<el-button type="primary" style="width:120px;margin-left: 30px;" @click="saveLink">{{$t('Dialog.confirm_btn')}}</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <calculateEdb
|
|
|
+ </el-dialog>
|
|
|
+ <calculateEdb
|
|
|
:isShow.sync="isOpenCalculationDia"
|
|
|
:calculationItem="calculationItem"
|
|
|
:activeLink="activeItem"
|
|
@@ -186,8 +194,9 @@
|
|
|
@changeActiveEdb="handleChangeActiveEdb"
|
|
|
@edbDelete="handleEdbDelete"
|
|
|
@addCalculation="handleAddCalculation"
|
|
|
+ @handleCloseDialog="handleCloseDialog"
|
|
|
></calculateEdb>
|
|
|
- </el-dialog>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -218,7 +227,7 @@ import { calculateOption } from "../../common/options"
|
|
|
/* 选中搜索指标 展开目录 选中指标 展示数据 */
|
|
|
search_dataBaseId(newval) {
|
|
|
if (newval) {
|
|
|
- if(this.checkedLinkList.find(_=>_.Id == newval)){
|
|
|
+ if(this.linkListInShow.find(_=>_.Id == newval)){
|
|
|
return this.$message.warning(this.$t('SandboxManage.SandFlow.data_already_exists'))
|
|
|
}
|
|
|
if(this.addLinkSearchParams.linkType==1){
|
|
@@ -233,6 +242,7 @@ import { calculateOption } from "../../common/options"
|
|
|
Type:this.addLinkSearchParams.linkType,
|
|
|
editing:false,
|
|
|
databaseType:search_obj.EdbInfoType, //0 普通指标 | 1 预测指标
|
|
|
+ // EdbType:search_obj.EdbType || 0,
|
|
|
detailParams:{
|
|
|
code:search_obj.UniqueCode,
|
|
|
id:search_obj.EdbInfoId,
|
|
@@ -353,10 +363,10 @@ import { calculateOption } from "../../common/options"
|
|
|
threeCalculation:[],//三个一组
|
|
|
isOpenCalculationDia:false,
|
|
|
calculationItem:{},
|
|
|
+ dialogDisplayNone:false,
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- // -------------------------------添加链接
|
|
|
handleThreeCalculation(){
|
|
|
let i = this.checkedLinkList.findIndex(_=>_.RId == this.activeItem.RId);
|
|
|
if(i < 0) return;
|
|
@@ -375,14 +385,18 @@ import { calculateOption } from "../../common/options"
|
|
|
let i = this.checkedLinkList.findIndex(_=>_.RId == this.activeItem.RId);
|
|
|
if(i < 0) return false;
|
|
|
let arr = this.checkedLinkList[i].calculationMethod || [];
|
|
|
- return arr.find(_=>_.source == item.source);
|
|
|
+ return arr.find(_=>_.source == item.source || _.source == item.source2);
|
|
|
+ },
|
|
|
+ handleEditCal(v){ //编辑状态
|
|
|
+ this.calculationItem = v;
|
|
|
+ this.isOpenCalculationDia = true;
|
|
|
+ this.dialogDisplayNone = true;
|
|
|
},
|
|
|
clickCountItem(item){
|
|
|
let i = this.checkedLinkList.findIndex(_=>_.RId == this.activeItem.RId);
|
|
|
if(i < 0) return;
|
|
|
if(!this.checkedLinkList[i].calculationMethod) this.checkedLinkList[i].calculationMethod = [];
|
|
|
-
|
|
|
- let isChoosed = this.checkedLinkList[i].calculationMethod.findIndex(_=>_.source == item.source);
|
|
|
+ let isChoosed = this.checkedLinkList[i].calculationMethod.findIndex(_=>_.source == item.source || _.source == item.source2);
|
|
|
if(isChoosed >= 0){ //已经选中
|
|
|
this.checkedLinkList[i].calculationMethod.splice(isChoosed,1)
|
|
|
} else { //未选中
|
|
@@ -394,6 +408,7 @@ import { calculateOption } from "../../common/options"
|
|
|
} else {
|
|
|
this.calculationItem = item;
|
|
|
this.isOpenCalculationDia = true;
|
|
|
+ this.dialogDisplayNone = true;
|
|
|
}
|
|
|
};
|
|
|
this.handleThreeCalculation();
|
|
@@ -402,9 +417,8 @@ import { calculateOption } from "../../common/options"
|
|
|
let i = this.checkedLinkList.findIndex(_=>_.RId == this.activeItem.RId);
|
|
|
if(i < 0) return;
|
|
|
if(!this.checkedLinkList[i].calculationMethod) this.checkedLinkList[i].calculationMethod = [];
|
|
|
-
|
|
|
- let isChoosed = this.checkedLinkList[i].calculationMethod.findIndex(_=>_.source == item.source);
|
|
|
-
|
|
|
+ let x = this.calculateOption.find(_=>item.source == _.source || item.source == _.source2);
|
|
|
+ let isChoosed = this.checkedLinkList[i].calculationMethod.findIndex(_=>_.source == x.source || _.source == x.source2);
|
|
|
if(isChoosed >= 0) {
|
|
|
this.checkedLinkList[i].calculationMethod.splice(isChoosed,1);
|
|
|
}
|
|
@@ -561,6 +575,7 @@ import { calculateOption } from "../../common/options"
|
|
|
this.activeItemRId = item.RId
|
|
|
this.activeItem = item
|
|
|
this.addLinkSearchParams.linkType=item.Type
|
|
|
+ this.handleLinkListInShow();
|
|
|
if(item.Type==3){
|
|
|
if(!config.noInfo){
|
|
|
this.$message.info('研报类型的暂无回显')
|
|
@@ -706,6 +721,9 @@ import { calculateOption } from "../../common/options"
|
|
|
saveLink(){
|
|
|
this.$emit("saveLink", this.checkedLinkList);
|
|
|
},
|
|
|
+ handleCloseDialog(){
|
|
|
+ this.dialogDisplayNone = false;
|
|
|
+ },
|
|
|
cancelHandle(){
|
|
|
this.linkListInShow = [];
|
|
|
this.$emit("update:show", false);
|
|
@@ -751,7 +769,7 @@ import { calculateOption } from "../../common/options"
|
|
|
}
|
|
|
.link-count-item-on{
|
|
|
border: 1px solid #0052D9;
|
|
|
- color: #0052D9;
|
|
|
+ color: #666666;
|
|
|
background: #ECF2FE;
|
|
|
}
|
|
|
.link-count-item-un{
|