see999 4 years ago
parent
commit
07955327b0
2 changed files with 19 additions and 18 deletions
  1. 9 8
      src/xt_pages/index/verify_token.vue
  2. 10 10
      src/xt_pages/sign/components/computerCalling.vue

+ 9 - 8
src/xt_pages/index/verify_token.vue View File

@@ -11,22 +11,23 @@ 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
-          if(sessionStorage.getItem('signIn') != null){
15
-            this.$router.replace({ path: '/signIn' })
16
-          }else{
14
+          
17 15
             // alert('token 验证成功')
18 16
             // console.log(this.$store.getters.xt_permission.addRouters)
19 17
             this.$router.addRoutes(this.$store.getters.xt_permission.addRouters) // 动态添加可访问路由表
20 18
     //          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
-
19
+            if(sessionStorage.getItem('signIn') != null){
20
+              this.$router.replace({ path: '/signIn' })
24 21
             }else{
25
-              this.$router.replace({ path: '/home' })
22
+              if(this.$store.getters.current_role_urls.includes('/dialysis/dialysisrecord')){
23
+                this.$router.replace({ path: '/dialysis/dialysisrecord' })
24
+
25
+              }else{
26
+                this.$router.replace({ path: '/home' })
26 27
 
27 28
 
29
+              }
28 30
             }
29
-          }
30 31
 
31 32
         })
32 33
       })

+ 10 - 10
src/xt_pages/sign/components/computerCalling.vue View File

@@ -146,16 +146,16 @@ export default {
146 146
                         this.called = calledArr
147 147
                     }
148 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
-                        }
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
+                    }
159 159
                 }else if(res.channel == 'allQueueList'){
160 160
                     let arr = res.data.queue_list.data
161 161
                     // let waitingCalledArr = []