From 92b51e47eb0e53e1e8e13aa0f9135603e1bb03a0 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期日, 19 十月 2025 14:38:36 +0800 Subject: [PATCH] fix: 验收管理 --- packages/components/src/Card/FlexJobTopView.vue | 80 +++++++++++++++++++++++++++++++--------- 1 files changed, 62 insertions(+), 18 deletions(-) diff --git a/packages/components/src/Card/FlexJobTopView.vue b/packages/components/src/Card/FlexJobTopView.vue index ba2b4fd..2c9fa45 100644 --- a/packages/components/src/Card/FlexJobTopView.vue +++ b/packages/components/src/Card/FlexJobTopView.vue @@ -1,22 +1,33 @@ <template> <div :class="['flexJob-card-top-wrapper', size]"> - <Avatar :src="avatarUrl" :size="size === 'small' ? 50 : 60" class="flexJob-card-top-avatar" /> + <Avatar + :src="setOSSLink(avatar)" + :size="size === 'small' ? 50 : 60" + class="flexJob-card-top-avatar" + /> <div class="flexJob-card-top-info"> <div class="flexJob-card-top-info-item"> - <div class="flexJob-card-top-info-name">{{ name }}</div> - <div class="flexJob-card-top-info-gender"> - <img - v-if="genderType === Gender.Male" - :src="IconMale" - class="flexJob-card-top-info-gender-icon" - /> - <img v-else :src="IconFemale" class="flexJob-card-top-info-gender-icon" /> + <div class="flexJob-card-top-info-item-w"> + <div class="flexJob-card-top-info-name">{{ name }}</div> + <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> </div> - <div class="flexJob-card-top-info-auth">{{ isRealName ? '宸插疄鍚�' : '鏈疄鍚�' }}</div> + <div class="flexJob-card-top-info-item-right"> + <slot name="time"></slot> + </div> </div> <slot name="detail"> <div class="flexJob-card-top-info-detail"> - {{ `${age}宀� | ${educationalLevel} | ${educationalLevel} | 涓婂矖${arrangeCount}娆 }} + {{ infoDetail }} </div> </slot> </div> @@ -26,8 +37,10 @@ <script setup lang="ts"> import IconMale from '@/assets/mine/icon-male.png'; import IconFemale from '@/assets/mine/icon-female.png'; -import { AvatarImage, Gender } from '@12333/constants'; +import { AvatarImage, EnumUserGender } from '@12333/constants'; import { Avatar } from '@12333/components'; +import { computed } from 'vue'; +import { setOSSLink } from '@12333/utils'; defineOptions({ name: 'FlexJobTopView', @@ -36,19 +49,33 @@ type Props = { size?: 'normal' | 'small'; - avatarUrl?: string; + avatar?: string; name?: string; - genderType?: Gender; + gender?: EnumUserGender; age?: number; - educationalLevel?: string; - arrangeCount?: number; - isRealName?: boolean; + isReal?: boolean; + personalIdentityContent?: string; + educationalBackgroundContent?: string; + taskCount?: number; }; const props = withDefaults(defineProps<Props>(), { size: 'normal', - avatarUrl: AvatarImage, + avatar: AvatarImage, + personalIdentityContent: '', + educationalBackgroundContent: '', }); + +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"> @@ -68,9 +95,22 @@ flex: 1; min-width: 0; + .flexJob-card-top-info-item-w { + display: flex; + align-items: center; + flex: 1; + min-width: 0; + } + .flexJob-card-top-info-item { display: flex; align-items: center; + + .flexJob-card-top-info-item-right { + font-size: 28px; + line-height: 34px; + color: boleGetCssVar('text-color', 'secondary'); + } .flexJob-card-top-info-name { font-size: 34px; @@ -97,6 +137,10 @@ font-size: 28px; line-height: 34px; flex-shrink: 0; + + &.is-real-name { + color: #2a9e1b; + } } } -- Gitblit v1.9.1