behaviorAnalysis.js
3.54 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
import api from '~/api/crew/index'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/'
Component({
properties: {
detailInfo: {
type: Object,
value: {},
observer: function(n) {
this.getData()
}
},
},
data: {
IMG_URL,
merchantName: '深圳南山问界4S店深圳南山问界4S店深圳南山问界4S店',
attendanceItems: [
{ label: '打卡天数', key: 'checkInDays' },
{ label: '迟到', key: 'late', valueClass: 'danger' },
{ label: '早退', key: 'earlyLeave', valueClass: 'danger' },
{ label: '旷工', key: 'absenteeism', valueClass: 'danger' }
],
dailyReportItems: [
{ label: '已提交', key: 'submitted', subLabel: '日报完成率', subKey:'completionRate', subClass: 'success' },
{ label: '未提交', key: 'notSubmitted' },
{ label: '在岗', key: 'onDuty' },
{ label: '调休', key: 'rest' }
],
receptionItems: [
{ label: '实际交车数', key: 'actualDelivery' },
{ label: '接待数量', key: 'receptionCount' },
{ label: '未触客数', key: 'notTouched' }
],
weakTags: [
{ label: '身份介绍:差', type: 'danger' },
{ label: '场景塑造:差', type: 'danger' },
{ label: '案例展示:差', type: 'danger' }
],
otherTags: [
{ label: '逼单能力:一般', type: 'default' },
{ label: '话题介入:一般', type: 'default' },
{ label: '攻防能力:一般', type: 'default' },
{ label: '服务意识:一般', type: 'default' },
{ label: '专业知识:好', type: 'success' }
],
recordStatsRows: [
[
{ label: '录音', key: 'recordingCount' },
{ label: '成交数', key: 'dealCount' },
{ label: '战败数', key: 'defeatCount' },
{ label: '成交率', key: 'dealRate' }
],
[
{ label: '质检平均分', key: 'qualityScore' },
{ label: '攻防平均分', key: 'attackDefenseScore' },
{ label: '录音缺失率', key: 'recordingMissingRate' }
]
],
dressWarningItems: [{ label: '预警次数', key: 'warningCount' }],
behaviorInfo: {}
},
methods: {
search(e) {
this.setData({
startStr: e.detail.startDay?.replace(/\//g, '-'),
endStr: e.detail.endDay?.replace(/\//g, '-')
}, () => {
this.getData()
})
},
getData() {
let { detailInfo } = this.data
// 假数据
let data = {
attendance: {
checkInDays: 20,
late: 1,
earlyLeave: 5,
absenteeism: 5
},
dailyReport: {
submitted: 5,
notSubmitted: 8,
onDuty: 6,
rest: 8,
completionRate: 95
},
customerReception: {
actualDelivery: 10,
receptionCount: 2,
notTouched: 8
},
recordingAnalysis: {
behaviorTags: [],
quantitativeIndicators: {
recordingCount: 20,
dealCount: 5,
defeatCount: 3,
dealRate: 15,
qualityScore: 8,
attackDefenseScore: 11,
recordingMissingRate: 20
}
},
dressCodeWarning: {
warningCount: 8
}
}
this.setData({
behaviorInfo: data
})
let params = {
employeeId: detailInfo.employeeId,
scene: detailInfo.scene
}
api.getEmployeebehaviorData(params)
},
handleChangeMerchant() {
this.triggerEvent('changeMerchant')
},
handleChangeMerchant(e) {
let merchantId = 123
this.setData({
showSelectPopup: true,
selectOptions: [{merchantId: 123, merchantName: '明明4s店1'}],
selectValue: [merchantId]
})
},
handlePopupConfirm(e) {
let { values, items } = e.detail
console.log(values)
},
hideSelectPopup() {
this.setData({
showSelectPopup: false
})
},
},
})