Browse Source

沟通:操作加loading

Xiao_123 1 tháng trước cách đây
mục cha
commit
0f731b4891

+ 22 - 0
src/api/recruit/enterprise/talentMap/labeling/index.js

@@ -1,9 +1,31 @@
 import request from '@/config/axios'
 
+// 获取所有名片列表
+export const getCardList = async () => {
+  return await request.get({
+    url: '/api/parse/get-business-cards'
+  })
+}
+
 // 根据条件获取人才列表
 export const getLabelingList = async (data) => {
   return await request.post({
     url: '/api/parse/query-kg',
     data
 	})
+}
+
+// 根据人才id获取关联的标签列表
+export const getTalentTagById = async (talent_id) => {
+  return await request.get({
+    url: `/api/parse/talent-get-tags/${talent_id}`,
+	})
+}
+
+// 更新人才关联标签
+export const updateTalentTags = async (data) => {
+  return await request.post({
+    url: '/api/parse/talent-update-tags',
+    data
+	})
 }

+ 1 - 1
src/views/recruit/components/message/components/chatting.vue

@@ -246,7 +246,7 @@ import { useUserStore } from '@/store/user'
 const isEnterprise = inject('isEnterprise')
 const { t } = useI18n()
 
-const emits = defineEmits(['handleMore', 'handleSend', 'handleAgree', 'handleRefuse'])
+const emits = defineEmits(['handleMore', 'handleSend', 'handleAgree', 'handleRefuse', 'handleSendResume', 'handlePreview'])
 
 const props = defineProps({
   items: {

+ 40 - 7
src/views/recruit/components/message/index.vue

@@ -159,7 +159,7 @@
     <CtForm v-if="showSelectPosition" ref="requestFromRef" :items="requestFormItems"></CtForm>
   </CtDialog>
   <!-- 发送简历-选择要发送的职位 -->
-  <CtDialog :visible="openPositionSelectDialog" :widthType="2" titleClass="text-h6" title="请选择要投递的职位" @close="openPositionSelectDialog = false" @submit="selectPositionSubmit">
+  <CtDialog :visible="openPositionSelectDialog" :widthType="2" titleClass="text-h6" submitText="确认" title="请选择要投递的职位" @close="openPositionSelectDialog = false" @submit="selectPositionSubmit">
     <div style="position: relative; min-height: 200px">
       <v-radio-group v-model="selectJobId">
         <div v-for="val in entPositionList" :key="val.value" class="d-flex align-center radioBox" >
@@ -648,8 +648,15 @@ const handleSubmitAttachment = async () => {
   }
   if (isStudent.value && (!practice?.practiceStartTime || !practice?.practiceEndTime)) return Snackbar.warning('请完善实习到岗信息')
 
+  pageLoading.value = true
+
   // 保存附件
-  await savePersonResumeCv(obj)
+  try {
+    await savePersonResumeCv(obj)
+  } catch {
+    pageLoading.value = false
+    return
+  }
 
   // 简历投递至简历库
   if (isEmployment.value !== '-1') {
@@ -660,7 +667,12 @@ const handleSubmitAttachment = async () => {
     }
     // 如果是学生则需要带上实习信息
     if (practice && Object.keys(practice).length > 0) params = Object.assign(params, practice)
-    await jobCvRelHireSend(params)
+    try {
+      await jobCvRelHireSend(params)
+    } catch {
+      pageLoading.value = false
+      return
+    }
   } else {
     const jobId = enRequestPositionInfo.value && enRequestPositionInfo.value?.id ? enRequestPositionInfo.value?.id : positionInfo.value.id || selectJobId.value
     const type = (enRequestPositionInfo.value && Object.keys(enRequestPositionInfo.value).length ? enRequestPositionInfo.value.hire : positionInfo.value.hire) ? 1 : 0
@@ -672,10 +684,16 @@ const handleSubmitAttachment = async () => {
     }
     // 如果是学生则需要带上实习信息
     if (practice && Object.keys(practice).length > 0) params = Object.assign(params, practice)
-    await jobCvRelSend(params)
+    try {
+      await jobCvRelSend(params)
+    } catch {
+      pageLoading.value = false
+      return
+    }
   }
   handleChangeSendResumeStatus(true)
   showUploadDialog.value = false
+  pageLoading.value = false
 
   const text = {
     remark: '发送简历',
@@ -706,6 +724,8 @@ async function handleSubmitResume () {
   }
   if (isStudent.value && (!practice?.practiceStartTime || !practice?.practiceEndTime)) return Snackbar.warning('请完善实习到岗信息')
 
+  pageLoading.value = true
+
   // 简历投递至简历库
   if (isEmployment.value !== '-1') {
     let params = {
@@ -715,7 +735,12 @@ async function handleSubmitResume () {
     }
     // 如果是学生则需要带上实习信息
     if (practice && Object.keys(practice).length > 0) params = Object.assign(params, practice)
-    await jobCvRelHireSend(params)
+    try {
+      await jobCvRelHireSend(params)
+    } catch {
+      pageLoading.value = false
+      return
+    }
   } else {
     const jobId = enRequestPositionInfo.value && enRequestPositionInfo.value?.id ? enRequestPositionInfo.value?.id : positionInfo.value.id || selectJobId.value
     const type = (enRequestPositionInfo.value && Object.keys(enRequestPositionInfo.value).length ? enRequestPositionInfo.value.hire : positionInfo.value.hire) ? 1 : 0
@@ -728,10 +753,16 @@ async function handleSubmitResume () {
     // 如果是学生则需要带上实习信息
     if (practice && Object.keys(practice).length > 0) params = Object.assign(params, practice)
 
-    await jobCvRelSend(params)
+    try {
+      await jobCvRelSend(params)
+    } catch {
+      pageLoading.value = false
+      return
+    }
   }
   handleChangeSendResumeStatus(true)
   showResume.value = false
+  pageLoading.value = false
 
   const text = {
     remark: '发送简历',
@@ -774,6 +805,7 @@ const handleGetMore = async () => {
   }
 }
 
+// 删除最近联系人
 const handleDelete = async ({ channel }) => {
   await deleteConversations(channel, entBaseInfo?.enterpriseId)
   await updateConversation()
@@ -873,6 +905,7 @@ const handleRequestResumeSubmit = async () => {
   }
 }
 
+// 接受面试邀请
 const handleAgree = (val) => {
   if (!val.id) return
   const query = {
@@ -896,7 +929,7 @@ const handleAgree = (val) => {
 // 拒绝面试邀请
 const handleRefuse = (val) => {
   if (!val.id) return
-  Confirm(t('common.confirmTitle'), '是否确定拒绝此面试邀请?').then(async () => {
+  Confirm(t('common.confirmTitle'), '是否确定拒绝此面试邀请?').then(async () => {
     await userInterviewInviteReject(val.id)
     Snackbar.success(t('common.operationSuccessful'))
     getInterviewInviteList()

+ 2 - 2
src/views/recruit/enterprise/newTalentMap/labeling/index.vue

@@ -59,7 +59,7 @@
 							<div>{{ talentItem.address }}</div>
 						</div>
 						<div class="my-5">
-							<p>自动标注</p>
+							<p>标签标注</p>
 							<v-chip
 								v-for="(item, index) in talentItem.automaticDimensionTags" :key="index"
 								class="chip mx-2 mt-4"
@@ -70,7 +70,7 @@
 							</v-chip>
 						</div>
 						<div>
-							<p>人工标注</p>
+							<p>人才标签</p>
 							<v-chip
 								v-for="(item, index) in talentItem.manualAnnotationTags" :key="index"
 								class="chip mx-2 mt-4 cursor-pointer"