see999 4 gadus atpakaļ
vecāks
revīzija
d4eced665d

+ 12 - 8
src/xt_pages/index/verify_token.vue Parādīt failu

@@ -11,17 +11,21 @@ export default {
11 11
     this.$store.dispatch('VerifyToken', this.$route.query.token).then(() => {
12 12
       this.$store.dispatch('xt_GenerateRoutes', this.$store.getters.current_role_urls).then(() => {
13 13
         this.$store.dispatch('VerifyConfigList').then(() => {
14
-          // alert('token 验证成功')
15
-          // console.log(this.$store.getters.xt_permission.addRouters)
16
-          this.$router.addRoutes(this.$store.getters.xt_permission.addRouters) // 动态添加可访问路由表
17
-  //          next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
18
-          if(this.$store.getters.current_role_urls.includes('/dialysis/dialysisrecord')){
19
-            this.$router.replace({ path: '/dialysis/dialysisrecord' })
20
-
14
+          if(sessionStorage.getItem('signIn') != null){
15
+            this.$router.replace({ path: '/signIn' })
21 16
           }else{
22
-            this.$router.replace({ path: '/home' })
17
+            // alert('token 验证成功')
18
+            // console.log(this.$store.getters.xt_permission.addRouters)
19
+            this.$router.addRoutes(this.$store.getters.xt_permission.addRouters) // 动态添加可访问路由表
20
+    //          next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
21
+            if(this.$store.getters.current_role_urls.includes('/dialysis/dialysisrecord')){
22
+              this.$router.replace({ path: '/dialysis/dialysisrecord' })
23
+
24
+            }else{
25
+              this.$router.replace({ path: '/home' })
23 26
 
24 27
 
28
+            }
25 29
           }
26 30
 
27 31
         })

+ 24 - 0
src/xt_pages/sign/components/beforeDialysisCalling.vue Parādīt failu

@@ -105,6 +105,12 @@ export default {
105 105
             data: {type:3},
106 106
         };
107 107
         this.websocketSend(unObj)
108
+
109
+        let unObj1 = {
110
+            cmd: "queue/unjoin",
111
+            data: {type:4},
112
+        };
113
+        this.websocketSend(unObj1)
108 114
     },
109 115
     methods:{
110 116
         websocketSend(data) {
@@ -170,6 +176,17 @@ export default {
170 176
                             this.waitingCalledPm = waitingCalledPm
171 177
                             this.called = calledArr
172 178
                         }
179
+                        if(res.data.type == 4){
180
+                            let arr = res.data.patientQueueList.data
181
+                            let calledArr = []
182
+                            arr.map(item => {
183
+                                if(item.status == 2){
184
+                                    item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
185
+                                    calledArr.push(item)
186
+                                }
187
+                            })
188
+                            this.called = calledArr
189
+                        }
173 190
                     }else if(res.channel == 'allQueueList'){
174 191
                         let arr = res.data.queue_list.data
175 192
                         // let waitingCalledArr = []
@@ -223,6 +240,13 @@ export default {
223 240
             //     }) 
224 241
             //     this.waitingCalledPm = newArr
225 242
             // }
243
+            if(index == 2){
244
+                let obj = {
245
+                    cmd: "queue/join",
246
+                    data: {type:4,page:0,size:0},
247
+                };
248
+                this.websocketSend(obj)
249
+            }
226 250
             let fisrtQueueInfo = []
227 251
             if(this.newFisrtQueueInfo != null){
228 252
                 if(this.patientStateVal == 0){

+ 18 - 0
src/xt_pages/sign/components/computerCalling.vue Parādīt failu

@@ -145,6 +145,17 @@ export default {
145 145
                         this.waitingCalledPm = waitingCalledPm
146 146
                         this.called = calledArr
147 147
                     }
148
+                    if(res.data.type == 5){
149
+                            let arr = res.data.patientQueueList.data
150
+                            let calledArr = []
151
+                            arr.map(item => {
152
+                                if(item.status == 3){
153
+                                    item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
154
+                                    calledArr.push(item)
155
+                                }
156
+                            })
157
+                            this.called = calledArr
158
+                        }
148 159
                 }else if(res.channel == 'allQueueList'){
149 160
                     let arr = res.data.queue_list.data
150 161
                     // let waitingCalledArr = []
@@ -197,6 +208,13 @@ export default {
197 208
             //     }) 
198 209
             //     this.waitingCalledPm = newArr
199 210
             // }
211
+            if(index == 2){
212
+                let obj = {
213
+                    cmd: "queue/join",
214
+                    data: {type:5,page:0,size:0},
215
+                };
216
+                this.websocketSend(obj)
217
+            }
200 218
             let fisrtQueueInfo = []
201 219
             if(this.newFisrtQueueInfo != null){
202 220
                 if(this.patientStateVal == 0){

+ 15 - 7
src/xt_pages/sign/signIn.vue Parādīt failu

@@ -170,11 +170,17 @@ export default {
170 170
         },
171 171
     },
172 172
     created(){
173
-        if(sessionStorage.getItem('signInKey') != null){
174
-            if(sessionStorage.getItem('signInKey') == 1){
173
+        if(sessionStorage.getItem('signIn') != null){
174
+            if(sessionStorage.getItem('signIn') == 1){
175 175
                 this.dialogTableVisible = true
176 176
             }
177
+            sessionStorage.removeItem('signIn')
177 178
         }
179
+        // if(sessionStorage.getItem('signInKey') != null){
180
+        //     if(sessionStorage.getItem('signInKey') == 1){
181
+        //         this.dialogTableVisible = true
182
+        //     }
183
+        // }
178 184
         this.initData = {
179 185
             cmd: "queue/join",
180 186
             data: {type:1,page:1,size:10},
@@ -209,15 +215,17 @@ export default {
209 215
             this.updateTime()
210 216
         }, 1000);
211 217
         // this.updateTime();
212
-        // this.newTimes = setInterval(() => {
213
-        //     this.reload()
214
-        // }, 1000 * 60 * 3);
218
+        this.newTimes = setInterval(() => {
219
+            // this.reload()
220
+            sessionStorage.setItem('signIn',1);
221
+            window.location.reload()
222
+        }, 1000 * 30);
215 223
     },
216 224
     beforeDestroy(){
217 225
         clearInterval(this.timer);  // 清除定时器
218 226
         clearInterval(this.timerID);  // 清除定时器
219
-        // clearInterval(this.newTimes);  // 清除定时器
220
-        // this.newTimes = null
227
+        clearInterval(this.newTimes);  // 清除定时器
228
+        this.newTimes = null
221 229
         let obj = {
222 230
             cmd: "queue/unjoin",
223 231
             data: {type:1},