fix:修改字段 对接设备告警
This commit is contained in:
@@ -288,7 +288,7 @@
|
||||
},
|
||||
],
|
||||
},
|
||||
params: { energyConsumptionAlarmId: value.id },
|
||||
params: { energyConsumptionAlarmId: value.id, orgId: orgId.value },
|
||||
// pagination: { pageSizeOptions: false },
|
||||
rowKey: 'id',
|
||||
};
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -279,7 +279,7 @@
|
||||
},
|
||||
],
|
||||
},
|
||||
params: { equipmentAlarmId: value.id },
|
||||
params: { equipmentAlarmId: value.id, orgId: orgId.value },
|
||||
// pagination: { pageSizeOptions: false },
|
||||
rowKey: 'id',
|
||||
};
|
||||
|
@@ -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;
|
||||
// 逻辑列表
|
||||
|
@@ -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('告警编辑成功');
|
||||
|
@@ -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',
|
||||
};
|
||||
|
@@ -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',
|
||||
};
|
||||
|
@@ -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',
|
||||
};
|
||||
|
Reference in New Issue
Block a user