监测设备
{
console.log(res);
- this.$message({
- duration: 1500,
- showClose: true,
- message: "文件删除成功",
- type: "success",
- });
- this.$parent.geticdList(this.colTableData.iedName, this.colIndex);
+ if (res.success) {
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ message: "删除成功",
+ type: "success",
+ });
+ this.$parent.geticdList(
+ this.colTableData.iedName,
+ this.colIndex
+ );
+ } else {
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ type: "error",
+ message: res.errorMsg,
+ });
+ }
})
.catch((err) => {});
//this.getactivityList();
diff --git a/src/views/icdConfig/index.vue b/src/views/icdConfig/index.vue
index f7933bac..2f90b130 100644
--- a/src/views/icdConfig/index.vue
+++ b/src/views/icdConfig/index.vue
@@ -192,7 +192,7 @@ export default {
this.$message({
duration: 1500,
showClose: true,
- message: "文件上传失败,请重新上传",
+ message: res.errorMsg,
type: "error",
});
this.$refs.upload.clearFiles();
@@ -291,13 +291,22 @@ export default {
})
.then((res) => {
console.log(res);
- this.$message({
- duration: 1500,
- showClose: true,
- message: "文件删除成功",
- type: "success",
- });
- this.geticdList(val.iedName);
+ if (res.success) {
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ message: "文件删除成功",
+ type: "success",
+ });
+ this.geticdList(val.iedName);
+ } else {
+ this.$message({
+ duration: 1500,
+ showClose: true,
+ type: "error",
+ message: res.errorMsg,
+ });
+ }
})
.catch((err) => {});
//this.getactivityList();
diff --git a/src/views/paramBinding/index.vue b/src/views/paramBinding/index.vue
index 44c1ea29..3c4f0c6f 100644
--- a/src/views/paramBinding/index.vue
+++ b/src/views/paramBinding/index.vue
@@ -18,7 +18,7 @@
:current-node-key="currentNodekey"
:expand-on-click-node="true"
@node-click="handleNodeClick"
- accordion
+ default-expand-all
>
@@ -75,33 +75,44 @@
type="primary"
style="margin-left: 16px"
>
- 保存
+ 绑定
+
+
+ 解绑
-
- {{ item }}
-
+
-
- {{ item.comment }}
- ({{ item.name }})
-
-
- {{ item2.lastName }}
+ {{ item }}
+
+
+ {{ item.comment }}
+ ({{ item.name }})
+
+
+ {{ item2.param }}
+
+
@@ -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); //代码错误、请求失败捕获
+ });
+ },
},
};
@@ -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;
+ }
}
}
}
diff --git a/vue.config.js b/vue.config.js
index 1f38d1a8..a393c6ce 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -2,12 +2,12 @@ const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
//打包清除console
- chainWebpack(config) {
- config.optimization.minimizer("terser").tap((args) => {
- args[0].terserOptions.compress.drop_console = true;
- return args;
- });
- },
+ // chainWebpack(config) {
+ // config.optimization.minimizer("terser").tap((args) => {
+ // args[0].terserOptions.compress.drop_console = true;
+ // return args;
+ // });
+ // },
productionSourceMap: false, // 生产环境是否要生成 sourceMap
publicPath: process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : "./", // 部署应用包时的基本 URL
// assetsPublicPath: process.env.NODE_ENV === "production" ? "" : "/",