var themeDoubleFlag = false var timerTheme = null var themeBarEcharts = echarts.init(document.getElementById('themeBarEle')); var themeBarDownEcharts = echarts.init(document.getElementById("themeBarDownEle")); var themeDblId //调度专题 //$('.accept_channel #hotThings').click(function(e) { // clearTimeout(themeDoubleFlag) // themeDoubleFlag = setTimeout(function(){ // console.log("单击") // $(".themeBarTit").text($('.cutDispatchHandle').text()) // $(".themeBar_wrap").show() // getThemeStatics(); // },500) // //}) $(".accept_channel #hotThings").dblclick(function(){ $(".themeBarTit").text($('.cutDispatchHandle').text()) clearTimeout(themeDoubleFlag) console.log("双击") $('.themeBar_wrap').siblings().hide() $('.bulletFrame').show(); $(".themeBar_wrap").show() initThemeBar() }); $(".backTheme").click(function () { domM = 'themeBarEle' $('.themeBar_wrap').siblings().hide() $('.bulletFrame').show(); $(".themeBar_wrap").show() }) $(".backThemeClass").click(function () { domM = 'themeBarEle' $('.themeBar_down').siblings().hide() $('.themeBar_down').show(); }) themeBarEcharts.getZr().on('click', function (params) { console.log(params) console.log(params.value) var pointInPixel = [params.offsetX, params.offsetY]; var pointInGrid = themeBarEcharts.convertFromPixel({ seriesIndex: 0 }, pointInPixel); var xIndex = pointInGrid[0]; //索引 var handleIndex = Number(xIndex); var seriesObj = themeBarEcharts.getOption(); //图表object对象 $('.themeBar_down').siblings().hide() $('.themeBar_down').show(); domM = 'themeBarDownEle' themeDblId = seriesObj.series[0].data[handleIndex].themId // getHotThings() cutHotThings() }) //themeDblId = null $("#themeBarDownEle").click(function () { $(".backThemeClass").show() getThemeStatics(); }) //themeBarDownEcharts.on('click', function (params) { // getThemeStatics(); //}) function initThemeBar() { var secData = []; console.log(dispatTopicType) new doAjax({ url:huayi.config.callcenter_url+'/InfoNew/GetThemeMonth', Type: 'get', data: { type:dispatTopicType, token: $.cookie("token"), }, callBack: function (res) { console.log(res.data) res.data.forEach(function (v, n) { secData.push({ level: v.F_Name, landArea: v.count, id:v.F_ID, }) }) domM = 'themeBarEle' getHonelineChart2(secData) } }); }