提交 f6deb81a authored 作者: matian's avatar matian

岗位列表筛选条件地点修改

上级 d943d4d4
<script setup lang="ts">
import { positionType, adultStatusMap, highGraduation } from '../map'
import { getPositionList, getPositionStatus } from '../api'
import { useArea } from '@/composables/useArea'
const { treeList } = useArea()
const router = useRouter()
const appList = ref()
const listOptions = {
remote: {
beforeRequest(params: any, isReset: boolean) {
params.work_locations = params.work_locations[0] + '-' + params.work_locations[1]
if (isReset) {
params.work_locations = ''
}
return params
},
httpRequest: getPositionList,
params: {
name: '',
......@@ -28,7 +38,7 @@ const listOptions = {
options: highGraduation,
align: 'center'
},
{ type: 'input', prop: 'work_locations', placeholder: '工作地点' },
{ type: 'select', prop: 'work_locations', placeholder: '工作地点', slots: 'workPlace', options: treeList },
{ type: 'input', prop: 'name', placeholder: '岗位名称' },
{
type: 'select',
......@@ -117,11 +127,23 @@ const handleDetail = (row: any) => {
}
})
}
const handleChange = () => {
appList.value.refetch()
}
</script>
<template>
<AppCard>
<AppList v-bind="listOptions" ref="appList">
<template #workPlace="{ params }">
<el-cascader
v-model="params.work_locations"
:options="treeList"
@change="handleChange"
placeholder="地点"
clearable
></el-cascader>
</template>
<template v-slot:status="{ row }">
<el-switch
size="large"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论