add:设备告警网关告警对接 接口
This commit is contained in:
@@ -138,7 +138,6 @@
|
||||
import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm';
|
||||
import { http } from '/nerv-lib/util';
|
||||
import { dict } from '/@/api';
|
||||
import { async } from '@antv/x6/lib/registry/marker/async';
|
||||
|
||||
// import type { Rule } from 'ant-design-vue/es/form';
|
||||
|
||||
@@ -367,7 +366,7 @@
|
||||
message: '请输入异常描述',
|
||||
trigger: 'blur',
|
||||
validator: (rules: any, abnormalDescription: any, cbfn: any) => {
|
||||
if (abnormalDescription.trim() !== '') {
|
||||
if (abnormalDescription && abnormalDescription.trim() !== '') {
|
||||
cbfn();
|
||||
} else {
|
||||
cbfn('告警标题不能为空');
|
||||
|
@@ -46,6 +46,7 @@
|
||||
:disabled="!(infoObject && infoObject.deviceType && infoObject.deviceType.length > 0)"
|
||||
style="width: 100%"
|
||||
:autoClearSearchValue="true"
|
||||
allow-clear
|
||||
@change="selectDevice"
|
||||
placeholder="请选择设备名称">
|
||||
<template v-for="(item, index) in deviceNameTreeData" :key="index">
|
||||
@@ -59,6 +60,8 @@
|
||||
<a-select
|
||||
v-model:value="infoObject.devicePoint"
|
||||
show-search
|
||||
:autoClearSearchValue="true"
|
||||
allow-clear
|
||||
placeholder="请选择设备点位"
|
||||
style="width: 100%"
|
||||
:disabled="!infoObject?.deviceId"
|
||||
@@ -78,6 +81,7 @@
|
||||
<a-select
|
||||
v-model:value="infoObject.valueType"
|
||||
placeholder="请选择取值类型"
|
||||
allow-clear
|
||||
style="width: 100%"
|
||||
:options="qzOptions" />
|
||||
</a-form-item>
|
||||
@@ -151,11 +155,8 @@
|
||||
import type { ShowSearchType } from 'ant-design-vue/es/cascader';
|
||||
import { device } from '/@/api/deviceManage';
|
||||
import { deviceAlarms } from '/@/api/alarmManagement/alarmSettings/deviceAlarms';
|
||||
|
||||
import { http } from '/nerv-lib/util';
|
||||
|
||||
import { async } from '@antv/x6/lib/registry/marker/async';
|
||||
|
||||
const visible = ref(false);
|
||||
// 父级数据
|
||||
const equipmentAlarm = ref({});
|
||||
@@ -187,13 +188,16 @@
|
||||
let deviceNameTreeData = ref([]);
|
||||
//选择设备类型方法
|
||||
const selectDeviceType = (value: any, selectedOptions: any) => {
|
||||
//获取该类型设备
|
||||
getDevicePage({
|
||||
orgId: orgId.value,
|
||||
deviceCode: selectedOptions[selectedOptions.length - 1].code,
|
||||
pageNum: 1,
|
||||
pageSize: 999,
|
||||
});
|
||||
infoObject.value.deviceId = null;
|
||||
if (selectedOptions && selectedOptions.length > 0) {
|
||||
//获取该类型设备
|
||||
getDevicePage({
|
||||
orgId: orgId.value,
|
||||
deviceCode: selectedOptions[selectedOptions.length - 1].code,
|
||||
pageNum: 1,
|
||||
pageSize: 999,
|
||||
});
|
||||
}
|
||||
};
|
||||
//选择设备方法
|
||||
const selectDevice = () => {
|
||||
@@ -379,7 +383,7 @@
|
||||
message: '请输入异常描述',
|
||||
trigger: 'blur',
|
||||
validator: (rules: any, abnormalDescription: any, cbfn: any) => {
|
||||
if (abnormalDescription.trim() !== '') {
|
||||
if (abnormalDescription && abnormalDescription.trim() !== '') {
|
||||
cbfn();
|
||||
} else {
|
||||
cbfn('告警标题不能为空');
|
||||
|
@@ -73,7 +73,6 @@
|
||||
import { http } from '/nerv-lib/util';
|
||||
import linkPeople from './linkPeople/index.vue';
|
||||
import { notificationManagementApi } from '/@/api/alarmManagement/alarmSettings/notificationManagements';
|
||||
import { async } from '@antv/x6/lib/registry/marker/async';
|
||||
|
||||
//table 数据
|
||||
const columns = [
|
||||
|
Reference in New Issue
Block a user