jinquanwu лет назад: 6
Родитель
Сommit
21ebf8df5e
4 измененных файлов с 598 добавлено и 3 удалено
  1. 14 1
      WebChart/css/index.css
  2. 53 0
      WebChart/index.html
  3. 1 1
      WebChart/js/index.js
  4. 530 1
      WebChart/js/pieChat.js

+ 14 - 1
WebChart/css/index.css

@@ -1,4 +1,4 @@
1
-/*
1
+/*
2 2
  公共初始化样式
3 3
  * */
4 4
 
@@ -1699,6 +1699,19 @@ a {
1699 1699
 	vertical-align: middle;
1700 1700
 	margin-left: 16px;
1701 1701
 }
1702
+#times3 {
1703
+	z-index: 9999;
1704
+	position: relative;
1705
+	background: #114a97;
1706
+	height: 16px;
1707
+	color: #00e9ff;
1708
+	border: 2px solid #00e9ff;
1709
+	border-radius: 2px;
1710
+	outline: none;
1711
+	padding: 2px 35px;
1712
+	vertical-align: middle;
1713
+	margin-left: 16px;
1714
+}
1702 1715
 
1703 1716
 .time_box {
1704 1717
 	color: #00e9ff;

+ 53 - 0
WebChart/index.html

@@ -87,6 +87,25 @@
87 87
 				background: #F05964;
88 88
 				margin: 30px 10% 0px 3%;
89 89
 			}
