| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834 |
- @using YTSoft.BaseCallCenter.Model;
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>郑州市轨道交通全媒体客服平台</title>
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta http-equiv="Access-Control-Allow-Origin" content="*">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="format-detection" content="telephone=no">
- <link rel="icon" href="../favicon.ico">
- <link type="text/css" href="/Content/layui/css/layui.css" rel="stylesheet" />
- <link type="text/css" href="/Content/layui/css/modules/layui-icon-extend/iconfont.css" rel="stylesheet" />
- <link type="text/css" href="/Content/css/index.css" rel="stylesheet" />
- <link type="text/css" href="/Content/css/myindex.css" rel="stylesheet" />
- <link type="text/css" href="/Content/css/font-awesome/css/font-awesome.css" rel="stylesheet" />
- <script src="/Content/seatformjs/ocxopt.js"></script>
- <script type="text/javascript">
- //监控获取指定坐席状态结果事件
- function IframeSetAgentState(agentid, state) {
- try {
- window.frames["frame_zxjkgl"].GetState(agentid, state);
- }
- catch (e) {
- }
- }
- ///转移
- function PhoneCallZY(tel) {
- try {
- var callinphone = document.getElementById("forZYnumber").value;
- OCX_TransferToPhone(tel, "");
- }
- catch (e) {
- //$.ligerDialog.error(e.message);
- }
- }
- ///多方通话
- function PhoneCallDFTH(tel) {
- try {
- var callinphone = document.getElementById("forZYnumber").value;
- OCX_ThirdParty(tel, "");
- }
- catch (e) {
- //$.ligerDialog.error(e.message);
- }
- }
- ///工单接单时候调用的外呼方法
- function PhoneCallOutJD(type, tel, workorderid) {
- becallout = true;
- becallcome = false;
- CallOutRecordIsWrite = true;
- //添加外呼记录
- var userid = document.getElementById("txtAgentId").value;
- var usercode = document.getElementById("txtLabourwork").value;
- var username = document.getElementById("txtAgentName").value;
- var extnumber = document.getElementById("txtPhoneNum").value;
- username = encodeURI(username);
- var timeno = new Date().getTime();
- //$.ligerDialog.waitting('开始呼叫...');
- $.ajax({
- type: 'get',
- url: '/OCXOpt/OCXOptCallAjax/?optaction=callout&callernum=' + tel + "&callid=" + workorderid + "&userid=" + userid + "&usercode=" + usercode + "&username=" + username + "&extnumber" + extnumber + "&timeno=" + timeno,
- dataType: 'html',
- success: function (res) {
- try {
- var DialIsOK = false;
- var arr = res.split('|');
- document.getElementById("CallHjbh").value = arr[2];
- //成功执行外呼叫
- if (arr[0] == "1") { //呼叫内部(座席)电话
- //2015-04-20
- becallout = true;
- becallcome = false;
- DialIsOK = OCX_CallOut(5, "", arr[1]);
- }
- else { //呼叫外部电话
- DialIsOK = OCX_CallOut(5, "", arr[1]);
- }
- if (DialIsOK != true) {
- alert('外呼失败');
- //$.ligerDialog.error('外呼失败');
- }
- } catch (e) {
- alert(e.message);
- //$.ligerDialog.error(e.message);
- }
- //$.ligerDialog.closeWaitting();
- }
- });
- }
- function addCallOutInfo() {
- var tel = OCX_GetCalleeNumber(document.getElementById("txtAgentId").value);
- becallout = true;
- becallcome = false;
- CallOutRecordIsWrite = true;
- //添加外呼记录
- var userid = document.getElementById("txtAgentId").value;
- var usercode = document.getElementById("txtLabourwork").value;
- var username = document.getElementById("txtAgentName").value;
- var extnumber = document.getElementById("txtPhoneNum").value;
- var timeno = new Date().getTime();
- username = encodeURI(username);
- $.ajax({
- type: 'get',
- url: '/OCXOpt/OCXOptCallAjax/?optaction=callout&callernum=' + tel + "&userid=" + userid + "&usercode=" + usercode + "&username=" + username + "&extnumber" + extnumber + "&timeno=" + timeno,
- dataType: 'html',
- success: function (res) {
- try {
- var DialIsOK = false;
- var arr = res.split('|');
- document.getElementById("CallHjbh").value = arr[2];
- telajaxopt("/OCXOpt/OCXOptCallAjax/?optaction=zhaijiEvent&callid=" + parent.document.getElementById("CallHjbh").value); //更新摘机事件
- } catch (e) {
- }
- }
- });
- }
- ///外呼
- function PhoneCallOut(type, tel) {
- becallout = true;
- becallcome = false;
- CallOutRecordIsWrite = true;
- //添加外呼记录
- var userid = document.getElementById("txtAgentId").value;
- var usercode = document.getElementById("txtLabourwork").value;
- var username = document.getElementById("txtAgentName").value;
- var extnumber = document.getElementById("txtPhoneNum").value;
- var timeno = new Date().getTime();
- username = encodeURI(username);
- //$.ligerDialog.waitting('开始呼叫...');
- layui.use('layer', function () {
- var layer = layui.layer;
- layer.msg('开始呼叫...');
- });
- $.ajax({
- type: 'get',
- url: '/OCXOpt/OCXOptCallAjax/?optaction=callout&callernum=' + tel + "&userid=" + userid + "&usercode=" + usercode + "&username=" + username + "&extnumber" + extnumber + "&timeno=" + timeno,
- dataType: 'html',
- success: function (res) {
- try {
- var DialIsOK = false;
- var arr = res.split('|');
- document.getElementById("CallHjbh").value = arr[2];
- //成功执行外呼叫
- if (arr[0] == "1") { //呼叫内部(座席)电话
- //2015-04-20
- becallout = true;
- becallcome = false;
- DialIsOK = OCX_CallOut(5, "", arr[1]);
- }
- else { //呼叫外部电话
- DialIsOK = OCX_CallOut(5, "", arr[1]);
- }
- if (DialIsOK != true) {
- layui.use('layer', function () {
- var layer = layui.layer;
- layer.msg('外呼失败');
- });
- //alert('外呼失败');
- //$.ligerDialog.error('外呼失败');
- }
- } catch (e) {
- layui.use('layer', function () {
- var layer = layui.layer;
- layer.msg('外呼失败:' + e.message);
- });
- //$.ligerDialog.error(e.message);
- }
- //$.ligerDialog.closeWaitting();
- }
- });
- }
- var hfcallstate = false;
- var outtype = "";
- function SetCallState(state) {
- hfcallstate = state;
- }
- function GetCallOutHFRes() {
- if (hfcallstate) {
- hfcallstate = false;
- return true;
- }
- else {
- return false;
- }
- }
- ///外呼
- function PhoneCallOutHF(type, tel, hfid) {
- becallout = true;
- becallcome = false;
- hfcallstate = false;
- CallOutRecordIsWrite = true;
- outtype = "hf";
- //添加外呼记录
- var userid = document.getElementById("txtAgentId").value;
- var usercode = document.getElementById("txtLabourwork").value;
- var username = document.getElementById("txtAgentName").value;
- var extnumber = document.getElementById("txtPhoneNum").value;
- var timeno = new Date().getTime();
- username = encodeURI(username);
- layui.layer
- //$.ligerDialog.waitting('开始呼叫...');
- $.ajax({
- type: 'get',
- url: '/OCXOpt/OCXOptCallAjax/?optaction=callouthf&callid=' + hfid + '&callernum=' + tel + "&userid=" + userid + "&usercode=" + usercode + "&username=" + username + "&extnumber" + extnumber + "&timeno=" + timeno,
- dataType: 'html',
- success: function (res) {
- try {
- var DialIsOK = false;
- var arr = res.split('|');
- document.getElementById("CallHjbh").value = arr[2];
- //成功执行外呼叫
- if (arr[0] == "1") { //呼叫内部(座席)电话
- //2015-04-20
- becallout = true;
- becallcome = false;
- DialIsOK = OCX_CallOut(5, "", arr[1]);
- }
- else { //呼叫外部电话
- DialIsOK = OCX_CallOut(5, "", arr[1]);
- }
- if (DialIsOK != true) {
- alert('外呼失败');
- //$.ligerDialog.error('外呼失败');
- }
- } catch (e) {
- //$.ligerDialog.error(e.message);
- }
- //$.ligerDialog.closeWaitting();
- }
- });
- }
- function OptClick(name) {
- var obj = document.getElementById(name);
- if (obj.attributes["ostate"].value != 0) {
- switch (name) {
- case "gd":
- button_ReleaseAnswer();
- //挂断
- break;
- case "wh":
- //外呼先示忙
- //AgentBusy();
- //otype 1外呼 2转移 3多方通话
- OpenWindowShow1('telmanage/calloutopt.aspx?otype=1', '电话外呼', 800, 500);
- break;
- case "zm":
- //示忙
- AgentBusy();
- break;
- case "zx":
- AgentFree();
- break;
- case "dfth":
- //多方会话
- OpenWindowShow1('telmanage/calloutopt.aspx?otype=3', '多方通话', 800, 500);
- break;
- case "zy":
- //转移
- OpenWindowShow1('telmanage/calloutopt.aspx?otype=2', '电话转移', 800, 500);
- break;
- case "bc":
- //保持
- button_KeepCall(); //保持方法
- break;
- case "jh":
- //接回
- button_GetKeepCall();
- break;
- case "qr":
- //签入
- button_QRCall();
- break;
- case "qc":
- //签出
- button_QCCall();
- break;
- }
- }
- }
- //转移
- function ZYhj(callnumber) {
- var zyzj = document.getElementById("forZYnumber").value;
- if (zyzj != "") {
- //Form_setWinfromenble("false", "false", "false", "false", "false", "false", "false", "false", "false", "false");
- }
- else {
- alert("转移失败!");
- }
- }
- //释放呼叫 2.1.8
- function button_ReleaseAnswer() {//挂机
- try {
- //MydTransToIVR();
- }
- catch (e) { }
- try {
- var rtn = OCX_Hangup();
- }
- catch (e) { }
- }
- //满意度
- function MydTransToIVR() {
- var cid = document.getElementById("CallHjbh").value;
- var rtn = OCX_TransferToIVR("2", cid);
- }
- //转回IVR
- function AgentTransToIVR() {
- var cid=document.getElementById("CallHjbh").value;
- var rtn = OCX_TransferToIVR("2", cid);
- }
- //座席示忙 2.1.12
- function AgentBusy() {
- //将座席状态设置为忙态。
- var rtn = OCX_SetBusy();
- //2014-10-22
- becallout = true;
- becallcome = false;
- rgmstate = true;
- }
- //座席示闲 2.1.13
- function AgentFree() {
- //将座席状态设置为闲态。
- var rtn = OCX_SetFree();
- //2014-10-22
- becallout = false;
- becallcome = true;
- rgmstate = false;
- return rtn;
- }
- //保持呼叫 2.1.17
- function button_KeepCall() {
- //该方法把座席正在通话的普通语音呼叫保持(只对语音呼叫有效)。
- var rtn = OCX_Hold();
- }
- //取保持 2.1.18
- function button_GetKeepCall() {
- //查询座席当前保持的所有语音呼叫
- var rtn = OCX_UnHold();
- }
- function buttonCallNew(telNum) {
- becallout = true;
- becallcome = false;
- var strHjbhout = AjaxPost("../WinIVR/GetAjaxPageInf.aspx?PgType=3&tel=" + telNum); //呼叫编号
- document.getElementById("CallHjbh").value = strHjbhout;
- //判断电话是本地还是外地的
- var callNumberNew = "";
- var res = _framepage_headframe.getPhone(telNum);
- if (res != "") {
- callNumberNew = res.value;
- }
- button_CallOut(callNumberNew, strHjbhout);
- }
- //外呼事件 2.1.7
- function button_CallOut(callnumber, hjbh) {
- var res = true;
- var cssok = 0;
- cssok = OCX_CallOut(5, "", callnumber);
- if (cssok == "0") {
- res = true;
- }
- else {
- res = false;
- }
- return res;
- }
- //重新登录
- function resetlogin() {
- var bol = window.confirm("确定要重新登录吗?");
- if (bol) {
- if (document.getElementById("txtIsAgent").value == "true") {
- //button_QCCallNew();
- }
- window.open("../SignIn.aspx", "_top");
- }
- }
- //退出方法
- function relogout() {
- var bol = window.confirm("确定要退出登录吗?");
- if (bol) {
- AjaxPost("../WinIVR/GetAjaxPageInf.aspx?PgType=14");
- _framepage_headframe.UpdateLoginOutInfo(document.getElementById("hfUserId").value);
- top.close();
- }
- }
- </script>
- <script language="javascript" type="text/javascript">
- //退出系统
- function logout() {
- $.post("/Default/LoginOut/" , function (data, states) {
- if (states == "success") {
- if (data == "success") {
- layer.confirm('确定退出系统?', { icon: 3, title: '提示' }, function (index) {
- try {
- if (document.getElementById("txtIsAgent").value == "true") {
- OCX_AgentLogOut();
- }
- }
- catch (e) {
- }
- //do something
- location.href = "/Default/Login";
- layer.close(index);
- });
- }
- }
- })
- }
- </script>
- <script type="text/javascript">
- //电话操作
- var becallout = false; //呼出
- var becallcome = false; //来电
- var CallOutRecordIsWrite = false; //呼出记录是否已写入
- var rgmstate = false;//人工忙状态
- function ToIndex() {
- //document.getElementById("mainframe").src = "/Main/IndexCenter";
- //<i class="layui-icon"></i> <cite openid="-1">首页</cite>
- var tabIndex = -1;
- $(".layui-tab-title.top_tab li").each(function () {
- if ($(this).attr("lay-id") == 'maintab_index') {
- tabIndex = 1;
- }
- })
- if (tabIndex != 1) {
- var timeno = new Date().getTime();
- //新增一个Tab项
- element.tabAdd('bodyTab', {
- title: '<i class=\"layui-icon\"></i> <cite openid=\"-1\">首页</cite>'
- , content: '<iframe id=\"mainframe_index\" src=\"/Main/IndexCenter?timeno=' + timeno + '\"></iframe>'
- , id: 'maintab_index' //实际使用一般是规定好的id,这里以时间戳模拟下
- })
- }
- element.tabChange('bodyTab', 'maintab_index');
- element.tabMove(); //顶部窗口是否可滚动
- }
- //初始化页面
- function Init() {
- try {
- //禁止后退键 作用于Firefox、Opera
- document.onkeypress = banBackSpace;
- //禁止后退键 作用于IE、Chrome
- document.onkeydown = banBackSpace;
- }
- catch (e) { }
- //show();
- }
- //签入
- function button_QRCall() {
- try {
- var result = OCX_AgentLogOut();
- }
- catch (e) {
- document.getElementById("spanServerRes").innerHTML = e.message;
- }
- AgentQR();
- }
- //签出
- function button_QCCall() {
- try {
- var result = OCX_AgentLogOut();
- }
- catch (e) {
- document.getElementById("spanServerRes").innerHTML = e.message;
- }
- }
- //获取排队数量
- function GetQueuingNumber() {
- var rtn = OCX_GetQueuingNumber();
- }
- function LoadQueuingNumber(num, list) {
- document.getElementById("spanqueuingnum").innerHTML = num;
- }
- function AgentQR() {
- if (document.getElementById("txt_1").value == "0") {
- document.getElementById("txt_1").value = "1";
- var typed = document.getElementById("HdIswin"); //是否是坐席用户
- if (typed.value == "true") {
- var timeno = new Date().getTime();
- $.ajax({
- type: 'get',
- url: '/Main/insertCallLogs/?serverip=' + document.getElementById("txtMostlyAddress").value + '&ctiusercode=' + document.getElementById("txtLabourNo").value + '&timeno=' + timeno,
- dataType: 'html',
- success: function (res) {
- InitPhoneBack();
- }
- });
- }
- else {
- document.getElementById("spanServerRes").innerHTML = "非坐席登录";
- }
- }
- else {
- document.getElementById("txt_1").value = "0";
- button_QCCall();
- }
- }
- function InitPhoneBack() {
- Initialize();
- }
- function Initialize() {
- try {
- 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);
- }
- catch (e) {
- document.getElementById("spanServerRes").innerHTML = e.message;
- }
- }
- //处理键盘事件 禁止后退键(Backspace)密码或单行、多行文本框除外
- function banBackSpace(e) {
- try {
- var ev = e || window.event; //获取event对象
- var obj = ev.target || ev.srcElement; //获取事件源
- var t = obj.type || obj.getAttribute('type'); //获取事件源类型
- //获取作为判断条件的事件类型
- var vReadOnly = obj.getAttribute('readonly');
- //处理null值情况
- vReadOnly = (vReadOnly == "") ? false : vReadOnly;
- //当敲Backspace键时,事件源类型为密码或单行、多行文本的,
- //并且readonly属性为true或enabled属性为false的,则退格键失效
- var flag1 = (ev.keyCode == 8 && (t == "password" || t == "text" || t == "textarea")
- && vReadOnly == "readonly") ? true : false;
- //当敲Backspace键时,事件源类型非密码或单行、多行文本的,则退格键失效
- var flag2 = (ev.keyCode == 8 && t != "password" && t != "text" && t != "textarea")
- ? true : false;
- //判断
- if (flag2) {
- return false;
- }
- if (flag1) {
- return false;
- }
- }
- catch (e) {
- return false;
- }
- }
- </script>
- <script type="text/javascript">
- function setLinkStatus(str) {
- //var imgServerState = document.getElementById("imgServerState");
- if (str == "True") {
- $('#imgServerState').attr('src', '/Content/images/server1.png');
- $('#imgServerState').attr('alt', '签入');
- // imgServerState.src = "/Content/images/server1.png";
- //imgServerState.alt = "签入";
- }
- else {
- $('#imgServerState').attr('src', '/Content/images/server0.png');
- $('#imgServerState').attr('alt', '未签入');
- //imgServerState.src = "/Content/images/server0.png";
- //imgServerState.alt = "未签入";
- }
- }
- function setAgentStatus(str) {
- //var imgAgentState = document.getElementById("imgAgentState");
- switch (str) {
- case "离席":
- $('#imgAgentState').attr('src', '/Content/images/zx2.png');
- $('#imgAgentState').attr('alt', '未登录');
- //imgAgentState.src = "/Content/images/zx2.png";
- //imgAgentState.alt = "未登录";
- break;
- case "空闲":
- $('#imgAgentState').attr('src', '/Content/images/zx1.png');
- $('#imgAgentState').attr('alt', '空闲');
- //imgAgentState.src = "/Content/images/zx1.png";
- //imgAgentState.alt = "空闲";
- break;
- case "忙":
- $('#imgAgentState').attr('src', '/Content/images/zx3.png');
- $('#imgAgentState').attr('alt', '忙');
- //imgAgentState.src = "/Content/images/zx3.png";
- //imgAgentState.alt = "忙";
- break;
- case "业务处理":
- $('#imgAgentState').attr('src', '/Content/images/zx4.png');
- $('#imgAgentState').attr('alt', '业务处理');
- //imgAgentState.src = "/Content/images/zx4.png";
- //imgAgentState.alt = "业务处理";
- break;
- }
- }
- //变换图标
- function Form_setWinfromenble(bl) {
- }
- function Form_setHW(bl) {
- if (bl == "True") {
- document.getElementById("txt_1").value = "1";
- document.getElementById("i_1").style.color = "#395E67";
- }
- else {
- document.getElementById("i_1").style.color = "#cccccc";
- document.getElementById("txt_1").value = "0";
- }
- }
- function Form_setZX(bl) {
- if (bl == "True") {
- document.getElementById("txt_7").value = "1";
- document.getElementById("i_7").style.color = "#395E67";
- }
- else {
- document.getElementById("i_7").style.color = "#cccccc";
- document.getElementById("txt_7").value = "0";
- }
- }
- function Form_setZM(bl) {
- if (bl == "True") {
- document.getElementById("txt_8").value = "1";
- document.getElementById("i_8").style.color = "#395E67";
- }
- else {
- document.getElementById("i_8").style.color = "#cccccc";
- document.getElementById("txt_8").value = "0";
- }
- }
- function OptNull() {
- }
- function OptNullByName(name) {
- var obj = document.getElementById(name);
- obj.src = "../images/totle/" + name + "3.png";
- obj.attributes["ostate"].value = 0;
- //obj.ostate = 0;
- obj.style.cursor = "default";
- }
- function OptByName(name) {
- var obj = document.getElementById(name);
- obj.src = "../images/totle/" + name + "1.png";
- obj.attributes["ostate"].value = 1;
- //obj.ostate = 1;
- obj.style.cursor = "hand";
- }
- </script>
- <style type="text/css">
- .defaultClass {
- color: #cccccc;
- }
- .selectClass {
- color: #83d944;
- }
- </style>
- </head>
- <body onload="Init()" class="main_body blue">
- <div class="layui-layout layui-layout-admin">
- <!-- 顶部 -->
- <div class="layui-header header">
- <div class="layui-main mag0">
- <a href="###" class="logo" style=" text-align:left; padding-left:15px;">全媒体客服平台<img style="height:55px; display:none;" src="/Content/images/logo1.png" /><span> </span></a>
- <!-- 功能模块Id -->
- <input id="HdModuleFunIdCount" type="hidden" value="0" />
- <input id="ismonitoring" type="hidden" value="false" />
- <input id="HdIswin" type="hidden" value="@Model.IsSeat" />
- <input id="UserID" type="hidden" value="@Model.UserAccountModel.F_UserId" />
- <input id="Password" type="hidden" value="@Model.UserAccountModel.F_Password" />
- <input id="hfUserId" type="hidden" value="@Model.UserAccountModel.F_UserId" />
- <iframe src="/Main/iframeocx" name="iframeocx" frameborder="0" height="0" width="0"
- style="display: none;"></iframe>
- @*--(用于初始化用的信息)--*@
- <input id="txtMostlyAddress" type="hidden" value="@Model.CTIserverIP" />@*--(主用CTI服务器IP)*@
- <input id="ServerType" type="hidden" value="20" />@*--(服务器类型)--*@
- <input id="txtLabourNo" type="hidden" value="@Model.UserAccountModel.F_WorkNumber" />@*--<%=Request.Cookies["ID"].Value %>(工号)--*@
- <input id="pwd" type="hidden" value="" />@*--<%=Request.Cookies["ID"].Value %>(密码)--*@
- <input id="txtPhoneID" type="hidden" value="@Model.UserAccountModel.F_UserCode" />@*--(通讯进程号)--*@
- <input id="txtSubordinationAddress" type="hidden" value="@Model.CTIserverIP" />@*--(备用CTI服务器IP)--*@
- <input id="txtIsAgent" type="hidden" value="@Model.UserAccountModel.F_SeatFlag" />
- <!-- 是否具有话务功能,是否坐席登录 -->
- <input id="txtAgentId" type="hidden" value="@Model.UserAccountModel.F_UserId" /><!-- 坐席ID -->
- <input id="txtAgentName" type="hidden" value="@Model.UserAccountModel.F_UserName" />
- <input id="txtAgentRight" type="hidden" value="@Model.UserAccountModel.F_SeatRight" />
- <input id="txtAgentGroup" type="hidden" value="@Model.UserAccountModel.F_GroupId" />
- <input id="txtServerPort" type="hidden" value="@Model.CTIserverPort" />
- <!-- 坐席权限 -->
- @*--(用于登录的信息)--*@
- <input id="SeatType" type="hidden" value="@Model.UserAccountModel.F_SeatRight" />@*--<%=Request.Cookies["SkillSet"].Value %>(坐席类型)--*@
- <input id="txtPhoneNum" type="hidden" value="@Model.UserAccountModel.F_ExtensionNumber" />@*--<%=Request.Cookies["ExtNum"].Value %>(分机号)--*@
- <input id="keepcall" type="hidden" value="" />
- @*--(keep号码)--*@
- <input id="txtLabourwork" type="hidden" value="@Model.UserAccountModel.F_UserCode" />@*--(登录工号)--*@
- <input id="passwd" type="hidden" value="" />@*--(登录坐席密码)--*@
- <input id="hjbh" type="hidden" value="" />@*--(外乎呼叫编号)--*@
- <input id="CallHjbh" type="hidden" value="" />@*--(来电呼叫编号)--*@
- <input id="forZYnumber" type="hidden" value="" />@*--(用来存储来电号码--*@
- <input id="callnum" type="hidden" value="" />@*--(来电主叫号码)--*@
- <ul class="layui-nav topLevelMenus" pc>
- <li class="layui-nav-item" onclick="AgentQR()" data-menu="contentManagement" title="语音签入">
- <input id="txt_1" type="hidden" value="0" /><a href="javascript:;" title="语音签入"><i id="i_1" class="fa fa-phone" style=" color:#cccccc;" data-icon=""></i></a>
- </li>
- <li class="layui-nav-item" data-menu="memberCenter" pc>
- <a href="javascript:;"><i id="i_2" class="layui-icon" style=" color:#cccccc;" data-icon=""></i></a>
- </li>
- <li class="layui-nav-item btnWX" data-menu="systemeSttings" pc>
- <a href="javascript:;"><i id="i_3" class="fa fa-weixin defaultClass" data-icon=""></i></a>
- </li>
- <li class="layui-nav-item btnWB" data-menu="seraphApi" pc>
- <a href="javascript:;"><i id="i_4" class="fa fa-weibo defaultClass" data-icon=""></i></a>
- </li>
- <li class="layui-nav-item" pc>
- <a href="javascript:;"><i id="i_5" class="fa fa-th-large" style=" color:#cccccc;" data-icon=""></i></a>
- </li>
- <li class="layui-nav-item" pc>
- <a href="javascript:;"><i id="i_6" class="fa fa-envelope-o" style=" color:#cccccc;" data-icon=""></i></a>
- </li>
- <li class="layui-nav-item" pc>
- <input id="txt_7" type="hidden" value="0" /><a href="javascript:;" onclick="AgentFree()" title="坐席就绪"><i id="i_7" class="fa fa-play" style=" color:#cccccc;" data-icon=""></i></a>
- </li>
- <li class="layui-nav-item" pc>
- <input id="txt_8" type="hidden" value="0" /><a href="javascript:;" onclick="AgentBusy()" title="坐席小休"><i id="i_8" class="fa fa-pause" style=" color:#cccccc;" data-icon=""></i></a>
- </li>
- </ul>
- <!-- 顶部右侧菜单 -->
- <ul class="layui-nav top_menu">
- <li class="layui-nav-item">
- <a id="telLayerInfo" style=" display:none;" href="javascript:;"><img src="/Content/images/phone128.png" class="layui-nav-img userAvatar" width="35" height="35"><cite class="adminName">未处理来电</cite><sup id="supLayerCount" class="layui-badge">0</sup> </a>
- <dl id="telLayerInfoChild" class="layui-nav-child"></dl>
- </li>
- <!--软电话-->
- <li class="layui-nav-item " title="软电话">
- <i class="fa fa-whatsapp" data-method="confirmTrans" style="font-size: 25px !important; margin-right: 0px;margin-top:15px; color:gray"></i>
- </li>
- <li class="layui-nav-item" title="通讯录" id="CustomerTelphone">
- @*<a href="javascript:;" title="通讯录" onclick="OpenOtherForm('通讯录', '/HrEmployeeBase/EmployeeSearchList')">
- <i class="fa fa-address-card" style="font-size: 25px !important; margin-left :15px;margin-top:15px; color:gray">
- </i>
- </a>*@
- <a id="customerphone">
- <i class="fa fa-address-card" style="font-size: 25px !important; margin-left :15px;margin-top:15px; color:powderblue;"></i>
- </a>
- </li>
- <!--微信-->
- @*<li id="wxMap" class="layui-nav-item inform" title="微信">
- <i class="fa fa-weixin defaultClass" style="font-size: 20px !important; margin-right: 5px;"></i>
- <sup class="layui-badge wXCount" style="display:none;">0</sup>
- </li>*@
- <!--微博-->
- @*<li id="wbMap" class="layui-nav-item inform" title="微博">
- <i class="fa fa-weibo defaultClass" style=" font-size: 20px !important;margin-right:13px;"></i>
- <sup class="layui-badge wBCount" style="display:none;">0</sup>
- </li>*@
- <li class="layui-nav-item">
- <a href="javascript:;" title="小工具"><i class="layui-icon" style=" font-size: 25px !important;"></i></a>
- <dl class="layui-nav-child">
- <dd>
- <a href="javascript:;" onclick="OpenOtherForm('周边', 'https://www.amap.com/')"><i class="fa fa-map-marker" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">周边</cite></a>
- </dd>
- <dd>
- <a href="javascript:;" onclick="OpenOtherForm('线路查询', 'http://www.zzmetro.com/lines/query/line')"><i class="fa fa-plane" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">线路查询</cite></a>
- </dd>
- <dd>
- <a href="javascript:;" onclick="OpenOtherForm('票价查询', 'http://www.zzmetro.com/lines/query/ticket')"><i class="fa fa-ticket" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">票价查询</cite></a>
- </dd>
- <dd>
- <a href="javascript:;" onclick="OpenOtherForm('运营时间', 'http://www.zzmetro.com/lines/query/operating_hours')"><i class="fa fa-clock-o" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">运营时间</cite></a>
- </dd>
- <dd>
- <a href="javascript:;" onclick="OpenOtherForm('站点查询', 'http://www.zzmetro.com/lines/query/station')"><i class="fa fa-train" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">站点查询</cite></a>
- </dd>
- <dd>
- <a href="javascript:;" onclick="OpenOtherForm('快速通讯录', 'http://portal.zzmetro.com/index.php?m=content&c=txl')"><i class="fa fa-tty" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">快速通讯录</cite></a>
- </dd>
- <dd>
- <a href="javascript:;" onclick="OpenOtherForm('官网入口', 'http://www.zzmetro.com/')"><i class="fa fa-internet-explorer" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">官网入口</cite></a>
- </dd>
- <dd>
- <a href="javascript:;" onclick="OpenOtherForm('常见Q&A', ' /RepositoryCategory/RepositoryCategoryContentList/?dType=2')"><i class="fa fa-quora" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">常见Q&A</cite></a>
- </dd>
- <dd>
- <a href="javascript:;" onclick="OpenOtherForm('常用语', ' /RepositoryCategory/RepositoryCategoryContentList/?dType=4')"><i class="fa fa-book" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">常用语</cite></a>
- </dd>
- <dd>
- <a href="javascript:;" onclick="OpenOtherForm('我的常用语', ' /RepositoryCategory/RepositoryCategoryContentList/?dType=1')"><i class="fa fa-rebel" style="font-size: 20px !important; margin-right: 5px;"></i><cite style="text-align:left">我的常用语</cite></a>
- </dd>
- <dd>
- <a href="javascript:;" onclick="OpenOtherForm('邮箱入口', 'http://mail.zzmetro.cn/index.php')"><i class="fa fa-envelope" style="font-size: 20px !important; margin-right: 5px;color:deepskyblue;"></i><cite style="text-align:left">邮箱入口</cite></a>
- </dd>
- </dl>
- </li>
- <li class="layui-nav-item" id="userInfo">
- <a href="javascript:;"><img src="@Model.UserAccountModel.F_HomePhone" class="layui-nav-img userAvatar" width="35" height="35"><cite class="adminName">@Model.UserAccountModel.F_UserName</cite></a>
- <dl class="layui-nav-child">
- <dd>
- <a id="userinfo"><i class="layui-icon"></i><cite>个人信息</cite></a>
- </dd>
- <dd>
- <a id="userpwd"><i class="layui-icon"> </i><cite>修改密码</cite></a>
- </dd>
- <dd>
- <a href="javascript:logout()" id="exitsystem"><i class="fa fa-power-off"> </i><cite>退出系统</cite></a>
- </dd>
- </dl>
- </li>
- </ul>
- </div>
- </div>
- <!-- 左侧导航 -->
- <div class="layui-side layui-bg-black">
- <div class="navBar layui-side-scroll" id="navBar">
- <ul class="layui-nav layui-nav-tree" lay-filter="demo" lay-shrink="all">
- @if (Model != null && Model.MenuModelList != null && Model.MenuModelList.Count > 0)
- {
- int i = 0;
- foreach (T_Sys_ModuleFunctions rootNode in Model.MenuModelList)
- {
- if (i == 0)
- {
- <li class="layui-nav-item layui-nav-itemed">
- <a data-url="@rootNode.F_OptUrl"><i class="@rootNode.F_ImgUrl"></i> @rootNode.F_Name</a>
- @if (rootNode.ChildMenuModelList != null && rootNode.ChildMenuModelList.Count > 0)
- {
- <dl class="layui-nav-child">
- @foreach (T_Sys_ModuleFunctions childNode in rootNode.ChildMenuModelList)
- {
- <dd><a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">@childNode.F_Name</a></dd>
- }
- </dl>
- }
- </li>
- }
- else
- {
- <li class="layui-nav-item">
- @if (rootNode.F_ModuleId > 0)
- {
- <a id="@rootNode.F_FunctionId" aname="@rootNode.F_Name" aicon="@rootNode.F_ImgUrl" data-url="@rootNode.F_OptUrl">
- <i class="@rootNode.F_ImgUrl defaultClass"></i> @rootNode.F_Name
- <sup class="layui-badge @rootNode.F_ModuleCode" style="display:none;margin-left:155px;">0</sup>
- </a>
- }
- else
- {
- if (rootNode.F_FunctionId == 5)
- {
- <a id="@rootNode.F_FunctionId" aname="@rootNode.F_Name" aicon="@rootNode.F_ImgUrl" data-url="@rootNode.F_OptUrl"><i class="@rootNode.F_ImgUrl"></i> @rootNode.F_Name<sup style="position:inherit;margin-left:50px;" class="layui-badge totalOrderCount">0</sup></a>
- }
- else
- {
- <a id="@rootNode.F_FunctionId" aname="@rootNode.F_Name" aicon="@rootNode.F_ImgUrl" data-url="@rootNode.F_OptUrl"><i class="@rootNode.F_ImgUrl"></i> @rootNode.F_Name</a>
-
- }
- }
- @if (rootNode.ChildMenuModelList != null && rootNode.ChildMenuModelList.Count > 0)
- {
- <dl class="layui-nav-child">
- @foreach (T_Sys_ModuleFunctions childNode in rootNode.ChildMenuModelList)
- {
- if (childNode.F_FunctionId == 16)
- {
- <dd>
- <a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">
- @childNode.F_Name
- <sup class="layui-badge orderNeedCount" style="margin-left:75px;">0</sup>
- </a>
- </dd>
- }
- else if (childNode.F_FunctionId == 17)
- {
- <dd>
- <a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">
- @childNode.F_Name
- <sup class="layui-badge orderCount" style="margin-left:75px;">0</sup>
- </a>
- </dd>
- }
- else if (childNode.F_FunctionId == 18)
- {
- <dd>
- <a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">
- @childNode.F_Name
- <sup class="layui-badge orderCount" style="margin-left:75px;">0</sup>
- </a>
- </dd>
- }
- else if (childNode.F_FunctionId == 69)
- {
- <dd>
- <a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">
- @childNode.F_Name
- <sup class="layui-badge orderCountWb" style="margin-left:75px;">0</sup>
- </a>
- </dd>
- }
- else
- {
- <dd><a id="@childNode.F_FunctionId" aname="@childNode.F_Name" aicon="" data-url="@childNode.F_OptUrl">@childNode.F_Name</a></dd>
- }
- }
- </dl>
- }
- </li>
- }
- i++;
- }
- }
- </ul>
- </div>
- </div>
- <!-- 右侧内容 -->
- <div class="layui-body layui-form">
- <div class="layui-tab mag0" lay-filter="bodyTab" id="top_tabs_box">
- <div class="switchover1">
- <i class="switcRight layui-icon"></i>
- </div>
- <ul class="layui-tab-title top_tab" id="top_tabs">
- <li class="layui-this maintabframecss" lay-id="maintab_index"><i class="layui-icon"></i> <cite openid="-1">首页</cite></li>
- </ul>
- <!--tab 滑动-->
- <div class="switchover">
- <i class="switcLeft layui-icon"></i>
- </div>
- <ul class="layui-nav closeBox">
- <li class="layui-nav-item">
- <a href="javascript:;"><i class="layui-icon caozuo"></i> 操作</a>
- <dl class="layui-nav-child">
- <dd>
- <a href="javascript:;" class="refresh refreshThis"><i class="layui-icon">ဂ</i> 刷新当前</a>
- </dd>
- <dd>
- <a href="javascript:;" class="closePageOther"><i class="layui-icon">ဇ</i> 关闭其他</a>
- </dd>
- <dd>
- <a href="javascript:;" class="closePageAll"><i class="layui-icon">ဆ</i> 关闭全部</a>
- </dd>
- </dl>
- </li>
- </ul>
- <div class="layui-tab-content clildFrame">
- <div id="mainframeTab_index" class="layui-tab-item layui-show">
- <iframe id="mainframe_index" src="/Main/IndexCenter"></iframe>
- </div>
- </div>
- </div>
- </div>
- <!-- 底部 -->
- <div class="layui-footer footer">
- <div style="float: left; padding-left: 8px;" id="TelState">
- <div style="float: left; padding-top: 4px;">
- 服务状态:
- </div>
- <div style="float: left; padding-top: 3px;">
- <img id="imgServerState" src="/Content/images/server0.png" alt="未连接" />
- </div>
- <div style="float: left; padding-top: 3px;">
- 坐席状态:
- </div>
- <div style="float: left; padding-top: 3px;">
- <img id="imgAgentState" src="/Content/images/zx2.png" alt="未登录" />
- </div>
- <div style="float: left; padding-top: 3px;">
- 排队数量:
- </div>
- <div style="float: left; padding-top: 3px;">
- <span id="spanqueuingnum" class="layui-badge">0</span>
- </div>
- <div style="float: left; padding-top: 3px;">
- <span id="spanServerRes" style="color: #eeeeee;"></span>
- </div>
- </div><div style="float:right;"><p><span>© 版权所有 郑州市轨道交通</span></p></div>
- </div>
- </div>
- <!-- 移动导航 -->
- @*<div class="site-tree-mobile"><i class="layui-icon"></i></div>
- <div class="site-mobile-shade"></div>*@
- <script type="text/javascript">
- function OpenOtherForm(title, url) {
- window.open(url, title);
- //top.OCX_OpenOtherForm(title, url);
- }
- </script>
- <script src="/Content/layui/layui.js"></script>
- <script src="/Content/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
- @*<script type="text/javascript" src="/Content/js/index.js" charset="utf-8"></script>*@
- <script type="text/javascript" src="/Content/js/cache.js"></script>
- <script src="/Content/js/myindex.js" type="text/javascript" charset="utf-8"></script>
- <script src="~/Content/js/passWord/pwdValueDate.js"></script>
- <script>
- layui.use(['layer', 'jquery'], function () {
- var form = layui.form,
- layer = parent.layer === undefined ? layui.layer : parent.layer,
- $ = layui.jquery;
- $(".fa-whatsapp").click(function () {
- if ($("#HdIswin").val()) {
- layer.open({
- type: 2,
- anim: 4,
- scrollbar: false,
- content: '/Main/PhoneCall',
- area: ['400px', '420px'],
- id: 'PhoneCall',
- title: '软电话'
- });
- }
- else {
- layer.msg('无权限', { icon: 5, time: 2000 });
- return;
- }
- });
- })
- </script>
- <script type="text/javascript">
- function telajaxopt(opturl) {
- var r = "";
- try {
- $.ajax({
- type: 'get',
- url: opturl,
- dataType: 'html',
- async: false,
- cache: false,
- success: function (res) {
- r = res;
- }
- });
- }
- catch (e) {
- //$.ligerDialog.error(e.message);
- }
- return r;
- }
- //电话操作事件
- //话机状态改变事件
- function OnPhoneStatusNotify(status) {
- var timeno = new Date().getTime();
- //document.getElementById("spanServerRes").innerHTML = "状态:" + status;
- }
- //获取APPID
- function GetAPPID() {
- var cid = OCX_GetCallID("");
- //更新APPID
- return cid;
- }
- function UpdateRecPath() {
- var appid = "";
- appid = GetAPPID();
- var timeno = new Date().getTime();
- var callID = document.getElementById("CallHjbh").value;
- telajaxopt("/OCXOpt/OCXOptCallAjax/?optaction=luyinEvent&callid=" + callID + "&path=" + appid + "&timeno=" + timeno); //录音开始事件
- }
- //来电弹屏事件
- function Form_callCommingCaller(callerNum, CBnumber, callednum) {
- becallout = false;
- becallcome = true;
- document.getElementById("forZYnumber").value = callerNum;
- document.getElementById("callnum").value = callerNum;
- var timeno = new Date().getTime();
- try {
- var userid = document.getElementById("txtAgentId").value;
- var usercode = document.getElementById("txtLabourwork").value;
- var username = document.getElementById("txtAgentName").value;
- var extnumber = document.getElementById("txtPhoneNum").value;
- //获取呼叫编号
- //var callid = parent.telajaxopt("../telmanage/ajax/telrecords.ashx?action=getCallIdByPhone&telphone=" + callerNum);
- document.getElementById("CallHjbh").value = CBnumber;
- username = encodeURI(username);
- var opturl = "/OCXOpt/OCXOptCallAjax/?optaction=zhenlingEvent&timeno=" + timeno + "&callid=" + CBnumber + "&userid=" + userid + "&usercode=" + usercode + "&username=" + username + "&extnumber=" + extnumber + "&callernum=" + callerNum;
- $.ajax({
- type: 'get',
- url: opturl,
- dataType: 'html',
- async: false,
- cache: false,
- success: function (res) {
- if (res != "error") {
- var urlstr = "/CallRecord/CallScreen/?callid=" + CBnumber + "&phone=" + callerNum + "&workOrderNum=" + res;
- //多窗口模式,层叠置顶
-
- OpenTelLayer(callerNum + '-来电[编号:' + CBnumber + ']', urlstr);
- //document.getElementById("mainframe").src = "/CallRecord/CallScreen/?workOrderNum=" + res;
- }
- }
- });//更新摘机事件
- } catch (e) {
- alert(e.Message);
- }
- //f_addTab('callin_' + CBnumber + callerNum, callerNum + '来电', '../telmanage/callinoptbbzx.aspx?callid=' + CBnumber + "&phone=" + callerNum + "&timeno=" + timeno);
- }
- //录音成功
- function Form_callComming(callerNum, parth) {
- var timeno = new Date().getTime();
- telajaxopt("/OCXOpt/OCXOptCallAjax/?optaction=luyinEvent&callid=" + document.getElementById("CallHjbh").value + "&path=" + parth + "&timeno=" + timeno); //录音开始事件
- //Form_setWinfromenble("True", "false", "false", "false", "True", "True", "True", "false", "false", "false");
- }
- function getCallerNum() {
- var calnum = document.getElementById("callnum").value;
- return calnum;
- }
- function clearCallerNum() {
- document.getElementById("callnum").value = "";
- }
- function getCallHjbh() {
- var cid = document.getElementById("CallHjbh").value;
- return cid;
- }
- function clearCallHjbh() {
- document.getElementById("CallHjbh").value = "";
- }
- </script>
- <script>
- var tellayercount = 0;
- var nowtime = "";
- var arrLayerTime = new Array();
- function ShowLayerByTimes(times) {
- nowtime = times;
- var aid = "layui-layer" + times;
- //$('#' + aid).show();
- $("#" + aid).find(".layui-layer-max").click();
- }
- function CloseLayerByTimes(times) {
- var aid = "layui-layer" + times;
- //$('#' + aid).show();
- $("#" + aid).find(".layui-layer-close").click();
- }
- function CloseLayerNow() {
- var aid = "layui-layer" + nowtime;
- //$('#' + aid).show();
- $("#" + aid).find(".layui-layer-close").click();
- }
- function InitTelLayerList() {
- var html = "";
- for (var ai = 0; ai < arrLayerTime.length; ai++) {
- var atime = arrLayerTime[ai];
- var aid = "layui-layer" + atime;
- var title = $('#' + aid + ' .layui-layer-title').text();
- var sindex = title.indexOf('-');
- title = title.substr(0, sindex);
- html += "<dd><a href=\"javascript:ShowLayerByTimes(" + atime + ");\" ><i class=\"fa fa-phone\"></i><cite>" + title + "</cite></a></dd>";
- }
- $('#telLayerInfoChild').html(html);
- }
- function CloseOpenTel(atime) {
- tellayercount--;
- if (tellayercount <= 0) {
- tellayercount = 0;
- document.getElementById("telLayerInfo").style.display = "none";
- }
- document.getElementById("supLayerCount").innerHTML = tellayercount;
- //var atime = layero.attr("times");
- var sindex = arrLayerTime.indexOf(atime);
- if (sindex > -1) {
- arrLayerTime.splice(sindex, 1);
- }
- InitTelLayerList();
- }
- function OpenTelLayer(t, urlSrc) {//多窗口模式,层叠置顶
- layui.use(['element', 'layer'], function () {
- var element = layui.element,
- layer = layui.layer; //获得layer模块
- layer.open({
- type: 2 //此处以iframe举例
- , title: t
- , area: ['80%', '80%']
- , shade: 0
- , maxmin: true
- , content: urlSrc
- , zIndex: layer.zIndex //重点1
- , success: function (layero) {
- tellayercount++;
- document.getElementById("supLayerCount").innerHTML = tellayercount;
- document.getElementById("telLayerInfo").style.display = "inline";
- layer.setTop(layero); //重点2
- nowtime = layero.attr("times");
- arrLayerTime.push(layero.attr("times"));
- InitTelLayerList();
- }, min: function (layero) {
- //setTimeout(function () { layero.css({ left:"180px",width:"280px" }); }, 0);
- //alert(layero.attr("times"));
- //var w = document.body.clientWidth;
- //var rowcount = w / 181;
- //for (var i = 0; i < arrLayerTime.length; i++) {
- // var atime = arrLayerTime[i];
- // var id = "layui-layer" + atime;
- // var obj = document.getElementById(id);
- //}
- var atime = layero.attr("times");
- var aid = "layui-layer" + atime;
- //$('#' + aid).hide();
- setTimeout(function () { layero.css({ width: "0px", height: "0px" }); }, 0);
- }, cancel: function (index, layero) {
- CloseOpenTel(layero.attr("times"));
- }
- });
- });
- }
- function tabMove() {
- $(window).on("resize", function (event) {
- var topTabsBox = $("#top_tabs_box"),
- topTabsBoxWidth = $("#top_tabs_box").width(),
- topTabs = $("#top_tabs"),
- topTabsWidth = $("#top_tabs").width(),
- tabLi = topTabs.find("li.layui-this"),
- top_tabs = document.getElementById("top_tabs"),
- event = event || window.event;
- try {
- if (topTabsWidth > topTabsBoxWidth) {
- if (tabLi.position().left > topTabsBoxWidth || tabLi.position().left + topTabsBoxWidth > topTabsWidth) {
- topTabs.css("left", topTabsBoxWidth - topTabsWidth);
- } else {
- topTabs.css("left", -tabLi.position().left);
- }
- //拖动效果
- var flag = false;
- var cur = {
- x: 0,
- y: 0
- }
- var nx, dx, x;
- function down() {
- flag = true;
- var touch;
- if (event.touches) {
- touch = event.touches[0];
- } else {
- touch = event;
- }
- cur.x = touch.clientX;
- dx = top_tabs.offsetLeft;
- }
- function move() {
- var self = this;
- if (flag) {
- window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
- var touch;
- if (event.touches) {
- touch = event.touches[0];
- } else {
- touch = event;
- }
- nx = touch.clientX - cur.x;
- x = dx + nx;
- if (x > 0) {
- x = 0;
- } else {
- if (x < topTabsBoxWidth - topTabsWidth) {
- x = topTabsBoxWidth - topTabsWidth;
- } else {
- x = dx + nx;
- }
- }
- top_tabs.style.left = x + "px";
- //阻止页面的滑动默认事件
- document.addEventListener("touchmove", function () {
- event.preventDefault();
- }, false);
- }
- }
- //鼠标释放时候的函数
- function end() {
- flag = false;
- }
- //pc端拖动效果
- topTabs.on("mousedown", down);
- topTabs.on("mousemove", move);
- $(document).on("mouseup", end);
- //移动端拖动效果
- topTabs.on("touchstart", down);
- topTabs.on("touchmove", move);
- topTabs.on("touchend", end);
- } else {
- //移除pc端拖动效果
- topTabs.off("mousedown", down);
- topTabs.off("mousemove", move);
- topTabs.off("mouseup", end);
- //移除移动端拖动效果
- topTabs.off("touchstart", down);
- topTabs.off("touchmove", move);
- topTabs.off("touchend", end);
- topTabs.removeAttr("style");
- return false;
- }
- }
- catch (e) {
- alert(e.message);
- }
- }).resize();
- }
- var tabFilter, menu = [], liIndex, curNav, delMenu,
- changeRefreshStr = window.sessionStorage.getItem("changeRefresh");
- layui.use('element', function () {
- //var element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
- var element = layui.element,
- $ = layui.$,
- layId,
- Tab = function () {
- this.tabConfig = {
- openTabNum: undefined, //最大可打开窗口数量
- tabFilter: "bodyTab", //添加窗口的filter
- url: undefined //获取菜单json地址
- }
- };
- //通过title获取lay-id
- Tab.prototype.getLayId = function (title) {
- $(".layui-tab-title.top_tab li").each(function () {
- if ($(this).find("cite").text() == title) {
- layId = $(this).attr("lay-id");
- }
- })
- return layId;
- }
- //通过title判断tab是否存在
- Tab.prototype.hasTab = function (title) {
- var tabIndex = -1;
- $(".layui-tab-title.top_tab li").each(function () {
- if ($(this).find("cite").text() == title) {
- tabIndex = 1;
- }
- })
- return tabIndex;
- }
- function AddTabPage(aid, aicon, nullicon, aname, urlSrc) {
- var timeno = new Date().getTime();
- var tabIndex = -1;
- $(".layui-tab-title.top_tab li").each(function () {
- if ($(this).attr("lay-id") == 'maintab_' + aid + '') {
- tabIndex = 1;
- }
- })
- if (tabIndex != 1) {
- //新增一个Tab项
- element.tabAdd('bodyTab', {
- title: '<i class=\"' + aicon + '\">' + nullicon + '</i> <cite openid=\"' + aid + '\">' + aname + '</cite><i class=\"layui-icon layui-unselect layui-tab-close\">ဆ</i>'
- , content: '<iframe id=\"mainframe_' + aid + '\" src=\"' + urlSrc + '?timeno=' + timeno + '\"></iframe>'
- , id: 'maintab_' + aid + '' //实际使用一般是规定好的id,这里以时间戳模拟下
- })
- }
- element.tabChange('bodyTab', 'maintab_' + aid + '');
- tabMove(); //顶部窗口是否可滚动
- }
- var pwd = $("#Password").val();
- if (checkStrong(pwd) == "0" || checkStrong(pwd) == "1") {
- layer.open({
- content: '密码等级太低,请先修改密码'
- , btn: ['好的', '稍后再去']
- , yes: function (index, layero) {
- layer.close(index);
- AddTabPage('editpsd', 'fa fa-lock', '', '修改密码','/SystemManage/UserPwdEdit');
- //document.getElementById("mainframe").src = "/SystemManage/UserPwdEdit";
- }
- });
- }
- $("#userpwd").click(function () {
- //document.getElementById("mainframe").src = "/SystemManage/UserPwdEdit";
- AddTabPage('editpsd', 'fa fa-lock', '', '修改密码', '/SystemManage/UserPwdEdit');
- });
- $("#customerphone").click(function () {
- //document.getElementById("mainframe").src = "/HrEmployeeBase/EmployeeSearchList";
- AddTabPage('emplist', 'layui-icon layui-icon-form', '', '通讯录', '/HrEmployeeBase/EmployeeSearchList');
- //layer.open({
- // type: 2,
- // anim: 4,
- // scrollbar: false,
- // content: '/HrEmployeeBase/EmployeeSearchList',
- // area: ['1000px', '500px'],
- // id: 'UserInfo',
- // title: '通讯录'
- //});
- });
- $("#userinfo").click(function () {
- //document.getElementById("mainframe").src = "/SystemManage/UserView";
- AddTabPage('userinfo', 'fa fa-user', '', '个人信息', '/SystemManage/UserView');
- //layer.open({
- // type: 2,
- // anim: 4,
- // scrollbar: false,
- // content: '/SystemManage/UserView',
- // area: ['800px', '500px'],
- // id: 'UserInfo',
- // title: '个人信息'
- //});
- });
- //转主页
- $(".logo").on("click", function () { //此处添加禁止连续点击刷新一是为了降低服务器压力,另外一个就是为了防止超快点击造成chrome本身的一些js文件的报错(不过貌似这个问题还是存在,不过概率小了很多)
- var tabIndex = -1;
- $(".layui-tab-title.top_tab li").each(function () {
- if ($(this).attr("lay-id") == 'maintab_index') {
- tabIndex = 1;
- }
- })
- if (tabIndex != 1) {
- var timeno = new Date().getTime();
- //新增一个Tab项
- element.tabAdd('bodyTab', {
- title: '<i class=\"layui-icon\"></i> <cite openid=\"-1\">首页</cite>'
- , content: '<iframe id=\"mainframe_index\" src=\"/Main/IndexCenter?timeno=' + timeno + '\"></iframe>'
- , id: 'maintab_index' //实际使用一般是规定好的id,这里以时间戳模拟下
- })
- }
- element.tabChange('bodyTab', 'maintab_index');
- tabMove(); //顶部窗口是否可滚动
- })
- //删除tab
- $("body").on("click", ".top_tab li i.layui-tab-close", function () {
- try {
- //删除tab后重置session中的menu和curmenu
- liIndex = $(this).parent("li").index();
- element.tabDelete("bodyTab", $(this).parent("li").attr("lay-id")).init();
- tabMove();
- }
- catch(e)
- { }
- })
- //刷新当前
- $(".refresh").on("click", function () { //此处添加禁止连续点击刷新一是为了降低服务器压力,另外一个就是为了防止超快点击造成chrome本身的一些js文件的报错(不过貌似这个问题还是存在,不过概率小了很多)
- try {
- if ($(this).hasClass("refreshThis")) {
- $(this).removeClass("refreshThis");
- $(".clildFrame .layui-tab-item.layui-show").find("iframe")[0].contentWindow.location.reload();
- setTimeout(function () {
- $(".refresh").addClass("refreshThis");
- }, 2000)
- } else {
- layer.msg("您点击的速度超过了服务器的响应速度,还是等两秒再刷新吧!");
- }
- }
- catch (e) { }
- })
- //关闭其他
- $(".closePageOther").on("click", function () {
- try {
- if ($("#top_tabs li").length > 2 && $("#top_tabs li.layui-this cite").text() != "首页") {
- $("#top_tabs li").each(function () {
- if ($(this).attr("lay-id") != 'maintab_index' && !$(this).hasClass("layui-this")) {
- element.tabDelete("bodyTab", $(this).attr("lay-id")).init();
- }
- })
- } else if ($("#top_tabs li.layui-this cite").text() == "首页" && $("#top_tabs li").length > 1) {
- $("#top_tabs li").each(function () {
- if ($(this).attr("lay-id") != 'maintab_index' && !$(this).hasClass("layui-this")) {
- element.tabDelete("bodyTab", $(this).attr("lay-id")).init();
- }
- })
- } else {
- layer.msg("没有可以关闭的窗口了");
- }
- //渲染顶部窗口
- tabMove();
- }
- catch (e) { }
- })
- //关闭全部
- $(".closePageAll").on("click", function () {
- try {
- if ($("#top_tabs li").length > 1) {
- $("#top_tabs li").each(function () {
- if ($(this).attr("lay-id") != 'maintab_index') {
- element.tabDelete("bodyTab", $(this).attr("lay-id")).init();
- }
- })
- } else {
- layer.msg("没有可以关闭的窗口了");
- }
- //渲染顶部窗口
- tabMove();
- }
- catch (e) { }
- })
- //通过title获取lay-id
- Tab.prototype.getLayId = function (title) {
- $(".layui-tab-title.top_tab li").each(function () {
- if ($(this).find("cite").text() == title) {
- layId = $(this).attr("lay-id");
- }
- })
- return layId;
- }
- //监听导航点击
- element.on('nav(demo)', function (elem) {
- //console.log(elem)
- // layer.msg(elem.text());
- var urlSrc = $(this).find("a").attr("data-url");
- var aname = $(this).find("a").attr("aname");
- var aid = $(this).find("a").attr("id");
- var aicon = $(this).find("a").attr("aicon");
- var nullicon = "";
- if (aicon == "") {
- aicon = "layui-icon layui-icon-tabs";
- nullicon = "";
- }
- var cssClass = $(this).find("a").find("i").attr("class");
- if (cssClass != null && (cssClass.indexOf("fa-weibo") > 0 || cssClass.indexOf("fa-weixin")) && cssClass.indexOf("selectClass") <= 0) {
- alert("未签入!")
- return;
- }
- var timeno = new Date().getTime();
- if (urlSrc != "") {
- if (urlSrc == "/ScreenDisplay/MainScreen") {
- OpenOtherForm("郑州地铁客服中心大屏数据展示", "http://" + window.location.host + urlSrc + "/");
- }
- else {
- if (urlSrc.indexOf("CallRecord/CallScreen") >= 0) {
- OpenTelLayer('18695836988-来电', urlSrc);
- }
- else {
- if (urlSrc.indexOf('?') < 0) {
- //document.getElementById("mainframe").src = urlSrc + "?timeno=" + timeno + "";
- var tabIndex = -1;
- $(".layui-tab-title.top_tab li").each(function () {
- if ($(this).attr("lay-id") == 'maintab_' + aid + '') {
- tabIndex = 1;
- }
- })
- if (tabIndex != 1) {
- //新增一个Tab项
- element.tabAdd('bodyTab', {
- title: '<i class=\"' + aicon + '\">' + nullicon + '</i> <cite openid=\"' + aid + '\">' + aname + '</cite><i class=\"layui-icon layui-unselect layui-tab-close\">ဆ</i>'
- , content: '<iframe id=\"mainframe_' + aid + '\" scrolling=\"auto\" src=\"' + urlSrc + '?timeno=' + timeno + '\"></iframe>'
- , id: 'maintab_' + aid + '' //实际使用一般是规定好的id,这里以时间戳模拟下
- })
- }
- element.tabChange('bodyTab', 'maintab_' + aid + '');
- tabMove(); //顶部窗口是否可滚动
- }
- else {
- //document.getElementById("mainframe").src = urlSrc + "&timeno=" + timeno + "";
- try {
- var tabIndex = -1;
- $(".layui-tab-title.top_tab li").each(function () {
- if ($(this).attr("lay-id") == 'maintab_' + aid + '') {
- tabIndex = 1;
- }
- })
- if (tabIndex != 1) {
- //新增一个Tab项
- element.tabAdd('bodyTab', {
- title: '<i class=\"' + aicon + '\">' + nullicon + '</i> <cite openid=\"' + aid + '\">' + aname + '</cite><i class=\"layui-icon layui-unselect layui-tab-close\">ဆ</i>'
- , content: '<iframe id=\"mainframe_' + aid + '\" scrolling=\"auto\" src=\"' + urlSrc + '&timeno=' + timeno + '\"></iframe>'
- , id: 'maintab_' + aid + '' //实际使用一般是规定好的id,这里以时间戳模拟下
- })
- }
- element.tabChange('bodyTab', 'maintab_' + aid + '');
- //setTimeout(alert(1), 5000);
- tabMove(); //顶部窗口是否可滚动
- //if (aid == "2" || aid == "3") {
- // alert("加载完成");
- //}
- }
- catch (e) {
- alert(e.message);
- }
- }
- }
- }
- //if (urlSrc.indexOf('?') < 0) {
- // document.getElementById("mainframe").src = urlSrc + "?timeno=" + timeno + "";
- //}
- //else {
- // document.getElementById("mainframe").src = urlSrc + "&timeno=" + timeno + "";
- //}
- }
- });
- });
- $("#navBar .layui-nav-item").click(function () {
- $("#navBar .layui-nav-item").removeClass("layui-nav-itemed");
- $("#navBar .layui-nav-item").removeClass("layui-this");
- if ($(this).has('dl').length) {//如果有子菜单,显示下拉样式
- $(this).addClass("layui-nav-itemed");
- } else {//如果没有子菜单,显示菜单项样式
- $(this).addClass("layui-this");
- }
- });
- </script>
- </body>
- <script type="text/javascript">
- ///获取微信消息
- ///1、微信 2、微博
- function GetWxMessageCount(messageType, className) {
- $.ajax({
- url: "/OtherPage/GetWebChartCount",
- type: "get",
- contentType: "application/json",
- dataType: "text",
- cache: false,
- data: { "pageType": messageType },
- success: function (result, status) {
- if (status) {
- $(className).html(result);
- }
- }
- });
- }
- //微信
- var wX;
- function wXTimedCount() {
- GetWxMessageCount(1, ".wXCount");
- wX = setTimeout("wXTimedCount()", 5000)
- }
- $(".btnWX").click(function () {
- var rgs = $(".fa-weixin").hasClass("defaultClass");
- if (rgs) {
- $(".fa-weixin").removeClass("defaultClass");
- $(".fa-weixin").addClass("selectClass");
- $(".wXCount").css("display", "block");
- wXTimedCount();
- }
- else {
- $(".fa-weixin").removeClass("selectClass");
- $(".fa-weixin").addClass("defaultClass");
- $(".wXCount").css("display", "none");
- clearTimeout(wX);
- }
- });
- //微博
- var wB;
- function wBTimedCount() {
- GetWxMessageCount(2, ".wBCount");
- wB = setTimeout("wBTimedCount()", 5000)
- }
- $(".btnWB").click(function () {
- var rgs = $(".fa-weibo").hasClass("defaultClass");
- if (rgs) {
- $(".fa-weibo").removeClass("defaultClass");
- $(".fa-weibo").addClass("selectClass");
- $(".wBCount").css("display", "block");
- wBTimedCount();
- }
- else {
- $(".fa-weibo").removeClass("selectClass");
- $(".fa-weibo").addClass("defaultClass");
- $(".wBCount").css("display", "none");
- clearTimeout(wB);
- }
- });
- //待办工单
- function MyOrderCount() {
- try
- {
- //补录工单
- if ($(".orderNeedCount") != undefined) {
- $.ajax({
- url: "/OtherPage/GetMyOrderNeedCount/",
- type: "get",
- contentType: "application/json",
- dataType: "text",
- cache: false,
- data: null,
- success: function (result, status) {
- if (status) {
-
- $(".orderNeedCount").html(result);
- }
- }
- });
-
- }
- //微博工单//orderCountWb
- //if ($(".orderCountWb") != undefined) {
- // $.ajax({
- // url: "/OtherPage/GetMyOrderCountWb/",
- // type: "get",
- // contentType: "application/json",
- // dataType: "text",
- // cache: false,
- // data: null,
- // success: function (result, status) {
- // if (status) {
- // $(".orderCountWb").html(result);
- // }
- // }
- // });
- //}
- //待办工单
- if ($(".orderCount") != undefined) {
- $.ajax({
- url: "/OtherPage/GetMyOrderCount/",
- type: "get",
- contentType: "application/json",
- dataType: "text",
- cache: false,
- data: null,
- success: function (result, status) {
- if (status) {
-
- $(".orderCount").html(result);
- }
- }
- });
-
- }
- if ($(".orderCount") != undefined || $(".orderNeedCount") != undefined)
- {
- var totalOrderCount = 0;
- var myOrderCount = 0;
- var myNeedCount = 0;
- var myorderCountWb = 0;
- if ($(".orderCount") != undefined)
- {
- myOrderCount = $(".orderCount").html();
- }
- if ($(".orderNeedCount") != undefined) {
- myNeedCount = $(".orderNeedCount").html();
- }
- //orderCountWb
- //if ($(".orderCountWb") != undefined) {
- // myorderCountWb = $(".orderCountWb").html();
- //}
- totalOrderCount = parseInt(myOrderCount) + parseInt(myNeedCount);
- $(".totalOrderCount").html(totalOrderCount);
- setTimeout("MyOrderCount()", 5000);
- }
- }
- catch(e)
- {
- }
-
- }
- //获取待办工单数量
- MyOrderCount();
- </script>
- </html>
|