添加参数绑定

master
fanluyan 1 year ago
parent a9e7deff78
commit 9d478648b2

BIN
dist/favicon.ico vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

1
dist/index.html vendored

@ -1 +0,0 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>cacfrontend</title><script defer="defer" src="static/js/chunk-vendors.b4199f52.js"></script><script defer="defer" src="static/js/app.bef6aa9a.js"></script><link href="static/css/app.c8924e65.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but cacfrontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

@ -1 +0,0 @@
.systemManagement{display:flex}.systemManagement .leftTree{width:200px;height:500px;border:1px solid #fff;margin-right:24px}.systemManagement .reportTable{flex:1}

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

@ -1 +0,0 @@
"use strict";(self["webpackChunkcacfrontend"]=self["webpackChunkcacfrontend"]||[]).push([[264],{8264:function(t,e,n){n.r(e),n.d(e,{default:function(){return u}});var s=function(){var t=this;t._self._c;return t._m(0)},r=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"dataReport"},[e("div",{staticClass:"leftTree"},[t._v("系统管理")]),e("div",{staticClass:"reportTable"},[t._v("wqdqdw")])])}],a=n(1001),c={},l=(0,a.Z)(c,s,r,!1,null,null,null),u=l.exports}}]);

@ -111,6 +111,17 @@ export function icdupdateAttApi(data) {
data,
});
}
//删除
export function deleteAttApi(data) {
return request({
url: "/icdconfig/deleteAtt",
method: "post",
params: data,
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
},
});
}
//设备台账管理列表api
//变电站相关接口
@ -397,9 +408,22 @@ export function previewApi(data) {
return request({
url: "/parambind/preview",
method: "post",
params: data,
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
},
data,
});
}
//绑定
export function bindApi(data) {
return request({
url: "/parambind/bind",
method: "post",
data,
});
}
export function generateParamindexApi(data) {
return request({
url: "/parambind/generateParamindex",
method: "post",
data,
});
}

