diff --git a/hx-ai-intelligent/src/components/ns-steps.vue b/hx-ai-intelligent/src/components/ns-steps.vue index d164d0c..54c8ce3 100644 --- a/hx-ai-intelligent/src/components/ns-steps.vue +++ b/hx-ai-intelligent/src/components/ns-steps.vue @@ -9,7 +9,7 @@
{{ item.stateName }} -
{{ item.createName }}
+
{{ item.realName }}
{{ item.createTime }}
diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue index 9e05fda..b4a2cc2 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue @@ -20,7 +20,7 @@
- +
diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue index 8ff8e1e..ffab04e 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue @@ -288,7 +288,7 @@ }, ], }, - params: { energyConsumptionAlarmId: value.id }, + params: { energyConsumptionAlarmId: value.id, orgId: orgId.value }, // pagination: { pageSizeOptions: false }, rowKey: 'id', }; diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue index d5f1fad..efe9f92 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue @@ -394,6 +394,9 @@ formRef.value.validate().then(() => { //处理数据 let data = { ...infoObject.value }; + if (!data.orgId) { + data.orgId = orgId.value; + } //关联能耗告警id data.energyConsumptionAlarmId = energyAlarm.value.id; data.errorCode = energyAlarm.value.errorCode; diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue index 4fca329..9d20d37 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue @@ -87,6 +87,11 @@ infoObject.value.intervalDurationUnit = 1; } }; + //组织id + const orgId = ref(''); + const result = JSON.parse(sessionStorage.getItem('ORGID')!); + orgId.value = result; + //表单数据 const infoObject = ref({ alarmTitle: null, @@ -94,6 +99,7 @@ priority: null, monitorFrequency: null, createWorkOrder: null, + orgId: null, enableRules: 0, }); const formRef = ref(); @@ -245,6 +251,9 @@ //表单校验 formRef.value.validate().then(() => { let data = { ...infoObject.value }; + if (!data.orgId) { + data.orgId = orgId.value; + } data.createWorkOrder = Number(data.createWorkOrder); if (data.alarmFrequency !== 2) { data.repetitions = null; diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue index cdf021e..e8fcf98 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue @@ -279,7 +279,7 @@ }, ], }, - params: { equipmentAlarmId: value.id }, + params: { equipmentAlarmId: value.id, orgId: orgId.value }, // pagination: { pageSizeOptions: false }, rowKey: 'id', }; diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue index cd66023..4818fab 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue @@ -412,6 +412,9 @@ //数据是否验证通过 formRef.value.validate().then(() => { let data = { ...infoObject.value }; + if (!data.orgId) { + data.orgId = orgId.value; + } // 配置关联id data.equipmentAlarmId = equipmentAlarm.value.id; // 逻辑列表 diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue index 5bef45f..cb947bb 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue @@ -87,6 +87,10 @@ import { deviceAlarms } from '/@/api/alarmManagement/alarmSettings/deviceAlarms'; const visible = ref(false); + //组织id + const orgId = ref(''); + const result = JSON.parse(sessionStorage.getItem('ORGID')!); + orgId.value = result; //表单数据 const infoObject = ref({ id: null, @@ -316,6 +320,9 @@ data.intervalDuration = null; data.intervalDurationUnit = null; } + if (!data.orgId) { + data.orgId = orgId.value; + } http.post(deviceAlarms.addOrUpNewData, data).then(() => { if (infoObject.value.id) { NsMessage.success('告警编辑成功'); 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 d1e199d..037d9c6 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts @@ -1,7 +1,11 @@ import { http } from '/nerv-lib/util'; import { NsMessage } from '/nerv-lib/component'; import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm'; +import { ref } from 'vue'; +const orgId = ref(''); +const result = JSON.parse(sessionStorage.getItem('ORGID')!); +orgId.value = result; const tableKeyMap = [ { title: '序号', @@ -214,6 +218,7 @@ export const energyAlarmConfigs = ( }, ], }, + params: { orgId: orgId.value }, // pagination: { pageSizeOptions: false }, rowKey: 'id', }; 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 656c80b..6bb6bc2 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts @@ -1,6 +1,11 @@ import { http } from '/nerv-lib/util'; import { NsMessage } from '/nerv-lib/component'; import { deviceAlarms } from '/@/api/alarmManagement/alarmSettings/deviceAlarms'; +import { ref } from 'vue'; + +const orgId = ref(''); +const result = JSON.parse(sessionStorage.getItem('ORGID')!); +orgId.value = result; const tableKeyMap = [ { title: '序号', @@ -212,6 +217,7 @@ export const equipmentAlarmTableConfig = ( }, ], }, + params: { orgId: orgId.value }, // pagination: { pageSizeOptions: false }, rowKey: 'id', }; diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts index 4060707..838cdfc 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts @@ -1,5 +1,9 @@ import { notificationManagementApi } from '/@/api/alarmManagement/alarmSettings/notificationManagements'; +import { ref } from 'vue'; +const orgId = ref(''); +const result = JSON.parse(sessionStorage.getItem('ORGID')!); +orgId.value = result; const tableKeyMap = [ { title: '序号', @@ -146,6 +150,7 @@ export const notificationtableConfig = (notificationManagements: any) => { }, ], }, + params: { orgId: orgId.value }, // pagination: { pageSizeOptions: false }, rowKey: 'id', }; diff --git a/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue b/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue index 884fa63..3f9300f 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue @@ -67,7 +67,7 @@ errorCode: null, alarmTitle: null, abnormalDescription: null, - deviceInfo: null, + monitoringPoints: null, alarmRepetitions: null, updateTime: null, }); @@ -84,7 +84,7 @@ errorCode: null, alarmTitle: null, abnormalDescription: null, - deviceInfo: null, + monitoringPoints: null, alarmRepetitions: null, updateTime: null, }; diff --git a/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue b/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue index 0ee7b22..d27a439 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue @@ -11,7 +11,7 @@
- + { + if (remarks && remarks.trim() !== '') { + cbfn(); + } else { + cbfn('备注不能为空'); + } + }, + }, + ], + state: [{ required: true, message: '请选择当前状态', trigger: 'change' }], + }; const handleClose = () => { showEdit.value = true; energyAlarm.value = {}; infoObject.value = {}; visible.value = false; + config.value.dataSource = []; }; const btnClick = () => { - delete infoObject.value.createTime; - infoObject.value.alarmEnergyConsumptionLogId = energyAlarm.value.id; - if (energyAlarm.value.createWorkOrder === 0) { - http.post(energyAlarmApi.noCreatOrUpdateLog, infoObject.value).then((res) => { - if (res.msg === 'success') { - NsMessage.success('操作成功'); - showEdit.value = true; - energyAlarm.value = {}; - infoObject.value = {}; - visible.value = false; - emit('logAdd', null); - } - }); - } + formRef.value.validate().then(() => { + delete infoObject.value.createTime; + infoObject.value.alarmEnergyConsumptionLogId = energyAlarm.value.id; + if (energyAlarm.value.createWorkOrder === 0) { + http.post(energyAlarmApi.noCreatOrUpdateLog, infoObject.value).then((res) => { + if (res.msg === 'success') { + NsMessage.success('操作成功'); + showEdit.value = true; + energyAlarm.value = {}; + infoObject.value = {}; + visible.value = false; + emit('logAdd', null); + } + }); + } + }); }; //修改状态 const changeShowEdit = () => { @@ -119,7 +141,6 @@ { value: 5, label: '已关闭' }, ]; } - console.log(data, 'data'); await http .post(energyAlarmApi.getSelectAlarmEnergyConsumptionLogStatusProcess, { alarmEnergyConsumptionLogId: data.id, @@ -149,6 +170,8 @@ infoObject, changeShowEdit, showEdit, + rules, + formRef, energyAlarm, stateOptions, btnClick, diff --git a/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/ts/config.ts b/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/ts/config.ts index 890cebd..dda6037 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/ts/config.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/ts/config.ts @@ -1,6 +1,10 @@ import { energyAlarmApi } from '/@/api/alarmManagement/energyAlarm'; import { dict } from '/@/api'; +import { ref } from 'vue'; +const orgId = ref(''); +const result = JSON.parse(sessionStorage.getItem('ORGID')!); +orgId.value = result; const tableKeyMap = [ { title: '序号', @@ -181,6 +185,7 @@ export const notificationtableConfig = (look: any, status: any) => { }, ], }, + params: { orgId: orgId.value }, // pagination: { pageSizeOptions: false }, rowKey: 'id', }; diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue index f945045..d29f9e2 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue @@ -67,6 +67,7 @@ const equipmentAlarm = ref({}); const stateOptions = ref(); const logList = ref([]); + const formRef = ref(); const config = ref({ size: logList.value.length, dataSource: logList.value, @@ -94,22 +95,26 @@ equipmentAlarm.value = {}; infoObject.value = {}; visible.value = false; + config.value.dataSource = []; + logList.value = []; }; const btnClick = () => { - delete infoObject.value.createTime; - infoObject.value.alarmEquipmentLogId = equipmentAlarm.value.id; - if (equipmentAlarm.value.createWorkOrder === 0) { - http.post(equipmentAlarmApi.noCreatOrUpdateLog, infoObject.value).then((res) => { - if (res.msg === 'success') { - NsMessage.success('操作成功'); - showEdit.value = true; - equipmentAlarm.value = {}; - infoObject.value = {}; - visible.value = false; - emit('logAdd', null); - } - }); - } + formRef.value.validate().then(() => { + delete infoObject.value.createTime; + infoObject.value.alarmEquipmentLogId = equipmentAlarm.value.id; + if (equipmentAlarm.value.createWorkOrder === 0) { + http.post(equipmentAlarmApi.noCreatOrUpdateLog, infoObject.value).then((res) => { + if (res.msg === 'success') { + NsMessage.success('操作成功'); + showEdit.value = true; + equipmentAlarm.value = {}; + infoObject.value = {}; + visible.value = false; + emit('logAdd', null); + } + }); + } + }); }; //修改状态 const changeShowEdit = () => { @@ -137,7 +142,6 @@ { value: 5, label: '已关闭' }, ]; } - console.log(data, 'data'); await http .post(equipmentAlarmApi.getSelectAlarmEquipmentLogStatusProcess, { alarmEquipmentLogId: data.id, @@ -166,6 +170,7 @@ return { infoObject, rules, + formRef, changeShowEdit, showEdit, equipmentAlarm, 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 3eb8c9e..45adaec 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/ts/config.ts @@ -1,4 +1,9 @@ import { equipmentAlarmApi } from '/@/api/alarmManagement/equipmentAlarm'; +import { ref } from 'vue'; + +const orgId = ref(''); +const result = JSON.parse(sessionStorage.getItem('ORGID')!); +orgId.value = result; const tableKeyMap = [ { @@ -20,18 +25,23 @@ const tableKeyMap = [ { title: '优先级', dataIndex: 'priority', + width: 80, }, { title: '状态', dataIndex: 'alarmLogState', + width: 100, }, { title: '错误码', dataIndex: 'errorCode', + width: 100, }, { title: '设备信息', dataIndex: 'deviceInfo', + width: 400, + // textEllipsis: true, }, { title: '更新时间', @@ -40,6 +50,7 @@ const tableKeyMap = [ { title: '重复次数', dataIndex: 'alarmRepetitions', + width: 80, }, ]; export const notificationtableConfig = (look: any, status: any) => { @@ -155,6 +166,7 @@ export const notificationtableConfig = (look: any, status: any) => { }, ], }, + params: { orgId: orgId.value }, // pagination: { pageSizeOptions: false }, rowKey: 'id', }; diff --git a/hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/status.vue b/hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/status.vue index 6664644..49dfa8e 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/status.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/status.vue @@ -62,11 +62,11 @@ { value: 5, label: '已关闭' }, ]); const logList = ref([ - { createName: '李四', state: 3, time: '2024-03-10 10:00:00', desc: '完成' }, - { createName: '王五', state: 5, time: '2024-03-10 10:00:00' }, - { createName: '王五', state: 4, time: '2024-03-10 10:00:00' }, - { createName: '王五', state: 2, time: '2024-03-10 10:00:00', desc: '创建工单' }, - { createName: '赵六', state: 1, time: '2024-03-10 10:00:00' }, + { realName: '李四', state: 3, createTime: '2024-03-10 10:00:00', remarks: '完成' }, + { realName: '王五', state: 5, createTime: '2024-03-10 10:00:00' }, + { realName: '王五', state: 4, createTime: '2024-03-10 10:00:00' }, + { realName: '王五', state: 2, createTime: '2024-03-10 10:00:00', remarks: '创建工单' }, + { realName: '赵六', state: 1, createTime: '2024-03-10 10:00:00' }, ]); const config = ref({ size: logList.value.length, diff --git a/hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/ts/config.ts b/hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/ts/config.ts index 8e3b134..854974d 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/ts/config.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/ts/config.ts @@ -1,4 +1,9 @@ import { gatewayAlarmApi } from '/@/api/alarmManagement/gatewayAlarm'; +import { ref } from 'vue'; + +const orgId = ref(''); +const result = JSON.parse(sessionStorage.getItem('ORGID')!); +orgId.value = result; const tableKeyMap = [ { title: '序号', @@ -139,6 +144,7 @@ export const notificationtableConfig = (look: any, status: any) => { }, ], }, + params: { orgId: orgId.value }, // pagination: { pageSizeOptions: false }, rowKey: 'id', };