ソースを参照

统计优化及bug修改

wangjianguo 8 年 前
コミット
3a6f2c2f13

+ 3 - 3
VisualInspection/js/statistics/personal_data_statistics.js

@@ -308,7 +308,7 @@ $(function(){
                     }
                     },
 					grid:{
-                    width:"80%"
+                    width:"75%"
                     },
 					legend: {
 						data:['平均分']
@@ -404,14 +404,14 @@ $(function(){
 					{
 						name:'访问来源',
 						type:'pie',
-						radius : '65%',
+						radius : '55%',
 						center: ['50%', '50%'],
 						data:array_check_type,
 						itemStyle:{ 
 						normal:{ 
 							label:{ 
 								show: true, 
-								formatter: '{b} : {c}分 ({d}%)'  
+								formatter: '{b} :\n{c}分 ({d}%)'  
 							}, 
 							labelLine :{show:true} 
 							} 

+ 36 - 6
VisualInspection/js/statistics/road_manage_statistics.js

@@ -256,7 +256,6 @@ $(function(){
 			array_allStation.length=0;
 			if(data!='' && data.length!=0){
 				for(var i=0;i<data.length;i++){
-					array_allStation.push(data[i].feeStationName.substr(0,data[i].feeStationName.length-3));
 					array_allStation_score.push((1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
 				}
 			}else{
@@ -267,6 +266,20 @@ $(function(){
 				min_station = 0;
 				else
 				min_station = 	eval("Math.min(" + array_allStation_score.toString() + ")").toFixed(0)-10;
+
+				// 给道管下的收费站排名次
+				var rank = new Array();
+				rank[0] = 1 ;
+				for(var i=1; i<array_allStation_score.length; i++){
+					if(array_allStation_score[i-1] == array_allStation_score[i]  ){
+						rank[i] = rank[i-1];
+					}else{
+						rank[i] = i + 1;
+					}				
+				}
+				for(var i=0;i<array_allStation_score.length;i++){
+					array_allStation.push(data[i].feeStationName.substr(0,data[i].feeStationName.length-3)+"\n"+ (rank[i]));
+				}
 		}else if(type == 4){
 			array_score_order.length=0;
 			array_score_data.length=0;
@@ -288,7 +301,6 @@ $(function(){
 			array_get_score.length=0;
 				if(data!='' && data.length!=0){
 					for(var i=0;i<data.length;i++){
-						array_score_last.push(data[i].user.truename+"\n"+"("+data[i].user.fee_station_name.substr(0,data[i].user.fee_station_name.length-3)+")");
 						array_get_score.push((1000-filter(data[i].all_check_score,data[i].checked_num,0)));
 				    }
 				 }else{
@@ -299,6 +311,21 @@ $(function(){
 				min_suff = 0;
 				else
 				min_suff = eval("Math.min(" + array_get_score.toString() + ")").toFixed(0)-10;
+
+				// 给道管中心人员考核得分后20名
+				var rank = new Array();
+				rank[0] = 1 ;
+				for(var i=1; i<array_get_score.length; i++){
+					if(array_get_score[i-1] == array_get_score[i]  ){
+						rank[i] = rank[i-1];
+					}else{
+						rank[i] = i +1;
+					}				
+				}
+				for(var i=0;i<array_get_score.length;i++){
+					array_score_last.push(data[i].user.truename+"\n"+"("+data[i].user.fee_station_name.substr(
+						0,data[i].user.fee_station_name.length-3)+")"+"\n"+ (rank[i]));
+				}
 	    }else if(type == 6){
 			array_check_type.length=0;
                 if(data.length != 0){
@@ -552,14 +579,14 @@ $(function(){
 					{
 						name:'访问来源',
 						type:'pie',
-						radius : '65%',
+						radius : '55%',
 						center: ['50%', '50%'],
 						data:array_points,
 						itemStyle:{ 
 						normal:{ 
 							label:{ 
 								show: true, 
-								formatter: '{b} : {c}人 ({d}%)'  
+								formatter: '{b} :\n{c}人 ({d}%)'  
 							}, 
 							labelLine :{show:true} 
 							} 
@@ -595,12 +622,15 @@ $(function(){
                     }
                 },
 				grid:{
-                    width:"80%",	
+                    width:"75%",	
                 },
 				calculable : true,
 				xAxis : [
 					{
 						type : 'category',
+						axisLabel :{  
+                           interval:0  // 显示x轴所有信息,不隐藏部分  
+                        },
 						data : array_allStation
 					}
 				],
@@ -844,7 +874,7 @@ $(function(){
 						normal:{ 
 							label:{ 
 								show: true, 
-								formatter: '{b} : {c}分 ({d}%)'  
+								formatter: '{b} :\n{c}分 ({d}%)' 
 							}, 
 							labelLine :{show:true} 
 							} 

+ 31 - 6
VisualInspection/js/statistics/toll_station_statistics.js

@@ -271,7 +271,6 @@ $(function(){
 			array_five_score.length=0;
 			if(data!='' && data.length!=0){
 				for(var i=0;i<data.length;i++){
-					array_five_name.push(data[i].user.truename);
 					array_five_score.push(data[i].ranking_change);
 				}
 			}else{
@@ -282,13 +281,26 @@ $(function(){
 			min_five = 0;
 			else
 			min_five = 	eval("Math.min(" + array_five_score.toString() + ")").toFixed(0)-1;	
+
+			// 给考核进步top5排名次
+			var rank = new Array();
+			rank[0] = 1 ;
+			for(var i=1; i<array_five_score.length; i++){
+				if(array_five_score[i-1] == array_five_score[i]  ){
+					rank[i] = rank[i-1];
+				}else{
+					rank[i] = i + 1;
+				}				
+			}
+			for(var i=0;i<array_five_score.length;i++){
+				array_five_name.push(data[i].user.truename+"\n"+ (rank[i]));
+			}
 		}else if(type == 4){
 			array_score_order.length=0;
 			array_score_data.length=0;
 			var m = 1;	
 			if(data!='' && data.length!=0){
 				for(var i=0;i<data.length;i++){
-					//array_score_order.push(data[i].user.truename +"\n"+ (i+1));
 					array_score_data.push((1000-filter(data[i].all_check_score,data[i].checked_num,0)));
 				}
 			}else{
@@ -339,7 +351,6 @@ $(function(){
 			array_five_score_back.length=0;
 			if(data!=''){
 				for(var i=0;i<data.length;i++){
-					array_five_name_back.push(data[i].user.truename);
 					if(data[i].ranking_change<0){
 					array_five_score_back.push((data[i].ranking_change+'').substr(1));
 				}else{
@@ -356,6 +367,20 @@ $(function(){
 			}else{
 				min_five_back = eval("Math.min(" + array_five_score_back.toString() + ")").toFixed(0)-1;
 			}
+
+			// 给考核进步top5排名次
+			var rank = new Array();
+			rank[0] = 1 ;
+			for(var i=1; i<array_five_score_back.length; i++){
+				if(array_five_score_back[i-1] == array_five_score_back[i]  ){
+					rank[i] = rank[i-1];
+				}else{
+					rank[i] = i + 1;
+				}				
+			}
+			for(var i=0;i<array_five_score_back.length;i++){
+				array_five_name_back.push(data[i].user.truename+"\n"+ (rank[i]));
+			}
 		}
 	}
   
@@ -687,14 +712,14 @@ $(function(){
 				{
 					name:'访问来源',
 					type:'pie',
-					radius : '65%',
+					radius : '55%',
 					center: ['50%', '50%'],
 					data:array_points,
 					itemStyle:{ 
 					normal:{ 
 						label:{ 
 							show: true, 
-							formatter: '{b} : {c}人 ({d}%)'  
+							formatter: '{b} :\n{c}人 ({d}%)'  
 						}, 
 						labelLine :{show:true} 
 						} 
@@ -956,7 +981,7 @@ $(function(){
 					normal:{ 
 						label:{ 
 							show: true, 
-							formatter: '{b} : {c}分 ({d}%)'  
+							formatter: '{b} :\n{c}分 ({d}%)'  
 						}, 
 						labelLine :{show:true} 
 						} 

+ 18 - 7
VisualInspection/js/statistics/total_company_statistics.js

@@ -210,7 +210,6 @@ $(function(){
 					array_road_score.length=0;
 			for(var i=0;i<data.length;i++){
 				if(data!=''){
-					array_road.push(data[i].feeStationName);
 					array_road_score.push((1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
 		        }else{
 					array_road.length=0;
@@ -221,12 +220,25 @@ $(function(){
 				min_road = 0;
 				else
 				min_road = 	eval("Math.min(" + array_road_score.toString() + ")").toFixed(0)-10;
+
+				// 给道管中心排名次
+				var rank = new Array();
+				rank[0] = 1 ;
+				for(var i=1; i<array_road_score.length; i++){
+					if(array_road_score[i-1] == array_road_score[i]  ){
+						rank[i] = rank[i-1];
+					}else{
+						rank[i] = i +1;
+					}				
+				}
+				for(var i=0;i<array_road_score.length;i++){
+					array_road.push(data[i].feeStationName+"\n"+ (rank[i]));
+				}
 		}else if(type == 4){
 			array_allStation_score.length=0;
 			array_allStation.length=0;
             for(var i=0;i<data.length;i++){
 				if(data!='' && data.length!=0){
-					//array_allStation.push(data[i].feeStationName.substr(0,data[i].feeStationName.length-3));
 					array_allStation_score.push((1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
 				}else{
 					array_allStation_score.length=0;
@@ -248,7 +260,6 @@ $(function(){
 						rank[i] = i +1;
 					}				
 				}
-				//console.log(rank);
 				for(var i=0;i<array_allStation_score.length;i++){
 					array_allStation.push(data[i].feeStationName.substr(0,data[i].feeStationName.length-3)+"\n"+ (rank[i]));
 				}
@@ -500,14 +511,14 @@ $(function(){
 					{
 						name:'访问来源',
 						type:'pie',
-						radius : '65%',
+						radius : '55%',
 						center: ['50%', '50%'],
 						data:array_points,
 						itemStyle:{ 
 						normal:{ 
 							label:{ 
 								show: true, 
-							    formatter: '{b} : {c}人 ({d}%)'
+							    formatter: '{b} :\n{c}人 ({d}%)'
 							}, 
 							labelLine :{show:true} 
 							} 
@@ -543,7 +554,7 @@ $(function(){
 				}
 				},
 				grid:{
-                    width:"80%",
+                    width:"75%",
 					
                 },
 				calculable : true,
@@ -709,7 +720,7 @@ $(function(){
 						normal:{ 
 							label:{ 
 								show: true, 
-								formatter: '{b} : {c}分 ({d}%)'  
+								formatter: '{b} :\n{c}分 ({d}%)' 
 							}, 
 							labelLine :{show:true} 
 							} 

+ 1 - 1
VisualInspection/view/statistics/assess_type.html

@@ -29,7 +29,7 @@
                  <thead>
                         <tr>
                         <th rowspan="2" width="67px">道管整体排名</th><th rowspan="2" width="67px">单位</th><th rowspan="2" width="67px">管道内收费站排名</th>
-                        <th rowspan="2" width="85px">单位</th><th rowspan="2" width="67px">收费值机岗位人数</th><th rowspan="2" width="67px">被检查人数</th>
+                        <th rowspan="2" width="85px">单位</th><th rowspan="2" width="67px">收费值机岗位人数</th><th rowspan="2" width="67px">受检人数</th>
                         <th rowspan="2" width="67px">受检次数</th><th colspan="9" height="40px">存在问题扣分详情</th>
                         <th rowspan="2" width="67px">受检人平均每人次扣分(千分制)</th><th rowspan="2" width="67px">管道中心受检人平均每人次扣分(千分制)</th>
                         </tr>

+ 2 - 2
VisualInspection/view/statistics/road_manage_statistics.html

@@ -43,7 +43,7 @@
     <div class="row-5">
         <div id="roadManager-points-assess" style="width:49%;height:400px;float:left;"></div>
         <div class="line-3"></div>
-        <div id="tollStation-score-rank" style="width:49%;height:400px;float:left;"></div>
+        <div id="tollStation-score-rank" style="width:49%;height:400px;float:left;padding-right:0px;"></div>
     </div>
     </div>
 
@@ -61,7 +61,7 @@
 
   <div class="border-line">
     <div class="row-3"><div><span>人员考核得分后20名</span></div></div>
-    <div id="people-rank-suf" style="height: 100%;height:400px;"></div>
+    <div id="people-rank-suf" style="height: 100%;height:400px;padding-right:10px;"></div>
     </div>
 
   <div class="border-line">