鑫苑新版本前端代码

CallerAnalysis.html 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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="hut-top clearfix">
  62. <div class="topCon">
  63. <div class="form-inline th-bar clearfix">
  64. <div class="time-box form-group">
  65. <i class="tub fa fa-calendar"></i>
  66. <input class="form-control" type="text" id="chooseTime" placeholder="请选择日期">
  67. </div>
  68. <div class="form-group tool_bars pull-right">
  69. <button class="btns sear">搜索</button>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <div class="hu-content">
  75. <p class="time_title">统计截止日期:<span class="strdate" style="color: darkred;"></span></p>
  76. <div class="layui-form">
  77. <table class="layui-table dataTable">
  78. <colgroup>
  79. <col width="150">
  80. <col width="150">
  81. <col width="200">
  82. <col>
  83. </colgroup>
  84. <thead>
  85. <tr>
  86. <th>呼叫方式</th>
  87. <th>总呼叫量</th>
  88. <th>接通量</th>
  89. <th>未接量</th>
  90. <th>客户主动放弃呼叫数量</th>
  91. <th>接通率</th>
  92. <th>总通话时长</th>
  93. <th>平均通话时长</th>
  94. </tr>
  95. </thead>
  96. <tbody>
  97. <tr>
  98. <td>呼入</td>
  99. <td>0</td>
  100. <td>0</td>
  101. <td>0</td>
  102. <td>0</td>
  103. <td>0</td>
  104. <td>0</td>
  105. <td>0</td>
  106. </tr>
  107. <tr>
  108. <td>呼出</td>
  109. <td>0</td>
  110. <td>0</td>
  111. <td>0</td>
  112. <td>0</td>
  113. <td>0</td>
  114. <td>0</td>
  115. <td>0</td>
  116. </tr>
  117. </tbody>
  118. </table>
  119. </div>
  120. <div class="charts">
  121. <div id="callIn_count" style="height: 450px;"></div>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. <script src="./../js/layui/layui.js"></script>
  127. <script src="../js/echarts.common.min.js"></script>
  128. <script>
  129. $(function(){
  130. /*日期选择*/
  131. layui.use('laydate', function() {
  132. var laydate = layui.laydate;
  133. //日期
  134. laydate.render({
  135. elem: '#chooseTime',
  136. range: '~',
  137. theme: '#1ab394',
  138. });
  139. });
  140. //搜索事件
  141. $('.sear').click(function(){
  142. ReportTable();
  143. });
  144. var callIn_count = echarts.init(document.getElementById('callIn_count'));
  145. callIn_count.setOption({
  146. title: {
  147. text: '来电高峰期(低谷期)统计',
  148. x: 'center',
  149. textStyle: {
  150. color: '#000',
  151. fontSize: 16,
  152. fontWeight: 'normal'
  153. }
  154. },
  155. tooltip: {
  156. trigger: 'axis',
  157. axisPointer: {
  158. type: 'shadow',
  159. label: {
  160. show: true,
  161. backgroundColor: '#333'
  162. }
  163. }
  164. },
  165. grid: {
  166. left: '2%',
  167. right: '5%',
  168. bottom: '6%',
  169. containLabel: true
  170. },
  171. legend: {
  172. bottom:'bottom',
  173. data: ['电话量'],
  174. textStyle: {
  175. color: '#000'
  176. }
  177. },
  178. xAxis: {
  179. name: '时',
  180. 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],
  181. axisLine: {
  182. lineStyle: {
  183. color: '#000'
  184. }
  185. },
  186. },
  187. yAxis: {
  188. name: '通',
  189. splitLine: {
  190. show: false
  191. },
  192. axisLine: {
  193. lineStyle: {
  194. color: '#000'
  195. }
  196. }
  197. },
  198. series: [{
  199. name: '电话量',
  200. type: 'line',
  201. smooth:true,
  202. showAllSymbol:true,
  203. symbol :"emptyCircle",
  204. symbolSize: 10,
  205. data: []
  206. }]
  207. });
  208. ReportTable();
  209. function ReportTable(){
  210. $.ajax({
  211. type:"get",
  212. url:huayi.config.callcenter_url + "CallByMonth/GetReportTable",
  213. async:true,
  214. dataType:'json',
  215. data:{
  216. token:$.cookie("token"),
  217. type:2,
  218. sdate:$('#chooseTime').val() && $('#chooseTime').val().split(' ~ ')[0],
  219. edate:$('#chooseTime').val() && $('#chooseTime').val().split(' ~ ')[1],
  220. },
  221. success:function(data){
  222. if(data.state.toLowerCase()=='success'){
  223. $('.dataTable tbody').html('');
  224. var con=data.data;
  225. $('.strdate').text(con.strdate);
  226. callIn_count.setOption({
  227. // xAxis: {
  228. // data:con.hours
  229. // },
  230. series: [{
  231. data:con.linedata
  232. }]
  233. })
  234. if(con.tabledata && con.tabledata.length>0){
  235. $.each(con.tabledata,function(i,n){
  236. $('<tr>'+
  237. '<td>'+ n.呼叫方式 +'</td>'+
  238. '<td>'+ n.总呼叫数量 +'</td>'+
  239. '<td>'+ n.接通数量 +'</td>'+
  240. '<td>'+ n.未接数量 +'</td>'+
  241. '<td>'+ n.客户主动放弃呼叫数量 +'</td>'+
  242. '<td>'+ n.接通率 +'</td>'+
  243. '<td>'+ n.总通话时长 +'</td>'+
  244. '<td>'+ n.平均通话时长 +'</td>'+
  245. '</tr>').appendTo('.dataTable tbody');
  246. })
  247. }else{
  248. $('<tr><td colspan="8"> 暂无数据。。。</td></tr>').appendTo('.dataTable tbody');
  249. }
  250. }
  251. }
  252. });
  253. }
  254. })
  255. </script>
  256. </body>
  257. </html>