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,