|
|
@@ -0,0 +1,414 @@
|
|
|
+$(function(){
|
|
|
+ // 路径配置
|
|
|
+ require.config({
|
|
|
+ paths: {
|
|
|
+ echarts: '/js/lib/echarts/build/dist'
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // 使用
|
|
|
+ require(
|
|
|
+ [
|
|
|
+ 'echarts',
|
|
|
+ 'echarts/chart/line',
|
|
|
+ 'echarts/chart/bar',
|
|
|
+ 'echarts/chart/pie'
|
|
|
+ ],
|
|
|
+ function (ec) {
|
|
|
+ // 基于准备好的dom,初始化echarts图表
|
|
|
+ var year_assess = ec.init(document.getElementById('roadManager-year-assess'));
|
|
|
+ var points_assess = ec.init(document.getElementById('roadManager-points-assess'));
|
|
|
+ var score_rank = ec.init(document.getElementById('tollStation-score-rank'));
|
|
|
+ var rank_pre = ec.init(document.getElementById('people-rank-pre'));
|
|
|
+ var rank_suf = ec.init(document.getElementById('people-rank-suf'));
|
|
|
+ var check_type = ec.init(document.getElementById('server-check-type'));
|
|
|
+ var people_points = ec.init(document.getElementById('each-people-points'));
|
|
|
+ // 为echarts对象加载数据
|
|
|
+ year_assess.setOption(roadManager_year_assess());
|
|
|
+ points_assess.setOption(roadManager_points_assess());
|
|
|
+ score_rank.setOption(tollStation_score_rank());
|
|
|
+ rank_pre.setOption(people_rank_pre());
|
|
|
+ rank_suf.setOption(people_rank_suf());
|
|
|
+ check_type.setOption(server_check_type());
|
|
|
+ people_points.setOption(each_people_points());
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 图一
|
|
|
+ */
|
|
|
+ function roadManager_year_assess(){
|
|
|
+
|
|
|
+ option = {
|
|
|
+ color : [ '#00ced1' ],
|
|
|
+ tooltip : {
|
|
|
+ trigger: 'axis'
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ data:['平均分']
|
|
|
+ },
|
|
|
+ toolbox: {
|
|
|
+ show : true,
|
|
|
+ },
|
|
|
+ calculable : true,
|
|
|
+ xAxis : [
|
|
|
+ {
|
|
|
+ type : 'category',
|
|
|
+ boundaryGap : false,
|
|
|
+ data : ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ yAxis : [
|
|
|
+ {
|
|
|
+ type : 'value',
|
|
|
+ min : 700 ,
|
|
|
+ max : 1000,
|
|
|
+ axisLabel : {
|
|
|
+ formatter: '{value}'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ series : [
|
|
|
+ {
|
|
|
+ name:'平均分',
|
|
|
+ type:'line',
|
|
|
+ data:[800, 790, 780, 900, 1000,780, 1000,880,900,950,900,800,790],
|
|
|
+ markPoint : {
|
|
|
+ data : [
|
|
|
+ {type : 'max', name: '最大值'},
|
|
|
+ {type : 'min', name: '最小值'}
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ markLine : {
|
|
|
+ data : [
|
|
|
+ {type : 'average', name: '平均值'}
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ return option;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 图二
|
|
|
+ */
|
|
|
+ function roadManager_points_assess(){
|
|
|
+ option = {
|
|
|
+ tooltip : {
|
|
|
+ trigger: 'item',
|
|
|
+ formatter: "{a} <br/>{b} : {c} ({d}%)"
|
|
|
+ },
|
|
|
+ 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:[
|
|
|
+ {value:335, name:'0-15分'},
|
|
|
+ {value:310, name:'15-50分'},
|
|
|
+ {value:234, name:'50分以上'},
|
|
|
+ {value:135, name:'满分'}
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+
|
|
|
+ return option;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 图三
|
|
|
+ */
|
|
|
+ function tollStation_score_rank(){
|
|
|
+ option = {
|
|
|
+ color : [ '#00ced1' ],// 条形图颜色
|
|
|
+ tooltip : {
|
|
|
+ trigger: 'axis'
|
|
|
+ },
|
|
|
+
|
|
|
+ calculable : true,
|
|
|
+ xAxis : [
|
|
|
+ {
|
|
|
+ type : 'category',
|
|
|
+ data : ['灌云北','灌云东','灌南东','响水','六套','滨海','蔡桥',]
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ yAxis : [
|
|
|
+ {
|
|
|
+ type : 'value',
|
|
|
+ min : 900 ,
|
|
|
+ max : 1000
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ series : [
|
|
|
+ {
|
|
|
+
|
|
|
+ type:'bar',
|
|
|
+ data:[980, 950, 1000,944,988,963,949],
|
|
|
+ itemStyle: {
|
|
|
+ normal: {
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'insideTop'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ markLine : {
|
|
|
+ data : [
|
|
|
+ {type : 'average', name: '平均值'}
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+
|
|
|
+ return option;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 图四
|
|
|
+ */
|
|
|
+ function people_rank_pre(){
|
|
|
+ option = {
|
|
|
+ color : [ '#00ced1' ],// 条形图颜色
|
|
|
+ tooltip : {
|
|
|
+ trigger: 'axis'
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ data:['平均分']
|
|
|
+ },
|
|
|
+ calculable : true,
|
|
|
+ xAxis : [
|
|
|
+ {
|
|
|
+ type : 'category',
|
|
|
+ data : ['小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)',
|
|
|
+ '小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)','小明\n(灌云北)']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ yAxis : [
|
|
|
+ {
|
|
|
+ type : 'value',
|
|
|
+ min : 900 ,
|
|
|
+ max : 1000
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ series : [
|
|
|
+ {
|
|
|
+ name:'平均分',
|
|
|
+ type:'bar',
|
|
|
+ data:[910.0, 920, 945, 930, 970, 950, 955, 945, 985.6, 990.0],
|
|
|
+ itemStyle: {
|
|
|
+ normal: {
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'insideTop'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ markPoint : {
|
|
|
+ data : [
|
|
|
+ {type : 'max', name: '最大值'},
|
|
|
+ {type : 'min', name: '最小值'}
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ markLine : {
|
|
|
+ data : [
|
|
|
+ {type : 'average', name: '平均值'}
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+
|
|
|
+ return option;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 图五
|
|
|
+ */
|
|
|
+ function people_rank_suf(){
|
|
|
+ option = {
|
|
|
+ color : [ '#00ced1' ],// 条形图颜色
|
|
|
+ tooltip : {
|
|
|
+ trigger: 'axis'
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ data:['平均分']
|
|
|
+ },
|
|
|
+ calculable : true,
|
|
|
+ xAxis : [
|
|
|
+ {
|
|
|
+ type : 'category',
|
|
|
+ data : ['小明\n(灌云北)','小明1\n(灌云北)','小明2\n(灌云北)','小明3\n(灌云北)','小明4\n(灌云北)',
|
|
|
+ '小明5\n(灌云北)','小明6\n(灌云北)','小明7\n(灌云北)','小明8\n(灌云北)','小明9\n(灌云北)']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ yAxis : [
|
|
|
+ {
|
|
|
+ type : 'value',
|
|
|
+ min : 900 ,
|
|
|
+ max : 1000
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ series : [
|
|
|
+ {
|
|
|
+ name:'平均分',
|
|
|
+ type:'bar',
|
|
|
+ data:[910.0, 920, 945, 930, 970, 950, 955, 945, 985.6, 990.0],
|
|
|
+ itemStyle: {
|
|
|
+ normal: {
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'insideTop'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ markPoint : {
|
|
|
+ data : [
|
|
|
+ {type : 'max', name: '最大值'},
|
|
|
+ {type : 'min', name: '最小值'}
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ markLine : {
|
|
|
+ data : [
|
|
|
+ {type : 'average', name: '平均值'}
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+
|
|
|
+ return option;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 图六
|
|
|
+ */
|
|
|
+ function server_check_type(){
|
|
|
+ option = {
|
|
|
+ tooltip : {
|
|
|
+ trigger: 'item',
|
|
|
+ formatter: "{a} <br/>{b} : {c} ({d}%)"
|
|
|
+ },
|
|
|
+ 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:[
|
|
|
+ {value:335, name:'环境卫生'},
|
|
|
+ {value:310, name:'仪容仪表'},
|
|
|
+ {value:234, name:'表情'},
|
|
|
+ {value:135, name:'收费动作'},
|
|
|
+ {value:335, name:'文明用语'},
|
|
|
+ {value:310, name:'工作纪律'},
|
|
|
+ {value:234, name:'便民服务'},
|
|
|
+ {value:135, name:'安全管理'}
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ return option;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 图七
|
|
|
+ */
|
|
|
+ function each_people_points(){
|
|
|
+ option = {
|
|
|
+ tooltip : {
|
|
|
+ trigger: 'axis'
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ data:['上月','本月']
|
|
|
+ },
|
|
|
+ calculable : true,
|
|
|
+ xAxis : [
|
|
|
+ {
|
|
|
+ type : 'category',
|
|
|
+ data : ['环境卫生','仪容仪表','表情','收费动作','文明用语','工作纪律','便民服务','安全管理']
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ yAxis : [
|
|
|
+ {
|
|
|
+ type : 'value'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ series : [
|
|
|
+ {
|
|
|
+ name:'上月',
|
|
|
+ type:'bar',
|
|
|
+ data:[200.0, 400.9, 700.0, 230.2, 253.6, 760.7,880,500],
|
|
|
+ itemStyle: {
|
|
|
+ normal: {
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'insideTop'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name:'本月',
|
|
|
+ type:'bar',
|
|
|
+ data:[200.6, 500.9, 900.0, 260.4, 280.7, 700.7,500,800],
|
|
|
+ itemStyle: {
|
|
|
+ normal: {
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ position: 'insideTop'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ return option;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
+
|
|
|
+});
|