|
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+mui.init({
|
|
|
2
|
+ swipeBack: false,
|
|
|
3
|
+})
|
|
|
4
|
+
|
|
|
5
|
+mui.ready(function() {
|
|
|
6
|
+ var selectType = 0
|
|
|
7
|
+
|
|
|
8
|
+ // 投诉类型饼图
|
|
|
9
|
+ const complaintPie = echarts.init(document.getElementById('complaintPie'));
|
|
|
10
|
+ let pieOption = {
|
|
|
11
|
+ animation: false,
|
|
|
12
|
+ tooltip: {
|
|
|
13
|
+ trigger: 'none'
|
|
|
14
|
+ },
|
|
|
15
|
+ legend: {
|
|
|
16
|
+ show: false
|
|
|
17
|
+ },
|
|
|
18
|
+ series: [{
|
|
|
19
|
+ type: 'pie',
|
|
|
20
|
+ radius: ['30%', '60%'],
|
|
|
21
|
+ center: ['50%', '50%'],
|
|
|
22
|
+ data: [{
|
|
|
23
|
+ value: 0,
|
|
|
24
|
+ name: '破袋发霉',
|
|
|
25
|
+ itemStyle: {
|
|
|
26
|
+ color: '#5470c6'
|
|
|
27
|
+ }
|
|
|
28
|
+ },
|
|
|
29
|
+ {
|
|
|
30
|
+ value: 0,
|
|
|
31
|
+ name: '杂质异物',
|
|
|
32
|
+ itemStyle: {
|
|
|
33
|
+ color: '#91cc75'
|
|
|
34
|
+ }
|
|
|
35
|
+ },
|
|
|
36
|
+ {
|
|
|
37
|
+ value: 0,
|
|
|
38
|
+ name: '变质异味',
|
|
|
39
|
+ itemStyle: {
|
|
|
40
|
+ color: '#fac858'
|
|
|
41
|
+ }
|
|
|
42
|
+ }
|
|
|
43
|
+ ],
|
|
|
44
|
+ label: {
|
|
|
45
|
+ show: false
|
|
|
46
|
+ }
|
|
|
47
|
+ }]
|
|
|
48
|
+ };
|
|
|
49
|
+ complaintPie.setOption(pieOption);
|
|
|
50
|
+ let currentHighlightIndex = -1;
|
|
|
51
|
+
|
|
|
52
|
+ function highlightPieSection(index, name) {
|
|
|
53
|
+ if(currentHighlightIndex === index) {
|
|
|
54
|
+ // 取消高亮
|
|
|
55
|
+ pieOption.series[0].data.forEach(item => {
|
|
|
56
|
+ item.emphasis = null;
|
|
|
57
|
+ });
|
|
|
58
|
+ pieOption.series[0].label.show = false;
|
|
|
59
|
+ currentHighlightIndex = -1;
|
|
|
60
|
+ } else {
|
|
|
61
|
+ // 设置高亮
|
|
|
62
|
+ pieOption.series[0].data.forEach((item, i) => {
|
|
|
63
|
+ item.emphasis = {
|
|
|
64
|
+ scale: i === index,
|
|
|
65
|
+ scaleSize: 10
|
|
|
66
|
+ };
|
|
|
67
|
+ });
|
|
|
68
|
+ pieOption.series[0].label = {
|
|
|
69
|
+ show: true,
|
|
|
70
|
+ position: 'center',
|
|
|
71
|
+ formatter: name,
|
|
|
72
|
+ fontSize: 16,
|
|
|
73
|
+ color: '#333'
|
|
|
74
|
+ };
|
|
|
75
|
+ currentHighlightIndex = index;
|
|
|
76
|
+ }
|
|
|
77
|
+ complaintPie.setOption(pieOption);
|
|
|
78
|
+ }
|
|
|
79
|
+ // 接单率图表
|
|
|
80
|
+ const acceptanceRate = echarts.init(document.getElementById('acceptanceRate'));
|
|
|
81
|
+ acceptanceRate.setOption({
|
|
|
82
|
+ animation: false,
|
|
|
83
|
+ series: [{
|
|
|
84
|
+ type: 'gauge',
|
|
|
85
|
+ startAngle: 90,
|
|
|
86
|
+ endAngle: -270,
|
|
|
87
|
+ pointer: {
|
|
|
88
|
+ show: false
|
|
|
89
|
+ },
|
|
|
90
|
+ progress: {
|
|
|
91
|
+ show: true,
|
|
|
92
|
+ overlap: false,
|
|
|
93
|
+ roundCap: true,
|
|
|
94
|
+ clip: false,
|
|
|
95
|
+ itemStyle: {
|
|
|
96
|
+ color: '#4F46E5'
|
|
|
97
|
+ }
|
|
|
98
|
+ },
|
|
|
99
|
+ axisLine: {
|
|
|
100
|
+ lineStyle: {
|
|
|
101
|
+ width: 12
|
|
|
102
|
+ }
|
|
|
103
|
+ },
|
|
|
104
|
+ splitLine: {
|
|
|
105
|
+ show: false
|
|
|
106
|
+ },
|
|
|
107
|
+ axisTick: {
|
|
|
108
|
+ show: false
|
|
|
109
|
+ },
|
|
|
110
|
+ axisLabel: {
|
|
|
111
|
+ show: false
|
|
|
112
|
+ },
|
|
|
113
|
+ detail: {
|
|
|
114
|
+ valueAnimation: true,
|
|
|
115
|
+ offsetCenter: [0, 0],
|
|
|
116
|
+ fontSize: 12,
|
|
|
117
|
+ formatter: '{value}%',
|
|
|
118
|
+ color: '#333'
|
|
|
119
|
+ },
|
|
|
120
|
+ data: [{
|
|
|
121
|
+ value: 0
|
|
|
122
|
+ }]
|
|
|
123
|
+ }]
|
|
|
124
|
+ });
|
|
|
125
|
+ // 完结率图表
|
|
|
126
|
+ const completionRate = echarts.init(document.getElementById('completionRate'));
|
|
|
127
|
+ completionRate.setOption({
|
|
|
128
|
+ animation: false,
|
|
|
129
|
+ series: [{
|
|
|
130
|
+ type: 'gauge',
|
|
|
131
|
+ startAngle: 90,
|
|
|
132
|
+ endAngle: -270,
|
|
|
133
|
+ pointer: {
|
|
|
134
|
+ show: false
|
|
|
135
|
+ },
|
|
|
136
|
+ progress: {
|
|
|
137
|
+ show: true,
|
|
|
138
|
+ overlap: false,
|
|
|
139
|
+ roundCap: true,
|
|
|
140
|
+ clip: false,
|
|
|
141
|
+ itemStyle: {
|
|
|
142
|
+ color: '#4F46E5'
|
|
|
143
|
+ }
|
|
|
144
|
+ },
|
|
|
145
|
+ axisLine: {
|
|
|
146
|
+ lineStyle: {
|
|
|
147
|
+ width: 12
|
|
|
148
|
+ }
|
|
|
149
|
+ },
|
|
|
150
|
+ splitLine: {
|
|
|
151
|
+ show: false
|
|
|
152
|
+ },
|
|
|
153
|
+ axisTick: {
|
|
|
154
|
+ show: false
|
|
|
155
|
+ },
|
|
|
156
|
+ axisLabel: {
|
|
|
157
|
+ show: false
|
|
|
158
|
+ },
|
|
|
159
|
+ detail: {
|
|
|
160
|
+ valueAnimation: true,
|
|
|
161
|
+ offsetCenter: [0, 0],
|
|
|
162
|
+ fontSize: 12,
|
|
|
163
|
+ formatter: '{value}%',
|
|
|
164
|
+ color: '#333'
|
|
|
165
|
+ },
|
|
|
166
|
+ data: [{
|
|
|
167
|
+ value: 0
|
|
|
168
|
+ }]
|
|
|
169
|
+ }]
|
|
|
170
|
+ });
|
|
|
171
|
+ // 趋势线图
|
|
|
172
|
+ const trendLine = echarts.init(document.getElementById('trendLine'));
|
|
|
173
|
+
|
|
|
174
|
+ window.addEventListener('resize', function() {
|
|
|
175
|
+ complaintPie.resize();
|
|
|
176
|
+ acceptanceRate.resize();
|
|
|
177
|
+ completionRate.resize();
|
|
|
178
|
+ trendLine.resize();
|
|
|
179
|
+ });
|
|
|
180
|
+
|
|
|
181
|
+ var token = localStorage.getItem("token");
|
|
|
182
|
+
|
|
|
183
|
+ function initData() {
|
|
|
184
|
+ // 顶部统计
|
|
|
185
|
+ $.ajax({
|
|
|
186
|
+ type: "get",
|
|
|
187
|
+ url: huayi.config.callcenter_url + 'Business/GetComplaint',
|
|
|
188
|
+ async: false,
|
|
|
189
|
+ data: {
|
|
|
190
|
+ type: selectType,
|
|
|
191
|
+ token: token
|
|
|
192
|
+ },
|
|
|
193
|
+ dataType: 'json',
|
|
|
194
|
+ success: function(data) {
|
|
|
195
|
+
|
|
|
196
|
+ res = data.data;
|
|
|
197
|
+
|
|
|
198
|
+ if(res.total) $('#total').text(res.total.toLocaleString());
|
|
|
199
|
+ if(res.thiscontrast) $('#thiscontrast').text(res.thiscontrast);
|
|
|
200
|
+ if(res.thisnumber) $('#thisnumber').text(res.thisnumber.toLocaleString());
|
|
|
201
|
+ if(res.othercontrast) $('#othercontrast').text(res.othercontrast);
|
|
|
202
|
+ if(res.otherthisnumber) $('#otherthisnumber').text(res.otherthisnumber.toLocaleString());
|
|
|
203
|
+
|
|
|
204
|
+ // 调整箭头
|
|
|
205
|
+ if(res.thiscontrast >= 0) {
|
|
|
206
|
+ $('#thiscontrast_i').attr('class', 'fas fa-arrow-up mr-1')
|
|
|
207
|
+ $('#thiscontrast_div').attr('class', 'text-green-500 text-sm mt-1')
|
|
|
208
|
+ } else {
|
|
|
209
|
+ $('#thiscontrast_i').attr('class', 'fas fa-arrow-down mr-1')
|
|
|
210
|
+ $('#thiscontrast_div').attr('class', 'text-red-500 text-sm mt-1')
|
|
|
211
|
+ }
|
|
|
212
|
+
|
|
|
213
|
+ // 调整箭头
|
|
|
214
|
+ if(res.othercontrast >= 0) {
|
|
|
215
|
+ $('#othercontrast_i').attr('class', 'fas fa-arrow-up mr-1')
|
|
|
216
|
+ $('#othercontrast_div').attr('class', 'text-green-500 text-sm mt-1')
|
|
|
217
|
+ } else {
|
|
|
218
|
+ $('#othercontrast_i').attr('class', 'fas fa-arrow-down mr-1')
|
|
|
219
|
+ $('#othercontrast_div').attr('class', 'text-red-500 text-sm mt-1')
|
|
|
220
|
+ }
|
|
|
221
|
+
|
|
|
222
|
+ // 计算比例
|
|
|
223
|
+ let rate = 0;
|
|
|
224
|
+ if(res.thisnumber > 0 || res.otherthisnumber > 0) {
|
|
|
225
|
+ rate = (res.thisnumber / (res.thisnumber + res.otherthisnumber)).toFixed(2);
|
|
|
226
|
+ }
|
|
|
227
|
+
|
|
|
228
|
+
|
|
|
229
|
+
|
|
|
230
|
+ $('#total_rate').attr('style', 'width: ' + rate * 100 + '%;')
|
|
|
231
|
+ }
|
|
|
232
|
+ });
|
|
|
233
|
+
|
|
|
234
|
+ $.ajax({
|
|
|
235
|
+ type: "get",
|
|
|
236
|
+ url: huayi.config.callcenter_url + 'Business/GetComplaintSituation',
|
|
|
237
|
+ async: false,
|
|
|
238
|
+ data: {
|
|
|
239
|
+ type: selectType,
|
|
|
240
|
+ token: token
|
|
|
241
|
+ },
|
|
|
242
|
+ dataType: 'json',
|
|
|
243
|
+ success: function(data) {
|
|
|
244
|
+
|
|
|
245
|
+ res = data.data;
|
|
|
246
|
+ if(res.gobad) $('#gobad').text(res.gobad.toLocaleString());
|
|
|
247
|
+ if(res.impurity) $('#impurity').text(res.impurity.toLocaleString());
|
|
|
248
|
+ if(res.mustiness) $('#mustiness').text(res.mustiness.toLocaleString());
|
|
|
249
|
+
|
|
|
250
|
+ if(res.gobadRate) $('#gobadRate').text(res.gobadRate);
|
|
|
251
|
+ if(res.impurityRate) $('#impurityRate').text(res.impurityRate);
|
|
|
252
|
+ if(res.mustinessRate) $('#mustinessRate').text(res.mustinessRate);
|
|
|
253
|
+
|
|
|
254
|
+ if(res.gobadcontrast >= 0) {
|
|
|
255
|
+ $('#gobadcontrast').text(res.gobadcontrast);
|
|
|
256
|
+ $('#gobadcontrast_i').attr('class', 'fas fa-arrow-up mr-1')
|
|
|
257
|
+ $('#gobadcontrast_span').attr('class', 'text-green-500')
|
|
|
258
|
+ } else {
|
|
|
259
|
+ if(res.gobadcontrast < 0) $('#gobadcontrast').text(res.gobadcontrast);
|
|
|
260
|
+ $('#gobadcontrast_i').attr('class', 'fas fa-arrow-down mr-1')
|
|
|
261
|
+ $('#othercontrast_div').attr('class', 'text-red-500')
|
|
|
262
|
+ }
|
|
|
263
|
+
|
|
|
264
|
+ if(res.impuritycontrast >= 0) {
|
|
|
265
|
+ $('#impuritycontrast').text(res.impuritycontrast);
|
|
|
266
|
+ $('#impuritycontrast_i').attr('class', 'fas fa-arrow-up mr-1')
|
|
|
267
|
+ $('#impuritycontrast_span').attr('class', 'text-green-500')
|
|
|
268
|
+ } else {
|
|
|
269
|
+ if(res.impuritycontrast < 0) $('#impuritycontrast').text(res.impuritycontrast);
|
|
|
270
|
+ $('#impuritycontrast_i').attr('class', 'fas fa-arrow-down mr-1')
|
|
|
271
|
+ $('#impuritycontrast_div').attr('class', 'text-red-500')
|
|
|
272
|
+ }
|
|
|
273
|
+
|
|
|
274
|
+ if(res.mustinesscontrast >= 0) {
|
|
|
275
|
+ $('#mustinesscontrast').text(res.mustinesscontrast);
|
|
|
276
|
+ $('#mustinesscontrast_i').attr('class', 'fas fa-arrow-up mr-1')
|
|
|
277
|
+ $('#mustinesscontrast_span').attr('class', 'text-green-500')
|
|
|
278
|
+ } else {
|
|
|
279
|
+ if(res.mustinesscontrast < 0) $('#mustinesscontrast').text(res.mustinesscontrast);
|
|
|
280
|
+ $('#mustinesscontrast_i').attr('class', 'fas fa-arrow-down mr-1')
|
|
|
281
|
+ $('#mustinesscontrast_div').attr('class', 'text-red-500')
|
|
|
282
|
+ }
|
|
|
283
|
+
|
|
|
284
|
+ // 重新加载饼图
|
|
|
285
|
+
|
|
|
286
|
+ let pieOption = {
|
|
|
287
|
+ animation: false,
|
|
|
288
|
+ tooltip: {
|
|
|
289
|
+ trigger: 'none'
|
|
|
290
|
+ },
|
|
|
291
|
+ legend: {
|
|
|
292
|
+ show: false
|
|
|
293
|
+ },
|
|
|
294
|
+ series: [{
|
|
|
295
|
+ type: 'pie',
|
|
|
296
|
+ radius: ['30%', '60%'],
|
|
|
297
|
+ center: ['50%', '50%'],
|
|
|
298
|
+ data: [{
|
|
|
299
|
+ value: res.mustiness,
|
|
|
300
|
+ name: '破袋发霉',
|
|
|
301
|
+ itemStyle: {
|
|
|
302
|
+ color: '#5470c6'
|
|
|
303
|
+ }
|
|
|
304
|
+ },
|
|
|
305
|
+ {
|
|
|
306
|
+ value: res.impurity,
|
|
|
307
|
+ name: '杂质异物',
|
|
|
308
|
+ itemStyle: {
|
|
|
309
|
+ color: '#91cc75'
|
|
|
310
|
+ }
|
|
|
311
|
+ },
|
|
|
312
|
+ {
|
|
|
313
|
+ value: res.gobad,
|
|
|
314
|
+ name: '变质异味',
|
|
|
315
|
+ itemStyle: {
|
|
|
316
|
+ color: '#fac858'
|
|
|
317
|
+ }
|
|
|
318
|
+ }
|
|
|
319
|
+ ],
|
|
|
320
|
+ label: {
|
|
|
321
|
+ show: false
|
|
|
322
|
+ }
|
|
|
323
|
+ }]
|
|
|
324
|
+ };
|
|
|
325
|
+ complaintPie.setOption(pieOption);
|
|
|
326
|
+
|
|
|
327
|
+ }
|
|
|
328
|
+ });
|
|
|
329
|
+
|
|
|
330
|
+ $.ajax({
|
|
|
331
|
+ type: "get",
|
|
|
332
|
+ url: huayi.config.callcenter_url + 'Business/GetComplaintCompleted',
|
|
|
333
|
+ async: false,
|
|
|
334
|
+ data: {
|
|
|
335
|
+ type: selectType,
|
|
|
336
|
+ token: token
|
|
|
337
|
+ },
|
|
|
338
|
+ dataType: 'json',
|
|
|
339
|
+ success: function(data) {
|
|
|
340
|
+
|
|
|
341
|
+ res = data.data;
|
|
|
342
|
+
|
|
|
343
|
+ acceptanceRate.setOption({
|
|
|
344
|
+ animation: false,
|
|
|
345
|
+ series: [{
|
|
|
346
|
+ type: 'gauge',
|
|
|
347
|
+ startAngle: 90,
|
|
|
348
|
+ endAngle: -270,
|
|
|
349
|
+ pointer: {
|
|
|
350
|
+ show: false
|
|
|
351
|
+ },
|
|
|
352
|
+ progress: {
|
|
|
353
|
+ show: true,
|
|
|
354
|
+ overlap: false,
|
|
|
355
|
+ roundCap: true,
|
|
|
356
|
+ clip: false,
|
|
|
357
|
+ itemStyle: {
|
|
|
358
|
+ color: '#4F46E5'
|
|
|
359
|
+ }
|
|
|
360
|
+ },
|
|
|
361
|
+ axisLine: {
|
|
|
362
|
+ lineStyle: {
|
|
|
363
|
+ width: 12
|
|
|
364
|
+ }
|
|
|
365
|
+ },
|
|
|
366
|
+ splitLine: {
|
|
|
367
|
+ show: false
|
|
|
368
|
+ },
|
|
|
369
|
+ axisTick: {
|
|
|
370
|
+ show: false
|
|
|
371
|
+ },
|
|
|
372
|
+ axisLabel: {
|
|
|
373
|
+ show: false
|
|
|
374
|
+ },
|
|
|
375
|
+ detail: {
|
|
|
376
|
+ valueAnimation: true,
|
|
|
377
|
+ offsetCenter: [0, 0],
|
|
|
378
|
+ fontSize: 12,
|
|
|
379
|
+ formatter: '{value}%',
|
|
|
380
|
+ color: '#333'
|
|
|
381
|
+ },
|
|
|
382
|
+ data: [{
|
|
|
383
|
+ value: +res.receivingrate.replace('%', '')
|
|
|
384
|
+ }]
|
|
|
385
|
+ }]
|
|
|
386
|
+ });
|
|
|
387
|
+
|
|
|
388
|
+ completionRate.setOption({
|
|
|
389
|
+ animation: false,
|
|
|
390
|
+ series: [{
|
|
|
391
|
+ type: 'gauge',
|
|
|
392
|
+ startAngle: 90,
|
|
|
393
|
+ endAngle: -270,
|
|
|
394
|
+ pointer: {
|
|
|
395
|
+ show: false
|
|
|
396
|
+ },
|
|
|
397
|
+ progress: {
|
|
|
398
|
+ show: true,
|
|
|
399
|
+ overlap: false,
|
|
|
400
|
+ roundCap: true,
|
|
|
401
|
+ clip: false,
|
|
|
402
|
+ itemStyle: {
|
|
|
403
|
+ color: '#4F46E5'
|
|
|
404
|
+ }
|
|
|
405
|
+ },
|
|
|
406
|
+ axisLine: {
|
|
|
407
|
+ lineStyle: {
|
|
|
408
|
+ width: 12
|
|
|
409
|
+ }
|
|
|
410
|
+ },
|
|
|
411
|
+ splitLine: {
|
|
|
412
|
+ show: false
|
|
|
413
|
+ },
|
|
|
414
|
+ axisTick: {
|
|
|
415
|
+ show: false
|
|
|
416
|
+ },
|
|
|
417
|
+ axisLabel: {
|
|
|
418
|
+ show: false
|
|
|
419
|
+ },
|
|
|
420
|
+ detail: {
|
|
|
421
|
+ valueAnimation: true,
|
|
|
422
|
+ offsetCenter: [0, 0],
|
|
|
423
|
+ fontSize: 12,
|
|
|
424
|
+ formatter: '{value}%',
|
|
|
425
|
+ color: '#333'
|
|
|
426
|
+ },
|
|
|
427
|
+ data: [{
|
|
|
428
|
+ value: +res.completerate.replace('%', '')
|
|
|
429
|
+ }]
|
|
|
430
|
+ }]
|
|
|
431
|
+ });
|
|
|
432
|
+ }
|
|
|
433
|
+ });
|
|
|
434
|
+
|
|
|
435
|
+ $.ajax({
|
|
|
436
|
+ type: "get",
|
|
|
437
|
+ url: huayi.config.callcenter_url + 'Business/GetComplaintTrend',
|
|
|
438
|
+ async: false,
|
|
|
439
|
+ data: {
|
|
|
440
|
+ type: selectType,
|
|
|
441
|
+ token: token
|
|
|
442
|
+ },
|
|
|
443
|
+ dataType: 'json',
|
|
|
444
|
+ success: function(data) {
|
|
|
445
|
+
|
|
|
446
|
+ res = data.data;
|
|
|
447
|
+ var times = [];
|
|
|
448
|
+ var receivings = [];
|
|
|
449
|
+ var completes = [];
|
|
|
450
|
+ if(res && res.length > -1) {
|
|
|
451
|
+ res.forEach(function(v, i) {
|
|
|
452
|
+ times.push(v.time);
|
|
|
453
|
+ receivings.push(v.receiving);
|
|
|
454
|
+ completes.push(v.complete);
|
|
|
455
|
+ });
|
|
|
456
|
+ }
|
|
|
457
|
+
|
|
|
458
|
+ trendLine.setOption({
|
|
|
459
|
+ animation: false,
|
|
|
460
|
+ tooltip: {
|
|
|
461
|
+ trigger: 'axis',
|
|
|
462
|
+ axisPointer: {
|
|
|
463
|
+ lineStyle: {
|
|
|
464
|
+ width: 1,
|
|
|
465
|
+ color: '#019680',
|
|
|
466
|
+ },
|
|
|
467
|
+ },
|
|
|
468
|
+
|
|
|
469
|
+ },
|
|
|
470
|
+ dataZoom: [{
|
|
|
471
|
+ type: 'inside',
|
|
|
472
|
+ startValue: times.length - 7 - 1,
|
|
|
473
|
+ endValue: times.length - 1,
|
|
|
474
|
+ // start: 0,
|
|
|
475
|
+ // end: (5 / xData.length) * 100,
|
|
|
476
|
+ zoomLock: true,
|
|
|
477
|
+ }, ],
|
|
|
478
|
+ legend: {
|
|
|
479
|
+ data: ['接单量', '完结量']
|
|
|
480
|
+ },
|
|
|
481
|
+ xAxis: {
|
|
|
482
|
+ type: 'category',
|
|
|
483
|
+ data: times,
|
|
|
484
|
+ axisLabel: {
|
|
|
485
|
+ interval: 0,
|
|
|
486
|
+ rotate: 45
|
|
|
487
|
+ }
|
|
|
488
|
+ },
|
|
|
489
|
+ yAxis: {
|
|
|
490
|
+ type: 'value'
|
|
|
491
|
+ },
|
|
|
492
|
+ grid: {
|
|
|
493
|
+ left: '3%',
|
|
|
494
|
+ right: '4%',
|
|
|
495
|
+ bottom: '15%',
|
|
|
496
|
+ containLabel: true
|
|
|
497
|
+ },
|
|
|
498
|
+ series: [{
|
|
|
499
|
+ name: '接单量',
|
|
|
500
|
+ type: 'line',
|
|
|
501
|
+ smooth: true,
|
|
|
502
|
+ data: receivings,
|
|
|
503
|
+ }, {
|
|
|
504
|
+ name: '完结量',
|
|
|
505
|
+ type: 'line',
|
|
|
506
|
+ smooth: true,
|
|
|
507
|
+ data: completes
|
|
|
508
|
+ }]
|
|
|
509
|
+ });
|
|
|
510
|
+ }
|
|
|
511
|
+ });
|
|
|
512
|
+ }
|
|
|
513
|
+
|
|
|
514
|
+ var types = ['周', '月', '年'];
|
|
|
515
|
+
|
|
|
516
|
+ $('#changeBut').on('click', function() {
|
|
|
517
|
+ console.log('changeType');
|
|
|
518
|
+ selectType++;
|
|
|
519
|
+ if(selectType > types.length - 1) selectType = 0;
|
|
|
520
|
+ const typeName = types[selectType];
|
|
|
521
|
+
|
|
|
522
|
+ $('[name="selectType"]').text(typeName)
|
|
|
523
|
+
|
|
|
524
|
+ initData();
|
|
|
525
|
+ })
|
|
|
526
|
+
|
|
|
527
|
+ initData();
|
|
|
528
|
+
|
|
|
529
|
+})
|
|
|
530
|
+
|
|
|
531
|
+//function changeType() {
|
|
|
532
|
+//
|
|
|
533
|
+//}
|