left.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <div>
  3. <div class="left-top">
  4. <v-badge
  5. bordered
  6. offset-x="10"
  7. offset-y="50"
  8. :color="baseInfo?.sex ? (baseInfo?.sex === '1' ? '#1867c0' : 'error') : 'error'"
  9. :icon="baseInfo?.sex ? (baseInfo?.sex === '1' ? 'mdi-gender-male' : 'mdi-gender-female') : 'mdi-gender-female'">
  10. <v-avatar size="x-large" :image="baseInfo?.avatar || 'https://minio.citupro.com/dev/menduner/7.png'"></v-avatar>
  11. </v-badge>
  12. <div class="ml-5 content">
  13. <div class="username">
  14. <span class="mr-2">{{ baseInfo?.name || $t('sys.tourist') }}</span>
  15. <!-- <v-icon class="cursor-pointer" style="width: 80px; height: 22px;">
  16. <v-img width="80" height="22" src="https://minio.citupro.com/dev/menduner/upgrade.png"></v-img>
  17. </v-icon> -->
  18. </div>
  19. <div class="userInfo">
  20. {{ baseInfo?.expTypeText || $t('common.currentlyUnavailable') }}<span class="septal-line"></span>{{ baseInfo?.eduTypeText || $t('common.currentlyUnavailable') }}
  21. </div>
  22. <div class="mt-3">
  23. <v-select
  24. v-model="selectVal"
  25. :items="items"
  26. density="compact"
  27. variant="outlined"
  28. item-title="label"
  29. item-value="value"
  30. hide-details
  31. color="primary"
  32. @update:model-value="handleChangeJobStatus"
  33. ></v-select>
  34. </div>
  35. </div>
  36. <div class="otherInfo">
  37. <div>
  38. <span>{{ $t('resume.phoneNumber') }}:{{ baseInfo?.phone || $t('common.currentlyUnavailable') }}</span>
  39. </div>
  40. <div class="my-3">
  41. <span>{{ $t('resume.userEmail') }}:{{ baseInfo?.email || $t('common.currentlyUnavailable') }}</span>
  42. </div>
  43. <div>
  44. <span>{{ $t('resume.dateOfBirth') }}:{{ baseInfo?.birthdayText || $t('common.currentlyUnavailable') }}</span>
  45. </div>
  46. <div class="mt-3">{{ $t('resume.currentAddress') }}: {{ baseInfo?.areaName || $t('common.currentlyUnavailable') }}</div>
  47. </div>
  48. <div class="slider-btn">
  49. <v-btn class="slider-btn-item" rounded variant="outlined" color="primary" append-icon="mdi-menu-right" to="/recruit/personal/resume">{{ $t('resume.onlineResume') }}</v-btn>
  50. </div>
  51. </div>
  52. <div class="left-tabs mt-3">
  53. <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#fff">
  54. <v-tab v-for="(val, i) in list" :key="i" :value="i">{{ val.title }}</v-tab>
  55. </v-tabs>
  56. </div>
  57. <div :class="['left-bottom', {'mt-3': list[tab].path !== interview && list[tab].path !== interested}]">
  58. <component :is="list[tab].path"></component>
  59. </div>
  60. </div>
  61. </template>
  62. <script setup>
  63. defineOptions({ name: 'personal-center-left'})
  64. import { getDict } from '@/hooks/web/useDictionaries'
  65. import { ref } from 'vue'
  66. import { useUserStore } from '@/store/user'
  67. import { updateJobStatus } from '@/api/recruit/personal/resume'
  68. import { useI18n } from '@/hooks/web/useI18n'
  69. import Snackbar from '@/plugins/snackbar'
  70. import communication from '../components/communication.vue'
  71. import delivery from '../components/delivery.vue'
  72. import interview from '../components/interview/index.vue'
  73. import interested from '../components/interested.vue'
  74. import seenMe from '../components/seenMe.vue'
  75. const { t } = useI18n()
  76. const list = [
  77. { title: t('position.throughCommunication'), path: communication },
  78. { title: t('position.delivered'), path: delivery },
  79. { title: t('position.interview'), path: interview },
  80. { title: t('position.interested'), path: interested },
  81. { title: t('position.haveSeenMe'), path: seenMe }
  82. ]
  83. const tab = ref(1)
  84. const selectVal = ref('0')
  85. const items = ref([])
  86. const userStore = useUserStore()
  87. // 求职类型字典
  88. getDict('menduner_job_status').then(({ data }) => {
  89. data = data?.length && data || []
  90. items.value = data
  91. })
  92. let baseInfo = ref({})
  93. const getBasicInfo = () => {
  94. baseInfo.value = JSON.parse(localStorage.getItem('baseInfo')) // 人才信息
  95. selectVal.value = baseInfo?.value?.jobStatus || '0'
  96. }
  97. getBasicInfo()
  98. // 求职类型更换
  99. const handleChangeJobStatus = async () => {
  100. await updateJobStatus(selectVal.value)
  101. Snackbar.success('更新成功')
  102. await userStore.getUserBaseInfos(baseInfo.value.userId)
  103. getBasicInfo()
  104. }
  105. </script>
  106. <style scoped lang="scss">
  107. .left-top {
  108. display: flex;
  109. align-items: center;
  110. padding: 12px 0 12px 12px;
  111. height: 144px;
  112. border-radius: 12px;
  113. background-color: #fff;
  114. .content {
  115. height: 100%;
  116. .username {
  117. font-weight: 500;
  118. font-size: 20px;
  119. color: var(--color-222);
  120. height: 24px;
  121. line-height: 24px;
  122. }
  123. .userInfo {
  124. height: 21px;
  125. margin-top: 8px;
  126. color: var(--color-666);
  127. font-size: 14px;
  128. }
  129. }
  130. .otherInfo {
  131. flex: 1;
  132. height: 100%;
  133. margin-left: 50px;
  134. font-size: 14px;
  135. font-weight: 500;
  136. color: var(--color-333);
  137. text-align: left;
  138. .salary {
  139. font-size: 16px;
  140. font-family: 'kanzhun-Regular';
  141. font-weight: 500;
  142. color: var(--v-error-base);
  143. margin: -1px 0 0 16px;
  144. }
  145. .edu-time {
  146. color: var(--color-999);
  147. font-weight: 400;
  148. margin-left: 20px;
  149. }
  150. .edu {
  151. margin: 12px 0;
  152. }
  153. }
  154. .slider-btn {
  155. position: relative;
  156. min-width: 188px;
  157. height: 100%;
  158. overflow: hidden;
  159. .slider-btn-item {
  160. position: absolute;
  161. top: 4px;
  162. right: -15px;
  163. }
  164. }
  165. }
  166. </style>