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

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

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