| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071 |
- 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(){
- // 公用方法,根据当前年月动态将13个月push数组
- month_method();
- // 公用方法,月份下拉框
- select_option();
- // 回显当前年月份
- $(".div-month select").val(initDate);
- setSecond();
- $(".div-button button").click(function(){
- var select_month = $(".div-month select").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_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;
- // 给考核进步top5排名次
- var rank = new Array();
- rank[0] = 1 ;
- for(var i=1; i<array_five_score.length; i++){
- if(array_five_score[i-1] == array_five_score[i] ){
- rank[i] = rank[i-1];
- }else{
- rank[i] = i + 1;
- }
- }
- for(var i=0;i<array_five_score.length;i++){
- array_five_name.push(data[i].user.truename+"\n"+ (rank[i]));
- }
- }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_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++){
- 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;
- }
- // 给考核进步top5排名次
- var rank = new Array();
- rank[0] = 1 ;
- for(var i=1; i<array_five_score_back.length; i++){
- if(array_five_score_back[i-1] == array_five_score_back[i] ){
- rank[i] = rank[i-1];
- }else{
- rank[i] = i + 1;
- }
- }
- for(var i=0;i<array_five_score_back.length;i++){
- array_five_name_back.push(data[i].user.truename+"\n"+ (rank[i]));
- }
- }
- }
-
- 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 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_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 "" ;
- });
- }
- /**
- * 进步前5名后退步前五名切换
- */
- $(".view_change").click(function(){
- var select_month = $(".div-month select").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 : '55%',
- center: ['50%', '50%'],
- data:array_points,
- itemStyle:{
- normal:{
- label:{
- show: true,
- formatter: '{b} :\n{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} :\n{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;
- }
-
-
- });
|