Brak opisu

trafficDataBF1.js 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. trafficDataChart('timeTraffic', daySeatName, callDate, callDate[0])
  2. $('.btn_time').click(function(e) {
  3. if(e.target.tagName == 'SPAN') {
  4. console.log("哈哈哈哈,点我揍你")
  5. if($(e.target).attr('data-state') == '1') {
  6. $('.daySeat').css('display', 'none')
  7. $('.timeTraffic').css('display', 'inline-block')
  8. $('#traffic').css('display', 'none')
  9. $('#timeTraffic').css('display', 'block')
  10. $('.act').html('当日数据')
  11. $('.call_situation h2').text('话务数据统计')
  12. trafficDataChart('timeTraffic', ['登陆坐席数量1', '呼叫排队数量1', '话务量1', '呼入接通量1'], callDate, callDate[0])
  13. trafficState = 0
  14. }
  15. }
  16. e.stopPropagation();
  17. })
  18. function trafficDataChart(dom, data, count, count1, rotate = 0) {
  19. let hotThings = echarts.init(document.getElementById("timeTraffic"));
  20. console.log(hotThings)
  21. window.onresize = function() {
  22. hotThings.resize()
  23. }
  24. option = {
  25. tooltip: {
  26. trigger: 'axis',
  27. axisPointer: {
  28. type: 'shadow'
  29. },
  30. show: true,
  31. formatter(params) {
  32. console.log((params.name,params.value)
  33. if(params.value === '-') {
  34. return `${params.name}: 0`;
  35. }
  36. return `${params.name}: ${params.value}`
  37. }
  38. },
  39. // legend: {
  40. // textStyle: {
  41. // fontSize: 12, //字体大小
  42. // color: '#ffffff' //字体颜色
  43. // },
  44. // lineStyle: {
  45. // color: '#ffffff'
  46. // }
  47. // },
  48. grid: {
  49. left: '3%',
  50. right: '4%',
  51. bottom: '3%',
  52. containLabel: true
  53. },
  54. xAxis: [{
  55. type: 'category',
  56. axisLine:{
  57. lineStyle:{
  58. color:'#ffffff'
  59. }
  60. },
  61. axisLabel: {
  62. show: true,
  63. textStyle: {
  64. color: '#ffffff'
  65. }
  66. },
  67. data: ['呼入量', '接通量', '呼入接通率', '呼出量', '呼出接通量', '呼出接通率']
  68. }],
  69. // tooltip: {
  70. // show: true,
  71. // },
  72. yAxis: [
  73. {
  74. type: 'value',
  75. axisLine:{
  76. lineStyle:{
  77. color:'#ffffff'
  78. }
  79. },
  80. // interval: 5,
  81. // splitLine:{ show:false} ,
  82. // axisLine: {show: false},
  83. // axisTick: {show: false}
  84. },
  85. {
  86. type: 'value',
  87. axisLine:{
  88. lineStyle:{
  89. color:'#ffffff'
  90. }
  91. },
  92. // interval: 5,
  93. splitLine:{ show:false} ,
  94. min: 0,
  95. max: 100,
  96. axisLabel: {
  97. formatter: '{value} 100%'
  98. }
  99. }
  100. ],
  101. series: [{
  102. name: '呼入量',
  103. type: 'bar',
  104. stack: 'A',
  105. barWidth : 15,
  106. data: [320,'-','-','-','-','-']
  107. },
  108. {
  109. name: '未接通回拨量',
  110. type: 'bar',
  111. stack: 'A',
  112. barWidth : 15,
  113. data: ['-',20,'-','-','-','-']
  114. },
  115. {
  116. name: '自助接听量',
  117. type: 'bar',
  118. stack: 'A',
  119. barWidth : 15,
  120. data: ['-',80,'-','-','-','-']
  121. },
  122. {
  123. name: '人工接通量',
  124. type: 'bar',
  125. stack: 'A',
  126. barWidth : 15,
  127. data: ['-',220,'-','-','-','-']
  128. },
  129. {
  130. name: '回拨率',
  131. type: 'bar',
  132. stack: 'A',
  133. yAxisIndex: 1,
  134. barWidth : 15,
  135. data: ['-','-',20,'-','-','-']
  136. },
  137. {
  138. name: '自助率',
  139. type: 'bar',
  140. stack: 'A',
  141. yAxisIndex: 1,
  142. barWidth : 15,
  143. data: ['-','-',30,'-','-','-']
  144. },
  145. {
  146. name: '人工率',
  147. type: 'bar',
  148. stack: 'A',
  149. yAxisIndex: 1,
  150. barWidth : 15,
  151. data: ['-','-',50,'-','-','-']
  152. },
  153. {
  154. name: '呼出量',
  155. type: 'bar',
  156. stack: 'A',
  157. barWidth : 15,
  158. data: ['-','-','-',150,'-','-']
  159. },
  160. {
  161. name: '呼出接通量',
  162. type: 'bar',
  163. stack: 'A',
  164. barWidth : 15,
  165. data: ['-','-','-','-',150,'-']
  166. },
  167. {
  168. name: '呼出接通率',
  169. type: 'bar',
  170. stack: 'A',
  171. yAxisIndex: 1,
  172. barWidth :15,
  173. data: ['-','-','-','-','-',99]
  174. },
  175. ]
  176. };
  177. hotThings.setOption(option);
  178. }