add:配置设备告警对接接口 对接告警配置 里面的数据来源 设备节点
This commit is contained in:
@@ -31,18 +31,23 @@
|
||||
import editConfigureEnergyAlarm from './editConfigureEnergyAlarm.vue';
|
||||
import { deviceAlarms } from '/@/api/alarmSettings/deviceAlarms';
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { device } from '/@/api/deviceManage';
|
||||
|
||||
export default {
|
||||
components: { editConfigureEnergyAlarm },
|
||||
|
||||
setup() {
|
||||
//设备告警数据
|
||||
const configureDeviceAlarmsData = ref({});
|
||||
//能源告警配置
|
||||
const configureEnergyAlarmsData = ref({});
|
||||
const show = ref(false);
|
||||
const tableConfig = ref({});
|
||||
const mainRef = ref({});
|
||||
const editConfigureEnergyAlarms = ref({});
|
||||
const mockData = ref(data.listData);
|
||||
//组织树
|
||||
const orgId = ref('');
|
||||
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
||||
orgId.value = result;
|
||||
const clickSwitch = (data: any) => {
|
||||
NsModal.confirm({
|
||||
title: '启用状态',
|
||||
@@ -71,7 +76,7 @@
|
||||
a.click();
|
||||
};
|
||||
const setconfigureDeviceAlarmsData = (value: any) => {
|
||||
configureDeviceAlarmsData.value = value;
|
||||
configureEnergyAlarmsData.value = value;
|
||||
show.value = true;
|
||||
tableConfig.value = {
|
||||
title: '告警规则',
|
||||
@@ -83,7 +88,7 @@
|
||||
name: 'RoleTypeAdd',
|
||||
type: 'primary',
|
||||
handle: () => {
|
||||
editConfigureEnergyAlarms.value.toggle();
|
||||
editConfigureEnergyAlarms.value.toggle(null, configureEnergyAlarmsData.value.va);
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -172,7 +177,7 @@
|
||||
name: 'FeedBackDetail',
|
||||
dynamicParams: ['uuid', 'appealType'],
|
||||
handle: (data: any) => {
|
||||
editConfigureEnergyAlarms.value.toggle(data);
|
||||
editConfigureEnergyAlarms.value.toggle(data, configureEnergyAlarmsData.value);
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -190,29 +195,37 @@
|
||||
title: value.errorCode,
|
||||
schemas: [
|
||||
{
|
||||
field: 'provider',
|
||||
field: 'deviceName',
|
||||
label: '设备名称',
|
||||
component: 'NsInput',
|
||||
component: 'nsSelectApi',
|
||||
componentProps: {
|
||||
placeholder: '请输入设备名称',
|
||||
api: device.queryDevicePage,
|
||||
params: {
|
||||
orgId: orgId.value,
|
||||
pageNum: 1,
|
||||
pageSize: 99,
|
||||
},
|
||||
placeholder: '请选择设备名称',
|
||||
resultField: 'data.records',
|
||||
labelField: 'deviceName',
|
||||
valueField: 'id',
|
||||
autoAddLink: true, //默认添加联动
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'provider',
|
||||
field: 'devicePoint',
|
||||
label: '设备点位',
|
||||
component: 'nsSelectApi',
|
||||
dynamicParams: {
|
||||
id: 'deviceName', //帮定上级联动数据
|
||||
},
|
||||
componentProps: {
|
||||
api: '/api/community/objs/DictItem',
|
||||
params: {
|
||||
pageSize: 100,
|
||||
code: 'MZ',
|
||||
},
|
||||
placeholder: '请选择设备点位',
|
||||
api: device.queryDevicePoint,
|
||||
resultField: 'data',
|
||||
labelField: 'dictName',
|
||||
valueField: 'dictValue',
|
||||
immediate: true,
|
||||
autoSelectFirst: false,
|
||||
placeholder: '请选择设备点位',
|
||||
labelField: 'code',
|
||||
valueField: 'id',
|
||||
dependency: 'deviceName',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -249,10 +262,11 @@
|
||||
};
|
||||
};
|
||||
return {
|
||||
configureDeviceAlarmsData,
|
||||
configureEnergyAlarmsData,
|
||||
show,
|
||||
clickSwitch,
|
||||
doWnload,
|
||||
orgId,
|
||||
tableConfig,
|
||||
editConfigureEnergyAlarms,
|
||||
setconfigureDeviceAlarmsData,
|
||||
|
Reference in New Issue
Block a user