feat: 报警管理替换设备名称输入框为设备选择下拉框

This commit is contained in:
LokerL 2024-12-15 20:26:23 +08:00
parent bf1f4b9ba1
commit 8fc9d373be
1 changed files with 11 additions and 2 deletions

View File

@ -5,7 +5,12 @@
<dept-tree @deptChange="handleDeptChange" style="width: 150px" /> <dept-tree @deptChange="handleDeptChange" style="width: 150px" />
</el-form-item> </el-form-item>
<el-form-item label="设备名称" prop="equipmentName"> <el-form-item label="设备名称" prop="equipmentName">
<el-input v-model="queryParams.name"></el-input> <device-select
v-model="queryParams.sn"
:deptId="queryParams.deptId || ''"
placeholder="请选择设备"
@change="handleDeviceSelectChange"
/>
</el-form-item> </el-form-item>
<!-- <el-form-item label="设备编号" prop="sn"> <!-- <el-form-item label="设备编号" prop="sn">
<el-input v-model="queryParams.sn"></el-input> <el-input v-model="queryParams.sn"></el-input>
@ -161,9 +166,10 @@ import dealAlarm from "@/views/demostrate/alarm/dealAlarm";
import DeptTree from "@/components/DeptTree/index.vue"; import DeptTree from "@/components/DeptTree/index.vue";
import { BmlHeatmap } from "vue-baidu-map"; // import { BmlHeatmap } from "vue-baidu-map"; //
import moment from "moment"; import moment from "moment";
import DeviceSelect from '@/components/DeviceSelect/index.vue';
export default { export default {
name: "alarm", name: "alarm",
components: { sendMsg, dealAlarm, DeptTree, BmlHeatmap }, components: { sendMsg, dealAlarm, DeptTree, BmlHeatmap, DeviceSelect },
dicts: [], dicts: [],
props: { props: {
queryParamsName: { queryParamsName: {
@ -330,6 +336,9 @@ export default {
this.mapDialogTitle = `读数:${row.ds}|低报值:${row.dbz}|高报值:${row.gbz}`; this.mapDialogTitle = `读数:${row.ds}|低报值:${row.dbz}|高报值:${row.gbz}`;
this.mapDialogVisible = true; this.mapDialogVisible = true;
}, },
handleDeviceSelectChange(val) {
this.queryParams.sn = val;
},
}, },
}; };
</script> </script>