wms-naivevue/src/views/logger/smsLog/columns.ts

80 lines
1.3 KiB
TypeScript

import { h } from 'vue';
export const columns = [
{
type: 'selection',
width: 50,
fixed: 'left',
},
{
title: 'ID',
key: 'id',
fixed: 'left',
width: 50,
},
{
title: '日志标题',
key: 'title',
width: 100,
},
{
title: '日志类型',
key: 'typeText',
width: 100,
},
{
title: '模板编号',
key: 'number',
width: 100,
},
{
title: '接收人手机',
key: 'receiveMobile',
width: 120,
},
{
title: '接收人类型',
key: 'receiveType',
width: 100,
render(record) {
let typeText = '';
switch (record.receiveType) {
case 1:
typeText = '系统用户';
break;
case 2:
typeText = '会员用户';
break;
case 3:
typeText = '其他';
break;
default:
break;
}
return h('span', typeText || '-');
},
},
{
title: '请求耗时',
key: 'consumeTime',
width: 100,
},
{
title: '日志状态',
key: 'status',
width: 100,
render(record) {
return h('span', record.status === 1 ? '已读' : '未读');
},
},
{
title: '创建人',
width: 100,
key: 'createUser',
},
{
title: '创建时间',
key: 'createTime',
width: 180,
},
];