Sin descripción

CallRecord.html 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>通话记录管理</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <link href="../css/init.css" rel="stylesheet" />
  8. <link href="../css/Table/table1.css" rel="stylesheet" />
  9. <link rel="stylesheet" href="../js/select2/css/select2.min.css" />
  10. <script src="../Script/Common/huayi.load.js"></script>
  11. <script src="../Script/Common/huayi.config.js"></script>
  12. <script src="../js/select2/js/select2.min.js"></script>
  13. <script src="../js/laydate/laydate.js"></script>
  14. <!-- 录屏 -->
  15. <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/rrweb@latest/dist/rrweb.min.css" />-->
  16. <!-- <link rel="stylesheet" type="text/css" href="../callScreen/cutVideo/rrweb.min.css"/> -->
  17. <!-- 回放播放器 -->
  18. <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/rrweb-player@latest/dist/style.css" />-->
  19. <!-- <link rel="stylesheet" type="text/css" href="../callScreen/cutVideo/style.css"/> -->
  20. <!-- 录屏-->
  21. <!--<script src="https://cdn.jsdelivr.net/npm/rrweb@latest/dist/rrweb.min.js"></script>
  22. <script src="https://cdn.jsdelivr.net/npm/rrweb@latest/dist/record/rrweb-record.min.js"></script>-->
  23. <!-- <script src="../callScreen/cutVideo/rrweb.min.js"></script> -->
  24. <!-- <script src="../callScreen/cutVideo/rrweb-record.min.js"></script> -->
  25. <!-- 回放播放器 -->
  26. <!--<script src="https://cdn.jsdelivr.net/npm/rrweb-player@latest/dist/index.js"></script>-->
  27. <!-- <script src="../callScreen/cutVideo/index.js"></script> -->
  28. <style>
  29. body {
  30. font-family: "微软雅黑";
  31. font-size: 14px;
  32. }
  33. .fr {
  34. float: right;
  35. }
  36. /*标头*/
  37. .th-box {
  38. width: 100%;
  39. padding: 5px;
  40. border-bottom: none;
  41. }
  42. .sc_btn {
  43. color: rgb(255, 255, 255);
  44. font-size: 12px;
  45. margin-left: 15px;
  46. box-sizing: border-box;
  47. background: rgb(26, 179, 148);
  48. padding: 6px 10px;
  49. outline: none;
  50. border-width: 0px;
  51. border-style: initial;
  52. border-color: initial;
  53. border-image: initial;
  54. border-radius: 3px;
  55. }
  56. .seach-box ul {
  57. overflow: hidden;
  58. }
  59. .seach-box ul li {
  60. margin-right: 5px;
  61. }
  62. .photo {
  63. background-color: #FFF;
  64. border: 1px solid #e5e6e7;
  65. border-radius: 1px;
  66. color: inherit;
  67. padding: 6px 12px;
  68. }
  69. .selects {
  70. background-color: #FFF;
  71. background-image: none;
  72. border: 1px solid #e5e6e7;
  73. border-radius: 1px;
  74. color: inherit;
  75. padding: 6px 12px;
  76. }
  77. #Select:focus {
  78. outline: none;
  79. border-color: #00BFFF;
  80. }
  81. input:focus {
  82. outline: none;
  83. border-color: #00BFFF;
  84. }
  85. .spiner-example {
  86. position: absolute;
  87. top: 50%;
  88. left: 50%;
  89. z-index: 111;
  90. margin-left: -85px;
  91. margin-top: -100px;
  92. display: none;
  93. }
  94. .sk-spinner-three-bounce {
  95. width: 170px !important;
  96. }
  97. .sk-spinner p {
  98. display: inline-block;
  99. font-size: 18px;
  100. margin-left: 10px;
  101. }
  102. .gjsu ul {
  103. overflow: hidden;
  104. }
  105. .gjsu ul li {
  106. width: 50%;
  107. margin-bottom: 5px;
  108. padding-top: 10px;
  109. }
  110. .selects {
  111. width: 130px;
  112. }
  113. .tc {
  114. margin-top: 30px;
  115. text-align: center;
  116. }
  117. .select2-container--default .select2-selection--single {
  118. border: 1px solid #e5e6e7;
  119. }
  120. .select2-dropdown {
  121. border: 1px solid #e5e6e7;
  122. width: 200px;
  123. }
  124. .layui-layer-shade {
  125. z-index: 100!important;
  126. }
  127. .layui-layer-page {
  128. z-index: 200!important;
  129. }
  130. .select2-container .select2-selection--single {
  131. height: 34px;
  132. }
  133. .select2-container {
  134. width: 130px!important;
  135. }
  136. .select2-selection__rendered {
  137. line-height: 34px;
  138. }
  139. .HJFX_ {
  140. width: 100%!important;
  141. }
  142. .photo {
  143. width: 130px;
  144. }
  145. .seach-box ul {
  146. padding-left: 0;
  147. }
  148. .seach-box {
  149. width: 100%;
  150. margin-bottom: 10px;
  151. }
  152. label {
  153. width: 95px;
  154. text-align: right;
  155. }
  156. .LY:hover {
  157. color: #fff;
  158. }
  159. .LY:active {
  160. color: #fff!important;
  161. }
  162. .laydate-icon {
  163. font-size: 14px;
  164. line-height: 20px;
  165. }
  166. #ss_kssj {
  167. background-color: #FFF;
  168. background-image: none;
  169. border: 1px solid #e5e6e7;
  170. border-radius: 1px;
  171. color: inherit;
  172. padding: 6px 12px;
  173. line-height: 20px;
  174. width: 240px;
  175. }
  176. #replayers{
  177. text-align: center;
  178. /* color: #EEEEEE; */
  179. }
  180. /* #replayers .rr-player{
  181. height: 556px !important;
  182. }
  183. #replayers .rr-player__frame{
  184. height: 476px !important;
  185. } */
  186. /* #replayers .replayer-wrapper{
  187. top: 40%;
  188. } */
  189. .rr-player.svelte-1wetjm2{
  190. margin: 0px auto;
  191. float: none;
  192. /* box-shadow: 0 24px 48px #000000; */
  193. }
  194. .shade_k{
  195. margin: 8% auto;
  196. overflow-y: scroll;
  197. width: 65%;
  198. min-width: 1040px;
  199. height: 200px;
  200. }
  201. .audiojs{
  202. margin-top: 30px !important;
  203. }
  204. </style>
  205. </head>
  206. <body class="gray-bg">
  207. <div class="wrapper wrapper-content animated fadeInRight">
  208. <div class="daoHang clearfix">
  209. <div class="dhLeft">
  210. <sapn><i class="syIcon"></i>位置:
  211. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  212. <a href="javaScript:;">话务管理</a>&gt;
  213. <a href="" style="color: #000;">通话记录</a>
  214. </sapn>
  215. </div>
  216. </div>
  217. <div class="th-box">
  218. <div class="th-bar clearfix">
  219. <!--<a class="sc_btn btn-info" id="moves">批量删除</a>-->
  220. <div class="seach-box fr">
  221. <ul>
  222. <li style="position: relative;">
  223. <label for="ss_kssj">开始时间:</label>
  224. <i class="tub fa fa-calendar"></i>
  225. <input type="text" id="ss_kssj" class="laydate-icon" placeholder="请选择时间" />
  226. </li>
  227. <li>
  228. <label for="">呼叫状态:</label>
  229. <select id="ss_hjzt" class="selects callstate">
  230. <option value="">全部</option>
  231. <option value="0">未接通</option>
  232. <option value="1">已接通</option>
  233. </select>
  234. </li>
  235. <li>
  236. <label for="">呼叫方向:</label>
  237. <select id="ss_hcfx" class=" selects calltype">
  238. <option value="">全部</option>
  239. <option value="0">呼入</option>
  240. <option value="1">呼出</option>
  241. </select>
  242. </li>
  243. <li class='BMs'>
  244. <label for="">营业部:</label>
  245. <select name="" id="bumen" class="x-color select usercode">
  246. <option value="">请选择</option>
  247. </select>
  248. </li>
  249. <li class="ZXs">
  250. <label for="">坐席工号:</label>
  251. <select style="width: 130px;" class="x-color select usercode" id="seat">
  252. <option value="">全部</option>
  253. </select>
  254. </li>
  255. <li>
  256. <label for="">电话号码:</label>
  257. <input id="tel" class="photo x-color" type="text" /></li>
  258. </ul>
  259. <div class="clearfix btn_boxs fr">
  260. <a class="sc_btn Ss Block">搜索</a>
  261. <a class="sc_btn export Block">导出</a>
  262. </div>
  263. </div>
  264. </div>
  265. </div>
  266. <div style="width: 100%;padding: 10px;">
  267. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  268. <thead>
  269. <tr>
  270. <th data-field="CallNumber" data-align="center" data-formatter="Code">编号</th>
  271. <th data-field="CallNumber" data-align="center">电话号码</th>
  272. <!-- <th data-field="" data-align="center">营业部</th> -->
  273. <th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>
  274. <th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
  275. <!--<th data-field="DealType" data-formatter="dealType" data-align="center">是否回访</th>-->
  276. <th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
  277. <!--<th data-field="IsDeal" data-formatter="isDeal" data-align="center">是否处理</th>-->
  278. <th data-field="UserCode" data-align="center">坐席工号</th>
  279. <th data-field="UserName" data-align="center">坐席姓名</th>
  280. <th data-field="BeginTime" data-align="center">开始时间</th>
  281. <th data-field="TalkStartTime" data-align="center">通话开始时间</th>
  282. <th data-field="TalkEndTime" data-align="center">通话结束时间</th>
  283. <th data-field="EndTime" data-align="center">结束时间</th>
  284. <th data-field="TalkLongTime" data-align="center">通话时长(S)</th>
  285. <!--<th data-field="BusinessType" data-align="center">按键</th>-->
  286. </tr>
  287. </thead>
  288. </table>
  289. <!--高级搜索框-->
  290. </div>
  291. </div>
  292. <!--下载框-->
  293. <div class="t-shade">
  294. <div class="shade_k">
  295. <div class="shade_title">
  296. <span>录音播放与下载<srong class="cknum"></srong></span>
  297. <span class="setwin"><a>x</a></span>
  298. </div>
  299. <div class="shade_content">
  300. <div class="Ly_box audiojs "></div>
  301. <div class="boxCon LY_box"></div>
  302. <!--录屏播放-->
  303. <!-- <div id="replayers"></div> -->
  304. </div>
  305. </div>
  306. </div>
  307. <script>
  308. var stype = 1;
  309. var seatlist = [];
  310. var RoleId;
  311. $(document).ready(function() {
  312. laydate.render({
  313. elem: '#ss_kssj',
  314. range: '~',
  315. //type: 'datetime',
  316. //max : 31,
  317. //min: 0,
  318. calendar: true,
  319. theme: '#1ab394',
  320. });
  321. $.getJSON(huayi.config.callcenter_url + 'UserAccount/GetNowUser', {
  322. "token": $.cookie("token")
  323. }, function(result) {
  324. if(result.state.toLowerCase() == "success") {
  325. RoleId = result.data.role.F_RoleId
  326. if(RoleId != "17") { //非系统管理员显示
  327. $('.BMs').hide();
  328. $('.SZBN').hide();
  329. }
  330. }
  331. })
  332. /*获取选中行对象*/
  333. $('#list').on("click-row.bs.table", function(e, row, ele) {
  334. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  335. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  336. });
  337. $(".setwin").click(function() {
  338. $(".t-shade").removeClass("cx");
  339. $('audio')[0].pause();
  340. });
  341. //坐席
  342. $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
  343. token: $.cookie("token")
  344. }, function(result) {
  345. if(result.state.toLowerCase() == "success") {
  346. seatlist = result.data;
  347. bindseat($("#seat"));
  348. }
  349. });
  350. //部门下拉数据
  351. $.getJSON(huayi.config.callcenter_url + 'CallOutPlan/GetDepartList', {
  352. "token": $.cookie("token")
  353. }, function(result) {
  354. if(result.state.toLowerCase() == "success") {
  355. let str='<option value="0">请选择</option>'
  356. result.data.forEach(function(v, n) {
  357. str += '<option value="' + v.F_DeptId + '">' + v.F_DeptName + '</option>'
  358. })
  359. $("#bumen").html(str)
  360. }
  361. })
  362. // $("#bumen").select2({
  363. // width: 'resolve',
  364. // minimumResultsForSearch: -1,
  365. // ajax: {
  366. // type: "get",
  367. // url: huayi.config.callcenter_url + "Department/GetDeptList",
  368. // async: true,
  369. // dataType: "json",
  370. // data: function(params) {
  371. // return {
  372. // token: $.cookie("token"),
  373. // pid: params.id
  374. // }
  375. // },
  376. // processResults: function(data) {
  377. // return {
  378. // results: data.data
  379. // }
  380. // },
  381. // cache: true
  382. // },
  383. // placeholder: "请选择",
  384. // });
  385. //搜索
  386. $(".Ss").click(function() {
  387. stype = 1;
  388. initTable();
  389. });
  390. //回车搜索
  391. $('#tel').on('keypress',function(e){
  392. if(e.keyCode==13){
  393. initTable();
  394. }
  395. })
  396. initTable();
  397. })
  398. function bindseat(obj) {
  399. obj.empty();
  400. obj.append('<option value="">全部</option>');
  401. $(seatlist).each(function(i, n) {
  402. obj.append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
  403. })
  404. }
  405. function initTable() {
  406. //先销毁表格
  407. $('#list').bootstrapTable('destroy');
  408. //初始化表格,动态从服务器加载数据
  409. $("#list").bootstrapTable({
  410. method: "get", //使用get请求到服务器获取数据
  411. url: huayi.config.callcenter_url + "Callrecords/GetList", //获取数据的Servlet地址
  412. contentType: 'application/x-www-form-urlencoded',
  413. striped: true, //表格显示条纹
  414. pagination: true, //启动分页
  415. pageSize: 10, //每页显示的记录数
  416. pageNumber: 1, //当前第几页
  417. pageList: [10, 20, 50, 100], //记录数可选列表
  418. search: false, //是否启用查询
  419. showColumns: false, //显示下拉框勾选要显示的列
  420. showRefresh: false, //显示刷新按钮
  421. sidePagination: "server", //表示服务端请求
  422. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  423. //设置为limit可以获取limit, offset, search, sort, order
  424. queryParamsType: "undefined",
  425. queryParams: function queryParams(params) { //设置查询参数
  426. var param = {
  427. page: params.pageNumber,
  428. pagesize: params.pageSize,
  429. usercode: $("#seat").val(),
  430. phone: $("#tel").val().trim(),
  431. dept: $("#bumen").val(),
  432. callstate: $("#ss_hjzt").val(),
  433. calltype: $("#ss_hcfx").val(),
  434. starttime: $('#ss_kssj').val() && $('#ss_kssj').val().split(' ~ ')[0],
  435. endtime: $('#ss_kssj').val() && $('#ss_kssj').val().split(' ~ ')[1],
  436. token: $.cookie("token")
  437. };
  438. return param;
  439. },
  440. onLoadSuccess: function() { //加载成功时执行
  441. //layer.msg("加载成功");
  442. },
  443. onLoadError: function() { //加载失败时执行
  444. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  445. }
  446. });
  447. }
  448. //音频
  449. function setCode(val, row) {
  450. if(val) {
  451. return '<div class="imgs">' +
  452. '<img src="../img/vice.png" alt="" onclick= ck(this,"' + row.CallId + '") item="' + val + '" />' +
  453. '</div>';
  454. } else {
  455. return '';
  456. }
  457. }
  458. //编号
  459. function Code(val, row, index) {
  460. return index + 1;
  461. }
  462. //方向呼出
  463. function callType(val) {
  464. if(val == 0) {
  465. return '<div class="imgs">呼入</div>';
  466. } else {
  467. return '<div class="imgs">呼出</div>';
  468. }
  469. }
  470. function states(val) {
  471. if(val == 0) {
  472. return '<div class="imgs">未接通</div>';
  473. } else {
  474. return '<div class="imgs">已接通</div>';
  475. }
  476. }
  477. //回访
  478. function dealType(val) {
  479. if(val == 1) {
  480. return '<div >已回访</div>';
  481. } else {
  482. return '';
  483. }
  484. }
  485. //处理
  486. function isDeal(val) {
  487. if(val == 0) {
  488. return '<div >未处理</div>';
  489. } else {
  490. return '<div >已处理</div>';
  491. }
  492. }
  493. //录音
  494. function ck(val, callId) {
  495. var path = $(val).attr("item");
  496. $(".t-shade").addClass("cx");
  497. $(".Ly_box").empty();
  498. $(".LY_box").empty();
  499. $('<audio style="width:100%;"class=" " type="audio/v3" src="' + path + '" loop="loop" controls="controls"></audio>').appendTo(".Ly_box");
  500. // $('<a href="' + path + '" class="sc_btn LY "download="' + path + '">下载录音</a>').appendTo(".LY_box");//20180511 by fanlongfei 隐藏文字下载按钮
  501. // 回放录屏
  502. // rePlayers(callId);
  503. }
  504. // 回放录屏 - 播放器
  505. // function rePlayers(callId) {
  506. // document.getElementById('replayers').innerHTML = ""; // 清空
  507. // //$("#replayers").text("");
  508. // $.ajax({
  509. // url: huayi.config.callcenter_url + 'CutScreen/GetCutScreenByCallId',
  510. // type: 'get',
  511. // data: {
  512. // callid: callId,
  513. // token: $.cookie("token")
  514. // },
  515. // dataType: "json",
  516. // async: true,
  517. // success: function (res) {
  518. // if (res.state.toLowerCase() === "success") {
  519. // var data = res.data;
  520. // if (data != null) {
  521. // result = data.VideoHtml;
  522. // rePlayers2(result);
  523. // } else {
  524. // $("#replayers").text("暂无录屏信息");
  525. // }
  526. // }
  527. // },
  528. // });
  529. // }
  530. // // 回放录屏 - 播放器
  531. // function rePlayers2(res) {
  532. // const events = JSON.parse(unescape(res));
  533. // //const events = body_result;
  534. // if (events != null) {
  535. // $("#replayers").text("");
  536. // new rrwebPlayer({
  537. // // document.getElementById('replayers')可以自定义 DOM 元素 document.body
  538. // target: document.getElementById('replayers'),
  539. // data: {
  540. // events,
  541. // },
  542. // });
  543. // } else {
  544. // $("#replayers").text("暂无录屏信息");
  545. // }
  546. // }
  547. //导出
  548. $('.export').click(function() {
  549. dcexcel(this);
  550. })
  551. function dcexcel(obj) {
  552. var url = huayi.config.callcenter_url + "Callrecords/GetListExpt?token=" + $.cookie("token");
  553. url += "&usercode=" + $("#seat").val() +
  554. "&phone=" + $("#tel").val() +
  555. "&callstate=" + $("#ss_hjzt").val() +
  556. "&calltype=" + $("#ss_hcfx").val() +
  557. "&starttime=" + ($('#ss_kssj').val() && $('#ss_kssj').val().split(' ~ ')[0]) +
  558. "&endtime=" + ($('#ss_kssj').val() && $('#ss_kssj').val().split(' ~ ')[1]) +
  559. "&dept=" + $("#bumen").val();
  560. obj.href = url;
  561. }
  562. $('#ReIndex').click(function() {
  563. top.$("iframe:visible")[0].src = "widgets.html";
  564. // top.home_index();
  565. })
  566. </script>
  567. </body>
  568. </html>