diff --git a/imt-ui/src/views/system/alarm/equipalarmdata/index.vue b/imt-ui/src/views/system/alarm/equipalarmdata/index.vue index 9074831..d6c3214 100644 --- a/imt-ui/src/views/system/alarm/equipalarmdata/index.vue +++ b/imt-ui/src/views/system/alarm/equipalarmdata/index.vue @@ -10,13 +10,17 @@ label-width="68px" style="text-align:right" > - + + @change="cascaderChange" + > import * as EquipAlarmDataApi from "@/api/system/alarm/equipalarmdata"; import EquipAlarmDataForm from "./EquipAlarmDataForm.vue"; -import {getEquipCascader, getEquipSelection} from "@/api/system/equip/equipInfo"; +import { + getEquipCascader, + getEquipSelection, +} from "@/api/system/equip/equipInfo"; export default { name: "EquipAlarmData", components: { @@ -283,7 +290,7 @@ export default { }, data() { return { - cascaderValue:[], + cascaderValue: [], equipCascader: [], // 遮罩层 loading: true, @@ -321,10 +328,10 @@ export default { this.getList(); }, methods: { - cascaderChange(value){ - if (value.length > 0){ + cascaderChange(value) { + if (value.length > 0) { this.queryParams.equipId = value[1]; - }else { + } else { this.queryParams.equipId = null; } }, @@ -335,14 +342,14 @@ export default { const res = await EquipAlarmDataApi.getEquipAlarmDataPage( this.queryParams ); - await getEquipCascader().then(res=>{ - res.forEach(item=>{ - if (item.children == null){ + await getEquipCascader().then((res) => { + res.forEach((item) => { + if (item.children == null) { item.disabled = true; } - }) + }); this.equipCascader = res; - }) + }); this.list = res.data.list; this.total = res.data.total; } finally {