Selaa lähdekoodia

职位发布数

Xiao_123 7 kuukautta sitten
vanhempi
commit
6d8f408ca4

+ 1 - 1
src/components/FormUI/datePicker/index.vue

@@ -18,7 +18,7 @@
           :date-format="item.dateFormat"
           :time-format="item.timeFormat"
           :default-value="item.defaultValue"
-          :teleported="false"
+          :teleported="item.teleported || false"
           @change="modelValueUpDate"
           @clear="handleClear"
           @blur="handleOpen"

+ 2 - 2
src/store/user.js

@@ -175,14 +175,14 @@ export const useUserStore = defineStore('user',
         }
       },
       // 获取当前登录的企业用户信息
-      async getEnterpriseInfo () {
+      async getEnterpriseInfo (check) {
         const result = await getEnterprisingUserInfo()
         this.entBaseInfo = result
         
         // 是否为企业账号管理员
         const isAdmin = result.userType === '1'
         localStorage.setItem('isAdmin', isAdmin)
-        if (isAdmin) await this.checkEnterpriseBaseInfo() // 校验企业必填信息
+        if (isAdmin && !check) await this.checkEnterpriseBaseInfo() // 校验企业必填信息
         localStorage.setItem('entBaseInfo', JSON.stringify(result))
       },
       // 获取企业账户信息

+ 2 - 1
src/views/recruit/enterprise/hirePosition/components/item.vue

@@ -121,7 +121,8 @@ const formItem = ref({
       format: 'YYYY-MM-DD',
       label: '到期时间 *',
       labelWidth: 110,
-      disabledDates: true
+      disabledDates: true,
+      teleported: true
     }
   ]
 })

+ 4 - 3
src/views/recruit/enterprise/positionManagement/components/item.vue

@@ -72,7 +72,7 @@
   <Loading :visible="loading"></Loading>
 
   <CtDialog :visible="showExpire" :widthType="2" titleClass="text-h6" title="修改职位到期时间" @close="showExpire = false; expireTimeId = null" @submit="handleSubmit">
-    <CtForm v-if="showExpire" ref="CtFormRef" :items="formItem" style="height: 100px;"></CtForm>
+    <CtForm v-if="showExpire" ref="CtFormRef" :items="formItem"></CtForm>
   </CtDialog>
 </template>
 
@@ -112,7 +112,8 @@ const formItem = ref({
       format: 'YYYY-MM-DD',
       label: '到期时间 *',
       labelWidth: 110,
-      disabledDates: true,
+      teleported: true,
+      disabledDates: true
     }
   ]
 })
@@ -168,7 +169,7 @@ const apiList = [closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised,
 const handleAction = async (index, type, { id }) => {
   // 激活职位时查询是否有可发布职位数
   if (index === 1) {
-    await store.getEnterpriseInfo()
+    await store.getEnterpriseInfo(true)
     if (baseInfo.value?.entitlement.publishJobCount <= 0) return Snackbar.warning('可发布职位数不足,请联系平台管理员')
   }
   const ids = type ? props.items.filter(e => e.select).map(k => k.id) : [id]

+ 2 - 2
src/views/recruit/enterprise/positionManagement/index.vue

@@ -101,7 +101,7 @@ const handleAdd = async () => {
   const data = await getEnterprisePubJobTypePermission()
   if (!data || !data.length) return Snackbar.warning('没有该操作权限,请联系平台管理员升级后再试')
   // 新增职位时查询是否有可发布职位数
-  await store.getEnterpriseInfo()
+  await store.getEnterpriseInfo(true)
   if (baseInfo.value?.entitlement.publishJobCount <= 0) return Snackbar.warning('可发布职位数不足,请联系平台管理员')
   router.push('/recruit/enterprise/position/add')
   await store.getEnterpriseUserAccountInfo()
@@ -110,7 +110,7 @@ const handleAdd = async () => {
 const loading = ref(false)
 // 获取职位列表
 const getPositionList = async () => {
-  await store.getEnterpriseInfo()
+  await store.getEnterpriseInfo(true)
   items.value = []; total.value = 0
   loading.value = true
   if (tab.value !== 3) {