|
|
@@ -6,9 +6,9 @@ $('.btn_time').click(function(e) {
|
|
6
|
6
|
$('.timeTraffic').css('display', 'inline-block')
|
|
7
|
7
|
$('#traffic').css('display', 'none')
|
|
8
|
8
|
$('#timeTraffic').css('display', 'block')
|
|
9
|
|
- $(this).siblings(".act").children("label").attr("indexTitle","日话务数据统计1")
|
|
10
|
|
-
|
|
11
|
|
-// $(".act").attr("indexTitle","日话务数据统计1")
|
|
|
9
|
+ $(this).siblings(".act").children("label").attr("indexTitle", "日话务数据统计1")
|
|
|
10
|
+
|
|
|
11
|
+ // $(".act").attr("indexTitle","日话务数据统计1")
|
|
12
|
12
|
$('.call_situation h2').text('话务数据统计')
|
|
13
|
13
|
trafficDataChart('timeTraffic', ['登陆坐席数量1', '呼叫排队数量1', '话务量1', '呼入接通量1'], callDate, callDate[0])
|
|
14
|
14
|
trafficState = 0
|
|
|
@@ -23,78 +23,72 @@ function trafficDataChart(dom, data, count, count1, rotate = 0) {
|
|
23
|
23
|
window.onresize = function() {
|
|
24
|
24
|
hotThings.resize()
|
|
25
|
25
|
}
|
|
26
|
|
-
|
|
27
|
26
|
const labelOption = {
|
|
28
|
27
|
show: true,
|
|
29
|
|
-rotate: 90,
|
|
30
|
|
- align: 'left',
|
|
31
|
|
- verticalAlign: 'middle',
|
|
32
|
|
- position: 'insideBottom',
|
|
33
|
|
- //distance: 15,
|
|
34
|
|
- //formatter: '{c} {name|{a}}',
|
|
35
|
|
-
|
|
36
|
|
- formatter: () => {
|
|
37
|
|
- console.log('{c}' ,'c')
|
|
38
|
|
- },
|
|
39
|
|
-
|
|
40
|
|
- //fontSize: 16,
|
|
41
|
|
- rich: {
|
|
42
|
|
- name: {}
|
|
43
|
|
- }
|
|
44
|
|
-// normal: {
|
|
45
|
|
-// formatter: function(params) {
|
|
46
|
|
-// // 可以打印自己看一下, 其实params就是每根柱子的对象
|
|
47
|
|
-// console.info(params);
|
|
48
|
|
-// var html = '';
|
|
49
|
|
-// if (params.value > 0) {
|
|
50
|
|
-// // 千万不要html += '';
|
|
51
|
|
-// html = params.value + '次 ' + params.seriesName;
|
|
52
|
|
-// return html;
|
|
53
|
|
-// }
|
|
54
|
|
-// // 没有数据的返回'' 不是返回0
|
|
55
|
|
-// return html;
|
|
56
|
|
-// },
|
|
57
|
|
-// }
|
|
|
28
|
+ rotate: 90,
|
|
|
29
|
+ align: 'left',
|
|
|
30
|
+ verticalAlign: 'middle',
|
|
|
31
|
+ position: 'insideBottom',
|
|
|
32
|
+ //distance: 15,
|
|
|
33
|
+ //formatter: '{c} {name|{a}}',
|
|
|
34
|
+ formatter: () => {
|
|
|
35
|
+ console.log('{c}', 'c')
|
|
|
36
|
+ },
|
|
|
37
|
+ //fontSize: 16,
|
|
|
38
|
+ rich: {
|
|
|
39
|
+ name: {}
|
|
|
40
|
+ }
|
|
|
41
|
+ // normal: {
|
|
|
42
|
+ // formatter: function(params) {
|
|
|
43
|
+ // // 可以打印自己看一下, 其实params就是每根柱子的对象
|
|
|
44
|
+ // console.info(params);
|
|
|
45
|
+ // var html = '';
|
|
|
46
|
+ // if (params.value > 0) {
|
|
|
47
|
+ // // 千万不要html += '';
|
|
|
48
|
+ // html = params.value + '次 ' + params.seriesName;
|
|
|
49
|
+ // return html;
|
|
|
50
|
+ // }
|
|
|
51
|
+ // // 没有数据的返回'' 不是返回0
|
|
|
52
|
+ // return html;
|
|
|
53
|
+ // },
|
|
|
54
|
+ // }
|
|
58
|
55
|
};
|
|
59
|
|
-
|
|
|
56
|
+
|
|
60
|
57
|
option = {
|
|
61
|
|
-// tooltip: {
|
|
62
|
|
-// trigger: 'axis',
|
|
63
|
|
-// axisPointer: {
|
|
64
|
|
-// type: 'shadow'
|
|
65
|
|
-// },
|
|
66
|
|
-// },
|
|
|
58
|
+ // tooltip: {
|
|
|
59
|
+ // trigger: 'axis',
|
|
|
60
|
+ // axisPointer: {
|
|
|
61
|
+ // type: 'shadow'
|
|
|
62
|
+ // },
|
|
|
63
|
+ // },
|
|
67
|
64
|
tooltip: {
|
|
68
|
65
|
trigger: 'item',
|
|
69
|
|
-// trigger: 'axis',
|
|
70
|
|
- show: true,
|
|
71
|
|
- // 进行数据处理
|
|
72
|
|
- formatter: function (params) {
|
|
73
|
|
- console.log(params, 'params')
|
|
74
|
|
- var html = '';
|
|
75
|
|
- if (params.value > 0) {
|
|
76
|
|
-
|
|
77
|
|
- html += params.marker;
|
|
78
|
|
- if (params.name.indexOf('率') >=0) {
|
|
79
|
|
- html += params.seriesName + ': ' + params.value + '%<br/>';
|
|
80
|
|
- } else {
|
|
81
|
|
- html += params.seriesName + ': ' + params.value + '<br/>';
|
|
82
|
|
- }
|
|
83
|
|
-
|
|
84
|
|
- }
|
|
85
|
|
-
|
|
86
|
|
- return html;
|
|
87
|
|
- }
|
|
|
66
|
+ // trigger: 'axis',
|
|
|
67
|
+ show: true,
|
|
|
68
|
+ // 进行数据处理
|
|
|
69
|
+ formatter: function(params) {
|
|
|
70
|
+ console.log(params, 'params')
|
|
|
71
|
+ var html = '';
|
|
|
72
|
+ if(params.value > 0) {
|
|
|
73
|
+ html += params.marker;
|
|
|
74
|
+ if(params.name.indexOf('率') >= 0) {
|
|
|
75
|
+ html += params.seriesName + ': ' + params.value + '%<br/>';
|
|
|
76
|
+ } else {
|
|
|
77
|
+ html += params.seriesName + ': ' + params.value + '<br/>';
|
|
|
78
|
+ }
|
|
|
79
|
+ }
|
|
|
80
|
+ return html;
|
|
|
81
|
+ }
|
|
88
|
82
|
},
|
|
89
|
|
-// legend: {
|
|
90
|
|
-// textStyle: {
|
|
91
|
|
-// fontSize: 12, //字体大小
|
|
92
|
|
-// color: '#ffffff' //字体颜色
|
|
93
|
|
-// },
|
|
94
|
|
-// lineStyle: {
|
|
95
|
|
-// color: '#ffffff'
|
|
96
|
|
-// }
|
|
97
|
|
-// },
|
|
|
83
|
+ // legend: {
|
|
|
84
|
+ // textStyle: {
|
|
|
85
|
+ // fontSize: 12, //字体大小
|
|
|
86
|
+ // color: '#ffffff' //字体颜色
|
|
|
87
|
+ // },
|
|
|
88
|
+ // lineStyle: {
|
|
|
89
|
+ // color: '#ffffff'
|
|
|
90
|
+ // }
|
|
|
91
|
+ // },
|
|
98
|
92
|
grid: {
|
|
99
|
93
|
left: '3%',
|
|
100
|
94
|
right: '4%',
|
|
|
@@ -103,137 +97,90 @@ rotate: 90,
|
|
103
|
97
|
},
|
|
104
|
98
|
xAxis: [{
|
|
105
|
99
|
type: 'category',
|
|
106
|
|
- axisLine:{
|
|
107
|
|
- lineStyle:{
|
|
108
|
|
- color:'#ffffff'
|
|
|
100
|
+ axisLine: {
|
|
|
101
|
+ lineStyle: {
|
|
|
102
|
+ color: '#ffffff'
|
|
109
|
103
|
}
|
|
110
|
104
|
},
|
|
111
|
105
|
axisLabel: {
|
|
112
|
106
|
show: true,
|
|
113
|
107
|
rotate: -30, // 角度值:Number
|
|
114
|
|
- fontSize: 11, // 顺便调小一点字体大小
|
|
|
108
|
+ fontSize: 11, // 顺便调小一点字体大小
|
|
115
|
109
|
textStyle: {
|
|
116
|
110
|
color: '#ffffff'
|
|
117
|
111
|
}
|
|
118
|
112
|
},
|
|
119
|
|
- data: ['呼入量', '接通量', '呼入接通率', '呼出量', '呼出接通量', '呼出接通率']
|
|
|
113
|
+ data: ['呼入量\r\n 接通量', '呼入接通率', '呼出量\r\n 呼出接通量', '呼出接通率']
|
|
120
|
114
|
}],
|
|
121
|
|
-// tooltip: {
|
|
122
|
|
-// show: true,
|
|
123
|
|
-// },
|
|
124
|
|
- yAxis: [
|
|
125
|
|
- {
|
|
126
|
|
- type: 'value',
|
|
127
|
|
- axisLine:{
|
|
128
|
|
- lineStyle:{
|
|
129
|
|
- color:'#ffffff'
|
|
130
|
|
- }
|
|
|
115
|
+ yAxis: [{
|
|
|
116
|
+ type: 'value',
|
|
|
117
|
+ axisLine: {
|
|
|
118
|
+ lineStyle: {
|
|
|
119
|
+ color: '#ffffff'
|
|
|
120
|
+ }
|
|
|
121
|
+ },
|
|
|
122
|
+ // interval: 5,
|
|
|
123
|
+ // splitLine:{ show:false} ,
|
|
|
124
|
+ // axisLine: {show: false},
|
|
|
125
|
+ // axisTick: {show: false}
|
|
131
|
126
|
},
|
|
132
|
|
-// interval: 5,
|
|
133
|
|
-// splitLine:{ show:false} ,
|
|
134
|
|
-// axisLine: {show: false},
|
|
135
|
|
-// axisTick: {show: false}
|
|
136
|
|
- },
|
|
137
|
|
- {
|
|
138
|
|
- type: 'value',
|
|
139
|
|
- axisLine:{
|
|
140
|
|
- lineStyle:{
|
|
141
|
|
- color:'#ffffff'
|
|
|
127
|
+ {
|
|
|
128
|
+ type: 'value',
|
|
|
129
|
+ axisLine: {
|
|
|
130
|
+ lineStyle: {
|
|
|
131
|
+ color: '#ffffff'
|
|
|
132
|
+ }
|
|
|
133
|
+ },
|
|
|
134
|
+ splitLine: {
|
|
|
135
|
+ show: false
|
|
|
136
|
+ },
|
|
|
137
|
+ min: 0,
|
|
|
138
|
+ max: 100,
|
|
|
139
|
+ axisLabel: {
|
|
|
140
|
+ formatter: '{value} 100%'
|
|
142
|
141
|
}
|
|
143
|
|
- },
|
|
144
|
|
-// interval: 5,
|
|
145
|
|
- splitLine:{ show:false} ,
|
|
146
|
|
- min: 0,
|
|
147
|
|
- max: 100,
|
|
148
|
|
- axisLabel: {
|
|
149
|
|
- formatter: '{value} 100%'
|
|
150
|
|
- }
|
|
151
|
|
- }
|
|
|
142
|
+ }
|
|
152
|
143
|
],
|
|
153
|
144
|
series: [{
|
|
154
|
145
|
name: '呼入量',
|
|
155
|
146
|
type: 'bar',
|
|
156
|
|
- stack: 'A',
|
|
157
|
|
- barWidth : 15,
|
|
158
|
|
- label: labelOption,
|
|
159
|
|
- data: [320,0,0,0,0,0]
|
|
160
|
|
- },
|
|
161
|
|
- {
|
|
162
|
|
- name: '未接通回拨量',
|
|
163
|
|
- type: 'bar',
|
|
164
|
|
- stack: 'A',
|
|
165
|
|
- barWidth : 15,
|
|
166
|
|
- label: labelOption,
|
|
167
|
|
- data: [0,20,0,0,0,0]
|
|
168
|
|
- },
|
|
169
|
|
- {
|
|
170
|
|
- name: '自助接听量',
|
|
171
|
|
- type: 'bar',
|
|
172
|
|
- stack: 'A',
|
|
173
|
|
- barWidth : 15,
|
|
174
|
|
- label: labelOption,
|
|
175
|
|
- data: [0,80,0,0,0,0]
|
|
176
|
|
- },
|
|
177
|
|
- {
|
|
178
|
|
- name: '人工接通量',
|
|
179
|
|
- type: 'bar',
|
|
180
|
|
- stack: 'A',
|
|
181
|
|
- barWidth : 15,
|
|
|
147
|
+ barGap: 0,
|
|
182
|
148
|
label: labelOption,
|
|
183
|
|
- data: [0,220,0,0,0,0]
|
|
|
149
|
+ emphasis: {
|
|
|
150
|
+ focus: 'series'
|
|
|
151
|
+ },
|
|
|
152
|
+ data: [320, 332, 301, 334]
|
|
184
|
153
|
},
|
|
185
|
154
|
{
|
|
186
|
|
- name: '回拨率',
|
|
187
|
|
- type: 'bar',
|
|
188
|
|
- stack: 'A',
|
|
189
|
|
- yAxisIndex: 1,
|
|
190
|
|
- barWidth : 15,
|
|
191
|
|
- label: labelOption,
|
|
192
|
|
- data: [0,0,20,0,0,0]
|
|
193
|
|
- },
|
|
194
|
|
- {
|
|
195
|
|
- name: '自助率',
|
|
196
|
|
- type: 'bar',
|
|
197
|
|
- stack: 'A',
|
|
198
|
|
- yAxisIndex: 1,
|
|
199
|
|
- barWidth : 15,
|
|
200
|
|
- label: labelOption,
|
|
201
|
|
- data: [0,0,30,0,0,0]
|
|
202
|
|
- },
|
|
203
|
|
- {
|
|
204
|
|
- name: '人工率',
|
|
205
|
|
- type: 'bar',
|
|
206
|
|
- stack: 'A',
|
|
207
|
|
- yAxisIndex: 1,
|
|
208
|
|
- barWidth : 15,
|
|
209
|
|
- label: labelOption,
|
|
210
|
|
- data: [0,0,50,0,0,0]
|
|
211
|
|
- },
|
|
212
|
|
- {
|
|
213
|
|
- name: '呼出量',
|
|
214
|
|
- type: 'bar',
|
|
215
|
|
- stack: 'A',
|
|
216
|
|
- barWidth : 15,
|
|
217
|
|
- label: labelOption,
|
|
218
|
|
- data: [0,0,0,150,0,0]
|
|
219
|
|
- },
|
|
220
|
|
- {
|
|
221
|
|
- name: '呼出接通量',
|
|
222
|
|
- type: 'bar',
|
|
223
|
|
- stack: 'A',
|
|
224
|
|
- barWidth : 15,
|
|
225
|
|
- label: labelOption,
|
|
226
|
|
- data: [0,0,0,0,150,0]
|
|
227
|
|
- },
|
|
228
|
|
- {
|
|
229
|
|
- name: '呼出接通率',
|
|
230
|
|
- type: 'bar',
|
|
231
|
|
- stack: 'A',
|
|
232
|
|
- yAxisIndex: 1,
|
|
233
|
|
- barWidth :15,
|
|
234
|
|
- label: labelOption,
|
|
235
|
|
- data: [0,0,0,0,0,99]
|
|
236
|
|
- },
|
|
|
155
|
+ name: '未接通回拨量',
|
|
|
156
|
+ type: 'bar',
|
|
|
157
|
+ stack: 'Ad',
|
|
|
158
|
+ label: labelOption,
|
|
|
159
|
+ emphasis: {
|
|
|
160
|
+ focus: 'series'
|
|
|
161
|
+ },
|
|
|
162
|
+ data: [120, 0, 191, 0]
|
|
|
163
|
+ },
|
|
|
164
|
+ {
|
|
|
165
|
+ name: '自助接通量',
|
|
|
166
|
+ type: 'bar',
|
|
|
167
|
+ stack: 'Ad',
|
|
|
168
|
+ label: labelOption,
|
|
|
169
|
+ emphasis: {
|
|
|
170
|
+ focus: 'series'
|
|
|
171
|
+ },
|
|
|
172
|
+ data: [220, 0, 0, 0]
|
|
|
173
|
+ },
|
|
|
174
|
+ {
|
|
|
175
|
+ name: '人工接通',
|
|
|
176
|
+ type: 'bar',
|
|
|
177
|
+ stack: 'Ad',
|
|
|
178
|
+ label: labelOption,
|
|
|
179
|
+ emphasis: {
|
|
|
180
|
+ focus: 'series'
|
|
|
181
|
+ },
|
|
|
182
|
+ data: [150, 0, 0, 0]
|
|
|
183
|
+ }
|
|
237
|
184
|
]
|
|
238
|
185
|
};
|
|
239
|
186
|
hotThings.setOption(option);
|