|
@@ -59,7 +59,7 @@ import { getRecruitPositionDetails } from '@/api/recruit/enterprise/position'
|
|
|
import Confirm from '@/plugins/confirm'
|
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
import { useI18n } from '@/hooks/web/useI18n';
|
|
|
-import { getJobFairList } from '@/api/recruit/enterprise/jobFair'
|
|
|
+import { getJobFairWhiteList } from '@/api/recruit/enterprise/jobFair'
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
const props = defineProps({
|
|
@@ -157,6 +157,19 @@ watch(
|
|
|
{ deep: true }
|
|
|
)
|
|
|
|
|
|
+const doNotJobFair = ref(false)
|
|
|
+const getJobFairData = async () => {
|
|
|
+ const data = await getJobFairWhiteList()
|
|
|
+ if (!data?.length) {
|
|
|
+ doNotJobFair.value = true
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const bizId = items.value.options.find(e => e.key === 'bizId')
|
|
|
+ if (!bizId) return
|
|
|
+ bizId.items = data
|
|
|
+}
|
|
|
+getJobFairData()
|
|
|
+
|
|
|
// 职位类型
|
|
|
const handleJobClickItem = (list, name) => {
|
|
|
const positionId = getValue('positionId')
|
|
@@ -208,21 +221,16 @@ const handleSoFarChange = (bool, item) => {
|
|
|
// 设置为招聘会职位
|
|
|
const jobFairCheckbox = ref(false)
|
|
|
const jobFairCheckboxChange = (bool, item) => {
|
|
|
+ if (doNotJobFair.value) {
|
|
|
+ bool = false
|
|
|
+ Snackbar.warning('没有加入任何招聘会')
|
|
|
+ }
|
|
|
jobFairCheckbox.value = bool
|
|
|
item.value = null
|
|
|
item.disabled = bool ? false : true
|
|
|
item.label = bool ? '招聘会 *' : '招聘会'
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-const getJobFairData = async () => {
|
|
|
- const data = await getJobFairList()
|
|
|
- const bizId = items.value.options.find(e => e.key === 'bizId')
|
|
|
- if (!bizId) return
|
|
|
- bizId.items = data
|
|
|
-}
|
|
|
-getJobFairData()
|
|
|
-
|
|
|
const getQuery = async () => {
|
|
|
const { valid } = await formPageRef.value.formRef.validate()
|
|
|
if (!valid) return
|