Преглед на файлове

大屏数据展示修改

liuzhen преди 5 години
родител
ревизия
7af5f876d0
променени са 2 файла, в които са добавени 39 реда и са изтрити 17 реда
  1. 19 8
      WebChart/js/huawu.js
  2. 20 9
      WebChart/js/zhongxin.js

+ 19 - 8
WebChart/js/huawu.js

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

+ 20 - 9
WebChart/js/zhongxin.js

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