فهرست منبع

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

lifanagju_citu 7 ماه پیش
والد
کامیت
37185c4518

+ 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"

+ 1 - 1
src/layout/company/side.vue

@@ -87,7 +87,7 @@ const getList = (arr, obj = []) => {
 
 <style scoped lang="scss">
 .side-box {
-  width: 250px;
+  width: 230px;
   height: 100%;
 }
 </style>

+ 1 - 1
src/layout/enterprise.vue

@@ -3,7 +3,7 @@
     <Headers class="headers"></Headers>
     <div class="content d-flex">
       <side class="content-sticky" v-if="!router.currentRoute.value?.meta?.hideSide"></side>
-      <div class="content-box d-flex flex-column" :style="`width: ${ !isInWhiteList(route.path, whiteList) ? 'calc(100vw - 250px)' : '100%'}`">
+      <div class="content-box d-flex flex-column" :style="`width: ${ !isInWhiteList(route.path, whiteList) ? 'calc(100vw - 230px)' : '100%'}`">
         <div v-if="!isInWhiteList(route.path, whiteList)" class="breadcrumbs_sticky">
           <div class=" d-flex align-center justify-space-between">
             <v-breadcrumbs :items="breadcrumbs" elevation="3">

+ 36 - 36
src/router/modules/components/recruit/enterprise.js

@@ -129,42 +129,42 @@ const enterprise = [
       },
     ]
   },
-  {
-    path: '/recruit/enterprise/hirePosition',
-    component: Layout,
-    name: 'crowdSourcing',
-    meta: {
-      title: '全员猎聘',
-      enName: 'Crowd Sourcing',
-      icon: 'mdi-account-star-outline'
-    },
-    children: [
-      {
-        path: '/recruit/enterprise/hirePosition',
-        show: true,
-        meta: {
-          title: '全员猎聘'
-        },
-        component: () => import('@/views/recruit/enterprise/hirePosition/index.vue')
-      },
-      {
-        path: '/recruit/enterprise/hirePosition/add',
-        show: true,
-        meta: {
-          title: '新增职位'
-        },
-        component: () => import('@/views/recruit/enterprise/hirePosition/components/add.vue')
-      },
-      {
-        path: '/recruit/enterprise/hirePosition/edit',
-        show: true,
-        meta: {
-          title: '职位编辑'
-        },
-        component: () => import('@/views/recruit/enterprise/hirePosition/components/add.vue')
-      }
-    ]
-  },
+  // {
+  //   path: '/recruit/enterprise/hirePosition',
+  //   component: Layout,
+  //   name: 'crowdSourcing',
+  //   meta: {
+  //     title: '全员猎聘',
+  //     enName: 'Crowd Sourcing',
+  //     icon: 'mdi-account-star-outline'
+  //   },
+  //   children: [
+  //     {
+  //       path: '/recruit/enterprise/hirePosition',
+  //       show: true,
+  //       meta: {
+  //         title: '全员猎聘'
+  //       },
+  //       component: () => import('@/views/recruit/enterprise/hirePosition/index.vue')
+  //     },
+  //     {
+  //       path: '/recruit/enterprise/hirePosition/add',
+  //       show: true,
+  //       meta: {
+  //         title: '新增职位'
+  //       },
+  //       component: () => import('@/views/recruit/enterprise/hirePosition/components/add.vue')
+  //     },
+  //     {
+  //       path: '/recruit/enterprise/hirePosition/edit',
+  //       show: true,
+  //       meta: {
+  //         title: '职位编辑'
+  //       },
+  //       component: () => import('@/views/recruit/enterprise/hirePosition/components/add.vue')
+  //     }
+  //   ]
+  // },
   {
     path: '/recruit/enterprise/talentMap',
     component: Layout,

+ 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
     }
   ]
 })

+ 19 - 8
src/views/recruit/enterprise/positionManagement/components/item.vue

@@ -8,7 +8,7 @@
         <v-btn class="mr-3" :disabled="!selectAll" color="primary" variant="tonal" size="small" @click="handleAction(4, 'top', {})">取消置顶</v-btn>
         <v-btn :disabled="!selectAll" color="primary" variant="tonal" size="small" @click="handleAction(0, 'close', {})">{{ $t('common.close') }}</v-btn>
       </div>
