68 lines
1.2 KiB
Plaintext
68 lines
1.2 KiB
Plaintext
import { h } from 'vue';
|
|
import { Tag } from 'ant-design-vue';
|
|
|
|
export const columns = [
|
|
{
|
|
title:'ID',
|
|
dataIndex: 'id',
|
|
fixed:'left',
|
|
width: 50,
|
|
},
|
|
{
|
|
title: '消息标题',
|
|
dataIndex: 'title',
|
|
},
|
|
{
|
|
title: '消息类型',
|
|
dataIndex: 'type',
|
|
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: 'status',
|
|
customRender({ record }) {
|
|
return h('span', record.bizType === 1 ? '订单' : '其他')
|
|
},
|
|
},
|
|
{
|
|
title: '消息状态',
|
|
dataIndex: 'status',
|
|
customRender({ record }) {
|
|
return h('span', record.status === 1 ? '已读' : '未读')
|
|
},
|
|
},
|
|
|
|
{
|
|
title: '创建人',
|
|
dataIndex: 'createUser',
|
|
},
|
|
{
|
|
title: '创建时间',
|
|
dataIndex: 'createTime',
|
|
width: 180,
|
|
},
|
|
{
|
|
title: '操作',
|
|
fixed:'right',
|
|
dataIndex: 'action',
|
|
key: 'action',
|
|
width: 200,
|
|
},
|
|
];
|