From 6a19cccaef4acc91e8a9898085c886eb793dd599 Mon Sep 17 00:00:00 2001 From: zhangjunwen Date: Fri, 20 Sep 2024 15:21:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=8A=A5=E8=AD=A6=E5=92=8C?= =?UTF-8?q?=E8=B6=8B=E5=8A=BF=E6=8A=A5=E8=AD=A6=E8=8F=9C=E5=8D=95=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/alarm/equipalarmdata/index.vue | 32 ++++++++++------- .../system/alarm/equiptrendalarm/index.vue | 35 +++++++++++-------- 2 files changed, 41 insertions(+), 26 deletions(-) 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 {