-      <v-btn v-if="tab === 2" class="ml-8" :disabled="!selectAll" color="primary" variant="tonal" size="small" @click="handleAction(1, 'activation', {})">{{ $t('common.activation') }}</v-btn>
+      <v-btn v-if="tab === 2" class="ml-8" :disabled="!selectAll" color="primary" variant="tonal" size="small" @click="handleAction(1, 'activation', {})">一键激活</v-btn>
     </div>
     <div v-for="val in items" :key="val.id" class="itemBox mb-3" style="height: 134px;">
       <div v-if="val.top && tab === 1" style="position: absolute;">
@@ -36,14 +36,14 @@
             <span>{{ val.positionName }}</span>
           </div>
         </div>
-        <div class="d-flex align-center">
-          <!-- <v-btn v-if="tab === 1" class="ml-3" color="primary" @click="handleAction(2, '', val)">
+        <!-- <div class="d-flex align-center">
+          <v-btn v-if="tab === 1" class="ml-3" color="primary" @click="handleAction(2, '', val)">
             <span>{{ $t('common.refresh') + $t('common.position') }}</span>
             <v-icon class="ml-2">mdi-help-circle-outline</v-icon>
             <v-tooltip activator="parent" location="top">刷新职位后,发布时间为最新的</v-tooltip>
-          </v-btn> -->
+          </v-btn>
           <v-btn v-if="tab === 2" color="primary" @click="handleAction(1, '', val)">{{ $t('common.activatePosition') }}</v-btn>
-        </div>
+        </div> -->
       </div>
       <div class="bottom pa-5 d-flex justify-space-between align-center">
         <div>
@@ -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>
 
@@ -85,7 +85,9 @@ import { useI18n } from '@/hooks/web/useI18n'
 import { getEnterprisePubJobTypePermission } from '@/api/recruit/enterprise/position'
 import { closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised, updatePositionExpireTime, topJobAdvertisedCancel } from '@/api/position'
 import Snackbar from '@/plugins/snackbar'
+import { useUserStore } from '@/store/user'
 
+const store = useUserStore()
 const { t } = useI18n()
 const emit = defineEmits(['refresh'])
 const props = defineProps({
@@ -110,7 +112,8 @@ const formItem = ref({
       format: 'YYYY-MM-DD',
       label: '到期时间 *',
       labelWidth: 110,
-      disabledDates: true,
+      teleported: true,
+      disabledDates: true
     }
   ]
 })
@@ -157,10 +160,18 @@ watch(
   { deep: true }
 )
 
+let baseInfo = ref(JSON.parse(localStorage.getItem('entBaseInfo')) || {})
+store.$subscribe((mutation, state) => {
+  if (Object.keys(state.entBaseInfo).length) baseInfo.value = state.entBaseInfo
+})
 const apiList = [closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised, topJobAdvertised, topJobAdvertisedCancel]
