|
@@ -41,18 +41,18 @@ const items = ref({
|
|
type: 'text',
|
|
type: 'text',
|
|
key: 'dept',
|
|
key: 'dept',
|
|
value: null,
|
|
value: null,
|
|
- label: '招聘部门 *',
|
|
|
|
- rules: [v => !!v || '请选择招聘部门']
|
|
|
|
|
|
+ label: '招聘部门 ',
|
|
|
|
+ // rules: [v => !!v || '请选择招聘部门']
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 'autocomplete',
|
|
type: 'autocomplete',
|
|
key: 'majorId',
|
|
key: 'majorId',
|
|
search: getMajorList,
|
|
search: getMajorList,
|
|
value: null,
|
|
value: null,
|
|
- label: '专业要求 *',
|
|
|
|
|
|
+ label: '专业要求 ',
|
|
itemText: 'nameCn',
|
|
itemText: 'nameCn',
|
|
itemValue: 'id',
|
|
itemValue: 'id',
|
|
- rules: [v => !!v || '专业要求'],
|
|
|
|
|
|
+ // rules: [v => !!v || '专业要求'],
|
|
noDataText: '请输入检索专业',
|
|
noDataText: '请输入检索专业',
|
|
items: []
|
|
items: []
|
|
},
|
|
},
|
|
@@ -60,9 +60,9 @@ const items = ref({
|
|
type: 'autocomplete',
|
|
type: 'autocomplete',
|
|
key: 'frequency-dateType',
|
|
key: 'frequency-dateType',
|
|
value: null,
|
|
value: null,
|
|
- label: '工作频率 *',
|
|
|
|
|
|
+ label: '工作频率 ',
|
|
col: 6,
|
|
col: 6,
|
|
- rules: [v => !!v || '请选择工作频率'],
|
|
|
|
|
|
+ // rules: [v => !!v || '请选择工作频率'],
|
|
items: [
|
|
items: [
|
|
{ label: '每周', value: 'week' },
|
|
{ label: '每周', value: 'week' },
|
|
{ label: '每月', value: 'month' },
|
|
{ label: '每月', value: 'month' },
|
|
@@ -75,19 +75,19 @@ const items = ref({
|
|
value: null,
|
|
value: null,
|
|
flexStyle: 'ml-3',
|
|
flexStyle: 'ml-3',
|
|
col: 6,
|
|
col: 6,
|
|
- label: '出勤天数 *',
|
|
|
|
- rules: [v => v > 0 || '请填写正确的出勤天数']
|
|
|
|
|
|
+ label: '出勤天数 ',
|
|
|
|
+ // rules: [v => v > 0 || '请填写正确的出勤天数']
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 'ifRadio',
|
|
type: 'ifRadio',
|
|
key: 'hot',
|
|
key: 'hot',
|
|
value: 1,
|
|
value: 1,
|
|
- label: '热门职位 *',
|
|
|
|
|
|
+ label: '热门职位 ',
|
|
items: [
|
|
items: [
|
|
{ label: '是', value: 1 },
|
|
{ label: '是', value: 1 },
|
|
{ label: '否', value: 0 },
|
|
{ label: '否', value: 0 },
|
|
],
|
|
],
|
|
- rules: [v => !!v || '请选择是否热门']
|
|
|
|
|
|
+ // rules: [v => !!v || '请选择是否热门']
|
|
},
|
|
},
|
|
]
|
|
]
|
|
})
|
|
})
|
|
@@ -100,6 +100,7 @@ if (route.query.id) {
|
|
|
|
|
|
async function initPosition (jobId) {
|
|
async function initPosition (jobId) {
|
|
const res = await getJobAdvertisedExtend(jobId)
|
|
const res = await getJobAdvertisedExtend(jobId)
|
|
|
|
+ if (!res) return
|
|
items.value.options.forEach(e => {
|
|
items.value.options.forEach(e => {
|
|
if (e.key.includes('frequency') && res.frequency) {
|
|
if (e.key.includes('frequency') && res.frequency) {
|
|
const keys = e.key.split('-')
|
|
const keys = e.key.split('-')
|
|
@@ -122,6 +123,7 @@ async function getMajorList (name) {
|
|
}
|
|
}
|
|
|
|
|
|
async function getMajorById (id) {
|
|
async function getMajorById (id) {
|
|
|
|
+ if (!id) return
|
|
const res = await schoolMajorById({ id })
|
|
const res = await schoolMajorById({ id })
|
|
items.value.options.find(e => e.key === 'majorId').items = [res]
|
|
items.value.options.find(e => e.key === 'majorId').items = [res]
|
|
}
|
|
}
|
|
@@ -142,7 +144,7 @@ const afterAdd = async (jobId) => {
|
|
return r
|
|
return r
|
|
}
|
|
}
|
|
if (v.key === 'majorId') {
|
|
if (v.key === 'majorId') {
|
|
- r.major = v.items.find(e => e.id === v.value).nameCn
|
|
|
|
|
|
+ r.major = v.items.find(e => e.id === v.value)?.nameCn || ''
|
|
}
|
|
}
|
|
r[v.key] = v.type === 'number' ? +v.value : v.value
|
|
r[v.key] = v.type === 'number' ? +v.value : v.value
|
|
return r
|
|
return r
|
|
@@ -157,6 +159,7 @@ const afterAdd = async (jobId) => {
|
|
router.push(`/recruit/enterprise/jobFair/details/${route.params.id}`)
|
|
router.push(`/recruit/enterprise/jobFair/details/${route.params.id}`)
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.log(error)
|
|
console.log(error)
|
|
|
|
+ console.error(error)
|
|
Snackbar.error(t('sys.api.operationFailed'))
|
|
Snackbar.error(t('sys.api.operationFailed'))
|
|
}
|
|
}
|
|
}
|
|
}
|