var token = $.cookie("token"); var tabtu; $(document).ready(function() { //日期 laydate.render({ elem: '#startTime', range: '~', theme: '#00a1cb', }); //tab切换 $('.th-tab li').click(function() { $(this).addClass('active') .siblings().removeClass('active'); var index = $(this).index(); $('.th-content >div').eq(index).show() .siblings().hide(); }) //搜索事件 $(".sear").click(function() { Ajax(); }); //导出 $('.export').click(function() { dcexcel(this); }) Ajax(); //表格数据 tableHead(); //表头 }) //图形 tabtu = echarts.init(document.getElementById('tabtu')); tabtu.setOption({ tooltip: { trigger: 'axis', }, legend: { data: ['接通次数', '呼损次数', '接通率', '呼损率'], bottom: 0 }, xAxis: [{ type: 'category', data: [], axisPointer: { type: '' }, axisLabel: { rotate: 30, interval: 0 } }], yAxis: [{ type: 'value', name: '通话次数(通)', nameLocation: 'middle', nameGap: 40, axisLabel: { formatter: '{value} ' } }, { type: 'value', name: '百分比(%)', nameLocation: 'middle', nameGap: 35, axisLabel: { formatter: '{value} ' } } ], series: [{ type: 'bar', name: '接通次数', data: [] }, { type: 'bar', name: '呼损次数', data: [] }, { type: 'line', name: '接通率', data: [], yAxisIndex: 1, }, { type: 'line', name: '呼损率', data: [], yAxisIndex: 1, } ], color: ['#1ab394', '#fbbe5b', '#88ebc4', '#fa957f'] }); //表头数据 function tableHead() { $.ajax({ type: "get", url: huayi.config.callcenter_url + "SwitchedlossCall/GetColumnList", async: true, dataType: 'json', data: { token: token }, success: function(res) { var con = res.data; $('#thead thead tr').html(''); for(var i = 0; i < con.length; i++) { $('