ZZDianXin_UI - 郑州电信 演示

SeatMonitor.html 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  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. <link href="../css/init.css" rel="stylesheet" />
  7. <script src="../Script/Common/huayi.load.js"></script>
  8. <script src="../Script/Common/huayi.config.js"></script>
  9. <title>坐席监控管理</title>
  10. <style>
  11. body {
  12. background-color: #EEEEEE;
  13. font-family: "微软雅黑";
  14. background-color: #fdfdfd;
  15. }
  16. ul li {
  17. float: left;
  18. }
  19. .zx-title {
  20. background-color: #2e4050;
  21. color: #FFFFFF;
  22. padding: 5px 20px;
  23. border-top-left-radius: 5px;
  24. border-top-right-radius: 5px;
  25. letter-spacing: 3px;
  26. }
  27. ul {
  28. overflow: hidden;
  29. }
  30. ul li {
  31. list-style: none;
  32. }
  33. .fenxian {
  34. list-style: none;
  35. width: 136px;
  36. padding: 0;
  37. height: 10px;
  38. }
  39. .fenxian li {
  40. width: 50%;
  41. list-style: none;
  42. height: 8px;
  43. float: left;
  44. }
  45. .left_red {
  46. background: #65c2ca;
  47. }
  48. .rg_green {
  49. background: #F95A83;
  50. }
  51. .zx-box {
  52. background: #F5F5F5;
  53. /*height: 200px;*/
  54. border-radius: 5px;
  55. box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  56. margin-bottom: 30px;
  57. overflow: hidden;
  58. }
  59. .m-b {
  60. margin-bottom: 0;
  61. }
  62. /*坐席数量*/
  63. .zt-content ul {
  64. width: 100%;
  65. overflow: hidden;
  66. padding-left: 0px;
  67. padding-top: 20px;
  68. }
  69. .zt-content ul li {
  70. width: 40%;
  71. font-size: 14px;
  72. float: left;
  73. margin-bottom: 20px;
  74. /*text-align: center;*/
  75. margin-left: 10%;
  76. }
  77. .zt-content ul li i {
  78. display: inline-block;
  79. width: 20px;
  80. height: 21px;
  81. vertical-align: middle;
  82. margin-right: 10px;
  83. background: url(../img/zuoxiIcon.png) no-repeat;
  84. }
  85. .hc {
  86. background-position: 0 0 !important;
  87. }
  88. .ml {
  89. background-position: 0 -24px !important;
  90. }
  91. .kx {
  92. background-position: 0 -68px !important;
  93. }
  94. .zl {
  95. background-position: 0 -93px !important;
  96. }
  97. .qc {
  98. background-position: 0 -116px !important;
  99. }
  100. .lx {
  101. background-position: 0 -138px !important;
  102. }
  103. .hh {
  104. background-position: 0 -46px !important;
  105. }
  106. .th{
  107. background: url(../img/thz.png) no-repeat!important; }
  108. /*坐席监控*/
  109. .bg_person {
  110. background: url(../img/bg-person.png)no-repeat;
  111. width: 65px;
  112. height: 65px;
  113. text-align: -webkit-center;
  114. background-position: center center;
  115. margin: 0 auto;
  116. }
  117. .zx_people {
  118. padding: 0;
  119. }
  120. .zx_content ul:after {
  121. content: "";
  122. display: block;
  123. clear: both;
  124. }
  125. .people_list p {
  126. margin-bottom: 5px !important;
  127. }
  128. .zx_content ul {
  129. height: 800px;
  130. overflow: auto;
  131. }
  132. .zx_content ul li {
  133. width: 14%;
  134. text-align: center;
  135. float: left;
  136. cursor: pointer;
  137. }
  138. .zx_content ul li > div {
  139. width: 100%;
  140. position: relative;
  141. }
  142. .zx_content i {
  143. display: block;
  144. height: 22px;
  145. width: 20px;
  146. background: url(../img/zuoxiIcon.png) no-repeat;
  147. position:relative;
  148. right: -25px;
  149. top: 25px;
  150. }
  151. /*坐席状态*/
  152. .ztsm {
  153. width: 100%;
  154. overflow: hidden;
  155. padding-left: 0px;
  156. padding-top: 20px;
  157. }
  158. .ztsm b {
  159. padding: 3px 15px;
  160. border-radius: 10px;
  161. color: #FFFFFF;
  162. }
  163. .ztsm2 ul li {
  164. width: 33%;
  165. font-size: 14px;
  166. float: left;
  167. margin-bottom: 25px;
  168. text-align: center;
  169. cursor: pointer;
  170. }
  171. .zx {
  172. /*background: #989898;*/
  173. background: #61b960;
  174. }
  175. .jt {
  176. background: #5ed7b7;
  177. }
  178. .dj {
  179. background: #bed75b;
  180. }
  181. .qca {
  182. background: #d75e7c;
  183. }
  184. .lj {
  185. background: #5daed8;
  186. }
  187. .qc {
  188. background: #d8988f;
  189. }
  190. .kqc {
  191. background: #44af3c;
  192. }
  193. .jqc {
  194. background: #d91e06;
  195. }
  196. .dis {
  197. background: #989898;
  198. }
  199. /*坐席弹屏*/
  200. .zx_photo {
  201. padding: 10px;
  202. }
  203. .zx_photo p {
  204. text-align: center;
  205. }
  206. .zx-box_ul > ul {
  207. padding-left: 0px;
  208. }
  209. .zx-box_ul > ul > li {
  210. width: 33% !important;
  211. padding: 22px 13px;
  212. text-align: -webkit-center;
  213. font-size: 15px;
  214. cursor: pointer;
  215. }
  216. .zx-box_ul > ul > li b {
  217. padding: 7px 15px;
  218. border-radius: 10px;
  219. color: #FFFFFF;
  220. }
  221. .zxtp {
  222. position: absolute;
  223. display: none;
  224. }
  225. .shows {
  226. display: block;
  227. }
  228. .hides {
  229. display: block;
  230. }
  231. </style>
  232. </head>
  233. <body>
  234. <div class="wrapper wrapper-content animated fadeInRight">
  235. <!--<div class="daoHang clearfix">
  236. <div class="dhLeft">
  237. <sapn><i class="syIcon"></i>位置:<a href="javaScript:;" id="ReIndex">首页</a>&gt;<a href="javaScript:;">话务管理</a>&gt;<a href="" style="color: #000;">坐席监控管理</a></sapn>
  238. </div>
  239. <div class="dhRight">
  240. <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
  241. </div>
  242. </div>-->
  243. <div class="row" style="margin-top: 20px;">
  244. <!--左边-->
  245. <div class="col-sm-9">
  246. <div class="zx_top">
  247. <span class="zx-title">坐席监控系统</span>
  248. <ul class="fenxian">
  249. <li class="left_red"></li>
  250. <li class="rg_green"></li>
  251. </ul>
  252. </div>
  253. <div class="zx_content">
  254. <ul class="zx_people"></ul>
  255. </div>
  256. </div>
  257. <!--右边-->
  258. <div class="col-sm-3">
  259. <div class="zx_top">
  260. <span class="zx-title">状态说明</span>
  261. <ul class="m-b fenxian" style="width:104px;">
  262. <li class="left_red"></li>
  263. <li class="rg_green"></li>
  264. </ul>
  265. <div class="zx-box">
  266. <div class="ztsm2 w_3">
  267. <ul class="ztsm">
  268. <li><b class="zx">置闲</b></li>
  269. <li><b class="jt">监听</b></li>
  270. <li><b class="dj">代接</b></li>
  271. <li><b class="qca">强插</b></li>
  272. <li><b class="lj">拦截</b></li>
  273. <li><b class="qc">强拆</b></li>
  274. <li style="width: 50%;"><b class="kqc">开始监测</b></li>
  275. <li style="width: 50%;"><b class="jqc dis">停止监测</b></li>
  276. </ul>
  277. </div>
  278. </div>
  279. </div>
  280. <div class="zx_top">
  281. <span class="zx-title">实时统计</span>
  282. <ul class="m-b fenxian" style="width:104px;">
  283. <li class="left_red"></li>
  284. <li class="rg_green"></li>
  285. </ul>
  286. <div class="zx-box">
  287. <div class="zt-content w_5">
  288. <ul class="tjcount">
  289. <li>登录坐席:<b>0</b></li>
  290. <li>离线人数:<b>0</b></li>
  291. <li>空闲人数:<b>0</b></li>
  292. <li>通话人数:<b>0</b></li>
  293. <li>系统呼入:<b>0</b></li>
  294. <li>置忙坐席:<b>0</b></li>
  295. <!--<li>签出坐席:<b>100</b></li>-->
  296. <li>全部坐席:<b>0</b></li>
  297. </ul>
  298. </div>
  299. </div>
  300. </div>
  301. <div class="zx_top">
  302. <span class="zx-title">状态说明</span>
  303. <ul class="m-b fenxian" style="width:104px;">
  304. <li class="left_red"></li>
  305. <li class="rg_green"></li>
  306. </ul>
  307. <div class="zx-box">
  308. <div class="zt-content w_5">
  309. <ul>
  310. <li><i class="hc"></i>呼出</li>
  311. <li><i class="ml"></i>忙绿</li>
  312. <li><i class="kx"></i>空闲</li>
  313. <li><i class="zl"></i>振铃</li>
  314. <!--<li><i class="qc"></i>&nbsp;签出</li>-->
  315. <li><i class="lx"></i>离线</li>
  316. <li><i class="hh"></i>话后处理</li>
  317. <li><i class="th"></i>通话中</li>
  318. </ul>
  319. </div>
  320. </div>
  321. </div>
  322. </div>
  323. </div>
  324. </div>
  325. <!--坐席弹屏-->
  326. <div class="zxT zxtp">
  327. <div class="zx-box" style="width: 400px;">
  328. <div class="zx_photo row zx_content">
  329. <div style="width: 400px;">
  330. <div class="bg_person"> <i class="lx"></i></div>
  331. <p>
  332. <span>工号:</span>
  333. <span class="g_nums"></span>
  334. </p>
  335. <p>
  336. <span>姓名:</span>
  337. <span class="g_names"></span>
  338. </p>
  339. </div>
  340. </div>
  341. <div class="zx-box_ul row">
  342. <ul>
  343. <li><b class="zx" item="ForceAgentState">置闲</b></li>
  344. <li><b class="jt" item="Listen">监听</b></li>
  345. <li><b class="dj" item="Instead">代接</b></li>
  346. <li><b class="qca" item="Insert">强插</b></li>
  347. <li><b class="lj" item="Intercept">拦截</b></li>
  348. <li><b class="qc" item="Break">强拆</b></li>
  349. </ul>
  350. </div>
  351. </div>
  352. </div>
  353. <script>
  354. var user;
  355. $(document).ready(function () {
  356. // if (!top.ws) {
  357. // top.Connect();
  358. // }
  359. //获取坐席列表
  360. $.getJSON(huayi.config.callcenter_url+'SeatMonitoring/getlist', { "token": $.cookie("token") }, function (result) {
  361. if (result.state.toLowerCase() == "success") {
  362. $(".zx_people").empty();
  363. user = result.data;
  364. $(".tjcount li").eq(6).find("b").text(user.length);
  365. $(user).each(function (i, n) {
  366. var html = '<li class="people_list ' + n.F_WorkNumber + '">'
  367. + '<div>'
  368. + ' <div class="bg_person">'
  369. + ' <i class="lx" zx_item="0" xl_item="0"></i>'
  370. + ' </div>'
  371. + ' <p>'
  372. + ' <span>工号:</span>'
  373. + ' <span class="g-num">' + n.F_WorkNumber + '</span>'
  374. + ' </p>'
  375. + ' <p>'
  376. + ' <span>&nbsp;&nbsp;姓名:</span>'
  377. + ' <span class="g-name">' + n.F_UserName + '</span>'
  378. + ' </p>'
  379. + '</div>'
  380. + '</li>';
  381. $(html).appendTo($(".zx_people")).click(function (event) {
  382. event.stopPropagation();
  383. if (top.obj.AgentID != $(this).find(".g-num").text()) {
  384. $(".zxtp .g_nums").text($(this).find(".g-num").text());
  385. $(".zxtp .g_names").text($(this).find(".g-name").text());
  386. $(".zxtp i").removeClass().addClass($(this).find("i").attr("class"));
  387. $(".zxtp .bg_person").html($(this).find(".bg_person").html());
  388. //if (!$(this).find("i").hasClass("lx")) {
  389. // Center($('.zxtp'));
  390. //}
  391. Center($('.zxtp'));
  392. UpdateSelState($(this).find("i").attr("zx_item"), $(this).find("i").attr("xl_item"));
  393. }
  394. else {
  395. layer.confirm('不能操作自己的坐席!', {
  396. btn: ['确定']
  397. });
  398. }
  399. })
  400. })
  401. }
  402. })
  403. $(".wrapper").click(function () {
  404. if (!$('.zxtp').is(":hidden")) {
  405. $('.zxtp').hide();
  406. }
  407. })
  408. //开始监测
  409. $(".kqc").click(function () {
  410. if (!$(this).hasClass("dis")) {
  411. $(user).each(function (i, n) {
  412. top.obj.Type = "SubScribe";
  413. top.obj.SubParmer = n.F_WorkNumber;
  414. top.obj.SubType = "0";//根据工号订阅坐席状态
  415. top.Send();
  416. top.obj.SubType = "1";//根据工号订阅线路状态
  417. top.Send();
  418. })
  419. //top.obj.Type = "SubScribe";
  420. //top.obj.SubParmer = "8003";
  421. //top.obj.SubType = "0";//根据工号订阅坐席状态
  422. //top.Send();
  423. //top.obj.SubType = "1";//根据工号订阅线路状态
  424. //top.Send();
  425. }
  426. })
  427. //停止监测
  428. $(".jqc").click(function () {
  429. if (!$(this).hasClass("dis")) {
  430. //$(user).each(function (i, n) {
  431. // top.obj.Type = "SubScribeCancel";
  432. // top.obj.SubParmer = n.F_WorkNumber;
  433. // top.obj.SubType = "0";//根据工号取消订阅坐席状态
  434. // top.Send();
  435. // top.obj.SubType = "1";//根据工号取消订阅线路状态
  436. // top.Send();
  437. //})
  438. top.obj.Type = "SubScribeCancel";
  439. top.obj.SubParmer = "-1";
  440. top.obj.SubType = "0";//根据工号取消订阅坐席状态
  441. top.Send();
  442. top.obj.SubType = "1";//根据工号取消订阅线路状态
  443. top.Send();
  444. }
  445. })
  446. //班长操作坐席
  447. $(".zxtp b").click(function () {
  448. if (!$(this).hasClass("dis")) {
  449. var wn = $(".zxtp .g_nums").text();
  450. var type = $(this).attr("item");
  451. top.obj.Type = type;
  452. top.obj.TargetAgentID = wn;
  453. top.Send();
  454. }
  455. })
  456. })
  457. //计算数量
  458. var tj;
  459. function tjcount() {
  460. tj = { hr: 0, tx: 0, kx: 0, lx: 0, zm: 0, dl: 0};
  461. $(".zx_people i").each(function () {
  462. var zx = $(this).attr("zx_item");
  463. var xl = $(this).attr("xl_item");
  464. switch (zx) {
  465. case "0": tj.lx = tj.lx + 1; break;//离线
  466. case "5": tj.zm = tj.zm + 1; break;//小休
  467. }
  468. switch (xl) {
  469. case "5": tj.hr = tj.hr + 1; break;//来电振铃
  470. case "6": tj.tx = tj.tx + 1; break;//通话中
  471. }
  472. if (zx == '2' && xl == '1') { tj.kx = tj.kx + 1; }//空闲
  473. if (zx != '0' && zx != '7' && xl != '0' && xl != '9') {
  474. tj.dl = tj.dl + 1;
  475. }
  476. })
  477. $(".tjcount li").eq(0).find("b").text(tj.dl);
  478. $(".tjcount li").eq(1).find("b").text(tj.lx);
  479. $(".tjcount li").eq(2).find("b").text(tj.kx);
  480. $(".tjcount li").eq(3).find("b").text(tj.tx);
  481. $(".tjcount li").eq(4).find("b").text(tj.hr);
  482. $(".tjcount li").eq(5).find("b").text(tj.zm);
  483. }
  484. /*居中*/
  485. function Center(obj) {
  486. var screenWidth = $(window).width(), screenHeight = $(window).height(); //当前浏览器窗口的 宽高
  487. var scrolltop = $(document).scrollTop();//获取当前窗口距离页面顶部高度
  488. var objLeft = (screenWidth - obj.width()) / 2;
  489. var objTop = (screenHeight - obj.height()) / 2 + scrolltop;
  490. obj.css({ left: objLeft + 'px', top: objTop + 'px' });
  491. obj.show();
  492. }
  493. //开始监测成功后
  494. function Start() {
  495. $(".kqc").addClass("dis");
  496. $(".jqc").removeClass("dis");
  497. }
  498. //停止监测成功后
  499. function Stop() {
  500. $(".jqc").addClass("dis");
  501. $(".kqc").removeClass("dis");
  502. $(".zxtp i").removeClass().addClass("lx");
  503. $(".zx_people i").removeClass().addClass("lx").attr("zx_item", "0").attr("xl_item", "0");
  504. }
  505. //坐席状态
  506. function UpdateAgentState(WorkNumber, State) {
  507. var ele = $("." + WorkNumber).find("i");
  508. var sts = "";
  509. switch (State) {
  510. case "0": sts = "lx"; break;//离线
  511. case "1":break;//登录中
  512. case "2": sts = "kx"; break;//空闲
  513. case "3": sts = "th"; break;//通话中
  514. case "4": sts = "hh"; break;//话后处理中
  515. case "5": sts = "ml"; break;//小休
  516. case "6": sts = "zl"; break;//被请求
  517. case "7": sts = "lx"; break;//注销
  518. }
  519. if (sts) {
  520. ele.removeClass().addClass(sts);
  521. }
  522. ele.attr("zx_item", State);
  523. if ($(".zxtp .g_nums").text() == WorkNumber) {
  524. if (sts) {
  525. $(".zxtp i").removeClass().addClass(sts);
  526. }
  527. UpdateSelState(State, ele.attr("xl_item"))
  528. }
  529. tjcount();
  530. }
  531. //线路状态
  532. function UpdateLineState(WorkNumber, State) {
  533. var sts = "";
  534. var ele = $("." + WorkNumber).find("i");
  535. switch (State) {
  536. case "0": sts = "lx"; break;//分机不可用
  537. case "1": if (!(ele.hasClass("hh") || ele.hasClass("ml"))) {//空闲 2018-05-18 zhangshuangnan 新增
  538. sts = "kx";
  539. } break;
  540. case "2": sts = "ml"; break;//摘机等待拨号
  541. case "3": sts = "ml"; break;//正在拨号
  542. case "4": sts = "hc"; break;//呼出振铃
  543. case "5": sts = "zl"; break;//来电振铃
  544. case "6": sts = "th"; break;//通话中
  545. case "7": sts = "ml"; break;//播放忙音中
  546. case "8": sts = "th"; break;//通话保持中
  547. case "9": break;//话机移除
  548. case "10": break;//保持/空闲
  549. case "11": break;//保持/摘机等待拨号
  550. case "12": break;//保持/正在拨号
  551. case "13": break;//保持/呼出振铃
  552. case "14": break;//保持/通话中
  553. }
  554. if (sts) {
  555. ele.removeClass().addClass(sts);
  556. }
  557. ele.attr("xl_item", State);
  558. if ($(".zxtp .g_nums").text() == WorkNumber) {
  559. if (sts) {
  560. $(".zxtp i").removeClass().addClass(sts);
  561. }
  562. UpdateSelState(ele.attr("zx_item"), State)
  563. }
  564. tjcount();
  565. }
  566. //更新选中坐席的可操作
  567. function UpdateSelState(zxState, xlState) {
  568. $(".zxtp b").addClass("dis");
  569. if (zxState == '5' && xlState == '1') {
  570. $(".zxtp .zx").removeClass("dis");
  571. }
  572. if (zxState == '3' && xlState == '6') {
  573. $(".zxtp .jt").removeClass("dis");
  574. $(".zxtp .qca").removeClass("dis");
  575. $(".zxtp .qc").removeClass("dis");
  576. $(".zxtp .lj").removeClass("dis");
  577. }
  578. if (zxState == '2' && xlState == '5') {
  579. $(".zxtp .dj").removeClass("dis");
  580. }
  581. }
  582. </script>
  583. </body>
  584. </html>