wangjianguo 8 лет назад
Родитель
Сommit
f8a5f0aede

+ 15 - 13
VisualInspection/js/statistics/assess_ranking.js

@@ -21,6 +21,8 @@ function queryEmpClick() {
     var end_date = $("#end-time").val();
     var start_score = $("#start-score").val();
     var end_score = $("#end-score").val();
+    var start_num = $("#start-num").val();
+    var end_num = $("#end-num").val();
     var flag = param_method(start_score, end_score);
     if (flag == false) {
         return;
@@ -50,7 +52,7 @@ function queryEmpClick() {
         "end_date": end_date,
     }
     var url = "statistics/employee/order";
-    getEmployeeInfosClick(url, param, start_score, end_score)
+    getEmployeeInfosClick(url, param, start_score, end_score,start_num,end_num)
 }
 
 function initQueryEmp() {
@@ -62,6 +64,8 @@ function initQueryEmp() {
     var end_time = endD.getFullYear() + "-" + (endD.getMonth() + 1) + "-" + endD.getDate();
     var start_score = $("#start-score").val();
     var end_score = $("#end-score").val();
+    var start_num = $("#start-num").val();
+    var end_num = $("#end-num").val();
     setJobSelect("#jobSelect");
     //默认初始化时间页面回显
     $("#start-time").val("2017-6-09");//start_time);
@@ -78,21 +82,22 @@ function initQueryEmp() {
         "end_date": end_date,
     }
     var url = "statistics/employee/order";
-    getEmployeeInfosClick(url, param, start_score, end_score);
+    getEmployeeInfosClick(url, param, start_score, end_score,start_num,end_num);
 }
 /**
  * click
  * @param {*} url 
  * @param {*} param 
  */
-function getEmployeeInfosClick(url, param, start_score, end_score) {
+function getEmployeeInfosClick(url, param, start_score, end_score,start_num,end_num) {
     post_common_service(url, param, function (data) {
 
         var strTbody = '';
         var count = 0;
         for (var i = 0; i < data.length; i++) {
             var score = 1000 - filterByZeroHandle(average(data[i]).toFixed(2), '0');
-            var flag = judgeParamFilter(data, i, score, start_score, end_score)
+            var check_number = filter(data[i].checked_num, '0');
+            var flag = judgeParamFilter(data, i, score, start_score, end_score,check_number,start_num,end_num)
             if (flag) {
 
                 html = "<button id=\"user_" + data[i].user.id + "\" onClick='addTask(" + data[i].user.id + ",\"" + data[i].user.truename + "\",\"" + param.start_date + "\",\"" + param.end_date + "\")'  class=\"btn\" style='margin-left: 10px;padding: 0px;border: 0;background: none;' type=\"button\"><i class=\"icon icon-plus-sign\"></i></button>"
@@ -516,23 +521,20 @@ function filterSlash(value, check_num) {
     }
 }
 
-function judgeParamFilter(data, i, score, start_score, end_score) {
+function judgeParamFilter(data, i, score, start_score, end_score,check_number,start_num,end_num) {
     var flag1 = false;
     if (score >= parseFloat(start_score) && score <= parseFloat(end_score)) {
         flag1 = true;
     } else {
         flag1 = false;
     }
-    var checkCount = $("#check_count").val();
-    if (checkCount) {
-        if (filter(data[i].checked_num, '0') == checkCount) {
-            flag2 = true;
-        } else {
-            flag2 = false;
-        }
-    } else {
+    var flag2 = false;
+    if (check_number >= parseFloat(start_num) && check_number <= parseFloat(end_num)) {
         flag2 = true;
+    } else {
+        flag2 = false;
     }
+
     var jobSelect = $("#jobSelect").val();
     if (jobSelect) {
         if (data[i].user.positionid == jobSelect) {

+ 45 - 0
VisualInspection/js/statistics/common_statistic.js

@@ -134,4 +134,49 @@ function getDays(mouth,datet){
         days= 30;   
     }
     return days ;
+}
+
+
+var months = new Array();
+var m = new Date().getMonth();
+var mth_pre = 12-m; 
+var initDate;
+/**
+ * 根据当前年月动态将13个月push数组
+ */
+function month_method(){		
+    // 将上一年的当前月的上个月到12月加入到数组里
+    for(var i=1;i<=mth_pre+1;i++){
+        mth_handle(m,(year-1),(m++));
+    }
+    // 将当前年的一月份到当前月的上个月加入到数组里
+    for(var i=1;i<=new Date().getMonth();i++){
+        mth_handle(i,year,i);
+    }
+    // 当前年月的上个月(初始化图用)
+    if((new Date().getMonth()+'').length == 1){
+        initDate = year+"/0"+new Date().getMonth();
+    }else{
+        initDate = year+"/"+new Date().getMonth();
+    }
+}
+// 抽出的方法
+function mth_handle(mth,getYear,num){
+    if((mth+'').length==1){
+        months.push(((getYear)+'').substr(2)+"/0"+(num));
+    }else{
+        months.push(((getYear)+'').substr(2)+"/"+(num));
+    }
+}
+
+/**
+ * 月份下拉框
+ */
+function select_option(){
+    var str = $(".div-month select");
+    var temp = '';
+    for(var i=0;i<months.length;i++){
+        temp += "<option value=20"+months[i]+">20"+months[i]+"</option>"
+    }
+    str.append(temp);
 }

+ 39 - 55
VisualInspection/js/statistics/road_manage_statistics.js

@@ -5,8 +5,6 @@
 		var score_rank;
 		var points_assess;
 		var check_type;
-		var months = ['1','2','3','4','5','6','7','8','9','10','11','12'];
-		var monthsCH = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'];
 		var select_road = $(".div-roadManage select").val();
         var array_year_score = new Array();
 		var array_points = new Array();
@@ -33,8 +31,12 @@
 		var min_suff;
 		var flag = true;
 $(function(){
-    // 显示当前月份
-	$(".div-month select").val(month);
+    // 公用方法,根据当前年月动态将13个月push数组
+	month_method();
+	// 公用方法,月份下拉框
+    select_option();
+	// 回显当前年月份
+	$(".div-month select").val(initDate);
 
 	$(".div-button button").click(function(){	
 		var select_month = $(".div-month select").val();
@@ -73,8 +75,8 @@ $(function(){
 	 */
 	function init_company_year_assess(url,select_road){
 		var param = {
-			"start_date":(year-1)+"-12-25 23:00:00",
-			"end_date":year+"-12-25 23:00:00",
+			"start_date":(year-1)+"-"+new Date().getMonth()+"-"+date+" 23:00:00",
+			"end_date":year+"-"+new Date().getMonth()+"-"+date+" 23:00:00",
 			"dept_id":select_road,
 			"queryType":1
 		}
@@ -87,109 +89,92 @@ $(function(){
 	 * 初始化图二
 	 */
 	function init_company_points_assess(url,mon,select_road){
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
 		var param = {
-			"mth":year + "/" +mon,
+			"mth":mon,
 			"dept_id":select_road,
 			"queryType":1
 		}
 		initRqueset(url,param,2);
 	}
-    init_company_points_assess("statistics/lost/score/rate",month+'',select_road);
+    init_company_points_assess("statistics/lost/score/rate",initDate+'',select_road);
     
 	/**
 	 * 初始化图三
 	 */
-    function init_stationAll_rank(url,mon,select_road){		
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
+    function init_stationAll_rank(url,mon,select_road){	
 		var param = {
-			"mth":year + "/" +mon,
+			"mth":mon,
 			"dept_id":select_road
 		};
 		initRqueset(url,param,3);
 	}
-	init_stationAll_rank("statistics/score/manage/tollgate/info",month+"",select_road);
+	init_stationAll_rank("statistics/score/manage/tollgate/info",initDate+"",select_road);
 
 	/**
 	 * 初始化图四
 	 */
 	function init_people_rank_pre(url,mon,select_road){
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
 		var param = {
-			mth:year + "/" +mon,
+			mth:mon,
 			"dept_id":select_road,
 			"queryType":1,
             "order_type":0
 		}
 		initRqueset(url,param,4);
 	}
-    //init_people_rank_pre("statistics/stuff/score/info",month+'',select_road);
+    //init_people_rank_pre("statistics/stuff/score/info",initDate+'',select_road);
     
     /**
 	 * 初始化图五
 	 */
 	function init_people_rank_suf(url,mon,select_road){
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
 		var param = {
-			mth:year + "/" +mon,
+			mth:mon,
 			"dept_id":select_road,
 			"queryType":1,
             "order_type":1
 		}
 		initRqueset(url,param,5);
 	}
-    init_people_rank_suf("statistics/stuff/score/info",month+'',select_road);
+    init_people_rank_suf("statistics/stuff/score/info",initDate+'',select_road);
 
 	/**
 	 * 初始化图六
 	 */
-    function init_server_check_type(url,mon,select_road){		
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
+    function init_server_check_type(url,mon,select_road){
 		var param = {
-			"mth":year + "/" +mon,
+			"mth":mon,
 			"dept_id":select_road,
 			"queryType":1
 		};
 		initRqueset(url,param,6);
 	}
-	init_server_check_type("statistics/lost/itemscore/rate",month+"",select_road);
+	init_server_check_type("statistics/lost/itemscore/rate",initDate+"",select_road);
 
 	/**
 	 * 初始化图七
 	 */
     function init_each_people_points(url,mon,select_road){
-		var yearPre = year;
-		if(mon==1){
-			prev_mth = 12+'';
-			yearPre = yearPre-1;
+		var prev_mth;
+		// 判断当前年月是否为一月
+		if(parseInt((mon+'').substr(5)) == 1){
+			prev_mth = ((parseInt((mon+'').substr(0,4)))-1)+"/12";
 		}else{
-		var prev_mth = (mon-1)+'';	
-		}	
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
-		if(prev_mth.length==1){
-			prev_mth = "0" + prev_mth;
+			if((parseInt((mon+'').substr(5))+'').length == 1){
+				prev_mth = (mon+'').substr(0,4) + '/0'+ (parseInt((mon+'').substr(5))-1);
+			}else{
+				prev_mth = (mon+'').substr(0,4) + '/'+ (parseInt((mon+'').substr(5))-1);
+			}
 		}
 		var param = {
-			"mth":year + "/" + mon,
-			"prev_mth": yearPre + "/" + prev_mth,
+			"mth": mon,
+			"prev_mth": prev_mth,
 			"dept_id":select_road,
 			"queryType":1
 		};
 		initRqueset(url,param,7);
 	}
-	init_each_people_points("statistics/lost/twice/itemscore/rate",month+"",select_road);
+	init_each_people_points("statistics/lost/twice/itemscore/rate",initDate+"",select_road);
 	/**
 	 * 请求
 	 * @param {*} url 
@@ -233,19 +218,18 @@ $(function(){
 	function data_array(data,type){
 		if(type == 1){
 			array_year_score.length = 0;
-			months.length = 0;
 		    if(data!='' && data.length!=0){
-				if(data.length<12){
-					for(var i=0;i<12-data.length;i++){
+				if(data.length<13){
+					for(var i=0;i<13-data.length;i++){
 						// 不足月份补0
 						array_year_score.push(0);
 					}
 					}		
 				for(var i=0;i<data.length;i++){
-					if(months.indexOf(parseInt(data[i].mth.substr(5)))){
-						// 指定位置插入值
-						array_year_score.splice(parseInt(data[i].mth.substr(5))-1,0,
-						(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
+					if(months.indexOf(data[i].mth.substr(2))){
+							// 指定位置插入值
+							array_year_score.splice(months.indexOf(data[i].mth.substr(2)),0,
+							(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
 					}
 				}
 			}else{
@@ -485,7 +469,7 @@ $(function(){
 						{
 							type : 'category',
 							boundaryGap : false,
-							data : ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']
+							data : months
 						}
 					],
 					yAxis : [

+ 52 - 66
VisualInspection/js/statistics/toll_station_statistics.js

@@ -1,8 +1,6 @@
      	var year = new Date().getFullYear();
 		var month = new Date().getMonth();
 		var date = new Date().getDate();
-		var months = ['1','2','3','4','5','6','7','8','9','10','11','12'];
-		var monthsCH = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'];
 		var select_road = $(".div-roadManage select").val();
 		var select_station = $("#second").val();
 		var array_year_score = new Array();
@@ -31,9 +29,13 @@
 		var flag = true;
 		var change_echart = 2;
 $(function(){     
+    // 公用方法,根据当前年月动态将13个月push数组
+	month_method();
+	// 公用方法,月份下拉框
+    select_option();
+	// 回显当前年月份
+	$(".div-month select").val(initDate);
 	setSecond();
-    // 显示当前月份
-	$(".div-month select").val(month);
 
 	$(".div-button button").click(function(){	
 		var select_month = $(".div-month select").val();
@@ -68,8 +70,8 @@ $(function(){
 	 */
 	function init_tollStation_year_assess(url,select_station){
 		var param = {
-			"start_date":(year-1)+"-12-25 23:00:00",
-			"end_date":year+"-12-25 23:00:00",
+			"start_date":(year-1)+"-"+new Date().getMonth()+"-"+date+" 23:00:00",
+			"end_date":year+"-"+new Date().getMonth()+"-"+date+" 23:00:00",
 			"dept_id":select_station,
 			"queryType":2
 		}
@@ -81,11 +83,8 @@ $(function(){
 	 * 初始化图二
 	 */
 	function init_company_points_assess(url,mon,select_station){
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
 		var param = {
-			mth:year + "/" +mon,
+			mth:mon,
 			"dept_id":select_station,
 			"queryType":2
 		}
@@ -96,23 +95,21 @@ $(function(){
 	 * 初始化图三 前5名
 	 */
 	function init_progress_rank_assess(url,mon,select_station){
-		var yearPre = year;
-		if(mon==1){
-			prev_mth = 12+'';
-			yearPre = yearPre-1;
+		var prev_mth;
+		// 判断当前年月是否为一月
+		if(parseInt((mon+'').substr(5)) == 1){
+			prev_mth = ((parseInt((mon+'').substr(0,4)))-1)+"/12";
 		}else{
-		var prev_mth = (mon-1)+'';	
-		}	
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
-		if(prev_mth.length==1){
-			prev_mth = "0" + prev_mth;
+			if((parseInt((mon+'').substr(5))+'').length == 1){
+				prev_mth = (mon+'').substr(0,4) + '/0'+ (parseInt((mon+'').substr(5))-1);
+			}else{
+				prev_mth = (mon+'').substr(0,4) + '/'+ (parseInt((mon+'').substr(5))-1);
+			}
 		}
 		var param = {
-			"mth":year + "/" + mon,
+			"mth": mon,
 			"dept_id":select_station,
-			"prev_mth": yearPre + "/" + prev_mth,
+			"prev_mth": prev_mth,
 			"order_type":0
 		};
 		initRqueset(url,param,3);
@@ -122,11 +119,8 @@ $(function(){
 	 * 初始化图四
 	 */
 	function init_people_score_rank(url,mon,select_station){
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
 		var param = {
-			mth:year + "/" +mon,
+			"mth":mon,
 			"dept_id":select_station,
 			"queryType":2,
             "order_type":1
@@ -137,12 +131,9 @@ $(function(){
 	/**
 	 * 初始化图五
 	 */
-    function init_server_check_type(url,mon,select_station){		
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
+    function init_server_check_type(url,mon,select_station){	
 		var param = {
-			"mth":year + "/" +mon,
+			"mth":mon,
 			"dept_id":select_station,
 			"queryType":2
 		};
@@ -154,22 +145,20 @@ $(function(){
 	 * 初始化图六
 	 */
     function init_each_people_points(url,mon,select_station){
-		var yearPre = year;
-		if(mon==1){
-			prev_mth = 12+'';
-			yearPre = yearPre-1;
+		var prev_mth;
+		// 判断当前年月是否为一月
+		if(parseInt((mon+'').substr(5)) == 1){
+			prev_mth = ((parseInt((mon+'').substr(0,4)))-1)+"/12";
 		}else{
-		var prev_mth = (mon-1)+'';	
-		}	
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
-		if(prev_mth.length==1){
-			prev_mth = "0" + prev_mth;
+			if((parseInt((mon+'').substr(5))+'').length == 1){
+				prev_mth = (mon+'').substr(0,4) + '/0'+ (parseInt((mon+'').substr(5))-1);
+			}else{
+				prev_mth = (mon+'').substr(0,4) + '/'+ (parseInt((mon+'').substr(5))-1);
+			}
 		}
 		var param = {
-			"mth":year + "/" + mon,
-			"prev_mth": yearPre + "/" + prev_mth,
+			"mth":mon,
+			"prev_mth": prev_mth,
 			"dept_id":select_station,
 			"queryType":2
 		};
@@ -180,23 +169,21 @@ $(function(){
 	 * 图切换后5名
 	 */
 	function init_backward_rank_assess(url,mon,select_station){
-		var yearPre = year;
-		if(mon==1){
-			prev_mth = 12+'';
-			yearPre = yearPre-1;
+		var prev_mth;
+		// 判断当前年月是否为一月
+		if(parseInt((mon+'').substr(5)) == 1){
+			prev_mth = ((parseInt((mon+'').substr(0,4)))-1)+"/12";
 		}else{
-		var prev_mth = (mon-1)+'';	
-		}	
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
-		if(prev_mth.length==1){
-			prev_mth = "0" + prev_mth;
+			if((parseInt((mon+'').substr(5))+'').length == 1){
+				prev_mth = (mon+'').substr(0,4) + '/0'+ (parseInt((mon+'').substr(5))-1);
+			}else{
+				prev_mth = (mon+'').substr(0,4) + '/'+ (parseInt((mon+'').substr(5))-1);
+			}
 		}
 		var param = {
-			"mth":year + "/" + mon,
+			"mth":mon,
 			"dept_id":select_station,
-			"prev_mth": yearPre + "/" + prev_mth,
+			"prev_mth": prev_mth,
 			"order_type":1
 		};
 		initRqueset(url,param,7);
@@ -248,19 +235,18 @@ $(function(){
 	function data_array(data,type){
 		if(type == 1){
 			array_year_score.length = 0;
-			months.length = 0;
 			if(data!='' && data.length!=0){
-				if(data.length<12){
-					for(var i=0;i<12-data.length;i++){
+				if(data.length<13){
+					for(var i=0;i<13-data.length;i++){
 						// 不足月份补0
 						array_year_score.push(0);
 					}
 				}		
 			for(var i=0;i<data.length;i++){
-				if(months.indexOf(parseInt(data[i].mth.substr(5)))){
-					// 指定位置插入值
-					array_year_score.splice(parseInt(data[i].mth.substr(5))-1,0,
-					(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
+				if(months.indexOf(data[i].mth.substr(2))){
+						// 指定位置插入值
+						array_year_score.splice(months.indexOf(data[i].mth.substr(2)),0,
+						(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
 				}
 			}
 			}else{
@@ -620,7 +606,7 @@ $(function(){
 				{
 					type : 'category',
 					boundaryGap : false,
-					data : monthsCH
+					data : months
 				}
 			],
 			yAxis : [

+ 114 - 128
VisualInspection/js/statistics/total_company_statistics.js

@@ -1,9 +1,6 @@
 		var year = new Date().getFullYear();
-		var month = new Date().getMonth();
 		var date = new Date().getDate();
 		var array_year_score = new Array();
-		var months = ['1','2','3','4','5','6','7','8','9','10','11','12'];
-		var monthsCH = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'];
 		var array_points = new Array();
 		var array_road = new Array();
 		var array_road_score = new Array();
@@ -25,8 +22,12 @@
 		var min_allStation;
 		var score_ranking = new Array();
 $(function(){
-	// 显示当前月份
-	$(".div-month select").val(month);
+    // 公用方法,根据当前年月动态将13个月push数组
+	month_method();
+	// 公用方法,月份下拉框
+    select_option();
+	// 回显当前年月份
+	$(".div-month select").val(initDate);
 
 	$(".query-company").click(function(){	
 		var select_month = $(".div-month select").val();
@@ -52,8 +53,8 @@ $(function(){
 	 */
 	function init_company_year_assess(){
 		var param = {
-			"start_date":(year-1)+"-12-25 23:00:00",
-			"end_date":year+"-12-25 23:00:00"
+			"start_date":(year-1)+"-"+new Date().getMonth()+"-"+date+" 23:00:00",
+			"end_date":year+"-"+new Date().getMonth()+"-"+date+" 23:00:00"
 		}
 		initRqueset("statistics/score/year/info",param,1);
 
@@ -63,86 +64,72 @@ $(function(){
 	 * 初始化图二
 	 */
 	function init_company_points_assess(url,mon){
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
 		var param = {
-			"mth":year + "/" +mon,
+			"mth":mon,
 			"queryType":0
 		}
 		initRqueset(url,param,2);
 	}
-    init_company_points_assess("statistics/lost/score/rate",month+"");
+    init_company_points_assess("statistics/lost/score/rate",initDate+"");
 
 
 	/**
 	 * 初始化图三
 	 */
-    function init_road_manager_score_rank_three(url,mon){		
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
+    function init_road_manager_score_rank_three(url,mon){	
 		var param = {
-			"mth":year + "/" +mon
+			"mth":mon
 		};
 		initRqueset(url,param,3);
 	}
-	init_road_manager_score_rank_three("statistics/score/center/manage/info",month+"");
+	init_road_manager_score_rank_three("statistics/score/center/manage/info",initDate+"");
 
 	/**
 	 * 初始化图四
 	 */
-    function init_stationAll_rank_four(url,mon){		
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
+    function init_stationAll_rank_four(url,mon){	
 		var param = {
-			"mth":year + "/" +mon
+			"mth":mon
 		};
 		initRqueset(url,param,4);
 	}
-	init_stationAll_rank_four("statistics/score/tollgate/info",month+"");
+	init_stationAll_rank_four("statistics/score/tollgate/info",initDate+"");
 
 	/**
 	 * 初始化图五
 	 */
     function init_server_check_type_five(url,mon){		
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
 		var param = {
-			"mth":year + "/" +mon,
+			"mth":mon,
 			"queryType":0
 		};
 		initRqueset(url,param,5);
 	}
-	init_server_check_type_five("statistics/lost/itemscore/rate",month+"");
+	init_server_check_type_five("statistics/lost/itemscore/rate",initDate+"");
 
 	/**
 	 * 初始化图六
 	 */
     function init_each_people_points_six(url,mon){
-		var yearPre = year;
-		if(mon==1){
-			prev_mth = 12+'';
-			yearPre = yearPre-1;
+		var prev_mth;
+		// 判断当前年月是否为一月
+		if(parseInt((mon+'').substr(5)) == 1){
+			prev_mth = ((parseInt((mon+'').substr(0,4)))-1)+"/12";
 		}else{
-		var prev_mth = (mon-1)+'';	
-		}	
-		if(mon.length==1){
-			mon = "0" +mon;
-		}
-		if(prev_mth.length==1){
-			prev_mth = "0" + prev_mth;
+			if((parseInt((mon+'').substr(5))+'').length == 1){
+				prev_mth = (mon+'').substr(0,4) + '/0'+ (parseInt((mon+'').substr(5))-1);
+			}else{
+				prev_mth = (mon+'').substr(0,4) + '/'+ (parseInt((mon+'').substr(5))-1);
+			}
 		}
 		var param = {
-			"mth":year + "/" + mon,
-			"prev_mth": yearPre + "/" + prev_mth,
+			"mth": mon,
+			"prev_mth": prev_mth,
 			"queryType":0
 		};
 		initRqueset(url,param,6);
 	}
-	init_each_people_points_six("statistics/lost/twice/itemscore/rate",month+"");
+	init_each_people_points_six("statistics/lost/twice/itemscore/rate",initDate+"");
     
 	/**
 	 * 请求
@@ -186,19 +173,18 @@ $(function(){
 	function data_array(data,type){
 		if(type == 1){
 			array_year_score.length = 0;
-			months.length = 0;
 			if(data!='' && data.length!=0){
-			if(data.length<12){
-				for(var i=0;i<12-data.length;i++){
+			if(data.length<13){
+				for(var i=0;i<13-data.length;i++){
 					// 不足月份补0
 					array_year_score.push(0);
 				}
 			}		
 				for(var i=0;i<data.length;i++){
-					if(months.indexOf(parseInt(data[i].mth.substr(5)))){
-						// 指定位置插入值
-						array_year_score.splice(parseInt(data[i].mth.substr(5))-1,0,
-						(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
+					if(months.indexOf(data[i].mth.substr(2))){
+							// 指定位置插入值
+							array_year_score.splice(months.indexOf(data[i].mth.substr(2)),0,
+							(1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
 					}
 				}
 			}else{
@@ -407,19 +393,19 @@ $(function(){
 						trigger: 'axis'
 					},
 					noDataLoadingOption :{
-						text: '暂无数据',
-						effect:'bubble',
-                    effectOption : {
-                        effect: {
-                            n: 0 //气泡个数为0 
-                        }
-                    },
-                    textStyle: {
-                        fontSize: 20,
+					text: '暂无数据',
+					effect:'bubble',
+					effectOption : {
+						effect: {
+							n: 0 //气泡个数为0 
+						}
+					},
+					textStyle: {
+						fontSize: 20,
 						fontFamily:'cursive',
-                        fontWeight: 'bold'
-                    }
-                    },
+						fontWeight: 'bold'
+					}
+					},
 					legend: {
 						data:['平均分']
 					},
@@ -431,7 +417,7 @@ $(function(){
 						{
 							type : 'category',
 							boundaryGap : false,
-							data : monthsCH
+							data : months
 						}
 					],
 					yAxis : [
@@ -478,19 +464,19 @@ $(function(){
 					formatter:  "公司考核扣分占比 <br/>{b} : {c}人 ({d}%)"
 				},
 				noDataLoadingOption :{
-                    text: '暂无数据',
-                    effect:'bubble',
-                    effectOption : {
-                        effect: {
-                            n: 0 //气泡个数为0 
-                        }
-                    },
-                    textStyle: {
-                        fontSize: 20,
-						fontFamily:'cursive',
-                        fontWeight: 'bold'
-                    }
-                },
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+				},
 				toolbox: {
 					show : true,
 					feature : {
@@ -543,19 +529,19 @@ $(function(){
 					trigger: 'axis'
 				},
 				noDataLoadingOption :{
-                    text: '暂无数据',
-                    effect:'bubble',
-                    effectOption : {
-                        effect: {
-                            n: 0 //气泡个数为0 
-                        }
-                    },
-                    textStyle: {
-                        fontSize: 20,
-						fontFamily:'cursive',
-                        fontWeight: 'bold'
-                    }
-                },
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+				},
 				grid:{
                     width:"80%",
 					
@@ -612,19 +598,19 @@ $(function(){
 					trigger: 'axis'
 				},
 				noDataLoadingOption :{
-                    text: '暂无数据',
-                    effect:'bubble',
-                    effectOption : {
-                        effect: {
-                            n: 0 //气泡个数为0 
-                        }
-                    },
-                    textStyle: {
-                        fontSize: 20,
-						fontFamily:'cursive',
-                        fontWeight: 'bold'
-                    }
-                },
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+			    },
 				legend: {
 					data:['平均分']
 				},
@@ -680,19 +666,19 @@ $(function(){
 					formatter:  "温馨服务检查占比 <br/>{b} : {c}分 ({d}%)"
 				},
 				noDataLoadingOption :{
-                    text: '暂无数据',
-                    effect:'bubble',
-                    effectOption : {
-                        effect: {
-                            n: 0 //气泡个数为0 
-                        }
-                    },
-                    textStyle: {
-                        fontSize: 20,
-						fontFamily:'cursive',
-                        fontWeight: 'bold'
-                    }
-                },
+				text: '暂无数据',
+				effect:'bubble',
+				effectOption : {
+					effect: {
+						n: 0 //气泡个数为0 
+					}
+				},
+				textStyle: {
+					fontSize: 20,
+					fontFamily:'cursive',
+					fontWeight: 'bold'
+				}
+				},
 				toolbox: {
 					show : true,
 					feature : {
@@ -743,19 +729,19 @@ $(function(){
 				trigger: 'axis'
 			},
 			noDataLoadingOption :{
-                    text: '暂无数据',
-                    effect:'bubble',
-                    effectOption : {
-                        effect: {
-                            n: 0 //气泡个数为0 
-                        }
-                    },
-                    textStyle: {
-                        fontSize: 20,
-						fontFamily:'cursive',
-                        fontWeight: 'bold'
-                    }
-                },
+			text: '暂无数据',
+			effect:'bubble',
+			effectOption : {
+				effect: {
+					n: 0 //气泡个数为0 
+				}
+			},
+			textStyle: {
+				fontSize: 20,
+				fontFamily:'cursive',
+				fontWeight: 'bold'
+			}
+		    },
 			grid:{
                     width:"80%",	
                 },

+ 11 - 2
VisualInspection/view/statistics/emp_ranking.html

@@ -36,9 +36,18 @@
             </div>
             <div class="form-group">
                 <label for="exampleInputAccount1" class="col-sm-1">考核次数</label>
-                <div class="col-sm-2" style="width:150px;">
-                    <input type="text" id="check_count" class="form-control" value="">
+
+                <div class="col-sm-3" style="width:60px;">
+                    <input type="text" id="start-num" class="form-control form-date" style="width:60px;" value="0">
                 </div>
+                <div class="to-score" style="float:left;margin-left:20px;padding-top: 6px;"><label> - </label></div>
+                <div class="col-sm-4" style="width:60px;margin-left:10px;">
+                    <input type="text" id="end-num" class="form-control form-date" style="width:60px;" value="10">
+                </div>
+
+                <!--<div class="col-sm-2" style="width:150px;">
+                    <input type="text" id="check_count" class="form-control" value="">
+                </div>-->
                 <label for="exampleInputAccount1" class="col-sm-1">职位</label>
                 <div class="col-sm-2" style="width:150px;">
                     <select class="form-control" id="jobSelect">

+ 1 - 0
VisualInspection/view/statistics/personal_data_statistics.html

@@ -1,4 +1,5 @@
 <script src="/js/lib/echarts/build/dist/echarts.js"></script>
+<script src="/js/statistics/common_statistic.js?__inline"></script>
 <script src="/js/statistics/personal_data_statistics.js"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/personal_data_statistics.css">
 <div class="container-right">

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

@@ -1,4 +1,5 @@
 <script src="/js/lib/echarts/build/dist/echarts.js"></script>
+<script src="/js/statistics/common_statistic.js?__inline"></script>
 <script src="/js/statistics/road_manage_statistics.js"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/road_manage_statistics.css">
 <div class="container-right">
@@ -7,7 +8,7 @@
     <div class="row-2">
         <div>
             <div class="div-month"><select>
-                <option value="1">一月</option>
+                <!--<option value="1">一月</option>
                 <option value="2">二月</option>
                 <option value="3">三月</option>
                 <option value="4">四月</option>
@@ -18,7 +19,7 @@
                 <option value="9">九月</option>
                 <option value="10">十月</option>
                 <option value="11">十一月</option>
-                <option value="12">十二月</option>
+                <option value="12">十二月</option>-->
                 </select></div>
         <div class="div-roadManage"><select>
             <option value="30">连云港</option>
@@ -76,6 +77,10 @@
   </div>
   
 </div>
+<script>
+    $(document).ready(function() {
 
+    });
+</script>
 
        

+ 9 - 4
VisualInspection/view/statistics/toll_station_statistics.html

@@ -1,12 +1,13 @@
 <script src="/js/lib/echarts/build/dist/echarts.js"></script>
+<script src="/js/statistics/common_statistic.js?__inline"></script>
 <script src="/js/statistics/toll_station_statistics.js"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/toll_station_statistics.css">
 <div class="container-right">
     <!--<div class="row-1"><span>收费站统计</span></div>
     <div class="line-1"></div>-->
     <div class="row-2">
-        <div><div class="div-month"><select>
-            <option value="1">一月</option>
+        <div class="div-month"><select>
+                <!--<option value="1">一月</option>
                 <option value="2">二月</option>
                 <option value="3">三月</option>
                 <option value="4">四月</option>
@@ -17,8 +18,8 @@
                 <option value="9">九月</option>
                 <option value="10">十月</option>
                 <option value="11">十一月</option>
-                <option value="12">十二月</option>
-            </select></div>
+                <option value="12">十二月</option>-->
+                </select></div>
         <div class="div-roadManage"><select id="first">
             <option value="30">连云港</option>
             <option value="31">盐城</option>
@@ -67,5 +68,9 @@
   </div>
   
 </div>
+<script>
+    $(document).ready(function() {
 
+    });
+</script>
        

+ 7 - 2
VisualInspection/view/statistics/total_company_statistics.html

@@ -1,4 +1,5 @@
 <script src="/js/lib/echarts/build/dist/echarts.js"></script>
+<script src="/js/statistics/common_statistic.js?__inline"></script>
 <script src="/js/statistics/total_company_statistics.js"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/total_company_statistics.css">
 <div class="container-right">
@@ -7,7 +8,7 @@
     <div class="row-2">
         <div>
             <div class="div-month"><select>
-                <option value="1">一月</option>
+                <!--<option value="1">一月</option>
                 <option value="2">二月</option>
                 <option value="3">三月</option>
                 <option value="4">四月</option>
@@ -18,7 +19,7 @@
                 <option value="9">九月</option>
                 <option value="10">十月</option>
                 <option value="11">十一月</option>
-                <option value="12">十二月</option>
+                <option value="12">十二月</option>-->
                 </select></div>
             <div class="div-button"><button class="query-company">查询</button></div>
         </div>
@@ -61,6 +62,10 @@
   </div>
   
 </div>
+<script>
+    $(document).ready(function() {
 
+    });
+</script>