地铁二期项目正式开始

Index.cshtml 84KB

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