Procházet zdrojové kódy

来电呼入挂断置忙

miaofuhao %!s(int64=2) %!d(string=před) roky
rodič
revize
25464f5af7
1 změnil soubory, kde provedl 15 přidání a 1 odebrání
  1. 15 1
      CallCenterWeb.UI/RMYY/src/utils/telWebsocket.js

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

10
 let ws; // websocket 实例
10
 let ws; // websocket 实例
11
 let cls = 0;
11
 let cls = 0;
12
 let lockReconnect = false; // 避免重复连接
12
 let lockReconnect = false; // 避免重复连接
13
+let calldDirection = 0; //呼入
13
 let websocktTimer; // 定时器
14
 let websocktTimer; // 定时器
14
 let wsUrl = null;
15
 let wsUrl = null;
15
 // const wsUrl = 'ws://' + process.env.SOCKET_IP + ':' + process.env.SOCKET_PORT
16
 // const wsUrl = 'ws://' + process.env.SOCKET_IP + ':' + process.env.SOCKET_PORT
538
 function IncomingBack(inComingData) {
539
 function IncomingBack(inComingData) {
539
   const inComingCallId = inComingData.CallID;
540
   const inComingCallId = inComingData.CallID;
540
   let inComingNumber = inComingData.Number;
541
   let inComingNumber = inComingData.Number;
542
+  calldDirection = 1
541
   store.dispatch("screenPopUpBoole", 1);
543
   store.dispatch("screenPopUpBoole", 1);
542
   if (inComingNumber.length > 11) {
544
   if (inComingNumber.length > 11) {
543
     inComingNumber = inComingNumber.substr(1);
545
     inComingNumber = inComingNumber.substr(1);
560
 function DropCallBack() {
562
 function DropCallBack() {
561
   store.dispatch("ChangeCallNum", ""); // 顶部电话号码('')
563
   store.dispatch("ChangeCallNum", ""); // 顶部电话号码('')
562
   store.dispatch("ChangeCallType", "MakeCall"); // 发送的通话类型(默认是外呼)
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
   const curentViews = store.state.tagsView.visitedViews;
579
   const curentViews = store.state.tagsView.visitedViews;
566
   for (let i = 0, len = curentViews.length; i < len; i++) {
580
   for (let i = 0, len = curentViews.length; i < len; i++) {