鑫苑新版本前端代码

dayData.html 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <script src="./../Script/Common/huayi.load.js"></script>
  7. <script src="./../Script/Common/huayi.config.js"></script>
  8. <!--<link rel="stylesheet" href="./../css/huTotal.css" />-->
  9. <link rel="stylesheet" href="./../js/layui/css/layui.css" />
  10. <link rel="stylesheet" href="./../css/init.css" />
  11. <title>日数据量统计</title>
  12. </head>
  13. <style>
  14. .hut-top {
  15. background: #f3f3f4;
  16. /*height: 60px;*/
  17. padding: 10px 20px;
  18. }
  19. .hut-tcon {
  20. float: right;
  21. }
  22. .dhLeft a {
  23. color: #999;
  24. }
  25. .layui-table td, .layui-table th{
  26. text-align: center!important;
  27. }
  28. .layui-table th{
  29. background: #1ab494;
  30. color: #fff;
  31. }
  32. .charts,#callIn_count{
  33. width: 100%;
  34. }
  35. .time_title{
  36. text-align: right;
  37. font-size: 15px;
  38. line-height: 24px;
  39. font-family: "Helvetica Neue", Helvetica, "PingFang SC", 微软雅黑, Tahoma, Arial, sans-serif;
  40. color: #333;
  41. margin-top: 15px;
  42. padding-right: 25px;
  43. }
  44. </style>
  45. <body class="gray-bg" style="background: #fefefe;">
  46. <div class="wrapper wrapper-content animated fadeInRight">
  47. <div class="hu-total">
  48. <div class="daoHang clearfix">
  49. <div class="dhLeft">
  50. <sapn><i class="syIcon"></i>位置:
  51. <a id="ReIndex" href="javaScript:;">首页</a>&gt;
  52. <a href="javaScript:;">报表分析</a>&gt;
  53. <a href="javaScript:;">话务运营分析</a>&gt;
  54. <a href="" class="nowPosition">日数据量统计</a>
  55. </sapn>
  56. </div>
  57. <div class="dhRight">
  58. <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
  59. </div>
  60. </div>
  61. <div class="hu-content">
  62. <p class="time_title">统计截止日期:<span class="strdate" style="color: darkred;"></span></p>
  63. <div class="layui-form">
  64. <table class="layui-table dataTable">
  65. <colgroup>
  66. <col width="150">
  67. <col width="150">
  68. <col width="200">
  69. <col>
  70. </colgroup>
  71. <thead>
  72. <tr>
  73. <th>呼叫方式</th>
  74. <th>总呼叫量</th>
  75. <th>接通量</th>
  76. <th>未接量</th>
  77. <th>客户主动放弃呼叫数量</th>
  78. <th>接通率</th>
  79. <th>总通话时长</th>
  80. <th>平均通话时长</th>
  81. </tr>
  82. </thead>
  83. <tbody>
  84. <tr>
  85. <td>呼入</td>
  86. <td>0</td>
  87. <td>0</td>
  88. <td>0</td>
  89. <td>0</td>
  90. <td>0</td>
  91. <td>0</td>
  92. <td>0</td>
  93. </tr>
  94. <tr>
  95. <td>呼出</td>
  96. <td>0</td>
  97. <td>0</td>
  98. <td>0</td>
  99. <td>0</td>
  100. <td>0</td>
  101. <td>0</td>
  102. <td>0</td>
  103. </tr>
  104. </tbody>
  105. </table>
  106. </div>
  107. <div class="charts">
  108. <div id="callIn_count" style="height: 450px;"></div>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. <script src="./../js/layui/layui.js"></script>
  114. <script src="../js/echarts.common.min.js"></script>
  115. <script>
  116. $(function(){
  117. var callIn_count = echarts.init(document.getElementById('callIn_count'));
  118. callIn_count.setOption({
  119. title: {
  120. text: '来电高峰期(低谷期)统计',
  121. x: 'center',
  122. textStyle: {
  123. color: '#000',
  124. fontSize: 16,
  125. fontWeight: 'normal'
  126. }
  127. },
  128. tooltip: {
  129. trigger: 'axis',
  130. axisPointer: {
  131. type: 'shadow',
  132. label: {
  133. show: true,
  134. backgroundColor: '#333'
  135. }
  136. }
  137. },
  138. grid: {
  139. left: '2%',
  140. right: '5%',
  141. bottom: '6%',
  142. containLabel: true
  143. },
  144. legend: {
  145. bottom:'bottom',
  146. data: ['电话量'],
  147. textStyle: {
  148. color: '#000'
  149. }
  150. },
  151. xAxis: {
  152. name: '时',
  153. data: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],
  154. axisLine: {
  155. lineStyle: {
  156. color: '#000'
  157. }
  158. },
  159. },
  160. yAxis: {
  161. name: '通',
  162. splitLine: {
  163. show: false
  164. },
  165. axisLine: {
  166. lineStyle: {
  167. color: '#000'
  168. }
  169. }
  170. },
  171. series: [{
  172. name: '电话量',
  173. type: 'line',
  174. smooth:true,
  175. showAllSymbol:true,
  176. symbol :"emptyCircle",
  177. symbolSize: 10,
  178. data: []
  179. }]
  180. });
  181. ReportTable();
  182. function ReportTable(){
  183. $.ajax({
  184. type:"get",
  185. url:huayi.config.callcenter_url + "CallByMonth/GetReportTable",
  186. async:true,
  187. dataType:'json',
  188. data:{
  189. token:$.cookie("token"),
  190. type:1,
  191. // sdate:$('#chooseTime').val() && $('#chooseTime').val().split(' ~ ')[0],
  192. // edate:$('#chooseTime').val() && $('#chooseTime').val().split(' ~ ')[1],
  193. },
  194. success:function(data){
  195. if(data.state.toLowerCase()=='success'){
  196. $('.dataTable tbody').html('');
  197. var con=data.data;
  198. $('.strdate').text(con.strdate);
  199. callIn_count.setOption({
  200. // xAxis: {
  201. // data:con.hours
  202. // },
  203. series: [{
  204. data:con.linedata
  205. }]
  206. })
  207. if(con.tabledata && con.tabledata.length>0){
  208. $.each(con.tabledata,function(i,n){
  209. $('<tr>'+
  210. '<td>'+ n.呼叫方式 +'</td>'+
  211. '<td>'+ n.总呼叫数量 +'</td>'+
  212. '<td>'+ n.接通数量 +'</td>'+
  213. '<td>'+ n.未接数量 +'</td>'+
  214. '<td>'+ n.客户主动放弃呼叫数量 +'</td>'+
  215. '<td>'+ n.接通率 +'</td>'+
  216. '<td>'+ n.总通话时长 +'</td>'+
  217. '<td>'+ n.平均通话时长 +'</td>'+
  218. '</tr>').appendTo('.dataTable tbody');
  219. })
  220. }else{
  221. $('<tr><td colspan="8"> 暂无数据。。。</td></tr>').appendTo('.dataTable tbody');
  222. }
  223. }
  224. }
  225. });
  226. }
  227. })
  228. </script>
  229. </body>
  230. </html>