适配json数据,用来适配后端传回的json数据
This commit is contained in:
@@ -114,6 +114,22 @@ export const columns: BasicColumn[] = [
|
||||
align: 'center',
|
||||
dataIndex: 'supervisionCount',
|
||||
},
|
||||
{
|
||||
title: '审批信息',
|
||||
align: 'center',
|
||||
dataIndex: 'approveInfo',
|
||||
customRender: ({ text }) => {
|
||||
if (!text) return '-';
|
||||
try {
|
||||
const info = typeof text === 'string' ? JSON.parse(text) : text;
|
||||
const keys = Object.keys(info);
|
||||
if (keys.length === 0) return '-';
|
||||
return `${keys.length} 项审批`;
|
||||
} catch {
|
||||
return '-';
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
//子表列表数据
|
||||
@@ -240,4 +256,5 @@ export const superQuerySchema = {
|
||||
sortOrder: { title: '同级数据排序号', order: 19, view: 'number', type: 'number' },
|
||||
bpmStatus: { title: '流程引擎状态字段', order: 21, view: 'number', type: 'number' },
|
||||
supervisionCount: { title: '督办次数', order: 22, view: 'number', type: 'number' },
|
||||
approveInfo: { title: '审批信息', order: 23, view: 'text', type: 'string' },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user