|
|
@@ -1,7 +1,9 @@
|
|
1
|
|
-trafficDataChart('timeTraffic', daySeatName, callDate, callDate[0])
|
|
|
1
|
+//trafficDataChart('timeTraffic', daySeatName, callDate, callDate[0])
|
|
|
2
|
+getworkOrder()
|
|
2
|
3
|
$('.btn_time').click(function(e) {
|
|
3
|
4
|
if(e.target.tagName == 'SPAN') {
|
|
4
|
5
|
if($(e.target).attr('data-state') == '1') {
|
|
|
6
|
+ $(".hwsjtj").hide()
|
|
5
|
7
|
$('.daySeat').css('display', 'none')
|
|
6
|
8
|
$('.timeTraffic').css('display', 'inline-block')
|
|
7
|
9
|
$('#traffic').css('display', 'none')
|
|
|
@@ -10,14 +12,28 @@ $('.btn_time').click(function(e) {
|
|
10
|
12
|
|
|
11
|
13
|
// $(".act").attr("indexTitle","日话务数据统计1")
|
|
12
|
14
|
$('.call_situation h2').text('话务数据统计')
|
|
13
|
|
- trafficDataChart('timeTraffic', ['登陆坐席数量1', '呼叫排队数量1', '话务量1', '呼入接通量1'], callDate, callDate[0])
|
|
|
15
|
+ getworkOrder()
|
|
14
|
16
|
trafficState = 0
|
|
15
|
17
|
}
|
|
16
|
18
|
}
|
|
17
|
19
|
e.stopPropagation();
|
|
18
|
20
|
})
|
|
19
|
|
-
|
|
20
|
|
-function trafficDataChart(dom, data, count, count1, rotate = 0) {
|
|
|
21
|
+function getworkOrder() {
|
|
|
22
|
+ let workOrderData = [];
|
|
|
23
|
+ let workOrderName = []
|
|
|
24
|
+ new doAjax({
|
|
|
25
|
+ url: huayi.config.callcenter_url + "/InfoNew/GetTelCountByNow",
|
|
|
26
|
+ data: {
|
|
|
27
|
+ timetype:telCountByNowType
|
|
|
28
|
+ },
|
|
|
29
|
+ callBack: function (res) {
|
|
|
30
|
+ var data = res.data.hw[0]
|
|
|
31
|
+ console.log(data)
|
|
|
32
|
+ trafficDataChart(data)
|
|
|
33
|
+ }
|
|
|
34
|
+ });
|
|
|
35
|
+}
|
|
|
36
|
+function trafficDataChart(getdata) {
|
|
21
|
37
|
let hotThings = echarts.init(document.getElementById("timeTraffic"));
|
|
22
|
38
|
console.log(hotThings)
|
|
23
|
39
|
window.onresize = function() {
|
|
|
@@ -25,45 +41,27 @@ function trafficDataChart(dom, data, count, count1, rotate = 0) {
|
|
25
|
41
|
}
|
|
26
|
42
|
const labelOption = {
|
|
27
|
43
|
show: true,
|
|
28
|
|
- rotate: 90,
|
|
29
|
|
- align: 'left',
|
|
|
44
|
+ rotate: 0,
|
|
|
45
|
+ align: 'center',
|
|
30
|
46
|
verticalAlign: 'middle',
|
|
31
|
|
- position: 'insideBottom',
|
|
|
47
|
+ position: 'inside',
|
|
32
|
48
|
//distance: 15,
|
|
33
|
|
- //formatter: '{c} {name|{a}}',
|
|
34
|
|
- formatter: () => {
|
|
35
|
|
- console.log('{c}', 'c')
|
|
|
49
|
+ formatter: function(params) {
|
|
|
50
|
+ if (params.value > 0) {
|
|
|
51
|
+ return params.value;
|
|
|
52
|
+ } else {
|
|
|
53
|
+ return ' ';
|
|
|
54
|
+ }
|
|
36
|
55
|
},
|
|
37
|
|
- //fontSize: 16,
|
|
|
56
|
+ fontSize: 12,
|
|
38
|
57
|
rich: {
|
|
39
|
58
|
name: {}
|
|
40
|
59
|
}
|
|
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
|
|
- // }
|
|
55
|
60
|
};
|
|
56
|
61
|
|
|
57
|
62
|
option = {
|
|
58
|
|
- // tooltip: {
|
|
59
|
|
- // trigger: 'axis',
|
|
60
|
|
- // axisPointer: {
|
|
61
|
|
- // type: 'shadow'
|
|
62
|
|
- // },
|
|
63
|
|
- // },
|
|
64
|
63
|
tooltip: {
|
|
65
|
64
|
trigger: 'item',
|
|
66
|
|
- // trigger: 'axis',
|
|
67
|
65
|
show: true,
|
|
68
|
66
|
// 进行数据处理
|
|
69
|
67
|
formatter: function(params) {
|
|
|
@@ -80,15 +78,6 @@ function trafficDataChart(dom, data, count, count1, rotate = 0) {
|
|
80
|
78
|
return html;
|
|
81
|
79
|
}
|
|
82
|
80
|
},
|
|
83
|
|
- // legend: {
|
|
84
|
|
- // textStyle: {
|
|
85
|
|
- // fontSize: 12, //字体大小
|
|
86
|
|
- // color: '#ffffff' //字体颜色
|
|
87
|
|
- // },
|
|
88
|
|
- // lineStyle: {
|
|
89
|
|
- // color: '#ffffff'
|
|
90
|
|
- // }
|
|
91
|
|
- // },
|
|
92
|
81
|
grid: {
|
|
93
|
82
|
left: '3%',
|
|
94
|
83
|
right: '4%',
|
|
|
@@ -106,11 +95,17 @@ function trafficDataChart(dom, data, count, count1, rotate = 0) {
|
|
106
|
95
|
show: true,
|
|
107
|
96
|
rotate: -30, // 角度值:Number
|
|
108
|
97
|
fontSize: 11, // 顺便调小一点字体大小
|
|
|
98
|
+ padding: [0, 0, 0, -15],
|
|
109
|
99
|
textStyle: {
|
|
110
|
100
|
color: '#ffffff'
|
|
111
|
|
- }
|
|
|
101
|
+ },
|
|
|
102
|
+// formatter: function (value) {
|
|
|
103
|
+// //x轴的文字改为竖版显示
|
|
|
104
|
+// var str = value.split("");
|
|
|
105
|
+// return str.join("\n");
|
|
|
106
|
+// }
|
|
112
|
107
|
},
|
|
113
|
|
- data: ['呼入量\r\n 接通量', '呼入接通率', '呼出量\r\n 呼出接通量', '呼出接通率']
|
|
|
108
|
+ data: [' 接通量 \n\n呼入量', '\n呼入接通率', ' 呼出接通量\n\n呼出量', '\n呼出接通率']
|
|
114
|
109
|
}],
|
|
115
|
110
|
yAxis: [{
|
|
116
|
111
|
type: 'value',
|
|
|
@@ -137,7 +132,7 @@ function trafficDataChart(dom, data, count, count1, rotate = 0) {
|
|
137
|
132
|
min: 0,
|
|
138
|
133
|
max: 100,
|
|
139
|
134
|
axisLabel: {
|
|
140
|
|
- formatter: '{value} 100%'
|
|
|
135
|
+ formatter: '{value} %'
|
|
141
|
136
|
}
|
|
142
|
137
|
}
|
|
143
|
138
|
],
|
|
|
@@ -146,41 +141,115 @@ function trafficDataChart(dom, data, count, count1, rotate = 0) {
|
|
146
|
141
|
type: 'bar',
|
|
147
|
142
|
barGap: 0,
|
|
148
|
143
|
label: labelOption,
|
|
|
144
|
+ barWidth : 15,
|
|
149
|
145
|
emphasis: {
|
|
150
|
146
|
focus: 'series'
|
|
151
|
147
|
},
|
|
152
|
|
- data: [320, 332, 301, 334]
|
|
|
148
|
+ data: [getdata.hwcount, 0, 0, 0]
|
|
153
|
149
|
},
|
|
154
|
150
|
{
|
|
|
151
|
+ name: '人工接通',
|
|
|
152
|
+ type: 'bar',
|
|
|
153
|
+ stack: 'Ad',
|
|
|
154
|
+ barWidth : 15,
|
|
|
155
|
+ label: labelOption,
|
|
|
156
|
+ emphasis: {
|
|
|
157
|
+ focus: 'series'
|
|
|
158
|
+ },
|
|
|
159
|
+ data: [getdata.jtcount, 0, 0, 0]
|
|
|
160
|
+ },
|
|
|
161
|
+ {
|
|
|
162
|
+ name: '自助接通量',
|
|
|
163
|
+ type: 'bar',
|
|
|
164
|
+ stack: 'Ad',
|
|
|
165
|
+ barWidth : 15,
|
|
|
166
|
+ label: labelOption,
|
|
|
167
|
+ emphasis: {
|
|
|
168
|
+ focus: 'series'
|
|
|
169
|
+ },
|
|
|
170
|
+ data: [getdata.zzcount, 0, 0, 0]
|
|
|
171
|
+ },
|
|
|
172
|
+ {
|
|
155
|
173
|
name: '未接通回拨量',
|
|
156
|
174
|
type: 'bar',
|
|
157
|
175
|
stack: 'Ad',
|
|
|
176
|
+ barWidth : 15,
|
|
158
|
177
|
label: labelOption,
|
|
159
|
178
|
emphasis: {
|
|
160
|
179
|
focus: 'series'
|
|
161
|
180
|
},
|
|
162
|
|
- data: [120, 0, 191, 0]
|
|
|
181
|
+ data: [getdata.hbcount, 0, 0, 0]
|
|
163
|
182
|
},
|
|
|
183
|
+
|
|
164
|
184
|
{
|
|
165
|
|
- name: '自助接通量',
|
|
|
185
|
+ name: '回拨率',
|
|
166
|
186
|
type: 'bar',
|
|
167
|
|
- stack: 'Ad',
|
|
|
187
|
+ stack: 'B',
|
|
|
188
|
+ barWidth : 15,
|
|
|
189
|
+ yAxisIndex: 1,
|
|
168
|
190
|
label: labelOption,
|
|
169
|
191
|
emphasis: {
|
|
170
|
192
|
focus: 'series'
|
|
171
|
193
|
},
|
|
172
|
|
- data: [220, 0, 0, 0]
|
|
|
194
|
+ data: [0, getdata.hbbili, 0, 0]
|
|
173
|
195
|
},
|
|
174
|
196
|
{
|
|
175
|
|
- name: '人工接通',
|
|
|
197
|
+ name: '自助率',
|
|
176
|
198
|
type: 'bar',
|
|
177
|
|
- stack: 'Ad',
|
|
|
199
|
+ stack: 'B',
|
|
|
200
|
+ barWidth : 15,
|
|
|
201
|
+ yAxisIndex: 1,
|
|
|
202
|
+ label: labelOption,
|
|
|
203
|
+ emphasis: {
|
|
|
204
|
+ focus: 'series'
|
|
|
205
|
+ },
|
|
|
206
|
+ data: [0, getdata.zzbili, 0, 0]
|
|
|
207
|
+ },
|
|
|
208
|
+ {
|
|
|
209
|
+ name: '接通率',
|
|
|
210
|
+ type: 'bar',
|
|
|
211
|
+ stack: 'B',
|
|
|
212
|
+ barWidth : 15,
|
|
|
213
|
+ yAxisIndex: 1,
|
|
|
214
|
+ label: labelOption,
|
|
|
215
|
+ emphasis: {
|
|
|
216
|
+ focus: 'series'
|
|
|
217
|
+ },
|
|
|
218
|
+ data: [0, getdata.jtbili, 0, 0]
|
|
|
219
|
+ },
|
|
|
220
|
+ {
|
|
|
221
|
+ name: '呼出数量',
|
|
|
222
|
+ type: 'bar',
|
|
|
223
|
+ barWidth : 15,
|
|
|
224
|
+ label: labelOption,
|
|
|
225
|
+ emphasis: {
|
|
|
226
|
+ focus: 'series'
|
|
|
227
|
+ },
|
|
|
228
|
+ data: [0, 0, getdata.hccount, 0]
|
|
|
229
|
+ },
|
|
|
230
|
+ {
|
|
|
231
|
+ name: '呼出接通量',
|
|
|
232
|
+ type: 'bar',
|
|
|
233
|
+ barWidth : 15,
|
|
|
234
|
+ label: labelOption,
|
|
|
235
|
+ emphasis: {
|
|
|
236
|
+ focus: 'series'
|
|
|
237
|
+ },
|
|
|
238
|
+ data: [0, 0, getdata.hcjtcount,0]
|
|
|
239
|
+ },
|
|
|
240
|
+ {
|
|
|
241
|
+ name: '呼出接通率',
|
|
|
242
|
+ type: 'bar',
|
|
|
243
|
+ barWidth : 15,
|
|
|
244
|
+ yAxisIndex: 1,
|
|
178
|
245
|
label: labelOption,
|
|
179
|
246
|
emphasis: {
|
|
180
|
247
|
focus: 'series'
|
|
181
|
248
|
},
|
|
182
|
|
- data: [150, 0, 0, 0]
|
|
|
249
|
+ data: [0, 0, 0, getdata.jtbili]
|
|
183
|
250
|
}
|
|
|
251
|
+
|
|
|
252
|
+
|
|
184
|
253
|
]
|
|
185
|
254
|
};
|
|
186
|
255
|
hotThings.setOption(option);
|