wms-antdvue/.svn/pristine/b3/b3eb8aa32a65a6b84acbd8df87a6b9f6b7abfcb5.svn-base
2024-11-07 16:33:03 +08:00

84 lines
1.5 KiB
Plaintext

import { h } from 'vue';
import { ElTag } from 'element-plus';
export const columns = [
{
title: 'ID',
dataIndex: 'id',
fixed: 'left',
width: 50,
},
{
title: '文件名称',
dataIndex: 'originalName',
width: 100,
customRender({ record }) {
return h(
'a',
{
href: record.filePath,
target: '_blank',
},
record.originalName,
);
},
},
{
title: '日志类型',
dataIndex: 'type',
width: 100,
customRender({ record }) {
let typeText = '';
switch (record.type) {
case 0:
typeText = '单个文件';
break;
case 1:
typeText = '多个文件';
break;
case 2:
typeText = '其他';
break;
default:
break;
}
return h('span', typeText || '-');
},
},
{
title: '文件类型',
dataIndex: 'fileType',
width: 100,
},
{
title: '文件大小',
dataIndex: 'fileSize',
width: 100,
customRender({ record }) {
return h('span', record.fileSize + 'B');
},
},
{
title: '文件后缀',
dataIndex: 'fileExtension',
width: 100,
},
{
title: '创建人',
dataIndex: 'createUser',
width: 100,
},
{
title: '创建时间',
dataIndex: 'createTime',
width: 180,
},
{
title: '操作',
fixed: 'right',
dataIndex: 'action',
key: 'action',
width: 200,
},
];