地铁二期项目正式开始

Index.cshtml 68KB

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