|
@@ -32,29 +32,24 @@ export const columns: BasicColumn[] = [
|
|
|
{
|
|
{
|
|
|
title: '煤矿编号',
|
|
title: '煤矿编号',
|
|
|
dataIndex: 'mineCode',
|
|
dataIndex: 'mineCode',
|
|
|
- customRender: ({ record }) => formatEmptyValue(record?.mineCode) ? '—' : record.mineCode,
|
|
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '所属执法处',
|
|
title: '所属执法处',
|
|
|
dataIndex: 'managementName',
|
|
dataIndex: 'managementName',
|
|
|
- customRender: ({ record }) => formatEmptyValue(record?.managementName) ? '—' : record.managementName,
|
|
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '煤矿名称',
|
|
title: '煤矿名称',
|
|
|
dataIndex: 'mineName',
|
|
dataIndex: 'mineName',
|
|
|
- customRender: ({ record }) => formatEmptyValue(record?.mineName) ? '—' : record.mineName,
|
|
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '煤矿简称',
|
|
title: '煤矿简称',
|
|
|
dataIndex: 'mineNameAbbr',
|
|
dataIndex: 'mineNameAbbr',
|
|
|
- customRender: ({ record }) => formatEmptyValue(record?.mineNameAbbr) ? '—' : record.mineNameAbbr,
|
|
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '生产状态',
|
|
title: '生产状态',
|
|
|
dataIndex: 'productionStatus',
|
|
dataIndex: 'productionStatus',
|
|
|
customRender: ({ record }) => {
|
|
customRender: ({ record }) => {
|
|
|
// 空值处理
|
|
// 空值处理
|
|
|
- if (formatEmptyValue(record?.productionStatus)) return '—';
|
|
|
|
|
// 状态映射 + 标签渲染
|
|
// 状态映射 + 标签渲染
|
|
|
const status = String(record.productionStatus);
|
|
const status = String(record.productionStatus);
|
|
|
const { text, color } = productionStatusMap[status] || { text: '未知状态', color: 'gray' };
|
|
const { text, color } = productionStatusMap[status] || { text: '未知状态', color: 'gray' };
|
|
@@ -64,14 +59,12 @@ export const columns: BasicColumn[] = [
|
|
|
{
|
|
{
|
|
|
title: '自燃情况',
|
|
title: '自燃情况',
|
|
|
dataIndex: 'riskLevel',
|
|
dataIndex: 'riskLevel',
|
|
|
- customRender: ({ record }) => formatEmptyValue(record?.riskLevel) ? '—' : record.riskLevel,
|
|
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '接入状态',
|
|
title: '接入状态',
|
|
|
dataIndex: 'accessStatus',
|
|
dataIndex: 'accessStatus',
|
|
|
customRender: ({ record }) => {
|
|
customRender: ({ record }) => {
|
|
|
// 空值处理
|
|
// 空值处理
|
|
|
- if (formatEmptyValue(record?.accessStatus)) return '—';
|
|
|
|
|
// 状态映射 + 标签渲染
|
|
// 状态映射 + 标签渲染
|
|
|
const status = String(record.accessStatus);
|
|
const status = String(record.accessStatus);
|
|
|
const text = status === '1' ? '已接入' : '未接入';
|
|
const text = status === '1' ? '已接入' : '未接入';
|
|
@@ -84,7 +77,6 @@ export const columns: BasicColumn[] = [
|
|
|
dataIndex: 'status',
|
|
dataIndex: 'status',
|
|
|
customRender: ({ record }) => {
|
|
customRender: ({ record }) => {
|
|
|
// 未连接/空值 显示「/」
|
|
// 未连接/空值 显示「/」
|
|
|
- if (formatEmptyValue(record?.status)) return '/';
|
|
|
|
|
// 状态映射 + 标签渲染
|
|
// 状态映射 + 标签渲染
|
|
|
const status = String(record.status);
|
|
const status = String(record.status);
|
|
|
const text = status === '1' ? '在线' : '离线';
|
|
const text = status === '1' ? '在线' : '离线';
|
|
@@ -95,17 +87,14 @@ export const columns: BasicColumn[] = [
|
|
|
{
|
|
{
|
|
|
title: '应接数量',
|
|
title: '应接数量',
|
|
|
dataIndex: 'yingjieNum',
|
|
dataIndex: 'yingjieNum',
|
|
|
- customRender: ({ record }) => formatEmptyValue(record?.yingjieNum) ? '—' : record.yingjieNum,
|
|
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '已接数量',
|
|
title: '已接数量',
|
|
|
dataIndex: 'accessGoafNum',
|
|
dataIndex: 'accessGoafNum',
|
|
|
- customRender: ({ record }) => formatEmptyValue(record?.accessGoafNum) ? '—' : record.accessGoafNum,
|
|
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '未接数量',
|
|
title: '未接数量',
|
|
|
dataIndex: 'notAccessGoafNum',
|
|
dataIndex: 'notAccessGoafNum',
|
|
|
- customRender: ({ record }) => formatEmptyValue(record?.notAccessGoafNum) ? '—' : record.notAccessGoafNum,
|
|
|
|
|
},
|
|
},
|
|
|
];
|
|
];
|
|
|
|
|
|
|
@@ -232,4 +221,4 @@ export const minesData = [
|
|
|
accessGoafNum: ' ',
|
|
accessGoafNum: ' ',
|
|
|
notAccessGoafNum: undefined,
|
|
notAccessGoafNum: undefined,
|
|
|
},
|
|
},
|
|
|
-];
|
|
|
|
|
|
|
+];
|