wupengfei
6 小时以前 47047d626ea8fab28c04e6534fe6ffa3dc61de69
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<template>
  <ChooseSupplierCard :avatar="avatar" :name="name">
    <template #name-right>
      <div class="flexJob-card-top-info-gender">
        <img
          v-if="gender === EnumUserGender.Male"
          :src="IconMale"
          class="flexJob-card-top-info-gender-icon"
        />
        <img v-else :src="IconFemale" class="flexJob-card-top-info-gender-icon" />
      </div>
      <div class="flexJob-card-top-info-auth" :class="{ 'is-real-name': isReal }">
        {{ isReal ? '已实名' : '未实名' }}
      </div>
    </template>
    <template #infoDetail>
      {{ infoDetail }}
    </template>
    <template #desc>
      {{ workExperience }}
    </template>
    <template #actions>
      <slot name="actions"> </slot>
    </template>
  </ChooseSupplierCard>
</template>
 
<script setup lang="ts">
import { EnumUserGender } from '@12333/constants';
import ChooseSupplierCard from './ChooseSupplierCard.vue';
import IconMale from '@/assets/mine/icon-male.png';
import IconFemale from '@/assets/mine/icon-female.png';
 
defineOptions({
  name: 'ChooseServerCard',
});
 
type Props = {
  avatar?: string;
  name?: string;
  gender?: EnumUserGender;
  age?: number;
  isReal?: boolean;
  personalIdentityContent?: string;
  educationalBackgroundContent?: string;
  taskCount?: number;
  workExperience?: string;
};
 
const props = withDefaults(defineProps<Props>(), {});
 
const infoDetail = computed(() =>
  [
    props.age > 0 ? `${props.age}岁` : '',
    props.personalIdentityContent,
    props.educationalBackgroundContent,
    props.taskCount > 0 ? `上岗${props.taskCount ?? 0}次` : '',
  ]
    .filter(Boolean)
    .join('|')
);
</script>
 
<style lang="scss" scoped>
@import '@/styles/common.scss';
</style>