|
@@ -36,57 +36,7 @@
|
|
<div v-else class="resumeNoDataText">{{ $t('resume.dataDefaultPrompt') }}{{ $t('resume.jobIntention') }}...</div>
|
|
<div v-else class="resumeNoDataText">{{ $t('resume.dataDefaultPrompt') }}{{ $t('resume.jobIntention') }}...</div>
|
|
</div>
|
|
</div>
|
|
<div v-if="isAdd" class="mt-2">
|
|
<div v-if="isAdd" class="mt-2">
|
|
- <CtForm ref="formPageRef" :items="items" style="width: 100%;">
|
|
|
|
- <!-- 期望岗位 -->
|
|
|
|
- <!-- <template #positionId="{ item }">
|
|
|
|
- <v-menu :close-delay="1" :open-delay="0" v-bind="$attrs">
|
|
|
|
- <template v-slot:activator="{ props }">
|
|
|
|
- <textUI
|
|
|
|
- :modelValue="item.value"
|
|
|
|
- :item="item"
|
|
|
|
- v-bind="props"
|
|
|
|
- style="position: relative;"
|
|
|
|
- ></textUI>
|
|
|
|
- </template>
|
|
|
|
- <jobTypeCard class="jobTypeCardBox" :select="[query.positionId].filter(Boolean)" :isSingle="true" @handleJobClick="handleJobClickItem"></jobTypeCard>
|
|
|
|
- </v-menu>
|
|
|
|
- </template> -->
|
|
|
|
- <!-- 期望行业 -->
|
|
|
|
- <template #industryIdList="{ item }">
|
|
|
|
- <v-menu :close-delay="1" :open-delay="0" v-bind="$attrs" :close-on-content-click="false">
|
|
|
|
- <template v-slot:activator="{ props }">
|
|
|
|
- <textUI
|
|
|
|
- v-model="item.value"
|
|
|
|
- :item="item"
|
|
|
|
- v-bind="props"
|
|
|
|
- >
|
|
|
|
- <template #default>
|
|
|
|
- <v-chip v-for="k in currentSelect" :key="k.id" class="mr-1" closable @click:close="handleIndustryClear(k)">{{ k.nameCn }}</v-chip>
|
|
|
|
- </template>
|
|
|
|
- </textUI>
|
|
|
|
- </template>
|
|
|
|
- <industryTypeCard :select="query.industryIdList" :currentData="currentSelect" showSelect @handleClickIndustry="handleIndustry"></industryTypeCard>
|
|
|
|
- </v-menu>
|
|
|
|
- </template>
|
|
|
|
- <!-- 其它感兴趣的城市 -->
|
|
|
|
- <template #interestedAreaIdList="{ item }">
|
|
|
|
- <v-menu :close-delay="1" :open-delay="0" v-bind="$attrs" :close-on-content-click="false">
|
|
|
|
- <template v-slot:activator="{ props }">
|
|
|
|
- <TextInput
|
|
|
|
- v-model="item.value"
|
|
|
|
- :item="item"
|
|
|
|
- v-bind="props"
|
|
|
|
- style="position: relative;"
|
|
|
|
- >
|
|
|
|
- <template #default>
|
|
|
|
- <v-chip v-for="k in areaSelect" :key="k.id" class="mr-1" closable @click:close="handleAreaClear(k)">{{ k.name }}</v-chip>
|
|
|
|
- </template>
|
|
|
|
- </TextInput>
|
|
|
|
- </template>
|
|
|
|
- <AreaSelect :select="query.interestedAreaIdList" :currentData="areaSelect" :limit="false" showSelect @handleClick="handleArea"></AreaSelect>
|
|
|
|
- </v-menu>
|
|
|
|
- </template>
|
|
|
|
- </CtForm>
|
|
|
|
|
|
+ <CtForm ref="formPageRef" :items="items" style="width: 100%;"></CtForm>
|
|
<div class="text-end">
|
|
<div class="text-end">
|
|
<v-btn class="half-button mr-3" variant="tonal" @click="isAdd = false; resetForm()">{{ $t('common.cancel') }}</v-btn>
|
|
<v-btn class="half-button mr-3" variant="tonal" @click="isAdd = false; resetForm()">{{ $t('common.cancel') }}</v-btn>
|
|
<v-btn color="primary" class="half-button" @click="handleSave">{{ $t('common.save') }}</v-btn>
|
|
<v-btn color="primary" class="half-button" @click="handleSave">{{ $t('common.save') }}</v-btn>
|
|
@@ -98,9 +48,6 @@
|
|
<script setup name="jobIntention">
|
|
<script setup name="jobIntention">
|
|
import { ref, reactive } from 'vue'
|
|
import { ref, reactive } from 'vue'
|
|
import CtForm from '@/components/CtForm'
|
|
import CtForm from '@/components/CtForm'
|
|
-import textUI from '@/components/FormUI/TextInput'
|
|
|
|
-// import jobTypeCard from '@/components/jobTypeCard'
|
|
|
|
-import industryTypeCard from '@/components/industryTypeCard'
|
|
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Confirm from '@/plugins/confirm'
|
|
import Confirm from '@/plugins/confirm'
|
|
import { saveResumeJobInterested, getResumeJobInterested, deleteResumeJobInterested } from '@/api/recruit/personal/resume'
|
|
import { saveResumeJobInterested, getResumeJobInterested, deleteResumeJobInterested } from '@/api/recruit/personal/resume'
|
|
@@ -129,26 +76,21 @@ const items = ref({
|
|
rules: [v => !!v || '请选择期望岗位'],
|
|
rules: [v => !!v || '请选择期望岗位'],
|
|
items: [],
|
|
items: [],
|
|
},
|
|
},
|
|
- // {
|
|
|
|
- // slotName: 'positionId',
|
|
|
|
- // key: 'positionId',
|
|
|
|
- // value: '',
|
|
|
|
- // col: 6,
|
|
|
|
- // label: '期望岗位 *',
|
|
|
|
- // flexStyle: 'mr-3',
|
|
|
|
- // valueKey: 'position',
|
|
|
|
- // hideDetails: true,
|
|
|
|
- // outlined: true,
|
|
|
|
- // rules: [v => !!v || '请选择期望岗位']
|
|
|
|
- // },
|
|
|
|
{
|
|
{
|
|
- slotName: 'industryIdList',
|
|
|
|
|
|
+ type: 'cascade',
|
|
key: 'industryIdList',
|
|
key: 'industryIdList',
|
|
- value: '',
|
|
|
|
- outlined: true,
|
|
|
|
- placeholder: '期望行业 *',
|
|
|
|
|
|
+ value: [],
|
|
|
|
+ default: [],
|
|
|
|
+ label: '期望行业',
|
|
|
|
+ itemText: 'nameCn',
|
|
|
|
+ itemValue: 'id',
|
|
|
|
+ required: true,
|
|
|
|
+ collapseTags: true,
|
|
|
|
+ clearable: false,
|
|
|
|
+ multiple: true,
|
|
col: 6,
|
|
col: 6,
|
|
- // rules: [v => !!v || '请选择期望行业']
|
|
|
|
|
|
+ rules: [v => !!v || '请选择期望行业'],
|
|
|
|
+ items: [],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 'number',
|
|
type: 'number',
|
|
@@ -220,25 +162,31 @@ const items = ref({
|
|
itemValue: 'id',
|
|
itemValue: 'id',
|
|
required: true,
|
|
required: true,
|
|
clearable: false,
|
|
clearable: false,
|
|
|
|
+ checkStrictly: true,
|
|
col: 6,
|
|
col: 6,
|
|
items: [],
|
|
items: [],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- slotName: 'interestedAreaIdList',
|
|
|
|
|
|
+ type: 'cascade',
|
|
key: 'interestedAreaIdList',
|
|
key: 'interestedAreaIdList',
|
|
- value: '',
|
|
|
|
- placeholder: '其它感兴趣的城市'
|
|
|
|
|
|
+ value: [],
|
|
|
|
+ label: '其它感兴趣的城市',
|
|
|
|
+ itemText: 'name',
|
|
|
|
+ itemValue: 'id',
|
|
|
|
+ collapseTags: true,
|
|
|
|
+ checkStrictly: true,
|
|
|
|
+ clearable: false,
|
|
|
|
+ multiple: true,
|
|
|
|
+ items: []
|
|
}
|
|
}
|
|
]
|
|
]
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+// 期望城市、其它感兴趣的城市
|
|
getDict('areaTreeData', null, 'areaTreeData').then(({ data }) => {
|
|
getDict('areaTreeData', null, 'areaTreeData').then(({ data }) => {
|
|
data = data?.length && data || []
|
|
data = data?.length && data || []
|
|
- if (!data?.length) return console.error('areaTreeData获取失败!')
|
|
|
|
- const chinaTreeData = data
|
|
|
|
- if (!chinaTreeData?.length) return console.error('chinaTreeData获取失败!')
|
|
|
|
- const item = items.value.options.find(e => e.key === 'workAreaId')
|
|
|
|
- if (item?.items) item.items = chinaTreeData
|
|
|
|
|
|
+ items.value.options.find(e => e.key === 'workAreaId').items = data
|
|
|
|
+ items.value.options.find(e => e.key === 'interestedAreaIdList').items = data
|
|
})
|
|
})
|
|
|
|
|
|
// 求职类型
|
|
// 求职类型
|
|
@@ -252,6 +200,12 @@ getDict('positionTreeData', null, 'positionTreeData').then(({ data }) => {
|
|
items.value.options.find(e => e.key === 'positionId').items = data
|
|
items.value.options.find(e => e.key === 'positionId').items = data
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+// 期望行业
|
|
|
|
+getDict('industryTreeData', null, 'industryTreeData').then(({ data }) => {
|
|
|
|
+ data = data?.length && data || []
|
|
|
|
+ items.value.options.find(e => e.key === 'industryIdList').items = data
|
|
|
|
+})
|
|
|
|
+
|
|
// 获取求职意向
|
|
// 获取求职意向
|
|
const interestList = ref([])
|
|
const interestList = ref([])
|
|
const getJobInterested = async () => {
|
|
const getJobInterested = async () => {
|
|
@@ -266,65 +220,21 @@ const getJobInterested = async () => {
|
|
}
|
|
}
|
|
getJobInterested()
|
|
getJobInterested()
|
|
|
|
|
|
-const setValue = (key, value) => {
|
|
|
|
- items.value.options.find(e => e.key === key).value = value
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-// // 期望职位
|
|
|
|
-// const handleJobClickItem = (list, name) => {
|
|
|
|
-// if (!list.length) return
|
|
|
|
-// query.positionId = list[0]
|
|
|
|
-// setValue('positionId', name)
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// 行业类型
|
|
|
|
-let currentSelect = reactive([])
|
|
|
|
-const handleIndustry = (list, arr) => {
|
|
|
|
- if (!list.length) return setValue('industryIdList', '')
|
|
|
|
- query.industryIdList = list
|
|
|
|
- currentSelect = arr
|
|
|
|
- // const str = arr.map(e => e.nameCn).join('、')
|
|
|
|
- // setValue('industryIdList', str)
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-const handleIndustryClear = (k) => {
|
|
|
|
- query.industryIdList = query.industryIdList.filter(i => i !== k.id)
|
|
|
|
- const index = currentSelect.findIndex(i => i.id === k.id)
|
|
|
|
- if (index !== -1) currentSelect.splice(index, 1)
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-// 其它感兴趣的城市
|
|
|
|
-let areaSelect = reactive([])
|
|
|
|
-const handleArea = (list, arr) => {
|
|
|
|
- if (!list.length) return setValue('interestedAreaIdList', '')
|
|
|
|
- query.interestedAreaIdList = list
|
|
|
|
- areaSelect = arr
|
|
|
|
-}
|
|
|
|
-const handleAreaClear = (k) => {
|
|
|
|
- query.interestedAreaIdList = query.interestedAreaIdList.filter(i => Number(i) !== Number(k.id))
|
|
|
|
- const index = areaSelect.findIndex(i => Number(i.id) === Number(k.id))
|
|
|
|
- if (index !== -1) areaSelect.splice(index, 1)
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
const resetForm = () => {
|
|
const resetForm = () => {
|
|
items.value.options.forEach(e => {
|
|
items.value.options.forEach(e => {
|
|
- if (e.key === 'industryIdList') e.value = ''
|
|
|
|
|
|
+ if (e.key === 'industryIdList') e.value = []
|
|
else e.value = null
|
|
else e.value = null
|
|
})
|
|
})
|
|
editId.value = null
|
|
editId.value = null
|
|
query = {}
|
|
query = {}
|
|
- currentSelect = []
|
|
|
|
- areaSelect = []
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-const arr = ['payFrom', 'payTo', 'jobType', 'workAreaId', 'positionId']
|
|
|
|
const handleSave = async () => {
|
|
const handleSave = async () => {
|
|
const { valid } = await formPageRef.value.formRef.validate()
|
|
const { valid } = await formPageRef.value.formRef.validate()
|
|
if (!valid) return
|
|
if (!valid) return
|
|
items.value.options.forEach(e => {
|
|
items.value.options.forEach(e => {
|
|
- if (arr.includes(e.key)) query[e.key] = e.value
|
|
|
|
|
|
+ query[e.key] = e.value
|
|
})
|
|
})
|
|
- if (!query.industryIdList || !query.industryIdList.length) return Snackbar.warning('请选择您的期望行业')
|
|
|
|
if (editId.value) query.id = editId.value
|
|
if (editId.value) query.id = editId.value
|
|
await saveResumeJobInterested(query)
|
|
await saveResumeJobInterested(query)
|
|
Snackbar.success('保存成功')
|
|
Snackbar.success('保存成功')
|
|
@@ -337,17 +247,11 @@ const handleEdit = async (item) => {
|
|
editId.value = item.id
|
|
editId.value = item.id
|
|
items.value.options.forEach(e => {
|
|
items.value.options.forEach(e => {
|
|
query[e.key] = item[e.key]
|
|
query[e.key] = item[e.key]
|
|
- if (e.valueKey) {
|
|
|
|
- e.value = item[e.valueKey]
|
|
|
|
- } else e.value = item[e.key]
|
|
|
|
- if (e.key === 'industryIdList') e.value = null
|
|
|
|
|
|
+ e.value = item[e.key]
|
|
if (e.key === 'interestedAreaIdList') {
|
|
if (e.key === 'interestedAreaIdList') {
|
|
- e.value = null
|
|
|
|
- query.interestedAreaIdList = item.interestedAreaIdList && item.interestedAreaIdList.length ? item.interestedAreaIdList : []
|
|
|
|
|
|
+ e.value = item[e.key] && item[e.key].length ? item[e.key].map(e => Number(e)) : []
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- currentSelect = item.industry
|
|
|
|
- areaSelect = item.interestedArea && item.interestedArea.length ? item.interestedArea : []
|
|
|
|
isAdd.value = true
|
|
isAdd.value = true
|
|
}
|
|
}
|
|
|
|
|
|
@@ -384,7 +288,7 @@ const handleDelete = ({ id }) => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.text-box {
|
|
.text-box {
|
|
- max-width: 200px;
|
|
|
|
|
|
+ max-width: 300px;
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
overflow: hidden;
|