|
|
|
@ -18,7 +18,7 @@
|
|
|
|
|
:current-node-key="currentNodekey"
|
|
|
|
|
:expand-on-click-node="true"
|
|
|
|
|
@node-click="handleNodeClick"
|
|
|
|
|
accordion
|
|
|
|
|
default-expand-all
|
|
|
|
|
>
|
|
|
|
|
<template class="custom-tree-node" slot-scope="{ node, data }">
|
|
|
|
|
<!-- <span>{{ data.name || data.mc }}</span> -->
|
|
|
|
@ -75,33 +75,44 @@
|
|
|
|
|
type="primary"
|
|
|
|
|
style="margin-left: 16px"
|
|
|
|
|
>
|
|
|
|
|
保存
|
|
|
|
|
绑定
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
@click="unBind"
|
|
|
|
|
type="primary"
|
|
|
|
|
:disabled="jbFlag"
|
|
|
|
|
style="margin-left: 16px"
|
|
|
|
|
>
|
|
|
|
|
解绑
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<el-divider></el-divider>
|
|
|
|
|
<p class="warnMsg">
|
|
|
|
|
<el-tag
|
|
|
|
|
type="warning"
|
|
|
|
|
v-for="(item, index) in warnMsg"
|
|
|
|
|
:key="index"
|
|
|
|
|
>{{ item }}</el-tag
|
|
|
|
|
>
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<div class="showMsgBox">
|
|
|
|
|
<p class="outsideLabel" v-for="(item, index) in bindInfoArray">
|
|
|
|
|
<span
|
|
|
|
|
>{{ item.comment }}
|
|
|
|
|
<b>({{ item.name }})</b>
|
|
|
|
|
</span>
|
|
|
|
|
<span>
|
|
|
|
|
<em
|
|
|
|
|
v-for="(item2, index2) in previewData"
|
|
|
|
|
:key="index2"
|
|
|
|
|
v-if="item.name == item2.colName"
|
|
|
|
|
>{{ item2.lastName }}</em
|
|
|
|
|
></span
|
|
|
|
|
<p class="warnMsg" v-if="warnMsg">
|
|
|
|
|
<el-tag
|
|
|
|
|
type="warning"
|
|
|
|
|
v-for="(item, index) in warnMsg"
|
|
|
|
|
:key="index"
|
|
|
|
|
>{{ item }}</el-tag
|
|
|
|
|
>
|
|
|
|
|
</p>
|
|
|
|
|
<div class="outside">
|
|
|
|
|
<p class="outsideLabel" v-for="(item, index) in bindInfoArray">
|
|
|
|
|
<span
|
|
|
|
|
>{{ item.comment }}
|
|
|
|
|
<b>({{ item.name }})</b>
|
|
|
|
|
</span>
|
|
|
|
|
<span>
|
|
|
|
|
<em
|
|
|
|
|
v-for="(item2, index2) in previewData"
|
|
|
|
|
:key="index2"
|
|
|
|
|
v-if="item.name == item2.colName"
|
|
|
|
|
>{{ item2.param }}</em
|
|
|
|
|
></span
|
|
|
|
|
>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -115,6 +126,7 @@ import {
|
|
|
|
|
iedListApi,
|
|
|
|
|
previewApi,
|
|
|
|
|
bindApi,
|
|
|
|
|
unbindApi,
|
|
|
|
|
generateParamindexApi,
|
|
|
|
|
} from "@/utils/api/index";
|
|
|
|
|
export default {
|
|
|
|
@ -145,6 +157,7 @@ export default {
|
|
|
|
|
defaultShow: true, //默认显示
|
|
|
|
|
drawer: false,
|
|
|
|
|
warnMsg: "",
|
|
|
|
|
jbFlag: false,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
watch: {},
|
|
|
|
@ -191,7 +204,13 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
console.log("aaaaaaaaaaa");
|
|
|
|
|
this.bindInfo = res.data;
|
|
|
|
|
if ((res.data.iedName == null) & (res.data.icdid == null)) {
|
|
|
|
|
this.jbFlag = true;
|
|
|
|
|
} else {
|
|
|
|
|
this.jbFlag = false;
|
|
|
|
|
}
|
|
|
|
|
if (res.data.columnList != null) {
|
|
|
|
|
this.bindInfoArray = res.data.columnList;
|
|
|
|
|
this.previewData = res.data.attList;
|
|
|
|
@ -222,6 +241,8 @@ export default {
|
|
|
|
|
//切换iedname
|
|
|
|
|
changeIedname(val) {
|
|
|
|
|
this.iedName = val;
|
|
|
|
|
this.ljName = "";
|
|
|
|
|
this.warnMsg = "";
|
|
|
|
|
console.log(this.iedName);
|
|
|
|
|
console.log(this.iedOptions.find((item) => item === val));
|
|
|
|
|
this.getinstList();
|
|
|
|
@ -251,17 +272,26 @@ export default {
|
|
|
|
|
console.log(val);
|
|
|
|
|
console.log(this.ljOptions.find((item) => item.paramIndex === val));
|
|
|
|
|
this.icdid = this.ljOptions.find((item) => item.paramIndex === val).id;
|
|
|
|
|
this.warnMsg = "";
|
|
|
|
|
previewApi({
|
|
|
|
|
eqmid: this.currentNodeKey,
|
|
|
|
|
icdid: this.icdid,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.previewData = res.data;
|
|
|
|
|
this.warnMsg = res.warnMsg.split("\n\r");
|
|
|
|
|
|
|
|
|
|
console.log(this.bindInfoArray);
|
|
|
|
|
console.log(this.previewData);
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.previewData = res.data;
|
|
|
|
|
this.warnMsg = res.warnMsg.split("\n\r");
|
|
|
|
|
console.log(this.warnMsg);
|
|
|
|
|
console.log(this.bindInfoArray);
|
|
|
|
|
console.log(this.previewData);
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: res.errorMsg,
|
|
|
|
|
type: "error",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err); //代码错误、请求失败捕获
|
|
|
|
@ -285,7 +315,7 @@ export default {
|
|
|
|
|
this.$message({
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: res.errorMsg,
|
|
|
|
|
type: "warning",
|
|
|
|
|
type: "error",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -315,6 +345,32 @@ export default {
|
|
|
|
|
console.log(err); //代码错误、请求失败捕获
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//解绑
|
|
|
|
|
unBind() {
|
|
|
|
|
unbindApi({
|
|
|
|
|
eqmid: this.currentNodeKey,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$message({
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: "解绑成功",
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
this.getBindList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: res.errorMsg,
|
|
|
|
|
type: "error",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err); //代码错误、请求失败捕获
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
@ -356,7 +412,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
.el-tree {
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
/* overflow-x: hidden; */
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
height: calc(100% - 40px);
|
|
|
|
|
.el-tree-node__content {
|
|
|
|
|
height: 32px;
|
|
|
|
@ -492,48 +548,54 @@ export default {
|
|
|
|
|
.el-divider--horizontal {
|
|
|
|
|
margin: 12px 0px;
|
|
|
|
|
}
|
|
|
|
|
.warnMsg {
|
|
|
|
|
padding: 0px 12px 0px 12px;
|
|
|
|
|
.el-tag {
|
|
|
|
|
margin-right: 12px;
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.showMsgBox {
|
|
|
|
|
width: calc(100% - 80px);
|
|
|
|
|
max-height: calc(100% - 64px);
|
|
|
|
|
|
|
|
|
|
padding: 0px 40px;
|
|
|
|
|
overflow: auto;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
.outsideLabel {
|
|
|
|
|
height: 40px;
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
.warnMsg {
|
|
|
|
|
//padding: 0px 12px 0px 12px;
|
|
|
|
|
|
|
|
|
|
.el-tag {
|
|
|
|
|
display: block;
|
|
|
|
|
margin-right: 12px;
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.outside {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
margin-top: 2px;
|
|
|
|
|
span {
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
.outsideLabel {
|
|
|
|
|
height: 40px;
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
min-width: 280px;
|
|
|
|
|
padding: 0px 12px;
|
|
|
|
|
width: max-content;
|
|
|
|
|
border: 1px solid #ededed;
|
|
|
|
|
text-align: center;
|
|
|
|
|
b {
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #666;
|
|
|
|
|
}
|
|
|
|
|
&:last-child {
|
|
|
|
|
width: 200px;
|
|
|
|
|
}
|
|
|
|
|
em {
|
|
|
|
|
font-style: normal;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
margin-top: 2px;
|
|
|
|
|
span {
|
|
|
|
|
height: 40px;
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
min-width: 280px;
|
|
|
|
|
padding: 0px 12px;
|
|
|
|
|
width: max-content;
|
|
|
|
|
border: 1px solid #ededed;
|
|
|
|
|
text-align: center;
|
|
|
|
|
b {
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #666;
|
|
|
|
|
}
|
|
|
|
|
&:last-child {
|
|
|
|
|
width: 200px;
|
|
|
|
|
}
|
|
|
|
|
em {
|
|
|
|
|
font-style: normal;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|