添加监测设备功能

master
fanluyan 1 year ago
parent 7fb6e3f0e1
commit f2863c5283

@ -145,7 +145,7 @@
<el-table-column
v-for="(column, index) in columns"
:key="index"
:label="column.fieldDesc"
:label="column.fieldDesc + '' + column.unit + ''"
:prop="column.field"
></el-table-column>
</el-table>
@ -288,29 +288,6 @@ export default {
return true;
}
},
handleNodeClick(data, node) {
console.log(data, node);
console.log(this.currentNodeKey);
if (data.hasOwnProperty("children")) {
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodeKey);
});
return;
}
// if (data.children?.length) {
// this.$nextTick(() => {
// this.$refs.tree.setCurrentKey(this.currentNodeKey);
// });
// return;
// }
this.currentNodeKey = data.id;
this.crrrentName = data.name;
this.currentId = data.id;
this.page = 1;
this.pageSize = 20;
this.handleSearch();
},
async getSubNodes() {
try {
@ -339,6 +316,29 @@ export default {
console.error("Failed to fetch sub-nodes:", error); //
}
},
handleNodeClick(data, node) {
console.log(data, node);
console.log(this.currentNodeKey);
if (data.hasOwnProperty("children")) {
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodeKey);
});
return;
}
// if (data.children?.length) {
// this.$nextTick(() => {
// this.$refs.tree.setCurrentKey(this.currentNodeKey);
// });
// return;
// }
this.currentNodeKey = data.id;
this.crrrentName = data.name;
this.currentId = data.id;
this.page = 1;
this.pageSize = 20;
this.handleSearch();
},
changestartdate(val) {
console.log(val);
if (val == null) {
@ -594,12 +594,12 @@ export default {
height: 100%;
//background: #fcc;
.leftTree {
min-width: 280px;
max-width: 280px;
min-width: 380px;
max-width: 380px;
height: 100%;
overflow: auto;
//border: 1px solid #fff;
margin-right: 16px;
margin-right: 12px;
background: rgba(8, 9, 36, 0.28);
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);

@ -40,10 +40,10 @@ export default {
name: "设备类型管理",
path: "/equipment/sblx",
},
{
name: "监测设备类型管理",
path: "/equipment/modevtype",
},
// {
// name: "",
// path: "/equipment/modevtype",
// },
{
name: "监测设备管理",
path: "/equipment/monitoring",

@ -55,8 +55,7 @@
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column prop="id" label="ID" width="50"> </el-table-column>
<el-table-column prop="zsbName" label="主设备名称" width="100">
</el-table-column>
<el-table-column prop="zsbName" label="主设备名称"> </el-table-column>
<el-table-column prop="name" label="名称"> </el-table-column>
<el-table-column
prop="phase"
@ -161,7 +160,7 @@ export default {
message: res.errorMsg,
type: "error",
});
this.$refs.upload.clearFiles();
// this.$refs.upload.clearFiles();
}
},
getmonitoringAllList() {

@ -14,7 +14,7 @@
:rules="rules"
:model="formInfo"
>
<el-form-item label="名称" prop="field">
<el-form-item label="字段" prop="field">
<el-input v-model="formInfo.field"></el-input>
</el-form-item>
<el-form-item label="单位:" prop="unit">

Loading…
Cancel
Save