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

80 lines
1.3 KiB
Plaintext

import { h } from 'vue';
export const columns = [
{
title: 'ID',
dataIndex: 'id',
fixed: 'left',
width: 50,
},
{
title: '模板名称',
dataIndex: 'title',
width: 150,
},
{
title: '模板编码',
dataIndex: 'code',
width: 150,
},
{
title: '模板类型',
dataIndex: 'type',
width: 100,
customRender({ record }) {
let typeText = '';
switch (record.type) {
case 1:
typeText = '普通邮件';
break;
case 2:
typeText = '图文邮件';
break;
case 3:
typeText = '模板文件';
break;
default:
break;
}
return h('span', typeText || '-');
},
},
{
title: '文件名称',
dataIndex: 'fileName',
width: 100,
},
{
title: '文件路径',
dataIndex: 'filePath',
width: 100,
customRender({ record }) {
return h(
'a',
{
href: record.filePath,
target: '_blank',
},
'点击查看文件',
);
},
},
{
title: '创建人',
dataIndex: 'createUser',
width: 100,
},
{
title: '创建时间',
dataIndex: 'createTime',
width: 180,
},
{
title: '操作',
fixed: 'right',
dataIndex: 'action',
key: 'action',
width: 200,
},
];