Przeglądaj źródła

获取企业已加入的招聘会列表

lifanagju_citu 1 miesiąc temu
rodzic
commit
55931f1533

+ 5 - 4
src/views/recruit/enterprise/positionManagement/components/baseInfo.vue

@@ -150,7 +150,7 @@ watch(
       if (e.noParam) return
       if (e.key === 'expireTime' && !val[e.key]) return handleSoFarChange(true, e)
       if (e.key === 'bizId' && val.source === '2') jobFairCheckboxChange(true, e, false) // 招聘会回显
-      if (e.key === 'bizId' && (val.source === '0' || doNotJobFair.value)) return // 非招聘会职位
+      if (e.key === 'bizId' && (val.source === '0' || hideJobFairCheckbox.value)) return // 非招聘会职位
       e.value = val[e.key]
     })
     if (props.isFair) items.value.options = items.value.options.filter(e => e.key !== 'bizId') // 如果为招聘会编辑则不显示
@@ -159,13 +159,14 @@ watch(
   { deep: true }
 )
 
-const doNotJobFair = ref(false)
+// 获取企业已加入的招聘会列表
+const hideJobFairCheckbox = ref(false)
 const getJobFairData = async () => {
   if (props.isFair) return
   const data = await getJobFairWhiteList()
   const bizId = items.value.options.find(e => e.key === 'bizId') || {}
   if (!data?.length) {
-    doNotJobFair.value = true
+    hideJobFairCheckbox.value = true
     bizId.value = null
     return
   } else{
@@ -229,7 +230,7 @@ const jobFairCheckboxChange = (bool, item, isSnackbar = true) => {
     jobFairCheckbox.value = false
     return
   }
-  if (doNotJobFair.value) {
+  if (hideJobFairCheckbox.value) {
     bool = false
     if (isSnackbar) Snackbar.warning('没有加入任何招聘会')
   }