地铁二期项目正式开始

Index.cshtml 68KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864
  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. debugger
  466. var usercode = document.getElementById("txtLabourwork").value;
  467. var extnumber = document.getElementById("txtPhoneNum").value;
  468. var typed = document.getElementById("HdIswin"); //是否是坐席用户
  469. //var typed.value = true; //是否是坐席用户
  470. if (typed.value != "true") {
  471. var timeno = new Date().getTime();
  472. /*2020-09-24miaofuhao注释*/
  473. if (!$(".fa-phone").hasClass("selectClass")) {
  474. Connect()
  475. } else {
  476. obj = {};
  477. obj.Type = "Logout";
  478. obj.AgentID = usercode;
  479. obj.AgentExten = extnumber;
  480. Send();
  481. //layer.msg('您已签入,无需重新签入', { icon: 5, time: 2000 });
  482. }
  483. /*2020-09-24miaofuhao注释*/
  484. InitPhoneBack();
  485. }
  486. else {
  487. document.getElementById("spanServerRes").innerHTML = "非坐席登录";
  488. }
  489. }
  490. function InitPhoneBack() {
  491. Initialize();
  492. }
  493. function Initialize() {
  494. try {
  495. 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);
  496. }
  497. catch (e) {
  498. document.getElementById("spanServerRes").innerHTML = e.message;
  499. }
  500. }
  501. //处理键盘事件 禁止后退键(Backspace)密码或单行、多行文本框除外
  502. function banBackSpace(e) {
  503. try {
  504. var ev = e || window.event; //获取event对象
  505. var obj = ev.target || ev.srcElement; //获取事件源
  506. var t = obj.type || obj.getAttribute('type'); //获取事件源类型
  507. //获取作为判断条件的事件类型
  508. var vReadOnly = obj.getAttribute('readonly');
  509. //处理null值情况
  510. vReadOnly = (vReadOnly == "") ? false : vReadOnly;
  511. //当敲Backspace键时,事件源类型为密码或单行、多行文本的,
  512. //并且readonly属性为true或enabled属性为false的,则退格键失效
  513. var flag1 = (ev.keyCode == 8 && (t == "password" || t == "text" || t == "textarea")
  514. && vReadOnly == "readonly") ? true : false;
  515. //当敲Backspace键时,事件源类型非密码或单行、多行文本的,则退格键失效
  516. var flag2 = (ev.keyCode == 8 && t != "password" && t != "text" && t != "textarea")
  517. ? true : false;
  518. //判断
  519. if (flag2) {
  520. return false;
  521. }
  522. if (flag1) {
  523. return false;
  524. }
  525. }
  526. catch (e) {
  527. return false;
  528. }
  529. }
  530. </script>
  531. <script type="text/javascript">
  532. function setLinkStatus(str) {
  533. //var imgServerState = document.getElementById("imgServerState");
  534. if (str == "True") {
  535. $('#imgServerState').attr('src', '/Content/images/server1.png');
  536. $('#imgServerState').attr('alt', '签入');
  537. // imgServerState.src = "/Content/images/server1.png";
  538. //imgServerState.alt = "签入";
  539. }
  540. else {
  541. $('#imgServerState').attr('src', '/Content/images/server0.png');
  542. $('#imgServerState').attr('alt', '未签入');
  543. //imgServerState.src = "/Content/images/server0.png";
  544. //imgServerState.alt = "未签入";
  545. }
  546. }
  547. function setAgentStatus(str) {
  548. //var imgAgentState = document.getElementById("imgAgentState");
  549. switch (str) {
  550. case "离席":
  551. $('#imgAgentState').attr('src', '/Content/images/zx2.png');
  552. $('#imgAgentState').attr('alt', '未登录');
  553. //imgAgentState.src = "/Content/images/zx2.png";
  554. //imgAgentState.alt = "未登录";
  555. break;
  556. case "空闲":
  557. $('#imgAgentState').attr('src', '/Content/images/zx1.png');
  558. $('#imgAgentState').attr('alt', '空闲');
  559. //imgAgentState.src = "/Content/images/zx1.png";
  560. //imgAgentState.alt = "空闲";
  561. break;
  562. case "忙":
  563. $('#imgAgentState').attr('src', '/Content/images/zx3.png');
  564. $('#imgAgentState').attr('alt', '忙');
  565. //imgAgentState.src = "/Content/images/zx3.png";
  566. //imgAgentState.alt = "忙";
  567. break;
  568. case "业务处理":
  569. $('#imgAgentState').attr('src', '/Content/images/zx4.png');
  570. $('#imgAgentState').attr('alt', '业务处理');
  571. //imgAgentState.src = "/Content/images/zx4.png";
  572. //imgAgentState.alt = "业务处理";
  573. break;
  574. }
  575. }
  576. //变换图标
  577. function Form_setWinfromenble(bl) {
  578. }
  579. function Form_setHW(bl) {
  580. if (bl == "True") {
  581. document.getElementById("txt_1").value = "1";
  582. document.getElementById("i_1").style.color = "#395E67";
  583. }
  584. else {
  585. document.getElementById("i_1").style.color = "#cccccc";
  586. document.getElementById("txt_1").value = "0";
  587. }
  588. }
  589. function Form_setZX(bl) {
  590. if (bl == "True") {
  591. document.getElementById("txt_7").value = "1";
  592. document.getElementById("i_7").style.color = "#395E67";
  593. }
  594. else {
  595. document.getElementById("i_7").style.color = "#cccccc";
  596. document.getElementById("txt_7").value = "0";
  597. }
  598. }
  599. function Form_setZM(bl) {
  600. if (bl == "True") {
  601. document.getElementById("txt_8").value = "1";
  602. document.getElementById("i_8").style.color = "#395E67";
  603. }
  604. else {
  605. document.getElementById("i_8").style.color = "#cccccc";
  606. document.getElementById("txt_8").value = "0";
  607. }
  608. }
  609. function OptNull() {
  610. }
  611. function OptNullByName(name) {
  612. var obj = document.getElementById(name);
  613. obj.src = "../images/totle/" + name + "3.png";
  614. obj.attributes["ostate"].value = 0;
  615. //obj.ostate = 0;
  616. obj.style.cursor = "default";
  617. }
  618. function OptByName(name) {
  619. var obj = document.getElementById(name);
  620. obj.src = "../images/totle/" + name + "1.png";
  621. obj.attributes["ostate"].value = 1;
  622. //obj.ostate = 1;
  623. obj.style.cursor = "hand";
  624. }
  625. </script>
  626. <style type="text/css">
  627. .defaultClass {
  628. color: #ffffff;
  629. }
  630. .selectClass {
  631. color: #83d944;
  632. }
  633. </style>
  634. </head>
  635. <body onload="Init()" class="main_body blue" onbeforeunload="closeSocket()">
  636. <div class="layui-layout layui-layout-admin">
  637. <!-- 顶部 -->
  638. <div class="layui-header header">
  639. <div class="layui-main mag0">
  640. <a class="logo" style=" text-align:left; padding-left:15px;">全媒体客服平台<img style="height:55px; display:none;"
  641. src="/Content/images/logo1.png" /><span>&nbsp;&nbsp;</span></a>
  642. <!-- 功能模块Id -->
  643. <input id="HdModuleFunIdCount" type="hidden" value="0" />
  644. <input id="ismonitoring" type="hidden" value="false" />
  645. <input id="HdIswin" type="hidden" value="@Model.IsSeat" />
  646. <input id="UserID" type="hidden" value="@Model.UserAccountModel.F_UserId" />
  647. <input id="Password" type="hidden" value="@Model.UserAccountModel.F_Password" />
  648. <input id="hfUserId" type="hidden" value="@Model.UserAccountModel.F_UserId" />
  649. <iframe src="/Main/iframeocx" name="iframeocx" frameborder="0" height="0" width="0"
  650. style="display: none;"></iframe>
  651. @*--(用于初始化用的信息)--*@
  652. <input id="txtMostlyAddress" type="hidden" value="@Model.CTIserverIP" />@*--(主用CTI服务器IP)*@
  653. <input id="ServerType" type="hidden" value="20" />@*--(服务器类型)--*@
  654. <input id="txtLabourNo" type="hidden"
  655. value="@Model.UserAccountModel.F_WorkNumber" />@*--<%=Request.Cookies["ID"].Value %>(工号)--*@
  656. <input id="pwd" type="hidden" value="" />@*--<%=Request.Cookies["ID"].Value %>(密码)--*@
  657. <input id="txtPhoneID" type="hidden" value="@Model.UserAccountModel.F_UserCode" />@*--(通讯进程号)--*@
  658. <input id="txtSubordinationAddress" type="hidden" value="@Model.CTIserverIP" />@*--(备用CTI服务器IP)--*@
  659. <input id="txtIsAgent" type="hidden" value="@Model.UserAccountModel.F_SeatFlag" />
  660. <!-- 是否具有话务功能,是否坐席登录 -->
  661. <input id="txtAgentId" type="hidden" value="@Model.UserAccountModel.F_UserId" /><!-- 坐席ID -->
  662. <input id="txtAgentName" type="hidden" value="@Model.UserAccountModel.F_UserName" />
  663. <input id="txtAgentRight" type="hidden" value="@Model.UserAccountModel.F_SeatRight" />
  664. <input id="txtAgentGroup" type="hidden" value="@Model.UserAccountModel.F_GroupId" />
  665. <input id="txtServerPort" type="hidden" value="@Model.CTIserverPort" />
  666. <!-- 坐席权限 -->
  667. @*--(用于登录的信息)--*@
  668. <input id="SeatType" type="hidden"
  669. value="@Model.UserAccountModel.F_SeatRight" />@*--<%=Request.Cookies["SkillSet"].Value %>(坐席类型)--*@
  670. <input id="txtPhoneNum" type="hidden"
  671. value="@Model.UserAccountModel.F_ExtensionNumber" />@*--<%=Request.Cookies["ExtNum"].Value %>(分机号)--*@
  672. <input id="keepcall" type="hidden" value="" />
  673. @*--(keep号码)--*@
  674. <input id="txtLabourwork" type="hidden" value="@Model.UserAccountModel.F_UserCode" />@*--(登录工号)--*@
  675. <input id="passwd" type="hidden" value="" />@*--(登录坐席密码)--*@
  676. <input id="hjbh" type="hidden" value="" />@*--(外乎呼叫编号)--*@
  677. <input id="CallHjbh" type="hidden" value="" />@*--(来电呼叫编号)--*@
  678. <input id="forZYnumber" type="hidden" value="" />@*--(用来存储来电号码--*@
  679. <input id="callnum" type="hidden" value="" />@*--(来电主叫号码)--*@
  680. <ul class="layui-nav topLevelMenus" pc>
  681. <li class="layui-nav-item" onclick="AgentQR()" data-menu="contentManagement" title="语音签入">
  682. <input id="txt_1" type="hidden" value="0" />
  683. <i id="i_1" class="fa fa-phone defaultClass" data-icon=""></i>
  684. <p>语音签入</p>
  685. </li>
  686. <li class="layui-nav-item" data-menu="memberCenter" pc>
  687. <a>
  688. <i id="i_2" class="layui-icon" style="color:#ffffff;" data-icon="&#xe611;">&#xe611;</i>
  689. <p>信息</p>
  690. </a>
  691. </li>
  692. <li class="layui-nav-item btnWX" data-menu="systemeSttings" pc>
  693. <a>
  694. <i id="i_3" class="fa fa-weixin defaultClass" data-icon=""></i>
  695. <p>微信</p>
  696. </a>
  697. </li>
  698. <li class="layui-nav-item btnWB" data-menu="seraphApi" pc>
  699. <a>
  700. <i id="i_4" class="fa fa-weibo defaultClass" data-icon=""></i>
  701. <p>微博</p>
  702. </a>
  703. </li>
  704. @* <li class="layui-nav-item" pc>
  705. <a>
  706. <i id="i_5" class="fa fa-th-large" style=" color:#cccccc;" data-icon=""></i>
  707. </a>
  708. </li>
  709. <li class="layui-nav-item" pc>
  710. <a><i id="i_6" class="fa fa-envelope-o" style=" color:#cccccc;" data-icon=""></i></a>
  711. </li> *@
  712. <li class="layui-nav-item" pc>
  713. <input id="txt_7" type="hidden" value="0" />
  714. <a onclick="AgentFree()" title="坐席就绪">
  715. <i id="i_7" class="fa fa-play defaultClass" data-icon=""></i></a>
  716. <p>就绪</p>
  717. </li>
  718. <li class="layui-nav-item" pc>
  719. <input id="txt_8" type="hidden" value="0" />
  720. <a onclick="AgentBusy()" title="坐席小休">
  721. <i id="i_8" class="fa fa-pause defaultClass" data-icon=""></i>
  722. <p>小休</p>
  723. </a>
  724. </li>
  725. </ul>
  726. <!-- 顶部右侧菜单 -->
  727. <ul class="layui-nav top_menu">
  728. <li class="layui-nav-item">
  729. <a id="telLayerInfo" style=" display:none;"><img src="/Content/images/phone128.png"
  730. class="layui-nav-img userAvatar" width="35" height="35"><cite class="adminName">未处理来电</cite><sup
  731. id="supLayerCount" class="layui-badge">0</sup>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
  732. <dl id="telLayerInfoChild" class="layui-nav-child"></dl>
  733. </li>
  734. <!--软电话-->
  735. <li class="layui-nav-item " title="软电话">
  736. <i class="fa fa-whatsapp" data-method="confirmTrans" style="font-size: 25px !important;"></i>
  737. @* <cite class="adminName">软电话</cite> *@
  738. </li>
  739. <li class="layui-nav-item" title="通讯录" id="customerphone" style="margin-right: 80px;">
  740. <i class="fa fa-address-card" style="font-size: 25px !important;"></i>
  741. @* <cite class="adminName">通讯录</cite> *@
  742. </li>
  743. <li class="layui-nav-item" style="margin-right: 10px;" >
  744. <a title="小工具">
  745. <i class="layui-icon" style=" font-size: 25px !important;">&#xe631;</i>
  746. @* <cite class="adminName">小工具</cite> *@
  747. </a>
  748. <dl class="layui-nav-child">
  749. <dd>
  750. <a onclick="OpenOtherForm('周边', 'https://www.amap.com/')"><i class="fa fa-map-marker"
  751. style="font-size: 20px !important; margin-right: 5px;"></i><cite
  752. style="text-align:left">周边</cite></a>
  753. </dd>
  754. <dd>
  755. <a onclick="OpenOtherForm('线路查询', 'http://www.zzmetro.com/lines/query/line')"><i class="fa fa-plane"
  756. style="font-size: 20px !important; margin-right: 5px;"></i><cite
  757. style="text-align:left">线路查询</cite></a>
  758. </dd>
  759. <dd>
  760. <a onclick="OpenOtherForm('票价查询', 'http://www.zzmetro.com/lines/query/ticket')"><i class="fa fa-ticket"
  761. style="font-size: 20px !important; margin-right: 5px;"></i><cite
  762. style="text-align:left">票价查询</cite></a>
  763. </dd>
  764. <dd>
  765. <a onclick="OpenOtherForm('运营时间', 'http://www.zzmetro.com/lines/query/operating_hours')"><i
  766. class="fa fa-clock-o" style="font-size: 20px !important; margin-right: 5px;"></i><cite
  767. style="text-align:left">运营时间</cite></a>
  768. </dd>
  769. <dd>
  770. <a onclick="OpenOtherForm('站点查询', 'http://www.zzmetro.com/lines/query/station')"><i class="fa fa-train"
  771. style="font-size: 20px !important; margin-right: 5px;"></i><cite
  772. style="text-align:left">站点查询</cite></a>
  773. </dd>
  774. <dd>
  775. <a onclick="OpenOtherForm('快速通讯录', 'http://portal.zzmetro.com/index.php?m=content&c=txl')"><i
  776. class="fa fa-tty" style="font-size: 20px !important; margin-right: 5px;"></i><cite
  777. style="text-align:left">快速通讯录</cite></a>
  778. </dd>
  779. <dd>
  780. <a onclick="OpenOtherForm('官网入口', 'http://www.zzmetro.com/')"><i class="fa fa-internet-explorer"
  781. style="font-size: 20px !important; margin-right: 5px;"></i><cite
  782. style="text-align:left">官网入口</cite></a>
  783. </dd>
  784. <dd>
  785. <a onclick="OpenOtherForm('常见Q&A', ' /RepositoryCategory/RepositoryCategoryContentList/?dType=2')"><i
  786. class="fa fa-quora" style="font-size: 20px !important; margin-right: 5px;"></i><cite
  787. style="text-align:left">常见Q&A</cite></a>
  788. </dd>
  789. <dd>
  790. <a onclick="OpenOtherForm('常用语', ' /RepositoryCategory/RepositoryCategoryContentList/?dType=4')"><i
  791. class="fa fa-book" style="font-size: 20px !important; margin-right: 5px;"></i><cite
  792. style="text-align:left">常用语</cite></a>
  793. </dd>
  794. <dd>
  795. <a onclick="OpenOtherForm('我的常用语', ' /RepositoryCategory/RepositoryCategoryContentList/?dType=1')"><i
  796. class="fa fa-rebel" style="font-size: 20px !important; margin-right: 5px;"></i><cite
  797. style="text-align:left">我的常用语</cite></a>
  798. </dd>
  799. <dd>
  800. <a onclick="OpenOtherForm('邮箱入口', 'http://mail.zzmetro.cn/index.php')"><i class="fa fa-envelope"
  801. style="font-size: 20px !important; margin-right: 5px;"></i><cite
  802. style="text-align:left">邮箱入口</cite></a>
  803. </dd>
  804. <dd>
  805. <a onclick="OpenOtherForm('失物招领', 'https://portal.zzmetro.cn:4455/zw/loginController.do?loginSign')">
  806. <i class="fa fa-bank" style="font-size: 20px !important; margin-right: 5px;"></i>
  807. <cite style="text-align:left">失物招领</cite>
  808. </a>
  809. </dd>
  810. <dd>
  811. <a onclick="OpenOtherForm('公司内网', 'http://portal.zzmetro.cn:7819/manage/sso')">
  812. <i class="fa fa-arrows-alt" style="font-size: 20px !important; margin-right: 5px;"></i>
  813. <cite style="text-align:left">公司内网</cite>
  814. </a>
  815. </dd>
  816. <dd>
  817. <a onclick="OpenOtherForm('集团门户', 'https://portal.zzmetro.cn:4443/webcenter')">
  818. <i class="fa fa-bookmark" style="font-size: 20px !important; margin-right: 5px;"></i>
  819. <cite style="text-align:left">集团门户</cite>
  820. </a>
  821. </dd>
  822. </dl>
  823. </li>
  824. <li class="layui-nav-item" id="userInfo">
  825. <a><img src="@Model.UserAccountModel.F_HomePhone" class="layui-nav-img userAvatar" width="35"
  826. height="35"><cite class="adminName">@Model.UserAccountModel.F_UserName</cite></a>
  827. <dl class="layui-nav-child">
  828. <dd>
  829. <a id="userinfo"><i class="layui-icon">&#xe705;</i><cite>个人信息</cite></a>
  830. </dd>
  831. <dd>
  832. <a id="userpwd"><i class="layui-icon"> &#xe620;</i><cite>修改密码</cite></a>
  833. </dd>
  834. <dd>
  835. <a href="javascript:logout()" id="exitsystem"><i class="fa fa-power-off"> </i><cite>退出系统</cite></a>
  836. </dd>
  837. </dl>
  838. </li>
  839. </ul>
  840. </div>
  841. </div>
  842. <!-- 左侧导航 -->
  843. <div class="layui-side layui-bg-black">
  844. <div class="navBar layui-side-scroll" id="navBar">
  845. <ul class="layui-nav layui-nav-tree" lay-filter="demo" lay-shrink="all">
  846. @if (Model != null && Model.MenuModelList != null && Model.MenuModelList.Count > 0)
  847. {
  848. int i = 0;
  849. foreach (T_Sys_ModuleFunctions rootNode in Model.MenuModelList)
  850. {
  851. if (i == 0)
  852. {
  853. <li class="layui-nav-item layui-nav-itemed">
  854. <a data-url="@rootNode.F_OptUrl"><i class="@rootNode.F_ImgUrl"></i> @rootNode.F_Name</a>
  855. @if (rootNode.ChildMenuModelList != null && rootNode.ChildMenuModelList.Count > 0)
  856. {
  857. <dl class="layui-nav-child">
  858. @foreach (T_Sys_ModuleFunctions childNode in rootNode.ChildMenuModelList)
  859. {
  860. <dd><a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon=""
  861. data-url="@childNode.F_OptUrl">@childNode.F_Name</a></dd>
  862. }
  863. </dl>
  864. }
  865. </li>
  866. }
  867. else
  868. {
  869. <li class="layui-nav-item">
  870. @if (rootNode.F_ModuleId > 0)
  871. {
  872. <a id="@rootNode.F_FunctionId" aname="@rootNode.F_Name" aicon="@rootNode.F_ImgUrl"
  873. data-url="@rootNode.F_OptUrl">
  874. <i class="@rootNode.F_ImgUrl defaultClass"></i> @rootNode.F_Name
  875. <sup class="layui-badge @rootNode.F_ModuleCode" style="display:none;margin-left:155px;">0</sup>
  876. </a>
  877. }
  878. else
  879. {
  880. if (rootNode.F_FunctionId == 5)
  881. {
  882. <a id="@rootNode.F_FunctionId" aname="@rootNode.F_Name" aicon="@rootNode.F_ImgUrl"
  883. data-url="@rootNode.F_OptUrl"><i class="@rootNode.F_ImgUrl"></i> @rootNode.F_Name<sup
  884. style="position:inherit;margin-left:40px;" class="layui-badge totalOrderCount">0</sup></a>
  885. }
  886. else
  887. {
  888. <a id="@rootNode.F_FunctionId" aname="@rootNode.F_Name" aicon="@rootNode.F_ImgUrl"
  889. data-url="@rootNode.F_OptUrl"><i class="@rootNode.F_ImgUrl"></i> @rootNode.F_Name</a>
  890. }
  891. }
  892. @if (rootNode.ChildMenuModelList != null && rootNode.ChildMenuModelList.Count > 0)
  893. {
  894. <dl class="layui-nav-child">
  895. @foreach (T_Sys_ModuleFunctions childNode in rootNode.ChildMenuModelList)
  896. {
  897. if (childNode.F_FunctionId == 16)
  898. {
  899. <dd>
  900. <a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">
  901. @childNode.F_Name
  902. <sup class="layui-badge orderNeedCount" style="margin-left:50px;">0</sup>
  903. </a>
  904. </dd>
  905. }
  906. else if (childNode.F_FunctionId == 17)
  907. {
  908. <dd>
  909. <a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">
  910. @childNode.F_Name
  911. <sup class="layui-badge orderCount" style="margin-left:50px;">0</sup>
  912. </a>
  913. </dd>
  914. }
  915. else if (childNode.F_FunctionId == 18)
  916. {
  917. <dd>
  918. <a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">
  919. @childNode.F_Name
  920. <sup class="layui-badge orderCount" style="margin-left:50px;">0</sup>
  921. </a>
  922. </dd>
  923. }
  924. else if (childNode.F_FunctionId == 69)
  925. {
  926. <dd>
  927. <a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">
  928. @childNode.F_Name
  929. <sup class="layui-badge orderCountWb" style="margin-left:50px;">0</sup>
  930. </a>
  931. </dd>
  932. }
  933. else
  934. {
  935. <dd><a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon=""
  936. data-url="@childNode.F_OptUrl">@childNode.F_Name</a></dd>
  937. }
  938. }
  939. </dl>
  940. }
  941. </li>
  942. }
  943. i++;
  944. }
  945. }
  946. </ul>
  947. </div>
  948. </div>
  949. <!-- 右侧内容 -->
  950. <div class="layui-body layui-form">
  951. <iframe id="mainframe" src="/Main/IndexCenter"></iframe>
  952. @*<div class="layui-tab mag0" lay-filter="bodyTab" id="top_tabs_box">
  953. <div class="switchover1">
  954. <i class="switcRight layui-icon">&#xe603;</i>
  955. </div>
  956. <ul class="layui-tab-title top_tab" id="top_tabs">
  957. <li class="layui-this maintabframecss" lay-id="maintab_index"><i class="layui-icon">&#xe68e;</i> <cite
  958. openid="-1">首页</cite></li>
  959. </ul>
  960. <!--tab 滑动-->
  961. <div class="switchover">
  962. <i class="switcLeft layui-icon">&#xe602;</i>
  963. </div>
  964. <ul class="layui-nav closeBox">
  965. <li class="layui-nav-item">
  966. <a href="javascript:;"><i class="layui-icon caozuo">&#xe643;</i> 操作</a>
  967. <dl class="layui-nav-child">
  968. <dd>
  969. <a href="javascript:;" class="refresh refreshThis"><i class="layui-icon">&#x1002;</i> 刷新当前</a>
  970. </dd>
  971. <dd>
  972. <a href="javascript:;" class="closePageOther"><i class="layui-icon">&#x1007;</i> 关闭其他</a>
  973. </dd>
  974. <dd>
  975. <a href="javascript:;" class="closePageAll"><i class="layui-icon">&#x1006;</i> 关闭全部</a>
  976. </dd>
  977. </dl>
  978. </li>
  979. </ul>
  980. <div class="layui-tab-content clildFrame">
  981. <div id="mainframeTab_index" class="layui-tab-item layui-show">
  982. <iframe id="mainframe_index" src="/Main/IndexCenter"></iframe>
  983. </div>
  984. </div>
  985. </div>*@
  986. </div>
  987. <!-- 底部 -->
  988. <div class="layui-footer footer">
  989. <div style="float: left; padding-left: 8px;" id="TelState">
  990. <div style="float: left; padding-top: 4px;">
  991. 服务状态:
  992. </div>
  993. <div style="float: left; padding-top: 3px;">
  994. <img id="imgServerState" src="/Content/images/server0.png" alt="未连接" />
  995. </div>
  996. <div style="float: left; padding-top: 3px;">
  997. &nbsp;&nbsp;坐席状态:
  998. </div>
  999. <div style="float: left; padding-top: 3px;">
  1000. <img id="imgAgentState" src="/Content/images/zx2.png" alt="未登录" />
  1001. </div>
  1002. <div style="float: left; padding-top: 3px;">
  1003. &nbsp;&nbsp;排队数量:
  1004. </div>
  1005. <div style="float: left; padding-top: 3px;">
  1006. <span id="spanqueuingnum" class="layui-badge">0</span>
  1007. </div>
  1008. <div style="float: left; padding-top: 3px;">
  1009. &nbsp;&nbsp;<span id="spanServerRes" style="color: #eeeeee;"></span>
  1010. </div>
  1011. </div>
  1012. <div style="float:right;">
  1013. <p><span>© 版权所有 郑州市轨道交通</span></p>
  1014. </div>
  1015. </div>
  1016. </div>
  1017. <!-- 移动导航 -->
  1018. @*<div class="site-tree-mobile"><i class="layui-icon">&#xe602;</i></div>
  1019. <div class="site-mobile-shade"></div>*@
  1020. <script type="text/javascript">
  1021. function OpenOtherForm(title, url) {
  1022. window.open(url, title);
  1023. //top.OCX_OpenOtherForm(title, url);
  1024. }
  1025. </script>
  1026. <script src="/Content/layui/layui.js"></script>
  1027. <script src="/Content/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
  1028. @*<script type="text/javascript" src="/Content/js/index.js" charset="utf-8"></script>*@
  1029. <script type="text/javascript" src="/Content/js/cache.js"></script>
  1030. <script src="/Content/js/myindex.js" type="text/javascript" charset="utf-8"></script>
  1031. <script src="~/Content/js/passWord/pwdValueDate.js"></script>
  1032. <script>
  1033. layui.use(['layer', 'jquery'], function () {
  1034. var form = layui.form,
  1035. layer = parent.layer === undefined ? layui.layer : parent.layer,
  1036. $ = layui.jquery;
  1037. $(".fa-whatsapp").click(function () {
  1038. if ($("#HdIswin").val()) {
  1039. layer.open({
  1040. type: 2,
  1041. anim: 4,
  1042. scrollbar: false,
  1043. content: '/Main/PhoneCall',
  1044. area: ['400px', '420px'],
  1045. id: 'PhoneCall',
  1046. title: '软电话'
  1047. });
  1048. }
  1049. else {
  1050. layer.msg('无权限', { icon: 5, time: 2000 });
  1051. return;
  1052. }
  1053. });
  1054. })
  1055. </script>
  1056. <script type="text/javascript">
  1057. function telajaxopt(opturl) {
  1058. var r = "";
  1059. try {
  1060. $.ajax({
  1061. type: 'get',
  1062. url: opturl,
  1063. dataType: 'html',
  1064. async: false,
  1065. cache: false,
  1066. success: function (res) {
  1067. r = res;
  1068. }
  1069. });
  1070. }
  1071. catch (e) {
  1072. //$.ligerDialog.error(e.message);
  1073. }
  1074. return r;
  1075. }
  1076. //电话操作事件
  1077. //话机状态改变事件
  1078. function OnPhoneStatusNotify(status) {
  1079. var timeno = new Date().getTime();
  1080. //document.getElementById("spanServerRes").innerHTML = "状态:" + status;
  1081. }
  1082. //获取APPID
  1083. function GetAPPID() {
  1084. var cid = OCX_GetCallID("");
  1085. //更新APPID
  1086. return cid;
  1087. }
  1088. function UpdateRecPath() {
  1089. var appid = "";
  1090. appid = GetAPPID();
  1091. var timeno = new Date().getTime();
  1092. var callID = document.getElementById("CallHjbh").value;
  1093. telajaxopt("/OCXOpt/OCXOptCallAjax/?optaction=luyinEvent&callid=" + callID + "&path=" + appid + "&timeno=" + timeno); //录音开始事件
  1094. }
  1095. //录音成功
  1096. function Form_callComming(callerNum, parth) {
  1097. var timeno = new Date().getTime();
  1098. telajaxopt("/OCXOpt/OCXOptCallAjax/?optaction=luyinEvent&callid=" + document.getElementById("CallHjbh").value + "&path=" + parth + "&timeno=" + timeno); //录音开始事件
  1099. //Form_setWinfromenble("True", "false", "false", "false", "True", "True", "True", "false", "false", "false");
  1100. }
  1101. function getCallerNum() {
  1102. var calnum = document.getElementById("callnum").value;
  1103. return calnum;
  1104. }
  1105. function clearCallerNum() {
  1106. document.getElementById("callnum").value = "";
  1107. }
  1108. function getCallHjbh() {
  1109. var cid = document.getElementById("CallHjbh").value;
  1110. return cid;
  1111. }
  1112. function clearCallHjbh() {
  1113. document.getElementById("CallHjbh").value = "";
  1114. }
  1115. </script>
  1116. <script>
  1117. var tellayercount = 0;
  1118. var nowtime = "";
  1119. var arrLayerTime = new Array();
  1120. function ShowLayerByTimes(times) {
  1121. nowtime = times;
  1122. var aid = "layui-layer" + times;
  1123. //$('#' + aid).show();
  1124. $("#" + aid).find(".layui-layer-max").click();
  1125. }
  1126. function CloseLayerByTimes(times) {
  1127. var aid = "layui-layer" + times;
  1128. //$('#' + aid).show();
  1129. $("#" + aid).find(".layui-layer-close").click();
  1130. }
  1131. function CloseLayerNow() {
  1132. var aid = "layui-layer" + nowtime;
  1133. //$('#' + aid).show();
  1134. $("#" + aid).find(".layui-layer-close").click();
  1135. }
  1136. function InitTelLayerList() {
  1137. var html = "";
  1138. for (var ai = 0; ai < arrLayerTime.length; ai++) {
  1139. var atime = arrLayerTime[ai];
  1140. var aid = "layui-layer" + atime;
  1141. var title = $('#' + aid + ' .layui-layer-title').text();
  1142. var sindex = title.indexOf('-');
  1143. title = title.substr(0, sindex);
  1144. html += "<dd><a href=\"javascript:ShowLayerByTimes(" + atime + ");\" ><i class=\"fa fa-phone\"></i><cite>" + title + "</cite></a></dd>";
  1145. }
  1146. $('#telLayerInfoChild').html(html);
  1147. }
  1148. function CloseOpenTel(atime) {
  1149. tellayercount--;
  1150. if (tellayercount <= 0) {
  1151. tellayercount = 0;
  1152. document.getElementById("telLayerInfo").style.display = "none";
  1153. }
  1154. document.getElementById("supLayerCount").innerHTML = tellayercount;
  1155. //var atime = layero.attr("times");
  1156. var sindex = arrLayerTime.indexOf(atime);
  1157. if (sindex > -1) {
  1158. arrLayerTime.splice(sindex, 1);
  1159. }
  1160. InitTelLayerList();
  1161. }
  1162. function OpenTelLayer(t, urlSrc) {//多窗口模式,层叠置顶
  1163. layui.use(['element', 'layer'], function () {
  1164. var element = layui.element,
  1165. layer = layui.layer; //获得layer模块
  1166. layer.open({
  1167. type: 2 //此处以iframe举例
  1168. , title: t
  1169. , area: ['80%', '80%']
  1170. , shade: 0
  1171. , maxmin: true
  1172. , content: urlSrc
  1173. , zIndex: layer.zIndex //重点1
  1174. , success: function (layero) {
  1175. tellayercount++;
  1176. document.getElementById("supLayerCount").innerHTML = tellayercount;
  1177. document.getElementById("telLayerInfo").style.display = "inline";
  1178. layer.setTop(layero); //重点2
  1179. nowtime = layero.attr("times");
  1180. arrLayerTime.push(layero.attr("times"));
  1181. InitTelLayerList();
  1182. }, min: function (layero) {
  1183. //setTimeout(function () { layero.css({ left:"180px",width:"280px" }); }, 0);
  1184. //alert(layero.attr("times"));
  1185. //var w = document.body.clientWidth;
  1186. //var rowcount = w / 181;
  1187. //for (var i = 0; i < arrLayerTime.length; i++) {
  1188. // var atime = arrLayerTime[i];
  1189. // var id = "layui-layer" + atime;
  1190. // var obj = document.getElementById(id);
  1191. //}
  1192. var atime = layero.attr("times");
  1193. var aid = "layui-layer" + atime;
  1194. //$('#' + aid).hide();
  1195. setTimeout(function () { layero.css({ width: "0px", height: "0px" }); }, 0);
  1196. }, cancel: function (index, layero) {
  1197. CloseOpenTel(layero.attr("times"));
  1198. }
  1199. });
  1200. });
  1201. }
  1202. function tabMove() {
  1203. $(window).on("resize", function (event) {
  1204. var topTabsBox = $("#top_tabs_box"),
  1205. topTabsBoxWidth = $("#top_tabs_box").width(),
  1206. topTabs = $("#top_tabs"),
  1207. topTabsWidth = $("#top_tabs").width(),
  1208. tabLi = topTabs.find("li.layui-this"),
  1209. top_tabs = document.getElementById("top_tabs"),
  1210. event = event || window.event;
  1211. try {
  1212. if (topTabsWidth > topTabsBoxWidth) {
  1213. if (tabLi.position().left > topTabsBoxWidth || tabLi.position().left + topTabsBoxWidth > topTabsWidth) {
  1214. topTabs.css("left", topTabsBoxWidth - topTabsWidth);
  1215. } else {
  1216. topTabs.css("left", -tabLi.position().left);
  1217. }
  1218. //拖动效果
  1219. var flag = false;
  1220. var cur = {
  1221. x: 0,
  1222. y: 0
  1223. }
  1224. var nx, dx, x;
  1225. function down() {
  1226. flag = true;
  1227. var touch;
  1228. if (event.touches) {
  1229. touch = event.touches[0];
  1230. } else {
  1231. touch = event;
  1232. }
  1233. cur.x = touch.clientX;
  1234. dx = top_tabs.offsetLeft;
  1235. }
  1236. function move() {
  1237. var self = this;
  1238. if (flag) {
  1239. window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
  1240. var touch;
  1241. if (event.touches) {
  1242. touch = event.touches[0];
  1243. } else {
  1244. touch = event;
  1245. }
  1246. nx = touch.clientX - cur.x;
  1247. x = dx + nx;
  1248. if (x > 0) {
  1249. x = 0;
  1250. } else {
  1251. if (x < topTabsBoxWidth - topTabsWidth) {
  1252. x = topTabsBoxWidth - topTabsWidth;
  1253. } else {
  1254. x = dx + nx;
  1255. }
  1256. }
  1257. top_tabs.style.left = x + "px";
  1258. //阻止页面的滑动默认事件
  1259. document.addEventListener("touchmove", function () {
  1260. event.preventDefault();
  1261. }, false);
  1262. }
  1263. }
  1264. //鼠标释放时候的函数
  1265. function end() {
  1266. flag = false;
  1267. }
  1268. //pc端拖动效果
  1269. topTabs.on("mousedown", down);
  1270. topTabs.on("mousemove", move);
  1271. $(document).on("mouseup", end);
  1272. //移动端拖动效果
  1273. topTabs.on("touchstart", down);
  1274. topTabs.on("touchmove", move);
  1275. topTabs.on("touchend", end);
  1276. } else {
  1277. //移除pc端拖动效果
  1278. topTabs.off("mousedown", down);
  1279. topTabs.off("mousemove", move);
  1280. topTabs.off("mouseup", end);
  1281. //移除移动端拖动效果
  1282. topTabs.off("touchstart", down);
  1283. topTabs.off("touchmove", move);
  1284. topTabs.off("touchend", end);
  1285. topTabs.removeAttr("style");
  1286. return false;
  1287. }
  1288. }
  1289. catch (e) {
  1290. alert(e.message);
  1291. }
  1292. }).resize();
  1293. }
  1294. var tabFilter, menu = [], liIndex, curNav, delMenu,
  1295. changeRefreshStr = window.sessionStorage.getItem("changeRefresh");
  1296. //layui.use(['layer', 'jquery'], function () {
  1297. // var form = layui.form,
  1298. // layer = parent.layer === undefined ? layui.layer : parent.layer,
  1299. // $ = layui.jquery;
  1300. layui.use('element', function () {
  1301. var element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
  1302. //var element = layui.element,
  1303. // $ = layui.$,
  1304. // layId,
  1305. // Tab = function () {
  1306. // this.tabConfig = {
  1307. // openTabNum: undefined, //最大可打开窗口数量
  1308. // tabFilter: "bodyTab", //添加窗口的filter
  1309. // url: undefined //获取菜单json地址
  1310. // }
  1311. // };
  1312. /*
  1313. //通过title获取lay-id
  1314. Tab.prototype.getLayId = function (title) {
  1315. $(".layui-tab-title.top_tab li").each(function () {
  1316. if ($(this).find("cite").text() == title) {
  1317. layId = $(this).attr("lay-id");
  1318. }
  1319. })
  1320. return layId;
  1321. }
  1322. //通过title判断tab是否存在
  1323. Tab.prototype.hasTab = function (title) {
  1324. var tabIndex = -1;
  1325. $(".layui-tab-title.top_tab li").each(function () {
  1326. if ($(this).find("cite").text() == title) {
  1327. tabIndex = 1;
  1328. }
  1329. })
  1330. return tabIndex;
  1331. }
  1332. function AddTabPage(aid, aicon, nullicon, aname, urlSrc) {
  1333. var timeno = new Date().getTime();
  1334. var tabIndex = -1;
  1335. $(".layui-tab-title.top_tab li").each(function () {
  1336. if ($(this).attr("lay-id") == 'maintab_' + aid + '') {
  1337. tabIndex = 1;
  1338. }
  1339. })
  1340. if (tabIndex != 1) {
  1341. //新增一个Tab项
  1342. element.tabAdd('bodyTab', {
  1343. title: '<i class=\"' + aicon + '\">' + nullicon + '</i> <cite openid=\"' + aid + '\">' + aname + '</cite><i class=\"layui-icon layui-unselect layui-tab-close\">&#x1006;</i>'
  1344. , content: '<iframe id=\"mainframe_' + aid + '\" src=\"' + urlSrc + '?timeno=' + timeno + '\"></iframe>'
  1345. , id: 'maintab_' + aid + '' //实际使用一般是规定好的id,这里以时间戳模拟下
  1346. })
  1347. }
  1348. element.tabChange('bodyTab', 'maintab_' + aid + '');
  1349. tabMove(); //顶部窗口是否可滚动
  1350. }
  1351. */
  1352. var pwd = $("#Password").val();
  1353. if (checkStrong(pwd) == "0" || checkStrong(pwd) == "1") {
  1354. layer.open({
  1355. content: '密码等级太低,请先修改密码'
  1356. , btn: ['好的', '稍后再去']
  1357. , yes: function (index, layero) {
  1358. layer.close(index);
  1359. //AddTabPage('editpsd', 'fa fa-lock', '', '修改密码','/SystemManage/UserPwdEdit');
  1360. document.getElementById("mainframe").src = "/SystemManage/UserPwdEdit";
  1361. }
  1362. });
  1363. }
  1364. $("#userpwd").click(function () {
  1365. document.getElementById("mainframe").src = "/SystemManage/UserPwdEdit";
  1366. //AddTabPage('editpsd', 'fa fa-lock', '', '修改密码', '/SystemManage/UserPwdEdit');
  1367. });
  1368. $("#customerphone").click(function () {
  1369. document.getElementById("mainframe").src = "/HrEmployeeBase/EmployeeSearchList";
  1370. //AddTabPage('emplist', 'layui-icon layui-icon-form', '&#xe63c;', '通讯录', '/HrEmployeeBase/EmployeeSearchList');
  1371. //layer.open({
  1372. // type: 2,
  1373. // anim: 4,
  1374. // scrollbar: false,
  1375. // content: '/HrEmployeeBase/EmployeeSearchList',
  1376. // area: ['1000px', '500px'],
  1377. // id: 'UserInfo',
  1378. // title: '通讯录'
  1379. //});
  1380. });
  1381. $("#userinfo").click(function () {
  1382. document.getElementById("mainframe").src = "/SystemManage/UserView";
  1383. //AddTabPage('userinfo', 'fa fa-user', '', '个人信息', '/SystemManage/UserView');
  1384. //layer.open({
  1385. // type: 2,
  1386. // anim: 4,
  1387. // scrollbar: false,
  1388. // content: '/SystemManage/UserView',
  1389. // area: ['800px', '500px'],
  1390. // id: 'UserInfo',
  1391. // title: '个人信息'
  1392. //});
  1393. });
  1394. //转主页
  1395. $(".logo").on("click", function () { //此处添加禁止连续点击刷新一是为了降低服务器压力,另外一个就是为了防止超快点击造成chrome本身的一些js文件的报错(不过貌似这个问题还是存在,不过概率小了很多)
  1396. //var tabIndex = -1;
  1397. //$(".layui-tab-title.top_tab li").each(function () {
  1398. // if ($(this).attr("lay-id") == 'maintab_index') {
  1399. // tabIndex = 1;
  1400. // }
  1401. //})
  1402. //if (tabIndex != 1) {
  1403. // var timeno = new Date().getTime();
  1404. // //新增一个Tab项
  1405. // element.tabAdd('bodyTab', {
  1406. // title: '<i class=\"layui-icon\">&#xe68e;</i> <cite openid=\"-1\">首页</cite>'
  1407. // , content: '<iframe id=\"mainframe_index\" src=\"/Main/IndexCenter?timeno=' + timeno + '\"></iframe>'
  1408. // , id: 'maintab_index' //实际使用一般是规定好的id,这里以时间戳模拟下
  1409. // })
  1410. //}
  1411. //element.tabChange('bodyTab', 'maintab_index');
  1412. //tabMove(); //顶部窗口是否可滚动
  1413. var timeno = new Date().getTime();
  1414. document.getElementById("mainframe").src = "/Main/IndexCenter?timeno=" + timeno;
  1415. })
  1416. //删除tab
  1417. //$("body").on("click", ".top_tab li i.layui-tab-close", function () {
  1418. // try {
  1419. // //删除tab后重置session中的menu和curmenu
  1420. // liIndex = $(this).parent("li").index();
  1421. // element.tabDelete("bodyTab", $(this).parent("li").attr("lay-id")).init();
  1422. // tabMove();
  1423. // }
  1424. // catch (e) { }
  1425. //})
  1426. //刷新当前
  1427. //$(".refresh").on("click", function () { //此处添加禁止连续点击刷新一是为了降低服务器压力,另外一个就是为了防止超快点击造成chrome本身的一些js文件的报错(不过貌似这个问题还是存在,不过概率小了很多)
  1428. // try {
  1429. // if ($(this).hasClass("refreshThis")) {
  1430. // $(this).removeClass("refreshThis");
  1431. // $(".clildFrame .layui-tab-item.layui-show").find("iframe")[0].contentWindow.location.reload();
  1432. // setTimeout(function () {
  1433. // $(".refresh").addClass("refreshThis");
  1434. // }, 2000)
  1435. // } else {
  1436. // layer.msg("您点击的速度超过了服务器的响应速度,还是等两秒再刷新吧!");
  1437. // }
  1438. // }
  1439. // catch (e) { }
  1440. //})
  1441. //关闭其他
  1442. //$(".closePageOther").on("click", function () {
  1443. // try {
  1444. // if ($("#top_tabs li").length > 2 && $("#top_tabs li.layui-this cite").text() != "首页") {
  1445. // $("#top_tabs li").each(function () {
  1446. // if ($(this).attr("lay-id") != 'maintab_index' && !$(this).hasClass("layui-this")) {
  1447. // element.tabDelete("bodyTab", $(this).attr("lay-id")).init();
  1448. // }
  1449. // })
  1450. // } else if ($("#top_tabs li.layui-this cite").text() == "首页" && $("#top_tabs li").length > 1) {
  1451. // $("#top_tabs li").each(function () {
  1452. // if ($(this).attr("lay-id") != 'maintab_index' && !$(this).hasClass("layui-this")) {
  1453. // element.tabDelete("bodyTab", $(this).attr("lay-id")).init();
  1454. // }
  1455. // })
  1456. // } else {
  1457. // layer.msg("没有可以关闭的窗口了");
  1458. // }
  1459. // //渲染顶部窗口
  1460. // tabMove();
  1461. // }
  1462. // catch (e) { }
  1463. //})
  1464. //关闭全部
  1465. //$(".closePageAll").on("click", function () {
  1466. // try {
  1467. // if ($("#top_tabs li").length > 1) {
  1468. // $("#top_tabs li").each(function () {
  1469. // if ($(this).attr("lay-id") != 'maintab_index') {
  1470. // element.tabDelete("bodyTab", $(this).attr("lay-id")).init();
  1471. // }
  1472. // })
  1473. // } else {
  1474. // layer.msg("没有可以关闭的窗口了");
  1475. // }
  1476. // //渲染顶部窗口
  1477. // tabMove();
  1478. // }
  1479. // catch (e) { }
  1480. //})
  1481. //通过title获取lay-id
  1482. //Tab.prototype.getLayId = function (title) {
  1483. // $(".layui-tab-title.top_tab li").each(function () {
  1484. // if ($(this).find("cite").text() == title) {
  1485. // layId = $(this).attr("lay-id");
  1486. // }
  1487. // })
  1488. // return layId;
  1489. //}
  1490. //监听导航点击
  1491. element.on('nav(demo)', function (elem) {
  1492. //console.log(elem)
  1493. // layer.msg(elem.text());
  1494. var urlSrc = $(this).find("a").attr("data-url");
  1495. var aname = $(this).find("a").attr("aname");
  1496. var aid = $(this).find("a").attr("id");
  1497. var aicon = $(this).find("a").attr("aicon");
  1498. var nullicon = "";
  1499. if (aicon == "") {
  1500. aicon = "layui-icon layui-icon-tabs";
  1501. nullicon = "&#xe62a;";
  1502. }
  1503. var cssClass = $(this).find("a").find("i").attr("class");
  1504. if (cssClass != null && (cssClass.indexOf("fa-weibo") > 0 || cssClass.indexOf("fa-weixin")) && cssClass.indexOf("selectClass") <= 0) {
  1505. alert("未签入!")
  1506. return;
  1507. }
  1508. var timeno = new Date().getTime();
  1509. if (urlSrc != "") {
  1510. if (urlSrc == "/ScreenDisplay/MainScreen") {
  1511. OpenOtherForm("郑州地铁客服中心大屏数据展示", "http://" + window.location.host + urlSrc + "/");
  1512. }
  1513. else {
  1514. if (urlSrc.indexOf("CallRecord/CallScreen") >= 0) {
  1515. //OpenTelLayer('18695836988-来电', urlSrc);
  1516. document.getElementById("mainframe").src = urlSrc;
  1517. }
  1518. else {
  1519. if (urlSrc.indexOf('?') < 0) {
  1520. document.getElementById("mainframe").src = urlSrc + "?timeno=" + timeno + "";
  1521. //var tabIndex = -1;
  1522. //$(".layui-tab-title.top_tab li").each(function () {
  1523. // if ($(this).attr("lay-id") == 'maintab_' + aid + '') {
  1524. // tabIndex = 1;
  1525. // }
  1526. //})
  1527. //if (tabIndex != 1) {
  1528. // //新增一个Tab项
  1529. // element.tabAdd('bodyTab', {
  1530. // title: '<i class=\"' + aicon + '\">' + nullicon + '</i> <cite openid=\"' + aid + '\">' + aname + '</cite><i class=\"layui-icon layui-unselect layui-tab-close\">&#x1006;</i>'
  1531. // , content: '<iframe id=\"mainframe_' + aid + '\" scrolling=\"auto\" src=\"' + urlSrc + '?timeno=' + timeno + '\"></iframe>'
  1532. // , id: 'maintab_' + aid + '' //实际使用一般是规定好的id,这里以时间戳模拟下
  1533. // })
  1534. //}
  1535. //element.tabChange('bodyTab', 'maintab_' + aid + '');
  1536. //tabMove(); //顶部窗口是否可滚动
  1537. }
  1538. else {
  1539. document.getElementById("mainframe").src = urlSrc + "&timeno=" + timeno + "";
  1540. //try {
  1541. // var tabIndex = -1;
  1542. // $(".layui-tab-title.top_tab li").each(function () {
  1543. // if ($(this).attr("lay-id") == 'maintab_' + aid + '') {
  1544. // tabIndex = 1;
  1545. // }
  1546. // })
  1547. // if (tabIndex != 1) {
  1548. // //新增一个Tab项
  1549. // element.tabAdd('bodyTab', {
  1550. // title: '<i class=\"' + aicon + '\">' + nullicon + '</i> <cite openid=\"' + aid + '\">' + aname + '</cite><i class=\"layui-icon layui-unselect layui-tab-close\">&#x1006;</i>'
  1551. // , content: '<iframe id=\"mainframe_' + aid + '\" scrolling=\"auto\" src=\"' + urlSrc + '&timeno=' + timeno + '\"></iframe>'
  1552. // , id: 'maintab_' + aid + '' //实际使用一般是规定好的id,这里以时间戳模拟下
  1553. // })
  1554. // }
  1555. // element.tabChange('bodyTab', 'maintab_' + aid + '');
  1556. // //setTimeout(alert(1), 5000);
  1557. // tabMove(); //顶部窗口是否可滚动
  1558. // //if (aid == "2" || aid == "3") {
  1559. // // alert("加载完成");
  1560. // //}
  1561. //}
  1562. //catch (e) {
  1563. // alert(e.message);
  1564. //}
  1565. }
  1566. }
  1567. }
  1568. //if (urlSrc.indexOf('?') < 0) {
  1569. // document.getElementById("mainframe").src = urlSrc + "?timeno=" + timeno + "";
  1570. //}
  1571. //else {
  1572. // document.getElementById("mainframe").src = urlSrc + "&timeno=" + timeno + "";
  1573. //}
  1574. }
  1575. });
  1576. });
  1577. $("#navBar .layui-nav-item").click(function () {
  1578. $("#navBar .layui-nav-item").removeClass("layui-nav-itemed");
  1579. $("#navBar .layui-nav-item").removeClass("layui-this");
  1580. if ($(this).has('dl').length) {//如果有子菜单,显示下拉样式
  1581. $(this).addClass("layui-nav-itemed");
  1582. } else {//如果没有子菜单,显示菜单项样式
  1583. $(this).addClass("layui-this");
  1584. }
  1585. });
  1586. </script>
  1587. </body>
  1588. <script type="text/javascript">
  1589. ///获取微信消息
  1590. ///1、微信 2、微博
  1591. function GetWxMessageCount(messageType, className) {
  1592. $.ajax({
  1593. url: "/OtherPage/GetWebChartCount",
  1594. type: "get",
  1595. contentType: "application/json",
  1596. dataType: "text",
  1597. cache: false,
  1598. data: { "pageType": messageType },
  1599. success: function (result, status) {
  1600. if (status) {
  1601. $(className).html(result);
  1602. }
  1603. }
  1604. });
  1605. }
  1606. //微信
  1607. var wX;
  1608. function wXTimedCount() {
  1609. GetWxMessageCount(1, ".wXCount");
  1610. wX = setTimeout("wXTimedCount()", 5000)
  1611. }
  1612. $(".btnWX").click(function () {
  1613. var rgs = $(".fa-weixin").hasClass("defaultClass");
  1614. if (rgs) {
  1615. $(".fa-weixin").removeClass("defaultClass");
  1616. $(".fa-weixin").addClass("selectClass");
  1617. $(".wXCount").css("display", "block");
  1618. wXTimedCount();
  1619. }
  1620. else {
  1621. $(".fa-weixin").removeClass("selectClass");
  1622. $(".fa-weixin").addClass("defaultClass");
  1623. $(".wXCount").css("display", "none");
  1624. clearTimeout(wX);
  1625. }
  1626. });
  1627. //微博
  1628. var wB;
  1629. function wBTimedCount() {
  1630. GetWxMessageCount(2, ".wBCount");
  1631. wB = setTimeout("wBTimedCount()", 5000)
  1632. }
  1633. $(".btnWB").click(function () {
  1634. var rgs = $(".fa-weibo").hasClass("defaultClass");
  1635. if (rgs) {
  1636. $(".fa-weibo").removeClass("defaultClass");
  1637. $(".fa-weibo").addClass("selectClass");
  1638. $(".wBCount").css("display", "block");
  1639. wBTimedCount();
  1640. }
  1641. else {
  1642. $(".fa-weibo").removeClass("selectClass");
  1643. $(".fa-weibo").addClass("defaultClass");
  1644. $(".wBCount").css("display", "none");
  1645. clearTimeout(wB);
  1646. }
  1647. });
  1648. //待办工单
  1649. function MyOrderCount() {
  1650. try {
  1651. //补录工单
  1652. if ($(".orderNeedCount") != undefined) {
  1653. $.ajax({
  1654. url: "/OtherPage/GetMyOrderNeedCount/",
  1655. type: "get",
  1656. contentType: "application/json",
  1657. dataType: "text",
  1658. cache: false,
  1659. data: null,
  1660. success: function (result, status) {
  1661. if (status) {
  1662. $(".orderNeedCount").html(result);
  1663. }
  1664. }
  1665. });
  1666. }
  1667. //微博工单//orderCountWb
  1668. //if ($(".orderCountWb") != undefined) {
  1669. // $.ajax({
  1670. // url: "/OtherPage/GetMyOrderCountWb/",
  1671. // type: "get",
  1672. // contentType: "application/json",
  1673. // dataType: "text",
  1674. // cache: false,
  1675. // data: null,
  1676. // success: function (result, status) {
  1677. // if (status) {
  1678. // $(".orderCountWb").html(result);
  1679. // }
  1680. // }
  1681. // });
  1682. //}
  1683. //待办工单
  1684. if ($(".orderCount") != undefined) {
  1685. $.ajax({
  1686. url: "/OtherPage/GetMyOrderCount/",
  1687. type: "get",
  1688. contentType: "application/json",
  1689. dataType: "text",
  1690. cache: false,
  1691. data: null,
  1692. success: function (result, status) {
  1693. if (status) {
  1694. $(".orderCount").html(result);
  1695. }
  1696. }
  1697. });
  1698. }
  1699. if ($(".orderCount") != undefined || $(".orderNeedCount") != undefined) {
  1700. var totalOrderCount = 0;
  1701. var myOrderCount = 0;
  1702. var myNeedCount = 0;
  1703. var myorderCountWb = 0;
  1704. if ($(".orderCount") != undefined) {
  1705. myOrderCount = $(".orderCount").html();
  1706. }
  1707. if ($(".orderNeedCount") != undefined) {
  1708. myNeedCount = $(".orderNeedCount").html();
  1709. }
  1710. //orderCountWb
  1711. //if ($(".orderCountWb") != undefined) {
  1712. // myorderCountWb = $(".orderCountWb").html();
  1713. //}
  1714. totalOrderCount = parseInt(myOrderCount) + parseInt(myNeedCount);
  1715. $(".totalOrderCount").html(totalOrderCount);
  1716. setTimeout("MyOrderCount()", 5000);
  1717. }
  1718. }
  1719. catch (e) {
  1720. }
  1721. }
  1722. //获取待办工单数量
  1723. MyOrderCount();
  1724. </script>
  1725. </html>