trainingExperience.js
1.26 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
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/'
Component({
properties: {
detailInfo: {
type: Object,
value: {},
},
},
data: {
IMG_URL,
topStats: [
{ label: '学习时长', value: 20 },
{ label: '完成课程数', value: 22 },
{ label: '带教次数', value: 2 }
],
tabs: [
{ key: 'course', label: '课程学习' },
{ key: 'coach', label: '督导带教' }
],
activeTab: 'course',
courseList: [
{
id: 1,
title: '客情维护客户画像的重要性',
completedAt: '2026-03-01 12:56:37'
},
{
id: 2,
title: '客情维护客户画像的重要性',
completedAt: '2026-03-01 12:56:37'
}
],
coachList: [
{
id: 1,
title: '督导带教',
coachedAt: '2026-03-01 12:56:37'
},
{
id: 2,
title: '督导带教',
coachedAt: '2026-03-01 12:56:37'
}
]
},
methods: {
search(e) {
this.triggerEvent('search', e?.detail || {})
},
onTabTap(e) {
const { key } = e.currentTarget.dataset || {}
if (!key || key === this.data.activeTab) return
this.setData({ activeTab: key })
},
onViewItem(e) {
const { type, item } = e.currentTarget.dataset || {}
this.triggerEvent('view', { type, item })
}
},
})