{
- infoObject.value.deviceId = null;
+ infoObject.value.deviceInfoCode = null;
if (selectedOptions && selectedOptions.length > 0) {
//获取该类型设备
getDevicePage({
@@ -201,7 +203,7 @@
};
//选择设备方法
const selectDevice = () => {
- getDevicePoint({ id: infoObject.value.deviceId });
+ getDevicePoint({ deviceCode: infoObject.value.deviceInfoCode });
};
//获取设备列表
const getDevicePage = (value: any) => {
@@ -325,7 +327,7 @@
let selectDevice = ref([Number(infoObject.value.deviceType)]);
findNodeById(deviceTypeTreeData.value, Number(infoObject.value.deviceType));
//获取设备点位
- getDevicePoint({ id: infoObject.value.deviceId });
+ getDevicePoint({ deviceCode: infoObject.value.deviceInfoCode });
// 回显 选择设备类型
findParentIds(
deviceTypeTreeData.value,
@@ -360,10 +362,11 @@
deviceType: [],
devicePoint: null,
valueType: null,
- deviceId: null,
+ deviceInfoCode: null,
enableRules: 0,
alarmList: [{ logic: null, num: null, isDelete: 0 }],
};
+ infoObject.value.site = orgId.value;
}
visible.value = !visible.value;
@@ -373,7 +376,7 @@
site: [{ required: true, message: '请选择站点', trigger: 'change' }],
deviceType: [{ required: true, message: '请选择设备类型', trigger: 'change' }],
enableRules: [{ required: true, message: '请选择启用规则', trigger: 'change' }],
- deviceId: [{ required: true, message: '请选择设备名称', trigger: 'change' }],
+ deviceInfoCode: [{ required: true, message: '请选择设备名称', trigger: 'change' }],
devicePoint: [{ required: true, message: '请选择设备点位', trigger: 'change' }],
valueType: [{ required: true, message: '请选择取值类型', trigger: 'change' }],
ruleType: [{ required: true, message: '请选择规则类型', trigger: 'change' }],
@@ -396,6 +399,7 @@
};
// 确认按钮
const btnClick = () => {
+ infoObject.value.devicePoint = 1;
infoObject.value.alarmList.forEach((item) => {
if (item.logic === null || item.num === null) {
return;
@@ -459,7 +463,7 @@
deviceType: [],
devicePoint: null,
valueType: null,
- deviceId: null,
+ deviceInfoCode: null,
enableRules: 0,
alarmList: [{ logic: null, num: null, isDelete: 0 }],
};
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 b2c1e72..5bef45f 100644
--- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue
+++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue
@@ -32,22 +32,26 @@
placeholder="请选择告警频率"
style="width: 100%"
allowClear
- :options="alarmFrequencyData" />
+ :options="alarmFrequencyData"
+ @change="handleChangeAlarmFrequency" />
-
+ placeholder="请输入间隔时长">
+
+
+
+
{
+ if (infoObject.value.alarmFrequency === 2 && !infoObject.value.intervalDurationUnit) {
+ infoObject.value.intervalDurationUnit = 1;
+ }
+ };
//表单 判断规格
const rules = {
alarmTitle: [
@@ -211,7 +221,11 @@
required: true,
trigger: 'change',
validator: (rules: any, intervalDuration: any, cbfn: any) => {
- if (Number.isInteger(intervalDuration) && intervalDuration > 0) {
+ if (
+ Number.isInteger(intervalDuration) &&
+ intervalDuration > 0 &&
+ infoObject.value.intervalDurationUnit
+ ) {
cbfn();
} else {
cbfn('请输入正确的间隔时长');
diff --git a/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue b/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue
index 5971f79..884fa63 100644
--- a/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue
+++ b/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue
@@ -37,7 +37,9 @@
{{ infoObject.alarmTitle }}
{{ infoObject.abnormalDescription }}
- {{ infoObject.deviceInfo }}
+
+ {{ infoObject.monitoringPoints }}
+
{{ infoObject.alarmRepetitions }}
diff --git a/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue b/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue
index 147beea..0ee7b22 100644
--- a/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue
+++ b/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue
@@ -64,7 +64,7 @@
const visible = ref(false);
const showEdit = ref(true);
const infoObject = ref({});
- const equipmentAlarm = ref({});
+ const energyAlarm = ref({});
const stateOptions = ref();
const logList = ref([]);
const config = ref({
@@ -73,19 +73,19 @@
});
const handleClose = () => {
showEdit.value = true;
- equipmentAlarm.value = {};
+ energyAlarm.value = {};
infoObject.value = {};
visible.value = false;
};
const btnClick = () => {
delete infoObject.value.createTime;
- infoObject.value.alarmEquipmentLogId = equipmentAlarm.value.id;
- if (equipmentAlarm.value.createWorkOrder === 0) {
+ 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;
- equipmentAlarm.value = {};
+ energyAlarm.value = {};
infoObject.value = {};
visible.value = false;
emit('logAdd', null);
@@ -96,14 +96,14 @@
//修改状态
const changeShowEdit = () => {
// 未生成工单
- if (equipmentAlarm.value.createWorkOrder === 0) {
+ if (energyAlarm.value.createWorkOrder === 0) {
showEdit.value = !showEdit.value;
}
};
const toggle = async (data) => {
- equipmentAlarm.value = { ...data };
+ energyAlarm.value = { ...data };
visible.value = true;
- if (equipmentAlarm.value.createWorkOrder === 1) {
+ if (energyAlarm.value.createWorkOrder === 1) {
stateOptions.value = [
{ value: 1, label: '待处理' },
{ value: 2, label: '处理中' },
@@ -121,8 +121,8 @@
}
console.log(data, 'data');
await http
- .post(energyAlarmApi.getSelectAlarmEquipmentLogStatusProcess, {
- alarmEquipmentLogId: data.id,
+ .post(energyAlarmApi.getSelectAlarmEnergyConsumptionLogStatusProcess, {
+ alarmEnergyConsumptionLogId: data.id,
})
.then((res) => {
if (res.msg === 'success') {
@@ -149,7 +149,7 @@
infoObject,
changeShowEdit,
showEdit,
- equipmentAlarm,
+ energyAlarm,
stateOptions,
btnClick,
visible,
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 a534849..890cebd 100644
--- a/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/ts/config.ts
+++ b/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/ts/config.ts
@@ -36,7 +36,7 @@ const tableKeyMap = [
},
{
title: '监测点位',
- dataIndex: 'deviceInfo',
+ dataIndex: 'monitoringPoints',
},
{
title: '更新时间',