説明なし

复制 trafficData.js 4.2KB

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