From b82b97ebb14f839c9ca374874e211e6e7e4a1609 Mon Sep 17 00:00:00 2001 From: zhaohy <1695786511@qq.com> Date: Mon, 22 Jul 2024 11:38:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=91=8A=E8=AD=A6=20=20=E8=83=BD=E6=BA=90=E5=91=8A=E8=AD=A6=20?= =?UTF-8?q?=E5=9B=9E=E6=98=BE=20=E6=B7=BB=E5=8A=A0=E4=B9=8B=E5=90=8E=20?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E9=80=9A=E7=9F=A5=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/alarmManagement/alarmSettings/index.vue | 2 ++ .../alarmSettings/ts/energyAlarmConfig.ts | 4 +-- .../alarmSettings/ts/equipmentAlarmConfig.ts | 4 +-- .../view/alarmManagement/equipmentAlarm/status.vue | 39 ++++++++++++---------- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue index 46f7807..2cce3b9 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue @@ -274,10 +274,12 @@ // 设备告警 编辑或添加成功 刷新列表 const editObject = () => { mainRefEquipmentAlarm.value?.nsTableRef.reload(); + mainRef.value?.nsTableRef.reload(); }; // 能源告警 编辑或添加成功 刷新列表 const editeEnergyAlarmInfo = () => { mainEnergyAlarmConfig.value?.nsTableRef.reload(); + mainRef.value?.nsTableRef.reload(); }; return { notificationConfig, diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts index 86059b8..d1e199d 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts @@ -117,9 +117,7 @@ export const energyAlarmConfigs = ( if (obj.monitorFrequency) { obj.monitorFrequency = data.monitorFrequency.value; } - if (obj.createWorkOrder) { - obj.createWorkOrder = data.createWorkOrder + ''; - } + obj.createWorkOrder = obj.createWorkOrder + ''; if (obj.alarmFrequency !== 2) { obj.repetitions = null; obj.intervalDuration = null; diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts index 2aba285..656c80b 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts @@ -114,9 +114,7 @@ export const equipmentAlarmTableConfig = ( if (obj.intervalDurationUnit) { obj.intervalDurationUnit = data.intervalDurationUnit.value; } - if (obj.createWorkOrder) { - obj.createWorkOrder = data.createWorkOrder + ''; - } + obj.createWorkOrder = obj.createWorkOrder + ''; if (obj.alarmFrequency !== 2) { obj.repetitions = null; obj.intervalDuration = null; diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue index d3e369b..5c4755a 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue @@ -63,14 +63,14 @@ const visible = ref(false); const showEdit = ref(true); const infoObject = ref({}); - const data = ref({}); + const equipmentAlarm = ref({}); const statusOptions = ref(); const logList = ref([ - { name: '李四', status: '3', time: '2024-03-10 10:00:00', desc: '完成' }, - { name: '王五', status: '5', time: '2024-03-10 10:00:00' }, - { name: '王五', status: '4', time: '2024-03-10 10:00:00' }, - { name: '王五', status: '2', time: '2024-03-10 10:00:00', desc: '创建工单' }, - { name: '赵六', status: '1', time: '2024-03-10 10:00:00' }, + { name: '李四', status: 3, time: '2024-03-10 10:00:00', desc: '完成' }, + { name: '王五', status: 5, time: '2024-03-10 10:00:00' }, + { name: '王五', status: 4, time: '2024-03-10 10:00:00' }, + { name: '王五', status: 2, time: '2024-03-10 10:00:00', desc: '创建工单' }, + { name: '赵六', status: 1, time: '2024-03-10 10:00:00' }, ]); const config = ref({ size: logList.value.length, @@ -81,25 +81,28 @@ }; const btnClick = () => { NsMessage.success('操作成功'); + delete infoObject.value.time; + console.log(infoObject.value, equipmentAlarm.value, '操作'); console.log('btnClick'); }; const toggle = (data) => { - data.value = data; + console.log(data, '数据'); + equipmentAlarm.value = data; infoObject.value = { ...logList.value[0] }; - if (data.value.createWorkOrder === 1) { + if (equipmentAlarm.value.createWorkOrder === 1) { statusOptions.value = [ - { value: '1', label: '待处理' }, - { value: '2', label: '处理中' }, - { value: '3', label: '已完成' }, - { value: '4', label: '超时' }, - { value: '5', label: '已关闭' }, + { value: 1, label: '待处理' }, + { value: 2, label: '处理中' }, + { value: 3, label: '已完成' }, + { value: 4, label: '超时' }, + { value: 5, label: '已关闭' }, ]; } else { statusOptions.value = [ - { value: '1', label: '待处理' }, - { value: '2', label: '处理中' }, - { value: '3', label: '已完成' }, - { value: '5', label: '已关闭' }, + { value: 1, label: '待处理' }, + { value: 2, label: '处理中' }, + { value: 3, label: '已完成' }, + { value: 5, label: '已关闭' }, ]; } let statusMap = { @@ -126,7 +129,7 @@ return { infoObject, showEdit, - data, + equipmentAlarm, statusOptions, btnClick, visible,