Keine Beschreibung

themeDoubleClick.js 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. var themeDoubleFlag = false
  2. var timerTheme = null
  3. var themeBarEcharts = echarts.init(document.getElementById('themeBarEle'));
  4. var themeBarDownEcharts = echarts.init(document.getElementById("themeBarDownEle"));
  5. var themeDblId
  6. //调度专题
  7. //$('.accept_channel #hotThings').click(function(e) {
  8. // clearTimeout(themeDoubleFlag)
  9. // themeDoubleFlag = setTimeout(function(){
  10. // console.log("单击")
  11. // $(".themeBarTit").text($('.cutDispatchHandle').text())
  12. // $(".themeBar_wrap").show()
  13. // getThemeStatics();
  14. // },500)
  15. //
  16. //})
  17. $(".accept_channel #hotThings").dblclick(function(){
  18. $(".themeBarTit").text($('.cutDispatchHandle').text())
  19. clearTimeout(themeDoubleFlag)
  20. console.log("双击")
  21. $('.themeBar_wrap').siblings().hide()
  22. $('.bulletFrame').show();
  23. $(".themeBar_wrap").show()
  24. initThemeBar()
  25. });
  26. $(".backTheme").click(function () {
  27. domM = 'themeBarEle'
  28. $('.themeBar_wrap').siblings().hide()
  29. $('.bulletFrame').show();
  30. $(".themeBar_wrap").show()
  31. })
  32. $(".backThemeClass").click(function () {
  33. domM = 'themeBarEle'
  34. $('.themeBar_down').siblings().hide()
  35. $('.themeBar_down').show();
  36. })
  37. themeBarEcharts.getZr().on('click', function (params) {
  38. console.log(params)
  39. console.log(params.value)
  40. var pointInPixel = [params.offsetX, params.offsetY];
  41. var pointInGrid = themeBarEcharts.convertFromPixel({
  42. seriesIndex: 0
  43. }, pointInPixel);
  44. var xIndex = pointInGrid[0]; //索引
  45. var handleIndex = Number(xIndex);
  46. var seriesObj = themeBarEcharts.getOption(); //图表object对象
  47. $('.themeBar_down').siblings().hide()
  48. $('.themeBar_down').show();
  49. domM = 'themeBarDownEle'
  50. themeDblId = seriesObj.series[0].data[handleIndex].themId
  51. // getHotThings()
  52. cutHotThings()
  53. })
  54. //themeDblId = null
  55. $("#themeBarDownEle").click(function () {
  56. $(".backThemeClass").show()
  57. getThemeStatics();
  58. })
  59. //themeBarDownEcharts.on('click', function (params) {
  60. // getThemeStatics();
  61. //})
  62. function initThemeBar() {
  63. var secData = [];
  64. console.log(dispatTopicType)
  65. new doAjax({
  66. url:huayi.config.callcenter_url+'/InfoNew/GetThemeMonth',
  67. Type: 'get',
  68. data: {
  69. type:dispatTopicType,
  70. token: $.cookie("token"),
  71. },
  72. callBack: function (res) {
  73. console.log(res.data)
  74. res.data.forEach(function (v, n) {
  75. secData.push({
  76. level: v.F_Name,
  77. landArea: v.count,
  78. id:v.F_ID,
  79. })
  80. })
  81. domM = 'themeBarEle'
  82. getHonelineChart2(secData)
  83. }
  84. });
  85. }