<template>
|
<div class="task-check-card-wrapper" @click.stop="emit('taskChecked')">
|
<TaskCheckPersonalView
|
class="task-check-card-view"
|
:avatar="avatar"
|
:name="name"
|
:gender="gender"
|
:isReal="isReal"
|
:contactPhoneNumber="contactPhoneNumber"
|
>
|
<template #actions>
|
<nut-button
|
v-if="checkReceiveStatus === EnumTaskCheckReceiveStatus.WaitCheckReceive"
|
type="primary"
|
class="task-check-card-phone-btn"
|
@click.stop="emit('checkReceive')"
|
>验收</nut-button
|
>
|
<div v-else class="task-check-card-phone-status" :style="{ color: Colors.Success }">
|
{{ EnumTaskCheckReceiveStatusText[checkReceiveStatus] }}
|
</div>
|
</template>
|
</TaskCheckPersonalView>
|
</div>
|
</template>
|
|
<script setup lang="ts">
|
import TaskCheckPersonalView from './TaskCheckPersonalView.vue';
|
import {
|
Colors,
|
EnumUserGender,
|
EnumTaskCheckReceiveStatus,
|
EnumTaskCheckReceiveStatusText,
|
} from '@12333/constants';
|
|
defineOptions({
|
name: 'TaskCheckCard',
|
});
|
|
type Props = {
|
avatar?: string;
|
name?: string;
|
gender?: EnumUserGender;
|
isReal?: boolean;
|
contactPhoneNumber?: string;
|
checkReceiveStatus?: EnumTaskCheckReceiveStatus;
|
};
|
|
const props = withDefaults(defineProps<Props>(), {});
|
|
const emit = defineEmits<{
|
(e: 'checkReceive'): void;
|
(e: 'taskChecked'): 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>
|