-
 // 职位关闭、激活、刷新、置顶
 const handleAction = async (index, type, { id }) => {
+  // 激活职位时查询是否有可发布职位数
+  if (index === 1) {
+    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]
   if (!ids.length && !index) return
   loading.value = true

+ 25 - 14
src/views/recruit/enterprise/positionManagement/index.vue

@@ -4,16 +4,23 @@
       <div class="d-flex justify-center mt-3">
         <TextUI :item="textItem" @enter="handleEnter" @appendInnerClick="handleEnter"></TextUI>
       </div>
-      <div class="text-end">
-        <v-btn prepend-icon="mdi-plus" color="primary" @click="handleAdd">{{ $t('position.newPositionsAdded') }}</v-btn>
-        <span>
-          <v-btn :loading="uploadLoading" prepend-icon="mdi-download-box-outline" color="primary" variant="tonal" class="ml-3" @click="handleUploadBefore">
-            批量上传职位
-          </v-btn>
-          <File ref="uploadFile" :custom="true" customName="multipartFile" accept=".xlsx, .xls" @success="handleUploadPosition"></File>
-        </span>
-        <v-btn :loading="templateLoading" prepend-icon="mdi-export-variant" color="primary" variant="tonal" class="ml-3" @click="handleDownloadTemplate">批量上传模版下载</v-btn>
-        <v-btn :loading="exportLoading" prepend-icon="mdi-export-variant" color="primary" variant="tonal" class="ml-3" @click="handleExport">职位列表下载</v-btn>
+      <div style="height: 40px">
+        <div class="float-left color-666 font-size-14" style="line-height: 52px;">
+          <span>共可发布职位数 <strong class="color-primary">50</strong> 个 </span>|
+          <span> 已发布 <strong class="color-primary">{{ baseInfo?.entitlement?.publishJobCount ? (50 - baseInfo?.entitlement?.publishJobCount) : 0 }}</strong> 个 </span>|
+          <span> 剩余 <strong class="color-primary">{{ baseInfo?.entitlement?.publishJobCount || 0 }}</strong> 个</span>
+        </div>
+        <div class="float-right">
+          <v-btn prepend-icon="mdi-plus" color="primary" @click="handleAdd">新增</v-btn>
+          <span>
+            <v-btn :loading="uploadLoading" prepend-icon="mdi-download-box-outline" color="primary" variant="tonal" class="ml-3" @click="handleUploadBefore">
+              职位批量导入
+            </v-btn>
+            <File ref="uploadFile" :custom="true" customName="multipartFile" accept=".xlsx, .xls" @success="handleUploadPosition"></File>
+          </span>
+          <v-btn :loading="templateLoading" prepend-icon="mdi-export-variant" color="primary" variant="tonal" class="ml-3" @click="handleDownloadTemplate">批量导入模版下载</v-btn>
+          <v-btn :loading="exportLoading" prepend-icon="mdi-export-variant" color="primary" variant="tonal" class="ml-3" @click="handleExport">职位导出</v-btn>
+        </div>
       </div>
       
       <div class="mt-3">
@@ -69,14 +76,16 @@ const templateLoading = ref(false)
 const uploadLoading = ref(false)
 const exportLoading = ref(false)
 const uploadFile = ref()
-
 const tab = ref(1)
-
 const tabList = [
   { label: t('position.recruitmentInProgress'), value: 1 },
   { label: t('position.closed'), value: 2 },
   { label: t('position.expiredPosition'), value: 3 }
 ]
+let baseInfo = ref(JSON.parse(localStorage.getItem('entBaseInfo')) || {})
+store.$subscribe((mutation, state) => {
+  if (Object.keys(state.entBaseInfo).length) baseInfo.value = state.entBaseInfo
+})
 
 const items = ref([])
 const textItem = ref({
@@ -91,6 +100,9 @@ const textItem = ref({
 const handleAdd = async () => {
   const data = await getEnterprisePubJobTypePermission()
   if (!data || !data.length) return Snackbar.warning('没有该操作权限,请联系平台管理员升级后再试')
+  // 新增职位时查询是否有可发布职位数
+  await store.getEnterpriseInfo(true)
+  if (baseInfo.value?.entitlement.publishJobCount <= 0) return Snackbar.warning('可发布职位数不足,请联系平台管理员')
   router.push('/recruit/enterprise/position/add')
   await store.getEnterpriseUserAccountInfo()
 }
@@ -98,6 +110,7 @@ const handleAdd = async () => {
 const loading = ref(false)
 // 获取职位列表
 const getPositionList = async () => {
+  await store.getEnterpriseInfo(true)
   items.value = []; total.value = 0
   loading.value = true
   if (tab.value !== 3) {
@@ -147,9 +160,7 @@ const handleUploadBefore = () => {
     otherBtnText: '去下载模板',
     sureText: '继续上传',
   }
-  // debugger
   Confirm(t('common.confirmTitle'), '如还未下载过批量上传的模板,请先下载,并且使用模板格式上传职位', option).then((obj) => {
-    // debugger
     if (obj?.otherClick) {
       Snackbar.info('开始下载!')
       handleDownloadTemplate()

+ 4 - 4
src/views/recruit/enterprise/systemManagement/groupAccount/index.vue

@@ -25,7 +25,7 @@
 
       <v-divider vertical></v-divider>
 
-      <v-col class="ml-10">
+      <v-col class="ml-10" cols="9">
         <div class="d-flex justify-space-between px-3">
           <TextInput v-model="query.name" :item="textItem" @change="getUserList"></TextInput>
           <v-btn prepend-icon="mdi-plus" color="primary" @click="handleAdd(0)">{{ $t('enterprise.userManagement.inviteNewColleagues') }}</v-btn>
@@ -43,7 +43,7 @@
           @pageHandleChange="handleChangePage"
         >
           <template #name="{ item }">
-            <div class="d-flex align-center cursor-pointer">
+            <div class="d-flex align-center">
               <v-badge
                 v-if="item?.sex === '1' || item?.sex === '2'"
                 bordered
@@ -53,7 +53,7 @@
                 <v-avatar size="40" :image="getUserAvatar(item.avatar, item.sex)"></v-avatar>
               </v-badge>
               <v-avatar v-else size="40" :image="getUserAvatar(item.avatar, item.sex)"></v-avatar>
-              <span class="defaultLink ml-3">{{ item?.name }}</span>
+              <span class="ml-3">{{ item?.name }}</span>
             </div>
           </template>
           <template #actions="{ item }">
@@ -200,7 +200,7 @@ const handleAction = (type, index, item) => {
 
 // 打开生成邀请链接页面
 const handleAdd = (type) => {
-  if (!getToken()) {
+  if (!getToken(1)) {
     window.location.reload()
     return
   }

+ 15 - 3
src/views/recruit/personal/PersonalCenter/index.vue

@@ -48,11 +48,17 @@
 
 <script setup>
 defineOptions({ name: 'person-center'})
-import { computed } from 'vue'
+import { computed, ref } from 'vue'
 import { getCurrentLocaleLang } from '@/utils/lang.js'
 import { useUserStore } from '@/store/user'
 import personCenterRoute from '@/router/modules/components/recruit/personCenter'
 
+const userStore = useUserStore()
+let userInfo = ref(JSON.parse(localStorage.getItem('userInfo')) || {})
+userStore.$subscribe((mutation, state) => {
+  if (state.userInfo && Object.keys(state.userInfo).length) userInfo.value = state?.userInfo
+})
+
 // 左侧菜单列表
 const list = computed(() => {
   return getList(personCenterRoute[0].children[0].children)
@@ -76,12 +82,18 @@ const getList = (arr, obj = []) => {
     obj.push(data)
   })
   return obj
+} 
+
+// 效验当前会员权益是否包含简历模板
+if (!userInfo?.value.entitlement?.resumeTemplate) {
+  list.value.forEach(e => {
+    if (e.path === '/recruit/personal/personalCenter/resume') e.children.splice(2, 1)
+  })
 }
 
 // 更新账户信息
-const store = useUserStore()
 const updateAccountInfo = async () => {
-  await store.getUserAccountInfo()
+  await userStore.getUserAccountInfo()
 }
 updateAccountInfo()
 </script>

+ 13 - 3
src/views/recruit/personal/PersonalCenter/jobFeedback/index.vue

@@ -11,22 +11,32 @@
 
 <script setup>
 defineOptions({ name: 'person-center-job-feedback' })
-import { ref } from 'vue'
+import { ref, shallowRef } from 'vue'
 import { useI18n } from '@/hooks/web/useI18n'
 import delivery from './components/delivery.vue'
 import interview from './components/interview/index.vue'
 import interested from './components/interested.vue'
 import seenMe from './components/seenMe.vue'
+import { useUserStore } from '@/store/user'
+
+const userStore = useUserStore()
+let userInfo = ref(JSON.parse(localStorage.getItem('userInfo')) || {})
+userStore.$subscribe((mutation, state) => {
+  if (state.userInfo && Object.keys(state.userInfo).length) userInfo.value = state?.userInfo
+})
 
 const { t } = useI18n()
-const list = [
+const tab = ref(0)
+const data = [
   { title: t('position.delivered'), path: delivery },
   { title: t('position.interview'), path: interview },
   { title: t('position.interested'), path: interested },
   { title: t('position.haveSeenMe'), path: seenMe }
 ]
+const list = shallowRef(data)
 
-const tab = ref(0)
+// 判断当前的会员套餐内是否有谁看过我的权益
+if (!userInfo?.value.entitlement.viewersList) list.value.pop()
 </script>
 
 <style scoped lang="scss">