|
|
@@ -8,6 +8,10 @@ var score_statistics;
|
|
|
var check_type;
|
|
|
var cur_status;
|
|
|
var hide = false;
|
|
|
+
|
|
|
+var array_points = new Array();
|
|
|
+var array_points2 = new Array();
|
|
|
+
|
|
|
// 默认初始化日期一个月
|
|
|
$(".div-start input").val(new Date().getFullYear() + "-" + (new Date().getMonth() > 10 ? new Date().getMonth() : "0" + new Date().getMonth()) + "-26");
|
|
|
$(".div-end input").val(new Date().getFullYear() + "-" + (new Date().getMonth() + 1 > 10 ? new Date().getMonth() + 1 : "0" + (new Date().getMonth() + 1)) + "-25");
|
|
|
@@ -39,8 +43,8 @@ $(function() {
|
|
|
function queryAppeal(start_date, end_date, user_id) {
|
|
|
|
|
|
$("#station_name").html($("#select-dept").find("option:selected").text())
|
|
|
- $("#station_user_name").html($("#select-personal").find("option:selected").text())
|
|
|
|
|
|
+ $("#station_user_name").html("-")
|
|
|
|
|
|
//请求数据
|
|
|
var data_t = {
|
|
|
@@ -57,6 +61,14 @@ $(function() {
|
|
|
$("#l_dept_ranking").html("-");
|
|
|
$("#l_com_ranking").html("-");
|
|
|
$("#l_score_ranking").html("-");
|
|
|
+ if (typeof(res.user) != undefined && res.user != null) {
|
|
|
+ $("#station_user_name").html(res.user.position_name)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
var isshow_c = false;
|
|
|
var isshow_l = false;
|
|
|
@@ -239,14 +251,48 @@ $(function() {
|
|
|
array_year_score.length = 0;
|
|
|
}
|
|
|
} else if (type == 2) {
|
|
|
- array_check_type.length = 0;
|
|
|
+ array_points = new Array();
|
|
|
+ array_points2 = new Array();
|
|
|
+ var map = new HashMap();
|
|
|
+
|
|
|
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 });
|
|
|
+ if (typeof(data[i].all_check_score) == "undefined" || data[i].all_check_score == null) continue;
|
|
|
+ if (map.get(data[i].name) == null) {
|
|
|
+ map.set(data[i].name, data[i].all_check_score);
|
|
|
+ } else {
|
|
|
+ map.set(data[i].name, map.get(data[i].name) + data[i].all_check_score);
|
|
|
+ }
|
|
|
+ array_points2.push({ "value": (data[i].all_check_score), "name": data[i].checked_name + ($("#select-personal").val() == data[i].user_id ? "" : "(组员)") + " " + data[i].name, "itemStyle": { "normal": { "color": getchildColor(data[i].name, i).hexStr() } } });
|
|
|
}
|
|
|
- } else {
|
|
|
- array_check_type.length = 0;
|
|
|
}
|
|
|
+ map.forEach(function(value, key) {
|
|
|
+ array_points.push({ "value": value, "name": key, "itemStyle": { "normal": { "color": getColor(key).hexStr() } } });
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // array_points.push({ "value": (data.total0), "name": '满分', "itemStyle": { "normal": { "color": '#48CCCD' } } });
|
|
|
+ // array_points.push({ "value": data.total15, "name": '0-15分', "itemStyle": { "normal": { "color": '#38ACEC' } } });
|
|
|
+ // array_points.push({ "value": data.total50, "name": '15-50分', "itemStyle": { "normal": { "color": '#FFD801' } } });
|
|
|
+ // array_points.push({ "value": data.totalOver50, "name": '50分以上', "itemStyle": { "normal": { "color": '#7F38EC' } } });
|
|
|
+
|
|
|
+
|
|
|
+ // array_points2.push({ "value": temp[0], "name": '连云港道管', "itemStyle": { "normal": { "color": '#7BCCB5' } } });
|
|
|
+ // 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;
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -439,10 +485,67 @@ $(function() {
|
|
|
* 图二
|
|
|
*/
|
|
|
function personal_check_type() {
|
|
|
+ // option = {
|
|
|
+ // tooltip: {
|
|
|
+ // trigger: 'item',
|
|
|
+ // formatter: "个人服务检查问题占比 <br/>{b} : {c}分 ({d}%)"
|
|
|
+ // },
|
|
|
+ // noDataLoadingOption: {
|
|
|
+ // text: '暂无数据',
|
|
|
+ // effect: 'bubble',
|
|
|
+ // effectOption: {
|
|
|
+ // effect: {
|
|
|
+ // n: 0 //气泡个数为0
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // textStyle: {
|
|
|
+ // fontSize: 20,
|
|
|
+ // fontFamily: 'cursive',
|
|
|
+ // fontWeight: 'bold'
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // toolbox: {
|
|
|
+ // show: true,
|
|
|
+ // feature: {
|
|
|
+
|
|
|
+ // magicType: {
|
|
|
+
|
|
|
+ // type: ['pie', 'funnel'],
|
|
|
+ // option: {
|
|
|
+ // funnel: {
|
|
|
+ // x: '25%',
|
|
|
+ // width: '50%',
|
|
|
+ // funnelAlign: 'left',
|
|
|
+ // max: 1548
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // calculable: true,
|
|
|
+ // series: [{
|
|
|
+ // name: '访问来源',
|
|
|
+ // type: 'pie',
|
|
|
+ // radius: '55%',
|
|
|
+ // center: ['50%', '50%'],
|
|
|
+ // data: array_check_type,
|
|
|
+ // itemStyle: {
|
|
|
+ // normal: {
|
|
|
+ // label: {
|
|
|
+ // show: true,
|
|
|
+ // formatter: '{b} :\n{c}分 ({d}%)'
|
|
|
+ // },
|
|
|
+ // labelLine: { show: true }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }]
|
|
|
+ // };
|
|
|
+
|
|
|
+
|
|
|
option = {
|
|
|
tooltip: {
|
|
|
trigger: 'item',
|
|
|
- formatter: "个人服务检查问题占比 <br/>{b} : {c}分 ({d}%)"
|
|
|
+ formatter: "个人温馨服务检查问题类别占比 <br/>{b} : {c}分 ({d}%)"
|
|
|
},
|
|
|
noDataLoadingOption: {
|
|
|
text: '暂无数据',
|
|
|
@@ -460,40 +563,69 @@ $(function() {
|
|
|
},
|
|
|
toolbox: {
|
|
|
show: true,
|
|
|
- feature: {
|
|
|
-
|
|
|
- magicType: {
|
|
|
+ },
|
|
|
+ calculable: false,
|
|
|
+ series: [{
|
|
|
+ name: '访问来源',
|
|
|
+ type: 'pie',
|
|
|
+ selectedMode: 'single',
|
|
|
+ radius: [0, 80],
|
|
|
+
|
|
|
+ // for funnel
|
|
|
+ x: '20%',
|
|
|
+ width: '40%',
|
|
|
+ funnelAlign: 'right',
|
|
|
+ max: 1548,
|
|
|
+
|
|
|
+ itemStyle: {
|
|
|
+ normal: {
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ formatter: '{b}:\n{c}分({d}%)',
|
|
|
+ textStyle: {
|
|
|
+ alias: 'center',
|
|
|
+ fontSize: 10,
|
|
|
+ color: '#888'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ labelLine: {
|
|
|
+ show: true,
|
|
|
+ length: 80,
|
|
|
+ lineStyle: {
|
|
|
+ color: '#888'
|
|
|
+ }
|
|
|
|
|
|
- type: ['pie', 'funnel'],
|
|
|
- option: {
|
|
|
- funnel: {
|
|
|
- x: '25%',
|
|
|
- width: '50%',
|
|
|
- funnelAlign: 'left',
|
|
|
- max: 1548
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ data: array_points
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '访问来源',
|
|
|
+ type: 'pie',
|
|
|
+ radius: [100, 125],
|
|
|
+
|
|
|
+ // for funnel
|
|
|
+ x: '60%',
|
|
|
+ width: '35%',
|
|
|
+ funnelAlign: 'left',
|
|
|
+ max: 1048,
|
|
|
+ itemStyle: {
|
|
|
+ normal: {
|
|
|
+ label: {
|
|
|
+ show: false,
|
|
|
+ formatter: '{b}:{c}人({d}%)'
|
|
|
+ },
|
|
|
+ labelLine: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data: array_points2
|
|
|
}
|
|
|
- },
|
|
|
- calculable: true,
|
|
|
- series: [{
|
|
|
- name: '访问来源',
|
|
|
- type: 'pie',
|
|
|
- radius: '55%',
|
|
|
- center: ['50%', '50%'],
|
|
|
- data: array_check_type,
|
|
|
- itemStyle: {
|
|
|
- normal: {
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- formatter: '{b} :\n{c}分 ({d}%)'
|
|
|
- },
|
|
|
- labelLine: { show: true }
|
|
|
- }
|
|
|
- }
|
|
|
- }]
|
|
|
+ ]
|
|
|
};
|
|
|
+
|
|
|
return option;
|
|
|
}
|
|
|
|
|
|
@@ -507,4 +639,41 @@ function setVisit() {
|
|
|
if (hasRole("ROLE_STATION")) {
|
|
|
$("#select-personal").attr("disabled", "disabled");
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+function getColor(name) {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ var color = new $.zui.Color('#52D017');
|
|
|
+ switch (name) {
|
|
|
+ case "环境卫生":
|
|
|
+ { color = new $.zui.Color('#52D017'); break; }
|
|
|
+ case "仪容仪表着装":
|
|
|
+ { color = new $.zui.Color('#00FFFF'); break; }
|
|
|
+ case "动作":
|
|
|
+ { color = new $.zui.Color('#7F38EC'); break; }
|
|
|
+ case "表情":
|
|
|
+ { color = new $.zui.Color('#FFA500'); break; }
|
|
|
+ case "文明用语":
|
|
|
+ { color = new $.zui.Color('#0000A0'); break; }
|
|
|
+ case "环境卫生":
|
|
|
+ { color = new $.zui.Color('#52D017'); break; }
|
|
|
+ case "工作纪律及行为举止":
|
|
|
+ { color = new $.zui.Color('#48CCCD'); break; }
|
|
|
+ case "便民服务":
|
|
|
+ { color = new $.zui.Color('#FFFF00'); break; }
|
|
|
+ case "安全管理":
|
|
|
+ { color = new $.zui.Color('#00FF00'); break; }
|
|
|
+ }
|
|
|
+ return color;
|
|
|
+}
|
|
|
+
|
|
|
+function getchildColor(name, p) {
|
|
|
+ var color1 = getColor(name);
|
|
|
+
|
|
|
+
|
|
|
+ var color = new $.zui.Color(color1.r - p * 20, color1.g - p * 20, color1.b - p * 20);
|
|
|
+
|
|
|
+ return color;
|
|
|
}
|