rushfee/resource/html/index2.html

1062 lines
46 KiB
HTML
Raw Normal View History

2022-05-16 15:07:40 +00:00
<html auth="false" import="layout,outlook">
<head>
<title>系统</title>
<!-- 消息模块 -->
<script type="text/javascript" src="www/lib/jquery/plugin/jquery.tmpl.js"></script>
<link rel="stylesheet" type="text/css" href="www/aos/mainui/message/message.css">
<script type="text/javascript" src="www/aos/mainui/message/message.js"></script>
<!-- 电话呼叫 -->
<script src="www/scripts/japp.js" type="text/javascript"></script>
<script src="www/PhoneBar.min.js" type="text/javascript"></script>
<script src="www/jbarextent.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="www/jquery-easyui-1.4/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="www/jquery-easyui-1.4/themes/icon.css" />
<script type="text/javascript" src="www/jquery-easyui-1.4/jquery.easyui.min.js"></script>
<script type="text/javascript" src="www/jquery-easyui-1.4/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" type="text/css" href="www/newbar/css/PhoneBar.css"/>
<script type="text/javascript" src="www/newbar/js/PhoneBar.min.js"></script>
<link rel="stylesheet" type="text/css" href="www/newbar/skin/layer.css">
<script type="text/javascript" src="www/newbar/js/moment.min.js"></script>
<script type="text/javascript" src="www/newbar/js/zh-cn.js"></script>
<script type="text/javascript" src="www/newbar/layer.js"></script>
<!-- 主界面的快捷方式 -->
<script type="text/javascript" src="www/lib/jquery/plugin/Tdrag.min.js"></script>
<link rel="stylesheet" type="text/css" href="www/aos/mainui/shortcut/shortcut.css">
<script type="text/javascript" src="www/aos/mainui/shortcut/shortcut.js"></script>
<!-- ztree -->
<script type="text/javascript" src="www/lib/jquery/plugin/jquery.mousewheel.js"></script>
<script type="text/javascript" src="www/lib/ztree/js/jquery.ztree.core.js"></script>
<script type="text/javascript" src="www/lib/ztree/js/jquery.ztree.excheck.min.js"></script>
<script type="text/javascript" src="www/lib/ztree/js/jquery.ztree.exedit.min.js"></script>
<link rel="stylesheet" type="text/css" href="www/aos/mainui/index2/css/zTreeStyle.css">
<script type="text/javascript" src="www/aos/mainui/index2/js/ztree.js"></script>
<!--主界面按钮事件公用js -->
<script type="text/javascript" src="www/aos/mainui/index/index.js"></script>
<!-- 当前主界面的css-->
<link rel="stylesheet" type="text/css" href="www/aos/mainui/index2/css/index2.css" id="pageCss"/>
<!-- 多语言 -->
<script type="text/javascript" src="www/i18n/{{language}}/mainui_i18n.js"></script>
<!--huawei script-->
<script type="text/javascript" src="www/huaweiScripts/config/agentconfig.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/fileutils.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/i18n.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/language/demo.agentapp.lang.string.js" charset="utf-8"></script>
<!--<script type="text/javascript" src="www/huaweiScripts/ext.js" charset="utf-8"></script>-->
<!--<link type="text/css" rel="stylesheet" href="www/huaweiScripts/css.css"/>-->
<script type="text/javascript" src="www/huaweiScripts/ocx/interface/wndui.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/ocx/interface/icsclient.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/ocx/interface/conference.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/ocx/interface/voice.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/ocx/interface/agent_interface.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/main.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/common/util.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/common/agentdialog.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/eventHandle.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/demo/agentapp/userstate.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/state/voice.state.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/state/agent.state.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/state/conference.state.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/state/wndui.state.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/demo/agentapp/ui/agent.ui.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/demo/agentapp/ui/voice.ui.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/demo/agentapp/ui/conference.ui.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/demo/agentapp/ui/wndui.ui.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/demo/agentapp/agentappdemo.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/demo/agentapp/agentappdemo_main.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/ocx/event/common/agentEvent.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/ocx/event/common/conferenceEvent.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/ocx/event/common/voiceEvent.js" charset="utf-8"></script>
<script type="text/javascript" src="www/huaweiScripts/ocx/event/common/wnduiEvent.js" charset="utf-8"></script>
<!--huawei script end-->
</head>
<body onbeforeunload="destroy();">
<div id="test1" style="display: none;width: 0px;height:0px"></div>
<div id="mainLayout" widget="layout" style="width:100%;height:100%;">
<div title="north" region="north" class="notrhhead" bodyStyle="overflow:hidden;" height="70" showHeader="false" showSplit="false" allowResize="false" splitSize="1">
<style>
#logo1{ position: absolute; top: 3px;left: 15px;background-repeat: no-repeat;
font-family: "微软雅黑","Helvetica Neue",Helvetica,Arial,sans-serif;font-size: 24px;color: #567a96;
cursor: default;line-height: 64px;}
#CallBar{ background-repeat: no-repeat;
font-family: "微软雅黑","Helvetica Neue",Helvetica,Arial,sans-serif;font-size: 12px;color: red;
cursor: pointer;line-height: 17px;}
#CallBar_new{ background-repeat: no-repeat;
font-family: "微软雅黑","Helvetica Neue",Helvetica,Arial,sans-serif;font-size: 12px;color: red;
cursor: pointer;line-height: 17px;}
#hwInit{ background-repeat: no-repeat;
font-family: "微软雅黑","Helvetica Neue",Helvetica,Arial,sans-serif;font-size: 12px;color: red;
cursor: pointer;line-height: 17px;}
#CallBar_new_new{ background-repeat: no-repeat;
font-family: "微软雅黑","Helvetica Neue",Helvetica,Arial,sans-serif;font-size: 12px;color: red;
cursor: pointer;line-height: 17px;}
</style>
<div id="logo1" style="background-image:url('www/aos/mainui/index/logo.png');padding-left:200px;">服务费综合管理系统</div>
<div class="topNav">
<div class="top_text">
<span id="infoArea"></span>
<input id="orgnId" widget="hidden"/><span id="separator">&nbsp;|&nbsp;</span>
<span id="orgnNameText" ><msg name="mainui.index.msg.orgn"/></span>
<span id="orgnName" onclick="switchOrgn();" style="text-decoration: underline;margin-right :20px;"></span>
&nbsp;|&nbsp;
<span id="CallBar" onclick="window_onload();" style="text-decoration: underline;">初始化老电话条</span>
&nbsp;|&nbsp;
<!--<span id="CallBar_new" onclick="initNewBar();" style="text-decoration: underline;">初始化电话条</span>-->
<span id="CallBar_new_new" onclick="initNewnewBar();" style="text-decoration: underline;">2021</span>
&nbsp;|&nbsp;
<span id="hwInit" onclick="initHuawei();" style="text-decoration: underline;">初始化华为控件</span>
<input id="info" widget="hidden" />
<input id="customer_id" widget="hidden" />
<input id="end_date" widget="hidden" />
<input id="CallJS" widget="hidden" />
<input id="message" widget="hidden" />
<input id="message1" widget="hidden" />
<input id="logid" widget="hidden" />
<input id="newbarInit" widget="hidden" value="0" />
<input id="newnewbarInit" widget="hidden" value="0" />
</div>
<span class="top_icon" style="margin-right:10px;">
<a id="noticeNumbers" widget="button" plain="true" iconCls="icon-bell" tooltip="{{mainui.index.widget.message.management}}" onclick="openMsg" bgcolor="false"></a>
<a widget="button" plain="true" iconCls="icon-setup" tooltip="{{mainui.index.widget.personal.setting}}" onclick="openUserParam" bgcolor="false"></a>
<a widget="button" plain="true" iconCls="icon-all" tooltip="{{mainui.index.widget.auxiliary.component}}" onclick="openAssist" bgcolor="false"></a>
<!-- <a widget="button" plain="true" iconCls="icon-help" tooltip="系统帮助" onclick="openHelp" bgcolor="false"></a> -->
<a widget="button" plain="true" iconCls="icon-exit" tooltip="{{mainui.index.widget.logout}}" onclick="logout" bgcolor="false"></a>
</span>
</div>
</div>
<div region="west" title="功能导航" showHeader="false" bodyStyle="padding-left:1px;" showSplitIcon="true" width="230" minWidth="190" maxWidth="350">
<!-- ztree -->
<div id="menuTree" class="ztree" style="width:100%;height:100%;background-color: #f0f5f8;"></div>
</div>
<!-- 中间内容区域 -->
<div title="center" region="center" style="border:0;">
<div id="mainTabs" widget="tabs" activeIndex="0" style="width:100%;height:100%;" showNavMenu="true" buttons="#mainTabsButtons" onbeforeopen="onBeforeOpen" contextMenu="#tabsMenu">
<!--
替换之前首页页面
<div name="first" title="{{mainui.index.firstpage.title}}" url="canvas/aos/portal/portal"></div>
-->
<div title="{{mainui.index.firstpage.title}}" url="canvas/aos/portal/portal1"></div>
</div>
</div>
</div>
<!-- tab右键菜单 -->
<ul id="tabsMenu" widget="contextmenu" onbeforeopen="onBeforeOpen">
<li onclick="closeTab"><msg name="mainui.index.msg.tabs.close"/></li><!-- iconCls="icon-exit" -->
<li onclick="closeAllBut"><msg name="mainui.index.msg.tabs.closeother"/></li><!-- iconCls="icon-exit" -->
<li onclick="closeAllButFirst"><msg name="mainui.index.msg.tabs.closeall"/></li><!-- iconCls="icon-closeAll" -->
</ul>
<!-- mainTabs右侧按钮 -->
<div id="mainTabsButtons">
<a widget="button" iconCls="icon-expand" plain="true" tooltip="{{mainui.index.widget.maximize}}" onclick="maxTabArea"></a>
<a widget="button" iconCls="icon-closeall" plain="true" tooltip="{{mainui.index.widget.closeall}}" onclick="closeAllButFirst"></a>
</div>
<div>
<!--初始化华为控件-->
<OBJECT ID="WndUiOcx" CLASSID="CLSID:C0EC67C2-CF8A-4E55-9AB3-8EF7E1BB1C94" VIEWASTEXT width=0 height=0></OBJECT>
<OBJECT ID="ConferenceOcx" CLASSID="CLSID:254C557B-CC4D-4258-98E8-EAC7DE31D0A3" VIEWASTEXT width=0 height=0></OBJECT>
<OBJECT ID="VoiceOcx" CLASSID="CLSID:0396287C-FEDD-4E49-866B-1CE1D2084390" VIEWASTEXT width=0 height=0></OBJECT>
<OBJECT ID="AgentOcx" CLASSID="CLSID:014D83A5-7E35-11D3-8AF9-00C0DF245E51" VIEWASTEXT width=0 height=0></OBJECT>
<input id="hwIsInit" widget="hidden" value="0" />
<input id="hwAgentId" widget="hidden" />
<input id="hwPhoneNo" widget="hidden" />
<input id="currentIP" widget="hidden" value={{session:IP}}/>
<input id="recordFileName" widget="hidden"/>
<input id="isCalling" widget="hidden" value="0"/>
<input id="callId" widget="hidden" value="0"/>
<input id="isrecdend" widget="hidden" value="0"/>
<input id="talktime" widget="hidden" value="0"/>
<input id="callIdStr" widget="hidden" value="0"/>
<!--1. Agent Ocx Events -->
<SCRIPT type="text/javascript" event="OnSignInExSuccess(MediaType)" for="AgentOcx">
AgentEventHandle("OnSignInExSuccess", MediaType);
document.getElementById('hwIsInit').value=1;
window.AgentOcx._ocx.SetLinkageType(true);
window.AgentOcx._ocx.AutoAnswer=true;
window.AgentOcx._ocx.AutoRelease=true;
alert("控件初始化完成!");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnSignInExFailure(MediaType)" for="AgentOcx">
AgentEventHandle("OnSignInExFailure", MediaType);
if(MediaType==0){
alert("初始化signIn失败"+MediaType);
}
</SCRIPT>
<SCRIPT type="text/javascript" event="OnSignOutExSuccess(MediaType)" for="AgentOcx">
AgentEventHandle("OnSignOutExSuccess", MediaType);
document.getElementById('hwAgentId').value='';
document.getElementById('hwPhoneNo').value='';
document.getElementById('hwIsInit').value=0;
</SCRIPT>
<SCRIPT type="text/javascript" event="OnSignOutExFailure(MediaType)" for="AgentOcx">
AgentEventHandle("OnSignOutExFailure", MediaType);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnLinkageResultNotify(result)" for="AgentOcx">
AgentEventHandle("OnLinkageResultNotify",result);
console.log("话机联动:"+result);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnLinkagePhoneStatus(State)" for="AgentOcx">
AgentEventHandle("OnLinkagePhoneStatus",State);
console.log("联动话机状态:"+State);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnLinkageCalloutNotify(Caller,Called)" for="AgentOcx">
AgentEventHandle("OnLinkageCalloutNotify",Caller,Called);
console.log("联动外呼通知事件Caller:"+Caller+",Called:"+Called);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnRecordSuccess()" for="AgentOcx">
AgentEventHandle("OnRecordSuccess");
console.log("录音状态:"+window.AgentOcx._ocx.RecordStatus);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnRecordSuccessEx(pCallID,Caller,Called,SelfRecFileName)" for="AgentOcx">
AgentEventHandle("OnRecordSuccessEx",pCallID,Caller,Called,SelfRecFileName);
var logPath = document.getElementById('recordFileName').value;
if(logPath==null||logPath==''){
document.getElementById('recordFileName').value="";
}else{
document.getElementById('recordFileName').value=logPath+',"SelfRecFileName":"'+SelfRecFileName+'","pCallID":"'+pCallID+'"';
}
console.log("录音success=>pcallid"+pCallID+";Caller"+Caller+";Called"+Called+";录音文件名2"+SelfRecFileName);
var callIdStr=window.AgentOcx._ocx.jsGetCallIDStr();
console.log("录音getCallInfo: callIdStr:"+callIdStr);
//document.getElementById("callIdStr").value=callIdStr+"";
var logPath = document.getElementById('recordFileName').value;
if(logPath==null||logPath==''){
document.getElementById('recordFileName').value="";
}else{
document.getElementById('recordFileName').value=logPath+',"callIdStr":"'+callIdStr+'"';
}
</SCRIPT>
<SCRIPT type="text/javascript" event="OnRecordFailure()" for="AgentOcx">
AgentEventHandle("OnRecordFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnStopRecordSuccess()" for="AgentOcx">
AgentEventHandle("OnStopRecordSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnStopRecordFailure()" for="AgentOcx">
AgentEventHandle("OnStopRecordFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnCallOutSuccess()" for="AgentOcx">
AgentEventHandle("OnCallOutSuccess");
document.getElementById('isCalling').value='1';
</SCRIPT>
<SCRIPT type="text/javascript" event="OnCallOutFailure(ASender,iCode)" for="AgentOcx">
AgentEventHandle("OnCallOutFailure",ASender,iCode);
var codeStr = '';
if(ASender=='1163'){
alert("请检查号码,本地号码前加'9'或'8',外地号码前加'90'或'80'!");
codeStr = '号码有误';
}else if(ASender=='1164'){
alert("已挂断!");
codeStr = '挂断';
}else if(ASender=='1119'){
alert("该分机号正在通话中!");
codeStr = '正在通话中';
}else if(ASender=='1153'){
alert("请检查座机是否成功登陆!");
codeStr = '座机未连接!';
}else{
codeStr = window.AgentOcx._ocx.GetPromptByErrorCode(ASender+"");
alert("外呼失败:"+codeStr);
}
document.getElementById('isCalling').value='0';
var logPath = document.getElementById('recordFileName').value;
if(logPath==null||logPath==''){
document.getElementById('recordFileName').value="";
}else{
document.getElementById('recordFileName').value=logPath+',"failSender":"'+ASender+'","failreason":"'+codeStr+'"';
}
</SCRIPT>
<SCRIPT type="text/javascript" event="OnCallInnerSuccess()" for="AgentOcx">
AgentEventHandle("OnCallInnerSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnCallInnerFailure()" for="AgentOcx">
AgentEventHandle("OnCallInnerFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnCallInnerSuccTalk()" for="AgentOcx">
AgentEventHandle("OnCallInnerSuccTalk");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnAnswerRequestEx(MediaType)" for="AgentOcx">
AgentEventHandle("OnAnswerRequestEx",MediaType);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnAnswerRequestEx2(ulTime, usDsn, ucHandle, ucServer, iMediaType, iCCBIdx)" for="AgentOcx">
AgentEventHandle("OnAnswerRequestEx2",ulTime, usDsn, ucHandle, ucServer, iMediaType, iCCBIdx);
console.log("Answer呼叫标识信息"+ulTime+"_"+usDsn+"_"+ucHandle+"_"+ucServer+"_"+iCCBIdx);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnAnswerSuccess()" for="AgentOcx">
AgentEventHandle("OnAnswerSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnAnswerExSuccess(MediaType)" for="AgentOcx">
AgentEventHandle("OnAnswerExSuccess",MediaType);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnAnswerExFailure(MediaType)" for="AgentOcx">
AgentEventHandle("OnAnswerExFailure",MediaType);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnReleaseExSuccess()" for="AgentOcx">
AgentEventHandle("OnReleaseExSuccess");
var talktime = window.AgentOcx._ocx.CallInfoEx_TotalTalkingTime+"";
console.log("OnReleaseExSuccess-getCallInfo: CallInfoEx_TotalTalkingTime:"+talktime);
var logPath = document.getElementById('recordFileName').value;
if(logPath==null||logPath==''){
document.getElementById('recordFileName').value="";
}else{
document.getElementById('recordFileName').value=logPath+',"talktime":"'+talktime+'"';
}
</SCRIPT>
<SCRIPT type="text/javascript" event="OnRequestReleaseEx(MediaType)" for="AgentOcx">
AgentEventHandle("OnRequestReleaseEx", MediaType);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnRequestReleaseEx2(ulTime, usDsn, ucHandle, ucServer, iMediaType, iCCBIdx)" for="AgentOcx">
AgentEventHandle("OnRequestReleaseEx2",ulTime, usDsn, ucHandle, ucServer, iMediaType, iCCBIdx);
console.log("Release呼叫标识信息"+ulTime+"_"+usDsn+"_"+ucHandle+"_"+ucServer+"_"+iCCBIdx);
var logPath = document.getElementById('recordFileName').value;
if(logPath==null||logPath==''){
document.getElementById('recordFileName').value="";
}else{
document.getElementById('recordFileName').value=logPath+',"ulTime":"'+ulTime+'","usDsn":"'+usDsn
+'","ucHandle":"'+ucHandle+'","ucServer":"'+ucServer+'","iCCBIdx":"'+iCCBIdx+'"';
}
</SCRIPT>
<SCRIPT type="text/javascript" event="OnReceiveAgentStateInfo(AgentState,BusyFlag,RestFlag)" for="AgentOcx">
AgentEventHandle("OnReceiveAgentStateInfo",AgentState,BusyFlag,RestFlag);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnBeginMuteUserSuccess()" for="AgentOcx">
AgentEventHandle("OnBeginMuteUserSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnBeginMuteUserFailure()" for="AgentOcx">
AgentEventHandle("OnBeginMuteUserFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnEndMuteUserSuccess()" for="AgentOcx">
AgentEventHandle("OnEndMuteUserSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnEndMuteUserFailure()" for="AgentOcx">
AgentEventHandle("OnEndMuteUserFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnHoldSuccess()" for="AgentOcx">
AgentEventHandle("OnHoldSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnHoldFailure()" for="AgentOcx">
AgentEventHandle("OnHoldFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnGetHoldSuccess()" for="AgentOcx">
AgentEventHandle("OnGetHoldSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnGetHoldFailure()" for="AgentOcx">
AgentEventHandle("OnGetHoldFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnHoldCallRelease(Cause)" for="AgentOcx">
AgentEventHandle("OnHoldCallRelease", Cause);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnGetHoldSuccTalk()" for="AgentOcx">
AgentEventHandle("OnGetHoldSuccTalk");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnCallerCalledInfoArrived(MediaType,Caller,Called)" for="AgentOcx">
AgentEventHandle("OnCallerCalledInfoArrived", MediaType, Caller, Called);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnDelCallInConf(CallerNo, CalledNo)" for="AgentOcx">
AgentEventHandle("OnDelCallInConf", CallerNo, CalledNo);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnInternalHelpSuccess(HelpMode)" for="AgentOcx">
AgentEventHandle("OnInternalHelpSuccess", HelpMode);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnInternalHelpFailure(HelpMode)" for="AgentOcx">
AgentEventHandle("OnInternalHelpFailure", HelpMode);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnInternalHelpRefused()" for="AgentOcx">
AgentEventHandle("OnInternalHelpRefused");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnPhoneStatusNotify(Status)" for="AgentOcx">
AgentEventHandle("OnPhoneStatusNotify", Status);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnReceiveChat(Content)" for="AgentOcx">
AgentEventHandle("OnReceiveChat", decodeURI(Content) );
</SCRIPT>
<SCRIPT type="text/javascript" event="OnReceiveChatEx(Content, CCBIdx)" for="AgentOcx">
AgentEventHandle("OnReceiveChatEx", decodeURI(Content), CCBIdx);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnMultimediaConfSuccess()" for="AgentOcx">
AgentEventHandle("OnMultimediaConfSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnMultimediaConfFailure()" for="AgentOcx">
AgentEventHandle("OnMultimediaConfFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnJoinMultimediaConfSuccess()" for="AgentOcx">
AgentEventHandle("OnJoinMultimediaConfSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnStopMultimediaConfSuccess()" for="AgentOcx">
AgentEventHandle("OnStopMultimediaConfSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnStopMultimediaConfFailure()" for="AgentOcx">
AgentEventHandle("OnStopMultimediaConfFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnStopMultimediaConf()" for="AgentOcx">
AgentEventHandle("OnStopMultimediaConf");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnPrepareJoinMultimediaConf(ParticipantType, Participant, ConfID, ConfInfo)" for="AgentOcx">
AgentEventHandle("OnPrepareJoinMultimediaConf", ParticipantType, Participant, ConfID, ConfInfo);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnMultimediaConfState(ParticipantType, Participant, ConfState, Cause)" for="AgentOcx">
AgentEventHandle("OnMultimediaConfState", ParticipantType, Participant, ConfState, Cause);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnReceiveReleaseOverEx(ulTime, usDsn, ucHandle, ucServer, wMediaType, CCBIdx)" for="AgentOcx">
AgentEventHandle("OnReceiveReleaseOverEx", ulTime, usDsn, ucHandle, ucServer, wMediaType, CCBIdx);
console.log("receiveRelease");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnRestTimeOut(RestTime)" for="AgentOcx">
AgentEventHandle("OnRestTimeOut", RestTime);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnStopMultimediaConfSuccess()" for="AgentOcx">
AgentEventHandle("OnStopMultimediaConfSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnInviteFailure()" for="AgentOcx">
AgentEventHandle("OnInviteFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnInviteSuccess()" for="AgentOcx">
AgentEventHandle("OnInviteSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnStopMultimediaConfFailure()" for="AgentOcx">
AgentEventHandle("OnStopMultimediaConfFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnSayBusySuccess()" for="AgentOcx">
AgentEventHandle("OnSayBusySuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnSayBusyFailure()" for="AgentOcx">
AgentEventHandle("OnSayBusyFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnSayFreeSuccess()" for="AgentOcx">
AgentEventHandle("OnSayFreeSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnSayFreeFailure()" for="AgentOcx">
AgentEventHandle("OnSayFreeFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnIsTalkingChanged()" for="AgentOcx">
AgentEventHandle("OnIsTalkingChanged");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnBeforeTrans()" for="AgentOcx">
AgentEventHandle("OnBeforeTrans");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnRedirectToOtherSuccess()" for="AgentOcx">
AgentEventHandle("OnRedirectToOtherSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnRedirectToOtherFailure()" for="AgentOcx">
AgentEventHandle("OnRedirectToOtherFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnTransInnerFailure()" for="AgentOcx">
AgentEventHandle("OnTransInnerFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnTransInnerSuccess()" for="AgentOcx">
AgentEventHandle("OnTransInnerSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnRedirectToAutoSuccess()" for="AgentOcx">
AgentEventHandle("OnRedirectToAutoSuccess");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnRedirectToAutoFailure()" for="AgentOcx">
AgentEventHandle("OnRedirectToAutoFailure");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnReturnFromIvr()" for="AgentOcx">
AgentEventHandle("OnReturnFromIvr");
</SCRIPT>
<SCRIPT type="text/javascript" event="OnTransOutSuccess(TransMode)" for="AgentOcx">
AgentEventHandle("OnTransOutSuccess", TransMode);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnTransOutFailure(TransMode)" for="AgentOcx">
AgentEventHandle("OnTransOutFailure", TransMode);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnTransOutFailTalk(TransMode)" for="AgentOcx">
AgentEventHandle("OnTransOutFailTalk", TransMode);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnForceOutEx(usSuccess)" for="AgentOcx">
AgentEventHandle("OnForceOutEx", usSuccess);
</SCRIPT>
<SCRIPT type="text/javascript" event="OnReceiveForceoutMsgEx(usSuccess, ucMediaType)" for="AgentOcx">
AgentEventHandle("OnReceiveForceoutMsgEx", usSuccess, ucMediaType);
</SCRIPT>
<!--2. Conference Ocx Events -->
<SCRIPT type="text/javascript" event="ConfInitResultEvent(eventInfo)" for="ConferenceOcx">
ConferenceEventHandle("ConfInitResultEvent", eventInfo);
// alert('Conference init success!'+eventInfo);
var obj = JSON.parse(eventInfo);
if(obj.resultCode!='0'){
alert("Conference控件初始化失败"+eventInfo+";请检查控件是否正确安装!");
}
</SCRIPT>
<!--3. Voice Ocx Events -->
<script type="text/javascript" event="VoiceInitResultEvent(sResult)" for="VoiceOcx">
VoiceEventHandle("VoiceInitResultEvent",sResult);
var obj = JSON.parse(sResult);
if(obj.resultCode!='0'){
alert("Voice控件初始化失败"+sResult+";请检查控件是否正确安装!");
}
</script>
<script type="text/javascript" event="VoiceRegisterResultEvent(sResult)" for="VoiceOcx">
VoiceEventHandle("VoiceRegisterResultEvent",sResult);
var obj = JSON.parse(sResult);
if(obj.resultCode!='0'){
alert("初始化Register失败"+sResult);
}
</script>
<script type="text/javascript" event="VoiceTalkOutgoingEvent(sResult)" for="VoiceOcx">
VoiceEventHandle("VoiceTalkOutgoingEvent",sResult);
console.log("talkOutgoing:"+sResult);
</script>
<script type="text/javascript" event="VoiceTalkRingBackEvent(sResult)" for="VoiceOcx">
VoiceEventHandle("VoiceTalkRingBackEvent",sResult);
</script>
<script type="text/javascript" event="VoiceTalkAlertingEvent(sResult)" for="VoiceOcx">
VoiceEventHandle("VoiceTalkAlertingEvent",sResult);
var obj = JSON.parse(sResult);
// document.getElementById('callId').value=obj.callid+'';
</script>
<script type="text/javascript" event="VoiceSrtpResultEvent(sResult)" for="VoiceOcx">
VoiceEventHandle("VoiceSrtpResultEvent",sResult);
</script>
<script type="text/javascript" event="VoiceTalkConnectedEvent(sResult)" for="VoiceOcx">
VoiceEventHandle("VoiceTalkConnectedEvent",sResult);
var obj = JSON.parse(sResult);
// document.getElementById('callId').value=obj.callid+'';
</script>
<script type="text/javascript" event="VoiceTalkReleaseEvent(sResult)" for="VoiceOcx">
VoiceEventHandle("VoiceTalkReleaseEvent",sResult);
var obj = JSON.parse(sResult);
// if(obj.resultCode=='0'){
console.log("挂断callId"+obj.callid);
// document.getElementById('callId').value=obj.callid+'';
// }
//指示挂机
window.AgentOcx._ocx.AgentLinkagePhoneOnhook ();
</script>
<script type="text/javascript" event="VoiceSipInfoArrivedEvent(sResult)" for="VoiceOcx">
VoiceEventHandle("VoiceSipInfoArrivedEvent",sResult);
</script>
<script type="text/javascript" event="VoiceStartCallResultEvent(sResult)" for="VoiceOcx">
VoiceEventHandle("VoiceStartCallResultEvent",sResult);
console.log("VoiceStartCallResultEvent:"+sResult);
</script>
<script language="text/javascript" event="VoiceExceptionEvent(sResult)" for="VoiceOcx">
VoiceEventHandle("VoiceExceptionEvent",sResult);
</script>
<script language="text/javascript" event="VoiceStatusNotifyEvent(sResult)" for="VoiceOcx">
VoiceEventHandle("VoiceStatusNotifyEvent",sResult);
alert("VoiceStatusNotifyEvent"+sResult);
</script>
<script language="text/javascript" event="VoiceCallJointStartResultEvent(sResult)" for="VoiceOcx">
VoiceEventHandle("VoiceCallJointStartResultEvent",sResult);
alert("VoiceCallJointStartResultEvent"+sResult);
</script>
<script language="text/javascript" event="VoiceCallJointStopResultEvent(sResult)" for="VoiceOcx">
VoiceEventHandle("VoiceCallJointStopResultEvent",sResult);
alert("VoiceCallJointStopResultEvent"+sResult);
</script>
</div>
<div class="aos-mask" id="loadingdiv" style="display:none"><div class="aos-mask-background" style=""></div><div class="aos-mask-msg aos-mask-loading" style="display: block; margin-left: -44px; margin-top: -23px; z-index: 1003;">正在初始化...</div></div>
</body>
<script type="text/javascript">
var temp2="";
aos.hasActivex=true;
$("#loadingdiv").hide();
/*-------------------------左侧菜单--------------------------*/
//ztree赋值方式
function initTree(){
aos.post({
url: 'aos/mainui/index/getMenu',
data: {},
success: function(data){
if(!data || data.length == 0)
return;
$.fn.zTree.init($("#menuTree"), setting, data);
//展开第一个节点
var treeObj = $.fn.zTree.getZTreeObj("menuTree");
var nodes = treeObj.getNodes();
var aObjNode = $("#" + nodes[0].tId + "_a");
aObjNode.click();
//鼠标滑轮事件
$(function() {
$('#menuTree').bind('mousewheel', function(event) {
event.preventDefault();
var scrollTop = this.scrollTop;
this.scrollTop = (scrollTop + ((event.deltaY * event.deltaFactor) * -1));
});
});
}
})
}
function insertlogid(res,flag){
if(flag==1){
var temp1=res+",";
temp2=temp2+temp1;
aos.get("logid").setValue(temp2);}
else if(flag==2){
temp2="";
aos.get("logid").setValue(temp2);
}
}
//初始化新版话条
var phoneBar = null;
function initNewBar(){
var isInit = document.getElementById("newbarInit").value;
if(isInit!=1){
aos.tip("正在初始化...",2000);
aos.post({
url:"rush/search/check",
data:"",
success:function(rtnData){
if(rtnData==""){
aos.alert('您没有通话权限,请联系负责人申请!获取权限后续重新登陆!');
return;
}
else{
newPhoneBar(rtnData[0].agent_id);
}
}
});
}else{
aos.alert("电话条已经初始化成功!");
}
}
function newPhoneBar(agent_id) {
if (phoneBar) {
phoneBar.destroy();
}
// var thisQueues = $('#thisQueues').val() ? $('#thisQueues').val().split(',') : [];
phoneBar = new PhoneBar({
renderTo: 'test1',
proxyUrl: 'ws://cc.95ykf.com:8610/websocket',
sipServerUrl: 'cc.95ykf.com:5188',
startupSoftPhone: true,
tid: 10444,
thisDN: 10444 + agent_id,
agentID: 10444 + agent_id,
password: 'hx200052',
thisQueues: [104448000],
defaultQueue: 104448000,
autoIdleWhenLogin: true,
isPhoneTakeAlong: false,
onAgentStatusChange: function (newState, beforeValue) {
console.log('坐席状态由[' + beforeValue + ']变更为[' + newState+']');
var isInit = document.getElementById("newbarInit").value;
if(isInit==0){
aos.tip("初始化成功!",2000);
document.getElementById("newbarInit").value=1;
document.getElementById('CallJS').value=1;
}
},
onScreenPopup: function (lineState, callInfo) {console.log('弹屏事件:', lineState, callInfo);},
onRinging: function (callInfo) {
console.log('振铃事件:', callInfo);
},
onTalking: function (callInfo) {
console.log('接通事件:', callInfo);
//电话接通时间用于判断电话是否接通回写给index2主界面进行短信提醒
document.getElementById('message').value=callInfo.creationTime;
},
onHangup: function (callInfo) {
console.log('挂机事件:', callInfo);
var time="0";
//插入rush_log表的信息info在paydetial页面拼装后传给index2主界面这里取的是index2界面的值
var info = document.getElementById('info').value;
var end_date = document.getElementById('end_date').value;
var customer_id = document.getElementById('customer_id').value;
var bgnTime=document.getElementById('message').value;
var endTime=callInfo.creationTime;
if (bgnTime==""||endTime==""){
}
else {
time=Math.round((endTime-bgnTime)/1000);
}
var userNo=callInfo.phoneNumber;
var file_Name=callInfo.attachDatas.preRecordPath;
$.ajax({
type: "POST",
url:"rush/search/insertLog",
data: {"info": info,"mobile": userNo,"time": time,"action": 'phone',"customer_id": customer_id,"end_date": end_date,"path":file_Name},
dataType: "text",
success: function (res) {
insertlogid(res,"1");
},
error: function (xhr, ajaxOptions, thrownError) {
alert("系统异常!");
}
});
document.getElementById('message').value='';
aos.tip("电话已挂断",3000);
},
onLinkDisconnected: function() {
document.getElementById("newbarInit").value=0;
document.getElementById('CallJS').value=0;
console.log("linkDisconnected");
}
});
}
var showMessage = PhoneBar.utils.showMessage = function (msg) {
layer.alert(msg, {icon: 7});
}
//初始化2021
var phoneBar = null;
function initNewnewBar(){
var isInit = document.getElementById("newnewbarInit").value;
if(isInit!=1){
aos.tip("正在初始化...",2000);
aos.post({
url:"rush/search/check",
data:"",
success:function(rtnData){
if(rtnData==""){
aos.alert('您没有通话权限,请联系负责人申请!获取权限后续重新登陆!');
return;
}
else{
newnewPhoneBar(rtnData[0].agent_id,rtnData[0].quyu_id);
}
}
});
}else{
aos.alert("电话条已经初始化成功!");
}
}
function newnewPhoneBar(agent_id,quyu_id) {
if (phoneBar) {
phoneBar.destroy();
}
//var thisQueues = $('#thisQueues').val() ? $('#thisQueues').val().split(',') : [];
phoneBar = new PhoneBar({
renderTo: 'test1',
proxyUrl: 'ws://123.56.16.158:8610/websocket',
sipServerUrl: '123.56.16.158:5188',
startupSoftPhone: true,
tid: 11191,
thisDN: 11191 + agent_id,
agentID:11191 + agent_id,
password: 666666,
thisQueues: [00000150001501101,00000150001501102],
defaultQueue: quyu_id,
autoIdleWhenLogin: true,
isPhoneTakeAlong: false,
onAgentStatusChange: function (newState, beforeValue) {
console.log('坐席状态由[' + beforeValue + ']变更为[' + newState+']');
var isInit = document.getElementById("newnewbarInit").value;
if(isInit==0){
aos.tip("初始化成功!",2000);
document.getElementById("newnewbarInit").value=1;
document.getElementById('CallJS').value=1;
}
},
onScreenPopup: function (lineState, callInfo) {console.log('弹屏事件:', lineState, callInfo);},
onRinging: function (callInfo) {
console.log('振铃事件:', callInfo);
document.getElementById('message1').value=callInfo.creationTime;
},
onTalking: function (callInfo) {
console.log('接通事件:', callInfo);
//电话接通时间用于判断电话是否接通回写给index2主界面进行短信提醒
document.getElementById('message').value=callInfo.creationTime;
},
onHangup: function (callInfo) {
console.log('挂机事件:', callInfo);
var time="0";
var zltime="0";
//插入rush_log表的信息info在paydetial页面拼装后传给index2主界面这里取的是index2界面的值
var info = document.getElementById('info').value;
var end_date = document.getElementById('end_date').value;
var customer_id = document.getElementById('customer_id').value;
var bgnTimefirst=document.getElementById('message1').value;
var bgnTime=document.getElementById('message').value;
var endTime=callInfo.creationTime;
if (bgnTime==""){
zltime=Math.round((endTime-bgnTimefirst)/1000);
}
else {
time=Math.round((endTime-bgnTime)/1000);
zltime=Math.round((bgnTime-bgnTimefirst)/1000);
}
var userNo=callInfo.phoneNumber;
var file_Name=callInfo.attachDatas.preRecordPath;
var callid= callInfo.callId;
$.ajax({
type: "POST",
url:"rush/search/insertLog",
data: {"info": info,"mobile": userNo,"time": time,"action": 'phone',"customer_id": customer_id,"end_date": end_date,"path":file_Name,"callid":callid,"zltime":zltime},
dataType: "text",
success: function (res) {
insertlogid(res,"1");
},
error: function (xhr, ajaxOptions, thrownError) {
alert("系统异常!");
}
});
document.getElementById('message').value='';
aos.tip("电话已挂断",3000);
},
onLinkDisconnected: function() {
document.getElementById("newnewbarInit").value=0;
document.getElementById('CallJS').value=0;
console.log("linkDisconnected");
}
});
/* //onAgentStatusChange: function (newState, beforeValue) {console.log('坐席状态由[' + beforeValue + ']变更为[' + newState+']');},
onScreenPopup: function (lineState, callInfo) {console.log('弹屏事件:', lineState, callInfo);},
onRinging: function (callInfo) {console.log('振铃事件:', callInfo);},
onTalking: function (callInfo) {console.log('接通事件:', callInfo);},
onHangup: function (callInfo) {console.log('挂机事件:', callInfo);},
onLinkDisconnected: function() {location.href = 'login.html'},
});*/
}
//电话条初始化
function window_onload()
{
applicationLoad(50,10,1200,66,showStyleAUTTO,"",setVccBarEvent2);
}
//测试方法
function setVccBarEvent2()
{
aos.post({
url:"rush/search/check",
data:"",
success:function(rtnData){
if(rtnData==""){
aos.alert('您没有通话权限,请联系负责人申请!获取权限后续重新登陆!');
return;
}
else{
funInitial(rtnData[0].agent_id);
application.oJVccBar.OnCallRing = onOnCallRing;
application.oJVccBar.AnswerCall = onOnAnswerCall;
application.oJVccBar.OnCallEnd = onOnCallEnd;
application.oJVccBar.OnMethodResponseEvent = onOnMethodResponseEvent;
application.oJVccBar.OnCallDataChanged = onOnCallDataChanged;
application.oJVccBar.OnQuerySPGroupList = onOnQuerySPGroupList;
document.getElementById('CallJS').value=1;
}
}
});
}
//信息提示
function displayM(flag){//alert(application.oJMonitor.Show);
application.oJMonitor.Display(flag);
_display = flag;
if(_display == 0){
btnUnShow.disabled = true;
btnShow.disabled = false;
divInput.style.display = "block";
divMonitor.style.display = "block";
divTextInfo.style.top = "130px";
application.oJMonitor.SetAppMode(2);
}
else{
btnUnShow.disabled = false;
btnShow.disabled = true;
divInput.style.display = "none";
divMonitor.style.display = "none";
divTextInfo.style.top = "95px";
application.oJMonitor.SetAppMode(1);
}
}
function InitialMonitor()
{
application.oJMonitor.SetAppMode(1);
application.oJMonitor.SetFunctionPage("0|1|2|3|4|5");
application.oJMonitor.Intial(serverIP, 4502, vccID, "000010" + vccID + agentID, "666666");
application.oJMonitor.SetWallBoardServer("0.0.0.1", 14502);
}
function funInitial(agentid)
{
var serverIP ="101.201.142.12" ;
var SipServerIP="101.201.142.12";
var vccID ="100995" ;
var agentID =agentid ;
var sipPort = "5066";
application.oJVccBar.SetAttribute("MainIP",serverIP); //MainIP
application.oJVccBar.SetAttribute("MainPortID",14800); //MainPort
application.oJVccBar.SetAttribute("BackIP",serverIP); //BackIP
application.oJVccBar.SetAttribute("BackPortID",14800); //BackPort
application.oJVccBar.SetAttribute("MonitorIP",serverIP); //MonitorIP
application.oJVccBar.SetAttribute("MonitorPort",4502); //MainPort
application.oJVccBar.SetAttribute("SipServerIP",SipServerIP);
//所在域
//application.oJVccBar.SetAttribute("SipDomain",sipDomain);
application.oJVccBar.SetAttribute("SipServerPort",parseInt(sipPort));
application.oJVccBar.SetAttribute("SipProtocol","UDP");
application.oJVccBar.SetAttribute("PhonType",1); //0:内置坐席卡1内置Sip2外置其他终端
application.oJVccBar.SetAttribute("AgentType",0);
application.oJVccBar.SetAttribute("SelfPrompt",1);
application.oJVccBar.SetAttribute("MediaFlag",vccID);
application.oJVccBar.SetAttribute("AppType",0);
application.oJVccBar.SetAttribute("PassWord","111111");
application.oJVccBar.SetAttribute("AgentID","000010"+vccID+agentID);
application.oJVccBar.SetAttribute("Dn","000002"+vccID+agentID);
application.oJVccBar.SetAttribute("SipPassWord", "00000000");
application.oJVccBar.SetAttribute("SipAuthType", 1);
//application.oJVccBar.SetAttribute("TaskID",'000001'+vccID+'11160918');
//初始化完成后显示的按钮
application.oJVccBar.SerialBtn("0,1,2,3,6,9,12","12");
application.oJVccBar.Initial();
}
function initHuawei(){
if (window.ActiveXObject || "ActiveXObject" in window){
// alert("ISIE");
}else{
alert("请使用IE浏览器或者兼容模式");
return false;
}
var isInit = document.getElementById("hwIsInit").value;
if(isInit!=1){
$("#loadingdiv").show();
aos.post({
url:"hwphone/check_huawei",
data:"",
success:function(rtnData){
if(rtnData==null||rtnData.length<=0||rtnData[0].agent_id==null||rtnData[0].agent_id==""){
$("#loadingdiv").hide();
aos.alert('您没有分配工号,请联系负责人申请!获取权限后续重新登陆!');
return;
}else if(rtnData==null||rtnData.length<=0||rtnData[0].phone_no==null||rtnData[0].phone_no==""){
$("#loadingdiv").hide();
aos.alert('您没有分配号码,请联系负责人申请!获取权限后续重新登陆!');
return;
}else{
// AgentAppDemoExcute('Register',ValueOf('AgentAppDemo.PhoneNo'),ValueOf('AgentAppDemo.PhonePwd'));
// AgentAppDemoExcute('Login', ValueOf('AgentAppDemo.AgentId'),ValueOf('AgentAppDemo.AgentPwd'),'40',ValueOf('AgentAppDemo.PhoneNo'));
var localIp = document.getElementById("currentIP").value;
initAgentApp(navigator,document,'C:/eMedia',localIp);
document.getElementById('hwAgentId').value=rtnData[0].agent_id;
document.getElementById('hwPhoneNo').value=rtnData[0].phone_no;
AgentAppDemoExcute('Login', rtnData[0].agent_id,'123456','40',rtnData[0].phone_no);
// AgentAppDemoExcute('Register',rtnData[0].phone_no,'Huawei@123');
$("#loadingdiv").hide();
}
},error:function (e) {
$("#loadingdiv").hide();
aos.alert(e.message);
}
});
}else{
alert("华为控件已初始化成功!");
}
}
function logoutHuawei(){
AgentAppDemoExcute('Logout');
// AgentAppDemoExcute('Deregister');
}
/**退出Index页面时**/
function destroy()
{
try
{
var isInit = document.getElementById("hwIsInit").value;
if(isInit==1){
logoutHuawei();
}
//close file stream
if(FileUtil!=null){
FileUtil.close();
}
if (phoneBar) {
phoneBar.destroy();
phoneBar = null;
}
}
catch(e)
{
//handle exception
console.log("error:"+e.toString());
}
}
</script>
</html>