添加监测设备功能

master
fanluyan 1 year ago
parent 7fb6e3f0e1
commit f2863c5283

@ -145,7 +145,7 @@
<el-table-column <el-table-column
v-for="(column, index) in columns" v-for="(column, index) in columns"
:key="index" :key="index"
:label="column.fieldDesc" :label="column.fieldDesc + '' + column.unit + ''"
:prop="column.field" :prop="column.field"
></el-table-column> ></el-table-column>
</el-table> </el-table>
@ -288,29 +288,6 @@ export default {
return true; 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() { async getSubNodes() {
try { try {
@ -339,6 +316,29 @@ export default {
console.error("Failed to fetch sub-nodes:", error); // 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) { changestartdate(val) {
console.log(val); console.log(val);
if (val == null) { if (val == null) {
@ -594,12 +594,12 @@ export default {
height: 100%; height: 100%;
//background: #fcc; //background: #fcc;
.leftTree { .leftTree {
min-width: 280px; min-width: 380px;
max-width: 280px; max-width: 380px;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
//border: 1px solid #fff; //border: 1px solid #fff;
margin-right: 16px; margin-right: 12px;
background: rgba(8, 9, 36, 0.28); background: rgba(8, 9, 36, 0.28);
-webkit-backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px); backdrop-filter: blur(10px);

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

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

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

Loading…
Cancel
Save