Kaynağa Gözat

来电呼入挂断置忙

miaofuhao 2 yıl önce
ebeveyn
işleme
25464f5af7
1 değiştirilmiş dosya ile 15 ekleme ve 1 silme
  1. 15 1
      CallCenterWeb.UI/RMYY/src/utils/telWebsocket.js

+ 15 - 1
CallCenterWeb.UI/RMYY/src/utils/telWebsocket.js

@@ -10,6 +10,7 @@ import { Teljournal } from "@/api/commonAPI";
10 10
 let ws; // websocket 实例
11 11
 let cls = 0;
12 12
 let lockReconnect = false; // 避免重复连接
13
+let calldDirection = 0; //呼入
13 14
 let websocktTimer; // 定时器
14 15
 let wsUrl = null;
15 16
 // const wsUrl = 'ws://' + process.env.SOCKET_IP + ':' + process.env.SOCKET_PORT
@@ -538,6 +539,7 @@ function LineStateAgentBack(linedata) {
538 539
 function IncomingBack(inComingData) {
539 540
   const inComingCallId = inComingData.CallID;
540 541
   let inComingNumber = inComingData.Number;
542
+  calldDirection = 1
541 543
   store.dispatch("screenPopUpBoole", 1);
542 544
   if (inComingNumber.length > 11) {
543 545
     inComingNumber = inComingNumber.substr(1);
@@ -560,7 +562,19 @@ function IncomingBack(inComingData) {
560 562
 function DropCallBack() {
561 563
   store.dispatch("ChangeCallNum", ""); // 顶部电话号码('')
562 564
   store.dispatch("ChangeCallType", "MakeCall"); // 发送的通话类型(默认是外呼)
563
-  store.dispatch("screenPopUpBoole", 0);
565
+  store.dispatch("screenPopUpBoole", 0); //calldDirection
566
+  
567
+  if(calldDirection){
568
+    const scoketDatas = {
569
+      Type: "SayBusy",
570
+      AgentID: window.localStorage.getItem("storageUsercode"),
571
+      AgentExten: window.localStorage.getItem("ext")
572
+    };
573
+    Send(scoketDatas);
574
+    calldDirection = 0
575
+  }
576
+
577
+
564 578
   // 当前在坐席监控中需要 更新坐席监控内坐席的状态
565 579
   const curentViews = store.state.tagsView.visitedViews;
566 580
   for (let i = 0, len = curentViews.length; i < len; i++) {