|
@@ -1,30 +1,12 @@
|
|
<template>
|
|
<template>
|
|
<div class="px-5 pt-1 py-15" style="position: relative;">
|
|
<div class="px-5 pt-1 py-15" style="position: relative;">
|
|
- <h3 class="my-3" style="color: var(--v-primary-base);">条件筛选</h3>
|
|
|
|
- <!-- <v-divider class="my-3"></v-divider>
|
|
|
|
- <div class="text-right reset-text cursor-pointer" @click="handleReset">重置筛选</div> -->
|
|
|
|
- <CtForm ref="CtFormRef" :items="formItems" style="width: 100%;">
|
|
|
|
- <!-- 期望岗位 -->
|
|
|
|
- <template #positionId="{ item }">
|
|
|
|
- <v-menu :close-delay="1" :open-delay="0" v-bind="$attrs">
|
|
|
|
- <template v-slot:activator="{ props }">
|
|
|
|
- <textUI
|
|
|
|
- v-model="item.value"
|
|
|
|
- :item="item"
|
|
|
|
- v-bind="props"
|
|
|
|
- style="position: relative;"
|
|
|
|
- @handleClear="handleJobClickItem()"
|
|
|
|
- ></textUI>
|
|
|
|
- </template>
|
|
|
|
- <jobTypeCard class="jobTypeCardBox" :select="[item[item.valueKey]].filter(Boolean)" :isSingle="true" @handleJobClick="handleJobClickItem"></jobTypeCard>
|
|
|
|
- </v-menu>
|
|
|
|
- </template>
|
|
|
|
- </CtForm>
|
|
|
|
|
|
+ <h3 class="mt-3 my-5" style="color: var(--v-primary-base);">职位匹配</h3>
|
|
|
|
+ <CtForm ref="CtFormRef" :items="formItems" style="width: 100%;"></CtForm>
|
|
<div class="bottom">
|
|
<div class="bottom">
|
|
<v-divider></v-divider>
|
|
<v-divider></v-divider>
|
|
<div class="d-flex justify-space-between mt-3">
|
|
<div class="d-flex justify-space-between mt-3">
|
|
<div class="ml-3">
|
|
<div class="ml-3">
|
|
- <v-btn class="half-button mr-3" color="primary" @click="confirm">筛选</v-btn>
|
|
|
|
|
|
+ <v-btn class="half-button mr-3" color="primary" @click="confirm">开始匹配</v-btn>
|
|
<v-btn class="half-button mr-3" variant="tonal" @click="emit('cancel')">取消</v-btn>
|
|
<v-btn class="half-button mr-3" variant="tonal" @click="emit('cancel')">取消</v-btn>
|
|
</div>
|
|
</div>
|
|
<v-btn class="half-button ml-3" variant="tonal" color="orange" @click="handleReset">重置</v-btn>
|
|
<v-btn class="half-button ml-3" variant="tonal" color="orange" @click="handleReset">重置</v-btn>
|
|
@@ -36,11 +18,6 @@
|
|
<script setup>
|
|
<script setup>
|
|
defineOptions({ name: 'talent-map-filter'})
|
|
defineOptions({ name: 'talent-map-filter'})
|
|
import { getRocketLabelList } from '@/api/recruit/enterprise/resumeManagement/talentMap'
|
|
import { getRocketLabelList } from '@/api/recruit/enterprise/resumeManagement/talentMap'
|
|
-
|
|
|
|
-import jobTypeCard from '@/components/jobTypeCard'
|
|
|
|
-import textUI from '@/components/FormUI/TextInput'
|
|
|
|
-import { getDict } from '@/hooks/web/useDictionaries'
|
|
|
|
-import Snackbar from '@/plugins/snackbar'
|
|
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
const emit = defineEmits(['cancel', 'confirm'])
|
|
const emit = defineEmits(['cancel', 'confirm'])
|
|
|
|
|
|
@@ -49,152 +26,34 @@ const CtFormRef = ref()
|
|
const formItems = ref({
|
|
const formItems = ref({
|
|
options: [
|
|
options: [
|
|
{
|
|
{
|
|
- type: 'text',
|
|
|
|
- key: 'name',
|
|
|
|
- value: '',
|
|
|
|
- label: '姓名 ',
|
|
|
|
|
|
+ type: 'textarea',
|
|
|
|
+ key: 'content',
|
|
|
|
+ value: null,
|
|
|
|
+ counter: 500,
|
|
|
|
+ rows: 5,
|
|
|
|
+ resize: true,
|
|
|
|
+ label: '匹配内容',
|
|
|
|
+ placeholder: '请输入要匹配内容',
|
|
|
|
+ clearable: true,
|
|
|
|
+ outlined: true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 'autocomplete',
|
|
type: 'autocomplete',
|
|
key: 'labels',
|
|
key: 'labels',
|
|
value: null,
|
|
value: null,
|
|
- label: '人员标签 ',
|
|
|
|
|
|
+ label: '人才标签 ',
|
|
multiple: true,
|
|
multiple: true,
|
|
outlined: true,
|
|
outlined: true,
|
|
itemText: 'label',
|
|
itemText: 'label',
|
|
itemValue: 'value',
|
|
itemValue: 'value',
|
|
|
|
+ clearable: true,
|
|
items: [
|
|
items: [
|
|
{ label: '标签', value: '0' },
|
|
{ label: '标签', value: '0' },
|
|
]
|
|
]
|
|
},
|
|
},
|
|
- {
|
|
|
|
- type: 'number',
|
|
|
|
- key: 'age1',
|
|
|
|
- value: null,
|
|
|
|
- label: '年龄区间:起始',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'number',
|
|
|
|
- key: 'age2',
|
|
|
|
- value: null,
|
|
|
|
- label: '年龄区间:结束',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'number',
|
|
|
|
- key: 'pay1',
|
|
|
|
- value: null,
|
|
|
|
- suffix: '元',
|
|
|
|
- label: '期望薪资:起始',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'number',
|
|
|
|
- key: 'pay2',
|
|
|
|
- value: null,
|
|
|
|
- suffix: '元',
|
|
|
|
- label: '期望薪资:结束',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'areaSelect',
|
|
|
|
- key: 'areaIds',
|
|
|
|
- value: '',
|
|
|
|
- // label: ' ',
|
|
|
|
- placeholder: '所在城市', // 暂时只能使用placeholder
|
|
|
|
- readonly: true,
|
|
|
|
- limit: 1,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'areaSelect',
|
|
|
|
- key: 'regIds',
|
|
|
|
- value: '',
|
|
|
|
- // label: ' ',
|
|
|
|
- placeholder: '户籍所在地', // 暂时只能使用placeholder
|
|
|
|
- readonly: true,
|
|
|
|
- limit: 1,
|
|
|
|
- },
|
|
|
|
- // {
|
|
|
|
- // type: 'autocomplete',
|
|
|
|
- // key: 'eduType',
|
|
|
|
- // value: null,
|
|
|
|
- // default: null,
|
|
|
|
- // label: '学历',
|
|
|
|
- // outlined: true,
|
|
|
|
- // itemText: 'label',
|
|
|
|
- // itemValue: 'value',
|
|
|
|
- // dictTypeName: 'menduner_education_type',
|
|
|
|
- // items: []
|
|
|
|
- // },
|
|
|
|
- // {
|
|
|
|
- // type: 'autocomplete',
|
|
|
|
- // key: 'expType',
|
|
|
|
- // value: null,
|
|
|
|
- // default: null,
|
|
|
|
- // label: '工作经验',
|
|
|
|
- // outlined: true,
|
|
|
|
- // itemText: 'label',
|
|
|
|
- // itemValue: 'value',
|
|
|
|
- // dictTypeName: 'menduner_exp_type',
|
|
|
|
- // items: []
|
|
|
|
- // },
|
|
|
|
- // {
|
|
|
|
- // slotName: 'positionId',
|
|
|
|
- // key: 'positionName',
|
|
|
|
- // value: '',
|
|
|
|
- // label: '职位类型 ',
|
|
|
|
- // valueKey: 'positionId',
|
|
|
|
- // hideDetails: true,
|
|
|
|
- // readonly: true,
|
|
|
|
- // outlined: true,
|
|
|
|
- // },
|
|
|
|
- {
|
|
|
|
- type: 'autocomplete',
|
|
|
|
- key: 'jobType',
|
|
|
|
- value: null,
|
|
|
|
- label: '求职类型 ',
|
|
|
|
- outlined: true,
|
|
|
|
- itemText: 'label',
|
|
|
|
- itemValue: 'value',
|
|
|
|
- items: [
|
|
|
|
- { label: '全职', value: '0' },
|
|
|
|
- { label: '兼职', value: '1' },
|
|
|
|
- { label: '临时', value: '2' },
|
|
|
|
- { label: '实习', value: '3' }
|
|
|
|
- ]
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'autocomplete',
|
|
|
|
- key: 'jobStatus',
|
|
|
|
- value: null,
|
|
|
|
- default: null,
|
|
|
|
- label: '求职状态 ',
|
|
|
|
- outlined: true,
|
|
|
|
- itemText: 'label',
|
|
|
|
- itemValue: 'value',
|
|
|
|
- dictTypeName: 'menduner_job_status',
|
|
|
|
- items: []
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- type: 'autocomplete',
|
|
|
|
- key: 'maritalStatus',
|
|
|
|
- value: null,
|
|
|
|
- default: null,
|
|
|
|
- label: '婚姻状况 ',
|
|
|
|
- outlined: true,
|
|
|
|
- itemText: 'label',
|
|
|
|
- itemValue: 'value',
|
|
|
|
- dictTypeName: 'menduner_marital_status',
|
|
|
|
- items: []
|
|
|
|
- },
|
|
|
|
]
|
|
]
|
|
})
|
|
})
|
|
|
|
|
|
-// 获取字典内容
|
|
|
|
-const getDictData = async (item) => {
|
|
|
|
- if (item) {
|
|
|
|
- const { data } = await getDict(item.dictTypeName)
|
|
|
|
- item.items = data
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
const getLabelData = async () => {
|
|
const getLabelData = async () => {
|
|
const res = await getRocketLabelList({ current: 1, size:9999, type: 'person' }) //type: job enterprise person
|
|
const res = await getRocketLabelList({ current: 1, size:9999, type: 'person' }) //type: job enterprise person
|
|
const labels = res?.records || []
|
|
const labels = res?.records || []
|
|
@@ -205,73 +64,23 @@ const getLabelData = async () => {
|
|
}
|
|
}
|
|
getLabelData()
|
|
getLabelData()
|
|
|
|
|
|
-formItems.value.options.forEach((e, index) => {
|
|
|
|
- // 查字典set options
|
|
|
|
- if (e.dictTypeName) getDictData(e)
|
|
|
|
- // 样式
|
|
|
|
- e.col = 6
|
|
|
|
- e.clearable = true
|
|
|
|
- if ((index + 2) % 2 === 0 && !e.flexStyle) e.flexStyle = 'mr-3'
|
|
|
|
-})
|
|
|
|
-
|
|
|
|
-// const setOneValue = (key, value) => {
|
|
|
|
-// formItems.value.options.find(e => e.key === key).value = value
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// 期望职位
|
|
|
|
-const positionId = ref('')
|
|
|
|
-const positionName = ref('')
|
|
|
|
-const handleJobClickItem = (list, name) => {
|
|
|
|
- const positionItem = formItems.value.options.find(f => f.key === 'positionName')
|
|
|
|
- if (positionItem) {
|
|
|
|
- if (list?.length) {
|
|
|
|
- positionItem.value = positionName.value = name || ''
|
|
|
|
- positionItem[positionItem.valueKey] = positionId.value = list?.length ? list[0] : ''
|
|
|
|
- } else {
|
|
|
|
- positionItem.value = name || ''
|
|
|
|
- positionItem[positionItem.valueKey] = list?.length ? list[0] : ''
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
const confirm = () => {
|
|
const confirm = () => {
|
|
const obj = {}
|
|
const obj = {}
|
|
formItems.value.options.forEach(e => {
|
|
formItems.value.options.forEach(e => {
|
|
- if (e.key === 'positionName') {
|
|
|
|
- if (e.value) {
|
|
|
|
- obj[e.valueKey] = positionId.value || ''
|
|
|
|
- obj[e.key] = positionName.value || ''
|
|
|
|
- }
|
|
|
|
- } else if (e.value !== null && e.value !== '' && e.value !== undefined) obj[e.key] = e.value
|
|
|
|
|
|
+ if (e.value !== null && e.value !== '' && e.value !== undefined) obj[e.key] = e.value
|
|
})
|
|
})
|
|
- if (obj.age1 > obj.age2) return Snackbar.warning('年龄区间异常,前者不能大于后者!')
|
|
|
|
- if (obj.pay2 > obj.pay1) return Snackbar.warning('期望薪资异常,前者不能大于后者!')
|
|
|
|
- //
|
|
|
|
- if (obj.age1 || obj.age2) obj.age = [obj.age1 || null, obj.age2 || null].filter(Boolean)
|
|
|
|
- if (obj.pay1 || obj.pay2) obj.pay = [obj.pay1 || null, obj.pay2 || null].filter(Boolean)
|
|
|
|
- //
|
|
|
|
if (!obj.labels?.length) delete obj.labels
|
|
if (!obj.labels?.length) delete obj.labels
|
|
emit('confirm', obj)
|
|
emit('confirm', obj)
|
|
}
|
|
}
|
|
|
|
|
|
const resetValue = () => {
|
|
const resetValue = () => {
|
|
formItems.value.options.forEach(e => {
|
|
formItems.value.options.forEach(e => {
|
|
- if (e.key === 'positionName') {
|
|
|
|
- e[e.valueKey] = ''
|
|
|
|
- e.value = e[e.valueKey] = positionId.value = positionName.value = ''
|
|
|
|
- } else {
|
|
|
|
- e.value = null
|
|
|
|
- }
|
|
|
|
|
|
+ e.value = null
|
|
})
|
|
})
|
|
}
|
|
}
|
|
const setValue = (query) => {
|
|
const setValue = (query) => {
|
|
formItems.value.options.forEach(e => {
|
|
formItems.value.options.forEach(e => {
|
|
- if (e.key === 'positionName') {
|
|
|
|
- e.value = positionName.value = query[e.key]
|
|
|
|
- e[e.valueKey] = positionId.value = query[e.valueKey]
|
|
|
|
- } else {
|
|
|
|
- if (query[e.key] !== undefined) e.value = query[e.key]
|
|
|
|
- }
|
|
|
|
|
|
+ if (query[e.key] !== undefined) e.value = query[e.key]
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|