|
@@ -95,6 +95,7 @@ import Confirm from '@/plugins/confirm'
|
|
|
import { saveResumeJobInterested, getResumeJobInterested, deleteResumeJobInterested } from '@/api/recruit/personal/resume'
|
|
|
import { dealJobData } from './dict'
|
|
|
import { getDict } from '@/hooks/web/useDictionaries'
|
|
|
+import { cityToProvince } from '@/utils/areaDeal'
|
|
|
|
|
|
const isAdd = ref(false)
|
|
|
const formPageRef = ref()
|
|
@@ -176,7 +177,7 @@ const items = ref({
|
|
|
returnSelect: true,
|
|
|
col: 6,
|
|
|
flexStyle: 'mr-3',
|
|
|
- rules: [v => !!v || '请选择工作城市:省'],
|
|
|
+ rules: [v => !!v || '请选择工作城市:省'],
|
|
|
items: [],
|
|
|
change: null
|
|
|
},
|
|
@@ -189,8 +190,9 @@ const items = ref({
|
|
|
itemText: 'name',
|
|
|
itemValue: 'id',
|
|
|
col: 6,
|
|
|
- rules: [v => !!v || '请选择工作城市:市'],
|
|
|
- items: []
|
|
|
+ rules: [v => !!v || '请选择工作城市:市'],
|
|
|
+ items: [],
|
|
|
+ change: null
|
|
|
},
|
|
|
{
|
|
|
type: 'autocomplete',
|
|
@@ -215,8 +217,9 @@ const items = ref({
|
|
|
|
|
|
const provinceChange = (value, val, obj) => {
|
|
|
const item = items.value.options.find(e => e.key === 'workAreaId')
|
|
|
- if (item?.items && obj?.children?.length) item.items = obj.children
|
|
|
- else item.items = []
|
|
|
+ if (!item) return
|
|
|
+ item.items = obj.children || []
|
|
|
+ item.value = null
|
|
|
}
|
|
|
getDict('areaTreeData', null, 'areaTreeData').then(({ data }) => {
|
|
|
data = data?.length && data || []
|
|
@@ -232,7 +235,6 @@ getDict('areaTreeData', null, 'areaTreeData').then(({ data }) => {
|
|
|
item.change = provinceChange
|
|
|
}
|
|
|
})
|
|
|
-getDict()
|
|
|
|
|
|
// 获取求职意向
|
|
|
const interestList = ref([])
|
|
@@ -297,15 +299,26 @@ const handleSave = async () => {
|
|
|
getJobInterested()
|
|
|
}
|
|
|
|
|
|
-const handleEdit = (item) => {
|
|
|
+const handleEdit = async (item) => {
|
|
|
editId.value = item.id
|
|
|
+ let workAreaId = ''
|
|
|
items.value.options.forEach(e => {
|
|
|
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 = item.industry.map(e => e.nameCn).join('、')
|
|
|
+ if (e.key === 'workAreaId' && item[e.key]) workAreaId = item[e.key]
|
|
|
})
|
|
|
+ if (workAreaId) { // 省份回显
|
|
|
+ const province = items.value.options.find(pv => pv.key === 'workAreaProvinceId')
|
|
|
+ if (province) {
|
|
|
+ const dealReturnObj = await cityToProvince(workAreaId, {}, province.items || [])
|
|
|
+ const city = items.value.options.find(pv => pv.key === 'workAreaId')
|
|
|
+ if (city) city.items = dealReturnObj.cityList || []
|
|
|
+ province.value = dealReturnObj.pid || ''
|
|
|
+ }
|
|
|
+ }
|
|
|
currentSelect = item.industry
|
|
|
isAdd.value = true
|
|
|
}
|