ソースを参照

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

XMLWAN 4 年 前
コミット
9ca4b86114

+ 5 - 0
src/xt_pages/dialysis/schedualPatient.vue ファイルの表示

@@ -279,6 +279,11 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
279 279
       }
280 280
     },
281 281
     created() {
282
+      if(sessionStorage.getItem('signIn') != null){
283
+        setTimeout(() => {    
284
+          this.$router.replace({ path: '/signIn' })
285
+        },1000)
286
+      }
282 287
       var schedule_type_selected = this.$store.getters.schedule_type_selected
283 288
       var zone_selected = this.$store.getters.zone_selected
284 289
       var patient_state_selected = this.$store.getters.patient_state_selected

+ 10 - 9
src/xt_pages/index/verify_token.vue ファイルの表示

@@ -11,18 +11,19 @@ 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' })
14
+          
15
+            // alert('token 验证成功')
16
+            // console.log(this.$store.getters.xt_permission.addRouters)
17
+            this.$router.addRoutes(this.$store.getters.xt_permission.addRouters) // 动态添加可访问路由表
18
+    //          next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
19
+            if(this.$store.getters.current_role_urls.includes('/dialysis/dialysisrecord')){
20
+              this.$router.replace({ path: '/dialysis/dialysisrecord' })
20 21
 
21
-          }else{
22
-            this.$router.replace({ path: '/home' })
22
+            }else{
23
+              this.$router.replace({ path: '/home' })
23 24
 
24 25
 
25
-          }
26
+            }
26 27
 
27 28
         })
28 29
       })

+ 24 - 0
src/xt_pages/sign/components/beforeDialysisCalling.vue ファイルの表示

@@ -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){

+ 1 - 1
src/xt_pages/sign/components/called.vue ファイルの表示

@@ -83,7 +83,7 @@ export default {
83 83
         padding: 9px 0;
84 84
         margin: 0 15px 15px 0;
85 85
         float: left;
86
-        width: 360px;
86
+        width: 400px;
87 87
         cursor: pointer;
88 88
         display: flex;
89 89
         justify-content: space-between;

+ 18 - 0
src/xt_pages/sign/components/computerCalling.vue ファイルの表示

@@ -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){

+ 5 - 5
src/xt_pages/sign/lineUp.vue ファイルの表示

@@ -325,17 +325,17 @@ export default {
325 325
         this.timerID = setInterval(() => {
326 326
             this.updateTime()
327 327
         }, 1000);
328
-        this.newTimes = setInterval(() => {
329
-            this.reload()
330
-        }, 1000 * 60 * 30);
328
+        // this.newTimes = setInterval(() => {
329
+        //     this.reload()
330
+        // }, 1000 * 60 * 30);
331 331
     },
332 332
     beforeDestroy(){
333 333
         clearInterval(this.timer);  // 清除定时器
334 334
         this.timer = null
335 335
         clearInterval(this.timerID);
336 336
         this.timerID = null;  // 清除定时器
337
-        clearInterval(this.newTimes);  // 清除定时器
338
-        this.newTimes = null
337
+        // clearInterval(this.newTimes);  // 清除定时器
338
+        // this.newTimes = null
339 339
         let unObj = {
340 340
             cmd:'queue/unjoin',
341 341
             data:{type:2}

+ 11 - 3
src/xt_pages/sign/signIn.vue ファイルの表示

@@ -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},
@@ -210,7 +216,9 @@ export default {
210 216
         }, 1000);
211 217
         // this.updateTime();
212 218
         this.newTimes = setInterval(() => {
213
-            this.reload()
219
+            // this.reload()
220
+            sessionStorage.setItem('signIn',1);
221
+            window.location.reload()
214 222
         }, 1000 * 60 * 30);
215 223
     },
216 224
     beforeDestroy(){