Quellcode durchsuchen

大屏数据展示修改

liuzhen vor 5 Jahren
Ursprung
Commit
7af5f876d0
2 geänderte Dateien mit 39 neuen und 17 gelöschten Zeilen
  1. 19 8
      WebChart/js/huawu.js
  2. 20 9
      WebChart/js/zhongxin.js

+ 19 - 8
WebChart/js/huawu.js

@@ -423,12 +423,15 @@ function part2ExportFun() {
423 423
    	   			console.log(con);
424 424
    	   			var dataList=[];
425 425
    	   			var dataScore=[];
426
+   	   			var dataTotal=0;
426 427
    	   			$('.phone_li').empty();
427 428
    	   			 $(con).each(function(i,n){
428 429
    	   			 	if(n.分类=='系统量'){
429 430
    	   			 		$('#total').text(n.数量)
430 431
    	   			 	}else if(n.分类=='今日量'){
431 432
    	   			 		$('#today').text(n.数量)
433
+   	   			 	}else if(n.分类=='总量'){
434
+   	   			 		dataTotal=n.数量+0
432 435
    	   			 	}else{
433 436
    	   			 		dataList[i]=n.分类;
434 437
    	   			 		dataScore[i]=n.数量;
@@ -475,7 +478,8 @@ function part2ExportFun() {
475 478
 					barWidth: 8,
476 479
 					initValue:dataScore[0],
477 480
 					roundCorner: true,
478
-					maxValue:5000
481
+					maxValue:dataTotal,
482
+					fontSize:35
479 483
 					//    percentage: true
480 484
 				});
481 485
 				$('.text1').radialIndicator({
@@ -485,7 +489,8 @@ function part2ExportFun() {
485 489
 					barWidth: 8,
486 490
 					initValue:dataScore[1],
487 491
 					roundCorner: true,
488
-					maxValue:5000
492
+					maxValue:dataTotal,
493
+					fontSize:35
489 494
 					//    percentage: true
490 495
 				});
491 496
 				$('.text2').radialIndicator({
@@ -495,7 +500,8 @@ function part2ExportFun() {
495 500
 					barWidth: 8,
496 501
 					initValue:dataScore[2],
497 502
 					roundCorner: true,
498
-					maxValue:5000
503
+					maxValue:dataTotal,
504
+					fontSize:35
499 505
 					//    percentage: true
500 506
 				});
501 507
 				$('.text3').radialIndicator({
@@ -505,7 +511,8 @@ function part2ExportFun() {
505 511
 					barWidth: 8,
506 512
 					initValue:dataScore[3],
507 513
 					roundCorner: true,
508
-					maxValue:5000
514
+					maxValue:dataTotal,
515
+					fontSize:35
509 516
 					//    percentage: true
510 517
 				});$('.text4').radialIndicator({
511 518
 					radius: 40,
@@ -514,7 +521,8 @@ function part2ExportFun() {
514 521
 					barWidth: 8,
515 522
 					initValue:dataScore[4],
516 523
 					roundCorner: true,
517
-					maxValue:5000
524
+					maxValue:dataTotal,
525
+					fontSize:35
518 526
 					//    percentage: true
519 527
 				});$('.text5').radialIndicator({
520 528
 					radius: 40,
@@ -523,7 +531,8 @@ function part2ExportFun() {
523 531
 					barWidth: 8,
524 532
 					initValue:dataScore[5],
525 533
 					roundCorner: true,
526
-					maxValue:5000
534
+					maxValue:dataTotal,
535
+					fontSize:35
527 536
 					//    percentage: true
528 537
 				});$('.text6').radialIndicator({
529 538
 					radius: 40,
@@ -532,7 +541,8 @@ function part2ExportFun() {
532 541
 					barWidth: 8,
533 542
 					initValue:dataScore[6],
534 543
 					roundCorner: true,
535
-					maxValue:5000
544
+					maxValue:dataTotal,
545
+					fontSize:35
536 546
 					//    percentage: true
537 547
 				});
538 548
 				$('.text7').radialIndicator({
@@ -542,7 +552,8 @@ function part2ExportFun() {
542 552
 					barWidth: 8,
543 553
 					initValue:dataScore[7],
544 554
 					roundCorner: true,
545
-					maxValue:5000
555
+					maxValue:dataTotal,
556
+					fontSize:35
546 557
 					//    percentage: true
547 558
 				});
548 559
    	   		}

+ 20 - 9
WebChart/js/zhongxin.js

@@ -58,13 +58,16 @@
58 58
    	   			console.log(con);
59 59
    	   			var dataList=[];
60 60
    	   			var dataScore=[];
61
+   	   			var dataTotal=0;
61 62
    	   			$('.phone_li').empty();
62 63
    	   			 $(con).each(function(i,n){
63 64
    	   			 	if(n.分类=='系统量'){
64 65
    	   			 		$('#total').text(n.数量)
65 66
    	   			 	}else if(n.分类=='今日量'){
66 67
    	   			 		$('#today').text(n.数量)
67
-   	   			 	}else{
68
+   	   			 	}else if(n.分类=='总量'){
69
+   	   			 		dataTotal=n.数量+0
70
+   	   			 	}else {
68 71
    	   			 		dataList[i]=n.分类;
69 72
    	   			 		dataScore[i]=n.数量;
70 73
 // 	   			 		if(dataList[i]!='undefined'){
@@ -99,7 +102,8 @@
99 102
 					barWidth: 8,
100 103
 					initValue:dataScore[0],
101 104
 					roundCorner: true,
102
-					maxValue:5000
105
+					maxValue:dataTotal,
106
+					fontSize:35
103 107
 					//    percentage: true
104 108
 				});
105 109
 				$('.text1').radialIndicator({
@@ -109,7 +113,8 @@
109 113
 					barWidth: 8,
110 114
 					initValue:dataScore[1],
111 115
 					roundCorner: true,
112
-					maxValue:5000
116
+					maxValue:dataTotal,
117
+					fontSize:35
113 118
 					//    percentage: true
114 119
 				});
115 120
 				$('.text2').radialIndicator({
@@ -119,7 +124,8 @@
119 124
 					barWidth: 8,
120 125
 					initValue:dataScore[2],
121 126
 					roundCorner: true,
122
-					maxValue:5000
127
+					maxValue:dataTotal,
128
+					fontSize:35
123 129
 					//    percentage: true
124 130
 				});
125 131
 				$('.text3').radialIndicator({
@@ -129,7 +135,8 @@
129 135
 					barWidth: 8,
130 136
 					initValue:dataScore[3],
131 137
 					roundCorner: true,
132
-					maxValue:5000
138
+					maxValue:dataTotal,
139
+					fontSize:35
133 140
 					//    percentage: true
134 141
 				});$('.text4').radialIndicator({
135 142
 					radius: 40,
@@ -138,7 +145,8 @@
138 145
 					barWidth: 8,
139 146
 					initValue:dataScore[4],
140 147
 					roundCorner: true,
141
-					maxValue:5000
148
+					maxValue:dataTotal,
149
+					fontSize:35
142 150
 					//    percentage: true
143 151
 				});$('.text5').radialIndicator({
144 152
 					radius: 40,
@@ -147,7 +155,8 @@
147 155
 					barWidth: 8,
148 156
 					initValue:dataScore[5],
149 157
 					roundCorner: true,
150
-					maxValue:5000
158
+					maxValue:dataTotal,
159
+					fontSize:35
151 160
 					//    percentage: true
152 161
 				});$('.text6').radialIndicator({
153 162
 					radius: 40,
@@ -156,7 +165,8 @@
156 165
 					barWidth: 8,
157 166
 					initValue:dataScore[6],
158 167
 					roundCorner: true,
159
-					maxValue:5000
168
+					maxValue:dataTotal,
169
+					fontSize:35
160 170
 					//    percentage: true
161 171
 				});
162 172
 				$('.text7').radialIndicator({
@@ -166,7 +176,8 @@
166 176
 					barWidth: 8,
167 177
 					initValue:dataScore[7],
168 178
 					roundCorner: true,
169
-					maxValue:5000
179
+					maxValue:dataTotal,
180
+					fontSize:35
170 181
 					//    percentage: true
171 182
 				});
172 183
    	   		}