55 lines
909 B
Plaintext
55 lines
909 B
Plaintext
import { h } from 'vue';
|
|
import { Tag } from 'ant-design-vue';
|
|
|
|
export const columns = [
|
|
{
|
|
title: 'ID',
|
|
dataIndex: 'id',
|
|
fixed: 'left',
|
|
width: 50,
|
|
},
|
|
{
|
|
title: '职级名称',
|
|
dataIndex: 'name',
|
|
width: 100,
|
|
},
|
|
{
|
|
title: '职级状态',
|
|
dataIndex: 'status',
|
|
width: 100,
|
|
customRender({ record }) {
|
|
return h(
|
|
Tag,
|
|
{
|
|
color: record.status == 1 ? 'success' : 'error',
|
|
},
|
|
{
|
|
default: () => (record.status == 1 ? '正常' : '停用'),
|
|
},
|
|
);
|
|
},
|
|
},
|
|
{
|
|
title: '排序',
|
|
dataIndex: 'sort',
|
|
width: 100,
|
|
},
|
|
{
|
|
title: '创建人',
|
|
dataIndex: 'createUser',
|
|
width: 100,
|
|
},
|
|
{
|
|
title: '创建时间',
|
|
dataIndex: 'createTime',
|
|
width: 180,
|
|
},
|
|
{
|
|
title: '操作',
|
|
fixed: 'right',
|
|
dataIndex: 'action',
|
|
key: 'action',
|
|
width: 200,
|
|
},
|
|
];
|