Browse Source

统计功能模块

wangjianguo 8 năm trước cách đây
mục cha
commit
5da3e5dd6d

+ 19 - 17
VisualInspection/css/statistics/check_workload_statistics.css

@@ -50,20 +50,14 @@
     float:left;
 }
 .name1{
-    width:30px;
+    width:100px;
     height:50px;
     float:left;
     margin-left: 20px;
     line-height: 50px;
-}
-.name2{
-    width:50px;
-    height:50px;
-    float:left;
-    line-height: 50px;
 }             
 .div-start{
-    width:160px;
+    width:120px;
     height:50px;
     float:left;
     margin-left: 20px;
@@ -73,24 +67,24 @@
     width:20px;
     height:50px;
     float:left;
-    margin-left: 15px;
+    margin-left: 20px;
     line-height: 50px;
 }
-.div-start select{
-    width:160px;
+.div-start input,.div-end input{
+    width:120px;
     height:30px;
+    border: 1px solid #ccc;
+    font-size: 14px;
+    padding: 5px 8px;
+    border-radius: 4px;
 }
 .div-end{
-    width:150px;
+    width:120px;
     height:50px;
     float:left;
     margin-left: 5px;
     line-height: 50px;
 }
-.div-end select{
-    width:160px;
-    height:30px;
-}
 .div-check{
     width:190px;
     height:50px;
@@ -101,12 +95,20 @@
 .div-check select{
     width:190px;
     height:30px;
+    border-radius: 4px;
 }
 .div-select{
     width:80px;
     height:50px;
     float:left;
-    margin-left: 20px;
+    margin-left: 10px;
+    line-height: 50px;
+}
+.div-select select{
+    width:80px;
+    height:30px;
+    border: 1px solid #ccc;
+    border-radius: 4px;
 }
 .query{
     width:80px;

+ 12 - 9
VisualInspection/css/statistics/personal_data_statistics.css

@@ -87,10 +87,10 @@
     line-height: 50px;
 }            
 .div-start{
-    width:160px;
+    width:120px;
     height:50px;
     float:left;
-    margin-left: 20px;
+    margin-left: 30px;
     line-height: 50px;
 }
 .div-to{
@@ -100,31 +100,34 @@
     margin-left: 15px;
     line-height: 50px;
 }
-.div-start select{
-    width:160px;
+.div-start input,.div-end input{
+    width:120px;
     height:30px;
+    border: 1px solid #ccc;
+    font-size: 14px;
+    padding: 5px 8px;
+    border-radius: 4px;
 }
 .div-end{
-    width:150px;
+    width:120px;
     height:50px;
     float:left;
     margin-left: 5px;
     line-height: 50px;
 }
-.div-end select{
-    width:160px;
-    height:30px;
-}
 .div-check{
     width:190px;
     height:50px;
     float:left;
     margin-left: 50px;
     line-height: 50px;
+    border-radius: 4px;
 }
 .div-check select{
     width:190px;
     height:30px;
+    border: 1px solid #ccc;
+    border-radius: 4px;
 }
 .div-select{
     width:80px;

+ 5 - 1
VisualInspection/css/statistics/toll_station_statistics.css

@@ -48,12 +48,16 @@
     line-height: 50px;
 }
 .div-station{
-    width:80px;
+    width:120px;
     height:50px;
     float:left;
     margin-left: 20px;
     line-height: 50px;
 }
+#second{
+    width:120px;
+    height:25px;
+}
 .div-button{
     width:80px;
     height:50px;

+ 113 - 0
VisualInspection/js/statistics/check_workload_statistics.js

@@ -0,0 +1,113 @@
+// 默认初始化日期一个月
+$(".div-start input").val(new Date().getFullYear()+"-"+new Date().getMonth()+"-"+new Date().getDate());
+$(".div-end input").val(new Date().getFullYear()+"-"+(new Date().getMonth()+1)+"-"+new Date().getDate());
+var start_date = $(".div-start input").val()+" 00:00:00";
+var end_date = $(".div-end input").val()+" 23:59:59";
+var user_id = $("#select-personal").val();      
+var cur_status;
+var hide = false;
+
+$(function(){
+
+    //*************************************数据表格******************************************
+	function initAppealPage(start_date,end_date,user_id) {
+		initQueryParams();
+		queryAppeal(start_date,end_date,user_id);
+    }
+
+	function initQueryParams() {
+		//获取页面参数
+		var page_params = $.zui.store.get("page_params");
+		if(page_params && page_params.status) {
+			cur_status = page_params.status;
+		}
+	}
+
+	function queryAppeal(start_date,end_date,user_id){
+		var data = {
+			"start_date":start_date,
+				"end_date":end_date,
+				"user_id":user_id,
+				"queryType":1
+		}
+		if(hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION) ||  hasRole(ROLE_JICHA) || roleContains('STATION')) {
+			hide = true;
+		}
+		
+		var cols = [
+					{width: 40,height:60, text: '序号', flex: true, colClass: 'text-center',field:'num'},
+                    {width: 40,height:60, text: '稽查人员', flex: true,colClass: '',field:'checkman_name' },
+                    {width: 100,height:60, text: '任务名称', flex: true,colClass: '',field:'start_date' },
+					{width: 100,height:60, text: '时间段', flex: true,colClass: '',field:'start_date' },
+                    {width: 40,height:60, text: '考核人员', flex: true,colClass: '',field:'checked_name' },
+                    {width: 40,height:60, text: '考核部门', flex: true,colClass: '',field:'feeStationName' },
+					{width: 40,height:60, text: '扣分数',  flex: true, colClass: '',field:'score'},
+					{width: 100,height:60, text: '考核项',  flex: true, colClass: '',sort: 'down',field:'name'},
+					{width: 100,height:60, text: '扣分凭证', type: 'imagedd', flex: true, hide:hide,field:'pics'},
+		];
+		if(cur_status==12 || cur_status==13){
+			data.check_status_arr = [12,13];
+		}
+		$('.datatable').mytable({'cols':cols,
+								'url':"/statistics/one/checkedItem/detail/info",
+								'param':data}
+								);
+	}
+
+	function queryUnAssignedTable(){
+		var cols = [
+					{width: 40,height:60, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
+					{width: 40,height:60, text: '稽查人员', type: 'string', flex: true, sort: 'down',field: 'checkman_name'},
+                    {width: 100,height:60, text: '任务名称', type: 'string', flex: true, sort: 'down',field: 'name'},
+                    {width: 100,height:60, text: '时间段', type: 'string', flex: true, sort: 'down',field: 'name'},
+                    {width: 40,height:60, text: '考核人员', type: 'string', flex: true, sort: 'down',field: 'checked_name'},
+                    {width: 40,height:60, text: '考核部门', type: 'string', flex: true, sort: 'down',field: 'feeStationName'},
+					{width: 40,height:60, text: '扣分数', type: 'string', flex: true, field: 'checked_person_name'},
+					{width: 100,height:60, text: '考核项', type: 'string', flex: true, sort: 'down',field: 'checked_dept_name'},
+					{width: 100,height:60, text: '扣分凭证', type: 'imagedd', flex: true, field: 'checkman_name'},
+		] ;
+	}
+
+
+    $(".query button").click(function(){
+		var start_date = $(".div-start input").val()+" 00:00:00";
+		var end_date = $(".div-end input").val()+" 23:59:59";
+		var startStr = start_date.replace(/-/g, '/');
+		var endStr = end_date.replace(/-/g, '/');
+		var start = new Date(startStr);
+		var end = new Date(endStr);
+		if(start>end){
+			tip("开始时间不能比结束时间大");
+            return;
+		}
+		var user_id = $("#select-personal").val(); 
+        // 表格
+        initAppealPage(start_date,end_date,user_id);
+	});
+    
+    /**
+     * 稽查人员下拉框
+     */
+    function select_personal(){
+        var tempStr = '';
+        var sec = document.getElementById('select-personal');
+        post_common_service( "user/getAllCheckman",{},function(data){
+            if(data.length!=0){
+                for(var i=0;i<data.length;i++){
+                    tempStr += "<option value="+data[i].id+">"+data[i].truename+"</option>";
+                }
+                sec.innerHTML = tempStr;
+            }else{
+                sec.innerHTML = '';
+            }
+                var user_id = $("#select-personal").val(); 
+                // 初始化表格
+                initAppealPage(start_date,end_date,user_id);
+        },function(error){
+        	return "" ;
+    	});
+    }
+    select_personal();
+
+
+});

+ 216 - 28
VisualInspection/js/statistics/personal_data_statistics.js

@@ -1,4 +1,210 @@
+var year = new Date().getFullYear();
+var month = new Date().getMonth()+1;
+var months = ['1','2','3','4','5','6','7','8','9','10','11','12'];
+var monthsCH = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'];
+var array_year_score = new Array();
+var array_check_type = new Array();
+var user_id = 2424;      // 用户假数据
+var score_statistics;
+var check_type;
+var cur_status;
+var hide = false;
+// 默认初始化日期一个月
+$(".div-start input").val(new Date().getFullYear()+"-"+new Date().getMonth()+"-"+new Date().getDate());
+$(".div-end input").val(new Date().getFullYear()+"-"+(new Date().getMonth()+1)+"-"+new Date().getDate());
+var start_date = $(".div-start input").val()+" 00:00:00";
+var end_date = $(".div-end input").val()+" 23:59:59";
+
+
+/**
+ * 预加载方法
+ */		
 $(function(){
+
+//*************************************数据表格******************************************
+	function initAppealPage(start_date,end_date) {
+		initQueryParams();
+		queryAppeal(start_date,end_date);
+    }
+
+	function initQueryParams() {
+		//获取页面参数
+		var page_params = $.zui.store.get("page_params");
+		if(page_params && page_params.status) {
+			cur_status = page_params.status;
+		}
+	}
+
+	function queryAppeal(start_date,end_date){
+		var data = {
+			"start_date":start_date,
+				"end_date":end_date,
+				"user_id":user_id,
+				"queryType":0
+		}
+		if(hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION) ||  hasRole(ROLE_JICHA) || roleContains('STATION')) {
+			hide = true;
+		}
+		
+		var cols = [
+					{width: 50, text: '序号', flex: true, colClass: 'text-center',field:'num'},
+					{width: 100, text: '时间段', flex: true,colClass: '',field:'start_date' },
+					{width: 60, text: '扣分数',  flex: true, colClass: '',field:'score'},
+					{width: 100, text: '考核项',  flex: true, colClass: '',sort: 'down',field:'name'},
+					{width: 100, text: '扣分凭证', type: 'imagedd', flex: true, hide:hide,field:'pics'},
+		];
+		if(cur_status==12 || cur_status==13){
+			data.check_status_arr = [12,13];
+		}
+		$('.datatable').mytable({'cols':cols,
+								'url':"/statistics/one/checkedItem/detail/info",
+								'param':data}
+								);
+	}
+
+	function queryUnAssignedTable(){
+			var cols = [
+					{width: 50, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
+					{width: 100, text: '时间段', type: 'string', flex: true, sort: 'down',field: 'start_date'},
+					{width: 60, text: '扣分数', type: 'string', flex: true, field: 'score'},
+					{width: 100, text: '考核项', type: 'string', flex: true, sort: 'down',field: 'name'},
+					{width: 100, text: '扣分凭证', type: 'imagedd', flex: true, field: 'pics'},
+						] ;
+	}
+
+    // 表格
+	initAppealPage(start_date,end_date);
+
+//*************************************画图******************************************
+
+	// 加载图配置
+	echart();
+
+	$(".query button").click(function(){
+		var start_date = $(".div-start input").val()+" 00:00:00";
+		var end_date = $(".div-end input").val()+" 23:59:59";
+		var startStr = start_date.replace(/-/g, '/');
+		var endStr = end_date.replace(/-/g, '/');
+		var start = new Date(startStr);
+		var end = new Date(endStr);
+		if(start>end){
+			tip("开始时间不能比结束时间大");
+			return;
+		}
+		// 查询图一
+		init_personal_score_statistics("statistics/one/person/year/info",user_id);
+		// 查询图二
+		init_personal_check_type("statistics/one/person/checkedItem/info",user_id,start_date,end_date);
+		// 加载图配置
+		echart();
+		// 表格
+	    initAppealPage(start_date,end_date);
+	});
+    /**
+	 * 初始化图一
+	 * @param {*} url 
+	 * @param {*} dept_id 
+	 */
+	function init_personal_score_statistics(url,user_id){
+		var param = {
+			"start_date":year+"-01-01 00:00:00",
+			"end_date":(year+1)+"-01-01 00:00:00",
+			"dept_id":user_id
+		}
+		initRqueset(url,param,1);
+	}
+	init_personal_score_statistics("statistics/one/person/year/info",user_id);
+
+    /**
+	 * 初始化图二
+	 * @param {*} url 
+	 * @param {*} dept_id 
+	 */
+	function init_personal_check_type(url,user_id,start_date,end_date){
+		var param = {
+			"start_date":start_date,
+			"end_date":end_date,
+			"dept_id":user_id,
+		}
+		initRqueset(url,param,2);
+	}
+	init_personal_check_type("statistics/one/person/checkedItem/info",user_id,start_date,end_date);
+    
+	/**
+	 * 请求
+	 * @param {*} url 
+	 * @param {*} param 
+	 * @param {*} type 
+	 */
+	function initRqueset(url,param,type){
+		post_common_service( url,param,function(data){
+			data_array(data,type);
+			if(type == 1){
+				// 画图
+				score_statistics.setOption(personal_score_statistics()); 
+			}else if(type == 2){
+				// 画图
+				check_type.setOption(personal_check_type());  
+			}
+		},function(error){
+        	return "" ;
+    	});
+	}
+
+	/**
+	 * 数组数据
+	 * @param {*} data 
+	 * @param {*} type 
+	 */
+	function data_array(data,type){
+		if(type == 1){
+			array_year_score.length = 0;
+			months.length = 0;
+			if(data.length!=0){
+				if(data.length<12){
+					for(var i=0;i<12-data.length;i++){
+						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)).toFixed(1)));
+					}
+				}
+		    }else{
+				array_year_score.length = 0;
+				months.length = 0;
+			}	
+		}else if(type == 2){
+			array_check_type.length=0;
+                if(data.length != 0){
+					for(var i=0;i<data.length;i++){
+						array_check_type.push({"value": data[i].all_check_score,"name":data[i].name});
+				    } 
+				}else{
+					array_check_type.length=0;	
+				}
+		}
+	}
+
+	 /**
+	 * 除数为0处理
+	 * @param {*} num 
+	 * @param {*} num1 
+	 * @param {*} num2 
+	 * @param {*} num4 
+	 */
+	function filter_handler(num,num1,num2,num4){
+		if(num1 == 0 || num2 == 0){
+			return num4;
+		}else{
+			return (num/num1)/num2;
+		}
+	}
+
+	function echart(){
         // 路径配置
         require.config({
             paths: {
@@ -12,21 +218,18 @@ $(function(){
 			'echarts/chart/line', 
 			'echarts/chart/pie'
 		],
-	function (ec) {
-			// 基于准备好的dom,初始化echarts图表
-			var score_statistics = ec.init(document.getElementById('personal-score-statistics')); 
-			var check_type = ec.init(document.getElementById('personal-check-type'));
-			
-			// 为echarts对象加载数据 
-			score_statistics.setOption(personal_score_statistics()); 
-			check_type.setOption(personal_check_type()); 
-		
+			function (ec) {
+					// 基于准备好的dom,初始化echarts图表
+					score_statistics = ec.init(document.getElementById('personal-score-statistics')); 
+					check_type = ec.init(document.getElementById('personal-check-type'));	
+			}
+       ); 
+	}
 
 			/**
 			 * 图一
 			 */
 	    	function personal_score_statistics(){
-			
 				option = {
 					color : [ '#00ced1' ],
 					tooltip : {
@@ -43,7 +246,7 @@ $(function(){
 						{
 							type : 'category',
 							boundaryGap : false,
-							data : ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']
+							data : monthsCH
 						}
 					],
 					yAxis : [
@@ -60,7 +263,7 @@ $(function(){
 						{
 							name:'平均分',
 							type:'line',
-							data:[800, 790, 780, 900, 1000,780, 1000,880,900,950,900,800,790],
+							data: array_year_score,
 							markPoint : {
 								data : [
 									{type : 'max', name: '最大值'},
@@ -114,26 +317,11 @@ $(function(){
 						type:'pie',
 						radius : '65%',
 						center: ['50%', '50%'],
-						data:[
-							{value:335, name:'环境卫生'},
-							{value:310, name:'仪容仪表'},
-							{value:234, name:'表情'},
-							{value:135, name:'收费动作'},
-							{value:335, name:'文明用语'},
-							{value:310, name:'工作纪律'},
-							{value:234, name:'便民服务'},
-							{value:135, name:'安全管理'}
-						]
+						data:array_check_type
 					}
 				]
 			};
 			return option;
 		}
 
-       
-			
-		}
-  ); 
-
-   
 });

+ 420 - 47
VisualInspection/js/statistics/road_manage_statistics.js

@@ -1,4 +1,381 @@
+		var year = new Date().getFullYear();
+		var month = new Date().getMonth()+1;
+		var date = new Date().getDate();
+		var year_assess ;
+		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();
+		var array_allStation = new Array();
+		var array_allStation_score = new Array();
+		var array_check_type = new Array();
+		var array_points_name = new Array();
+		var array_points_pre = new Array();
+		var arrar_points_month = new Array();
+		var array_score_order = new Array();
+		var array_score_data = new Array();
+		var array_score_last = new Array();
+		var array_get_score = new Array();
+		var year_assess ;
+		var score_rank;
+		var points_assess;
+		var check_type;
+		var people_points;
+		var rank_pre;
+		var rank_suf;
 $(function(){
+    // 显示当前月份
+	$(".div-month select").val(month);
+
+	$(".div-button button").click(function(){	
+		var select_month = $(".div-month select").val();
+		var select_road = $(".div-roadManage select").val();
+		// 查询图一
+		init_company_year_assess("statistics/score/year/info",select_road);
+		// 查询图二
+		init_company_points_assess("statistics/lost/score/rate",select_month+'',select_road);
+		// 查询图三
+		init_stationAll_rank("statistics/score/manage/tollgate/info",select_month+'',select_road);
+		// 查询图四
+        init_people_rank_pre("statistics/stuff/score/info",select_month+'',select_road);
+        // 查询图五
+        init_people_rank_suf("statistics/stuff/score/info",select_month+'',select_road);
+        // 查询图六
+		init_server_check_type("statistics/lost/itemscore/rate",select_month+"",select_road);
+        // 查询图七
+		init_each_people_points("statistics/lost/twice/itemscore/rate",select_month+"",select_road);
+		// 加载图配置
+		echart();
+	});
+
+	// 加载图配置
+		echart();
+	/**
+	 * 初始化图一
+	 */
+	function init_company_year_assess(url,select_road){
+		var param = {
+			"start_date":year+"-01-01 00:00:00",
+			"end_date":(year+1)+"-01-01 00:00:00",
+			"dept_id":select_road,
+			"queryType":1
+		}
+		initRqueset(url,param,1);
+
+	}
+	init_company_year_assess("statistics/score/year/info",select_road);
+
+	/**
+	 * 初始化图二
+	 */
+	function init_company_points_assess(url,mon,select_road){
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon,
+			"dept_id":select_road,
+			"queryType":1
+		}
+		initRqueset(url,param,2);
+	}
+    init_company_points_assess("statistics/lost/score/rate",month+'',select_road);
+    
+	/**
+	 * 初始化图三
+	 */
+    function init_stationAll_rank(url,mon,select_road){		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon,
+			"dept_id":select_road
+		};
+		initRqueset(url,param,3);
+	}
+	init_stationAll_rank("statistics/score/manage/tollgate/info",month+"",select_road);
+
+	/**
+	 * 初始化图四
+	 */
+	function init_people_rank_pre(url,mon,select_road){
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			mth:year + "/" +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);
+    
+    /**
+	 * 初始化图五
+	 */
+	function init_people_rank_suf(url,mon,select_road){
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			mth:year + "/" +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);
+
+	/**
+	 * 初始化图六
+	 */
+    function init_server_check_type(url,mon,select_road){		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon,
+			"dept_id":select_road,
+			"queryType":1
+		};
+		initRqueset(url,param,6);
+	}
+	init_server_check_type("statistics/lost/itemscore/rate",month+"",select_road);
+
+	/**
+	 * 初始化图七
+	 */
+    function init_each_people_points(url,mon,select_road){
+		var prev_mth = (mon-1)+'';		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		if(prev_mth.length==1){
+			prev_mth = "0" + prev_mth;
+		}
+		var param = {
+			"mth":year + "/" + mon,
+			"prev_mth": year + "/" + prev_mth,
+			"dept_id":select_road,
+			"queryType":1
+		};
+		initRqueset(url,param,7);
+	}
+	init_each_people_points("statistics/lost/twice/itemscore/rate",month+"",select_road);
+	/**
+	 * 请求
+	 * @param {*} url 
+	 * @param {*} param 
+	 * @param {*} type 
+	 */
+	function initRqueset(url,param,type){
+		post_common_service( url,param,function(data){
+			data_array(data,type);
+			if(type == 1){
+				// 画图
+				year_assess.setOption(roadManager_year_assess());
+			}else if(type == 2){
+				// 画图
+				points_assess.setOption(roadManager_points_assess()); 
+			}else if(type == 3){
+				// 画图
+				score_rank.setOption(tollStation_score_rank());
+			}else if(type == 4){
+				// 画图
+				rank_pre.setOption(people_rank_pre());
+			}else if(type == 5){
+				// 画图
+				rank_suf.setOption(people_rank_suf());
+			}else if(type == 6){
+				// 画图
+				check_type.setOption(server_check_type());
+			}else if(type == 7){
+				// 画图
+				people_points.setOption(each_people_points());
+			}
+		},function(error){
+        	return "" ;
+    	});
+	}
+    /**
+	 * 数组数据
+	 * @param {*} data 
+	 * @param {*} type 
+	 */
+	function data_array(data,type){
+		if(type == 1){
+			array_year_score.length = 0;
+			months.length = 0;
+			if(data!=''){
+			if(data.length<12){
+				for(var i=0;i<12-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)).toFixed(1)));
+				}
+			}
+			}else{
+					array_year_score.length = 0;
+					months.length = 0;
+			}	
+		}else if(type == 2){
+			array_points.length=0;
+				if(data!=''){
+						array_points.push({"value": (data.people_num-(data.score_fifteen+data.score_fifty+data.score_over_fifty)),"name":'满分'});
+						array_points.push({"value": data.score_fifteen,"name":'0-15分'});
+						array_points.push({"value": data.score_fifty,"name":'15-50分'});
+						array_points.push({"value": data.score_over_fifty,"name":'50分以上'});
+				}else{
+					array_points.length=0;	
+				}
+			
+		}else if(type == 3){
+			array_allStation_score.length=0;
+			array_allStation.length=0;
+            for(var i=0;i<data.length;i++){
+				if(data!=''){
+					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)).toFixed(1)));
+				}else{
+					array_allStation_score.length=0;
+			        array_allStation.length=0;	
+				}
+	        }
+		}else if(type == 4){
+			array_score_order.length=0;
+			array_score_data.length=0;
+				if(data!=''){
+					for(var i=0;i<data.length;i++){
+						array_score_order.push(data[i].user.truename+"\n"+"("+data[i].user.fee_station_name.substr(0,data[i].user.fee_station_name.length-3)+")");
+						array_score_data.push((1000-filter(data[i].all_check_score,data[i].checked_num,0)).toFixed(1));
+				    }
+				 }else{
+					array_score_order.length=0;
+			        array_score_data.length=0;	
+				}
+	    }else if(type == 5){
+			array_score_last.length=0;
+			array_get_score.length=0;
+				if(data!=''){
+					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)).toFixed(1));
+				    }
+				 }else{
+					array_score_last.length=0;
+			        array_get_score.length=0;	
+				}
+	    }else if(type == 6){
+			array_check_type.length=0;
+                if(data.length != 0){
+					for(var i=0;i<data.length;i++){
+						array_check_type.push({"value": data[i].all_check_score,"name":data[i].name});
+				    } 
+				}else{
+					array_check_type.length=0;	
+				}
+		}else if(type == 7){
+			array_points_name.length=0;
+			array_points_pre.length=0;
+			arrar_points_month.length=0;
+			data_each_people_points(data);
+		}
+	}
+
+	function data_each_people_points(data){
+			var flag = true;
+			var name = ['环境卫生','仪容仪表着装','表情','动作','文明用语','工作纪律及行为举止','便民服务','安全管理']
+			var Tmth = data.Tmth;
+			var Pmth = data.Pmth;
+			var Ntemp = new Array();
+			var Ptemp = new Array();
+			var Ttemp = new Array();
+			
+			for(var i= 0; i < name.length;i++){
+				flag = true;
+				if(Tmth.length > 0){
+					for(var j= 0; j< Tmth.length;j++){
+						if(name[i] == Tmth[j].name && Tmth[j].all_check_score != null){
+							Ttemp[i] = Tmth[j].all_check_score;
+							break;
+						}else{
+							Ttemp[i] = 0;
+						}
+					}
+				}else{
+					Ttemp[i] = 0;
+				}
+				if(Pmth.length > 0){
+					for(var m= 0; m< Pmth.length;m++){
+						if(name[i] == Pmth[m].name && Pmth[m].all_check_score != null){
+							Ptemp[i] = Pmth[m].all_check_score;
+							break;
+						}else{
+							Ptemp[i] = 0;
+						}
+					}
+				}else{
+					Ptemp[i] = 0;
+				}
+				if(Ttemp[i]== 0 && Ptemp[i] == 0){
+					name[i] = "";
+					flag = null;
+				}
+				if(name[i] != ""){
+					if(name[i]=='仪容仪表着装'){
+						name[i]='仪表';
+					}
+					if(name[i]=='工作纪律及行为举止'){
+						name[i]='行为';
+					}
+					array_points_name.push(name[i]);
+				}
+
+				if(flag){
+					array_points_pre.push(Ptemp[i]);
+					arrar_points_month.push(Ttemp[i]);
+				}
+			}
+	}
+
+    /**
+	 * 除数为0处理
+	 * @param {*} num 
+	 * @param {*} num1 
+	 * @param {*} num2 
+	 * @param {*} num4 
+	 */
+	function filter_handler(num,num1,num2,num4){
+		if(num1 == 0 || num2 == 0){
+			return num4;
+		}else{
+			return (num/num1)/num2;
+		}
+	}
+
+	function filter(num,num1,num2){
+		if(num1 == 0){
+			return num2;
+		}else{
+			return (num/num1);
+		}
+	}
+    
+    function echart(){
         // 路径配置
         require.config({
             paths: {
@@ -15,21 +392,16 @@ $(function(){
 		],
 	function (ec) {
 			// 基于准备好的dom,初始化echarts图表
-			var year_assess = ec.init(document.getElementById('roadManager-year-assess')); 
-			var points_assess = ec.init(document.getElementById('roadManager-points-assess'));
-			var score_rank = ec.init(document.getElementById('tollStation-score-rank'));
-			var rank_pre = ec.init(document.getElementById('people-rank-pre'));
-            var rank_suf = ec.init(document.getElementById('people-rank-suf'));
-			var check_type = ec.init(document.getElementById('server-check-type'));
-			var people_points = ec.init(document.getElementById('each-people-points'));
-			// 为echarts对象加载数据 
-			year_assess.setOption(roadManager_year_assess()); 
-			points_assess.setOption(roadManager_points_assess()); 
-			score_rank.setOption(tollStation_score_rank());
-			rank_pre.setOption(people_rank_pre());
-            rank_suf.setOption(people_rank_suf());
-			check_type.setOption(server_check_type());
-			people_points.setOption(each_people_points());
+			year_assess = ec.init(document.getElementById('roadManager-year-assess')); 
+			points_assess = ec.init(document.getElementById('roadManager-points-assess'));
+		    score_rank = ec.init(document.getElementById('tollStation-score-rank'));
+			rank_pre = ec.init(document.getElementById('people-rank-pre'));
+            rank_suf = ec.init(document.getElementById('people-rank-suf'));
+			check_type = ec.init(document.getElementById('server-check-type'));
+			people_points = ec.init(document.getElementById('each-people-points'));
+			}
+		); 
+	}	
 
 			/**
 			 * 图一
@@ -69,7 +441,7 @@ $(function(){
 						{
 							name:'平均分',
 							type:'line',
-							data:[800, 790, 780, 900, 1000,780, 1000,880,900,950,900,800,790],
+							data:array_year_score,
 							markPoint : {
 								data : [
 									{type : 'max', name: '最大值'},
@@ -123,12 +495,7 @@ $(function(){
 						type:'pie',
 						radius : '65%',
 						center: ['50%', '50%'],
-						data:[
-							{value:335, name:'0-15分'},
-							{value:310, name:'15-50分'},
-							{value:234, name:'50分以上'},
-							{value:135, name:'满分'}
-						]
+						data:array_points
 					}
 				]
 			};
@@ -145,12 +512,14 @@ $(function(){
 				tooltip : {
 					trigger: 'axis'
 				},
-				
+				grid:{
+                    width:420  // 图表宽度
+                },
 				calculable : true,
 				xAxis : [
 					{
 						type : 'category',
-						data : ['灌云北','灌云东','灌南东','响水','六套','滨海','蔡桥',]
+						data : array_allStation
 					}
 				],
 				yAxis : [
@@ -164,7 +533,7 @@ $(function(){
 					{
 						
 						type:'bar',
-						data:[980, 950, 1000,944,988,963,949],
+						data:array_allStation_score,
 					    itemStyle: {
 						normal: {
 							label: {
@@ -194,6 +563,10 @@ $(function(){
 				tooltip : {
 					trigger: 'axis'
 				},
+				grid:{
+                    width:470,  // 图表宽度
+					x:40
+                },
 				legend: {
 					data:['平均分']
 				},
@@ -201,8 +574,10 @@ $(function(){
 				xAxis : [
 					{
 						type : 'category',
-						data : ['小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)',
-                        '小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)']
+						axisLabel :{  
+                           interval:0  // 显示x轴所有信息,不隐藏部分  
+                        },
+						data : array_score_order
 					}
 				],
 				yAxis : [
@@ -216,7 +591,7 @@ $(function(){
 					{
 						name:'平均分',
 						type:'bar',
-						data:[910.0, 920, 945, 930, 970, 950, 955, 945, 985.6, 990.0],
+						data: array_score_data,
 					    itemStyle: {
 						normal: {
 							label: {
@@ -253,6 +628,10 @@ $(function(){
 				tooltip : {
 					trigger: 'axis'
 				},
+				grid:{
+                    width:470,  // 图表宽度
+					x:40
+                },
 				legend: {
 					data:['平均分']
 				},
@@ -260,8 +639,10 @@ $(function(){
 				xAxis : [
 					{
 						type : 'category',
-						data : ['小明\n(灌云北)','小明1\n(灌云北)','小明2\n(灌云北)','小明3\n(灌云北)','小明4\n(灌云北)',
-                        '小明5\n(灌云北)','小明6\n(灌云北)','小明7\n(灌云北)','小明8\n(灌云北)','小明9\n(灌云北)']
+						axisLabel :{  
+                           interval:0  // 显示x轴所有信息,不隐藏部分  
+                        },
+						data : array_score_last
 					}
 				],
 				yAxis : [
@@ -275,7 +656,7 @@ $(function(){
 					{
 						name:'平均分',
 						type:'bar',
-						data:[910.0, 920, 945, 930, 970, 950, 955, 945, 985.6, 990.0],
+						data: array_get_score,
 					    itemStyle: {
 						normal: {
 							label: {
@@ -336,16 +717,7 @@ $(function(){
 						type:'pie',
 						radius : '65%',
 						center: ['50%', '50%'],
-						data:[
-							{value:335, name:'环境卫生'},
-							{value:310, name:'仪容仪表'},
-							{value:234, name:'表情'},
-							{value:135, name:'收费动作'},
-							{value:335, name:'文明用语'},
-							{value:310, name:'工作纪律'},
-							{value:234, name:'便民服务'},
-							{value:135, name:'安全管理'}
-						]
+						data:array_check_type
 					}
 				]
 			};
@@ -360,6 +732,9 @@ $(function(){
 			tooltip : {
 				trigger: 'axis'
 			},
+			grid:{
+                    width:420  // 图表宽度
+                },
 			legend: {
 				data:['上月','本月']
 			},
@@ -367,7 +742,7 @@ $(function(){
 			xAxis : [
 				{
 					type : 'category',
-					data : ['环境卫生','仪容仪表','表情','收费动作','文明用语','工作纪律','便民服务','安全管理']
+					data : array_points_name
 				}
 			],
 			yAxis : [
@@ -379,7 +754,7 @@ $(function(){
 				{
 					name:'上月',
 					type:'bar',
-					data:[200.0, 400.9, 700.0, 230.2, 253.6, 760.7,880,500],
+					data: array_points_pre,
 					itemStyle: {
 						normal: {
 							label: {
@@ -392,7 +767,7 @@ $(function(){
 				{
 					name:'本月',
 					type:'bar',
-					data:[200.6, 500.9, 900.0, 260.4, 280.7, 700.7,500,800],
+					data: arrar_points_month,
 					itemStyle: {
 						normal: {
 							label: {
@@ -407,8 +782,6 @@ $(function(){
 					return option;
 			}
 			
-		}
-  ); 
-
+	
    
 });

+ 416 - 46
VisualInspection/js/statistics/toll_station_statistics.js

@@ -1,4 +1,387 @@
-$(function(){
+     	var year = new Date().getFullYear();
+		var month = new Date().getMonth()+1;
+		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();
+		var array_points = new Array();
+		var array_check_type = new Array();
+		var array_points_name = new Array();
+		var array_points_pre = new Array();
+		var arrar_points_month = new Array();
+		var array_score_order = new Array();
+		var array_score_data = new Array();
+		var array_five_name = new Array();
+		var array_five_score = new Array();
+		var year_assess;
+		var points_assess;
+		var check_type;
+		var people_points;
+		var score_rank;
+		var rank_assess;
+$(function(){     
+	setSecond();
+    // 显示当前月份
+	$(".div-month select").val(month);
+
+	$(".div-button button").click(function(){	
+		var select_month = $(".div-month select").val();
+		var select_station = $(".div-station select").val();
+		// 查询图一
+		init_tollStation_year_assess("statistics/score/year/info",select_station);
+		// 查询图二
+		init_company_points_assess("statistics/lost/score/rate",select_month+'',select_station);
+        // 查询图三
+		init_progress_rank_assess("statistics/fs/up/five",month+'',select_station)
+        // 查询图四
+		init_people_score_rank("statistics/stuff/score/info",select_month+'',select_station);
+        // 查询图五
+		init_server_check_type("statistics/lost/itemscore/rate",select_month+"",select_station);
+        // 查询图六
+		init_each_people_points("statistics/lost/twice/itemscore/rate",select_month+"",select_station);
+		// 加载图配置
+		echart();
+	});
+
+	// 加载图配置
+		echart();
+    
+	/**
+	 * 初始化图一
+	 */
+	function init_tollStation_year_assess(url,select_station){
+		var param = {
+			"start_date":year+"-01-01 00:00:00",
+			"end_date":(year+1)+"-01-01 00:00:00",
+			"dept_id":select_station,
+			"queryType":2
+		}
+		initRqueset(url,param,1);
+	}
+	
+
+	/**
+	 * 初始化图二
+	 */
+	function init_company_points_assess(url,mon,select_station){
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			mth:year + "/" +mon,
+			"dept_id":select_station,
+			"queryType":2
+		}
+		initRqueset(url,param,2);
+	}
+
+	/**
+	 * 初始化图三
+	 */
+	function init_progress_rank_assess(url,mon,select_station){
+		var prev_mth = (mon-1)+'';		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		if(prev_mth.length==1){
+			prev_mth = "0" + prev_mth;
+		}
+		var param = {
+			"mth":year + "/" + mon,
+			"dept_id":select_station,
+			"prev_mth": year + "/" + prev_mth,
+			"order_type":0
+		};
+		initRqueset(url,param,3);
+	} 
+
+	/**
+	 * 初始化图四
+	 */
+	function init_people_score_rank(url,mon,select_station){
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			mth:year + "/" +mon,
+			"dept_id":select_station,
+			"queryType":2,
+            "order_type":1
+		}
+		initRqueset(url,param,4);
+	}
+    
+	/**
+	 * 初始化图五
+	 */
+    function init_server_check_type(url,mon,select_station){		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon,
+			"dept_id":select_station,
+			"queryType":2
+		};
+		initRqueset(url,param,5);
+	}
+	
+
+	/**
+	 * 初始化图六
+	 */
+    function init_each_people_points(url,mon,select_station){
+		var prev_mth = (mon-1)+'';		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		if(prev_mth.length==1){
+			prev_mth = "0" + prev_mth;
+		}
+		var param = {
+			"mth":year + "/" + mon,
+			"prev_mth": year + "/" + prev_mth,
+			"dept_id":select_station,
+			"queryType":1
+		};
+		initRqueset(url,param,6);
+	}
+	
+
+	/**
+	 * 请求
+	 * @param {*} url 
+	 * @param {*} param 
+	 * @param {*} type 
+	 */
+	function initRqueset(url,param,type){
+		post_common_service( url,param,function(data){
+			data_array(data,type);
+			if(type == 1){
+				// 画图
+				year_assess.setOption(tollStation_year_assess()); 
+			}else if(type == 2){
+				// 画图
+				points_assess.setOption(tollStation_points_assess()); 
+			}else if(type == 3){
+				// 画图
+				rank_assess.setOption(progress_rank_assess());
+			}else if(type == 4){
+				// 画图
+				score_rank.setOption(people_score_rank());
+			}else if(type == 5){
+				// 画图
+				check_type.setOption(server_check_type());
+			}else if(type == 6){
+				// 画图
+				people_points.setOption(each_people_points());
+			}
+		},function(error){
+        	return "" ;
+    	});
+	}
+
+	/**
+	 * 数组数据
+	 * @param {*} data 
+	 * @param {*} type 
+	 */
+	function data_array(data,type){
+		if(type == 1){
+			array_year_score.length = 0;
+			months.length = 0;
+			if(data!=''){
+			if(data.length<12){
+				for(var i=0;i<12-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)).toFixed(1)));
+				}
+			}
+			}else{
+					array_year_score.length = 0;
+					months.length = 0;
+			}	
+		}else if(type == 2){
+			array_points.length=0;
+				if(data!=''){
+					array_points.push({"value": (data.people_num-(data.score_fifteen+data.score_fifty+data.score_over_fifty)),"name":'满分'});
+					array_points.push({"value": data.score_fifteen,"name":'0-15分'});
+					array_points.push({"value": data.score_fifty,"name":'15-50分'});
+					array_points.push({"value": data.score_over_fifty,"name":'50分以上'});
+				 }else{
+					array_points.length=0;	
+			}
+		}else if(type == 3){
+			array_five_name.length=0;
+			array_five_score.length=0;
+			if(data!=''){
+				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{
+					array_five_name.length=0;
+			        array_five_score.length=0;
+			    }
+		}else if(type == 4){
+		array_score_order.length=0;
+		array_score_data.length=0;
+			if(data!=''){
+				for(var i=0;i<data.length;i++){
+					array_score_order.push(data[i].user.truename);
+					array_score_data.push((1000-filter(data[i].all_check_score,data[i].checked_num,0)).toFixed(1));
+				}
+				}else{
+					array_score_order.length=0;
+					array_score_data.length=0;	
+			    }
+		}else if(type == 5){
+		array_check_type.length=0;
+				if(data.length != 0){
+					for(var i=0;i<data.length;i++){
+						array_check_type.push({"value": data[i].all_check_score,"name":data[i].name});
+					} 
+				}else{
+					array_check_type.length=0;	
+				}
+		}else if(type == 6){
+		array_points_name.length=0;
+		array_points_pre.length=0;
+		arrar_points_month.length=0;
+		data_each_people_points(data);
+		}
+	}
+  
+	function data_each_people_points(data){
+			var flag = true;
+			var name = ['环境卫生','仪容仪表着装','表情','动作','文明用语','工作纪律及行为举止','便民服务','安全管理']
+			var Tmth = data.Tmth;
+			var Pmth = data.Pmth;
+			var Ntemp = new Array();
+			var Ptemp = new Array();
+			var Ttemp = new Array();
+			
+			for(var i= 0; i < name.length;i++){
+				flag = true;
+				if(Tmth.length > 0){
+					for(var j= 0; j< Tmth.length;j++){
+						if(name[i] == Tmth[j].name && Tmth[j].all_check_score != null){
+							Ttemp[i] = Tmth[j].all_check_score;
+							break;
+						}else{
+							Ttemp[i] = 0;
+						}
+					}
+				}else{
+					Ttemp[i] = 0;
+				}
+				if(Pmth.length > 0){
+					for(var m= 0; m< Pmth.length;m++){
+						if(name[i] == Pmth[m].name && Pmth[m].all_check_score != null){
+							Ptemp[i] = Pmth[m].all_check_score;
+							break;
+						}else{
+							Ptemp[i] = 0;
+						}
+					}
+				}else{
+					Ptemp[i] = 0;
+				}
+				if(Ttemp[i]== 0 && Ptemp[i] == 0){
+					name[i] = "";
+					flag = null;
+				}
+				if(name[i] != ""){
+					if(name[i]=='仪容仪表着装'){
+						name[i]='仪表';
+					}
+					if(name[i]=='工作纪律及行为举止'){
+						name[i]='行为';
+					}
+					array_points_name.push(name[i]);
+				}
+
+				if(flag){
+					array_points_pre.push(Ptemp[i]);
+					arrar_points_month.push(Ttemp[i]);
+				}
+			}
+	    }
+		
+    /**
+	 * 根据道管中心获取收费站列表(下拉框)
+	 */
+	$(".div-roadManage select").change(function(){
+		setSecond();
+	});
+	function setSecond(){ 
+        var select_road = $(".div-roadManage select").val();
+		var sec = document.getElementById('second');
+		var tempStr = ''
+		var param = {
+			 "parentid":select_road
+		}
+		post_common_service("dept/getDeptInfosByDeptId",param,function(data){
+			if(data.length!=0){
+				for(var i=0;i<data.length;i++){
+					if(select_road==30){
+				 	    tempStr += "<option value="+data[i].id+">"+data[i].organname+"</option>";  
+			        }else if(select_road==31){
+						tempStr += "<option value="+data[i].id+">"+data[i].organname+"</option>";  
+					}else{
+						tempStr += "<option value="+data[i].id+">"+data[i].organname+"</option>";  
+					}
+				sec.innerHTML=tempStr;
+				}
+			}else{
+				sec.innerHTML='';	
+			}
+			var select_station = $("#second").val();
+			// 页面初始化
+			init_tollStation_year_assess("statistics/score/year/info",select_station);
+			init_company_points_assess("statistics/lost/score/rate",month+'',select_station);
+			init_progress_rank_assess("statistics/fs/up/five",month+'',select_station)
+			init_people_score_rank("statistics/stuff/score/info",month+'',select_station);
+			init_server_check_type("statistics/lost/itemscore/rate",month+"",select_station);
+			init_each_people_points("statistics/lost/twice/itemscore/rate",month+"",select_station);
+		},function(error){
+        	return "" ;
+    	});
+    }
+	
+    /**
+	 * 除数为0处理
+	 * @param {*} num 
+	 * @param {*} num1 
+	 * @param {*} num2 
+	 * @param {*} num4 
+	 */
+	function filter_handler(num,num1,num2,num3){
+		if(num1 == 0 || num2 == 0){
+			return num3;
+		}else{
+			return (num/num1)/num2;
+		}
+	}
+
+	function filter(num,num1,num2){
+		if(num1 == 0){
+			return num2;
+		}else{
+			return (num/num1);
+		}
+	}
+
+	function echart(){
         // 路径配置
         require.config({
             paths: {
@@ -13,22 +396,17 @@ $(function(){
 			'echarts/chart/bar',
 			'echarts/chart/pie'
 		],
-	function (ec) {
-			// 基于准备好的dom,初始化echarts图表
-			var year_assess = ec.init(document.getElementById('tollStation-year-assess')); 
-			var points_assess = ec.init(document.getElementById('tollStation-points-assess'));
-			var rank_assess = ec.init(document.getElementById('progress-rank-assess'));
-			var score_rank = ec.init(document.getElementById('people-score-rank'));
-			var check_type = ec.init(document.getElementById('server-check-type'));
-			var people_points = ec.init(document.getElementById('each-people-points'));
-			// 为echarts对象加载数据 
-			year_assess.setOption(tollStation_year_assess()); 
-			points_assess.setOption(tollStation_points_assess()); 
-			rank_assess.setOption(progress_rank_assess());
-			score_rank.setOption(people_score_rank());
-			check_type.setOption(server_check_type());
-			people_points.setOption(each_people_points());
-
+		function (ec) {
+				// 基于准备好的dom,初始化echarts图表
+				year_assess = ec.init(document.getElementById('tollStation-year-assess')); 
+				points_assess = ec.init(document.getElementById('tollStation-points-assess'));
+				rank_assess = ec.init(document.getElementById('progress-rank-assess'));
+				score_rank = ec.init(document.getElementById('people-score-rank'));
+				check_type = ec.init(document.getElementById('server-check-type'));
+				people_points = ec.init(document.getElementById('each-people-points'));
+				}
+	    ); 
+	}
 			/**
 			 * 图一
 			 */
@@ -50,7 +428,7 @@ $(function(){
 						{
 							type : 'category',
 							boundaryGap : false,
-							data : ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']
+							data : monthsCH
 						}
 					],
 					yAxis : [
@@ -67,7 +445,7 @@ $(function(){
 						{
 							name:'平均分',
 							type:'line',
-							data:[800, 790, 780, 900, 1000,780, 1000,880,900,950,900,800,790],
+							data:array_year_score,
 							markPoint : {
 								data : [
 									{type : 'max', name: '最大值'},
@@ -121,12 +499,7 @@ $(function(){
 						type:'pie',
 						radius : '65%',
 						center: ['50%', '50%'],
-						data:[
-							{value:335, name:'0-15分'},
-							{value:310, name:'15-50分'},
-							{value:234, name:'50分以上'},
-							{value:135, name:'满分'}
-						]
+						data:array_points
 					}
 				]
 			};
@@ -143,6 +516,9 @@ $(function(){
 				tooltip : {
 					trigger: 'axis'
 				},
+				grid:{
+                    width:420  // 图表宽度
+                },
 				legend: {
 					data:['进步名次']
 				},
@@ -150,7 +526,7 @@ $(function(){
 				xAxis : [
 					{
 						type : 'category',
-						data : ['小明','小白','小龙','大白菜','小蛇']
+						data : array_five_name
 					}
 				],
 				yAxis : [
@@ -162,7 +538,7 @@ $(function(){
 					{
 						name:'进步名次',
 						type:'bar',
-						data:[4, 9, 10,8,6],
+						data: array_five_score,
 					    itemStyle: {
 						normal: {
 							label: {
@@ -187,6 +563,10 @@ $(function(){
 				tooltip : {
 					trigger: 'axis'
 				},
+				grid:{
+                    width:1010,  // 图表宽度
+					x:40
+                },
 				legend: {
 					data:['平均分']
 				},
@@ -194,8 +574,7 @@ $(function(){
 				xAxis : [
 					{
 						type : 'category',
-						data : ['小明','小红','小白','小兰','小紫','小青','小明','小红','小白','小兰','小紫','小青',
-                                '小明','小红','小白','小兰','小紫','小青','小明','小红','小白','小兰','小紫','小青']
+						data : array_score_order
 					}
 				],
 				yAxis : [
@@ -209,8 +588,7 @@ $(function(){
 					{
 						name:'平均分',
 						type:'bar',
-						data:[950.0, 920, 945, 930, 970, 950, 955, 945, 985.6, 990.0, 975.4, 950.3,
-                              980.0, 920, 945, 930, 970, 950, 955, 995, 985.6, 990.0, 975.4, 950.3],
+						data: array_score_data,
 					    itemStyle: {
 						normal: {
 							label: {
@@ -265,16 +643,7 @@ $(function(){
 						type:'pie',
 						radius : '65%',
 						center: ['50%', '50%'],
-						data:[
-							{value:335, name:'环境卫生'},
-							{value:310, name:'仪容仪表'},
-							{value:234, name:'表情'},
-							{value:135, name:'收费动作'},
-							{value:335, name:'文明用语'},
-							{value:310, name:'工作纪律'},
-							{value:234, name:'便民服务'},
-							{value:135, name:'安全管理'}
-						]
+						data:array_check_type
 					}
 				]
 			};
@@ -289,6 +658,9 @@ $(function(){
 			tooltip : {
 				trigger: 'axis'
 			},
+			grid:{
+                    width:420  // 图表宽度
+                },
 			legend: {
 				data:['上月','本月']
 			},
@@ -296,7 +668,7 @@ $(function(){
 			xAxis : [
 				{
 					type : 'category',
-					data : ['环境卫生','仪容仪表','表情','收费动作','文明用语','工作纪律','便民服务','安全管理']
+					data : array_points_name
 				}
 			],
 			yAxis : [
@@ -308,7 +680,7 @@ $(function(){
 				{
 					name:'上月',
 					type:'bar',
-					data:[200.0, 400.9, 700.0, 230.2, 253.6, 760.7,880,500],
+					data:array_points_pre,
 					itemStyle: {
 						normal: {
 							label: {
@@ -321,7 +693,7 @@ $(function(){
 				{
 					name:'本月',
 					type:'bar',
-					data:[200.6, 500.9, 900.0, 260.4, 280.7, 700.7,500,800],
+					data:arrar_points_month,
 					itemStyle: {
 						normal: {
 							label: {
@@ -336,8 +708,6 @@ $(function(){
 					return option;
 			}
 			
-		}
-  ); 
 
    
 });

+ 369 - 67
VisualInspection/js/statistics/total_company_statistics.js

@@ -1,39 +1,358 @@
+		var year = new Date().getFullYear();
+		var month = new Date().getMonth()+1;
+		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();
+		var array_allStation = new Array();
+		var array_allStation_score = new Array();
+		var array_check_type = new Array();
+		var array_points_name = new Array();
+		var array_points_pre = new Array();
+		var arrar_points_month = new Array();
+		var year_assess;
+		var points_assess ;
+		var score_rank;
+		var stationAll_rank;
+		var check_type;
+		var people_points;
 $(function(){
-        // 路径配置
-        require.config({
-            paths: {
-                echarts: '/js/lib/echarts/build/dist'
-            }
-        }); 
-        // 使用
-	    require(
-		[
-			'echarts',
-			'echarts/chart/line', 
-			'echarts/chart/bar',
-			'echarts/chart/pie'
-		],
-	function (ec) {
-			// 基于准备好的dom,初始化echarts图表
-			var year_assess = ec.init(document.getElementById('company-year-assess')); 
-			var points_assess = ec.init(document.getElementById('company-points-assess'));
-			var score_rank = ec.init(document.getElementById('roadManager-score-rank'));
-			var stationAll_rank = ec.init(document.getElementById('company-stationAll-rank'));
-			var check_type = ec.init(document.getElementById('server-check-type'));
-			var people_points = ec.init(document.getElementById('each-people-points'));
-			// 为echarts对象加载数据 
-			year_assess.setOption(company_year_assess()); 
-			points_assess.setOption(company_points_assess()); 
-			score_rank.setOption(road_manager_score_rank());
-			stationAll_rank.setOption(company_stationAll_rank());
-			check_type.setOption(server_check_type());
-			people_points.setOption(each_people_points());
+	// 显示当前月份
+	$(".div-month select").val(month);
+
+	$(".query-company").click(function(){	
+		var select_month = $(".div-month select").val();
+		// 查询图一
+		init_company_year_assess();
+		// 查询图二
+		init_company_points_assess("statistics/lost/score/rate",select_month+'');
+		// 查询图三
+		init_road_manager_score_rank_three("statistics/score/center/manage/info",select_month+'');
+		// 查询图四
+		init_stationAll_rank_four("statistics/score/tollgate/info",select_month+'');
+		// 查询图五
+		init_server_check_type_five("statistics/lost/itemscore/rate",select_month+"");
+		// 查询图六
+		init_each_people_points_six("statistics/lost/twice/itemscore/rate",select_month+"");
+		// 加载图配置
+		echart();
+	});
+	// 加载图配置
+    echart();
+
+	/**
+	 * 初始化图一
+	 */
+	function init_company_year_assess(){
+		var param = {
+			"start_date":year+"-01-01 00:00:00",
+			"end_date":(year+1)+"-01-01 00:00:00"
+		}
+		initRqueset("statistics/score/year/info",param,1);
+
+	}
+    init_company_year_assess();
+    /**
+	 * 初始化图二
+	 */
+	function init_company_points_assess(url,mon){
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon,
+			"queryType":0
+		}
+		initRqueset(url,param,2);
+	}
+    init_company_points_assess("statistics/lost/score/rate",month+"");
+
+
+	/**
+	 * 初始化图三
+	 */
+    function init_road_manager_score_rank_three(url,mon){		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon
+		};
+		initRqueset(url,param,3);
+	}
+	init_road_manager_score_rank_three("statistics/score/center/manage/info",month+"");
+
+	/**
+	 * 初始化图四
+	 */
+    function init_stationAll_rank_four(url,mon){		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon
+		};
+		initRqueset(url,param,4);
+	}
+	init_stationAll_rank_four("statistics/score/tollgate/info",month+"");
+
+	/**
+	 * 初始化图五
+	 */
+    function init_server_check_type_five(url,mon){		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		var param = {
+			"mth":year + "/" +mon,
+			"queryType":0
+		};
+		initRqueset(url,param,5);
+	}
+	init_server_check_type_five("statistics/lost/itemscore/rate",month+"");
+
+	/**
+	 * 初始化图六
+	 */
+    function init_each_people_points_six(url,mon){
+		var prev_mth = (mon-1)+'';		
+		if(mon.length==1){
+			mon = "0" +mon;
+		}
+		if(prev_mth.length==1){
+			prev_mth = "0" + prev_mth;
+		}
+		var param = {
+			"mth":year + "/" + mon,
+			"prev_mth": year + "/" + prev_mth,
+			"queryType":0
+		};
+		initRqueset(url,param,6);
+	}
+	init_each_people_points_six("statistics/lost/twice/itemscore/rate",month+"");
+    
+	/**
+	 * 请求
+	 * @param {*} url 
+	 * @param {*} param 
+	 * @param {*} type 
+	 */
+	function initRqueset(url,param,type){
+		post_common_service( url,param,function(data){
+			data_array(data,type);
+			if(type == 1){
+				// 画图
+				year_assess.setOption(company_year_assess_one()); 
+			}else if(type == 2){
+				//array_points= [];
+				// 画图
+				points_assess.setOption(company_points_assess_two());
+			}else if(type == 3){
+				// 画图
+				score_rank.setOption(road_manager_score_rank_three());
+			}else if(type == 4){
+				// 画图
+				stationAll_rank.setOption(company_stationAll_rank_four());
+			}else if(type == 5){
+				// 画图
+				check_type.setOption(server_check_type_five());
+			}else if(type == 6){
+				// 画图
+				people_points.setOption(each_people_points_six());
+			}
+		},function(error){
+        	return "" ;
+    	});
+	}
+
+	/**
+	 * 数组数据
+	 * @param {*} data 
+	 * @param {*} type 
+	 */
+	function data_array(data,type){
+		if(type == 1){
+			array_year_score.length = 0;
+			months.length = 0;
+			if(data!=''){
+			if(data.length<12){
+				for(var i=0;i<12-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)).toFixed(1)));
+				}
+			}
+			}else{
+					array_year_score.length = 0;
+					months.length = 0;
+			}	
+		}else if(type == 2){
+			array_points.length=0;
+			    if(data!=''){
+					array_points.push({"value": (data.people_num-(data.score_fifteen+data.score_fifty+data.score_over_fifty)),"name":'满分'});
+					array_points.push({"value": data.score_fifteen,"name":'0-15分'});
+					array_points.push({"value": data.score_fifty,"name":'15-50分'});
+					array_points.push({"value": data.score_over_fifty,"name":'50分以上'});
+				 }else{
+					array_points.length=0;	
+				}
+		}else if(type == 3){
+					array_road.length=0;
+					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)).toFixed(1)));
+		        }else{
+					array_road.length=0;
+			        array_road_score.length=0;	
+				}	
+		    }
+		}else if(type == 4){
+			array_allStation_score.length=0;
+			array_allStation.length=0;
+            for(var i=0;i<data.length;i++){
+				if(data!=''){
+					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)).toFixed(1)));
+				}else{
+					array_allStation_score.length=0;
+			        array_allStation.length=0;	
+				}
+	        }
+		}else if(type == 5){
+			array_check_type = [];
+                if(data.length != 0){
+					for(var i=0;i<data.length;i++){
+						array_check_type.push({"value": data[i].all_check_score,"name":data[i].name});
+				    } 
+				}else{
+					array_check_type.length=0;	
+				}
+		}else if(type == 6){
+			array_points_name.length=0;
+			array_points_pre.length=0;
+			arrar_points_month.length=0;
+			data_each_people_points(data);
+		}
+	}
+
+	function data_each_people_points(data){
+			var flag = true;
+			var name = ['环境卫生','仪容仪表着装','表情','动作','文明用语','工作纪律及行为举止','便民服务','安全管理']
+			var Tmth = data.Tmth;
+			var Pmth = data.Pmth;
+			var Ntemp = new Array();
+			var Ptemp = new Array();
+			var Ttemp = new Array();
+			
+			for(var i= 0; i < name.length;i++){
+				flag = true;
+				if(Tmth.length > 0){
+					for(var j= 0; j< Tmth.length;j++){
+						if(name[i] == Tmth[j].name && Tmth[j].all_check_score != null){
+							Ttemp[i] = Tmth[j].all_check_score;
+							break;
+						}else{
+							Ttemp[i] = 0;
+						}
+					}
+				}else{
+					Ttemp[i] = 0;
+				}
+				if(Pmth.length > 0){
+					for(var m= 0; m< Pmth.length;m++){
+						if(name[i] == Pmth[m].name && Pmth[m].all_check_score != null){
+							Ptemp[i] = Pmth[m].all_check_score;
+							break;
+						}else{
+							Ptemp[i] = 0;
+						}
+					}
+				}else{
+					Ptemp[i] = 0;
+				}
+				if(Ttemp[i]== 0 && Ptemp[i] == 0){
+					name[i] = "";
+					flag = null;
+				}
+				if(name[i] != ""){
+					if(name[i]=='仪容仪表着装'){
+						name[i]='仪表';
+					}
+					if(name[i]=='工作纪律及行为举止'){
+						name[i]='行为';
+					}
+					array_points_name.push(name[i]);
+				}
+
+				if(flag){
+					array_points_pre.push(Ptemp[i]);
+					arrar_points_month.push(Ttemp[i]);
+				}
+			}
+	}
+    
+    /**
+	 * 除数为0处理
+	 * @param {*} num 
+	 * @param {*} num1 
+	 * @param {*} num2 
+	 * @param {*} num4 
+	 */
+	function filter_handler(num,num1,num2,num4){
+		if(num1 == 0 || num2 == 0){
+			return num4;
+		}else{
+			return (num/num1)/num2;
+		}
+	}
+	
+	/**
+	 * 图配置
+	 */
+	function echart(){
+			// 路径配置
+			require.config({
+				paths: {
+					echarts: '/js/lib/echarts/build/dist'
+				}
+			}); 
+			// 使用
+			require(
+			[
+				'echarts',
+				'echarts/chart/line', 
+				'echarts/chart/bar',
+				'echarts/chart/pie'
+			],
+		function (ec) {
+				// 基于准备好的dom,初始化echarts图表
+				year_assess = ec.init(document.getElementById('company-year-assess')); 
+				points_assess = ec.init(document.getElementById('company-points-assess'));
+				score_rank = ec.init(document.getElementById('roadManager-score-rank'));
+				stationAll_rank = ec.init(document.getElementById('company-stationAll-rank'));
+				check_type = ec.init(document.getElementById('server-check-type'));
+				people_points = ec.init(document.getElementById('each-people-points'));
+
+			}
+		); 
+	}	
 
 			/**
 			 * 图一
 			 */
-	    	function company_year_assess(){
-			
+	    	function company_year_assess_one(){
+				//debugger;
 				option = {
 					color : [ '#00ced1' ],
 					tooltip : {
@@ -50,13 +369,13 @@ $(function(){
 						{
 							type : 'category',
 							boundaryGap : false,
-							data : ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']
+							data : monthsCH
 						}
 					],
 					yAxis : [
 						{
 							type : 'value',
-							min : 700 ,
+							min : 900 ,
 						    max : 1000,
 							axisLabel : {
 								formatter: '{value}'
@@ -67,7 +386,7 @@ $(function(){
 						{
 							name:'平均分',
 							type:'line',
-							data:[800, 790, 780, 900, 1000,780, 1000,880,900,950,900,800,790],
+							data:array_year_score,
 							markPoint : {
 								data : [
 									{type : 'max', name: '最大值'},
@@ -85,12 +404,12 @@ $(function(){
 				};
 						return option;
 		}
-			
+					
 
         /**
 		 * 图二
 		 */
-		function company_points_assess(){
+		function company_points_assess_two(){
 			option = {
 				tooltip : {
 					trigger: 'item',
@@ -121,12 +440,7 @@ $(function(){
 						type:'pie',
 						radius : '65%',
 						center: ['50%', '50%'],
-						data:[
-							{value:335, name:'0-15分'},
-							{value:310, name:'15-50分'},
-							{value:234, name:'50分以上'},
-							{value:135, name:'满分'}
-						]
+						data:array_points
 					}
 				]
 			};
@@ -137,7 +451,7 @@ $(function(){
         /**
 		 * 图三 
 		 */
-		function road_manager_score_rank(){
+		function road_manager_score_rank_three(){
 			option = {
 				color : [ '#00ced1' ],// 条形图颜色
 				tooltip : {
@@ -148,7 +462,7 @@ $(function(){
 				xAxis : [
 					{
 						type : 'category',
-						data : ['连云港','南通','盐城']
+						data : array_road
 					}
 				],
 				yAxis : [
@@ -162,7 +476,7 @@ $(function(){
 					{
 						
 						type:'bar',
-						data:[980, 950, 1000],
+						data:array_road_score,
 					    itemStyle: {
 						normal: {
 							label: {
@@ -186,7 +500,7 @@ $(function(){
         /**
 		 * 图四
 		 */
-		function company_stationAll_rank(){
+		function company_stationAll_rank_four(){
 					option = {
 				color : [ '#00ced1' ],// 条形图颜色
 				tooltip : {
@@ -199,7 +513,7 @@ $(function(){
 				xAxis : [
 					{
 						type : 'category',
-						data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
+						data : array_allStation
 					}
 				],
 				yAxis : [
@@ -213,7 +527,7 @@ $(function(){
 					{
 						name:'平均分',
 						type:'bar',
-						data:[910.0, 920, 945, 930, 970, 950, 955, 945, 985.6, 990.0, 975.4, 950.3],
+						data:array_allStation_score,
 					    itemStyle: {
 						normal: {
 							label: {
@@ -237,7 +551,7 @@ $(function(){
          /**
 		 * 图五
 		 */
-		function server_check_type(){
+		function server_check_type_five(){
 			option = {
 				tooltip : {
 					trigger: 'item',
@@ -268,16 +582,7 @@ $(function(){
 						type:'pie',
 						radius : '65%',
 						center: ['50%', '50%'],
-						data:[
-							{value:335, name:'环境卫生'},
-							{value:310, name:'仪容仪表'},
-							{value:234, name:'表情'},
-							{value:135, name:'收费动作'},
-							{value:335, name:'文明用语'},
-							{value:310, name:'工作纪律'},
-							{value:234, name:'便民服务'},
-							{value:135, name:'安全管理'}
-						]
+						data:array_check_type
 					}
 				]
 			};
@@ -287,7 +592,7 @@ $(function(){
         /**
 		 * 图六 
 		 */
-		function each_people_points(){
+		function each_people_points_six(){
 					option = {
 			tooltip : {
 				trigger: 'axis'
@@ -299,7 +604,7 @@ $(function(){
 			xAxis : [
 				{
 					type : 'category',
-					data : ['环境卫生','仪容仪表','表情','收费动作','文明用语','工作纪律','便民服务','安全管理']
+					data : array_points_name
 				}
 			],
 			yAxis : [
@@ -311,7 +616,7 @@ $(function(){
 				{
 					name:'上月',
 					type:'bar',
-					data:[200.0, 400.9, 700.0, 230.2, 253.6, 760.7,880,500],
+					data:array_points_pre,
 					itemStyle: {
 						normal: {
 							label: {
@@ -324,7 +629,7 @@ $(function(){
 				{
 					name:'本月',
 					type:'bar',
-					data:[200.6, 500.9, 900.0, 260.4, 280.7, 700.7,500,800],
+					data:arrar_points_month,
 					itemStyle: {
 						normal: {
 							label: {
@@ -338,9 +643,6 @@ $(function(){
 		};					
 					return option;
 			}
-			
-		}
-  ); 
+		
 
-   
 });

+ 40 - 75
VisualInspection/view/statistics/check_workload_statistics.html

@@ -1,17 +1,16 @@
 <script src="/js/lib/echarts/build/dist/echarts.js"></script>
-<!--<script src="/js/statistics/check_workload_statistics.js"></script>-->
+<script src="/js/statistics/check_workload_statistics.js"></script>
 <link rel="stylesheet" type="text/css" href="/css/statistics/check_workload_statistics.css">
 <div class="container-right">
-    <div class="row-1"><span>个人数据统计</span></div>
+    <div class="row-1"><span>稽查人员工作量统计</span></div>
     <div class="line-1"></div>
     <div class="row-2">
         <div>
-            <div class="name1"><span>刘娟</span></div>
-            <div class="name2"><span>、</span><span>王海</span></div>
-            <div class="div-select div-button"><button>选择人员</button></div>
-            <div class="div-start"><select><option>请选择考核开始时间</option></select></div>
+            <div class="name1"><span>请选择稽查人员:</span></div>
+            <div class="div-select"><select id="select-personal"></select></button></div>
+            <div class="div-start"><input placeholder="请选择考核开始时间"></input></div>
             <div class="div-to"><label>-</label></div>
-            <div class="div-end"><select><option>请选择考核结束时间</option></select></div>
+            <div class="div-end"><input placeholder="请选择考核结束时间"></input></div>
             <div class="query div-button"><button>查询</button></div>
         </div>
     </div> 
@@ -23,76 +22,42 @@
        </table>
     </div>
 
-     <!-- 使用一个div来显示数据表格 -->
-<div class="datatable" data-checkable="false" data-sortable="false">
-        <table class="table table-bordered table-hover table-striped" style="text-align:center;">
-            <thead>
-                  <tr>
-                    <th width="6%" style="text-align:center;">序号</th>
-                    <th width="8%" style="text-align:center;">稽查人员</th>
-                    <th width="14%" style="text-align:center;">任务名称</th>
-                    <th width="14%" style="text-align:center;">时间段</th>
-                    <th width="8%" style="text-align:center;">考核人员</th>
-                    <th width="8%" style="text-align:center;">考核部门</th>
-                    <th width="8%" style="text-align:center;">扣分数</th>
-                    <th width="14%" style="text-align:center;">考核项</th>
-                    <th width="20%" style="text-align:center;">扣分凭证</th>
-                </tr>
-            </thead>
-            <tbody class="table-tbody">
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">1</td>
-                    <td style="line-height:70px;">刘娟</td>
-                    <td style="line-height:70px;">20170626收费站稽查任务</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">李艳芳</td>
-                    <td style="line-height:70px;">收费站</td>
-                    <td style="line-height:70px;">5分</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">2</td>
-                    <td style="line-height:70px;">刘娟</td>
-                    <td style="line-height:70px;">20170626收费站稽查任务</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">李艳芳</td>
-                    <td style="line-height:70px;">收费站</td>
-                    <td style="line-height:70px;">5分</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">3</td>
-                    <td style="line-height:70px;">王海</td>
-                    <td style="line-height:70px;">20170626收费站稽查任务</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">李艳芳</td>
-                    <td style="line-height:70px;">收费站</td>
-                    <td style="line-height:70px;">5分</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">4</td>
-                    <td style="line-height:70px;">王海</td>
-                    <td style="line-height:70px;">20170626收费站稽查任务</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">李艳芳</td>
-                    <td style="line-height:70px;">收费站</td>
-                    <td style="line-height:70px;">5分</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-        
-            </tbody>
-        </table>             
-</div>
-<!--分页-->
-<div></div>
-
+<div class="row" style="width:100%;margin:0 auto;">
+            <!-- 使用一个div来显示数据表格 -->
+            <div class="datatable" data-checkable="true" data-sortable="true"></div>
+    </div>
   
 </div>
+<script>
+    $(document).ready(function() {
 
+        // 仅选择日期
+        $(".div-start input").datetimepicker(
+        {
+            language:  "zh-CN",
+            weekStart: 1,
+            todayBtn:  1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+        // 仅选择日期
+        $(".div-end input").datetimepicker(
+        {
+            language:  "zh-CN",
+            weekStart: 1,
+            todayBtn:  1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+    });
+</script>
 
        

+ 37 - 50
VisualInspection/view/statistics/personal_data_statistics.html

@@ -8,9 +8,9 @@
         <div>
             <div class="name"><span>刘娟</span></div>
             <div class="div-select div-button"><button>选择人员</button></div>
-            <div class="div-start"><select><option>请选择考核开始时间</option></select></div>
+            <div class="div-start"><input placeholder="请选择考核开始时间"></input></div>
             <div class="div-to"><label>-</label></div>
-            <div class="div-end"><select><option>请选择考核结束时间</option></select></div>
+            <div class="div-end"><input placeholder="请选择考核结束时间"></input></div>
             <div class="div-check"><select><option>请选择温馨服务检查类别</option></select></div>
             <div class="query div-button"><button>查询</button></div>
             <div class="export div-button"><button>导出</button></div>
@@ -50,53 +50,10 @@
     </div>
     <div class="line-1"></div>
 
-     <!-- 使用一个div来显示数据表格 -->
-<div class="datatable" data-checkable="false" data-sortable="false">
-        <table class="table table-bordered table-hover table-striped" style="text-align:center;">
-            <thead>
-                <tr>
-                    <th width="14%" style="text-align:center;">序号</th>
-                    <th width="24%" style="text-align:center;">时间段</th>
-                    <th width="14%" style="text-align:center;">扣分数</th>
-                    <th width="24%" style="text-align:center;">考核项</th>
-                    <th width="24%" style="text-align:center;">扣分凭证</th>
-                </tr>
-            </thead>
-            <tbody class="table-tbody">
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">1</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">5</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">2</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">5</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">3</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">5</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-                <tr style="height:70px;">
-                    <td style="line-height:70px;">4</td>
-                    <td style="line-height:70px;">2017-06-16 12:00~13:00</td>
-                    <td style="line-height:70px;">5</td>
-                    <td style="line-height:70px;">光头、胡须、长鬓角</td>
-                    <td style="line-height:70px;">监控照片</td>
-                </tr>
-                
-            </tbody>
-        </table>             
-</div>
-<!--分页-->
-<div></div>
+    <div class="row" style="width:100%;margin:0 auto;">
+            <!-- 使用一个div来显示数据表格 -->
+            <div class="datatable" data-checkable="true" data-sortable="true"></div>
+    </div>
     
   <div class="border-line">
     <div class="row-7">
@@ -109,8 +66,38 @@
         <div id="personal-check-type" style="width:49%;height:400px;float:left;"></div>
     </div>
   </div>
-  
 </div>
+<script>
+    $(document).ready(function() {
+
+        // 仅选择日期
+        $(".div-start input").datetimepicker(
+        {
+            language:  "zh-CN",
+            weekStart: 1,
+            todayBtn:  1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+        // 仅选择日期
+        $(".div-end input").datetimepicker(
+        {
+            language:  "zh-CN",
+            weekStart: 1,
+            todayBtn:  1,
+            autoclose: 1,
+            todayHighlight: 1,
+            startView: 2,
+            minView: 2,
+            forceParse: 0,
+            format: "yyyy-mm-dd"
+        });
+    });
+</script>
 
 
        

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

@@ -5,8 +5,26 @@
     <div class="row-1"><span>道管中心统计</span></div>
     <div class="line-1"></div>
     <div class="row-2">
-        <div><div class="div-month"><select><option>一月</option></select></div>
-        <div class="div-roadManage"><select><option>连云港</option></select></div>
+        <div>
+            <div class="div-month"><select>
+                <option value="1">一月</option>
+                <option value="2">二月</option>
+                <option value="3">三月</option>
+                <option value="4">四月</option>
+                <option value="5">五月</option>
+                <option value="6">六月</option>
+                <option value="7">七月</option>
+                <option value="8">八月</option>
+                <option value="9">九月</option>
+                <option value="10">十月</option>
+                <option value="11">十一月</option>
+                <option value="12">十二月</option>
+                </select></div>
+        <div class="div-roadManage"><select>
+            <option value="30">连云港</option>
+            <option value="31">盐城</option>
+            <option value="32">南通</option>
+            </select></div>
         <div class="div-button"><button>查询</button></div></div>
     </div>
     <div class="line-1"></div>

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

@@ -5,9 +5,26 @@
     <div class="row-1"><span>收费站统计</span></div>
     <div class="line-1"></div>
     <div class="row-2">
-        <div><div class="div-month"><select><option>一月</option></select></div>
-        <div class="div-roadManage"><select><option>连云港</option></select></div>
-        <div class="div-station"><select><option>灌云北</option></select></div>
+        <div><div class="div-month"><select>
+            <option value="1">一月</option>
+                <option value="2">二月</option>
+                <option value="3">三月</option>
+                <option value="4">四月</option>
+                <option value="5">五月</option>
+                <option value="6">六月</option>
+                <option value="7">七月</option>
+                <option value="8">八月</option>
+                <option value="9">九月</option>
+                <option value="10">十月</option>
+                <option value="11">十一月</option>
+                <option value="12">十二月</option>
+            </select></div>
+        <div class="div-roadManage"><select id="first">
+            <option value="30">连云港</option>
+            <option value="31">盐城</option>
+            <option value="32">南通</option>
+            </select></div>
+        <div class="div-station"><select id="second"></select></div>
         <div class="div-button"><button>查询</button></div></div>
     </div>
     <div class="line-1"></div>
@@ -49,5 +66,4 @@
   
 </div>
 
-
        

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

@@ -6,8 +6,21 @@
     <div class="line-1"></div>
     <div class="row-2">
         <div>
-            <div class="div-month"><select><option>一月</option></select></div>
-            <div class="div-button"><button>查询</button></div>
+            <div class="div-month"><select>
+                <option value="1">一月</option>
+                <option value="2">二月</option>
+                <option value="3">三月</option>
+                <option value="4">四月</option>
+                <option value="5">五月</option>
+                <option value="6">六月</option>
+                <option value="7">七月</option>
+                <option value="8">八月</option>
+                <option value="9">九月</option>
+                <option value="10">十月</option>
+                <option value="11">十一月</option>
+                <option value="12">十二月</option>
+                </select></div>
+            <div class="div-button"><button class="query-company">查询</button></div>
         </div>
     </div>
     <div class="line-1"></div>