wms-antdvue/.svn/pristine/75/756b083beb4b63e2ca7d57b051b52ff0c752bce7.svn-base
2024-11-07 16:33:03 +08:00

74 lines
1.3 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',
customRender({ record }) {
return h('a', {
href:record.filePath,
target:"_blank"
},record.originalName);
},
},
{
title: '日志类型',
dataIndex: 'type',
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',
},
{
title: '文件大小',
dataIndex: 'fileSize',
customRender({ record }) {
return h('span', record.fileSize+'B')
},
},
{
title: '文件后缀',
dataIndex:'fileExtension'
},
{
title: '创建人',
dataIndex: 'createUser',
},
{
title: '创建时间',
dataIndex: 'createTime',
width: 180,
},
{
title: '操作',
fixed:'right',
dataIndex: 'action',
key: 'action',
width: 200,
},
];