Ver Fonte

企业-职位卡片:添加hr信息展示

Xiao_123 há 1 mês atrás
pai
commit
1a166ba617

+ 25 - 43
src/layout/company/navBar.vue

@@ -94,6 +94,7 @@ import { useI18n } from '@/hooks/web/useI18n'; const { t } = useI18n()
 import MessageNotification from '../message.vue'
 import MessageNotification from '../message.vue'
 import { getUserAvatar } from '@/utils/avatar'
 import { getUserAvatar } from '@/utils/avatar'
 import { formatName } from '@/utils/getText'
 import { formatName } from '@/utils/getText'
+// import { logoutToken } from '@/api/common'
 
 
 defineProps({
 defineProps({
   sticky: {
   sticky: {
@@ -117,6 +118,30 @@ const handleLogout = async (exit = true) => {
   router.push({ path: '/recruitHome' })
   router.push({ path: '/recruitHome' })
 }
 }
 
 
+// 我要求职
+// const handleRecruit = async () => {
+//   // 没有登录个人的则直接清除企业缓存后跳转登录页
+//   if (!getToken()) {
+//     await userStore.userLogout(2)
+//     router.push({ path: '/login' })
+//     return
+//   }
+
+//   // 有登录个人账号时则清除企业登录缓存后跳转到求职者首页
+// 	await logoutToken(getToken(1))
+// 	const isChangeRole = localStorage.getItem('enterpriseId')
+// 	if (isChangeRole) {
+// 		const perAccountData = JSON.parse(localStorage.getItem('perAccountInfo'))
+// 		localStorage.setItem('accountInfo', JSON.stringify(perAccountData))
+// 	} else localStorage.removeItem('accountInfo')
+	
+// 	// 清除企业相关缓存信息
+// 	const enterpriseLocalStorage = ['ENT_REFRESH_TOKEN', 'ENT_ACCESS_TOKEN', 'entBaseInfo', 'isAdmin', 'enterpriseUserAccount', 'entUpdatePassword', 'emailLoginInfo', 'enterpriseStore', 'enterpriseId']
+// 	enterpriseLocalStorage.forEach(e => localStorage.removeItem(e))
+
+// 	router.push('/')
+// }
+
 const menuList = ref([
 const menuList = ref([
   { title: t('setting.editPassword'), icon: 'mdi-shield-lock-open-outline', key: 'editPassword', change: () => router.push({ path: '/recruit/enterprise/staffChangePassword' }) },
   { title: t('setting.editPassword'), icon: 'mdi-shield-lock-open-outline', key: 'editPassword', change: () => router.push({ path: '/recruit/enterprise/staffChangePassword' }) },
   { title: t('setting.logOut'), icon: 'mdi-logout', change: handleLogout }
   { title: t('setting.logOut'), icon: 'mdi-logout', change: handleLogout }
@@ -125,52 +150,9 @@ const items = computed(() => {
   return menuList.value.filter(item => !item.hidden)
   return menuList.value.filter(item => !item.hidden)
 })
 })
 
 
-/**
- * @param {Array} routes
- * @returns {Array}
- * 路由扁平化 抽离children字段
- */
- function routeFlattening (routes) {
-  return routes.reduce((prev, cur) => {
-    prev.push(cur.path)
-    if (cur.children && cur.children.length) {
-      prev.push(...routeFlattening(cur.children))
-    }
-    return prev
-  }, [])
-}
-
-const hasRoute = (path) => {
-  const routes = router.getRoutes()
-  return routeFlattening(routes).some(_path => {
-    if (_path.includes(':')) {
-      const change = path.split('/')
-      const _change = _path.split('/')
-      if (change.length !== _change.length) {
-        return false
-      }
-      const res = _change.reduce((e, v, i) => {
-        if (v.includes(':')) {
-          e.push(true)
-          return e
-        }
-        e.push(change[i] === v)
-        return e
-      }, [])
-      return res.every(e => e)
-    }
-    return _path === path
-  })
-}
-// 没有权限访问时,隐藏菜单
-if (!hasRoute('/recruit/enterprise/staffChangePassword')) {
-  menuList.value.find(e => e.key === 'editPassword').hidden = true
-}
-
 onMounted(() => {
 onMounted(() => {
   if (getToken(1)) {
   if (getToken(1)) {
     showBall.value = true
     showBall.value = true
-    localStorage.setItem('showEditPassword', hasRoute('/recruit/enterprise/staffChangePassword'))
   }
   }
 })
 })
 
 

+ 19 - 7
src/views/recruit/enterprise/jobFair/details.vue

@@ -41,14 +41,11 @@
           ></v-text-field>
           ></v-text-field>
         </div>
         </div>
         <div class="pa-3" v-if="positionItems.length">
         <div class="pa-3" v-if="positionItems.length">
-          <div v-for="val in positionItems" :key="val.id" class="itemBox mb-3" style="height: 80px;">
-            <div class="d-flex justify-space-between" style="padding: 10px 20px;">
-              <div class="position">
+          <div v-for="val in positionItems" :key="val.id" class="itemBox mb-3">
+            <div>
+              <div class="position" style="padding: 10px 20px;">
                 <div class="d-flex align-center justify-space-between">
                 <div class="d-flex align-center justify-space-between">
-                  <span class="position-name">{{ formatName(val.name) }}</span>
-                  <div>
-                    <v-btn size="small" color="primary" @click="handleTo(val)">添加至招聘会</v-btn>
-                  </div>
+                  <span class="position-name" v-ellipse-tooltip>{{ formatName(val.name) }}</span>
                 </div>
                 </div>
                 <div :class="['mt-3', 'other-info', 'ellipsis']">
                 <div :class="['mt-3', 'other-info', 'ellipsis']">
                   <span>{{ val.areaName ? val.area?.str : '全国' }}</span>
                   <span>{{ val.areaName ? val.area?.str : '全国' }}</span>
@@ -63,6 +60,19 @@
                   <span>{{ val.positionName }}</span>
                   <span>{{ val.positionName }}</span>
                 </div>
                 </div>
               </div>
               </div>
+              <div
+                class="d-flex align-center"
+                style="padding: 10px 20px; background: linear-gradient(90deg,#f5fcfc,#fcfbfa);"
+                :style="{'justify-content': val.hrName ? 'space-between' : 'flex-end'}"
+              >
+                <div v-if="val.hrName" class="d-flex align-center font-size-14" style="max-width: 70%;">
+                  <v-avatar size="30">
+                    <v-img :src="getUserAvatar(val.hrHeadImg)" />
+                  </v-avatar>
+                  <div class="ml-3" v-ellipse-tooltip style="max-width: calc(100% - 34px);">{{ val.hrName }}</div>
+                </div>
+                <v-btn size="small" color="primary" @click="handleTo(val)">添加至招聘会</v-btn>
+              </div>
             </div>
             </div>
           </div>
           </div>
           <CtPagination
           <CtPagination
@@ -112,6 +122,7 @@ import { useI18n } from '@/hooks/web/useI18n'
 import Snackbar from '@/plugins/snackbar'
 import Snackbar from '@/plugins/snackbar'
 // import { getEnterprisePubJobTypePermission } from '@/api/recruit/enterprise/position'
 // import { getEnterprisePubJobTypePermission } from '@/api/recruit/enterprise/position'
 import { formatName } from '@/utils/getText'
 import { formatName } from '@/utils/getText'
+import { getUserAvatar } from '@/utils/avatar'
 import JobFairEntShare from '@/views/recruit/components/jobFairEntShare'
 import JobFairEntShare from '@/views/recruit/components/jobFairEntShare'
 
 
 const router = useRouter()
 const router = useRouter()
@@ -252,6 +263,7 @@ const handleShare = () => {
   border: 1px solid #e5e6eb;
   border: 1px solid #e5e6eb;
 }
 }
 .position-name {
 .position-name {
+  max-width: 100%;
   color: var(--color-333);
   color: var(--color-333);
   font-size: 19px;
   font-size: 19px;
 }
 }

+ 9 - 2
src/views/recruit/enterprise/jobFair/job/item.vue

@@ -30,8 +30,14 @@
           </div>
           </div>
         </div>
         </div>
         <div class="bottom pa-5 d-flex justify-space-between align-center">
         <div class="bottom pa-5 d-flex justify-space-between align-center">
-          <div>到期时间:{{ val.expireTime ? timesTampChange(val.expireTime, 'Y-M-D') : '长期有效' }}</div>
-          <div class="d-flex">
+          <div v-if="val.hrName" class="d-flex align-center bottom-item">
+            <v-avatar size="30">
+              <v-img :src="getUserAvatar(val.hrHeadImg)" />
+            </v-avatar>
+            <div class="ml-3" v-ellipse-tooltip>{{ val.hrName }}</div>
+          </div>
+          <div class="bottom-item" v-ellipse-tooltip :style="{'text-align': val.hrName ? 'center' : 'start'}">到期时间:{{ val.expireTime ? timesTampChange(val.expireTime, 'Y-M-D') : '长期有效' }}</div>
+          <div class="d-flex justify-end bottom-item">
             <span class="cursor-pointer actions" @click="handleEdit(val)">编辑</span>
             <span class="cursor-pointer actions" @click="handleEdit(val)">编辑</span>
             <span class="lines"></span>
             <span class="lines"></span>
             <span class="cursor-pointer actions" @click="handleRemove(val)">移出招聘会</span>
             <span class="cursor-pointer actions" @click="handleRemove(val)">移出招聘会</span>
@@ -55,6 +61,7 @@ import { getEnterprisePubJobTypePermission } from '@/api/recruit/enterprise/posi
 import { quitJobFairPosition } from '@/api/recruit/enterprise/jobFair'
 import { quitJobFairPosition } from '@/api/recruit/enterprise/jobFair'
 import Confirm from '@/plugins/confirm'
 import Confirm from '@/plugins/confirm'
 import { formatName } from '@/utils/getText'
 import { formatName } from '@/utils/getText'
+import { getUserAvatar } from '@/utils/avatar'
 
 
 const emit = defineEmits(['refresh'])
 const emit = defineEmits(['refresh'])
 defineProps({
 defineProps({

+ 14 - 2
src/views/recruit/enterprise/positionManagement/components/item.vue

@@ -45,12 +45,18 @@
         </div>
         </div>
       </div>
       </div>
       <div class="bottom pa-5 d-flex justify-space-between align-center">
       <div class="bottom pa-5 d-flex justify-space-between align-center">
-        <div>
+        <div v-if="val.hrName" class="d-flex align-center bottom-item">
+          <v-avatar size="30">
+            <v-img :src="getUserAvatar(val.hrHeadImg)" />
+          </v-avatar>
+          <div class="ml-3" v-ellipse-tooltip>{{ val.hrName }}</div>
+        </div>
+        <div class="bottom-item" v-ellipse-tooltip :style="{'text-align': val.hrName ? 'center' : 'start'}">
           <span>{{ $t('position.refreshTime') }} :{{ val.refreshTime ? timesTampChange(val.refreshTime, 'Y-M-D h:m') : '暂无' }}</span>
           <span>{{ $t('position.refreshTime') }} :{{ val.refreshTime ? timesTampChange(val.refreshTime, 'Y-M-D h:m') : '暂无' }}</span>
           <span class="septal-line"></span>
           <span class="septal-line"></span>
           <span>到期时间:{{ val.expireTime ? timesTampChange(val.expireTime, 'Y-M-D') : '长期有效' }}</span>
           <span>到期时间:{{ val.expireTime ? timesTampChange(val.expireTime, 'Y-M-D') : '长期有效' }}</span>
         </div>
         </div>
-        <div class="d-flex">
+        <div class="d-flex bottom-item justify-end">
           <div class="ml-10 d-flex">
           <div class="ml-10 d-flex">
             <div v-if="tab === 1">
             <div v-if="tab === 1">
               <span class="cursor-pointer actions" @click="handleAction(val.top ? 4 : 3, '', val)">{{ val.top ? '取消置顶' : $t('common.topping') }}</span>
               <span class="cursor-pointer actions" @click="handleAction(val.top ? 4 : 3, '', val)">{{ val.top ? '取消置顶' : $t('common.topping') }}</span>
@@ -106,6 +112,7 @@ import { useUserStore } from '@/store/user'
 import Confirm from '@/plugins/confirm'
 import Confirm from '@/plugins/confirm'
 import { getUnpaidOrder } from '@/api/common'
 import { getUnpaidOrder } from '@/api/common'
 import { formatName } from '@/utils/getText'
 import { formatName } from '@/utils/getText'
+import { getUserAvatar } from '@/utils/avatar'
 
 
 const store = useUserStore()
 const store = useUserStore()
 const { t } = useI18n()
 const { t } = useI18n()
@@ -332,6 +339,11 @@ const handleToResume = (val) => {
   background-color: #f7f8fa;
   background-color: #f7f8fa;
   font-size: 14px;
   font-size: 14px;
   color: var(--color-888);
   color: var(--color-888);
+
+  &-item {
+    width: 33.3%;
+    max-width: 33.3%;
+  }
 }
 }
 .actions:hover {
 .actions:hover {
   color: var(--v-primary-base) !important;
   color: var(--v-primary-base) !important;