fix:设备告警 网关告警
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { dateUtil } from '/nerv-lib/util/date-util';
|
||||
import data from '../notificationManagementMock.json';
|
||||
import { http } from '/nerv-lib/util';
|
||||
import { equipmentAlarmApi } from '/@/api/alarmManagement/equipmentAlarm';
|
||||
|
||||
import { ref } from 'vue';
|
||||
const tableKeyMap = [
|
||||
{
|
||||
@@ -12,45 +14,45 @@ const tableKeyMap = [
|
||||
},
|
||||
{
|
||||
title: '告警编号',
|
||||
dataIndex: 'id',
|
||||
dataIndex: 'alarmCode',
|
||||
},
|
||||
{
|
||||
title: '告警描述',
|
||||
dataIndex: 'deviceCode',
|
||||
dataIndex: 'alarmTitle',
|
||||
},
|
||||
{
|
||||
title: '优先级',
|
||||
dataIndex: 'deviceName',
|
||||
dataIndex: 'priority',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'position',
|
||||
dataIndex: 'alarmLogState',
|
||||
},
|
||||
{
|
||||
title: '错误码',
|
||||
dataIndex: 'position',
|
||||
textEllipsis: true,
|
||||
dataIndex: 'errorCode',
|
||||
},
|
||||
{
|
||||
title: '设备信息',
|
||||
dataIndex: 'position',
|
||||
dataIndex: 'deviceInfo',
|
||||
},
|
||||
{
|
||||
title: '更新时间',
|
||||
dataIndex: 'enableRules',
|
||||
dataIndex: 'updateTime',
|
||||
},
|
||||
{
|
||||
title: '重复次数',
|
||||
dataIndex: 'enableRules',
|
||||
dataIndex: 'alarmRepetitions',
|
||||
},
|
||||
];
|
||||
const mockData = ref(data.listData);
|
||||
export const notificationtableConfig = (look: any, status: any) => {
|
||||
return {
|
||||
title: '告警记录',
|
||||
// api: '/carbon_emission/device/getDeviceList',
|
||||
api: equipmentAlarmApi.getTableList,
|
||||
value: mockData.value,
|
||||
headerActions: [{}],
|
||||
scroll: { x: 2000 },
|
||||
columns: tableKeyMap,
|
||||
// rowSelection: null, 选择按钮
|
||||
columnActions: {
|
||||
@@ -61,7 +63,6 @@ export const notificationtableConfig = (look: any, status: any) => {
|
||||
name: 'FeedBackDetail',
|
||||
dynamicParams: ['uuid', 'appealType'],
|
||||
handle: (data: any) => {
|
||||
console.log(look.value);
|
||||
look.value.toggle(data);
|
||||
},
|
||||
},
|
||||
@@ -79,29 +80,29 @@ export const notificationtableConfig = (look: any, status: any) => {
|
||||
formConfig: {
|
||||
schemas: [
|
||||
{
|
||||
field: 'name',
|
||||
label: '告警类型',
|
||||
field: 'priority',
|
||||
label: '优先级',
|
||||
component: 'NsSelect',
|
||||
componentProps: {
|
||||
placeholder: '请选择告警优先级',
|
||||
options: [
|
||||
{
|
||||
label: '紧急',
|
||||
value: '1',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '重要',
|
||||
value: '2',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '一般',
|
||||
value: '3',
|
||||
value: 3,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'provider',
|
||||
field: 'alarmLogState',
|
||||
label: '状态',
|
||||
component: 'NsSelect',
|
||||
componentProps: {
|
||||
@@ -109,33 +110,38 @@ export const notificationtableConfig = (look: any, status: any) => {
|
||||
options: [
|
||||
{
|
||||
label: '待处理',
|
||||
value: '1',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '处理中',
|
||||
value: '2',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '已完成',
|
||||
value: '3',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
label: '超时',
|
||||
value: '4',
|
||||
value: 4,
|
||||
},
|
||||
{
|
||||
label: '关闭',
|
||||
value: '5',
|
||||
value: 5,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'provider',
|
||||
field: 'errorCode',
|
||||
label: '错误码',
|
||||
component: 'NsInput',
|
||||
component: 'NsSelectApi',
|
||||
componentProps: {
|
||||
placeholder: '请输入告警错误码',
|
||||
placeholder: '请选择错误码',
|
||||
autoSelectFirst: false,
|
||||
api: equipmentAlarmApi.getCodeList,
|
||||
resultField: 'data',
|
||||
labelField: 'errorCode',
|
||||
valueField: 'errorCode',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user