Przeglądaj źródła

置忙置闲问题修复

miaofuhao 4 lat temu
rodzic
commit
e1d2fd5fa8

+ 3 - 2
CallCenterWeb.UI/src/utils/telWebsocket.js

15
 // const wsUrl = 'ws://' + process.env.SOCKET_IP + ':' + process.env.SOCKET_PORT
15
 // const wsUrl = 'ws://' + process.env.SOCKET_IP + ':' + process.env.SOCKET_PORT
16
 // 创建scoket连接
16
 // 创建scoket连接
17
 export function createWebSocket() {
17
 export function createWebSocket() {
18
-  wsUrl = 'ws://' + store.getters.serverConfig.SOCKET_IP + ':' + store.getters.serverConfig.SOCKET_PORT//请求地址
18
+  wsUrl = 'ws://' + store.getters.serverConfig.SOCKET_IP + ':' + store.getters.serverConfig.SOCKET_PORT// 请求地址
19
   try {
19
   try {
20
     if ('WebSocket' in window) {
20
     if ('WebSocket' in window) {
21
-      ws = new WebSocket(wsUrl) //创建一个websocket实例
21
+      ws = new WebSocket(wsUrl) // 创建一个websocket实例
22
       init()
22
       init()
23
     } else {
23
     } else {
24
       Message.error('当前浏览器不支持Websocket!')
24
       Message.error('当前浏览器不支持Websocket!')
357
     // case '空闲':
357
     // case '空闲':
358
     case 1:
358
     case 1:
359
       store.dispatch('ChangeLineState', 1)
359
       store.dispatch('ChangeLineState', 1)
360
+      store.dispatch('ChangeSeatState', 2)
360
       store.dispatch('ChangeCallNum', '') // 顶部电话号码('')
361
       store.dispatch('ChangeCallNum', '') // 顶部电话号码('')
361
       store.dispatch('ChangeTopRightState', ['空闲', true])
362
       store.dispatch('ChangeTopRightState', ['空闲', true])
362
       break
363
       break

+ 4 - 6
CallCenterWeb.UI/src/views/layout/components/Navbar.vue

28
       <TopNotice @getTopNoticeNums="getTopNoticeNum" />
28
       <TopNotice @getTopNoticeNums="getTopNoticeNum" />
29
 
29
 
30
       <div
30
       <div
31
-        slot="reference"
32
         v-if="topNoticeShow"
31
         v-if="topNoticeShow"
32
+        slot="reference"
33
         :class="[
33
         :class="[
34
           seatflag ? 'navar_item notice' : 'navar_item notice notice_right',
34
           seatflag ? 'navar_item notice' : 'navar_item notice notice_right',
35
         ]"
35
         ]"
175
     if (!this.telIsConnected && this.seatflag) {
175
     if (!this.telIsConnected && this.seatflag) {
176
       createWebSocket()
176
       createWebSocket()
177
     }
177
     }
178
-    //debugger
178
+    // debugger
179
     console.log(localStorage.jsid)
179
     console.log(localStorage.jsid)
180
-    if(localStorage.jsid == "24"){
181
-        this.topNoticeShow = false
180
+    if (localStorage.jsid === '24') {
181
+      this.topNoticeShow = false
182
     }
182
     }
183
     interval = setInterval(() => {
183
     interval = setInterval(() => {
184
       const icnow = new Date()
184
       const icnow = new Date()
211
     // 从子组件获取的 消息数量值
211
     // 从子组件获取的 消息数量值
212
     getTopNoticeNum(value) {
212
     getTopNoticeNum(value) {
213
       this.topNoticeNum = value.num
213
       this.topNoticeNum = value.num
214
-      
215
-      
216
     }
214
     }
217
   }
215
   }
218
 }
216
 }