baseInfo.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <!-- 基本信息 -->
  2. <template>
  3. <div>
  4. <!-- 头像 -->
  5. <div class="avatarsBox">
  6. <v-badge
  7. v-if="info?.sex === '1' || info?.sex === '2'"
  8. bordered
  9. offset-x="-25"
  10. offset-y="33"
  11. :color="info?.sex ? (info?.sex === '1' ? '#1867c0' : 'error') : 'error'"
  12. :icon="info?.sex ? (info?.sex === '1' ? 'mdi-gender-male' : 'mdi-gender-female') : 'mdi-gender-female'">
  13. <v-avatar size=80 :image="info?.avatar || 'https://minio.citupro.com/dev/menduner/7.png'"></v-avatar>
  14. </v-badge>
  15. <v-avatar v-else size=80 :image="info?.avatar || 'https://minio.citupro.com/dev/menduner/7.png'"></v-avatar>
  16. </div>
  17. <div class="text-center mt-3 color-666 font-size-20 font-weight-bold">{{ info?.name }}</div>
  18. <div>
  19. <div class="mt-5 d-flex">
  20. <div class="listBox">
  21. <div v-for="k in list" :key="k.key" class="mb-1">
  22. <span :class="[k.icon, { 'mdi': k.icon }]">{{ k.label ? k.label : '' }}</span>
  23. <span>{{ k.isTime ? timesTampChange(info[k.key], 'Y-M-D') || '未知' : info[k.key] || '未知' }}</span>
  24. </div>
  25. </div>
  26. </div>
  27. <div class="mt-4">
  28. <span style="font-size: 15px;">个人画像:</span>
  29. <span v-if="info?.tagList && info?.tagList.length > 0">
  30. <v-chip size="small" label v-for="(k, i) in info.tagList" :key="i" class="mr-2 mb-2" color="primary">{{ k }}</v-chip>
  31. </span>
  32. <span v-else>暂无</span>
  33. </div>
  34. </div>
  35. </div>
  36. </template>
  37. <script setup>
  38. // 已废弃
  39. defineOptions({name: 'enterprise-talentPool-details-baseInfo'})
  40. import { ref } from 'vue'
  41. import { timesTampChange } from '@/utils/date'
  42. import { dealDictObjData } from '@/utils/position'
  43. const props = defineProps({
  44. data: Object
  45. })
  46. const list = [
  47. { key: 'areaName', icon: 'mdi-map-marker-outline' },
  48. { key: 'phone', icon: 'mdi-phone-outline' },
  49. { key: 'email', icon: 'mdi-email-outline' },
  50. { key: 'expName', icon: 'mdi-calendar-blank-outline' },
  51. { key: 'eduName', icon: 'mdi-school-outline' },
  52. { key: 'jobStatusName', icon: 'mdi-tag-outline' },
  53. { key: 'birthday', icon: 'mdi-cake-variant-outline', isTime: true },
  54. { key: 'maritalStatusName', icon: 'mdi-account-heart' },
  55. { key: 'firstWorkTime', label: '首次工作时间:', isTime: true }
  56. ]
  57. const info = ref({})
  58. if (props.data && Object.keys(props.data).length) {
  59. info.value = dealDictObjData({}, props.data)
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .avatarsBox {
  64. height: 80px;
  65. width: 80px;
  66. position: relative;
  67. // margin-right: 40px;
  68. margin: auto;
  69. .img {
  70. width: 100%;
  71. height: 100%;
  72. }
  73. .mdi {
  74. font-size: 42px;
  75. color: #fff;
  76. }
  77. div {
  78. position: absolute;
  79. top: 50%;
  80. left: 50%;
  81. transform: translate(-50%, -50%);
  82. border-radius: 50%;
  83. }
  84. }
  85. .listBox {
  86. display: flex;
  87. flex-wrap: wrap; /* 允许换行 */
  88. width: 100%; /* 设置容器宽度 */
  89. overflow: hidden;
  90. color: var(--color-666);
  91. div {
  92. width: 50%;
  93. &:nth-child(2n) {
  94. padding-left: 20px;
  95. }
  96. span {
  97. height: 32px;
  98. line-height: 32px;
  99. }
  100. .mdi {
  101. font-size: 22px;
  102. margin-right: 8px;
  103. }
  104. }
  105. }
  106. </style>