diff --git a/hx-ai-intelligent/src/api/alarmManagement/equipmentAlarm.ts b/hx-ai-intelligent/src/api/alarmManagement/equipmentAlarm.ts index b3f80fd..3be9a50 100644 --- a/hx-ai-intelligent/src/api/alarmManagement/equipmentAlarm.ts +++ b/hx-ai-intelligent/src/api/alarmManagement/equipmentAlarm.ts @@ -1,4 +1,5 @@ export enum equipmentAlarmApi { getTableList = '/carbon-smart/api/AlarmEquipmentLog/selectAlarmEquipmentLog', //设备告警 列表 getCodeList = '/carbon-smart/api/AlarmEquipmentLog/selectErrorCodeList', //设备告警 列表 + getSelectAlarmEquipmentLogStatusProcess = '/carbon-smart/api/AlarmEquipmentLogStatusProcess/selectAlarmEquipmentLogStatusProcess', //设备告警 状态 没有创建工单log接口 } diff --git a/hx-ai-intelligent/src/components/ns-steps.vue b/hx-ai-intelligent/src/components/ns-steps.vue index 9903135..d164d0c 100644 --- a/hx-ai-intelligent/src/components/ns-steps.vue +++ b/hx-ai-intelligent/src/components/ns-steps.vue @@ -8,12 +8,12 @@ diff --git a/hx-ai-intelligent/src/icon/status-1.svg b/hx-ai-intelligent/src/icon/state-1.svg similarity index 100% rename from hx-ai-intelligent/src/icon/status-1.svg rename to hx-ai-intelligent/src/icon/state-1.svg diff --git a/hx-ai-intelligent/src/icon/status-2.svg b/hx-ai-intelligent/src/icon/state-2.svg similarity index 100% rename from hx-ai-intelligent/src/icon/status-2.svg rename to hx-ai-intelligent/src/icon/state-2.svg diff --git a/hx-ai-intelligent/src/icon/status-3.svg b/hx-ai-intelligent/src/icon/state-3.svg similarity index 100% rename from hx-ai-intelligent/src/icon/status-3.svg rename to hx-ai-intelligent/src/icon/state-3.svg diff --git a/hx-ai-intelligent/src/icon/status-4.svg b/hx-ai-intelligent/src/icon/state-4.svg similarity index 100% rename from hx-ai-intelligent/src/icon/status-4.svg rename to hx-ai-intelligent/src/icon/state-4.svg diff --git a/hx-ai-intelligent/src/icon/status-5.svg b/hx-ai-intelligent/src/icon/state-5.svg similarity index 100% rename from hx-ai-intelligent/src/icon/status-5.svg rename to hx-ai-intelligent/src/icon/state-5.svg diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue index 5c4755a..53c6a15 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue @@ -12,22 +12,22 @@
- + + :createName="showEdit ? 'bianji' : 'baocun'" /> - + { + equipmentAlarm.value = P; visible.value = false; }; const btnClick = () => { NsMessage.success('操作成功'); - delete infoObject.value.time; + delete infoObject.value.createTime; console.log(infoObject.value, equipmentAlarm.value, '操作'); console.log('btnClick'); }; - const toggle = (data) => { - console.log(data, '数据'); - equipmentAlarm.value = data; + //修改状态 + const changeShowEdit = () => { + if (equipmentAlarm.value.createWorkOrder === 1) { + showEdit.value = !showEdit.value; + } + }; + const toggle = async (data) => { + equipmentAlarm.value = { ...data }; infoObject.value = { ...logList.value[0] }; + await http + .post(equipmentAlarmApi.getSelectAlarmEquipmentLogStatusProcess, { + id: data.id, + }) + .then((res) => { + console.log(res); + }); if (equipmentAlarm.value.createWorkOrder === 1) { - statusOptions.value = [ + stateOptions.value = [ { value: 1, label: '待处理' }, { value: 2, label: '处理中' }, { value: 3, label: '已完成' }, @@ -98,7 +113,7 @@ { value: 5, label: '已关闭' }, ]; } else { - statusOptions.value = [ + stateOptions.value = [ { value: 1, label: '待处理' }, { value: 2, label: '处理中' }, { value: 3, label: '已完成' }, @@ -120,17 +135,18 @@ 5: '#a6a6a6', }; logList.value.forEach((item) => { - item.statusName = statusMap[item.status]; - item.color = colorMap[item.status]; - item.src = 'status-' + item.status; + item.stateName = statusMap[item.state]; + item.color = colorMap[item.state]; + item.src = 'state-' + item.state; }); visible.value = true; }; return { infoObject, + changeShowEdit, showEdit, equipmentAlarm, - statusOptions, + stateOptions, btnClick, visible, logList, diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts index 35cfd8a..27ced80 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts @@ -8,6 +8,7 @@ const tableKeyMap = [ { title: '序号', dataIndex: 'address', + width: 80, customRender: (text: any) => { return text.index + 1; },