left.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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="vline"></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="/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/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.vue'
  73. import interested from '../components/interested.vue'
  74. import interestedMe from '../components/interestedMe.vue'
  75. import seenMe from '../components/seenMe.vue'
  76. const { t } = useI18n()
  77. const list = [
  78. { title: t('position.throughCommunication'), path: communication },
  79. { title: t('position.delivered'), path: delivery },
  80. { title: t('position.interview'), path: interview },
  81. { title: t('position.interested'), path: interested },
  82. { title: t('position.interestedInMe'), path: interestedMe },
  83. { title: t('position.haveSeenMe'), path: seenMe }
  84. ]
  85. const tab = ref(1)
  86. const selectVal = ref('0')
  87. const items = ref([])
  88. const userStore = useUserStore()
  89. // 求职类型字典
  90. getDict('menduner_job_status').then(({ data }) => {
  91. data = data?.length && data || []
  92. items.value = data
  93. })
  94. let baseInfo = ref({})
  95. const getBasicInfo = () => {
  96. baseInfo.value = JSON.parse(localStorage.getItem('baseInfo')) // 人才信息
  97. selectVal.value = baseInfo.value.jobStatus
  98. }
  99. getBasicInfo()
  100. // 求职类型更换
  101. const handleChangeJobStatus = async () => {
  102. await updateJobStatus(selectVal.value)
  103. Snackbar.success('更新成功')
  104. await userStore.getUserBaseInfos(baseInfo.value.userId)
  105. getBasicInfo()
  106. }
  107. </script>
  108. <style scoped lang="scss">
  109. .left-top {
  110. display: flex;
  111. align-items: center;
  112. padding: 12px 0 12px 12px;
  113. height: 144px;
  114. border-radius: 12px;
  115. background-color: #fff;
  116. .content {
  117. height: 100%;
  118. .username {
  119. font-weight: 500;
  120. font-size: 20px;
  121. color: #222;
  122. height: 24px;
  123. line-height: 24px;
  124. }
  125. .userInfo {
  126. height: 21px;
  127. margin-top: 8px;
  128. color: #666;
  129. font-size: 14px;
  130. }
  131. }
  132. .otherInfo {
  133. flex: 1;
  134. height: 100%;
  135. margin-left: 50px;
  136. font-size: 14px;
  137. font-weight: 500;
  138. color: #333;
  139. text-align: left;
  140. .salary {
  141. font-size: 16px;
  142. font-family: 'kanzhun-Regular';
  143. font-weight: 500;
  144. color: var(--v-error-base);
  145. margin: -1px 0 0 16px;
  146. }
  147. .edu-time {
  148. color: #999;
  149. font-weight: 400;
  150. margin-left: 20px;
  151. }
  152. .edu {
  153. margin: 12px 0;
  154. }
  155. }
  156. .slider-btn {
  157. position: relative;
  158. min-width: 188px;
  159. height: 100%;
  160. overflow: hidden;
  161. .slider-btn-item {
  162. position: absolute;
  163. top: 4px;
  164. right: -15px;
  165. }
  166. }
  167. }
  168. </style>