wupengfei
2025-03-11 286f1b727856d6b32a8d237f353ae008f3076deb
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<template>
  <div class="task-card-wrapper">
    <div class="task-card-title-wrapper">
      <div class="task-card-title">{{ taskName }}</div>
      <slot name="title-right">
        <TaskPrice :value="212" />
      </slot>
    </div>
    <slot>
      <div class="task-card-welfare-list">
        <div class="task-card-welfare-list-item">日结</div>
        <div class="task-card-welfare-list-item">男女不限</div>
        <div class="task-card-welfare-list-item">包三餐</div>
      </div>
      <div class="task-card-time">上班时间:07:00-15:30</div>
    </slot>
    <div class="task-card-footer">
      <div class="task-card-left">
        <div class="task-card-footer-tag">H</div>
        <div class="task-card-footer-address">{{ address }}</div>
      </div>
      <div class="task-card-actions" v-if="showActions">
        <slot name="actions">
          <nut-button type="primary" @click.stop="handleSign">报名</nut-button>
        </slot>
      </div>
    </div>
  </div>
</template>
 
<script setup lang="ts">
import TaskPrice from './TaskPrice.vue';
import { CommonTaskCardProps } from './card';
 
defineOptions({
  name: 'TaskCard',
});
 
type Props = CommonTaskCardProps & {
  showActions?: boolean;
 
  taskName?: string;
  address?: string;
};
 
const props = withDefaults(defineProps<Props>(), {
  showActions: true,
});
 
function handleSign() {}
</script>
 
<style lang="scss">
@import '@/styles/common.scss';
 
.task-card-wrapper {
  padding: 24px 32px;
  margin-bottom: 24px;
  background-color: #fff;
  border-radius: 12px;
 
  &:last-child {
    margin-bottom: 0;
  }
 
  .task-card-title-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
 
    .task-card-title {
      flex: 1;
      min-width: 0;
      @include ellipsis;
      font-size: 30px;
      color: boleGetCssVar('text-color', 'primary');
      line-height: 42px;
    }
  }
 
  .task-card-welfare-list {
    display: flex;
    flex-wrap: wrap;
    row-gap: 6px;
    column-gap: 18px;
    margin-bottom: 8px;
 
    .task-card-welfare-list-item {
      font-size: 24px;
      color: #ff7d00;
      line-height: 36px;
    }
  }
 
  .task-card-time {
    font-size: 24px;
    color: boleGetCssVar('text-color', 'regular');
    line-height: 36px;
    margin-bottom: 6px;
  }
 
  .task-card-footer {
    display: flex;
    align-items: center;
 
    .task-card-left {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
 
      .task-card-footer-tag {
        width: 32px;
        height: 32px;
        background: #2a9e1b;
        margin-right: 8px;
        border-radius: 8px;
        text-align: center;
        line-height: 32px;
        color: #fff;
        font-size: 22px;
      }
 
      .task-card-footer-address {
        font-size: 22px;
        color: boleGetCssVar('text-color', 'regular');
        line-height: 36px;
        flex: 1;
        min-width: 0;
        @include ellipsis;
      }
    }
 
    .task-card-actions {
      --nut-button-default-font-size: 24px;
 
      .nut-button {
        height: 26px;
      }
    }
  }
}
</style>