| <template> | 
|   <div class="task-check-card-wrapper" @click.stop="emit('checkReceive')"> | 
|     <TaskCheckPersonalView | 
|       class="task-check-card-view" | 
|       :avatar="avatar" | 
|       :name="name" | 
|       :gender="gender" | 
|       :isReal="isReal" | 
|       :contactPhoneNumber="contactPhoneNumber" | 
|     > | 
|       <template #actions> | 
|         <template v-if="checkReceiveMethod === EnumTaskCheckReceiveMethod.CheckIn"> | 
|           <nut-button | 
|             v-if="!checkInTime" | 
|             type="primary" | 
|             class="task-check-card-phone-btn" | 
|             @click.stop="emit('checkInOrOut', CheckInOrOutEventEnum.CheckIn)" | 
|             >签到</nut-button | 
|           > | 
|           <nut-button | 
|             v-else-if="!checkOutTime" | 
|             type="primary" | 
|             class="task-check-card-phone-btn" | 
|             @click.stop="emit('checkInOrOut', CheckInOrOutEventEnum.CheckOut)" | 
|             >签出</nut-button | 
|           > | 
|           <div v-else class="task-check-card-phone-status" :style="{ color: Colors.Success }"> | 
|             {{ EnumTaskCheckReceiveStatusText[checkReceiveStatus] }} | 
|           </div> | 
|         </template> | 
|         <template v-else> | 
|           <nut-button | 
|             v-if="checkReceiveStatus === EnumTaskCheckReceiveStatus.WaitCheckReceive" | 
|             type="primary" | 
|             class="task-check-card-phone-btn" | 
|             >验收</nut-button | 
|           > | 
|           <div v-else class="task-check-card-phone-status" :style="{ color: Colors.Success }"> | 
|             {{ EnumTaskCheckReceiveStatusText[checkReceiveStatus] }} | 
|           </div> | 
|         </template> | 
|       </template> | 
|     </TaskCheckPersonalView> | 
|   </div> | 
| </template> | 
|   | 
| <script setup lang="ts"> | 
| import TaskCheckPersonalView from './TaskCheckPersonalView.vue'; | 
| import { | 
|   Colors, | 
|   EnumUserGender, | 
|   EnumTaskCheckReceiveStatus, | 
|   EnumTaskCheckReceiveStatusText, | 
|   EnumTaskCheckReceiveMethod, | 
| } from '@12333/constants'; | 
| import { CheckInOrOutEventEnum } from '../constants'; | 
|   | 
| defineOptions({ | 
|   name: 'TaskCheckCard', | 
| }); | 
|   | 
| type Props = { | 
|   avatar?: string; | 
|   name?: string; | 
|   gender?: EnumUserGender; | 
|   isReal?: boolean; | 
|   contactPhoneNumber?: string; | 
|   checkReceiveStatus?: EnumTaskCheckReceiveStatus; | 
|   /** 签到时间 */ | 
|   checkInTime?: string; | 
|   /** 签出时间 */ | 
|   checkOutTime?: string; | 
|   checkReceiveMethod?: EnumTaskCheckReceiveMethod; | 
| }; | 
|   | 
| const props = withDefaults(defineProps<Props>(), {}); | 
|   | 
| const emit = defineEmits<{ | 
|   (e: 'checkReceive'): void; | 
|   (e: 'checkInOrOut', ev: CheckInOrOutEventEnum): void; | 
| }>(); | 
| </script> | 
|   | 
| <style lang="scss"> | 
| @import '@/styles/common.scss'; | 
|   | 
| .task-check-card-wrapper { | 
|   background: #ffffff; | 
|   border-radius: 12px; | 
|   padding: 40px; | 
|   padding-right: 26px; | 
|   margin-bottom: 24px; | 
|   | 
|   &:last-child { | 
|     margin-bottom: 0; | 
|   } | 
|   | 
|   .task-check-card-view { | 
|     .task-check-card-phone-container { | 
|       margin-top: 0; | 
|     } | 
|   } | 
|   | 
|   .task-check-card-phone-status { | 
|     font-size: 24px; | 
|     height: 52px; | 
|     line-height: 52px; | 
|   } | 
| } | 
| </style> |