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