|
|
@@ -1,7 +1,20 @@
|
|
|
-import { h } from 'vue';
|
|
|
import { FormSchema } from '/@/components/Form';
|
|
|
import { BasicColumn } from '/@/components/Table';
|
|
|
-import { Tag } from 'ant-design-vue';
|
|
|
+import { alarmCellRender } from '../../monitor/sealedMonitor/monitor.data';
|
|
|
+
|
|
|
+const linkMap = {
|
|
|
+ '-1': '断线',
|
|
|
+ '0': '正常',
|
|
|
+ '1': '超限报警',
|
|
|
+ '2': '断电报警',
|
|
|
+ '4': '标校',
|
|
|
+ '5': '标校报警',
|
|
|
+ '8': '超量程',
|
|
|
+ '16': '分站故障',
|
|
|
+ '32': '不巡检',
|
|
|
+ '64': '暂停',
|
|
|
+ '128': '传感器故障',
|
|
|
+};
|
|
|
|
|
|
/** 煤层预警参数 表格配置 */
|
|
|
export const columnsCoalAlarm: BasicColumn[] = [
|
|
|
@@ -49,13 +62,11 @@ export const columnsGoafLimit: BasicColumn[] = [
|
|
|
title: '状态',
|
|
|
dataIndex: 'status',
|
|
|
width: 200,
|
|
|
- customRender({ text }) {
|
|
|
- return h(
|
|
|
- Tag,
|
|
|
- {
|
|
|
- color: text == 1 ? 'success' : 'error',
|
|
|
- },
|
|
|
- text == 1 ? '正常' : '异常'
|
|
|
+ customRender({ record }) {
|
|
|
+ return alarmCellRender(
|
|
|
+ String(record.status),
|
|
|
+ (r) => linkMap[r],
|
|
|
+ () => ''
|
|
|
);
|
|
|
},
|
|
|
},
|