details.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <!-- 人才库 - 人才详情 -->
  2. <template>
  3. <div v-if="Object.keys(cvData).length" class="d-flex justify-center mb-8">
  4. <div style="width: 940px;background: #fff;" class="px-8 pb-12 pt-3 my-n3 mr-3">
  5. <!-- 基本信息 -->
  6. <baseInfo class="mt-5" :data="cvData.person"></baseInfo>
  7. <!-- 个人优势 -->
  8. <div class="d-flex mt-8">
  9. <span class="mr-6">{{ $t('resume.personalAdvantages') }}</span>
  10. <div style="flex: 1; white-space: pre-line; font-size: 15px;" v-if="cvData?.person?.advantage" v-html="cvData.person.advantage"></div>
  11. </div>
  12. <!-- 职业技能 -->
  13. <div class="d-flex mt-8">
  14. <span class="mr-6">{{ $t('resume.vocationalSkills') }}</span>
  15. <vocationalSkills style="flex: 1;" :data="cvData.skillList"></vocationalSkills>
  16. </div>
  17. <!-- 求职意向 -->
  18. <div class="d-flex mt-8">
  19. <span class="mr-6">{{ $t('resume.jobIntention') }}</span>
  20. <jobIntention style="flex: 1;" :data="cvData.interestedList"></jobIntention>
  21. </div>
  22. <!-- 工作经历 -->
  23. <div class="d-flex mt-8">
  24. <span class="mr-6">{{ $t('resume.workExperience') }}</span>
  25. <workExperience style="flex: 1;" :data="cvData.workList"></workExperience>
  26. </div>
  27. <!-- 项目经历 -->
  28. <!-- <div class="d-flex mt-8">
  29. <span class="mr-6">{{ $t('resume.projectExperience') }}</span>
  30. <projectExperience style="flex: 1;" :data="cvData.projectList"></projectExperience>
  31. </div> -->
  32. <!-- 培训经历 -->
  33. <div class="d-flex mt-8">
  34. <span class="mr-6">{{ $t('resume.trainingExperience') }}</span>
  35. <trainingExperience style="flex: 1;" :data="cvData.trainList"></trainingExperience>
  36. </div>
  37. <!-- 教育经历 -->
  38. <div class="d-flex mt-8">
  39. <span class="mr-6">{{ $t('resume.educationExp') }}</span>
  40. <educationExp style="flex: 1;" :data="cvData.eduList"></educationExp>
  41. </div>
  42. </div>
  43. <div class="operate pa-3">
  44. <v-list>
  45. <v-list-subheader class="title">操作</v-list-subheader>
  46. <v-list-item
  47. v-for="(item, i) in operateItems" :key="'操作' + i"
  48. color="primary"
  49. :prepend-icon="item.icon"
  50. :title="item.text"
  51. @click="handleCommunicate(item)"
  52. >
  53. </v-list-item>
  54. </v-list>
  55. </div>
  56. </div>
  57. <Loading :visible="loading"></Loading>
  58. </template>
  59. <script setup>
  60. defineOptions({name: 'enterprise-talentPool-details'})
  61. import baseInfo from './details/baseInfo.vue'
  62. import vocationalSkills from './details/vocationalSkills.vue'
  63. import jobIntention from './details/jobIntention.vue'
  64. import workExperience from './details/workExperience.vue'
  65. // import projectExperience from './details/projectExperience.vue'
  66. import trainingExperience from './details/trainingExperience.vue'
  67. import educationExp from './details/educationExp.vue'
  68. // import attachmentResume from './details/attachmentResume.vue'
  69. import { getPersonCvDetail } from '@/api/enterprise'
  70. import { ref } from 'vue'
  71. import { talkToUser, defaultTextEnt } from '@/hooks/web/useIM'
  72. import { useRouter, useRoute } from 'vue-router'
  73. import { getJobAdvertisedList } from '@/api/position'
  74. import Snackbar from '@/plugins/snackbar'
  75. const route = useRoute()
  76. const router = useRouter()
  77. const operateItems = [
  78. // { text: '邀请面试', icon: 'mdi-account-check' },
  79. // { text: '不合适', icon: 'mdi-close-circle-outline' },
  80. { text: '立即沟通', icon: 'mdi-chat-processing-outline' },
  81. // { text: '加入人才库', icon: 'mdi-tab-plus' },
  82. // { text: '操作记录', icon: 'mdi-clock-edit-outline' },
  83. ]
  84. // 获取人才详情
  85. const cvData = ref({})
  86. const loading = ref(false)
  87. const getCvDetail = async () => {
  88. const { id } = route.params
  89. if (!id) {
  90. Snackbar.warning('缺少简历id')
  91. setTimeout(() => {
  92. window.close()
  93. }, 2000)
  94. return
  95. }
  96. loading.value = true
  97. const data = await getPersonCvDetail(id)
  98. cvData.value = data
  99. loading.value = false
  100. }
  101. getCvDetail()
  102. // 职位列表
  103. const jobNum = ref(0)
  104. const getJobList = async () => {
  105. const { total } = await getJobAdvertisedList({ pageNo: 1, pageSize: 10, hasExpiredData: false, status: 0 })
  106. jobNum.value = total
  107. }
  108. getJobList()
  109. // 立即沟通
  110. const handleCommunicate = async (item) => {
  111. if (item.text !== '立即沟通') return
  112. // 企业必须有招聘中的职位才能发起沟通
  113. if (jobNum.value === 0) return Snackbar.warning('请先发布职位')
  114. const userId = cvData.value.person.userId
  115. if (!userId) return
  116. await talkToUser({userId, text: defaultTextEnt})
  117. let url = `/recruit/enterprise/invite/chatTools?id=${userId}`
  118. router.push(url)
  119. }
  120. </script>
  121. <style lang="scss" scoped>
  122. .operate {
  123. width: 240px;
  124. height: 500px; // 272px
  125. position: sticky;
  126. top: 60px;
  127. }
  128. </style>