@ -16,9 +16,9 @@
style="width: 100%"
height="calc(100% - 0px)"
>
<el-table-column prop="doName" label="doName"> </el-table-column>
<el-table-column prop="lastName" label="lastName"> </el-table-column>
<el-table-column prop="colName" label="colName">
<el-table-column prop="doName" label="属性"> </el-table-column>
<el-table-column prop="param" label="参数"> </el-table-column>
<el-table-column prop="colName" label="字段名">
<template slot-scope="scope">
<el-select
v-show="scope.$index == cellIndex"
@ -51,7 +51,7 @@
size="small"
icon="el-icon-document"
>
colName配置
配置字段名
</el-link>
<el-link
v-else
@ -62,13 +62,13 @@
>
保存
</el-link>
<!-- <el-link
type="primary"
@click="handlecolEditClick(scope.row)"
<el-link
type="danger"
@click="handleDeleteClick(scope.row)"
size="small"
icon="el-icon-document"
>修改</el-link
> -->
icon="el-icon-delete"
>删除</el-link
>
</template>
</el-table-column>
</el-table>
@ -80,7 +80,7 @@
</div>
</template>
<script>
import { colListApi, icdupdateAttApi } from "@/utils/api/index";
import { colListApi, icdupdateAttApi, deleteAttApi } from "@/utils/api/index";
export default {
props: ["colChildData"],
data() {
@ -113,7 +113,7 @@ export default {
methods: {
//
handlecolEditClick({ $index, row }) {
this.colName = "";
this.colName = row.colName;
this.cellIndex = $index;
this.colData = row;
},
@ -145,6 +145,33 @@ export default {
console.log(err); //
});
},
//icd
handleDeleteClick(val) {
console.log(val);
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteAttApi({
attid: val.id,
})
.then((res) => {
console.log(res);
this.$message({
duration: 1500,
showClose: true,
message: "文件删除成功",
type: "success",
});
this.$parent.geticdList(this.colTableData.iedName, this.colIndex);
})
.catch((err) => {});
//this.getactivityList();
})
.catch(() => {});
},
display(val, index) {
this.colDialogshow = true;
this.colTableData = val;

@ -49,12 +49,12 @@
style="width: 100%"
height="calc(100% - 40px)"
>
<el-table-column prop="iedName" label="iedName"> </el-table-column>
<el-table-column prop="ldeviceInst" label="ldeviceInst">
<el-table-column prop="iedName" label="ied名称"> </el-table-column>
<el-table-column prop="ldeviceInst" label="设备类型">
</el-table-column>
<el-table-column prop="lnClass" label="lnClass"> </el-table-column>
<el-table-column prop="lnClass" label="ln类型"> </el-table-column>
<!-- <el-table-column prop="doName" label="doName"> </el-table-column> -->
<el-table-column prop="tableName" label="tableName">
<el-table-column prop="tableName" label="表名">
<template slot-scope="scope">
<el-select
v-show="scope.$index == cellIndex"
@ -86,7 +86,7 @@
size="small"
icon="el-icon-document"
>
tableName配置
配置表名
</el-link>
<el-link
v-else
@ -98,12 +98,12 @@
保存
</el-link>
<el-link
:disabled="disableFlag"
:disabled="disableFlag && scope.row.tableName == ''"
type="primary"
@click="handlecolConfigClick(scope)"
size="small"
icon="el-icon-document"
>colName配置</el-link
>配置字段名</el-link
>
<el-link
type="danger"
@ -244,8 +244,9 @@ export default {
},
//icd
handleEditClick({ $index, row }) {
this.tableName = "";
// this.tableName = "";
this.tableSelectShow = true;
this.tableName = row.tableName;
this.cellIndex = $index;
this.disableFlag = true;
},

@ -1,7 +1,12 @@
<template>
<div class="paramBindingBox">
<div class="leftTree">
<h3>设备列表</h3>
<h3>
设备列表
<el-button type="primary" @click="generate" size="mini"
>生成rptparamindex</el-button
>
</h3>
<div class="treeBox">
<el-tree
ref="tree"
@ -64,9 +69,40 @@
></el-option>
</el-select>
</div>
<el-button
:disabled="ljName == '' || iedName == ''"
@click="saveBind"
type="primary"
style="margin-left: 16px"
>
保存
</el-button>
</div>
<el-divider></el-divider>
{{ bindInfo }}
<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>
</div>
</div>
</div>
</div>
@ -78,6 +114,8 @@ import {
getBindApi,
iedListApi,
previewApi,
bindApi,
generateParamindexApi,
} from "@/utils/api/index";
export default {
name: "paramBinding",
@ -97,14 +135,19 @@ export default {
label: "mc",
},
bindInfo: "", //
bindInfoArray: "",
iedName: "", //iedname
iedOptions: [],
ljName: "",
ljOptions: [],
icdid: "",
previewData: [],
defaultShow: true, //
drawer: false,
warnMsg: "",
};
},
watch: {},
computed: {},
created() {
this.getParamTreeList();
@ -149,6 +192,17 @@ export default {
.then((res) => {
console.log(res);
this.bindInfo = res.data;
if (res.data.columnList != null) {
this.bindInfoArray = res.data.columnList;
this.previewData = res.data.attList;
this.iedName = res.data.iedName;
this.icdid = res.data.icdid;
this.changeIedname(this.iedName);
} else {
this.iedName = "";
this.ljOptions = [];
this.ljName = "";
}
})
.catch((err) => {
console.log(err); //
@ -180,6 +234,13 @@ export default {
.then((res) => {
console.log(res);
this.ljOptions = res.data;
if (this.icdid !== null) {
this.ljName = this.ljOptions.find(
(item) => item.id === this.icdid
).paramIndex;
} else {
this.ljName = "";
}
})
.catch((err) => {
console.log(err); //
@ -196,7 +257,59 @@ export default {
})
.then((res) => {
console.log(res);
this.ljOptions = res.data;
this.previewData = res.data;
this.warnMsg = res.warnMsg.split("\n\r");
console.log(this.bindInfoArray);
console.log(this.previewData);
})
.catch((err) => {
console.log(err); //
});
},
//
saveBind() {
bindApi({
eqmid: this.currentNodeKey,
icdid: this.icdid,
})
.then((res) => {
console.log(res);
if (res.success) {
this.$message({
showClose: true,
message: "保存成功",
type: "success",
});
} else {
this.$message({
showClose: true,
message: res.errorMsg,
type: "warning",
});
}
})
.catch((err) => {
console.log(err); //
});
},
generate() {
generateParamindexApi()
.then((res) => {
console.log(res);
if (res.success) {
this.$message({
showClose: true,
message: "生成成功",
type: "success",
});
} else {
this.$message({
showClose: true,
message: res.data,
type: "error",
});
}
})
.catch((err) => {
console.log(err); //
@ -227,6 +340,9 @@ export default {
font-weight: normal;
height: 40px;
line-height: 40px;
display: flex;
justify-content: space-between;
align-items: center;
}
.treeBox {
width: 100%;
@ -376,6 +492,52 @@ 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;
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;
}
}
}
}
}
}
}

Loading…
Cancel
Save