Bladeren bron

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

lifanagju_citu 11 maanden geleden
bovenliggende
commit
5e331ecf15

+ 21 - 2
src/router/modules/enterprise.js

@@ -14,7 +14,7 @@ const enterprise = [
     meta: {
       title: '人才库',
       enName: 'Talent Pool',
-      icon: 'mdi-account-multiple'
+      icon: 'mdi-account-multiple-outline'
     },
     children: [
       {
@@ -43,6 +43,25 @@ const enterprise = [
       }
     ]
   },
+  {
+    path: '/enterprise/resumeManagement',
+    component: Layout,
+    name: 'resumeManagement',
+    meta: {
+      title: '简历管理',
+      enName: 'Resume Management',
+      icon: 'mdi-file-account-outline'
+    },
+    children: [
+      {
+        path: '/enterprise/resumeManagement/receive',
+        meta: {
+          title: '收到的简历'
+        },
+        component: () => import('@/views/enterprise/resumeManagement/receive/index.vue')
+      }
+    ]
+  },
   {
     path: '/enterprise/position',
     component: Layout,
@@ -110,7 +129,7 @@ const enterprise = [
     meta: {
       title: '信息管理',
       enName: 'Info Management',
-      icon: 'mdi-list-box'
+      icon: 'mdi-list-box-outline'
     },
     children: [
       {

+ 80 - 6
src/views/enterprise/positionManagement/components/item.vue

@@ -1,13 +1,21 @@
 <template>
   <div>
+    <div class="d-flex align-center">
+      <v-checkbox v-model="selectAll" :label="!selectAll ? '全选' : `已选中${selectList.length}条`" hide-details color="primary" @update:model-value="handleChangeSelectAll"></v-checkbox>
+      <v-btn class="ml-8" :disabled="!selectAll" color="primary" @click="handleRefreshAll">刷新</v-btn>
+      <v-btn class="ml-3" :disabled="!selectAll" color="primary">关闭</v-btn>
+    </div>
     <div v-for="val in items" :key="val.id" class="itemBox mb-3">
       <div class="d-flex justify-space-between pa-5">
         <div class="position">
-          <div>
+          <div class="item-select">
+            <v-checkbox v-model="val.select" hide-details color="primary" @update:model-value="handleChangeSelect"></v-checkbox>
+          </div>
+          <div class="ml-10">
             <span v-if="val.name.indexOf('style')" v-html="val.name" class="position-name" @click="handleDetails(val)"></span>
             <span v-else class="position-name" @click="handleDetails(val)">{{ val.name }}</span>
           </div>
-          <div class="mt-3 other-info ellipsis">
+          <div class="mt-3 other-info ellipsis ml-10">
             <span>{{ val.areaName }}</span>
             <span class="lines"></span>
             <span>{{ val.eduName }}</span>
@@ -20,7 +28,7 @@
           </div>
         </div>
         <div class="d-flex align-center">
-          <div class="resume" v-if="val.count && val.count > '0'">
+          <div class="resume" v-if="val.count && val.count > '0'" @click="handleToReceiveResume">
             <div class="resume-number">{{ val.count }}</div>
             <div>待筛选简历</div>
           </div>
@@ -39,7 +47,7 @@
           <div class="ml-10">
             <span class="cursor-pointer" v-if="tab === 1" @click="handleClose(val)">{{ $t('common.close') }}</span>
             <span class="lines" v-if="tab === 1"></span>
-            <span class="cursor-pointer">{{ $t('position.recruitmentStatistics') }}</span>
+            <span class="cursor-pointer" @click="handleToStatistics">{{ $t('position.recruitmentStatistics') }}</span>
             <span v-if="tab !== 3" class="lines"></span>
             <span v-if="tab !== 3" class="cursor-pointer" @click="handleEdit(val)">{{ $t('common.edit') }}</span>
           </div>
@@ -51,7 +59,7 @@
 
 <script setup>
 defineOptions({ name: 'enterprise-position-item'})
-import { defineEmits } from 'vue'
+import { defineEmits, ref, watch } from 'vue'
 import { useRouter } from 'vue-router'
 import { timesTampChange } from '@/utils/date'
 import { closeJobAdvertised, enableJobAdvertised, refreshJobAdvertised } from '@/api/position'
@@ -59,7 +67,7 @@ import Confirm from '@/plugins/confirm'
 import Snackbar from '@/plugins/snackbar'
 
 const emit = defineEmits(['refresh'])
-defineProps({
+const props = defineProps({
   tab: {
     type: Number,
     default: 1
@@ -67,6 +75,57 @@ defineProps({
   items: Array
 })
 
+const selectAll = ref(false) // 全选
+const selectList = ref([]) // 选中列表
+const dealSelect = () => {
+  selectList.value = props.items.filter(e => e.select).map(k => k.id)
+}
+
+// 全选
+const handleChangeSelectAll = () => {
+  props.items.map(k => {
+    k.select = selectAll.value
+    return k
+  })
+  dealSelect()
+}
+// 单选
+const handleChangeSelect = () => {
+  const length = props.items.filter(k => k.select).length
+  selectAll.value = length > 0 ? true : false
+  dealSelect()
+}
+
+// tab改变时清空选中的项
+watch(
+  () => props.tab,
+  () => {
+    props.items.map(e => e.select = false)
+    selectList.value = []
+    selectAll.value = false
+  },
+  { immediate: true }
+)
+
+// 分页选中回显
+watch(
+  () => props.items,
+  (newVal) => {
+    selectList.value.forEach(e => {
+      const obj = newVal.find(k => k.id === e)
+      if (obj) obj.select = true
+    })
+  },
+  { immediate: true },
+  { deep: true }
+)
+
+// 批量刷新
+const handleRefreshAll = () => {
+  // const selectList = props.items.filter(e => e.select).map(k => k.id)
+  // console.log(selectList, 'list')
+}
+
 // 职位关闭
 const handleClose = ({ id }) => {
   Confirm('系统提示', '是否确认关闭此职位?').then(async () => {
@@ -104,6 +163,15 @@ const handleEdit = (val) => {
 const handleDetails = (val) => {
   window.open(`/enterprise/position/details/${val.id}`)
 }
+
+// 跳转简历管理-收到的简历
+const handleToReceiveResume = () => {
+  router.push('/enterprise/resumeManagement/receive')
+}
+// 跳转招聘统计
+const handleToStatistics = () => {
+  router.push('/enterprise/statistics/overallAnalysis')
+}
 </script>
 
 <style scoped lang="scss">
@@ -121,6 +189,12 @@ const handleDetails = (val) => {
 }
 .position {
   max-width: 46%;
+  position: relative;
+  .item-select {
+    position: absolute;
+    left: -8px;
+    top: -13px;
+  }
 }
 .lines {
   display: inline-block;

+ 1 - 1
src/views/enterprise/positionManagement/index.vue

@@ -10,7 +10,7 @@
       </div>
       
       <div class="mt-3">
-        <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#eeeeee" @update:model-value="handleChangeTab">
+        <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#f7f8fa" @update:model-value="handleChangeTab">
           <v-tab :value="1"> {{ $t('position.recruitmentInProgress') }}</v-tab>
           <v-tab :value="2"> {{ $t('position.closed') }}</v-tab>
           <v-tab :value="3"> {{ $t('position.expiredPosition') }}</v-tab>

+ 11 - 0
src/views/enterprise/resumeManagement/receive/index.vue

@@ -0,0 +1,11 @@
+<template>
+  <div>收到的简历</div>
+</template>
+
+<script setup>
+defineOptions({ name: 'enterprise-resume-management-receive'})
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 2 - 1
src/views/recruit/position/components/dict.js

@@ -40,11 +40,12 @@ export const dealDictArrayData = (res, list) => {
       if (!data) return
       const valueKey = data.nameKey ? data.nameKey : 'label'
       const idKey = data.valueKey ? data.valueKey : 'value'
+      if (!Object.keys(dictObj[data.value]).length) return
       const result = dictObj[data.value].find(val => val[idKey] === item[e])
       if (!result) return
       item[data.label] = result[valueKey] || ''
     })
-    return { ...item, active: false }
+    return { ...item, active: false, select: false }
   })
   return res
 }