|
|
@@ -30,7 +30,7 @@ const formatQueJson = (queJsonStr: string) => {
|
|
|
// 非数组格式处理
|
|
|
if (!Array.isArray(queList)) return '问题格式异常';
|
|
|
// 拼接orderNum + queCon,多个问题用分号分隔
|
|
|
- return queList.map(item => `${item.orderNum || ''}:${item.queCon || ''}`).join('; ');
|
|
|
+ return queList.map((item) => `${item.orderNum || ''}:${item.queCon || ''}`).join('; ');
|
|
|
} catch (error) {
|
|
|
console.error('解析质量问题JSON失败:', error);
|
|
|
return '问题数据解析失败';
|
|
|
@@ -42,20 +42,17 @@ const formatEmptyValue = (value: any) => {
|
|
|
return value === null || value === undefined || value === '' || /^\s*$/.test(String(value));
|
|
|
};
|
|
|
|
|
|
-
|
|
|
/** 表格列配置 */
|
|
|
export const columns: BasicColumn[] = [
|
|
|
{
|
|
|
title: '煤矿名称',
|
|
|
dataIndex: 'mineName',
|
|
|
width: 250,
|
|
|
- customRender: ({ record }) => formatEmptyValue(record?.mineCode) ? '—' : record.mineCode,
|
|
|
},
|
|
|
{
|
|
|
title: '煤矿简称',
|
|
|
dataIndex: 'mineNameAbbr',
|
|
|
width: 150,
|
|
|
- customRender: ({ record }) => formatEmptyValue(record?.mineCode) ? '—' : record.mineCode,
|
|
|
},
|
|
|
{
|
|
|
title: '生产状态',
|
|
|
@@ -63,7 +60,6 @@ export const columns: BasicColumn[] = [
|
|
|
width: 120,
|
|
|
customRender: ({ record }) => {
|
|
|
// 空值处理
|
|
|
- if (formatEmptyValue(record?.mineProStatus)) return '—';
|
|
|
// 状态映射 + 标签渲染
|
|
|
const status = String(record.mineProStatus);
|
|
|
const { text, color } = productionStatusMap[status] || { text: '未知状态', color: 'gray' };
|
|
|
@@ -76,7 +72,6 @@ export const columns: BasicColumn[] = [
|
|
|
width: 100,
|
|
|
customRender: ({ record }) => {
|
|
|
// 未连接/空值 显示「/」
|
|
|
- if (formatEmptyValue(record?.mineLinkStatus)) return '/';
|
|
|
// 状态映射 + 标签渲染
|
|
|
const status = String(record.mineLinkStatus);
|
|
|
const text = status === '1' ? '在线' : '离线';
|
|
|
@@ -102,21 +97,21 @@ export const columns: BasicColumn[] = [
|
|
|
},
|
|
|
title: '查看详情',
|
|
|
style: {
|
|
|
- padding:'5px',
|
|
|
- }
|
|
|
+ padding: '5px',
|
|
|
+ },
|
|
|
},
|
|
|
[
|
|
|
h('div', {
|
|
|
- style: {
|
|
|
- background: `url('/@/assets/images/basicInfo/dataQuality/icon-view.svg')`,
|
|
|
- width: '16px',
|
|
|
- height: '16px',
|
|
|
- backgroundSize: 'contain',
|
|
|
- backgroundRepeat: 'no-repeat',
|
|
|
- },
|
|
|
- class: 'action-icon',
|
|
|
- alt: '查看详情',
|
|
|
- }),
|
|
|
+ style: {
|
|
|
+ background: `url('/@/assets/images/basicInfo/dataQuality/icon-view.svg')`,
|
|
|
+ width: '16px',
|
|
|
+ height: '16px',
|
|
|
+ backgroundSize: 'contain',
|
|
|
+ backgroundRepeat: 'no-repeat',
|
|
|
+ },
|
|
|
+ class: 'action-icon',
|
|
|
+ alt: '查看详情',
|
|
|
+ }),
|
|
|
]
|
|
|
),
|
|
|
]);
|
|
|
@@ -126,7 +121,6 @@ export const columns: BasicColumn[] = [
|
|
|
title: '当前状态',
|
|
|
dataIndex: 'isOk',
|
|
|
width: 100,
|
|
|
- customRender: ({ record }) => formatEmptyValue(record?.mineCode) ? '—' : record.mineCode,
|
|
|
},
|
|
|
{
|
|
|
title: '处理时间',
|
|
|
@@ -250,12 +244,10 @@ export const topFormSchema = [
|
|
|
},
|
|
|
required: true,
|
|
|
},
|
|
|
-
|
|
|
];
|
|
|
|
|
|
/** 弹框表单配置 */
|
|
|
-export const formSchema = [
|
|
|
-
|
|
|
+export const formSchema = [
|
|
|
{
|
|
|
field: 'goafName',
|
|
|
label: '工作面名称',
|