tch_index.vue
10.6 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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
<template>
<view class="wrap_box">
<!-- <uParse v-if="datas" :content="datas"></uParse> -->
<topbar bg_color="#2d81ff">
<text style="color: #fff;"></text>
<text style="color: #fff;">首页</text>
<text style="color: #fff;"></text>
</topbar>
<view class="tch_box">
<view class="tel_index_bg"></view>
<view v-if="userDatas" class="tch_main">
<view class="tch_user dis_flex aic " @click="$service.jump" data-url="/pagesA/tch_msg/tch_msg">
<!-- <image class="user_tx" src="/static/images/tx.png" mode="aspectFill"></image> -->
<myLazyLoad class="user_tx" :src="$service.getimg(userDatas.img)" mode="aspectFill" :borderRadius="112"></myLazyLoad>
<view class="flex_1" @click="cli_fuc">
<view class="user_name dis_flex aic">
{{userDatas.nick||''}}
<text v-if="userDatas.is_assistant == 2">班主任</text>
<text v-else>助教老师</text>
</view>
<view class="user_id" >{{userDatas.class_title||''}}</view>
</view>
<text class="icon icon-arrow-right-copy"></text>
</view>
<!-- 班级概况 start -->
<view class="tit_box">班级概况</view>
<view class="tch_banji">
<view class="bjf dis_flex_c aic ju_c" @click="$service.jump" data-url="/pagesA/tch_kq/tch_kq" data-login="true">
<view class="bjf_num">{{userDatas.class_num||''}}</view>
<view class="bjf_text">
班级分
<text class="icon icon-arrow-right-copy"></text>
</view>
</view>
<view class="bj_sg"></view>
<view class="bj_xq">
<view class="bj_pai dis_flex aic" @click="$service.jump" data-url="/pagesA/tch_rank/tch_rank" data-login="true">
<text class="bj_pait"></text>
<view class="flex_1">班级排名</view>
<view class="bj_painum">第{{userDatas.class_sort||''}}名</view>
<text class="icon icon-arrow-right-copy"></text>
</view>
<view class="bj_pai dis_flex aic" @click="$service.jump" data-url="/pagesA/tch_vio/tch_vio" data-login="true">
<text class="bj_paiw"></text>
<view class="flex_1">违纪情况</view>
<view class="bj_painum">{{userDatas.class_break||''}}</view>
<text class="icon icon-arrow-right-copy"></text>
</view>
</view>
</view>
<!-- 班级概况 end -->
<!-- 学员概况 start -->
<view class="tit_box">学员概况</view>
<view class="xygk">
<view class="gk_li" @click="$service.jump" data-url="/pagesA/stu_list/stu_list" data-login="true">
<image src="/static/images/tch/home_icon_namelist.png" mode="aspectFit"></image>
本班学员名单
</view>
<view class="gk_li" @click="$service.jump" data-url="/pagesA/stumsg_list/stumsg_list" data-login="true">
<image src="/static/images/tch/home_icon_archives.png" mode="aspectFit"></image>
学员档案信息
</view>
<view class="gk_li" @click="$service.jump" data-url="/pagesA/stu_ft_list/stu_ft_list" data-login="true">
<image src="/static/images/tch/home_icon_records.png" mode="aspectFit"></image>
学员访谈记录
</view>
<view class="gk_li" @click="$service.jump" data-url="/pagesA/stu_hddk_add/stu_hddk_add" data-login="true">
<image src="/static/images/tch/home_icon_checklist.png" mode="aspectFit"></image>
核对到课名单
</view>
<view class="gk_li" @click="$service.jump" data-url="/pages_v2/thc_my_pf/thc_my_pf" data-login="true">
<image src="/static/images/v2/my_pf.png" mode="aspectFit"></image>
学员对我的评分
</view>
<view class="gk_li" @click="$service.jump" data-url="/pages_v2/tch_pf_list/tch_pf_list" data-login="true">
<image src="/static/images/v2/rank.png" mode="aspectFit"></image>
星级排行榜
</view>
<view class="gk_li" @click="$service.jump" data-url="/page_admin/teacher_praise/teacher_praise" data-login="true">
<image src="/static/images/v2/biaoyangdainz.png" mode="aspectFit"></image>
点赞表扬
</view>
</view>
<!-- <view class="tit_box">学员对我的评分</view> -->
<!-- 学员概况 end -->
<!-- 近期入学名单 start -->
<view class="tit_box">近期入学名单</view>
<view class="rxmd_list">
<view class="rxmd_li" v-for="(item,index) in md_list" :key="index">
<view class="rxmd_li_name dis_flex aic">
<text class="oh1">{{item.name}} </text>
<image v-if="item.sex==2" src="/static/images/tch/icon_female.png" mode="aspectFit"></image>
<image v-else src="/static/images/tch/icon_male.png" mode="aspectFit"></image>
</view>
<view class="rxmd_li_id flex_1">
{{item.phone||''}}
</view>
<view class="rxmd_li_time">
{{item.add_time||''}} 入学
</view>
</view>
<u-empty v-if="md_list.length==0"
mode="data"
text="暂无名单"
icon="/static/images/tch/img_blank.png"
>
</u-empty>
</view>
<!-- 近期入学名单 end -->
</view>
</view>
<!-- 阻止滑动 -->
<!-- <view @touchmove.stop.prevent='test'></view> -->
</view>
</template>
<script>
import Vue from 'vue'
import {
mapState,
mapMutations
} from 'vuex'
var that
export default {
data() {
return {
options:'',
datas:'',
md_list:[],
shownum:0
}
},
computed: {
...mapState(['hasLogin', 'forcedLogin', 'userName', 'userinfo','nowtime', 'userDatas']),
},
onLoad(e) {
that=this
that.options=e||{}
console.log(e)
that.getdata()
},
onShow() {
if(that.shownum>0){
that.getdata()
}
that.shownum++
},
methods: {
// ...mapMutations(['wxshouquan','login']),
test(){},
cli_fuc(){
console.log(1)
},
getdata() {
var datas = {}
var jkurl = '/teacher'
that.$service.P_post(jkurl, datas).then(res => {
that.btnkg = 0
console.log(res)
if (res.code == 1) {
that.htmlReset = 0
var datas = res.data
console.log(typeof datas)
if (typeof datas == 'string') {
datas = JSON.parse(datas)
}
console.log(res)
that.$store.commit('setuser', datas)
if(datas.list){
that.md_list=datas.list.data
}
} else {
if (res.msg) {
uni.showToast({
icon: 'none',
title: res.msg
})
} else {
uni.showToast({
icon: 'none',
title: '获取数据失败'
})
}
}
}).catch(e => {
that.htmlReset = 1
that.btnkg = 0
// that.$refs.htmlLoading.htmlReset_fuc(1)
console.log(e)
uni.showToast({
icon: 'none',
title: '获取数据失败,请检查您的网络连接'
})
})
},
getimg(img){
return service.getimg(img)
},
jump(e) {
var that = this
if (that.btnkg == 1) {
return
} else {
that.btnkg = 1
setTimeout(function() {
that.btnkg = 0
}, 2000)
}
console.log(e.currentTarget.dataset.type)
service.jump(e)
},
goback(){
uni.navigateBack()
},
func(){
// that.$store.commit('setSystem',datas.system)
},
}
}
</script>
<style lang="scss" scoped>
.wrap_box{
width: 100%;
// padding: 30rpx;
position: relative;
background: #F8F8F8;
min-height: 100vh;
}
.tel_index_bg{
position: absolute;
top: 0;
z-index: 1;
width: 100%;
min-height: 220rpx;
background: linear-gradient(0deg, #f8f8f8 0%, #ffffff 25%, #5D9DFD 60%, #428EFE 70%, #2D81FF 100%);
}
.tch_box{
width: 100%;
position: relative;
}
.tch_main{
width: 100%;
position: relative;
z-index: 2;
padding: 28rpx;
}
.tch_user{
width: 100%;
min-height: 176rpx;
background: #FFFFFF;
border-radius: 20rpx;
padding: 28rpx;
.user_tx{
width: 112rpx;
height: 112rpx;
border-radius: 50%;
overflow: hidden;
margin-right: 23rpx;
}
.icon{
font-size: 24rpx;
color: #bbb;
}
.user_name{
font-size: 32rpx;
color: #545D71;
margin-bottom: 10rpx;
font-weight: bold;
text{
font-size: 24rpx;
color: #4086ee;
padding: 0 9rpx;
height: 34rpx;
background: rgba(64, 134, 238, .1);
border-radius: 4rpx;
margin-left: 10rpx;
font-weight: normal;
}
}
.user_id{
font-size: 28rpx;
color: #7C8086;
}
}
.tit_box{
font-size: 32rpx;
font-weight: bold;
color: #545D71;
height: 80rpx;
margin-top: 14rpx;
display: flex;
align-items: center;
}
.tch_banji{
width: 100%;
min-height: 210rpx;
background: #FFFFFF;
border-radius: 20rpx;
padding: 28rpx;
display: flex;
align-items: center;
justify-content: space-between;
.bj_sg{
width: 1px;
height: 120rpx;
background: #EEEEEE;
border-radius: 1px;
}
.bjf{
width: 260rpx;
padding-right: 30rpx;
.bjf_num{
font-size: 60rpx;
font-family: Arial;
font-weight: bold;
color: #545D71;
line-height: 70rpx;
}
.bjf_text{
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #545D71;
display: flex;
align-items: center;
padding-left: 35rpx;
.icon{
font-size: 18rpx;
color: #ddd;
margin-left: 20rpx;
}
}
}
.bj_xq{
width: 380rpx;
padding-left: 28rpx;
.bj_pai{
width: 100%;
display: flex;
align-items: center;
font-size: 28rpx;
color: #7C8086;
height: 60rpx;
.bj_pait{
width: 16rpx;
height: 16rpx;
background: #2D81FF;
border-radius: 50%;
margin-right: 10rpx;
}
.bj_paiw{
width: 16rpx;
height: 16rpx;
background: #FF9A18;
border-radius: 50%;
margin-right: 10rpx;
}
.bj_painum{
font-size: 28rpx;
color: #545D71;
}
.icon{
font-size: 18rpx;
color: #ddd;
margin-left: 10rpx;
}
}
}
}
.xygk{
width: 100%;
display: flex;
flex-wrap: wrap;
.gk_li{
width: 333rpx;
height: 132rpx;
background: #FFFFFF;
border-radius: 20rpx;
display: flex;
align-items: center;
padding: 28rpx;
padding-right: 10rpx;
font-size: 30rpx;
margin-right: 28rpx;
&:nth-child(2n){
margin-right: 0;
}
&:nth-child(n+3){
margin-top: 28rpx;
}
image{
width: 68rpx;
height: 76rpx;
margin-right: 15rpx;
position: relative;
top: 4rpx;
}
}
}
.rxmd_list{
width: 100%;
background: #FFFFFF;
border-radius: 10rpx;
.rxmd_li{
width: 100%;
height: 94rpx;
padding: 0 28rpx;
display: flex;
align-items: center;
color: #545D71;
&+.rxmd_li{
border-top: 1px solid #eee;
}
.rxmd_li_name{
// padding: 0 14rpx;
width: 160rpx;
font-size: 30rpx;
// padding-right: 10rpx;
text{
max-width: 120rpx;
font-size: 30rpx;
line-height: 34rpx;
height: 34rpx;
}
image{
width: 28rpx;
height: 28rpx;
margin-left: 12rpx;
flex: none;
}
}
.rxmd_li_id{
font-size: 30rpx;
letter-spacing: 0;
// padding: 0 14rpx;
padding-left: 10rpx;
}
.rxmd_li_time{
font-size: 28rpx;
letter-spacing: 0;
}
}
}
</style>