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