|
|
@@ -105,8 +105,8 @@ $(function(){
|
|
|
*/
|
|
|
function init_personal_score_statistics(url,user_id){
|
|
|
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()+"-25"+" 23:00:00",
|
|
|
+ "end_date":year+"-"+new Date().getMonth()+"-25"+" 23:00:00",
|
|
|
"user_id":user_id
|
|
|
}
|
|
|
initRqueset(url,param,1);
|
|
|
@@ -159,21 +159,21 @@ $(function(){
|
|
|
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++){
|
|
|
+ if(data.length<13){
|
|
|
+ for(var i=0;i<13-data.length;i++){
|
|
|
array_year_score.push(0)
|
|
|
}
|
|
|
}
|
|
|
+ var month_arr = month_method_2();
|
|
|
for(var i=0;i<data.length;i++){
|
|
|
- if(months.indexOf(parseInt(data[i].mth.substr(5)))){
|
|
|
+ if(month_arr.indexOf(parseInt(data[i].mth))){
|
|
|
// 指定位置插入值
|
|
|
- array_year_score.splice(parseInt(data[i].mth.substr(5))-1,0,
|
|
|
+ array_year_score.splice(month_arr.indexOf(data[i].mth),0,
|
|
|
(1000-(filter(data[i].all_check_score,data[i].checked_num,0))));
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
|
array_year_score.length = 0;
|
|
|
- months.length = 0;
|
|
|
}
|
|
|
}else if(type == 2){
|
|
|
array_check_type.length=0;
|
|
|
@@ -218,22 +218,32 @@ $(function(){
|
|
|
}else{
|
|
|
sec.innerHTML='';
|
|
|
}
|
|
|
- var start_date = $(".div-start input").val()+" 23:00:00";
|
|
|
- var end_date = $(".div-end input").val()+" 23:00:00";
|
|
|
- var user_id = $("#select-personal").val();
|
|
|
- // 页面初始化
|
|
|
- echart();
|
|
|
- initAppealPage(start_date,end_date,user_id);
|
|
|
- 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);
|
|
|
+ // 请求数据
|
|
|
+ getInit();
|
|
|
},function(error){
|
|
|
return "" ;
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ function getInit(){
|
|
|
+ var start_date = $(".div-start input").val()+" 23:00:00";
|
|
|
+ var end_date = $(".div-end input").val()+" 23:00:00";
|
|
|
+ var user_id = $("#select-personal").val();
|
|
|
+ // 页面初始化
|
|
|
+ echart();
|
|
|
+ initAppealPage(start_date,end_date,user_id);
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
$("#select-dept").change(function(){
|
|
|
setSecond();
|
|
|
});
|
|
|
|
|
|
+ $("#select-personal").change(function(){
|
|
|
+ getInit();
|
|
|
+ })
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -311,7 +321,7 @@ $(function(){
|
|
|
{
|
|
|
type : 'category',
|
|
|
boundaryGap : false,
|
|
|
- data : monthsCH
|
|
|
+ data : month_method_2()
|
|
|
}
|
|
|
],
|
|
|
yAxis : [
|