|
|
@@ -2,7 +2,7 @@
|
|
2
|
2
|
var ws, n = 0, seatComming,
|
|
3
|
3
|
timer, hidTel, hidCallID, hidActionID,
|
|
4
|
4
|
directType, sendType, mesCont,
|
|
5
|
|
- eorrorConnect, errorState = false,
|
|
|
5
|
+ eorrorConnect, errorState = false,OperatorLogText,
|
|
6
|
6
|
makeCallId = "", lockReconnect = false,
|
|
7
|
7
|
obj = {}, cls = 0, ivrState, clsCookie, LoginState,
|
|
8
|
8
|
lasttime = new Date().getTime(),
|
|
|
@@ -38,8 +38,8 @@ if (helper.cookies.get('callState') == "5" || helper.cookies.get('callState') ==
|
|
38
|
38
|
|
|
39
|
39
|
function Connect () {
|
|
40
|
40
|
//+ huayi.config.socket_ip + ":" + huayi.config.socket_port 121.196.219.217:8081
|
|
41
|
|
- ws = new WebSocket("ws://10.200.46.27:8081");
|
|
42
|
|
- //ws = new WebSocket("ws://192.168.8.7:8081");
|
|
|
41
|
+ // ws = new WebSocket("ws://10.200.46.27:8081");
|
|
|
42
|
+ ws = new WebSocket("ws://192.168.8.7:8081");
|
|
43
|
43
|
//ws = new WebSocket("ws://121.196.219.217:8081");
|
|
44
|
44
|
//ws = new WebSocket("ws://" + ytsoft.config.socket_ip + ":" + ytsoft.config.socket_port);
|
|
45
|
45
|
ws.onopen = function () {
|
|
|
@@ -322,6 +322,8 @@ function button_QRCall () {
|
|
322
|
322
|
$('#imgServerState').attr('alt', '签入');
|
|
323
|
323
|
layer.msg('签入成功');
|
|
324
|
324
|
helper.cookies.set('callState', 2);
|
|
|
325
|
+ OperatorLogText = "签入"
|
|
|
326
|
+ OperatorLog(OperatorLogText)
|
|
325
|
327
|
try {
|
|
326
|
328
|
var result = OCX_AgentLogOut();
|
|
327
|
329
|
}
|
|
|
@@ -342,6 +344,8 @@ function LogoutBack () {
|
|
342
|
344
|
$('#imgAgentState').attr('src', '/Content/images/zx2.png');
|
|
343
|
345
|
$('#imgServerState').attr('alt', '未签入');
|
|
344
|
346
|
layer.msg('签出成功');
|
|
|
347
|
+ OperatorLogText = "签出"
|
|
|
348
|
+ OperatorLog(OperatorLogText)
|
|
345
|
349
|
helper.cookies.set('callState', 1);
|
|
346
|
350
|
ws.close();
|
|
347
|
351
|
|
|
|
@@ -400,11 +404,6 @@ function Form_callCommingCaller (data) {
|
|
400
|
404
|
|
|
401
|
405
|
var opturl = "/OCXOpt/OCXOptCallAjax/?optaction=zhenlingEvent&timeno=" + timeno + "&callid=" + CBnumber + "&userid=" + userid + "&usercode=" + usercode + "&username=" + username + "&extnumber=" + extnumber + "&callerNum=" + callerNum;
|
|
402
|
406
|
console.log("/OCXOpt/OCXOptCallAjax/?optaction=zhenlingEvent&timeno=" + timeno + "&callid=" + CBnumber + "&userid=" + userid + "&usercode=" + usercode + "&username=" + username + "&extnumber=" + extnumber + "&callerNum=" + callerNum)
|
|
403
|
|
-
|
|
404
|
|
-
|
|
405
|
|
-
|
|
406
|
|
-
|
|
407
|
|
-
|
|
408
|
407
|
|
|
409
|
408
|
$.ajax({
|
|
410
|
409
|
|
|
|
@@ -551,6 +550,8 @@ function SetState (obj) {
|
|
551
|
550
|
$(".fa-play").removeClass("defaultClass");
|
|
552
|
551
|
$('#imgAgentState').attr('src', '/Content/images/zx3.png');
|
|
553
|
552
|
//$.cookie("callState", obj.State, {expires: 7});
|
|
|
553
|
+ OperatorLogText = "置忙"
|
|
|
554
|
+ OperatorLog(OperatorLogText)
|
|
554
|
555
|
helper.cookies.set('callState', obj.State);
|
|
555
|
556
|
//$('#imgAgentState').attr('src', '/Content/images/zx2.png');
|
|
556
|
557
|
}
|
|
|
@@ -560,12 +561,37 @@ function SetState (obj) {
|
|
560
|
561
|
$(".fa-play").addClass("defaultClass");
|
|
561
|
562
|
$(".fa-play").removeClass("selectClass");
|
|
562
|
563
|
$('#imgAgentState').attr('src', '/Content/images/zx1.png');
|
|
563
|
|
-
|
|
|
564
|
+ OperatorLogText = "置闲"
|
|
|
565
|
+ OperatorLog(OperatorLogText)
|
|
564
|
566
|
//$.cookie("callState", obj.State, {expires: 7});
|
|
565
|
567
|
helper.cookies.set('callState', obj.State);
|
|
566
|
568
|
}
|
|
567
|
569
|
}
|
|
568
|
570
|
|
|
|
571
|
+function OperatorLog(OperatorLogText){
|
|
|
572
|
+ console.log(OperatorLogText)
|
|
|
573
|
+ var data = {
|
|
|
574
|
+ typeName:OperatorLogText
|
|
|
575
|
+ }
|
|
|
576
|
+ $.ajax({
|
|
|
577
|
+ url: "/main/addOPeratorLog",
|
|
|
578
|
+ type: "post",
|
|
|
579
|
+ async: false,//同步请求
|
|
|
580
|
+ contentType: "application/json",
|
|
|
581
|
+ dataType: "text",
|
|
|
582
|
+ cache: false,
|
|
|
583
|
+ data: JSON.stringify(data),
|
|
|
584
|
+ success: function (thisResult) {
|
|
|
585
|
+
|
|
|
586
|
+ },
|
|
|
587
|
+ error: function (error) {
|
|
|
588
|
+ return false;
|
|
|
589
|
+ }
|
|
|
590
|
+ });
|
|
|
591
|
+}
|
|
|
592
|
+
|
|
|
593
|
+
|
|
|
594
|
+
|
|
569
|
595
|
function agentstateagent (data) {
|
|
570
|
596
|
|
|
571
|
597
|
if (data.AgentState == '5') {
|