| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479 |
- var bigdataList = null;
- var sd = "";
- var ed = "";
- partpaat(sd, ed);
-
- // 轮播
- banner1()
- // 轮播
- function banner1(){
- var i=0;
- var Timer;
- $(function(){
- $(".picImg").eq(0).show().siblings().hide(); //默认第一个div片显示,其他的隐藏
- //自动轮播
- TimerBanner();
- //点击红圈
- $(".picImg").hover(function(){ //鼠标移动上去
- clearInterval(Timer); //让计时器暂时停止 清除计时器
- i=$(this).index(); //获取该圈的索引
- showPic(); //调用显示图片的方法,显示该索引对应的图片
- },function(){ //鼠标离开
- TimerBanner(); //继续轮播 计时器开始
- });
- $(".tabs .aaa").hover(function(){ //鼠标移动上去
- clearInterval(Timer); //让计时器暂时停止 清除计时器
- i=$(this).index(); //获取该圈的索引
- showPic(); //调用显示图片的方法,显示该索引对应的图片
- },function(){ //鼠标离开
- TimerBanner(); //继续轮播 计时器开始
- });
- //点击左右按钮
- $(".btn1").click(function(){
- clearInterval(Timer);
- i--; //往左
- if(i==-1){
- i=4;
- }
- showPic();
- TimerBanner();
- });
- $(".btn2").click(function(){
- clearInterval(Timer);
- i++; //往右
- if(i==4){
- i=0;
- }
- showPic();
- TimerBanner();
- });
- });
- //轮播部分
- function TimerBanner(){
- Timer = setInterval(function(){
- i++;
- if(i==4){
- i=0;
- }
- showPic()
- },5000);
- }
- //显示div
- function showPic() {
- $(".picImg").eq(i).show().siblings().hide();
- $(".bg").hide();
- $(".tabs .aaa").eq(i).children(".bg").show();
- }
- }
- function partpaat(sd,ed) {
- var myChart = echarts.init(document.getElementById('chart'));
- var myChartaaa = echarts.init(document.getElementById('dback'));
- var myChartbbb = echarts.init(document.getElementById('mold'));
- var myChartppp = echarts.init(document.getElementById('uction'));
-
- var myChreti = echarts.init(document.getElementById('sippu'));
- var myKouc = echarts.init(document.getElementById('siupi'));
- var myKucot = echarts.init(document.getElementById('siupiac'));
- var myTou = echarts.init(document.getElementById('siyi'));
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Business/GetBigdataList",
- async: true,
- dataType: "json",
- data: {
- stime:sd,
- endtime:ed,
- },
- success: function(data) {
- if (data.state.toLowerCase() == "success") {
- var con = data.data;
- var realtime = con.realtime;
- var acceptancetimes = con.acceptancetimes;
- var states = con.states;
- var region = con.region;
-
- //当日工单数量
- var type_data_realtime_time = [];
- var type_data_realtime_total = [];
- $(realtime).each(function(i, n) {
- type_data_realtime_time.push(n.time);
- type_data_realtime_total.push(n.total);
- })
-
- //24小时时段受理量/处理量
- var type_data_acceptancetimes_time = [];
- var type_data_acceptancetimes_accept = [];
- var type_data_acceptancetimes_handle = [];
- $(acceptancetimes).each(function(i, n){
- type_data_acceptancetimes_time.push(n.time);
- type_data_acceptancetimes_accept.push(n.accept);
- type_data_acceptancetimes_handle.push(n.handle);
- })
-
- //工单个状态数量分布
- var type_data_states = [];
- $(states).each(function(i, n){
- var type_data_states_name_total = {};
- type_data_states_name_total.value = n.total;
- type_data_states_name_total.name = n.name;
- type_data_states.push(type_data_states_name_total);
- })
-
- //受理区域
- var type_data_region_name = [];
- var type_data_region_total = [];
- $(region).each(function(i, n){
- type_data_region_name.push(n.name);
- type_data_region_total.push(n.total);
- })
-
- // 当日工单数量
- myChreti.setOption({
- title: {
- text: '当日工单数量',
- x: 'center',
- textStyle: {
- "color": "#FFFFFF"
- }
- },
- tooltip: {
- trigger: 'axis'
- },
- xAxis: {
- type: 'category',
- data: type_data_realtime_time,
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- },
- yAxis: {
- type: 'value',
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- splitLine :{ //网格线
- lineStyle:{
- type:'dashed' //设置网格线类型 dotted:虚线 solid:实线
- },
- show:true //隐藏或显示
- }
- },
- series: [{
- name: '数量',
- data: type_data_realtime_total,
- type: 'line',
- itemStyle: {
- normal: {
- color: '#FAD860',
- }
- },
- }]
- });
-
- myChartppp.setOption({
- tooltip: {
- trigger: 'axis'
- },
- xAxis: {
- type: 'category',
- data: type_data_realtime_time,
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- },
- yAxis: {
- show: false,
- },
- series: [{
- name: '数量',
- data: type_data_realtime_total,
- type: 'line',
- itemStyle: {
- normal: {
- color: '#FAD860',
- }
- },
- }]
- });
-
-
- //24小时时段受理量/处理量分布图
- myKouc.setOption({
- title: {
- text: '24小时时段受理量/处理量分布图',
- x: 'center',
- textStyle: {
- "color": "#FFFFFF"
- }
- },
- legend: {
- data: ['受理量', '处理量'],
- bottom: 5,
- textStyle: {
- color: "#FFFAF0"
- }
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- xAxis: {
- type: 'category',
- data: type_data_acceptancetimes_time,
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- },
- yAxis: {
- type: 'value',
- boundaryGap: [0, 0.01],
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- splitLine: { //网格线
- show: false //隐藏或显示
- },
- },
- series: [
- {
- name: '受理量',
- type: 'bar',
- itemStyle: {
- normal: {
- color: '#1890FF',
- }
- },
- data: type_data_acceptancetimes_accept,
- },
- {
- name: '处理量',
- type: 'bar',
- itemStyle: {
- normal: {
- color: '#13C2C2',
- }
- },
- data: type_data_acceptancetimes_handle,
- }
- ]
- })
-
- myChart.setOption({
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- xAxis: {
- type: 'category',
- data: type_data_acceptancetimes_time,
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- },
- yAxis: {
- show: false,
- },
- series: [
- {
- name: '受理量',
- type: 'bar',
- itemStyle: {
- normal: {
- color: '#1890FF',
- }
- },
- data: type_data_acceptancetimes_accept,
- },
- {
- name: '处理量',
- type: 'bar',
- itemStyle: {
- normal: {
- color: '#13C2C2',
- }
- },
- data: type_data_acceptancetimes_handle,
- },
- ]
- })
-
-
- //工单各状态数量分布
- myKucot.setOption({
- title : {
- text: '工单各状态数量分布',
- x: 'center',
- textStyle: {
- "color": "#FFFFFF"
- }
- },
- tooltip : {
- trigger: 'item',
- formatter: "{a} <br/>{b} : {c} ({d}%)"
- },
- series : [
- {
- name: '工单各状态数量分布',
- type: 'pie',
- radius : '55%',
- data: type_data_states,
- itemStyle: {
- normal: {
- color: function(params) {
- //自定义颜色
- var colorList = [
- '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
- '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
- '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
- ];
- return colorList[params.dataIndex]
- }
- }
- }
- }
- ]
- })
-
- myChartaaa.setOption({
- tooltip : {
- trigger: 'item',
- formatter: "{a} <br/>{b} : {c} ({d}%)"
- },
- series : [
- {
- name: '工单各状态数量分布',
- type: 'pie',
- radius : '55%',
- data: type_data_states,
- label: {
- normal: {
- show: false
- }
- },
- itemStyle: {
- normal: {
- color: function(params) {
- //自定义颜色
- var colorList = [
- '#1890FF', '#2EC25B', '#FACC14', '#04D9FF', '#8543E0', '#13C2C2',
- '#00C0FF', '#05EB78', '#D141D9', '#05EB61', '#2FCDCD', '#BEEB30',
- '#EB9005', '#FFFF00', '#FF7F50', '#3CB371', '#00BFFF', '#9932CC',
- ];
- return colorList[params.dataIndex]
- }
- }
- }
- }
- ]
- })
-
-
- //受理区域
- myTou.setOption({
- title: {
- text: '受理区域',
- x: 'center',
- textStyle: {
- "color": "#FFFFFF"
- }
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- xAxis: {
- type: 'category',
- data: type_data_region_name,
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- },
- yAxis: {
- type: 'value',
- boundaryGap: [0, 0.01],
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- splitLine: { //网格线
- show: false //隐藏或显示
- },
- },
- series: [
- {
- name: '数量',
- type: 'bar',
- data: type_data_region_total,
- itemStyle: {
- normal: {
- color: '#1890FF',
- }
- },
- },
- ]
- })
-
- myChartbbb.setOption({
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- xAxis: {
- type: 'category',
- data: type_data_region_name,
- axisLine: {
- lineStyle: {
- color: '#FFFFFF',//坐标线的颜色
- }
- },
- },
- yAxis: {
- show: false,
- },
- series: [
- {
- name: '数量',
- type: 'bar',
- data: type_data_region_total,
- itemStyle: {
- normal: {
- color: '#1890FF',
- }
- },
- }
- ]
- })
- }
- }
- });
- }
|