<s-table
size="default"
ref="table"
rowKey="id"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
:columns="columns"
:data="loadData"
>
<span slot="status" slot-scope="text">
<a-badge :status="text | statusTypeFilter" :text="text | statusFilter" />
</span>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">详情</a>
</span>
</s-table>
<script>
import { STable } from '@/components'
import { getJobRecruitmentInfoList, delJobRecruitmentInfo } from '@/api/job/jobRecruitmentInfo'
import JobRecruitmentInfoModal from './modules/JobRecruitmentInfoPostModal.vue'
import { checkPermission } from '@/utils/permissions'
const statusMap = {
0: {
status: 'default',
text: '未知'
},
1: {
status: 'processing',
text: '实习'
},
2: {
status: 'success',
text: '正式'
}
}
form: this.$form.createForm(this),
mdl: {},
// 高级搜索 展开/关闭
advanced: false,
// 查询参数
queryParam: {},
// 表头
columns: [
{
title: '岗位名称',
dataIndex: 'postName'
},
{
title: '岗位要求',
dataIndex: 'postFunction'
},
{
title: '岗位类型',
dataIndex: 'postType',
scopedSlots: { customRender: 'status' }
},
{
title: '学历',
dataIndex: 'minimumEducation'
},
{
title: '最低薪资',
dataIndex: 'minSalary'
},
{
title: '最高薪资',
dataIndex: 'maxSalary'
},
{
title: '招聘人数',
dataIndex: 'recruitNum'
},
{
title: '工作地点',
dataIndex: 'workAreaId'
},
{
title: '发布日期',
dataIndex: 'createTime'
},
{
title: '操作',
width: '200px',
dataIndex: 'action',
scopedSlots: { customRender: 'action' }
}
],
// 加载数据方法 必须为 Promise 对象
loadData: parameter => {
return getJobRecruitmentInfoList(Object.assign(parameter, this.queryParam))
},
selectedRowKeys: [],
selectedRows: [],
addEnable: checkPermission('job:jobRecruitmentInfo:add'),
editEnabel: checkPermission('job:jobRecruitmentInfo:edit'),
removeEnable: checkPermission('job:jobRecruitmentInfo:remove')
}
},
filters: {
statusFilter (type) {
return statusMap[type].text
},
statusTypeFilter (type) {
return statusMap[type].status
}
},
created () {
},