<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>
|