wupengfei
2 天以前 6e2f19df7ba33fcfea0af7c2c529c68414c101fb
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<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>
        <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>
    </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;
}>();
</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>