diff --git a/packageA/pages/job/publishJob.vue b/packageA/pages/job/publishJob.vue index 5cc13dc..977e0b6 100644 --- a/packageA/pages/job/publishJob.vue +++ b/packageA/pages/job/publishJob.vue @@ -76,6 +76,18 @@ {{ selectedEducation || '请选择学历要求' }} + + 人员类型 + + {{ selectedStaffType || '请选择人员类型' }} + + 工作经验 { } console.log('岗位分类选项:', jobCategories.value); + // 设置人员类型选项 - 从字典获取 staffType + const staffTypeDict = await dictStore.getDictSelectOption('staff_type'); + console.log('从字典获取的人员类型数据:', staffTypeDict); + staffTypes.value = staffTypeDict; + // 设置企业ID(从用户信息获取) if (userStore.userInfo && userStore.userInfo.id) { formData.companyId = userStore.userInfo.id; @@ -512,6 +532,14 @@ const onJobCategoryChange = (e) => { formData.type = selectedItem.value; // 岗位分类保存到type字段 }; +// 新增:人员类型选择器change事件 +const onStaffTypeChange = (e) => { + const index = e.detail.value; + const selectedItem = staffTypes.value[index]; + selectedStaffType.value = selectedItem.label; + formData.staffType = selectedItem.value; // 人员类型保存到staffType字段 +}; + // 打开岗位类型选择器 const openJobTypeSelector = () => { if (!jobTypeSelector.value) return; @@ -706,6 +734,7 @@ const publishJob = async () => { jobCategory: formData.jobCategory, // 岗位类型 companyId: formData.companyId, companyName: formData.companyName, + staffType: formData.staffType, // 新增:人员类型 jobContactList: formData.contacts.filter(contact => contact.name.trim() && contact.phone.trim()).map(contact => ({ contactPerson: contact.name, contactPersonPhone: contact.phone, @@ -760,6 +789,7 @@ const validateForm = () => { { field: 'minSalary', message: '请输入最小薪资' }, { field: 'maxSalary', message: '请输入最大薪资' }, { field: 'education', message: '请选择学历要求' }, + { field: 'staffType', message: '请选择人员类型' }, { field: 'experience', message: '请选择工作经验' }, { field: 'jobLocation', message: '请选择工作地点' }, { field: 'jobLocationAreaCode', message: '请选择工作区县' },