|
|
@@ -29,16 +29,26 @@
|
|
|
var flag = true;
|
|
|
var change_echart = 2;
|
|
|
$(function(){
|
|
|
+ setVisit();
|
|
|
// 公用方法,根据当前年月动态将13个月push数组
|
|
|
month_method();
|
|
|
// 公用方法,月份下拉框
|
|
|
- select_option();
|
|
|
+ select_option();
|
|
|
+ $.jeDate("#month_date",{
|
|
|
+ isinitVal:true,
|
|
|
+ format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
|
|
|
+ });
|
|
|
+ var road_manager;
|
|
|
+ if(roleContains("STATION")){
|
|
|
+ road_manager = getCurrentUser().road_manager_id;
|
|
|
+ }
|
|
|
+ setRoadManagerSelect("#first",road_manager);
|
|
|
// 回显当前年月份
|
|
|
- $(".div-month select").val(initDate);
|
|
|
+ // $(".div-month select").val(initDate);
|
|
|
setSecond();
|
|
|
|
|
|
$(".div-button button").click(function(){
|
|
|
- var select_month = $(".div-month select").val();
|
|
|
+ var select_month = $("month_date").val();
|
|
|
var select_station = $(".div-station select").val();
|
|
|
// 加载图配置
|
|
|
echart();
|
|
|
@@ -46,6 +56,7 @@ $(function(){
|
|
|
init_tollStation_year_assess("statistics/score/year/info",select_station);
|
|
|
}
|
|
|
flag = false;
|
|
|
+
|
|
|
top5_change(select_month,select_station);
|
|
|
// 查询图二
|
|
|
init_company_points_assess("statistics/lost/score/rate",select_month+'',select_station);
|
|
|
@@ -425,48 +436,62 @@ $(function(){
|
|
|
});
|
|
|
function setSecond(){
|
|
|
var select_road = $(".div-roadManage select").val();
|
|
|
- var sec = document.getElementById('second');
|
|
|
- var tempStr = ''
|
|
|
- var param = {
|
|
|
- "parentid":select_road
|
|
|
+ var feeList = $.zui.store.get("cache_fee_station_list");
|
|
|
+ if(select_road) feeList = cache_road_manager_fee_list_map.get(select_road);
|
|
|
+
|
|
|
+ var dept;
|
|
|
+ if(roleContains("STATION")){
|
|
|
+ dept = getCurrentUser().organid;
|
|
|
}
|
|
|
- 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_month = $(".div-month select").val();
|
|
|
- var select_station = $("#second").val();
|
|
|
- echart();
|
|
|
- // 进退步top5
|
|
|
- top5_change(select_month,select_station);
|
|
|
- init_tollStation_year_assess("statistics/score/year/info",select_station);
|
|
|
- init_company_points_assess("statistics/lost/score/rate",select_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);
|
|
|
- flag = false;
|
|
|
- },function(error){
|
|
|
- return "" ;
|
|
|
- });
|
|
|
+ refresh(feeList,dept);
|
|
|
+ // var param = {
|
|
|
+ // "parentid":select_road
|
|
|
+ // }
|
|
|
+ // post_common_service("dept/getDeptInfosByDeptId",param,function(data){
|
|
|
+
|
|
|
+ // },function(error){
|
|
|
+ // return "" ;
|
|
|
+ // });
|
|
|
}
|
|
|
|
|
|
+ function refresh(data,selectId){
|
|
|
+ var sec = document.getElementById('second');
|
|
|
+ var tempStr = ''
|
|
|
+ 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{
|
|
|
+ if(data[i].deptid==selectId)
|
|
|
+ tempStr += "<option value="+data[i].deptid+" selected>"+data[i].name+"</option>";
|
|
|
+ else
|
|
|
+ tempStr += "<option value="+data[i].deptid+">"+data[i].name+"</option>";
|
|
|
+ // }
|
|
|
+ sec.innerHTML=tempStr;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ sec.innerHTML='';
|
|
|
+ }
|
|
|
+ // 页面初始化
|
|
|
+ var select_month = $("#month_date").val();
|
|
|
+ var select_station = $("#second").val();
|
|
|
+ echart();
|
|
|
+ // 进退步top5
|
|
|
+ top5_change(select_month,select_station);
|
|
|
+ init_tollStation_year_assess("statistics/score/year/info",select_station);
|
|
|
+ init_company_points_assess("statistics/lost/score/rate",select_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);
|
|
|
+ flag = false;
|
|
|
+ }
|
|
|
/**
|
|
|
* 进步前5名后退步前五名切换
|
|
|
*/
|
|
|
$(".view_change").click(function(){
|
|
|
- var select_month = $(".div-month select").val();
|
|
|
+ var select_month = $("#month_date").val();
|
|
|
var select_station = $("#second").val();
|
|
|
// 进退步top5
|
|
|
top5_change(select_month,select_station);
|
|
|
@@ -1039,8 +1064,12 @@ $(function(){
|
|
|
]
|
|
|
};
|
|
|
return option;
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
+});
|
|
|
|
|
|
-
|
|
|
-});
|
|
|
+function setVisit(){
|
|
|
+ if(roleContains("STATION")){
|
|
|
+ $("#first").attr("disabled","disabled");
|
|
|
+ $("#second").attr("disabled","disabled");
|
|
|
+ }
|
|
|
+}
|