90
+			.threefour{
91
+				width: 90%;
92
+				margin-left:10%;
93
+				overflow: hidden;
94
+			}
95
+			.threefour .partL{
96
+				float: left;
97
+				width: 100%;
98
+				height: 300px;
99
+				background: #F05964;
100
+				margin: 30px 3% 0px 5%;
101
+			}
102
+			/* .threefour .partR{
103
+				float: left;
104
+				width: 37%;
105
+				height: 300px;
106
+				background: #F05964;
107
+				margin: 30px 10% 0px 3%;
108
+			} */
90 109
 			.fourSel{
91 110
 				position: absolute;
92 111
 				right: 180px;
@@ -281,6 +300,40 @@
281 300
 							</div>
282 301
 						</div>
283 302
 					</div>
303
+				<!--第四屏  五个饼图-->
304
+				<div class="swiper-slide">
305
+					<div class="orderSource slideCon_bg clearfix" style="position: relative;">
306
+						<div class="timeWrap twotimeWarp firstPos">
307
+							<div class="time_box pull-right form-inline">
308
+								日期<input type="text" id="time3" class="times" style="width:200px;" />
309
+							</div>
310
+						</div>
311
+						<p class="slide_title slide_title2" style="left: 44%;"></p>
312
+						<!-- <div class="fourSel">
313
+							渠道来源
314
+							<select class="channelSel selects">
315
+								<option value="总经销">总经销</option>
316
+								<option value="二级商">二级商</option>
317
+								<option value="种田大户">种田大户</option>
318
+								<option value="公司员工">公司员工</option>
319
+								<option value="其他公众">其他公众</option>
320
+							</select>		
321
+						</div> -->
322
+						<div class="threefour">
323
+							<div class="partL" id="patt1" style="width: 500px;height:300px; margin-top: 50px;" ></div>
324
+							<div class="partL" id="patt2" style="width: 500px;height:300px; margin-top: 50px;"></div>
325
+							<div class="partL" id="patt3" style="width: 500px;height:300px;"></div>
326
+							<div class="partL" id="patt4" style="width: 500px;height:300px;"></div>
327
+							<!-- <div class="partL" id="patt5" style="width: 400px;height:300px;"></div> -->
328
+						</div>
329
+					</div>
330
+				</div>
331
+				
332
+				
333
+				
334
+				
335
+				
336
+				
284 337
 				</div>
285 338
 				<div class="swiper-button-prev"></div>
286 339
 				<div class="swiper-pagination"></div>

+ 1 - 1
WebChart/js/index.js

@@ -341,7 +341,7 @@ function turn(aa) {
341 341
 		partThaace();
342 342
 		partTccea();
343 343
 		partTaipa();
344
-		parthtmc();
344
+		// parthtmc();
345 345
 	}
346 346
 	$(".channelSel").change(function() {
347 347
 	    partFour();

+ 530 - 1
WebChart/js/pieChat.js

@@ -1,6 +1,11 @@
1 1
 var container1 = echarts.init(document.getElementById('part1'));
2 2
 var container2 = echarts.init(document.getElementById('part2'));
3 3
 var container3 = echarts.init(document.getElementById('part3'));
4
+var container4 = echarts.init(document.getElementById('patt1'));
5
+var container5 = echarts.init(document.getElementById('patt2'));
6
+var container6 = echarts.init(document.getElementById('patt3'));
7
+var container7 = echarts.init(document.getElementById('patt4'));
8
+var container8 = echarts.init(document.getElementById('patt5'));
4 9
 function partOne() {
5 10
 	$.ajax({
6 11
 		type: "get",
@@ -322,4 +327,528 @@ function partFour() {
322 327
 			}
323 328
 		}
324 329
 	});
325
-}
330
+}
331
+
332
+
333
+// 第四屏
334
+var typeSelc;
335
+var oneType;
336
+
337
+
338
+function partThaa(sd,ed) {
339
+	if (oneType) {
340
+		typeSelc=oneType;
341
+	}else{
342
+		typeSelc=5;	
343
+	}
344
+	$.ajax({
345
+		type: "get",
346
+		url: huayi.config.callcenter_url + "WOReport/GetFeedbacklList",
347
+		async: true,
348
+		dataType: "json",
349
+		data: {
350
+//			date:
351
+                start: sd,
352
+				end: ed,
353
+				type: typeSelc
354
+		},
355
+		success: function(data) {
356
+			if(data.state.toLowerCase() == "success") {
357
+				var con = data.rows;
358
+				container4.setOption({
359
+					title: {
360
+						text: '区域',
361
+						textStyle: {
362
+							//文字颜色
363
+							color: '#00e9ff',
364
+							//字体大小
365
+							    fontSize: 18
366
+						},
367
+						x: 'left'
368
+					},
369
+					tooltip: {
370
+						trigger: 'item',
371
+						formatter: "{a} <br/>{b} : {c} ({d}%)"
372
+					},
373
+					legend: {
374
+						orient: 'vertical',
375
+						left: 'left'
376
+					},
377
+
378
+					series: [{
379
+						name: '区域',
380
+						type: 'pie',
381
+						radius: '70%',
382
+						center: ['50%', '50%'],
383
+						data: [{
384
+								value: con[0].number,
385
+								name: con[0].name
386
+							},
387
+							{
388
+								value: con[1].number,
389
+								name: con[1].name
390
+							},
391
+							{
392
+								value:con[2].number,
393
+								name: con[2].name
394
+							},
395
+							{
396
+								value:con[3].number,
397
+								name: con[3].name
398
+							},
399
+							
400
+						],
401
+						itemStyle: {
402
+							// normal: {
403
+							// 	color: '#2973E4',
404
+							// 	opacity: 0.8,
405
+							// },
406
+							emphasis: {
407
+								shadowBlur: 10,
408
+								shadowOffsetX: 0,
409
+								shadowColor: 'rgba(255, 198, 0, 0.5)'
410
+							}
411
+						}
412
+					}]
413
+				});
414
+			}
415
+		}
416
+	});
417
+}
418
+
419
+function partThaace() {
420
+	$.ajax({
421
+		type: "get",
422
+		url: huayi.config.callcenter_url + "WOReport/GetChanelList",
423
+		async: true,
424
+		dataType: "json",
425
+		data: {
426
+//			date:
427
+		},
428
+		success: function(data) {
429
+			if(data.state.toLowerCase() == "success") {
430
+				var con = data.rows;
431
+				container5.setOption({
432
+					title: {
433
+						text: '渠道类别',
434
+						textStyle: {
435
+							//文字颜色
436
+							color: '#00e9ff',
437
+							//字体大小
438
+							    fontSize: 18
439
+						},
440
+						x: 'left'
441
+					},
442
+					tooltip: {
443
+						trigger: 'item',
444
+						formatter: "{a} <br/>{b} : {c} ({d}%)"
445
+					},
446
+					legend: {
447
+						orient: 'vertical',
448
+						left: 'left'
449
+					},
450
+
451
+					series: [{
452
+						name: '渠道类别',
453
+						type: 'pie',
454
+						radius: '70%',
455
+						center: ['52%', '50%'],
456
+						data: [{
457
+								value: con.Distribution,
458
+								name: '总经销',
459
+							    itemStyle:{normal: {
460
+							    	color: '#113388',
461
+							      }
462
+							    }
463
+							},
464
+							{
465
+								value: con.Quotient,
466
+								name: '二级商',
467
+								itemStyle:{normal: {
468
+									color: '#532478',
469
+								  }
470
+								}
471
+							},
472
+							{
473
+								value: con.Bigfarmer,
474
+								name: '种田大户',
475
+								itemStyle:{normal: {
476
+									color: '#487565',	
477
+								  }
478
+								}
479
+							},
480
+							{
481
+								value: con.Peasant,
482
+								name: '农户',
483
+								itemStyle:{normal: {
484
+									color: '#336699',
485
+								  }
486
+								}
487
+							},
488
+							{
489
+								value: con.Customers,
490
+								name: '化工客户',
491
+								itemStyle:{normal: {
492
+									color: '#FFFEEE',
493
+									
494
+								  }
495
+								}
496
+							},
497
+							{
498
+								value:con.Companystaf,
499
+								name: '公司员工',
500
+								itemStyle:{normal: {
501
+									color: '#256EEE',
502
+									
503
+								  }
504
+								}
505
+							},
506
+							{
507
+								value: con.Other,
508
+								name: '其他',
509
+								itemStyle:{normal: {
510
+									color: '#369FFE',
511
+									
512
+								  }
513
+								}
514
+							}
515
+						],
516
+						// itemStyle: {
517
+						// 	normal: {
518
+						// 		color: '#159FE9',
519
+						// 		opacity: 0.5,
520
+						// 	},
521
+						// 	emphasis: {
522
+						// 		shadowBlur: 10,
523
+						// 		shadowOffsetX: 0,
524
+						// 		shadowColor: 'rgba(0, 0, 0, 0.5)'
525
+						// 	}
526
+						// }
527
+					}]
528
+				});
529
+			}
530
+		}
531
+	});
532
+}
533
+
534
+function partTccea() {
535
+	$.ajax({
536
+		type: "get",
537
+		url: huayi.config.callcenter_url + "WOReport/GetbrandList",
538
+		async: true,
539
+		dataType: "json",
540
+		data: {
541
+//			date:
542
+		},
543
+		success: function(data) {
544
+			if(data.state.toLowerCase() == "success") {
545
+				var con = data.rows;
546
+				container6.setOption({
547
+					title: {
548
+						text: '品牌',
549
+						textStyle: {
550
+							//文字颜色
551
+							color: '#00e9ff',
552
+							//字体大小
553
+							    fontSize: 18
554
+						},
555
+						x: 'left'
556
+					},
557
+					tooltip: {
558
+						trigger: 'item',
559
+						formatter: "{a} <br/>{b} : {c} ({d}%)"
560
+					},
561
+					legend: {
562
+						orient: 'vertical',
563
+						left: 'left'
564
+					},
565
+
566
+					series: [{
567
+						name: '品牌',
568
+						type: 'pie',
569
+						radius: '60%',
570
+						center: ['50%', '50%'],
571
+						data: [{
572
+								value: con[0].number,
573
+								name:  con[0].name
574
+							},
575
+							{
576
+								value: con[1].number,
577
+								name:  con[1].name
578
+							},
579
+							{
580
+								value: con[2].number,
581
+								name:  con[2].name
582
+							},
583
+							{
584
+								value: con[3].number,
585
+								name:  con[3].name
586
+							},
587
+							{
588
+								value: con[4].number,
589
+								name:  con[4].name
590
+							},
591
+							{
592
+								value: con[5].number,
593
+								name:  con[5].name
594
+							},
595
+							{
596
+								value: con[6].number,
597
+								name:  con[6].name
598
+							},
599
+							{
600
+								value: con[7].number,
601
+								name:  con[7].name
602
+							},
603
+							{
604
+								value: con[8].number,
605
+								name:  con[8].name
606
+							},
607
+							{
608
+								value: con[9].number,
609
+								name:  con[9].name
610
+							},
611
+							{
612
+								value: con[10].number,
613
+								name:  con[10].name
614
+							},
615
+							{
616
+								value: con[11].number,
617
+								name:  con[11].name
618
+							},
619
+						],
620
+						// itemStyle: {
621
+						// 	normal: {
622
+						// 		color: '#159FE9',
623
+						// 		opacity: 0.5,
624
+						// 	},
625
+						// 	emphasis: {
626
+						// 		shadowBlur: 10,
627
+						// 		shadowOffsetX: 0,
628
+						// 		shadowColor: 'rgba(0, 0, 0, 0.5)'
629
+						// 	}
630
+						// }
631
+					}]
632
+				});
633
+			}
634
+		}
635
+	});
636
+}
637
+
638
+function partTaipa() {
639
+	$.ajax({
640
+		type: "get",
641
+		url: huayi.config.callcenter_url + "WOReport/GetFeedbacklList",
642
+		async: true,
643
+		dataType: "json",
644
+		data: {
645
+//			date:
646
+		},
647
+		success: function(data) {
648
+			if(data.state.toLowerCase() == "success") {
649
+				var con = data.rows;
650
+				container7.setOption({
651
+					title: {
652
+						text: '反馈类型',
653
+						textStyle: {
654
+							//文字颜色
655
+							color: '#00e9ff',
656
+							//字体大小
657
+							fontSize: 18
658
+						},
659
+						x: 'center'
660
+					},
661
+					tooltip: {
662
+						trigger: 'axis',
663
+						axisPointer: {
664
+							type: 'cross',
665
+							label: {
666
+								show: true,
667
+								backgroundColor: '#030917'
668
+							}
669
+						}
670
+					},
671
+					legend: {
672
+						show: false
673
+					},
674
+					xAxis: {
675
+						name: '产品',
676
+						data: [
677
+							con[0].name, 
678
+							con[1].name, 
679
+							con[2].name, 
680
+							con[3].name, 
681
+							con[4].name
682
+							// {
683
+							// 	value: '尿素',
684
+							// },
685
+							// {
686
+							// 	value: '复合肥',
687
+							// },
688
+							// {
689
+							// 	value: '水溶肥',		
690
+					  //       },
691
+							// {
692
+							// 	value: '车用尿素',								
693
+							// },
694
+							// {
695
+							// 	value: '三聚氰胺',								
696
+							// },
697
+							// {
698
+							// 	value: '甲醇',					
699
+							// },
700
+							// {
701
+							// 	value: '糖醇',						
702
+							// },
703
+							// {
704
+							// 	value: '腐植酸',					
705
+							// },
706
+							// {
707
+							// 	value: '二甲醚',	
708
+							// },
709
+							// {
710
+							// 	value: '糖醛',
711
+							// },
712
+							// {
713
+							// 	value: '液氨',
714
+							// },
715
+							
716
+						],
717
+						axisLine: {
718
+							lineStyle: {
719
+								color: '#ccc'
720
+							}
721
+						}
722
+					},
723
+					yAxis: {
724
+						name: '数量',
725
+						splitLine: {
726
+							show: false
727
+						},
728
+						axisLine: {
729
+							lineStyle: {
730
+								color: '#fff'
731
+							}
732
+						}
733
+					},
734
+					series: [
735
+						// {
736
+						// 	// name: '电话',
737
+						// 	type: 'line',
738
+						// 	data: [
739
+						// 		con[0].name, 
740
+						// 		con[1].name, 
741
+						// 		con[2].name, 
742
+						// 		con[3].name, 
743
+						// 		con[4].name 
744
+						// 	]
745
+						// },
746
+						{
747
+							name: '数量',
748
+							type: 'line',
749
+							data: [
750
+								con[0].number, 
751
+								con[1].number, 
752
+								con[2].number, 
753
+								con[3].number, 
754
+								con[4].number 
755
+							]
756
+						}
757
+					],
758
+				});
759
+			}
760
+		}
761
+	});
762
+}
763
+// function parthtmc() {
764
+// 	$.ajax({
765
+// 		type: "get",
766
+// 		url: huayi.config.callcenter_url + "WOReport/GetFeedbacklList",
767
+// 		async: true,
768
+// 		dataType: "json",
769
+// 		data: {
770
+// //			date:
771
+// 		},
772
+// 		success: function(data) {
773
+// 			if(data.state.toLowerCase() == "success") {
774
+// 				var con = data.rows;
775
+// 				container8.setOption({
776
+// 										title: {
777
+// 						text: '反馈类型',
778
+// 						textStyle: {
779
+// 							//文字颜色
780
+// 							color: '#00e9ff',
781
+// 							//字体大小
782
+// 							fontSize: 18
783
+// 						},
784
+// 						x: 'center'
785
+// 					},
786
+// 					color: ['#3398DB'],
787
+// 					tooltip: {
788
+// 						trigger: 'axis',
789
+// 						axisPointer: { // 坐标轴指示器,坐标轴触发有效
790
+// 							type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
791
+// 						}
792
+// 					},
793
+// 					grid: {
794
+// 						left: '3%',
795
+// 						right: '4%',
796
+// 						bottom: '13%',
797
+// 						containLabel: true
798
+// 					},
799
+// 					xAxis: [{
800
+// 						type: 'category',
801
+// 						data: [
802
+// 							con[0].name, 
803
+// 							con[1].name, 
804
+// 							con[2].name, 
805
+// 							con[3].name, 
806
+// 							con[4].name
807
+// 							// {
808
+// 							// 	value: '咨询',
809
+// 							// },
810
+// 							// {
811
+// 							// 	value: '投诉',
812
+// 							// },
813
+// 							// {
814
+// 							// 	value: '抽检',		
815
+// 							// },
816
+// 							// {
817
+// 							// 	value: '建议及其他',								
818
+// 							// },
819
+// 							
820
+// 						],
821
+// 						axisTick: {
822
+// 							alignWithLabel: true
823
+// 						},
824
+// 						axisLine: {
825
+// 							lineStyle: {
826
+// 								color: '#ccc'
827
+// 							}
828
+// 						}
829
+// 					}],
830
+// 					yAxis: [{
831
+// 						type: 'value',
832
+// 						axisLine: {
833
+// 							lineStyle: {
834
+// 								color: '#fff'
835
+// 							}
836
+// 						}
837
+// 					}],
838
+// 					series: [{
839
+// 						name: '数量',
840
+// 						type: 'bar',
841
+// 						barWidth: '60%',
842
+// 						data: [
843
+// 							con[0].number, 
844
+// 							con[1].number, 
845
+// 							con[2].number, 
846
+// 							con[3].number, 
847
+// 							con[4].number
848
+// 						]
849
+// 					}]
850
+// 				});
851
+// 			}
852
+// 		}
853
+// 	});
854
+// }