| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075 |
- var year = new Date().getFullYear();
- var month = new Date().getMonth();
- var date = new Date().getDate();
- 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 array_five_name_back = new Array();
- var array_five_score_back = new Array();
- var year_assess;
- var points_assess;
- var check_type;
- var people_points;
- var score_rank;
- var rank_assess;
- var rank_assess_back;
- var min_year;
- var min_five;
- var min_five_back;
- var min_score;
- var flag = true;
- var change_echart = 2;
- $(function(){
- setVisit();
- // 公用方法,根据当前年月动态将13个月push数组
- month_method();
- // 公用方法,月份下拉框
- 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);
- setSecond();
- $(".div-button button").click(function(){
- var select_month = $("month_date").val();
- var select_station = $(".div-station select").val();
- // 加载图配置
- echart();
- if(flag ==true ){
- 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);
- // 查询图四
- 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();
- // 如果道管中心下拉框改变,点击时加载图一
- $(".div-station select").change(function(){
- flag = true;
- });
-
- /**
- * 初始化图一
- */
- function init_tollStation_year_assess(url,select_station){
- var param = {
- "start_date":(year-1)+"-"+new Date().getMonth()+"-25"+" 23:00:00",
- "end_date":year+"-"+new Date().getMonth()+"-25"+" 23:00:00",
- "dept_id":select_station,
- "queryType":2
- }
- initRqueset(url,param,1);
- }
-
- /**
- * 初始化图二
- */
- function init_company_points_assess(url,mon,select_station){
- var param = {
- mth:mon,
- "dept_id":select_station,
- "queryType":2
- }
- initRqueset(url,param,2);
- }
- /**
- * 初始化图三 前5名
- */
- function init_progress_rank_assess(url,mon,select_station){
- var prev_mth;
- // 判断当前年月是否为一月
- if(parseInt((mon+'').substr(5)) == 1){
- prev_mth = ((parseInt((mon+'').substr(0,4)))-1)+"/12";
- }else{
- if((parseInt((mon+'').substr(5))+'').length == 1){
- prev_mth = (mon+'').substr(0,4) + '/0'+ (parseInt((mon+'').substr(5))-1);
- }else{
- prev_mth = (mon+'').substr(0,4) + '/'+ (parseInt((mon+'').substr(5))-1);
- }
- }
- var param = {
- "mth": mon,
- "dept_id":select_station,
- "prev_mth": prev_mth,
- "order_type":0
- };
- initRqueset(url,param,3);
- }
- /**
- * 初始化图四
- */
- function init_people_score_rank(url,mon,select_station){
- var param = {
- "mth":mon,
- "dept_id":select_station,
- "queryType":2,
- "order_type":1
- }
- initRqueset(url,param,4);
- }
-
- /**
- * 初始化图五
- */
- function init_server_check_type(url,mon,select_station){
- var param = {
- "mth":mon,
- "dept_id":select_station,
- "queryType":2
- };
- initRqueset(url,param,5);
- }
-
- /**
- * 初始化图六
- */
- function init_each_people_points(url,mon,select_station){
- var prev_mth;
- // 判断当前年月是否为一月
- if(parseInt((mon+'').substr(5)) == 1){
- prev_mth = ((parseInt((mon+'').substr(0,4)))-1)+"/12";
- }else{
- if((parseInt((mon+'').substr(5))+'').length == 1){
- prev_mth = (mon+'').substr(0,4) + '/0'+ (parseInt((mon+'').substr(5))-1);
- }else{
- prev_mth = (mon+'').substr(0,4) + '/'+ (parseInt((mon+'').substr(5))-1);
- }
- }
- var param = {
- "mth":mon,
- "prev_mth": prev_mth,
- "dept_id":select_station,
- "queryType":2
- };
- initRqueset(url,param,6);
- }
- /**
- * 图切换后5名
- */
- function init_backward_rank_assess(url,mon,select_station){
- var prev_mth;
- // 判断当前年月是否为一月
- if(parseInt((mon+'').substr(5)) == 1){
- prev_mth = ((parseInt((mon+'').substr(0,4)))-1)+"/12";
- }else{
- if((parseInt((mon+'').substr(5))+'').length == 1){
- prev_mth = (mon+'').substr(0,4) + '/0'+ (parseInt((mon+'').substr(5))-1);
- }else{
- prev_mth = (mon+'').substr(0,4) + '/'+ (parseInt((mon+'').substr(5))-1);
- }
- }
- var param = {
- "mth":mon,
- "dept_id":select_station,
- "prev_mth": prev_mth,
- "order_type":1
- };
- initRqueset(url,param,7);
- }
-
- /**
- * 请求
- * @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());
- }else if(type == 7){
- // 画图
- rank_assess_back.setOption(backward_rank_assess());
- }
- },function(error){
- return "" ;
- });
- }
- /**
- * 数组数据
- * @param {*} data
- * @param {*} type
- */
- function data_array(data,type){
- if(type == 1){
- array_year_score.length = 0;
- if(data!='' && data.length!=0){
- if(data.length<13){
- for(var i=0;i<13-data.length;i++){
- // 不足月份补0
- array_year_score.push(0);
- }
- }
- for(var i=0;i<data.length;i++){
- if(months.indexOf(data[i].mth.substr(2))){
- // 指定位置插入值
- array_year_score.splice(months.indexOf(data[i].mth.substr(2)),0,
- (1000-(filter_handler(data[i].all_check_score,data[i].checked_num,data[i].people_num,0))));
- }
- }
- }else{
- array_year_score.length = 0;
- months.length = 0;
- }
- if(eval("Math.min(" + array_year_score.toString() + ")")==0)
- min_year = 0;
- else
- min_year = eval("Math.min(" + array_year_score.toString() + ")").toFixed(0)-10;
- }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!='' && data.length!=0){
- 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;
- }
- if(eval("Math.min(" + array_five_score.toString() + ")")==0)
- min_five = 0;
- else
- min_five = eval("Math.min(" + array_five_score.toString() + ")").toFixed(0)-1;
- }else if(type == 4){
- array_score_order.length=0;
- array_score_data.length=0;
- var m = 1;
- if(data!='' && data.length!=0){
- for(var i=0;i<data.length;i++){
- //array_score_order.push(data[i].user.truename +"\n"+ (i+1));
- array_score_data.push((1000-filter(data[i].all_check_score,data[i].checked_num,0)));
- }
- }else{
- array_score_order.length=0;
- array_score_data.length=0;
- }
- if(eval("Math.min(" + array_score_data.toString() + ")")==0)
- min_score = 0;
- else
- min_score = eval("Math.min(" + array_score_data.toString() + ")").toFixed(0)-10;
-
- // 给得分人员排名次
- var rank = new Array();
- rank[0] = 1 ;
- for(var i=1; i<array_score_data.length; i++){
- if(array_score_data[i-1] == array_score_data[i] ){
- rank[i] = rank[i-1];
- }else{
- rank[i] = i +1;
- }
- }
- for(var i=0;i<array_score_data.length;i++){
- array_score_order.push(data[i].user.truename +"\n"+ (rank[i]));
- }
- }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;
- if(data!='' && data.Pmth.length!=0 || data.Tmth.length!=0){
- data_each_people_points(data);
- }else{
- array_points_name.length=0;
- array_points_pre.length=0;
- arrar_points_month.length=0;
- }
- }else if(type == 7){
- array_five_name_back.length=0;
- array_five_score_back.length=0;
- if(data!=''){
- for(var i=0;i<data.length;i++){
- array_five_name_back.push(data[i].user.truename);
- if(data[i].ranking_change<0){
- array_five_score_back.push((data[i].ranking_change+'').substr(1));
- }else{
- array_five_score_back.push((data[i].ranking_change+''));
- }
- }
-
- }else{
- array_five_name_back.length=0;
- array_five_score_back.length=0;
- }
- if(eval("Math.min(" + array_five_score_back.toString() + ")")==0){
- min_five_back = 0;
- }else{
- min_five_back = eval("Math.min(" + array_five_score_back.toString() + ")").toFixed(0)-1;
- }
- }
- }
-
- 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] = filter_handler(Tmth[j].all_check_score,Tmth[j].checked_num,Tmth[j].people_num,0);
- 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] = filter_handler(Pmth[m].all_check_score,Pmth[m].checked_num,Pmth[m].people_num,0);
- 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 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;
- }
- 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 = $("#month_date").val();
- var select_station = $("#second").val();
- // 进退步top5
- top5_change(select_month,select_station);
- });
- /**
- * 进退步top5
- * @param {*} select_month
- * @param {*} select_station
- */
- function top5_change(select_month,select_station){
- if(change_echart==1){
- $("#progress span").text("考核退步Top5排行榜");
- $("#progress-rank-assess").css("display","none");
- $("#backward-rank-assess").css("display","block");
- echart_change();
- init_backward_rank_assess("statistics/fs/up/five",select_month+'',select_station);
- change_echart = 2
- }else if(change_echart==2){
- $("#progress span").text("考核进步Top5排行榜");
- $("#progress-rank-assess").css("display","block");
- $("#backward-rank-assess").css("display","none");
- echart_change2();
- init_progress_rank_assess("statistics/fs/up/five",select_month+'',select_station);
- change_echart = 1
- }
- }
-
- /**
- * 除数为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).toFixed(2);
- }
- }
- function filter(num,num1,num2){
- if(num1 == 0){
- return num2;
- }else{
- return (num/num1).toFixed(2);
- }
- }
- /**
- * 其它图配置
- */
- function echart(){
- echart_config(1);
- }
- /**
- * 进步top5图配置
- */
- function echart_change2(){
- echart_config(2);
- }
- /**
- * 退步top5图配置
- */
- function echart_change(){
- echart_config(3);
- }
- /**
- * 图配置
- */
- function echart_config(type){
- require.config({
- paths: {
- echarts: '/js/lib/echarts/build/dist'
- }
- });
- require(
- [
- 'echarts',
- 'echarts/theme/macarons',
- 'echarts/chart/line',
- 'echarts/chart/bar',
- 'echarts/chart/pie'
- ],
- function (ec,theme) {
- if(type == 2){
- rank_assess = ec.init(document.getElementById('progress-rank-assess'));
- }else if(type ==3 ){
- rank_assess_back = ec.init(document.getElementById('backward-rank-assess'));
- }else{
- if(flag){
- year_assess = ec.init(document.getElementById('tollStation-year-assess'),theme);
- }
- points_assess = ec.init(document.getElementById('tollStation-points-assess'),theme);
- score_rank = ec.init(document.getElementById('people-score-rank'));
- check_type = ec.init(document.getElementById('server-check-type'),theme);
- people_points = ec.init(document.getElementById('each-people-points'));
- rank_assess_back = ec.init(document.getElementById('backward-rank-assess'));
- }
- }
- );
- }
- /**
- * 图一
- */
- function tollStation_year_assess(){
-
- option = {
- color : [ '#00ced1' ],
- tooltip : {
- trigger: 'axis'
- },
- noDataLoadingOption :{
- text: '暂无数据',
- effect:'bubble',
- effectOption : {
- effect: {
- n: 0 //气泡个数为0
- }
- },
- textStyle: {
- fontSize: 20,
- fontFamily:'cursive',
- fontWeight: 'bold'
- }
- },
- legend: {
- data:['平均分']
- },
- toolbox: {
- show : true,
- },
- calculable : true,
- xAxis : [
- {
- type : 'category',
- boundaryGap : false,
- data : months
- }
- ],
- yAxis : [
- {
- type : 'value',
- min : min_year ,
- max : 1000,
- axisLabel : {
- formatter: '{value}'
- }
- }
- ],
- series : [
- {
- name:'平均分',
- type:'line',
- data:array_year_score,
- markPoint : {
- data : [
- {type : 'max', name: '最大值'},
- {type : 'min', name: '最小值'}
- ]
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'}
- ]
- }
- },
-
- ]
- };
- return option;
- }
-
- /**
- * 图二
- */
- function tollStation_points_assess(){
- 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 : '65%',
- center: ['50%', '50%'],
- data:array_points,
- itemStyle:{
- normal:{
- label:{
- show: true,
- formatter: '{b} : {c}人 ({d}%)'
- },
- labelLine :{show:true}
- }
- }
- }
- ]
- };
-
- return option;
- }
- /**
- * 图三 前5名
- */
- function progress_rank_assess(){
- option = {
- color : [ '#00ced1' ],// 条形图颜色
- tooltip : {
- trigger: 'axis'
- },
- noDataLoadingOption :{
- text: '暂无数据',
- effect:'bubble',
- effectOption : {
- effect: {
- n: 0 //气泡个数为0
- }
- },
- textStyle: {
- fontSize: 20,
- fontFamily:'cursive',
- fontWeight: 'bold'
- }
- },
- grid:{
- width:"80%"
- },
- legend: {
- data:['进步名次']
- },
- calculable : true,
- xAxis : [
- {
- type : 'category',
- data : array_five_name
- }
- ],
- yAxis : [
- {
- type : 'value',
- min : min_five
- }
- ],
- series : [
- {
- name:'进步名次',
- type:'bar',
- data: array_five_score,
- itemStyle: {
- normal: {
- label: {
- show: true,
- position: 'insideTop'
- }
- }
- },
- }
- ]
- };
-
- return option;
- }
- /**
- * 图三 后5名
- */
- function backward_rank_assess(){
- option = {
- color : [ '#00ced1' ],// 条形图颜色
- tooltip : {
- trigger: 'axis'
- },
- noDataLoadingOption :{
- text: '暂无数据',
- effect:'bubble',
- effectOption : {
- effect: {
- n: 0 //气泡个数为0
- }
- },
- textStyle: {
- fontSize: 20,
- fontFamily:'cursive',
- fontWeight: 'bold'
- }
- },
- grid:{
- width:"80%"
- },
- legend: {
- data:['退步名次']
- },
- calculable : true,
- xAxis : [
- {
- type : 'category',
- data : array_five_name_back
- }
- ],
- yAxis : [
- {
- type : 'value',
- min : min_five_back
- }
- ],
- series : [
- {
- name:'退步名次',
- type:'bar',
- data: array_five_score_back,
- itemStyle: {
- normal: {
- label: {
- show: true,
- position: 'insideTop'
- }
- }
- },
- }
- ]
- };
-
- return option;
- }
- /**
- * 图四
- */
- function people_score_rank(){
- option = {
- color : [ '#00ced1' ],// 条形图颜色
- tooltip : {
- trigger: 'axis'
- },
- noDataLoadingOption :{
- text: '暂无数据',
- effect:'bubble',
- effectOption : {
- effect: {
- n: 0 //气泡个数为0
- }
- },
- textStyle: {
- fontSize: 20,
- fontFamily:'cursive',
- fontWeight: 'bold'
- }
- },
- grid:{
- width:"88%"
- },
- legend: {
- data:['平均分']
- },
- calculable : true,
- xAxis : [
- {
- axisLabel: {
- interval:0
- } ,
- type : 'category',
- data : array_score_order
- }
- ],
-
- yAxis : [
- {
- type : 'value',
- min : min_score ,
- max : 1000
- }
- ],
- series : [
- {
- name:'平均分',
- type:'bar',
- data: array_score_data,
- itemStyle: {
- normal: {
- label: {
- show: true,
- position: 'insideTop'
- }
- }
- },
- markLine : {
- data : [
- {type : 'average', name: '平均值'}
- ]
- }
- }
- ]
- };
-
- return option;
- }
- /**
- * 图五
- */
- function server_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} : {c}分 ({d}%)'
- },
- labelLine :{show:true}
- }
- }
- }
- ]
- };
- return option;
- }
- /**
- * 图六
- */
- function each_people_points(){
- option = {
- tooltip : {
- trigger: 'axis'
- },
- noDataLoadingOption :{
- text: '暂无数据',
- effect:'bubble',
- effectOption : {
- effect: {
- n: 0 //气泡个数为0
- }
- },
- textStyle: {
- fontSize: 20,
- fontFamily:'cursive',
- fontWeight: 'bold'
- }
- },
- grid:{
- width:"80%"
- },
- legend: {
- data:['上月','本月']
- },
- calculable : true,
- xAxis : [
- {
- type : 'category',
- data : array_points_name
- }
- ],
- yAxis : [
- {
- type : 'value'
- }
- ],
- series : [
- {
- name:'上月',
- type:'bar',
- data:array_points_pre,
- itemStyle: {
- normal: {
- color:'#b3d4fc',
- label: {
- show: true,
- position: 'insideTop'
- }
- }
- },
- },
- {
- name:'本月',
- type:'bar',
- data:arrar_points_month,
- itemStyle: {
- normal: {
- color:'#ea644a',
- label: {
- show: true,
- position: 'insideTop'
- }
- }
- },
- }
- ]
- };
- return option;
- }
- });
- function setVisit(){
- if(roleContains("STATION")){
- $("#first").attr("disabled","disabled");
- $("#second").attr("disabled","disabled");
- }
- }
|