registrationDetail.vue
6.2 KB
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<template>
<view class="registration_detail">
<view class="box student_info">
<view class="title">学生信息</view>
<view class="item">
<text>学生姓名</text>
<text>{{registrationDetail.studentName}}</text>
</view>
<view class="item">
<text>手机号</text>
<text>{{registrationDetail.studentPhone}}</text>
</view>
<view class="item">
<text>学号</text>
<text>{{registrationDetail.studentNumber}}</text>
</view>
<view class="item">
<text>班级</text>
<text>{{registrationDetail.classInfo}}</text>
</view>
<view class="icon_item">
<u-icon size="32rpx" label="实习项目" labelSize="28rpx" labelColor="#909097"
name="/static/img/home/实习项目icon@2x.png"></u-icon>
<text>{{registrationDetail.projectName}}</text>
</view>
<view class="border_top item">
<text>申请时间</text>
<text>{{timeFormat(registrationDetail.applyTime, 'yyyy-mm-dd hh:MM')}}</text>
</view>
</view>
<view class="box company_info">
<view class="title">单位信息</view>
<view class="icon_item">
<u-icon size="32rpx" label="实习单位" labelSize="28rpx" labelColor="#909097"
name="/static/img/home/实习项目icon@2x.png"></u-icon>
<text>{{registrationDetail.companyName}}</text>
</view>
<view class="icon_item">
<u-icon size="32rpx" label="实习岗位" labelSize="28rpx" labelColor="#909097"
name="/static/img/home/实习项目icon@2x.png"></u-icon>
<text>{{registrationDetail.jobName}}</text>
</view>
<view class="border_top item">
<text>联系人</text>
<text>{{jobDetail.contactName}}</text>
</view>
<view class="item">
<text>联系电话</text>
<text>{{jobDetail.contactPhone}}</text>
</view>
<view class="item">
<text>所在地区</text>
<text>{{address}}</text>
</view>
<view class="item">
<text>详细地址</text>
<text>{{jobDetail.workSite}}</text>
</view>
</view>
<view class="box status">
<view class="title">状态</view>
<view class="item">
<text>审核状态</text>
<text>{{reviewStatus}}</text>
</view>
<view class="item">
<text>审核人</text>
<text>{{registrationDetail.auditTeacherName}}</text>
</view>
</view>
<view class="footer">
<view class="left_btn">
<c-button type="cancel" text="审核拒绝" @click="handelCancel">
</c-button>
</view>
<view class="right_btn">
<c-button type="confirm" text="审核通过" @click="hancelSubmit">
</c-button>
</view>
</view>
</view>
</template>
<script>
import {
getRegistrationDetailApi,
putRegistrationReviewApi,
} from '@/config/api.js';
export default {
data() {
return {
registrationDetail: {},
}
},
onLoad(option) {
getRegistrationDetailApi(option.id).then(data => {
if (data) {
console.log(data)
this.registrationDetail = data
}
})
},
onShow(options) {
},
computed: {
jobDetail: function() {
let {
jobDetail = {}
} = this.registrationDetail
return jobDetail;
},
address: function() {
return this.jobDetail && this.jobDetail.province ?
`${this.jobDetail.province}/${this.jobDetail.city}/${this.jobDetail.district}` : '';
},
reviewStatus: function() {
return this.registrationDetail == 'apply' ? '待报名' :
this.registrationDetail == 'wait' ? '待审核' :
this.registrationDetail == 'pass' ? '已审核' :
this.registrationDetail == 'reject' ? '已拒绝' : '';
}
},
methods: {
timeFormat(timestamp, format = 'yyyy-mm-dd') {
return timestamp > 0 ? uni.$u.timeFormat(timestamp, format) : '--'
},
handelCancel() {
putRegistrationReviewApi({
formIds: [this.registrationDetail.id],
schoolAuditStatus: 'reject',
}).then(data => {
if (data) {
this.$u.route({
url: `pages/main/home/registrationReview/registrationReview`
})
}
})
},
hancelSubmit() {
putRegistrationReviewApi({
formIds: [this.registrationDetail.id],
schoolAuditStatus: 'pass',
}).then(data => {
if (data) {
this.$u.route({
url: `pages/main/home/registrationReview/registrationReview`
})
}
})
},
}
}
</script>
<style lang="scss" scoped>
.registration_detail {
width: 100%;
min-height: 100%;
height: auto;
padding: 20rpx 0 194rpx 0;
background-color: #F7F7F7;
.box {
width: 630rpx;
margin: 0 auto 20rpx;
padding: 30rpx 30rpx 12rpx 30rpx;
border-radius: 12rpx;
background-color: #FFFFFF;
.title {
font-size: 32rpx;
line-height: 32rpx;
color: #202131;
margin: 0 0 30rpx 0;
}
.title::before {
content: "";
display: inline-block;
width: 6rpx;
height: 32rpx;
background-color: #06B079;
margin: 0 12rpx 0 0;
position: relative;
top: 4rpx;
border-radius: 8rpx;
}
.icon_item {
display: flex;
flex-flow: row nowrap;
margin: 0 0 24rpx 0;
text {
display: inline-block;
width: 460rpx;
font-size: 28rpx;
line-height: 48rpx;
color: #202131;
margin: 0 0 0 40rpx;
}
}
.item {
margin: 0 0 24rpx 0;
text:first-child {
display: inline-block;
width: 112rpx;
text-align: justify;
text-align-last: justify;
font-size: 28rpx;
line-height: 48rpx;
color: #909097;
vertical-align: top;
}
text:last-child {
display: inline-block;
width: 440rpx;
font-size: 28rpx;
line-height: 48rpx;
color: #202131;
margin: 0 0 0 78rpx;
}
}
.border_top {
border-top: 2rpx solid #E2E2E8;
padding: 28rpx 0 0 0;
}
}
.footer {
width: 100%;
height: 96rpx;
padding: 28rpx 30rpx;
background: #FFFFFF;
position: fixed;
bottom: 0;
left: 0;
z-index: 99;
border-top: 2rpx solid #E2E2E8;
view {
display: inline-block;
}
.left_btn {
width: 330rpx;
margin: 0 30rpx 0 0;
}
.right_btn {
width: 330rpx;
}
}
}
</style>