63 lines
1.3 KiB
TypeScript
63 lines
1.3 KiB
TypeScript
// 创建测试结果渲染函数
|
|
export function createTestResultRender() {
|
|
return ({ text }) => {
|
|
if (text === '通过') return '<span style="color: #52c41a">通过</span>';
|
|
if (text === '不通过') return '<span style="color: #ff4d4f">不通过</span>';
|
|
return text || '待检查';
|
|
};
|
|
}
|
|
|
|
// 审计内容2表格列
|
|
export const strategyAuditColumns = [
|
|
{
|
|
title: '序号',
|
|
dataIndex: 'index',
|
|
key: 'index',
|
|
width: 60,
|
|
align: 'center'
|
|
},
|
|
{
|
|
title: '审计内容',
|
|
dataIndex: 'auditContent',
|
|
key: 'auditContent',
|
|
width: 150,
|
|
align: 'center',
|
|
// ellipsis: true
|
|
},
|
|
{
|
|
title: '检查的证据及测试内容',
|
|
dataIndex: 'checkEvidence',
|
|
key: 'checkEvidence',
|
|
width: 350,
|
|
align: 'center',
|
|
// ellipsis: true
|
|
},
|
|
{
|
|
title: '测试结果',
|
|
dataIndex: 'testResult',
|
|
key: 'testResult',
|
|
width: 100,
|
|
align: 'center',
|
|
customRender: createTestResultRender()
|
|
},
|
|
{
|
|
title: '工作底稿索引',
|
|
dataIndex: 'workPaperIndex',
|
|
key: 'workPaperIndex',
|
|
width: 200,
|
|
align: 'center',
|
|
// ellipsis: true
|
|
},
|
|
// {
|
|
// title: '操作',
|
|
// key: 'action',
|
|
// width: 100,
|
|
// align: 'center'
|
|
// }
|
|
];
|
|
|
|
export default {
|
|
strategyAuditColumns,
|
|
createTestResultRender
|
|
};
|