地铁二期项目正式开始

Index copy.cshtml 88KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825
  1. @using YTSoft.BaseCallCenter.Model;
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <title>郑州市轨道交通全媒体客服平台</title>
  7. <meta name="renderer" content="webkit">
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  9. <meta http-equiv="Access-Control-Allow-Origin" content="*">
  10. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  11. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  12. <meta name="apple-mobile-web-app-capable" content="yes">
  13. <meta name="format-detection" content="telephone=no">
  14. <link rel="icon" href="../favicon.ico">
  15. <link type="text/css" href="/Content/layui/css/layui.css" rel="stylesheet" />
  16. <link type="text/css" href="/Content/layui/css/modules/layui-icon-extend/iconfont.css" rel="stylesheet" />
  17. <link type="text/css" href="/Content/css/index.css" rel="stylesheet" />
  18. <link type="text/css" href="/Content/css/myindex.css" rel="stylesheet" />
  19. <link type="text/css" href="/Content/css/font-awesome/css/font-awesome.css" rel="stylesheet" />
  20. <script src="/Content/seatformjs/ocxopt.js"></script>
  21. <script src="/Content/js/callSocket.js"></script>
  22. <script type="text/javascript">
  23. //监控获取指定坐席状态结果事件
  24. function IframeSetAgentState(agentid, state) {
  25. try {
  26. window.frames["frame_zxjkgl"].GetState(agentid, state);
  27. }
  28. catch (e) {
  29. }
  30. }
  31. ///转移
  32. function PhoneCallZY(tel) {
  33. try {
  34. var callinphone = document.getElementById("forZYnumber").value;
  35. OCX_TransferToPhone(tel, "");
  36. }
  37. catch (e) {
  38. //$.ligerDialog.error(e.message);
  39. }
  40. }
  41. ///多方通话
  42. function PhoneCallDFTH(tel) {
  43. try {
  44. var callinphone = document.getElementById("forZYnumber").value;
  45. OCX_ThirdParty(tel, "");
  46. }
  47. catch (e) {
  48. //$.ligerDialog.error(e.message);
  49. }
  50. }
  51. ///工单接单时候调用的外呼方法
  52. function PhoneCallOutJD(type, tel, workorderid) {
  53. becallout = true;
  54. becallcome = false;
  55. CallOutRecordIsWrite = true;
  56. //添加外呼记录
  57. var userid = document.getElementById("txtAgentId").value;
  58. var usercode = document.getElementById("txtLabourwork").value;
  59. var username = document.getElementById("txtAgentName").value;
  60. var extnumber = document.getElementById("txtPhoneNum").value;
  61. username = encodeURI(username);
  62. var timeno = new Date().getTime();
  63. //$.ligerDialog.waitting('开始呼叫...');
  64. $.ajax({
  65. type: 'get',
  66. url: '/OCXOpt/OCXOptCallAjax/?optaction=callout&callernum=' + tel + "&callid=" + workorderid + "&userid=" + userid + "&usercode=" + usercode + "&username=" + username + "&extnumber" + extnumber + "&timeno=" + timeno,
  67. dataType: 'html',
  68. success: function (res) {
  69. try {
  70. var DialIsOK = false;
  71. var arr = res.split('|');
  72. document.getElementById("CallHjbh").value = arr[2];
  73. //成功执行外呼叫
  74. if (arr[0] == "1") { //呼叫内部(座席)电话
  75. //2015-04-20
  76. becallout = true;
  77. becallcome = false;
  78. DialIsOK = OCX_CallOut(5, "", arr[1]);
  79. }
  80. else { //呼叫外部电话
  81. DialIsOK = OCX_CallOut(5, "", arr[1]);
  82. }
  83. if (DialIsOK != true) {
  84. alert('外呼失败');
  85. //$.ligerDialog.error('外呼失败');
  86. }
  87. } catch (e) {
  88. alert(e.message);
  89. //$.ligerDialog.error(e.message);
  90. }
  91. //$.ligerDialog.closeWaitting();
  92. }
  93. });
  94. }
  95. function addCallOutInfo() {
  96. var tel = OCX_GetCalleeNumber(document.getElementById("txtAgentId").value);
  97. becallout = true;
  98. becallcome = false;
  99. CallOutRecordIsWrite = true;
  100. //添加外呼记录
  101. var userid = document.getElementById("txtAgentId").value;
  102. var usercode = document.getElementById("txtLabourwork").value;
  103. var username = document.getElementById("txtAgentName").value;
  104. var extnumber = document.getElementById("txtPhoneNum").value;
  105. var timeno = new Date().getTime();
  106. username = encodeURI(username);
  107. $.ajax({
  108. type: 'get',
  109. url: '/OCXOpt/OCXOptCallAjax/?optaction=callout&callernum=' + tel + "&userid=" + userid + "&usercode=" + usercode + "&username=" + username + "&extnumber" + extnumber + "&timeno=" + timeno,
  110. dataType: 'html',
  111. success: function (res) {
  112. try {
  113. var DialIsOK = false;
  114. var arr = res.split('|');
  115. document.getElementById("CallHjbh").value = arr[2];
  116. telajaxopt("/OCXOpt/OCXOptCallAjax/?optaction=zhaijiEvent&callid=" + parent.document.getElementById("CallHjbh").value); //更新摘机事件
  117. } catch (e) {
  118. }
  119. }
  120. });
  121. }
  122. ///外呼
  123. function PhoneCallOut(type, tel) {
  124. becallout = true;
  125. becallcome = false;
  126. CallOutRecordIsWrite = true;
  127. //添加外呼记录
  128. var userid = document.getElementById("txtAgentId").value;
  129. var usercode = document.getElementById("txtLabourwork").value;
  130. var username = document.getElementById("txtAgentName").value;
  131. var extnumber = document.getElementById("txtPhoneNum").value;
  132. var timeno = new Date().getTime();
  133. username = encodeURI(username);
  134. //$.ligerDialog.waitting('开始呼叫...');
  135. layui.use('layer', function () {
  136. var layer = layui.layer;
  137. layer.msg('开始呼叫...');
  138. });
  139. $.ajax({
  140. type: 'get',
  141. url: '/OCXOpt/OCXOptCallAjax/?optaction=callout&callernum=' + tel + "&userid=" + userid + "&usercode=" + usercode + "&username=" + username + "&extnumber" + extnumber + "&timeno=" + timeno,
  142. dataType: 'html',
  143. success: function (res) {
  144. try {
  145. var DialIsOK = false;
  146. var arr = res.split('|');
  147. document.getElementById("CallHjbh").value = arr[2];
  148. //成功执行外呼叫
  149. if (arr[0] == "1") { //呼叫内部(座席)电话
  150. //2015-04-20
  151. becallout = true;
  152. becallcome = false;
  153. DialIsOK = OCX_CallOut(5, "", arr[1]);
  154. }
  155. else { //呼叫外部电话
  156. DialIsOK = OCX_CallOut(5, "", arr[1]);
  157. }
  158. if (DialIsOK != true) {
  159. layui.use('layer', function () {
  160. var layer = layui.layer;
  161. layer.msg('外呼失败');
  162. });
  163. //alert('外呼失败');
  164. //$.ligerDialog.error('外呼失败');
  165. }
  166. } catch (e) {
  167. layui.use('layer', function () {
  168. var layer = layui.layer;
  169. layer.msg('外呼失败:' + e.message);
  170. });
  171. //$.ligerDialog.error(e.message);
  172. }
  173. //$.ligerDialog.closeWaitting();
  174. }
  175. });
  176. }
  177. var hfcallstate = false;
  178. var outtype = "";
  179. function SetCallState(state) {
  180. hfcallstate = state;
  181. }
  182. function GetCallOutHFRes() {
  183. if (hfcallstate) {
  184. hfcallstate = false;
  185. return true;
  186. }
  187. else {
  188. return false;
  189. }
  190. }
  191. ///外呼
  192. function PhoneCallOutHF(type, tel, hfid) {
  193. becallout = true;
  194. becallcome = false;
  195. hfcallstate = false;
  196. CallOutRecordIsWrite = true;
  197. outtype = "hf";
  198. //添加外呼记录
  199. var userid = document.getElementById("txtAgentId").value;
  200. var usercode = document.getElementById("txtLabourwork").value;
  201. var username = document.getElementById("txtAgentName").value;
  202. var extnumber = document.getElementById("txtPhoneNum").value;
  203. var timeno = new Date().getTime();
  204. username = encodeURI(username);
  205. layui.layer
  206. //$.ligerDialog.waitting('开始呼叫...');
  207. $.ajax({
  208. type: 'get',
  209. url: '/OCXOpt/OCXOptCallAjax/?optaction=callouthf&callid=' + hfid + '&callernum=' + tel + "&userid=" + userid + "&usercode=" + usercode + "&username=" + username + "&extnumber" + extnumber + "&timeno=" + timeno,
  210. dataType: 'html',
  211. success: function (res) {
  212. try {
  213. var DialIsOK = false;
  214. var arr = res.split('|');
  215. document.getElementById("CallHjbh").value = arr[2];
  216. //成功执行外呼叫
  217. if (arr[0] == "1") { //呼叫内部(座席)电话
  218. //2015-04-20
  219. becallout = true;
  220. becallcome = false;
  221. DialIsOK = OCX_CallOut(5, "", arr[1]);
  222. }
  223. else { //呼叫外部电话
  224. DialIsOK = OCX_CallOut(5, "", arr[1]);
  225. }
  226. if (DialIsOK != true) {
  227. alert('外呼失败');
  228. //$.ligerDialog.error('外呼失败');
  229. }
  230. } catch (e) {
  231. //$.ligerDialog.error(e.message);
  232. }
  233. //$.ligerDialog.closeWaitting();
  234. }
  235. });
  236. }
  237. function OptClick(name) {
  238. var obj = document.getElementById(name);
  239. if (obj.attributes["ostate"].value != 0) {
  240. switch (name) {
  241. case "gd":
  242. button_ReleaseAnswer();
  243. //挂断
  244. break;
  245. case "wh":
  246. //外呼先示忙
  247. //AgentBusy();
  248. //otype 1外呼 2转移 3多方通话
  249. OpenWindowShow1('telmanage/calloutopt.aspx?otype=1', '电话外呼', 800, 500);
  250. break;
  251. case "zm":
  252. //示忙
  253. AgentBusy();
  254. break;
  255. case "zx":
  256. AgentFree();
  257. break;
  258. case "dfth":
  259. //多方会话
  260. OpenWindowShow1('telmanage/calloutopt.aspx?otype=3', '多方通话', 800, 500);
  261. break;
  262. case "zy":
  263. //转移
  264. OpenWindowShow1('telmanage/calloutopt.aspx?otype=2', '电话转移', 800, 500);
  265. break;
  266. case "bc":
  267. //保持
  268. button_KeepCall(); //保持方法
  269. break;
  270. case "jh":
  271. //接回
  272. button_GetKeepCall();
  273. break;
  274. case "qr":
  275. //签入
  276. button_QRCall();
  277. break;
  278. case "qc":
  279. //签出
  280. button_QCCall();
  281. break;
  282. }
  283. }
  284. }
  285. //转移
  286. function ZYhj(callnumber) {
  287. var zyzj = document.getElementById("forZYnumber").value;
  288. if (zyzj != "") {
  289. //Form_setWinfromenble("false", "false", "false", "false", "false", "false", "false", "false", "false", "false");
  290. }
  291. else {
  292. alert("转移失败!");
  293. }
  294. }
  295. //释放呼叫 2.1.8
  296. function button_ReleaseAnswer() {//挂机
  297. try {
  298. //MydTransToIVR();
  299. }
  300. catch (e) { }
  301. try {
  302. var rtn = OCX_Hangup();
  303. }
  304. catch (e) { }
  305. }
  306. //满意度
  307. function MydTransToIVR() {
  308. var cid = document.getElementById("CallHjbh").value;
  309. var rtn = OCX_TransferToIVR("2", cid);
  310. }
  311. //转回IVR
  312. function AgentTransToIVR() {
  313. var cid=document.getElementById("CallHjbh").value;
  314. var rtn = OCX_TransferToIVR("2", cid);
  315. }
  316. //座席示忙 2.1.12
  317. function AgentBusy() {
  318. //将座席状态设置为忙态。
  319. //var rtn = OCX_SetBusy();
  320. //2014-10-22
  321. //becallout = true;
  322. //becallcome = false;
  323. //rgmstate = true;
  324. /*2020-09-24miaofuhao注释*/
  325. obj = {};
  326. obj.Type = "SayBusy";
  327. obj.AgentID = "8001";
  328. obj.AgentExten = "1009";
  329. obj.AgentGroup = "zx";
  330. obj.AgentType = "0";
  331. Send();
  332. /*2020-09-24miaofuhao注释*/
  333. }
  334. //座席示闲 2.1.13
  335. function AgentFree() {
  336. //将座席状态设置为闲态。
  337. //var rtn = OCX_SetFree();
  338. //2014-10-22
  339. //becallout = false;
  340. //becallcome = true;
  341. //rgmstate = false;
  342. //return rtn;
  343. /*2020-09-24miaofuhao注释*/
  344. obj = {};
  345. obj.Type = "SayFree";
  346. obj.AgentID = "8001";
  347. obj.AgentExten = "1009";
  348. obj.AgentGroup = "zx";
  349. obj.AgentType = "0";
  350. Send();
  351. /*2020-09-24miaofuhao注释*/
  352. }
  353. //保持呼叫 2.1.17
  354. function button_KeepCall() {
  355. //该方法把座席正在通话的普通语音呼叫保持(只对语音呼叫有效)。
  356. var rtn = OCX_Hold();
  357. }
  358. //取保持 2.1.18
  359. function button_GetKeepCall() {
  360. //查询座席当前保持的所有语音呼叫
  361. var rtn = OCX_UnHold();
  362. }
  363. function buttonCallNew(telNum) {
  364. becallout = true;
  365. becallcome = false;
  366. var strHjbhout = AjaxPost("../WinIVR/GetAjaxPageInf.aspx?PgType=3&tel=" + telNum); //呼叫编号
  367. document.getElementById("CallHjbh").value = strHjbhout;
  368. //判断电话是本地还是外地的
  369. var callNumberNew = "";
  370. var res = _framepage_headframe.getPhone(telNum);
  371. if (res != "") {
  372. callNumberNew = res.value;
  373. }
  374. button_CallOut(callNumberNew, strHjbhout);
  375. }
  376. //外呼事件 2.1.7
  377. function button_CallOut(callnumber, hjbh) {
  378. var res = true;
  379. var cssok = 0;
  380. cssok = OCX_CallOut(5, "", callnumber);
  381. if (cssok == "0") {
  382. res = true;
  383. }
  384. else {
  385. res = false;
  386. }
  387. return res;
  388. }
  389. //重新登录
  390. function resetlogin() {
  391. var bol = window.confirm("确定要重新登录吗?");
  392. if (bol) {
  393. if (document.getElementById("txtIsAgent").value == "true") {
  394. //button_QCCallNew();
  395. }
  396. window.open("../SignIn.aspx", "_top");
  397. }
  398. }
  399. //退出方法
  400. function relogout() {
  401. var bol = window.confirm("确定要退出登录吗?");
  402. if (bol) {
  403. AjaxPost("../WinIVR/GetAjaxPageInf.aspx?PgType=14");
  404. _framepage_headframe.UpdateLoginOutInfo(document.getElementById("hfUserId").value);
  405. top.close();
  406. }
  407. }
  408. </script>
  409. <script language="javascript" type="text/javascript">
  410. //退出系统
  411. function logout() {
  412. $.post("/Default/LoginOut/" , function (data, states) {
  413. if (states == "success") {
  414. if (data == "success") {
  415. layer.confirm('确定退出系统?', { icon: 3, title: '提示' }, function (index) {
  416. try {
  417. if (document.getElementById("txtIsAgent").value == "true") {
  418. OCX_AgentLogOut();
  419. }
  420. }
  421. catch (e) {
  422. }
  423. //do something
  424. location.href = "/Default/Login";
  425. layer.close(index);
  426. });
  427. }
  428. }
  429. })
  430. }
  431. </script>
  432. <script type="text/javascript">
  433. //电话操作
  434. var becallout = false; //呼出
  435. var becallcome = false; //来电
  436. var CallOutRecordIsWrite = false; //呼出记录是否已写入
  437. var rgmstate = false;//人工忙状态
  438. function ToIndex() {
  439. //document.getElementById("mainframe").src = "/Main/IndexCenter";
  440. //<i class="layui-icon">&#xe68e;</i> <cite openid="-1">首页</cite>
  441. var tabIndex = -1;
  442. $(".layui-tab-title.top_tab li").each(function () {
  443. if ($(this).attr("lay-id") == 'maintab_index') {
  444. tabIndex = 1;
  445. }
  446. })
  447. if (tabIndex != 1) {
  448. var timeno = new Date().getTime();
  449. //新增一个Tab项
  450. element.tabAdd('bodyTab', {
  451. title: '<i class=\"layui-icon\">&#xe68e;</i> <cite openid=\"-1\">首页</cite>'
  452. , content: '<iframe id=\"mainframe_index\" src=\"/Main/IndexCenter?timeno=' + timeno + '\"></iframe>'
  453. , id: 'maintab_index' //实际使用一般是规定好的id,这里以时间戳模拟下
  454. })
  455. }
  456. element.tabChange('bodyTab', 'maintab_index');
  457. element.tabMove(); //顶部窗口是否可滚动
  458. }
  459. //初始化页面
  460. function Init() {
  461. try {
  462. //禁止后退键 作用于Firefox、Opera
  463. document.onkeypress = banBackSpace;
  464. //禁止后退键 作用于IE、Chrome
  465. document.onkeydown = banBackSpace;
  466. }
  467. catch (e) { }
  468. //show();
  469. }
  470. //签出
  471. function button_QCCall() {
  472. try {
  473. var result = OCX_AgentLogOut();
  474. }
  475. catch (e) {
  476. document.getElementById("spanServerRes").innerHTML = e.message;
  477. }
  478. }
  479. //获取排队数量
  480. function GetQueuingNumber() {
  481. var rtn = OCX_GetQueuingNumber();
  482. }
  483. function LoadQueuingNumber(num, list) {
  484. document.getElementById("spanqueuingnum").innerHTML = num;
  485. }
  486. function AgentQR() {
  487. if (document.getElementById("txt_1").value == "0") {
  488. document.getElementById("txt_1").value = "1";
  489. var typed = document.getElementById("HdIswin"); //是否是坐席用户
  490. if (typed.value == "true") {
  491. var timeno = new Date().getTime();
  492. /*2020-09-24miaofuhao注释*/
  493. obj = {};
  494. obj.Type = "Login";
  495. obj.AgentID = "8001";
  496. obj.AgentExten = "1009";
  497. obj.AgentGroup = "Login";
  498. obj.AgentType = "0";
  499. Send();
  500. /*2020-09-24miaofuhao注释*/
  501. InitPhoneBack();
  502. }
  503. else {
  504. document.getElementById("spanServerRes").innerHTML = "非坐席登录";
  505. }
  506. }
  507. else {
  508. document.getElementById("txt_1").value = "0";
  509. button_QCCall();
  510. }
  511. }
  512. function InitPhoneBack() {
  513. Initialize();
  514. }
  515. function Initialize() {
  516. try {
  517. var result = OCX_AgentLogin(document.getElementById("txtMostlyAddress").value, document.getElementById("txtServerPort").value, document.getElementById("txtLabourNo").value, document.getElementById("txtAgentGroup").value + "_" + document.getElementById("txtAgentRight").value, document.getElementById("txtPhoneNum").value);
  518. }
  519. catch (e) {
  520. document.getElementById("spanServerRes").innerHTML = e.message;
  521. }
  522. }
  523. //处理键盘事件 禁止后退键(Backspace)密码或单行、多行文本框除外
  524. function banBackSpace(e) {
  525. try {
  526. var ev = e || window.event; //获取event对象
  527. var obj = ev.target || ev.srcElement; //获取事件源
  528. var t = obj.type || obj.getAttribute('type'); //获取事件源类型
  529. //获取作为判断条件的事件类型
  530. var vReadOnly = obj.getAttribute('readonly');
  531. //处理null值情况
  532. vReadOnly = (vReadOnly == "") ? false : vReadOnly;
  533. //当敲Backspace键时,事件源类型为密码或单行、多行文本的,
  534. //并且readonly属性为true或enabled属性为false的,则退格键失效
  535. var flag1 = (ev.keyCode == 8 && (t == "password" || t == "text" || t == "textarea")
  536. && vReadOnly == "readonly") ? true : false;
  537. //当敲Backspace键时,事件源类型非密码或单行、多行文本的,则退格键失效
  538. var flag2 = (ev.keyCode == 8 && t != "password" && t != "text" && t != "textarea")
  539. ? true : false;
  540. //判断
  541. if (flag2) {
  542. return false;
  543. }
  544. if (flag1) {
  545. return false;
  546. }
  547. }
  548. catch (e) {
  549. return false;
  550. }
  551. }
  552. </script>
  553. <script type="text/javascript">
  554. function setLinkStatus(str) {
  555. //var imgServerState = document.getElementById("imgServerState");
  556. if (str == "True") {
  557. $('#imgServerState').attr('src', '/Content/images/server1.png');
  558. $('#imgServerState').attr('alt', '签入');
  559. // imgServerState.src = "/Content/images/server1.png";
  560. //imgServerState.alt = "签入";
  561. }
  562. else {
  563. $('#imgServerState').attr('src', '/Content/images/server0.png');
  564. $('#imgServerState').attr('alt', '未签入');
  565. //imgServerState.src = "/Content/images/server0.png";
  566. //imgServerState.alt = "未签入";
  567. }
  568. }
  569. function setAgentStatus(str) {
  570. //var imgAgentState = document.getElementById("imgAgentState");
  571. switch (str) {
  572. case "离席":
  573. $('#imgAgentState').attr('src', '/Content/images/zx2.png');
  574. $('#imgAgentState').attr('alt', '未登录');
  575. //imgAgentState.src = "/Content/images/zx2.png";
  576. //imgAgentState.alt = "未登录";
  577. break;
  578. case "空闲":
  579. $('#imgAgentState').attr('src', '/Content/images/zx1.png');
  580. $('#imgAgentState').attr('alt', '空闲');
  581. //imgAgentState.src = "/Content/images/zx1.png";
  582. //imgAgentState.alt = "空闲";
  583. break;
  584. case "忙":
  585. $('#imgAgentState').attr('src', '/Content/images/zx3.png');
  586. $('#imgAgentState').attr('alt', '忙');
  587. //imgAgentState.src = "/Content/images/zx3.png";
  588. //imgAgentState.alt = "忙";
  589. break;
  590. case "业务处理":
  591. $('#imgAgentState').attr('src', '/Content/images/zx4.png');
  592. $('#imgAgentState').attr('alt', '业务处理');
  593. //imgAgentState.src = "/Content/images/zx4.png";
  594. //imgAgentState.alt = "业务处理";
  595. break;
  596. }
  597. }
  598. //变换图标
  599. function Form_setWinfromenble(bl) {
  600. }
  601. function Form_setHW(bl) {
  602. if (bl == "True") {
  603. document.getElementById("txt_1").value = "1";
  604. document.getElementById("i_1").style.color = "#395E67";
  605. }
  606. else {
  607. document.getElementById("i_1").style.color = "#cccccc";
  608. document.getElementById("txt_1").value = "0";
  609. }
  610. }
  611. function Form_setZX(bl) {
  612. if (bl == "True") {
  613. document.getElementById("txt_7").value = "1";
  614. document.getElementById("i_7").style.color = "#395E67";
  615. }
  616. else {
  617. document.getElementById("i_7").style.color = "#cccccc";
  618. document.getElementById("txt_7").value = "0";
  619. }
  620. }
  621. function Form_setZM(bl) {
  622. if (bl == "True") {
  623. document.getElementById("txt_8").value = "1";
  624. document.getElementById("i_8").style.color = "#395E67";
  625. }
  626. else {
  627. document.getElementById("i_8").style.color = "#cccccc";
  628. document.getElementById("txt_8").value = "0";
  629. }
  630. }
  631. function OptNull() {
  632. }
  633. function OptNullByName(name) {
  634. var obj = document.getElementById(name);
  635. obj.src = "../images/totle/" + name + "3.png";
  636. obj.attributes["ostate"].value = 0;
  637. //obj.ostate = 0;
  638. obj.style.cursor = "default";
  639. }
  640. function OptByName(name) {
  641. var obj = document.getElementById(name);
  642. obj.src = "../images/totle/" + name + "1.png";
  643. obj.attributes["ostate"].value = 1;
  644. //obj.ostate = 1;
  645. obj.style.cursor = "hand";
  646. }
  647. </script>
  648. <style type="text/css">
  649. .defaultClass {
  650. color: #cccccc;
  651. }
  652. .selectClass {
  653. color: #83d944;
  654. }
  655. </style>
  656. </head>
  657. <body onload="Init()" class="main_body blue">
  658. <div class="layui-layout layui-layout-admin">
  659. <!-- 顶部 -->
  660. <div class="layui-header header">
  661. <div class="layui-main mag0">
  662. <a href="###" class="logo" style=" text-align:left; padding-left:15px;">全媒体客服平台<img style="height:55px; display:none;" src="/Content/images/logo1.png" /><span>&nbsp;&nbsp;</span></a>
  663. <!-- 功能模块Id -->
  664. <input id="HdModuleFunIdCount" type="hidden" value="0" />
  665. <input id="ismonitoring" type="hidden" value="false" />
  666. <input id="HdIswin" type="hidden" value="@Model.IsSeat" />
  667. <input id="UserID" type="hidden" value="@Model.UserAccountModel.F_UserId" />
  668. <input id="Password" type="hidden" value="@Model.UserAccountModel.F_Password" />
  669. <input id="hfUserId" type="hidden" value="@Model.UserAccountModel.F_UserId" />
  670. <iframe src="/Main/iframeocx" name="iframeocx" frameborder="0" height="0" width="0"
  671. style="display: none;"></iframe>
  672. @*--(用于初始化用的信息)--*@
  673. <input id="txtMostlyAddress" type="hidden" value="@Model.CTIserverIP" />@*--(主用CTI服务器IP)*@
  674. <input id="ServerType" type="hidden" value="20" />@*--(服务器类型)--*@
  675. <input id="txtLabourNo" type="hidden" value="@Model.UserAccountModel.F_WorkNumber" />@*--<%=Request.Cookies["ID"].Value %>(工号)--*@
  676. <input id="pwd" type="hidden" value="" />@*--<%=Request.Cookies["ID"].Value %>(密码)--*@
  677. <input id="txtPhoneID" type="hidden" value="@Model.UserAccountModel.F_UserCode" />@*--(通讯进程号)--*@
  678. <input id="txtSubordinationAddress" type="hidden" value="@Model.CTIserverIP" />@*--(备用CTI服务器IP)--*@
  679. <input id="txtIsAgent" type="hidden" value="@Model.UserAccountModel.F_SeatFlag" />
  680. <!-- 是否具有话务功能,是否坐席登录 -->
  681. <input id="txtAgentId" type="hidden" value="@Model.UserAccountModel.F_UserId" /><!-- 坐席ID -->
  682. <input id="txtAgentName" type="hidden" value="@Model.UserAccountModel.F_UserName" />
  683. <input id="txtAgentRight" type="hidden" value="@Model.UserAccountModel.F_SeatRight" />
  684. <input id="txtAgentGroup" type="hidden" value="@Model.UserAccountModel.F_GroupId" />
  685. <input id="txtServerPort" type="hidden" value="@Model.CTIserverPort" />
  686. <!-- 坐席权限 -->
  687. @*--(用于登录的信息)--*@
  688. <input id="SeatType" type="hidden" value="@Model.UserAccountModel.F_SeatRight" />@*--<%=Request.Cookies["SkillSet"].Value %>(坐席类型)--*@
  689. <input id="txtPhoneNum" type="hidden" value="@Model.UserAccountModel.F_ExtensionNumber" />@*--<%=Request.Cookies["ExtNum"].Value %>(分机号)--*@
  690. <input id="keepcall" type="hidden" value="" />
  691. @*--(keep号码)--*@
  692. <input id="txtLabourwork" type="hidden" value="@Model.UserAccountModel.F_UserCode" />@*--(登录工号)--*@
  693. <input id="passwd" type="hidden" value="" />@*--(登录坐席密码)--*@
  694. <input id="hjbh" type="hidden" value="" />@*--(外乎呼叫编号)--*@
  695. <input id="CallHjbh" type="hidden" value="" />@*--(来电呼叫编号)--*@
  696. <input id="forZYnumber" type="hidden" value="" />@*--(用来存储来电号码--*@
  697. <input id="callnum" type="hidden" value="" />@*--(来电主叫号码)--*@
  698. <ul class="layui-nav topLevelMenus" pc>
  699. <li class="layui-nav-item" onclick="AgentQR()" data-menu="contentManagement" title="语音签入">
  700. <input id="txt_1" type="hidden" value="0" /><a href="javascript:;" title="语音签入">
  701. <i id="i_1" class="fa fa-phone defaultClass" data-icon=""></i></a>
  702. </li>
  703. <li class="layui-nav-item" data-menu="memberCenter" pc>
  704. <a href="javascript:;"><i id="i_2" class="layui-icon" style=" color:#cccccc;" data-icon="&#xe611;">&#xe611;</i></a>
  705. </li>
  706. <li class="layui-nav-item btnWX" data-menu="systemeSttings" pc>
  707. <a href="javascript:;"><i id="i_3" class="fa fa-weixin defaultClass" data-icon=""></i></a>
  708. </li>
  709. <li class="layui-nav-item btnWB" data-menu="seraphApi" pc>
  710. <a href="javascript:;"><i id="i_4" class="fa fa-weibo defaultClass" data-icon=""></i></a>
  711. </li>
  712. <li class="layui-nav-item" pc>
  713. <a href="javascript:;"><i id="i_5" class="fa fa-th-large" style=" color:#cccccc;" data-icon=""></i></a>
  714. </li>
  715. <li class="layui-nav-item" pc>
  716. <a href="javascript:;"><i id="i_6" class="fa fa-envelope-o" style=" color:#cccccc;" data-icon=""></i></a>
  717. </li>
  718. <li class="layui-nav-item" pc>
  719. <input id="txt_7" type="hidden" value="0" />
  720. <a href="javascript:;" onclick="AgentFree()" title="坐席就绪">
  721. <i id="i_7" class="fa fa-play defaultClass" data-icon=""></i></a>
  722. </li>
  723. <li class="layui-nav-item" pc>
  724. <input id="txt_8" type="hidden" value="0" />
  725. <a href="javascript:;" onclick="AgentBusy()" title="坐席小休">
  726. <i id="i_8" class="fa fa-pause defaultClass" data-icon=""></i>
  727. </a>
  728. </li>
  729. </ul>
  730. <!-- 顶部右侧菜单 -->
  731. <ul class="layui-nav top_menu">
  732. <li class="layui-nav-item">
  733. <a id="telLayerInfo" style=" display:none;" href="javascript:;"><img src="/Content/images/phone128.png" class="layui-nav-img userAvatar" width="35" height="35"><cite class="adminName">未处理来电</cite><sup id="supLayerCount" class="layui-badge">0</sup>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
  734. <dl id="telLayerInfoChild" class="layui-nav-child"></dl>
  735. </li>
  736. <!--软电话-->
  737. <li class="layui-nav-item " title="软电话">
  738. <i class="fa fa-whatsapp" data-method="confirmTrans" style="font-size: 25px !important; margin-right: 0px;margin-top:15px; color:gray"></i>
  739. </li>
  740. <li class="layui-nav-item" title="通讯录" id="CustomerTelphone">
  741. @*<a href="javascript:;" title="通讯录" onclick="OpenOtherForm('通讯录', '/HrEmployeeBase/EmployeeSearchList')">
  742. <i class="fa fa-address-card" style="font-size: 25px !important; margin-left :15px;margin-top:15px; color:gray">
  743. </i>
  744. </a>*@
  745. <a id="customerphone">
  746. <i class="fa fa-address-card" style="font-size: 25px !important; margin-left :15px;margin-top:15px; color:powderblue;"></i>
  747. </a>
  748. </li>
  749. <!--微信-->
  750. @*<li id="wxMap" class="layui-nav-item inform" title="微信">
  751. <i class="fa fa-weixin defaultClass" style="font-size: 20px !important; margin-right: 5px;"></i>
  752. <sup class="layui-badge wXCount" style="display:none;">0</sup>
  753. </li>*@
  754. <!--微博-->
  755. @*<li id="wbMap" class="layui-nav-item inform" title="微博">
  756. <i class="fa fa-weibo defaultClass" style=" font-size: 20px !important;margin-right:13px;"></i>
  757. <sup class="layui-badge wBCount" style="display:none;">0</sup>
  758. </li>*@
  759. <li class="layui-nav-item">
  760. <a href="javascript:;" title="小工具"><i class="layui-icon" style=" font-size: 25px !important;">&#xe631;</i></a>
  761. <dl class="layui-nav-child">
  762. <dd>
  763. <a href="javascript:;" onclick="OpenOtherForm('周边', 'https://www.amap.com/')"><i class="fa fa-map-marker" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">周边</cite></a>
  764. </dd>
  765. <dd>
  766. <a href="javascript:;" onclick="OpenOtherForm('线路查询', 'http://www.zzmetro.com/lines/query/line')"><i class="fa fa-plane" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">线路查询</cite></a>
  767. </dd>
  768. <dd>
  769. <a href="javascript:;" onclick="OpenOtherForm('票价查询', 'http://www.zzmetro.com/lines/query/ticket')"><i class="fa fa-ticket" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">票价查询</cite></a>
  770. </dd>
  771. <dd>
  772. <a href="javascript:;" onclick="OpenOtherForm('运营时间', 'http://www.zzmetro.com/lines/query/operating_hours')"><i class="fa fa-clock-o" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">运营时间</cite></a>
  773. </dd>
  774. <dd>
  775. <a href="javascript:;" onclick="OpenOtherForm('站点查询', 'http://www.zzmetro.com/lines/query/station')"><i class="fa fa-train" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">站点查询</cite></a>
  776. </dd>
  777. <dd>
  778. <a href="javascript:;" onclick="OpenOtherForm('快速通讯录', 'http://portal.zzmetro.com/index.php?m=content&c=txl')"><i class="fa fa-tty" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">快速通讯录</cite></a>
  779. </dd>
  780. <dd>
  781. <a href="javascript:;" onclick="OpenOtherForm('官网入口', 'http://www.zzmetro.com/')"><i class="fa fa-internet-explorer" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">官网入口</cite></a>
  782. </dd>
  783. <dd>
  784. <a href="javascript:;" onclick="OpenOtherForm('常见Q&A', ' /RepositoryCategory/RepositoryCategoryContentList/?dType=2')"><i class="fa fa-quora" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">常见Q&A</cite></a>
  785. </dd>
  786. <dd>
  787. <a href="javascript:;" onclick="OpenOtherForm('常用语', ' /RepositoryCategory/RepositoryCategoryContentList/?dType=4')"><i class="fa fa-book" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">常用语</cite></a>
  788. </dd>
  789. <dd>
  790. <a href="javascript:;" onclick="OpenOtherForm('我的常用语', ' /RepositoryCategory/RepositoryCategoryContentList/?dType=1')"><i class="fa fa-rebel" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">我的常用语</cite></a>
  791. </dd>
  792. <dd>
  793. <a href="javascript:;" onclick="OpenOtherForm('邮箱入口', 'http://mail.zzmetro.cn/index.php')"><i class="fa fa-envelope" style="font-size: 20px !important; margin-right: 5px;color:deepskyblue;"></i><cite style="text-align:left">邮箱入口</cite></a>
  794. </dd>
  795. </dl>
  796. </li>
  797. <li class="layui-nav-item" id="userInfo">
  798. <a href="javascript:;"><img src="@Model.UserAccountModel.F_HomePhone" class="layui-nav-img userAvatar" width="35" height="35"><cite class="adminName">@Model.UserAccountModel.F_UserName</cite></a>
  799. <dl class="layui-nav-child">
  800. <dd>
  801. <a id="userinfo"><i class="layui-icon">&#xe705;</i><cite>个人信息</cite></a>
  802. </dd>
  803. <dd>
  804. <a id="userpwd"><i class="layui-icon"> &#xe620;</i><cite>修改密码</cite></a>
  805. </dd>
  806. <dd>
  807. <a href="javascript:logout()" id="exitsystem"><i class="fa fa-power-off"> </i><cite>退出系统</cite></a>
  808. </dd>
  809. </dl>
  810. </li>
  811. </ul>
  812. </div>
  813. </div>
  814. <!-- 左侧导航 -->
  815. <div class="layui-side layui-bg-black">
  816. <div class="navBar layui-side-scroll" id="navBar">
  817. <ul class="layui-nav layui-nav-tree" lay-filter="demo" lay-shrink="all">
  818. @if (Model != null && Model.MenuModelList != null && Model.MenuModelList.Count > 0)
  819. {
  820. int i = 0;
  821. foreach (T_Sys_ModuleFunctions rootNode in Model.MenuModelList)
  822. {
  823. if (i == 0)
  824. {
  825. <li class="layui-nav-item layui-nav-itemed">
  826. <a data-url="@rootNode.F_OptUrl"><i class="@rootNode.F_ImgUrl"></i> @rootNode.F_Name</a>
  827. @if (rootNode.ChildMenuModelList != null && rootNode.ChildMenuModelList.Count > 0)
  828. {
  829. <dl class="layui-nav-child">
  830. @foreach (T_Sys_ModuleFunctions childNode in rootNode.ChildMenuModelList)
  831. {
  832. <dd><a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">@childNode.F_Name</a></dd>
  833. }
  834. </dl>
  835. }
  836. </li>
  837. }
  838. else
  839. {
  840. <li class="layui-nav-item">
  841. @if (rootNode.F_ModuleId > 0)
  842. {
  843. <a id="@rootNode.F_FunctionId" aname="@rootNode.F_Name" aicon="@rootNode.F_ImgUrl" data-url="@rootNode.F_OptUrl">
  844. <i class="@rootNode.F_ImgUrl defaultClass"></i> @rootNode.F_Name
  845. <sup class="layui-badge @rootNode.F_ModuleCode" style="display:none;margin-left:155px;">0</sup>
  846. </a>
  847. }
  848. else
  849. {
  850. if (rootNode.F_FunctionId == 5)
  851. {
  852. <a id="@rootNode.F_FunctionId" aname="@rootNode.F_Name" aicon="@rootNode.F_ImgUrl" data-url="@rootNode.F_OptUrl"><i class="@rootNode.F_ImgUrl"></i> @rootNode.F_Name<sup style="position:inherit;margin-left:50px;" class="layui-badge totalOrderCount">0</sup></a>
  853. }
  854. else
  855. {
  856. <a id="@rootNode.F_FunctionId" aname="@rootNode.F_Name" aicon="@rootNode.F_ImgUrl" data-url="@rootNode.F_OptUrl"><i class="@rootNode.F_ImgUrl"></i> @rootNode.F_Name</a>
  857. }
  858. }
  859. @if (rootNode.ChildMenuModelList != null && rootNode.ChildMenuModelList.Count > 0)
  860. {
  861. <dl class="layui-nav-child">
  862. @foreach (T_Sys_ModuleFunctions childNode in rootNode.ChildMenuModelList)
  863. {
  864. if (childNode.F_FunctionId == 16)
  865. {
  866. <dd>
  867. <a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">
  868. @childNode.F_Name
  869. <sup class="layui-badge orderNeedCount" style="margin-left:75px;">0</sup>
  870. </a>
  871. </dd>
  872. }
  873. else if (childNode.F_FunctionId == 17)
  874. {
  875. <dd>
  876. <a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">
  877. @childNode.F_Name
  878. <sup class="layui-badge orderCount" style="margin-left:75px;">0</sup>
  879. </a>
  880. </dd>
  881. }
  882. else if (childNode.F_FunctionId == 18)
  883. {
  884. <dd>
  885. <a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">
  886. @childNode.F_Name
  887. <sup class="layui-badge orderCount" style="margin-left:75px;">0</sup>
  888. </a>
  889. </dd>
  890. }
  891. else if (childNode.F_FunctionId == 69)
  892. {
  893. <dd>
  894. <a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">
  895. @childNode.F_Name
  896. <sup class="layui-badge orderCountWb" style="margin-left:75px;">0</sup>
  897. </a>
  898. </dd>
  899. }
  900. else
  901. {
  902. <dd><a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">@childNode.F_Name</a></dd>
  903. }
  904. }
  905. </dl>
  906. }
  907. </li>
  908. }
  909. i++;
  910. }
  911. }
  912. </ul>
  913. </div>
  914. </div>
  915. <!-- 右侧内容 -->
  916. <div class="layui-body layui-form">
  917. <iframe id="mainframe" src="/Main/IndexCenter"></iframe>
  918. @*<div class="layui-tab mag0" lay-filter="bodyTab" id="top_tabs_box">
  919. <div class="switchover1">
  920. <i class="switcRight layui-icon">&#xe603;</i>
  921. </div>
  922. <ul class="layui-tab-title top_tab" id="top_tabs">
  923. <li class="layui-this maintabframecss" lay-id="maintab_index"><i class="layui-icon">&#xe68e;</i> <cite openid="-1">首页</cite></li>
  924. </ul>
  925. <!--tab 滑动-->
  926. <div class="switchover">
  927. <i class="switcLeft layui-icon">&#xe602;</i>
  928. </div>
  929. <ul class="layui-nav closeBox">
  930. <li class="layui-nav-item">
  931. <a href="javascript:;"><i class="layui-icon caozuo">&#xe643;</i> 操作</a>
  932. <dl class="layui-nav-child">
  933. <dd>
  934. <a href="javascript:;" class="refresh refreshThis"><i class="layui-icon">&#x1002;</i> 刷新当前</a>
  935. </dd>
  936. <dd>
  937. <a href="javascript:;" class="closePageOther"><i class="layui-icon">&#x1007;</i> 关闭其他</a>
  938. </dd>
  939. <dd>
  940. <a href="javascript:;" class="closePageAll"><i class="layui-icon">&#x1006;</i> 关闭全部</a>
  941. </dd>
  942. </dl>
  943. </li>
  944. </ul>
  945. <div class="layui-tab-content clildFrame">
  946. <div id="mainframeTab_index" class="layui-tab-item layui-show">
  947. <iframe id="mainframe_index" src="/Main/IndexCenter"></iframe>
  948. </div>
  949. </div>
  950. </div>*@
  951. </div>
  952. <!-- 底部 -->
  953. <div class="layui-footer footer">
  954. <div style="float: left; padding-left: 8px;" id="TelState">
  955. <div style="float: left; padding-top: 4px;">
  956. 服务状态:
  957. </div>
  958. <div style="float: left; padding-top: 3px;">
  959. <img id="imgServerState" src="/Content/images/server0.png" alt="未连接" />
  960. </div>
  961. <div style="float: left; padding-top: 3px;">
  962. &nbsp;&nbsp;坐席状态:
  963. </div>
  964. <div style="float: left; padding-top: 3px;">
  965. <img id="imgAgentState" src="/Content/images/zx2.png" alt="未登录" />
  966. </div>
  967. <div style="float: left; padding-top: 3px;">
  968. &nbsp;&nbsp;排队数量:
  969. </div>
  970. <div style="float: left; padding-top: 3px;">
  971. <span id="spanqueuingnum" class="layui-badge">0</span>
  972. </div>
  973. <div style="float: left; padding-top: 3px;">
  974. &nbsp;&nbsp;<span id="spanServerRes" style="color: #eeeeee;"></span>
  975. </div>
  976. </div><div style="float:right;"><p><span>© 版权所有 郑州市轨道交通</span></p></div>
  977. </div>
  978. </div>
  979. <!-- 移动导航 -->
  980. @*<div class="site-tree-mobile"><i class="layui-icon">&#xe602;</i></div>
  981. <div class="site-mobile-shade"></div>*@
  982. <script type="text/javascript">
  983. function OpenOtherForm(title, url) {
  984. window.open(url, title);
  985. //top.OCX_OpenOtherForm(title, url);
  986. }
  987. </script>
  988. <script src="/Content/layui/layui.js"></script>
  989. <script src="/Content/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
  990. @*<script type="text/javascript" src="/Content/js/index.js" charset="utf-8"></script>*@
  991. <script type="text/javascript" src="/Content/js/cache.js"></script>
  992. <script src="/Content/js/myindex.js" type="text/javascript" charset="utf-8"></script>
  993. <script src="~/Content/js/passWord/pwdValueDate.js"></script>
  994. <script>
  995. layui.use(['layer', 'jquery'], function () {
  996. var form = layui.form,
  997. layer = parent.layer === undefined ? layui.layer : parent.layer,
  998. $ = layui.jquery;
  999. $(".fa-whatsapp").click(function () {
  1000. if ($("#HdIswin").val()) {
  1001. layer.open({
  1002. type: 2,
  1003. anim: 4,
  1004. scrollbar: false,
  1005. content: '/Main/PhoneCall',
  1006. area: ['400px', '420px'],
  1007. id: 'PhoneCall',
  1008. title: '软电话'
  1009. });
  1010. }
  1011. else {
  1012. layer.msg('无权限', { icon: 5, time: 2000 });
  1013. return;
  1014. }
  1015. });
  1016. })
  1017. </script>
  1018. <script type="text/javascript">
  1019. function telajaxopt(opturl) {
  1020. var r = "";
  1021. try {
  1022. $.ajax({
  1023. type: 'get',
  1024. url: opturl,
  1025. dataType: 'html',
  1026. async: false,
  1027. cache: false,
  1028. success: function (res) {
  1029. r = res;
  1030. }
  1031. });
  1032. }
  1033. catch (e) {
  1034. //$.ligerDialog.error(e.message);
  1035. }
  1036. return r;
  1037. }
  1038. //电话操作事件
  1039. //话机状态改变事件
  1040. function OnPhoneStatusNotify(status) {
  1041. var timeno = new Date().getTime();
  1042. //document.getElementById("spanServerRes").innerHTML = "状态:" + status;
  1043. }
  1044. //获取APPID
  1045. function GetAPPID() {
  1046. var cid = OCX_GetCallID("");
  1047. //更新APPID
  1048. return cid;
  1049. }
  1050. function UpdateRecPath() {
  1051. var appid = "";
  1052. appid = GetAPPID();
  1053. var timeno = new Date().getTime();
  1054. var callID = document.getElementById("CallHjbh").value;
  1055. telajaxopt("/OCXOpt/OCXOptCallAjax/?optaction=luyinEvent&callid=" + callID + "&path=" + appid + "&timeno=" + timeno); //录音开始事件
  1056. }
  1057. //录音成功
  1058. function Form_callComming(callerNum, parth) {
  1059. var timeno = new Date().getTime();
  1060. telajaxopt("/OCXOpt/OCXOptCallAjax/?optaction=luyinEvent&callid=" + document.getElementById("CallHjbh").value + "&path=" + parth + "&timeno=" + timeno); //录音开始事件
  1061. //Form_setWinfromenble("True", "false", "false", "false", "True", "True", "True", "false", "false", "false");
  1062. }
  1063. function getCallerNum() {
  1064. var calnum = document.getElementById("callnum").value;
  1065. return calnum;
  1066. }
  1067. function clearCallerNum() {
  1068. document.getElementById("callnum").value = "";
  1069. }
  1070. function getCallHjbh() {
  1071. var cid = document.getElementById("CallHjbh").value;
  1072. return cid;
  1073. }
  1074. function clearCallHjbh() {
  1075. document.getElementById("CallHjbh").value = "";
  1076. }
  1077. </script>
  1078. <script>
  1079. var tellayercount = 0;
  1080. var nowtime = "";
  1081. var arrLayerTime = new Array();
  1082. function ShowLayerByTimes(times) {
  1083. nowtime = times;
  1084. var aid = "layui-layer" + times;
  1085. //$('#' + aid).show();
  1086. $("#" + aid).find(".layui-layer-max").click();
  1087. }
  1088. function CloseLayerByTimes(times) {
  1089. var aid = "layui-layer" + times;
  1090. //$('#' + aid).show();
  1091. $("#" + aid).find(".layui-layer-close").click();
  1092. }
  1093. function CloseLayerNow() {
  1094. var aid = "layui-layer" + nowtime;
  1095. //$('#' + aid).show();
  1096. $("#" + aid).find(".layui-layer-close").click();
  1097. }
  1098. function InitTelLayerList() {
  1099. var html = "";
  1100. for (var ai = 0; ai < arrLayerTime.length; ai++) {
  1101. var atime = arrLayerTime[ai];
  1102. var aid = "layui-layer" + atime;
  1103. var title = $('#' + aid + ' .layui-layer-title').text();
  1104. var sindex = title.indexOf('-');
  1105. title = title.substr(0, sindex);
  1106. html += "<dd><a href=\"javascript:ShowLayerByTimes(" + atime + ");\" ><i class=\"fa fa-phone\"></i><cite>" + title + "</cite></a></dd>";
  1107. }
  1108. $('#telLayerInfoChild').html(html);
  1109. }
  1110. function CloseOpenTel(atime) {
  1111. tellayercount--;
  1112. if (tellayercount <= 0) {
  1113. tellayercount = 0;
  1114. document.getElementById("telLayerInfo").style.display = "none";
  1115. }
  1116. document.getElementById("supLayerCount").innerHTML = tellayercount;
  1117. //var atime = layero.attr("times");
  1118. var sindex = arrLayerTime.indexOf(atime);
  1119. if (sindex > -1) {
  1120. arrLayerTime.splice(sindex, 1);
  1121. }
  1122. InitTelLayerList();
  1123. }
  1124. function OpenTelLayer(t, urlSrc) {//多窗口模式,层叠置顶
  1125. layui.use(['element', 'layer'], function () {
  1126. var element = layui.element,
  1127. layer = layui.layer; //获得layer模块
  1128. layer.open({
  1129. type: 2 //此处以iframe举例
  1130. , title: t
  1131. , area: ['80%', '80%']
  1132. , shade: 0
  1133. , maxmin: true
  1134. , content: urlSrc
  1135. , zIndex: layer.zIndex //重点1
  1136. , success: function (layero) {
  1137. tellayercount++;
  1138. document.getElementById("supLayerCount").innerHTML = tellayercount;
  1139. document.getElementById("telLayerInfo").style.display = "inline";
  1140. layer.setTop(layero); //重点2
  1141. nowtime = layero.attr("times");
  1142. arrLayerTime.push(layero.attr("times"));
  1143. InitTelLayerList();
  1144. }, min: function (layero) {
  1145. //setTimeout(function () { layero.css({ left:"180px",width:"280px" }); }, 0);
  1146. //alert(layero.attr("times"));
  1147. //var w = document.body.clientWidth;
  1148. //var rowcount = w / 181;
  1149. //for (var i = 0; i < arrLayerTime.length; i++) {
  1150. // var atime = arrLayerTime[i];
  1151. // var id = "layui-layer" + atime;
  1152. // var obj = document.getElementById(id);
  1153. //}
  1154. var atime = layero.attr("times");
  1155. var aid = "layui-layer" + atime;
  1156. //$('#' + aid).hide();
  1157. setTimeout(function () { layero.css({ width: "0px", height: "0px" }); }, 0);
  1158. }, cancel: function (index, layero) {
  1159. CloseOpenTel(layero.attr("times"));
  1160. }
  1161. });
  1162. });
  1163. }
  1164. function tabMove() {
  1165. $(window).on("resize", function (event) {
  1166. var topTabsBox = $("#top_tabs_box"),
  1167. topTabsBoxWidth = $("#top_tabs_box").width(),
  1168. topTabs = $("#top_tabs"),
  1169. topTabsWidth = $("#top_tabs").width(),
  1170. tabLi = topTabs.find("li.layui-this"),
  1171. top_tabs = document.getElementById("top_tabs"),
  1172. event = event || window.event;
  1173. try {
  1174. if (topTabsWidth > topTabsBoxWidth) {
  1175. if (tabLi.position().left > topTabsBoxWidth || tabLi.position().left + topTabsBoxWidth > topTabsWidth) {
  1176. topTabs.css("left", topTabsBoxWidth - topTabsWidth);
  1177. } else {
  1178. topTabs.css("left", -tabLi.position().left);
  1179. }
  1180. //拖动效果
  1181. var flag = false;
  1182. var cur = {
  1183. x: 0,
  1184. y: 0
  1185. }
  1186. var nx, dx, x;
  1187. function down() {
  1188. flag = true;
  1189. var touch;
  1190. if (event.touches) {
  1191. touch = event.touches[0];
  1192. } else {
  1193. touch = event;
  1194. }
  1195. cur.x = touch.clientX;
  1196. dx = top_tabs.offsetLeft;
  1197. }
  1198. function move() {
  1199. var self = this;
  1200. if (flag) {
  1201. window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
  1202. var touch;
  1203. if (event.touches) {
  1204. touch = event.touches[0];
  1205. } else {
  1206. touch = event;
  1207. }
  1208. nx = touch.clientX - cur.x;
  1209. x = dx + nx;
  1210. if (x > 0) {
  1211. x = 0;
  1212. } else {
  1213. if (x < topTabsBoxWidth - topTabsWidth) {
  1214. x = topTabsBoxWidth - topTabsWidth;
  1215. } else {
  1216. x = dx + nx;
  1217. }
  1218. }
  1219. top_tabs.style.left = x + "px";
  1220. //阻止页面的滑动默认事件
  1221. document.addEventListener("touchmove", function () {
  1222. event.preventDefault();
  1223. }, false);
  1224. }
  1225. }
  1226. //鼠标释放时候的函数
  1227. function end() {
  1228. flag = false;
  1229. }
  1230. //pc端拖动效果
  1231. topTabs.on("mousedown", down);
  1232. topTabs.on("mousemove", move);
  1233. $(document).on("mouseup", end);
  1234. //移动端拖动效果
  1235. topTabs.on("touchstart", down);
  1236. topTabs.on("touchmove", move);
  1237. topTabs.on("touchend", end);
  1238. } else {
  1239. //移除pc端拖动效果
  1240. topTabs.off("mousedown", down);
  1241. topTabs.off("mousemove", move);
  1242. topTabs.off("mouseup", end);
  1243. //移除移动端拖动效果
  1244. topTabs.off("touchstart", down);
  1245. topTabs.off("touchmove", move);
  1246. topTabs.off("touchend", end);
  1247. topTabs.removeAttr("style");
  1248. return false;
  1249. }
  1250. }
  1251. catch (e) {
  1252. alert(e.message);
  1253. }
  1254. }).resize();
  1255. }
  1256. var tabFilter, menu = [], liIndex, curNav, delMenu,
  1257. changeRefreshStr = window.sessionStorage.getItem("changeRefresh");
  1258. //layui.use(['layer', 'jquery'], function () {
  1259. // var form = layui.form,
  1260. // layer = parent.layer === undefined ? layui.layer : parent.layer,
  1261. // $ = layui.jquery;
  1262. layui.use('element', function () {
  1263. var element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
  1264. //var element = layui.element,
  1265. // $ = layui.$,
  1266. // layId,
  1267. // Tab = function () {
  1268. // this.tabConfig = {
  1269. // openTabNum: undefined, //最大可打开窗口数量
  1270. // tabFilter: "bodyTab", //添加窗口的filter
  1271. // url: undefined //获取菜单json地址
  1272. // }
  1273. // };
  1274. /*
  1275. //通过title获取lay-id
  1276. Tab.prototype.getLayId = function (title) {
  1277. $(".layui-tab-title.top_tab li").each(function () {
  1278. if ($(this).find("cite").text() == title) {
  1279. layId = $(this).attr("lay-id");
  1280. }
  1281. })
  1282. return layId;
  1283. }
  1284. //通过title判断tab是否存在
  1285. Tab.prototype.hasTab = function (title) {
  1286. var tabIndex = -1;
  1287. $(".layui-tab-title.top_tab li").each(function () {
  1288. if ($(this).find("cite").text() == title) {
  1289. tabIndex = 1;
  1290. }
  1291. })
  1292. return tabIndex;
  1293. }
  1294. function AddTabPage(aid, aicon, nullicon, aname, urlSrc) {
  1295. var timeno = new Date().getTime();
  1296. var tabIndex = -1;
  1297. $(".layui-tab-title.top_tab li").each(function () {
  1298. if ($(this).attr("lay-id") == 'maintab_' + aid + '') {
  1299. tabIndex = 1;
  1300. }
  1301. })
  1302. if (tabIndex != 1) {
  1303. //新增一个Tab项
  1304. element.tabAdd('bodyTab', {
  1305. title: '<i class=\"' + aicon + '\">' + nullicon + '</i> <cite openid=\"' + aid + '\">' + aname + '</cite><i class=\"layui-icon layui-unselect layui-tab-close\">&#x1006;</i>'
  1306. , content: '<iframe id=\"mainframe_' + aid + '\" src=\"' + urlSrc + '?timeno=' + timeno + '\"></iframe>'
  1307. , id: 'maintab_' + aid + '' //实际使用一般是规定好的id,这里以时间戳模拟下
  1308. })
  1309. }
  1310. element.tabChange('bodyTab', 'maintab_' + aid + '');
  1311. tabMove(); //顶部窗口是否可滚动
  1312. }
  1313. */
  1314. var pwd = $("#Password").val();
  1315. if (checkStrong(pwd) == "0" || checkStrong(pwd) == "1") {
  1316. layer.open({
  1317. content: '密码等级太低,请先修改密码'
  1318. , btn: ['好的', '稍后再去']
  1319. , yes: function (index, layero) {
  1320. layer.close(index);
  1321. //AddTabPage('editpsd', 'fa fa-lock', '', '修改密码','/SystemManage/UserPwdEdit');
  1322. document.getElementById("mainframe").src = "/SystemManage/UserPwdEdit";
  1323. }
  1324. });
  1325. }
  1326. $("#userpwd").click(function () {
  1327. document.getElementById("mainframe").src = "/SystemManage/UserPwdEdit";
  1328. //AddTabPage('editpsd', 'fa fa-lock', '', '修改密码', '/SystemManage/UserPwdEdit');
  1329. });
  1330. $("#customerphone").click(function () {
  1331. document.getElementById("mainframe").src = "/HrEmployeeBase/EmployeeSearchList";
  1332. //AddTabPage('emplist', 'layui-icon layui-icon-form', '&#xe63c;', '通讯录', '/HrEmployeeBase/EmployeeSearchList');
  1333. //layer.open({
  1334. // type: 2,
  1335. // anim: 4,
  1336. // scrollbar: false,
  1337. // content: '/HrEmployeeBase/EmployeeSearchList',
  1338. // area: ['1000px', '500px'],
  1339. // id: 'UserInfo',
  1340. // title: '通讯录'
  1341. //});
  1342. });
  1343. $("#userinfo").click(function () {
  1344. document.getElementById("mainframe").src = "/SystemManage/UserView";
  1345. //AddTabPage('userinfo', 'fa fa-user', '', '个人信息', '/SystemManage/UserView');
  1346. //layer.open({
  1347. // type: 2,
  1348. // anim: 4,
  1349. // scrollbar: false,
  1350. // content: '/SystemManage/UserView',
  1351. // area: ['800px', '500px'],
  1352. // id: 'UserInfo',
  1353. // title: '个人信息'
  1354. //});
  1355. });
  1356. //转主页
  1357. $(".logo").on("click", function () { //此处添加禁止连续点击刷新一是为了降低服务器压力,另外一个就是为了防止超快点击造成chrome本身的一些js文件的报错(不过貌似这个问题还是存在,不过概率小了很多)
  1358. //var tabIndex = -1;
  1359. //$(".layui-tab-title.top_tab li").each(function () {
  1360. // if ($(this).attr("lay-id") == 'maintab_index') {
  1361. // tabIndex = 1;
  1362. // }
  1363. //})
  1364. //if (tabIndex != 1) {
  1365. // var timeno = new Date().getTime();
  1366. // //新增一个Tab项
  1367. // element.tabAdd('bodyTab', {
  1368. // title: '<i class=\"layui-icon\">&#xe68e;</i> <cite openid=\"-1\">首页</cite>'
  1369. // , content: '<iframe id=\"mainframe_index\" src=\"/Main/IndexCenter?timeno=' + timeno + '\"></iframe>'
  1370. // , id: 'maintab_index' //实际使用一般是规定好的id,这里以时间戳模拟下
  1371. // })
  1372. //}
  1373. //element.tabChange('bodyTab', 'maintab_index');
  1374. //tabMove(); //顶部窗口是否可滚动
  1375. var timeno = new Date().getTime();
  1376. document.getElementById("mainframe").src = "/Main/IndexCenter?timeno=" + timeno;
  1377. })
  1378. //删除tab
  1379. //$("body").on("click", ".top_tab li i.layui-tab-close", function () {
  1380. // try {
  1381. // //删除tab后重置session中的menu和curmenu
  1382. // liIndex = $(this).parent("li").index();
  1383. // element.tabDelete("bodyTab", $(this).parent("li").attr("lay-id")).init();
  1384. // tabMove();
  1385. // }
  1386. // catch (e) { }
  1387. //})
  1388. //刷新当前
  1389. //$(".refresh").on("click", function () { //此处添加禁止连续点击刷新一是为了降低服务器压力,另外一个就是为了防止超快点击造成chrome本身的一些js文件的报错(不过貌似这个问题还是存在,不过概率小了很多)
  1390. // try {
  1391. // if ($(this).hasClass("refreshThis")) {
  1392. // $(this).removeClass("refreshThis");
  1393. // $(".clildFrame .layui-tab-item.layui-show").find("iframe")[0].contentWindow.location.reload();
  1394. // setTimeout(function () {
  1395. // $(".refresh").addClass("refreshThis");
  1396. // }, 2000)
  1397. // } else {
  1398. // layer.msg("您点击的速度超过了服务器的响应速度,还是等两秒再刷新吧!");
  1399. // }
  1400. // }
  1401. // catch (e) { }
  1402. //})
  1403. //关闭其他
  1404. //$(".closePageOther").on("click", function () {
  1405. // try {
  1406. // if ($("#top_tabs li").length > 2 && $("#top_tabs li.layui-this cite").text() != "首页") {
  1407. // $("#top_tabs li").each(function () {
  1408. // if ($(this).attr("lay-id") != 'maintab_index' && !$(this).hasClass("layui-this")) {
  1409. // element.tabDelete("bodyTab", $(this).attr("lay-id")).init();
  1410. // }
  1411. // })
  1412. // } else if ($("#top_tabs li.layui-this cite").text() == "首页" && $("#top_tabs li").length > 1) {
  1413. // $("#top_tabs li").each(function () {
  1414. // if ($(this).attr("lay-id") != 'maintab_index' && !$(this).hasClass("layui-this")) {
  1415. // element.tabDelete("bodyTab", $(this).attr("lay-id")).init();
  1416. // }
  1417. // })
  1418. // } else {
  1419. // layer.msg("没有可以关闭的窗口了");
  1420. // }
  1421. // //渲染顶部窗口
  1422. // tabMove();
  1423. // }
  1424. // catch (e) { }
  1425. //})
  1426. //关闭全部
  1427. //$(".closePageAll").on("click", function () {
  1428. // try {
  1429. // if ($("#top_tabs li").length > 1) {
  1430. // $("#top_tabs li").each(function () {
  1431. // if ($(this).attr("lay-id") != 'maintab_index') {
  1432. // element.tabDelete("bodyTab", $(this).attr("lay-id")).init();
  1433. // }
  1434. // })
  1435. // } else {
  1436. // layer.msg("没有可以关闭的窗口了");
  1437. // }
  1438. // //渲染顶部窗口
  1439. // tabMove();
  1440. // }
  1441. // catch (e) { }
  1442. //})
  1443. //通过title获取lay-id
  1444. //Tab.prototype.getLayId = function (title) {
  1445. // $(".layui-tab-title.top_tab li").each(function () {
  1446. // if ($(this).find("cite").text() == title) {
  1447. // layId = $(this).attr("lay-id");
  1448. // }
  1449. // })
  1450. // return layId;
  1451. //}
  1452. //监听导航点击
  1453. element.on('nav(demo)', function (elem) {
  1454. //console.log(elem)
  1455. // layer.msg(elem.text());
  1456. var urlSrc = $(this).find("a").attr("data-url");
  1457. var aname = $(this).find("a").attr("aname");
  1458. var aid = $(this).find("a").attr("id");
  1459. var aicon = $(this).find("a").attr("aicon");
  1460. var nullicon = "";
  1461. if (aicon == "") {
  1462. aicon = "layui-icon layui-icon-tabs";
  1463. nullicon = "&#xe62a;";
  1464. }
  1465. var cssClass = $(this).find("a").find("i").attr("class");
  1466. if (cssClass != null && (cssClass.indexOf("fa-weibo") > 0 || cssClass.indexOf("fa-weixin")) && cssClass.indexOf("selectClass") <= 0) {
  1467. alert("未签入!")
  1468. return;
  1469. }
  1470. var timeno = new Date().getTime();
  1471. if (urlSrc != "") {
  1472. if (urlSrc == "/ScreenDisplay/MainScreen") {
  1473. OpenOtherForm("郑州地铁客服中心大屏数据展示", "http://" + window.location.host + urlSrc + "/");
  1474. }
  1475. else {
  1476. if (urlSrc.indexOf("CallRecord/CallScreen") >= 0) {
  1477. //OpenTelLayer('18695836988-来电', urlSrc);
  1478. document.getElementById("mainframe").src = urlSrc;
  1479. }
  1480. else {
  1481. if (urlSrc.indexOf('?') < 0) {
  1482. document.getElementById("mainframe").src = urlSrc + "?timeno=" + timeno + "";
  1483. //var tabIndex = -1;
  1484. //$(".layui-tab-title.top_tab li").each(function () {
  1485. // if ($(this).attr("lay-id") == 'maintab_' + aid + '') {
  1486. // tabIndex = 1;
  1487. // }
  1488. //})
  1489. //if (tabIndex != 1) {
  1490. // //新增一个Tab项
  1491. // element.tabAdd('bodyTab', {
  1492. // title: '<i class=\"' + aicon + '\">' + nullicon + '</i> <cite openid=\"' + aid + '\">' + aname + '</cite><i class=\"layui-icon layui-unselect layui-tab-close\">&#x1006;</i>'
  1493. // , content: '<iframe id=\"mainframe_' + aid + '\" scrolling=\"auto\" src=\"' + urlSrc + '?timeno=' + timeno + '\"></iframe>'
  1494. // , id: 'maintab_' + aid + '' //实际使用一般是规定好的id,这里以时间戳模拟下
  1495. // })
  1496. //}
  1497. //element.tabChange('bodyTab', 'maintab_' + aid + '');
  1498. //tabMove(); //顶部窗口是否可滚动
  1499. }
  1500. else {
  1501. document.getElementById("mainframe").src = urlSrc + "&timeno=" + timeno + "";
  1502. //try {
  1503. // var tabIndex = -1;
  1504. // $(".layui-tab-title.top_tab li").each(function () {
  1505. // if ($(this).attr("lay-id") == 'maintab_' + aid + '') {
  1506. // tabIndex = 1;
  1507. // }
  1508. // })
  1509. // if (tabIndex != 1) {
  1510. // //新增一个Tab项
  1511. // element.tabAdd('bodyTab', {
  1512. // title: '<i class=\"' + aicon + '\">' + nullicon + '</i> <cite openid=\"' + aid + '\">' + aname + '</cite><i class=\"layui-icon layui-unselect layui-tab-close\">&#x1006;</i>'
  1513. // , content: '<iframe id=\"mainframe_' + aid + '\" scrolling=\"auto\" src=\"' + urlSrc + '&timeno=' + timeno + '\"></iframe>'
  1514. // , id: 'maintab_' + aid + '' //实际使用一般是规定好的id,这里以时间戳模拟下
  1515. // })
  1516. // }
  1517. // element.tabChange('bodyTab', 'maintab_' + aid + '');
  1518. // //setTimeout(alert(1), 5000);
  1519. // tabMove(); //顶部窗口是否可滚动
  1520. // //if (aid == "2" || aid == "3") {
  1521. // // alert("加载完成");
  1522. // //}
  1523. //}
  1524. //catch (e) {
  1525. // alert(e.message);
  1526. //}
  1527. }
  1528. }
  1529. }
  1530. //if (urlSrc.indexOf('?') < 0) {
  1531. // document.getElementById("mainframe").src = urlSrc + "?timeno=" + timeno + "";
  1532. //}
  1533. //else {
  1534. // document.getElementById("mainframe").src = urlSrc + "&timeno=" + timeno + "";
  1535. //}
  1536. }
  1537. });
  1538. });
  1539. $("#navBar .layui-nav-item").click(function () {
  1540. $("#navBar .layui-nav-item").removeClass("layui-nav-itemed");
  1541. $("#navBar .layui-nav-item").removeClass("layui-this");
  1542. if ($(this).has('dl').length) {//如果有子菜单,显示下拉样式
  1543. $(this).addClass("layui-nav-itemed");
  1544. } else {//如果没有子菜单,显示菜单项样式
  1545. $(this).addClass("layui-this");
  1546. }
  1547. });
  1548. </script>
  1549. </body>
  1550. <script type="text/javascript">
  1551. ///获取微信消息
  1552. ///1、微信 2、微博
  1553. function GetWxMessageCount(messageType, className) {
  1554. $.ajax({
  1555. url: "/OtherPage/GetWebChartCount",
  1556. type: "get",
  1557. contentType: "application/json",
  1558. dataType: "text",
  1559. cache: false,
  1560. data: { "pageType": messageType },
  1561. success: function (result, status) {
  1562. if (status) {
  1563. $(className).html(result);
  1564. }
  1565. }
  1566. });
  1567. }
  1568. //微信
  1569. var wX;
  1570. function wXTimedCount() {
  1571. GetWxMessageCount(1, ".wXCount");
  1572. wX = setTimeout("wXTimedCount()", 5000)
  1573. }
  1574. $(".btnWX").click(function () {
  1575. var rgs = $(".fa-weixin").hasClass("defaultClass");
  1576. if (rgs) {
  1577. $(".fa-weixin").removeClass("defaultClass");
  1578. $(".fa-weixin").addClass("selectClass");
  1579. $(".wXCount").css("display", "block");
  1580. wXTimedCount();
  1581. }
  1582. else {
  1583. $(".fa-weixin").removeClass("selectClass");
  1584. $(".fa-weixin").addClass("defaultClass");
  1585. $(".wXCount").css("display", "none");
  1586. clearTimeout(wX);
  1587. }
  1588. });
  1589. //微博
  1590. var wB;
  1591. function wBTimedCount() {
  1592. GetWxMessageCount(2, ".wBCount");
  1593. wB = setTimeout("wBTimedCount()", 5000)
  1594. }
  1595. $(".btnWB").click(function () {
  1596. var rgs = $(".fa-weibo").hasClass("defaultClass");
  1597. if (rgs) {
  1598. $(".fa-weibo").removeClass("defaultClass");
  1599. $(".fa-weibo").addClass("selectClass");
  1600. $(".wBCount").css("display", "block");
  1601. wBTimedCount();
  1602. }
  1603. else {
  1604. $(".fa-weibo").removeClass("selectClass");
  1605. $(".fa-weibo").addClass("defaultClass");
  1606. $(".wBCount").css("display", "none");
  1607. clearTimeout(wB);
  1608. }
  1609. });
  1610. //待办工单
  1611. function MyOrderCount() {
  1612. try
  1613. {
  1614. //补录工单
  1615. if ($(".orderNeedCount") != undefined) {
  1616. $.ajax({
  1617. url: "/OtherPage/GetMyOrderNeedCount/",
  1618. type: "get",
  1619. contentType: "application/json",
  1620. dataType: "text",
  1621. cache: false,
  1622. data: null,
  1623. success: function (result, status) {
  1624. if (status) {
  1625. $(".orderNeedCount").html(result);
  1626. }
  1627. }
  1628. });
  1629. }
  1630. //微博工单//orderCountWb
  1631. //if ($(".orderCountWb") != undefined) {
  1632. // $.ajax({
  1633. // url: "/OtherPage/GetMyOrderCountWb/",
  1634. // type: "get",
  1635. // contentType: "application/json",
  1636. // dataType: "text",
  1637. // cache: false,
  1638. // data: null,
  1639. // success: function (result, status) {
  1640. // if (status) {
  1641. // $(".orderCountWb").html(result);
  1642. // }
  1643. // }
  1644. // });
  1645. //}
  1646. //待办工单
  1647. if ($(".orderCount") != undefined) {
  1648. $.ajax({
  1649. url: "/OtherPage/GetMyOrderCount/",
  1650. type: "get",
  1651. contentType: "application/json",
  1652. dataType: "text",
  1653. cache: false,
  1654. data: null,
  1655. success: function (result, status) {
  1656. if (status) {
  1657. $(".orderCount").html(result);
  1658. }
  1659. }
  1660. });
  1661. }
  1662. if ($(".orderCount") != undefined || $(".orderNeedCount") != undefined)
  1663. {
  1664. var totalOrderCount = 0;
  1665. var myOrderCount = 0;
  1666. var myNeedCount = 0;
  1667. var myorderCountWb = 0;
  1668. if ($(".orderCount") != undefined)
  1669. {
  1670. myOrderCount = $(".orderCount").html();
  1671. }
  1672. if ($(".orderNeedCount") != undefined) {
  1673. myNeedCount = $(".orderNeedCount").html();
  1674. }
  1675. //orderCountWb
  1676. //if ($(".orderCountWb") != undefined) {
  1677. // myorderCountWb = $(".orderCountWb").html();
  1678. //}
  1679. totalOrderCount = parseInt(myOrderCount) + parseInt(myNeedCount);
  1680. $(".totalOrderCount").html(totalOrderCount);
  1681. setTimeout("MyOrderCount()", 5000);
  1682. }
  1683. }
  1684. catch(e)
  1685. {
  1686. }
  1687. }
  1688. //获取待办工单数量
  1689. MyOrderCount();
  1690. </script>
  1691. </html>