Browse Source

fix:修改设备告警 能源告警 回显 添加之后 刷新通知告警

temp
zhaohy 4 months ago
parent
commit
b82b97ebb1
  1. 2
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue
  2. 4
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts
  3. 4
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts
  4. 39
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue

2
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,

4
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;

4
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;

39
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,

Loading…
Cancel
Save