From 6db4568c1933fb87f47cd525129d57e7f6540ee9 Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Wed, 9 Oct 2024 16:01:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=B1=95=E7=A4=BA=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9D=A1=E4=BB=B6=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/govern/alarm/Device.vue | 17 ++++- src/views/govern/alarm/Steady.vue | 25 ++++++-- src/views/govern/alarm/Transient.vue | 94 ++++++++++++++++++++-------- 3 files changed, 102 insertions(+), 34 deletions(-) diff --git a/src/views/govern/alarm/Device.vue b/src/views/govern/alarm/Device.vue index 22dd70c..cba533c 100644 --- a/src/views/govern/alarm/Device.vue +++ b/src/views/govern/alarm/Device.vue @@ -74,9 +74,9 @@ const tableStore = new TableStore({ method: 'POST', publicHeight: 65, column: [ + { title: '设备名称', field: 'equipmentName', align: 'center' }, { title: '工程名称', field: 'engineeringName', align: 'center' }, { title: '项目名称', field: 'projectName', align: 'center' }, - { title: '设备名称', field: 'equipmentName', align: 'center' }, { title: '告警代码', field: 'code', align: 'center' }, { title: '事件描述', field: 'showName', align: 'center' }, { title: '发生时刻', field: 'startTime', align: 'center' } @@ -106,7 +106,20 @@ tableStore.table.params.userId = '' const sourceChange = (e: any) => { tableStore.table.params.engineeringid = e[1] || '' tableStore.table.params.projectId = e[2] || '' - tableStore.table.params.deviceId = e[2] || '' + const zlIndex = props.deviceTree.findIndex((item: any) => { + return item.name == '治理设备' + }) + const bxsIndex = props.deviceTree.findIndex((item: any) => { + return item.name == '便携式设备' + }) + //便携式设备特殊处理 + if (props.deviceTree[bxsIndex].id == e[0] && e.length == 2) { + tableStore.table.params.deviceId = e[1] + } + //治理设备 + if (props.deviceTree[zlIndex].id == e[0]) { + tableStore.table.params.deviceId = e[2] || '' + } } onMounted(() => { diff --git a/src/views/govern/alarm/Steady.vue b/src/views/govern/alarm/Steady.vue index 1f1a5f0..662df17 100644 --- a/src/views/govern/alarm/Steady.vue +++ b/src/views/govern/alarm/Steady.vue @@ -13,7 +13,7 @@ > - + @@ -72,11 +72,11 @@ const rankOptions = ref([ const tableStore = new TableStore({ url: '/cs-harmonic-boot/eventUser/queryEventpage', method: 'POST', - publicHeight:65, + publicHeight: 65, column: [ + { title: '设备名称', field: 'equipmentName', align: 'center' }, { title: '工程名称', field: 'engineeringName', align: 'center' }, { title: '项目名称', field: 'projectName', align: 'center' }, - { title: '设备名称', field: 'equipmentName', align: 'center' }, { title: '事件描述', field: 'showName', align: 'center' }, { title: '发生时刻', field: 'startTime', align: 'center' } ], @@ -100,12 +100,25 @@ tableStore.table.params.status = '' tableStore.table.params.target = [] tableStore.table.params.userId = '' tableStore.table.params.cascader = '' -tableStore.table.params.level='' +// tableStore.table.params.level='' const sourceChange = (e: any) => { tableStore.table.params.engineeringid = e[1] || '' tableStore.table.params.projectId = e[2] || '' - tableStore.table.params.deviceId = e[2] || '' + const zlIndex = props.deviceTree.findIndex((item: any) => { + return item.name == '治理设备' + }) + const bxsIndex = props.deviceTree.findIndex((item: any) => { + return item.name == '便携式设备' + }) + //便携式设备特殊处理 + if (props.deviceTree[bxsIndex].id == e[0] && e.length == 2) { + tableStore.table.params.deviceId = e[1] + } + //治理设备 + if (props.deviceTree[zlIndex].id == e[0]) { + tableStore.table.params.deviceId = e[2] || '' + } } onMounted(() => { diff --git a/src/views/govern/alarm/Transient.vue b/src/views/govern/alarm/Transient.vue index aa8c8df..747667c 100644 --- a/src/views/govern/alarm/Transient.vue +++ b/src/views/govern/alarm/Transient.vue @@ -3,17 +3,23 @@ @@ -23,31 +29,56 @@
- 值类型选择: + 值类型选择: - +
-
- + 返回
- - - + + - - - + + @@ -102,9 +133,9 @@ const tableStore = new TableStore({ method: 'POST', publicHeight: 65, column: [ + { title: '设备名称', field: 'equipmentName', align: 'center' }, { title: '工程名称', field: 'engineeringName', align: 'center' }, { title: '项目名称', field: 'projectName', align: 'center' }, - { title: '设备名称', field: 'equipmentName', align: 'center' }, { title: '事件描述', field: 'showName', align: 'center' }, { title: '事件发生位置', field: 'evtParamPosition', align: 'center' }, { title: '相别', field: 'evtParamPhase', align: 'center' }, @@ -151,9 +182,7 @@ const tableStore = new TableStore({ render: 'basicButton', disabled: row => { return !(!row.wavePath && row.evtParamTm < 20) - }, - - + } } ] } @@ -184,12 +213,25 @@ tableStore.table.params.status = '' tableStore.table.params.target = [] tableStore.table.params.userId = '' tableStore.table.params.cascader = '' -tableStore.table.params.level='' +// tableStore.table.params.level='' const sourceChange = (e: any) => { tableStore.table.params.engineeringid = e[1] || '' tableStore.table.params.projectId = e[2] || '' - tableStore.table.params.deviceId = e[2] || '' + const zlIndex = props.deviceTree.findIndex((item: any) => { + return item.name == '治理设备' + }) + const bxsIndex = props.deviceTree.findIndex((item: any) => { + return item.name == '便携式设备' + }) + //便携式设备特殊处理 + if (props.deviceTree[bxsIndex].id == e[0] && e.length == 2) { + tableStore.table.params.deviceId = e[1] + } + //治理设备 + if (props.deviceTree[zlIndex].id == e[0]) { + tableStore.table.params.deviceId = e[2] || '' + } } const getboxin = async (row: any) => { console.log('🚀 ~ getboxin ~ row:', row) @@ -231,6 +273,6 @@ setTimeout(() => { tableStore.table.height = mainHeight(200).height as any }, 0) -const addMenu = () => { } +const addMenu = () => {}