市长热线演示版

screenshow.aspx 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="screenshow.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.reportmanage.screenshow" %>
  2. <!DOCTYPE html>
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head runat="server">
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title></title>
  7. <script src="/ThirdParty/js/jquery-1.8.3.min.js" type="text/javascript"></script>
  8. <script src="/ThirdParty/js/highcharts.js" type="text/javascript"></script>
  9. <script type="text/javascript">
  10. $(function() {
  11. total();
  12. talk();
  13. switched();
  14. if (!!(window.attachEvent && !window.opera))
  15. { document.execCommand("stop"); }
  16. else
  17. { window.stop(); }
  18. setTimeout("window.location.reload();", 5000 )
  19. });
  20. var totalchart;
  21. function setTotalChart(name, categories, data, color) {
  22. totalchart.xAxis[0].setCategories(categories, false);
  23. totalchart.series[0].remove(false);
  24. totalchart.addSeries({
  25. name: name,
  26. data: data,
  27. color: color || 'white'
  28. }, false);
  29. totalchart.redraw();
  30. }
  31. function total() {
  32. var colors = Highcharts.getOptions().colors,
  33. categories = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
  34. name = '时间月/日',
  35. data =<%=totalcallreport %>;
  36. totalchart = $('#totalcallreport').highcharts({
  37. chart: {
  38. type: 'column'
  39. },
  40. title: {
  41. text: '总呼叫量统计'
  42. },
  43. subtitle: {
  44. text: '服务热线'
  45. },
  46. xAxis: {
  47. categories: categories
  48. },
  49. yAxis: {
  50. title: {
  51. text: '呼叫数量(通)'
  52. }
  53. },
  54. plotOptions: {
  55. column: {
  56. cursor: 'pointer',
  57. point: {
  58. events: {
  59. click: function() {
  60. var drilldown = this.drilldown;
  61. if (drilldown) { // drill down
  62. setChart(drilldown.name, drilldown.categories, drilldown.data, drilldown.color);
  63. } else { // restore
  64. setChart(name, categories, data);
  65. }
  66. }
  67. }
  68. },
  69. dataLabels: {
  70. enabled: true,
  71. color: colors[0],
  72. style: {
  73. fontWeight: 'bold'
  74. },
  75. formatter: function() {
  76. return this.y ;
  77. }
  78. }
  79. }
  80. },
  81. tooltip: {
  82. formatter: function() {
  83. var point = this.point,s = '';
  84. if (point.drilldown) {
  85. s =this.x +"总共有"+ this.y + '通电话<br/>'
  86. s += '点击查看 ' + point.category + '具体通话日期';
  87. } else {
  88. s =this.x + "总共有"+this.y + '通电话<br/>'
  89. s += '点击返回';
  90. }
  91. return s;
  92. }
  93. },
  94. series: [{
  95. name: name,
  96. data: data,
  97. color: 'white'
  98. }],
  99. exporting: {
  100. enabled: false
  101. }
  102. });
  103. }
  104. function talk(){
  105. $('#talktimereport').highcharts({
  106. chart: {
  107. },
  108. title: {
  109. text: '服务热线坐席通话时长统计'
  110. },
  111. xAxis: {
  112. categories: <%=Agents %>
  113. },
  114. yAxis: [{
  115. labels: {
  116. format: '{value}s',
  117. style: {
  118. color: '#89A54E'
  119. }
  120. }, title: {
  121. text: '通话时长(s)'
  122. },
  123. min: 0//纵轴的最小值
  124. },
  125. {
  126. labels: {
  127. format: '{value}通',
  128. style: {
  129. color: '#89A54E'
  130. }
  131. },
  132. title: {
  133. text: '通话次数(通)',
  134. style: {
  135. color: '#4572A7'
  136. }
  137. }, opposite: true }
  138. ],
  139. tooltip: {
  140. shared: true
  141. },
  142. exporting: {
  143. enabled: false
  144. },
  145. series: [
  146. {
  147. type: 'column',
  148. name: '呼入次数',
  149. yAxis: 1,
  150. tooltip: {
  151. valueSuffix: '通'
  152. },
  153. data: <%=CallRecordOut %>, //[3, 2, 1, 3, 4]
  154. color:Highcharts.getOptions().colors[6]
  155. },
  156. {
  157. type: 'column',
  158. name: '呼出次数',
  159. yAxis: 1,
  160. tooltip: {
  161. valueSuffix: '通'
  162. },
  163. data: <%=CallRecordIn %>,//[2, 3, 5, 7, 6]
  164. color:Highcharts.getOptions().colors[7]
  165. },
  166. {
  167. type: 'spline',
  168. name: '通话总时长',
  169. data: <%=CallRecordTotalTime %>,//[5, 3, 2, 4, 2]
  170. tooltip: {
  171. valueSuffix: 's'
  172. },
  173. marker: {
  174. lineWidth: 2,
  175. lineColor: Highcharts.getOptions().colors[5],
  176. fillColor: 'white'
  177. }
  178. },
  179. {
  180. type: 'spline',
  181. name: '平均通话时长',
  182. tooltip: {
  183. valueSuffix: 's'
  184. },
  185. data:<%=CallAverageTime %> ,//[21.9, 0, 0, 0, 0]
  186. marker: {
  187. lineWidth: 2,
  188. lineColor: Highcharts.getOptions().colors[5],
  189. fillColor: 'white'
  190. }
  191. }]
  192. });
  193. }
  194. function switched(){
  195. $('#switchedlosscallreport').highcharts({
  196. chart: {
  197. type: 'column',
  198. zoomType: 'x'
  199. },
  200. title: {
  201. text: '服务热线-接通率和呼损率统计'
  202. },
  203. xAxis: {
  204. categories: <%=StatisticalTime%>,
  205. labels: {
  206. rotation: -45,
  207. align: 'right',
  208. style: {
  209. fontSize: '13px',
  210. fontFamily: 'Verdana, sans-serif'
  211. }
  212. } },
  213. yAxis: [{
  214. title: {
  215. text: '通话次数(通)',
  216. style: {
  217. color: '#4572A7'
  218. }
  219. }, labels: {
  220. format: '{value}通',
  221. style: {
  222. color: '#89A54E'
  223. }
  224. }, opposite: true
  225. },
  226. {
  227. min: 0,
  228. title: {
  229. text: '百分比(%)'
  230. },
  231. labels: {
  232. format: '{value}%',
  233. style: {
  234. color: '#89A54E'
  235. }
  236. },
  237. stackLabels: {
  238. enabled: true,
  239. style: {
  240. fontWeight: 'bold',
  241. color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
  242. }
  243. }
  244. }
  245. ],
  246. exporting: {
  247. enabled: false
  248. },
  249. tooltip: {
  250. shared: true
  251. },
  252. series: [{
  253. name: '接通次数',
  254. tooltip: {
  255. valueSuffix: '通'
  256. },
  257. data: <%=StatisticalCallConnectData %>,
  258. color:Highcharts.getOptions().colors[6]
  259. },
  260. {
  261. name: '呼损次数',
  262. tooltip: {
  263. valueSuffix: '通'
  264. },
  265. data: <%=StatisticalCallLossData %>,
  266. color:Highcharts.getOptions().colors[7]
  267. },
  268. {
  269. type: 'spline',
  270. name: '呼损率',
  271. yAxis: 1,
  272. tooltip: {
  273. valueSuffix: '%'
  274. },
  275. data: <%=StatisticalCallLossDataRate%>,
  276. marker: {
  277. lineWidth: 2,
  278. lineColor: Highcharts.getOptions().colors[5],
  279. fillColor: 'white'
  280. }
  281. },
  282. {
  283. type: 'spline',
  284. name: '接通率',
  285. yAxis: 1,
  286. tooltip: {
  287. valueSuffix: '%'
  288. },
  289. data: <%=StatisticalCallConnectDataRate %>,
  290. marker: {
  291. lineWidth: 2,
  292. lineColor: Highcharts.getOptions().colors[5],
  293. fillColor: 'white'
  294. }
  295. }]
  296. });
  297. }
  298. </script>
  299. </head>
  300. <body>
  301. <form id="form1" runat="server">
  302. <div id="totalcallreport" style="float:left;width:50%;">
  303. </div>
  304. <div id="talktimereport" style="float:right;width:50%;">
  305. </div>
  306. <div style="clear:both;"></div>
  307. <div id="switchedlosscallreport">
  308. </div>
  309. </form>
  310. </body>
  311. </html>