Nessuna descrizione

CallRecord.html 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  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: 2% auto;
  196. overflow-y: scroll;
  197. width: 65%;
  198. min-width: 1040px;
  199. height: 700px;
  200. }
  201. </style>
  202. </head>
  203. <body class="gray-bg">
  204. <div class="wrapper wrapper-content animated fadeInRight">
  205. <div class="daoHang clearfix">
  206. <div class="dhLeft">
  207. <sapn><i class="syIcon"></i>位置:
  208. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  209. <a href="javaScript:;">话务管理</a>&gt;
  210. <a href="" style="color: #000;">通话记录</a>
  211. </sapn>
  212. </div>
  213. </div>
  214. <div class="th-box">
  215. <div class="th-bar clearfix">
  216. <!--<a class="sc_btn btn-info" id="moves">批量删除</a>-->
  217. <div class="seach-box fr">
  218. <ul>
  219. <li style="position: relative;">
  220. <label for="ss_kssj">开始时间:</label>
  221. <i class="tub fa fa-calendar"></i>
  222. <input type="text" id="ss_kssj" class="laydate-icon" placeholder="请选择时间" />
  223. </li>
  224. <li>
  225. <label for="">呼叫状态:</label>
  226. <select id="ss_hjzt" class="selects callstate">
  227. <option value="">全部</option>
  228. <option value="0">未接通</option>
  229. <option value="1">已接通</option>
  230. </select>
  231. </li>
  232. <li>
  233. <label for="">呼叫方向:</label>
  234. <select id="ss_hcfx" class=" selects calltype">
  235. <option value="">全部</option>
  236. <option value="0">呼入</option>
  237. <option value="1">呼出</option>
  238. </select>
  239. </li>
  240. <li class='BMs'>
  241. <label for="">营业部:</label>
  242. <select name="" id="bumen" class="x-color select usercode">
  243. <option value="">请选择</option>
  244. </select>
  245. </li>
  246. <li class="ZXs">
  247. <label for="">坐席工号:</label>
  248. <select style="width: 130px;" class="x-color select usercode" id="seat">
  249. <option value="">全部</option>
  250. </select>
  251. </li>
  252. <li>
  253. <label for="">电话号码:</label>
  254. <input id="tel" class="photo x-color" type="text" /></li>
  255. </ul>
  256. <div class="clearfix btn_boxs fr">
  257. <a class="sc_btn Ss Block">搜索</a>
  258. <a class="sc_btn export Block">导出</a>
  259. </div>
  260. </div>
  261. </div>
  262. </div>
  263. <div style="width: 100%;padding: 10px;">
  264. <table id="list" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  265. <thead>
  266. <tr>
  267. <th data-field="CallNumber" data-align="center" data-formatter="Code">编号</th>
  268. <th data-field="CallNumber" data-align="center">电话号码</th>
  269. <!-- <th data-field="" data-align="center">营业部</th> -->
  270. <th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>
  271. <th data-field="CallType" data-formatter="callType" data-align="center">呼叫方向</th>
  272. <!--<th data-field="DealType" data-formatter="dealType" data-align="center">是否回访</th>-->
  273. <th data-field="CallState" data-formatter="states" data-align="center">呼叫状态</th>
  274. <!--<th data-field="IsDeal" data-formatter="isDeal" data-align="center">是否处理</th>-->
  275. <th data-field="UserCode" data-align="center">坐席工号</th>
  276. <th data-field="UserName" data-align="center">坐席姓名</th>
  277. <th data-field="BeginTime" data-align="center">开始时间</th>
  278. <th data-field="TalkStartTime" data-align="center">通话开始时间</th>
  279. <th data-field="TalkEndTime" data-align="center">通话结束时间</th>
  280. <th data-field="EndTime" data-align="center">结束时间</th>
  281. <th data-field="TalkLongTime" data-align="center">通话时长(S)</th>
  282. <!--<th data-field="BusinessType" data-align="center">按键</th>-->
  283. </tr>
  284. </thead>
  285. </table>
  286. <!--高级搜索框-->
  287. </div>
  288. </div>
  289. <!--下载框-->
  290. <div class="t-shade">
  291. <div class="shade_k">
  292. <div class="shade_title">
  293. <span>录音播放与下载<srong class="cknum"></srong></span>
  294. <span class="setwin"><a>x</a></span>
  295. </div>
  296. <div class="shade_content">
  297. <div class="Ly_box audiojs "></div>
  298. <div class="boxCon LY_box"></div>
  299. <!--录屏播放-->
  300. <div id="replayers"></div>
  301. </div>
  302. </div>
  303. </div>
  304. <script>
  305. var stype = 1;
  306. var seatlist = [];
  307. var RoleId;
  308. $(document).ready(function() {
  309. laydate.render({
  310. elem: '#ss_kssj',
  311. range: '~',
  312. //type: 'datetime',
  313. //max : 31,
  314. //min: 0,
  315. calendar: true,
  316. theme: '#1ab394',
  317. });
  318. $.getJSON(huayi.config.callcenter_url + 'UserAccount/GetNowUser', {
  319. "token": $.cookie("token")
  320. }, function(result) {
  321. if(result.state.toLowerCase() == "success") {
  322. RoleId = result.data.role.F_RoleId
  323. if(RoleId != "17") { //非系统管理员显示
  324. $('.BMs').hide();
  325. $('.SZBN').hide();
  326. }
  327. }
  328. })
  329. /*获取选中行对象*/
  330. $('#list').on("click-row.bs.table", function(e, row, ele) {
  331. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  332. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  333. });
  334. $(".setwin").click(function() {
  335. $(".t-shade").removeClass("cx");
  336. $('audio')[0].pause();
  337. });
  338. //坐席
  339. $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
  340. token: $.cookie("token")
  341. }, function(result) {
  342. if(result.state.toLowerCase() == "success") {
  343. seatlist = result.data;
  344. bindseat($("#seat"));
  345. }
  346. });
  347. //部门下拉数据
  348. $.getJSON(huayi.config.callcenter_url + 'CallOutPlan/GetDepartList', {
  349. "token": $.cookie("token")
  350. }, function(result) {
  351. if(result.state.toLowerCase() == "success") {
  352. let str='<option value="0">请选择</option>'
  353. result.data.forEach(function(v, n) {
  354. str += '<option value="' + v.F_DeptId + '">' + v.F_DeptName + '</option>'
  355. })
  356. $("#bumen").html(str)
  357. }
  358. })
  359. // $("#bumen").select2({
  360. // width: 'resolve',
  361. // minimumResultsForSearch: -1,
  362. // ajax: {
  363. // type: "get",
  364. // url: huayi.config.callcenter_url + "Department/GetDeptList",
  365. // async: true,
  366. // dataType: "json",
  367. // data: function(params) {
  368. // return {
  369. // token: $.cookie("token"),
  370. // pid: params.id
  371. // }
  372. // },
  373. // processResults: function(data) {
  374. // return {
  375. // results: data.data
  376. // }
  377. // },
  378. // cache: true
  379. // },
  380. // placeholder: "请选择",
  381. // });
  382. //搜索
  383. $(".Ss").click(function() {
  384. stype = 1;
  385. initTable();
  386. });
  387. //回车搜索
  388. $('#tel').on('keypress',function(e){
  389. if(e.keyCode==13){
  390. initTable();
  391. }
  392. })
  393. initTable();
  394. })
  395. function bindseat(obj) {
  396. obj.empty();
  397. obj.append('<option value="">全部</option>');
  398. $(seatlist).each(function(i, n) {
  399. obj.append('<option value="' + n.F_UserCode + '">' + n.F_UserName + '</option>');
  400. })
  401. }
  402. function initTable() {
  403. //先销毁表格
  404. $('#list').bootstrapTable('destroy');
  405. //初始化表格,动态从服务器加载数据
  406. $("#list").bootstrapTable({
  407. method: "get", //使用get请求到服务器获取数据
  408. url: huayi.config.callcenter_url + "Callrecords/GetList", //获取数据的Servlet地址
  409. contentType: 'application/x-www-form-urlencoded',
  410. striped: true, //表格显示条纹
  411. pagination: true, //启动分页
  412. pageSize: 10, //每页显示的记录数
  413. pageNumber: 1, //当前第几页
  414. pageList: [10, 20, 50, 100], //记录数可选列表
  415. search: false, //是否启用查询
  416. showColumns: false, //显示下拉框勾选要显示的列
  417. showRefresh: false, //显示刷新按钮
  418. sidePagination: "server", //表示服务端请求
  419. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  420. //设置为limit可以获取limit, offset, search, sort, order
  421. queryParamsType: "undefined",
  422. queryParams: function queryParams(params) { //设置查询参数
  423. var param = {
  424. page: params.pageNumber,
  425. pagesize: params.pageSize,
  426. usercode: $("#seat").val(),
  427. phone: $("#tel").val().trim(),
  428. dept: $("#bumen").val(),
  429. callstate: $("#ss_hjzt").val(),
  430. calltype: $("#ss_hcfx").val(),
  431. starttime: $('#ss_kssj').val() && $('#ss_kssj').val().split(' ~ ')[0],
  432. endtime: $('#ss_kssj').val() && $('#ss_kssj').val().split(' ~ ')[1],
  433. token: $.cookie("token")
  434. };
  435. return param;
  436. },
  437. onLoadSuccess: function() { //加载成功时执行
  438. //layer.msg("加载成功");
  439. },
  440. onLoadError: function() { //加载失败时执行
  441. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  442. }
  443. });
  444. }
  445. //音频
  446. function setCode(val, row) {
  447. if(val) {
  448. return '<div class="imgs">' +
  449. '<img src="../img/vice.png" alt="" onclick= ck(this,"' + row.CallId + '") item="' + val + '" />' +
  450. '</div>';
  451. } else {
  452. return '';
  453. }
  454. }
  455. //编号
  456. function Code(val, row, index) {
  457. return index + 1;
  458. }
  459. //方向呼出
  460. function callType(val) {
  461. if(val == 0) {
  462. return '<div class="imgs">呼入</div>';
  463. } else {
  464. return '<div class="imgs">呼出</div>';
  465. }
  466. }
  467. function states(val) {
  468. if(val == 0) {
  469. return '<div class="imgs">未接通</div>';
  470. } else {
  471. return '<div class="imgs">已接通</div>';
  472. }
  473. }
  474. //回访
  475. function dealType(val) {
  476. if(val == 1) {
  477. return '<div >已回访</div>';
  478. } else {
  479. return '';
  480. }
  481. }
  482. //处理
  483. function isDeal(val) {
  484. if(val == 0) {
  485. return '<div >未处理</div>';
  486. } else {
  487. return '<div >已处理</div>';
  488. }
  489. }
  490. //录音
  491. function ck(val, callId) {
  492. var path = $(val).attr("item");
  493. $(".t-shade").addClass("cx");
  494. $(".Ly_box").empty();
  495. $(".LY_box").empty();
  496. $('<audio style="width:100%;"class=" " type="audio/v3" src="' + path + '" loop="loop" controls="controls"></audio>').appendTo(".Ly_box");
  497. // $('<a href="' + path + '" class="sc_btn LY "download="' + path + '">下载录音</a>').appendTo(".LY_box");//20180511 by fanlongfei 隐藏文字下载按钮
  498. // 回放录屏
  499. rePlayers(callId);
  500. }
  501. // 回放录屏 - 播放器
  502. function rePlayers(callId) {
  503. document.getElementById('replayers').innerHTML = ""; // 清空
  504. //$("#replayers").text("");
  505. $.ajax({
  506. url: huayi.config.callcenter_url + 'CutScreen/GetCutScreenByCallId',
  507. type: 'get',
  508. data: {
  509. callid: callId,
  510. token: $.cookie("token")
  511. },
  512. dataType: "json",
  513. async: true,
  514. success: function (res) {
  515. if (res.state.toLowerCase() === "success") {
  516. var data = res.data;
  517. if (data != null) {
  518. result = data.VideoHtml;
  519. rePlayers2(result);
  520. } else {
  521. $("#replayers").text("暂无录屏信息");
  522. }
  523. }
  524. },
  525. });
  526. }
  527. // 回放录屏 - 播放器
  528. function rePlayers2(res) {
  529. const events = JSON.parse(unescape(res));
  530. //const events = body_result;
  531. if (events != null) {
  532. $("#replayers").text("");
  533. new rrwebPlayer({
  534. // document.getElementById('replayers')可以自定义 DOM 元素 document.body
  535. target: document.getElementById('replayers'),
  536. data: {
  537. events,
  538. },
  539. });
  540. } else {
  541. $("#replayers").text("暂无录屏信息");
  542. }
  543. }
  544. //导出
  545. $('.export').click(function() {
  546. dcexcel(this);
  547. })
  548. function dcexcel(obj) {
  549. var url = huayi.config.callcenter_url + "Callrecords/GetListExpt?token=" + $.cookie("token");
  550. url += "&usercode=" + $("#seat").val() +
  551. "&phone=" + $("#tel").val() +
  552. "&callstate=" + $("#ss_hjzt").val() +
  553. "&calltype=" + $("#ss_hcfx").val() +
  554. "&starttime=" + ($('#ss_kssj').val() && $('#ss_kssj').val().split(' ~ ')[0]) +
  555. "&endtime=" + ($('#ss_kssj').val() && $('#ss_kssj').val().split(' ~ ')[1]) +
  556. "&dept=" + $("#bumen").val();
  557. obj.href = url;
  558. }
  559. $('#ReIndex').click(function() {
  560. top.$("iframe:visible")[0].src = "widgets.html";
  561. // top.home_index();
  562. })
  563. </script>
  564. </body>
  565. </html>