Sfoglia il codice sorgente

企业-简历操作栏调整

Xiao_123 2 mesi fa
parent
commit
40b4437c08

+ 22 - 22
src/views/recruit/enterprise/resume/components/filterPage.vue

@@ -24,7 +24,7 @@ import { getDict } from '@/hooks/web/useDictionaries'
 import { dealDictArrayData } from '@/utils/position'
 import { formatName } from '@/utils/getText'
 import Snackbar from '@/plugins/snackbar'
-// import { getJobFairList } from '@/api/recruit/enterprise/jobFair'
+import { getJobFairList } from '@/api/recruit/enterprise/jobFair'
 
 const emit = defineEmits(['confirm', 'cancel', 'reset'])
 const props = defineProps({ jobId: [String, Number], jobFairId: [String, Number] })
@@ -42,17 +42,17 @@ const formItems = ref({
 			returnObject: true,
       items: []
     },
-		// {
-    //   type: 'autocomplete',
-    //   key: 'jobFairId',
-    //   value: null,
-    //   label: '招聘会',
-    //   itemText: 'label',
-    //   itemValue: 'value',
-		// 	clearable: true,
-		// 	returnObject: true,
-    //   items: []
-    // },
+		{
+      type: 'autocomplete',
+      key: 'jobFairId',
+      value: null,
+      label: '招聘会',
+      itemText: 'label',
+      itemValue: 'value',
+			clearable: true,
+			returnObject: true,
+      items: []
+    },
 		{
 			type: 'text',
 			key: 'name',
@@ -142,16 +142,16 @@ onMounted(() => {
 			return
 		}
 		// 招聘会数据获取
-		// if (k.key === 'jobFairId') {
-		// 	const data = await getJobFairList()
-		// 	k.items = data.map(e => {
-		// 		return { label: e.title.replace(/<\/?p[^>]*>/gi, ''), value: e.id }
-		// 	})
-		// 	if (props.jobFairId) {
-		// 		k.value = k.items.find(e => e.value.toString() === props.jobFairId)
-		// 	}
-		// 	return
-		// }
+		if (k.key === 'jobFairId') {
+			const data = await getJobFairList()
+			k.items = data.map(e => {
+				return { label: e.title.replace(/<\/?p[^>]*>/gi, ''), value: e.id }
+			})
+			if (props.jobFairId) {
+				k.value = k.items.find(e => e.value.toString() === props.jobFairId)
+			}
+			return
+		}
 
 		// 投递职位
 		const data = await getJobAdvertised()

+ 22 - 15
src/views/recruit/enterprise/resume/components/table.vue

@@ -38,7 +38,7 @@
         <span v-else>{{ item.status ? props.statusList.find(i => i.value === item.status)?.label : '' }}</span>
       </template>
       <template #actions="{ item }">
-        <v-btn color="primary" variant="text" @click="handlePreviewResume(item)">查看附件</v-btn>
+        <!-- <v-btn color="primary" variant="text" @click="handlePreviewResume(item)">查看附件</v-btn>
         <v-menu v-if="actionItems(item).length">
           <template v-slot:activator="{ props }">
             <v-icon v-bind="props" class="mx-3" size="20" color="primary">mdi-dots-horizontal</v-icon>
@@ -57,7 +57,14 @@
               </v-list-item-title>
             </v-list-item>
           </v-list>
-        </v-menu>
+        </v-menu> -->
+
+        <v-btn icon variant="text" v-for="(k, index) in actionItems(item)" :key="index" @click.stop="k.click(item)">
+          <v-icon color="primary">{{ k.icon }}</v-icon>
+          <v-tooltip :text="k.title" location="top" activator="parent">
+            <span>{{ k.title }}</span>
+          </v-tooltip>
+        </v-btn>
       </template>
     </CtTable>
 
@@ -120,16 +127,16 @@ const headers = ref([
   { title: '状态', key: 'status', sortable: false },
   { title: '操作', value: 'actions', sortable: false }
 ])
-const unfit = { title: '类型', key: 'unfitType', sortable: false, value: item => item.type && item.type === '0' ? '简历不适合' : '面试不适合' }
-const delivery = { title: '类型', key: 'deliveryType', sortable: false, value: item => item?.job?.hire ? '赏金职位' : '普通职位' }
+// const unfit = { title: '类型', key: 'unfitType', sortable: false, value: item => item.type && item.type === '0' ? '简历不适合' : '面试不适合' }
+// const delivery = { title: '类型', key: 'deliveryType', sortable: false, value: item => item?.job?.hire ? '赏金职位' : '普通职位' }
 
 watch(
   () => props.tab,
   (val) => {
-    const obj = val !== 4 ? delivery : unfit
-    const index = headers.value.indexOf(obj)
-    if (index === -1) headers.value.splice(-1, 0, obj)
-    else headers.value.splice(index, 1)
+    // const obj = val !== 4 ? delivery : unfit
+    // const index = headers.value.indexOf(obj)
+    // if (index === -1) headers.value.splice(-1, 0, obj)
+    // else headers.value.splice(index, 1)
 
     // 不合适不需要展示状态
     if (val === 4) {
@@ -268,13 +275,13 @@ const handleDownloadAttachment = (k) => {
 
 const actionItems = (item) => {
   const arr = []
-  if (props.tab === 0) arr.push({ title: '邀请面试', click: handleInterviewInvite }, { title: '立即沟通', click: handleToCommunicate })
-  if (props.tab === 1 && ['3', '4'].includes(item.status)) arr.push({ title: '入职', click: handleEnterByEnterprise })
-  if (!item.inTalentPool) arr.push({ title: '加入储备', click: handleJoinToTalentPool })
-  if ([0, 1].includes(props.tab)) arr.push({ title: '不合适', click: handleEliminate })
-  if (props.tab === 4) arr.push({ title: '取消不合适', click: handleCancelEliminate })
-  if (props.tab === 2 && item?.job?.hire) arr.push({ title: '结算', click: handleSettlement })
-  return [{ title: '下载附件', click: handleDownloadAttachment }, ...arr]
+  if (props.tab === 0) arr.push({ title: '邀请面试', click: handleInterviewInvite, icon: 'mdi-account-clock-outline' }, { title: '立即沟通', click: handleToCommunicate, icon: 'mdi-comment-processing-outline' })
+  if (props.tab === 1 && ['3', '4'].includes(item.status)) arr.push({ title: '入职', click: handleEnterByEnterprise, icon: 'mdi-account-arrow-right-outline' })
+  if (!item.inTalentPool) arr.push({ title: '加入储备', click: handleJoinToTalentPool, icon: 'mdi-account-star-outline' })
+  if ([0, 1].includes(props.tab)) arr.push({ title: '不合适', click: handleEliminate, icon: 'mdi-account-remove-outline' })
+  if (props.tab === 4) arr.push({ title: '取消不合适', click: handleCancelEliminate, icon: 'mdi-account-check-outline' })
+  if (props.tab === 2 && item?.job?.hire) arr.push({ title: '结算', click: handleSettlement, icon: 'mdi-currency-cny' })
+  return [{ title: '查看附件', click: handlePreviewResume, icon: 'mdi-eye-outline' }, { title: '下载附件', click: handleDownloadAttachment, icon: 'mdi-arrow-down-bold-circle-outline' }, ...arr]
 }
 </script>
 

+ 4 - 4
src/views/recruit/enterprise/resume/index.vue

@@ -127,10 +127,10 @@ onMounted(() => {
     bounty.value = true
   }
   // 招聘会职位
-  // if (route.query?.jobFairId) {
-  //   if (tab.value !== 0) return delete query.value.jobFairId
-  //   query.value.jobFairId = route.query.jobFairId
-  // }
+  if (route.query?.jobFairId) {
+    if (tab.value !== 0) return delete query.value.jobFairId
+    query.value.jobFairId = route.query.jobFairId
+  }
 })
 
 // 分页