From a16b26370f86f544a0cb66dcd2368ac2ec0cebcf Mon Sep 17 00:00:00 2001
From: zhaohy <1695786511@qq.com>
Date: Mon, 8 Jul 2024 08:24:18 +0800
Subject: [PATCH] =?UTF-8?q?add:=E6=B7=BB=E5=8A=A0=E5=91=8A=E8=AD=A6?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E5=86=85=E5=AE=B9=20=E5=91=8A=E8=AD=A6?=
=?UTF-8?q?=E7=BB=9F=E6=8F=BD=E5=92=8C=E5=91=8A=E8=AD=A6=E8=AE=BE=E7=BD=AE?=
=?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E5=85=AC=E5=85=B1=E7=BB=84=E4=BB=B6=20?=
=?UTF-8?q?=E9=80=82=E9=85=8D=E5=A4=9A=E7=A7=8D=E6=83=85=E5=86=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
hx-ai-intelligent/src/icon/gaojingguanli.svg | 12 +
hx-ai-intelligent/src/router/alarmManagement.ts | 50 +++
.../view/alarmManagement/alarmOverview/index.vue | 101 ++++++
.../alarmSettings/components/energyAlarm.vue | 170 +++++++++++
.../equipmentAlarm/configureDeviceAlarms.vue | 224 ++++++++++++++
.../equipmentAlarm/editConfigureDeviceAlarm.vue | 339 +++++++++++++++++++++
.../equipmentAlarm/editeEquipmentAlarm.vue | 255 ++++++++++++++++
.../view/alarmManagement/alarmSettings/index.vue | 97 ++++++
.../alarmSettings/notificationManagementMock.json | 94 ++++++
.../alarmSettings/ts/configureDeviceAlarms.ts | 204 +++++++++++++
.../alarmSettings/ts/equipmentAlarmConfig.ts | 205 +++++++++++++
.../ts/notificationManagementConfig.ts | 164 ++++++++++
lib/component/form/form/form.vue | 4 +-
lib/component/form/form/props.ts | 1 +
lib/component/table/table.vue | 39 +++
15 files changed, 1958 insertions(+), 1 deletion(-)
create mode 100644 hx-ai-intelligent/src/icon/gaojingguanli.svg
create mode 100644 hx-ai-intelligent/src/router/alarmManagement.ts
create mode 100644 hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue
create mode 100644 hx-ai-intelligent/src/view/alarmManagement/alarmSettings/components/energyAlarm.vue
create mode 100644 hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue
create mode 100644 hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue
create mode 100644 hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue
create mode 100644 hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue
create mode 100644 hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagementMock.json
create mode 100644 hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/configureDeviceAlarms.ts
create mode 100644 hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts
create mode 100644 hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts
diff --git a/hx-ai-intelligent/src/icon/gaojingguanli.svg b/hx-ai-intelligent/src/icon/gaojingguanli.svg
new file mode 100644
index 0000000..23227d7
--- /dev/null
+++ b/hx-ai-intelligent/src/icon/gaojingguanli.svg
@@ -0,0 +1,12 @@
+
+
+
diff --git a/hx-ai-intelligent/src/router/alarmManagement.ts b/hx-ai-intelligent/src/router/alarmManagement.ts
new file mode 100644
index 0000000..6b8a490
--- /dev/null
+++ b/hx-ai-intelligent/src/router/alarmManagement.ts
@@ -0,0 +1,50 @@
+const Base = () => import('/nerv-lib/saas/view/system/layout/content.vue');
+const alarmManagement = {
+ path: '/alarmManagement',
+ name: 'AlarmManagement',
+ meta: { title: '告警管理', icon: 'gaojingguanli', index: 4 },
+ redirect: { name: 'alarmManagement' },
+ children: [
+ {
+ path: 'alarmOverview',
+ name: 'AlarmOverview',
+ meta: { title: '告警总览', hideChildren: true, icon: 'gaojingguanli' },
+ component: Base,
+ redirect: { name: 'alarmOverviewIndex' },
+ children: [
+ {
+ path: 'index',
+ name: 'alarmOverviewIndex',
+ // component: () => import('/nerv-lib/saas/view/menuManage/index.vue'),
+ component: () => import('/@/view/alarmManagement/alarmOverview/index.vue'),
+ meta: {
+ title: '告警总览',
+ keepAlive: true,
+ // backApi: [],
+ },
+ },
+ ],
+ },
+ {
+ path: 'alarmSettings',
+ name: 'AlarmSettings',
+ meta: { title: '告警设置', hideChildren: true, icon: 'gaojingguanli' },
+ component: Base,
+ redirect: { name: 'alarmSettingsIndex' },
+ children: [
+ {
+ path: 'index',
+ name: 'alarmSettingsIndex',
+ // component: () => import('/nerv-lib/saas/view/menuManage/index.vue'),
+ component: () => import('/@/view/alarmManagement/alarmSettings/index.vue'),
+ meta: {
+ title: '告警设置',
+ keepAlive: true,
+ // backApi: [],
+ },
+ },
+ ],
+ },
+ ],
+};
+export default alarmManagement;
diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue
new file mode 100644
index 0000000..31acf84
--- /dev/null
+++ b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
设备告警 (今日处理 / 总数)
+
+ 10 / 13
+ +10%
+
+
+
+
+
+
+
+
+
2
+
3
+
+
+
+
diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/components/energyAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/components/energyAlarm.vue
new file mode 100644
index 0000000..837dc0a
--- /dev/null
+++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/components/energyAlarm.vue
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+ {{
+ index
+ }}
+
+
+
+
+
+
+
+
+
+
+ 启用
+ 关闭
+
+
+
+
+
+ 重置
+ 搜索
+
+
+
+
+
+
+
+
diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue
new file mode 100644
index 0000000..cafe1f1
--- /dev/null
+++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue
@@ -0,0 +1,224 @@
+
+
+
+
+
+
+
diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue
new file mode 100644
index 0000000..b335638
--- /dev/null
+++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue
@@ -0,0 +1,339 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AC001电表
+ AC002电表
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 且(and)
+ 或(or)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue
new file mode 100644
index 0000000..a8ab1e0
--- /dev/null
+++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue
@@ -0,0 +1,255 @@
+
+
+
+
+
+
+
+
diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue
new file mode 100644
index 0000000..3eac872
--- /dev/null
+++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/index.vue
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+ 返回
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagementMock.json b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagementMock.json
new file mode 100644
index 0000000..1a6c067
--- /dev/null
+++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagementMock.json
@@ -0,0 +1,94 @@
+{
+ "listData":[
+ {
+ "id": "d4",
+ "isDel": "0",
+ "officesId": "84",
+ "deviceCode": "37430200143",
+ "deviceName": "地听测试电表",
+ "category": "1",
+ "type": "1001",
+ "energyCount": "1",
+ "serialNumber": "69",
+ "pidCode": null,
+ "brand": "",
+ "types": "",
+ "manufacturer": "elit non in",
+ "contacts": "ad reprehenderit",
+ "phonenumber": "34",
+ "position": "in esse commodo1",
+ "activeState": "1",
+ "measurementDirection": "1",
+ "deviceMagnification": 62,
+ "deviceAccuracy": "89",
+ "frequency": "anim consequat irure",
+ "standardFrequency": "ut elit",
+ "deviceHead": "pariatur ex velit",
+ "constructor": "84566",
+ "voltageType": "cillum aliquip reprehenderit",
+ "pt": 61,
+ "ct": 64,
+ "communicationProtocol": "cupidatat nisi ea ad",
+ "ip": "",
+ "port": "",
+ "com": "",
+ "slaveAddress": "",
+ "dlt": "",
+ "conversionIdentifier": "48",
+ "multiplicationAdjustment": "1",
+ "accessMethod": "1",
+ "replacementFrequency": "0",
+ "dataDetail": "sit",
+ "insertTime": null,
+ "children": null,
+ "devicePointList": null,
+ "insertUser": null,
+ "isUse":true
+ } , {
+ "id": "d5",
+ "isDel": "0",
+ "officesId": "84",
+ "deviceCode": "37430200143",
+ "deviceName": "地听测试电表",
+ "category": "1",
+ "type": "1001",
+ "energyCount": "1",
+ "serialNumber": "69",
+ "pidCode": null,
+ "brand": "",
+ "types": "",
+ "manufacturer": "elit non in",
+ "contacts": "ad reprehenderit",
+ "phonenumber": "34",
+ "position": "in esse commodo2",
+ "activeState": "1",
+ "measurementDirection": "1",
+ "deviceMagnification": 62,
+ "deviceAccuracy": "89",
+ "frequency": "anim consequat irure",
+ "standardFrequency": "ut elit",
+ "deviceHead": "pariatur ex velit",
+ "constructor": "84566",
+ "voltageType": "cillum aliquip reprehenderit",
+ "pt": 61,
+ "ct": 64,
+ "communicationProtocol": "cupidatat nisi ea ad",
+ "ip": "",
+ "port": "",
+ "com": "",
+ "slaveAddress": "",
+ "dlt": "",
+ "conversionIdentifier": "48",
+ "multiplicationAdjustment": "1",
+ "accessMethod": "1",
+ "replacementFrequency": "0",
+ "dataDetail": "sit",
+ "insertTime": null,
+ "children": null,
+ "devicePointList": null,
+ "insertUser": null,
+ "isUse":true
+ }
+ ]
+
+}
\ No newline at end of file
diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/configureDeviceAlarms.ts b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/configureDeviceAlarms.ts
new file mode 100644
index 0000000..05d46c4
--- /dev/null
+++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/configureDeviceAlarms.ts
@@ -0,0 +1,204 @@
+import { dateUtil } from '/nerv-lib/util/date-util';
+import data from '../notificationManagementMock.json';
+import { http } from '/nerv-lib/util';
+import { Modal } from 'ant-design-vue';
+import { ref } from 'vue';
+const tableKeyMap = [
+ {
+ title: '序号',
+ dataIndex: 'address',
+ customRender: (text: any) => {
+ return text.index + 1;
+ },
+ },
+ {
+ title: '规则id',
+ dataIndex: 'id',
+ },
+ {
+ title: '设备信心',
+ dataIndex: 'deviceCode',
+ },
+ {
+ title: '告警点位',
+ dataIndex: 'deviceName',
+ },
+ {
+ title: '判断条件',
+ dataIndex: 'position',
+ },
+ {
+ title: '取值类型',
+ dataIndex: 'position',
+ textEllipsis: true,
+ },
+ {
+ title: '异常描述',
+ dataIndex: 'position',
+ },
+ {
+ title: '启用通知',
+ dataIndex: 'isUse',
+ },
+];
+const mockData = ref(data.listData);
+const doWnload = (url) => {
+ const a = document.createElement('a');
+ document.body.appendChild(a);
+ a.href = encodeURI(url);
+ //设置下载的文件名
+ // a.download = fileName.value;
+ //触发a标签的点击事件,进行下载
+ a.click();
+};
+
+export const configureDeviceAlarms = (editEquipmentAlarm, elFormula, title) => {
+ return {
+ title: '告警规则',
+ // api: '/carbon_emission/device/getDeviceList',
+ value: mockData.value,
+ headerActions: [
+ {
+ label: '新增',
+ name: 'RoleTypeAdd',
+ type: 'primary',
+ handle: () => {
+ editEquipmentAlarm.value.toggle();
+ },
+ },
+ {
+ label: '导入',
+ name: 'groupImport',
+ type: 'primary',
+ extra: {
+ // api: props.postImportApi, // 导入接口名
+ title: '设备信息', // 弹窗title
+ templateName: 'whiteListUser', // 所使用的文件名称
+ indexName: '设备id', // 匹配类型字段
+ message: [
+ { label: '1、若必填项未填写,则不能进行导入操作' },
+ { label: `2、当重复时,则更新数据。` },
+ { label: '3、数据将从模版的第五行进行导入。' },
+ { label: '4、文件导入勿超过5MB。' },
+ ],
+ },
+ },
+ {
+ label: '导出',
+ name: 'groupExports',
+ type: 'primary',
+ handle: () => {
+ doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
+ },
+ },
+ {
+ label: '批量删除',
+ type: 'primary',
+ name: 'userBatchDel',
+ dynamicDisabled: (data: any) => {
+ return data.list.length === 0;
+ },
+ confirm: true,
+ isReload: true,
+ isClearCheck: true,
+ // api: origanizemanage.batchDel,
+ dynamicParams: { userIds: 'userId[]' },
+ },
+ ],
+ columns: tableKeyMap,
+ params: {
+ page: 0,
+ pageSize: 10,
+ },
+ // rowSelection: null, 选择按钮
+ columnActions: {
+ title: '操作',
+ actions: [
+ {
+ label: '编辑',
+ name: 'FeedBackDetail',
+ dynamicParams: ['uuid', 'appealType'],
+ handle: (data: any) => {
+ editEquipmentAlarm.value.toggle(data);
+ },
+ },
+ {
+ label: '删除',
+ name: 'FeedBackDetail',
+ dynamicParams: ['uuid', 'appealType'],
+ confirm: true,
+ handle: () => {
+ // mockData.value.splice(0, 1);
+ },
+ },
+ ],
+ },
+ formConfig: {
+ title: title,
+ schemas: [
+ {
+ field: 'provider',
+ label: '告警优先级',
+ component: 'NsSelect',
+ componentProps: {
+ placeholder: '请选择告警优先级',
+ options: [
+ {
+ label: '全部',
+ value: '',
+ },
+ {
+ label: '启用',
+ value: '1',
+ },
+ {
+ label: '关闭',
+ value: '0',
+ },
+ ],
+ },
+ },
+ {
+ field: 'provider',
+ label: '告警标题',
+ component: 'NsInput',
+ componentProps: {
+ placeholder: '请输入告警标题关键字',
+ },
+ },
+ {
+ field: 'provider',
+ label: '告警标题',
+ component: 'NsInput',
+ componentProps: {
+ placeholder: '请输入告警标题关键字',
+ },
+ },
+ {
+ field: 'payWay',
+ label: '启用状态',
+ component: 'NsSelect',
+ componentProps: {
+ placeholder: '请选择启用状态',
+ options: [
+ {
+ label: '全部',
+ value: '',
+ },
+ {
+ label: '启用',
+ value: '1',
+ },
+ {
+ label: '关闭',
+ value: '0',
+ },
+ ],
+ },
+ },
+ ],
+ },
+ // pagination: { pageSizeOptions: false },
+ rowKey: 'id',
+ };
+};
diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts
new file mode 100644
index 0000000..51abef7
--- /dev/null
+++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts
@@ -0,0 +1,205 @@
+import { dateUtil } from '/nerv-lib/util/date-util';
+import data from '../notificationManagementMock.json';
+import { http } from '/nerv-lib/util';
+import { Modal } from 'ant-design-vue';
+import { ref } from 'vue';
+const tableKeyMap = [
+ {
+ title: '序号',
+ dataIndex: 'address',
+ customRender: (text: any) => {
+ return text.index + 1;
+ },
+ },
+ {
+ title: '优先级',
+ dataIndex: 'id',
+ },
+ {
+ title: '告警类型',
+ dataIndex: 'deviceCode',
+ },
+ {
+ title: '告警标题',
+ dataIndex: 'deviceName',
+ },
+ {
+ title: '错误码',
+ dataIndex: 'position',
+ },
+ {
+ title: '重复次数',
+ dataIndex: 'position',
+ textEllipsis: true,
+ },
+ {
+ title: '监测时长',
+ dataIndex: 'position',
+ },
+ {
+ title: '启用通知',
+ dataIndex: 'isUse',
+ },
+];
+const mockData = ref(data.listData);
+const doWnload = (url) => {
+ const a = document.createElement('a');
+ document.body.appendChild(a);
+ a.href = encodeURI(url);
+ //设置下载的文件名
+ // a.download = fileName.value;
+ //触发a标签的点击事件,进行下载
+ a.click();
+};
+
+export const equipmentAlarmTableConfig = (
+ editEquipmentAlarm,
+ elFormula,
+ equipmentAlarm,
+ configureDeviceAlarms,
+) => {
+ return {
+ title: '告警规则',
+ // api: '/carbon_emission/device/getDeviceList',
+ value: mockData.value,
+ headerActions: [
+ {
+ label: '新增',
+ name: 'RoleTypeAdd',
+ type: 'primary',
+ handle: () => {
+ editEquipmentAlarm.value.toggle();
+ },
+ },
+ {
+ label: '导入',
+ name: 'groupImport',
+ type: 'primary',
+ extra: {
+ // api: props.postImportApi, // 导入接口名
+ title: '设备信息', // 弹窗title
+ templateName: 'whiteListUser', // 所使用的文件名称
+ indexName: '设备id', // 匹配类型字段
+ message: [
+ { label: '1、若必填项未填写,则不能进行导入操作' },
+ { label: `2、当重复时,则更新数据。` },
+ { label: '3、数据将从模版的第五行进行导入。' },
+ { label: '4、文件导入勿超过5MB。' },
+ ],
+ },
+ },
+ {
+ label: '导出',
+ name: 'groupExports',
+ type: 'primary',
+ handle: () => {
+ doWnload('/hx-ai-intelligent/asset/file/whiteListUser.xlsx');
+ },
+ },
+ ],
+ columns: tableKeyMap,
+ params: {
+ page: 0,
+ pageSize: 10,
+ },
+ // rowSelection: null, 选择按钮
+ columnActions: {
+ title: '操作',
+ actions: [
+ {
+ label: '编辑',
+ name: 'FeedBackDetail',
+ dynamicParams: ['uuid', 'appealType'],
+ handle: (data: any) => {
+ editEquipmentAlarm.value.toggle(data);
+ },
+ },
+ {
+ label: '配置',
+ name: 'FeedBackDetail',
+ dynamicParams: ['uuid', 'appealType'],
+ handle: (data: any) => {
+ equipmentAlarm.value = !equipmentAlarm.value;
+ configureDeviceAlarms.value.setconfigureDeviceAlarmsData(data);
+ },
+ },
+ {
+ label: '删除',
+ name: 'FeedBackDetail',
+ dynamicParams: ['uuid', 'appealType'],
+ confirm: true,
+ handle: () => {
+ // mockData.value.splice(0, 1);
+ },
+ },
+ ],
+ },
+
+ formConfig: {
+ schemas: [
+ {
+ field: 'provider',
+ label: '告警优先级',
+ component: 'NsSelect',
+ componentProps: {
+ placeholder: '请选择告警优先级',
+ options: [
+ {
+ label: '全部',
+ value: '',
+ },
+ {
+ label: '启用',
+ value: '1',
+ },
+ {
+ label: '关闭',
+ value: '0',
+ },
+ ],
+ },
+ },
+ {
+ field: 'provider',
+ label: '告警标题',
+ component: 'NsInput',
+ componentProps: {
+ placeholder: '请输入告警标题关键字',
+ },
+ },
+ {
+ field: 'provider',
+ label: '告警标题',
+ component: 'NsInput',
+ componentProps: {
+ placeholder: '请输入告警标题关键字',
+ },
+ },
+ {
+ field: 'payWay',
+ label: '启用状态',
+ component: 'NsSelect',
+ componentProps: {
+ placeholder: '请选择启用状态',
+ options: [
+ {
+ label: '全部',
+ value: '',
+ },
+ {
+ label: '启用',
+ value: '1',
+ },
+ {
+ label: '关闭',
+ value: '0',
+ },
+ ],
+ },
+ },
+ ],
+ },
+ // pagination: { pageSizeOptions: false },
+ rowKey: 'id',
+ };
+};
diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts
new file mode 100644
index 0000000..6e2d34a
--- /dev/null
+++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts
@@ -0,0 +1,164 @@
+import { dateUtil } from '/nerv-lib/util/date-util';
+import data from '../notificationManagementMock.json';
+import { http } from '/nerv-lib/util';
+import { ref } from 'vue';
+const tableKeyMap = [
+ {
+ title: '序号',
+ dataIndex: 'address',
+ customRender: (text: any) => {
+ return text.index + 1;
+ },
+ },
+ {
+ title: '优先级',
+ dataIndex: 'id',
+ },
+ {
+ title: '告警类型',
+ dataIndex: 'deviceCode',
+ },
+ {
+ title: '告警标题',
+ dataIndex: 'deviceName',
+ },
+ {
+ title: '错误码',
+ dataIndex: 'position',
+ },
+ {
+ title: '通知名单',
+ dataIndex: 'position',
+ textEllipsis: true,
+ },
+ {
+ title: '通知方式',
+ dataIndex: 'position',
+ },
+ {
+ title: '启用通知',
+ dataIndex: 'isUse',
+ },
+];
+const mockData = ref(data.listData);
+export const notificationtableConfig = (el, elGroup, elFormula) => {
+ return {
+ title: '告警规则',
+ // api: '/carbon_emission/device/getDeviceList',
+ value: mockData.value,
+ headerActions: [{}],
+ columns: tableKeyMap,
+ params: {
+ page: 0,
+ pageSize: 10,
+ },
+ // rowSelection: null, 选择按钮
+ columnActions: {
+ title: '操作',
+ actions: [
+ {
+ label: '联系方式',
+ name: 'FeedBackDetail',
+ dynamicParams: ['uuid', 'appealType'],
+ handle: (data: any) => {
+ console.log(data, '联系方式');
+ },
+ },
+ // {
+ // label: '删除',
+ // name: 'FeedBackDetail',
+ // dynamicParams: ['uuid', 'appealType'],
+ // confirm: true,
+ // handle: () => {
+ // mockData.value.splice(0, 1);
+ // },
+ // },
+ ],
+ },
+
+ formConfig: {
+ schemas: [
+ {
+ field: 'name',
+ label: '告警类型',
+ component: 'NsSelect',
+ componentProps: {
+ placeholder: '请选告警类型',
+ options: [
+ {
+ label: '启用',
+ value: '1',
+ },
+ {
+ label: '关闭',
+ value: '0',
+ },
+ ],
+ },
+ },
+ {
+ field: 'provider',
+ label: '告警优先级',
+ component: 'NsSelect',
+ componentProps: {
+ placeholder: '请选择告警优先级',
+ options: [
+ {
+ label: '全部',
+ value: '',
+ },
+ {
+ label: '启用',
+ value: '1',
+ },
+ {
+ label: '关闭',
+ value: '0',
+ },
+ ],
+ },
+ },
+ {
+ field: 'provider',
+ label: '告警标题',
+ component: 'NsInput',
+ componentProps: {
+ placeholder: '请输入告警标题关键字',
+ },
+ },
+ {
+ field: 'provider',
+ label: '告警标题',
+ component: 'NsInput',
+ componentProps: {
+ placeholder: '请输入告警标题关键字',
+ },
+ },
+ {
+ field: 'payWay',
+ label: '启用状态',
+ component: 'NsSelect',
+ componentProps: {
+ placeholder: '请选择启用状态',
+ options: [
+ {
+ label: '全部',
+ value: '',
+ },
+ {
+ label: '启用',
+ value: '1',
+ },
+ {
+ label: '关闭',
+ value: '0',
+ },
+ ],
+ },
+ },
+ ],
+ },
+ // pagination: { pageSizeOptions: false },
+ rowKey: 'id',
+ };
+};
diff --git a/lib/component/form/form/form.vue b/lib/component/form/form/form.vue
index 4a407ac..ac5e173 100644
--- a/lib/component/form/form/form.vue
+++ b/lib/component/form/form/form.vue
@@ -8,7 +8,7 @@
ref="formElRef"
:model="formModel">