Browse Source

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

XMLWAN 4 years ago
parent
commit
ccc1416c41

+ 108 - 48
src/xt_pages/sign/components/beforeDialysisCalling.vue View File

11
         </div>
11
         </div>
12
         <div style="display:flex;justify-content: space-between;">
12
         <div style="display:flex;justify-content: space-between;">
13
             <div class="callingArea">
13
             <div class="callingArea">
14
-                <waiting-called v-if="patientStateVal == 0" :waitingCalled='waitingCalled' ></waiting-called>
15
-                <called v-if="patientStateVal == 1" :called="called"></called>
14
+                <waiting-called v-if="patientStateVal == 0" :waitingCalled='waitingCalledAm' ></waiting-called>
15
+                <waiting-called v-if="patientStateVal == 1" :waitingCalled='waitingCalledPm' ></waiting-called>
16
+                <called v-if="patientStateVal == 2" :called="called"></called>
16
             </div>
17
             </div>
17
-            <div class="nowCalling" v-if="patientStateVal == 0">
18
+            <div class="nowCalling" v-if="patientStateVal == 0 || patientStateVal == 1">
18
                 <p class="nowCallingTitle">当前叫号</p>
19
                 <p class="nowCallingTitle">当前叫号</p>
19
                 <p class="nowCallingName">{{ fisrtQueueInfo ? fisrtQueueInfo.patient_name : '' }}</p>
20
                 <p class="nowCallingName">{{ fisrtQueueInfo ? fisrtQueueInfo.patient_name : '' }}</p>
20
                 <p class="nowCallingTime">签到时间:{{ fisrtQueueInfo ? fisrtQueueInfo.create_time : '' }}</p>
21
                 <p class="nowCallingTime">签到时间:{{ fisrtQueueInfo ? fisrtQueueInfo.create_time : '' }}</p>
21
                 <el-button type="primary" @click="call(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')" style="margin-left:0;margin: 30px 0 20px 0;">&ensp;叫号&ensp;</el-button>
22
                 <el-button type="primary" @click="call(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')" style="margin-left:0;margin: 30px 0 20px 0;">&ensp;叫号&ensp;</el-button>
22
                 <!-- <el-button style="margin: 0px 0 20px 0;" @click="pass(fisrtQueueInfo.patient_id)">&ensp;过号&ensp;</el-button> -->
23
                 <!-- <el-button style="margin: 0px 0 20px 0;" @click="pass(fisrtQueueInfo.patient_id)">&ensp;过号&ensp;</el-button> -->
23
-                <el-button style="margin:0 auto;" @click="next(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')">下一位</el-button>
24
+                <el-button style="margin:0 auto;" @click="next(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '',fisrtQueueInfo && fisrtQueueInfo.schedule_type ? fisrtQueueInfo.schedule_type : '')">下一位</el-button>
24
             </div>
25
             </div>
25
         </div>
26
         </div>
26
     </div>
27
     </div>
40
     data(){
41
     data(){
41
         return{
42
         return{
42
             patient_state:[
43
             patient_state:[
43
-                {value: 0,label: '待叫号'},
44
-                {value: 1,label: '已叫号'},
44
+                {value: 0,label: '上午待叫号'},
45
+                {value: 1,label: '下午待叫号'},
46
+                {value: 2,label: '已叫号'},
45
             ],
47
             ],
46
             patientStateVal: 0,
48
             patientStateVal: 0,
47
             waitingCalled:[],
49
             waitingCalled:[],
49
             fisrtQueueInfo:{},
51
             fisrtQueueInfo:{},
50
             timer:null,
52
             timer:null,
51
 
53
 
54
+            waitingCalledAm:[],
55
+            waitingCalledPm:[],
56
+            newFisrtQueueInfo:{}
57
+
52
         }
58
         }
53
     },
59
     },
54
     computed: {
60
     computed: {
116
                 let res = JSON.parse(e.data);
122
                 let res = JSON.parse(e.data);
117
                 // let res = re.data;
123
                 // let res = re.data;
118
                 console.log('res3333333333',res)
124
                 console.log('res3333333333',res)
119
-                if(res.channel == 'queue/join'){
120
-                    if(res.data.fisrtQueueInfo != null){
121
-                        if(res.data.fisrtQueueInfo.create_time){
122
-                            res.data.fisrtQueueInfo.create_time = moment(parseInt(res.data.fisrtQueueInfo.create_time) * 1000).format('HH:mm')
125
+                if(res.data.type == 3){
126
+                    if(res.channel == 'queue/join'){
127
+                        let fisrtQueueInfo = []
128
+                        this.newFisrtQueueInfo = res.data.fisrtQueueInfo
129
+                        if(res.data.fisrtQueueInfo != null){
130
+                            if(this.patientStateVal == 0){
131
+                                fisrtQueueInfo = res.data.fisrtQueueInfo.morning
132
+                                if(fisrtQueueInfo.create_time){
133
+                                    fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
134
+                                }
135
+                            }else if(this.patientStateVal == 1){
136
+                                fisrtQueueInfo = res.data.fisrtQueueInfo.afternoon
137
+                                if(fisrtQueueInfo.create_time){
138
+                                    fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
139
+                                }
140
+                            }
123
                         }
141
                         }
124
-                        
142
+                        this.fisrtQueueInfo = fisrtQueueInfo
143
+                        let arr = res.data.patientQueueList.data
144
+                        // let waitingCalledArr = []
145
+                        let waitingCalledAm = []
146
+                        let waitingCalledPm = []
147
+                        let calledArr = []
148
+                        arr.map(item => {
149
+                            if(item.status == 1){
150
+                                item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
151
+                                // waitingCalledArr.push(item)
152
+                                if(item.schedule_type == 1){
153
+                                    waitingCalledAm.push(item)
154
+                                }else if(item.schedule_type == 2){
155
+                                    waitingCalledPm.push(item)
156
+                                }
157
+                            }else if(item.status == 2){
158
+                                item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
159
+                                calledArr.push(item)
160
+                            }
161
+                        })
162
+                        console.log('waitingCalledArr待叫号',waitingCalledArr)
163
+                        console.log('waitingCalledArr以较好',calledArr)
164
+                        // this.waitingCalled = waitingCalledArr
165
+                        this.waitingCalledAm = waitingCalledArr
166
+                        this.waitingCalledPm = waitingCalledArr
167
+                        this.called = calledArr
168
+                    }else if(res.channel == 'allQueueList'){
169
+                        let arr = res.data.queue_list.data
170
+                        let waitingCalledArr = []
171
+                        let calledArr = []
172
+                        arr.map(item => {
173
+                            if(item.status == 1){
174
+                                item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
175
+                                waitingCalledArr.push(item)
176
+                            }else if(item.status == 2){
177
+                                item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
178
+                                calledArr.push(item)
179
+                            }
180
+                        })
181
+                        this.waitingCalled = waitingCalledArr
182
+                        this.called = calledArr
183
+                    }else if(res.channel == 'patientCallInfo'){
184
+                        res.data.patientInfo.create_time = moment(parseInt(res.data.patientInfo.create_time) * 1000).format('HH:mm')
185
+                        this.fisrtQueueInfo = res.data.patientInfo
125
                     }
186
                     }
126
-                    this.fisrtQueueInfo = res.data.fisrtQueueInfo
127
-                    let arr = res.data.patientQueueList.data
128
-                    let waitingCalledArr = []
129
-                    let calledArr = []
130
-                    arr.map(item => {
131
-                        if(item.status == 1){
132
-                            item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
133
-                            waitingCalledArr.push(item)
134
-                        }else if(item.status == 2){
135
-                            item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
136
-                            calledArr.push(item)
137
-                        }
138
-                    })
139
-                    console.log('waitingCalledArr待叫号',waitingCalledArr)
140
-                    console.log('waitingCalledArr以较好',calledArr)
141
-                    this.waitingCalled = waitingCalledArr
142
-                    this.called = calledArr
143
-                }else if(res.channel == 'allQueueList'){
144
-                    let arr = res.data.queue_list.data
145
-                    let waitingCalledArr = []
146
-                    let calledArr = []
147
-                    arr.map(item => {
148
-                        if(item.status == 1){
149
-                            item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
150
-                            waitingCalledArr.push(item)
151
-                        }else if(item.status == 2){
152
-                            item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
153
-                            calledArr.push(item)
154
-                        }
155
-                    })
156
-                    this.waitingCalled = waitingCalledArr
157
-                    this.called = calledArr
158
-                }else if(res.channel == 'patientCallInfo'){
159
-                    res.data.patientInfo.create_time = moment(parseInt(res.data.patientInfo.create_time) * 1000).format('HH:mm')
160
-                    this.fisrtQueueInfo = res.data.patientInfo
161
                 }
187
                 }
162
             }
188
             }
163
         },
189
         },
164
         handleStateChange: function(index) {
190
         handleStateChange: function(index) {
165
             this.patientStateVal = index
191
             this.patientStateVal = index
192
+            // if(index == 0){
193
+            //     let arr = this.waitingCalledAm
194
+            //     let newArr = []
195
+            //     arr.map(item => {
196
+            //         if(item.schedule_type == 1){
197
+            //             newArr.push(item)
198
+            //         }
199
+            //     }) 
200
+            //     this.waitingCalledAm = newArr
201
+            // }else if(index == 1){
202
+            //     let arr = this.waitingCalledPm
203
+            //     let newArr = []
204
+            //     arr.map(item => {
205
+            //         if(item.schedule_type == 2){
206
+            //             newArr.push(item)
207
+            //         }
208
+            //     }) 
209
+            //     this.waitingCalledPm = newArr
210
+            // }
211
+            let fisrtQueueInfo = []
212
+            if(this.newFisrtQueueInfo != null){
213
+                if(this.patientStateVal == 0){
214
+                    fisrtQueueInfo = this.newFisrtQueueInfo.morning
215
+                    if(fisrtQueueInfo.create_time){
216
+                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
217
+                    }
218
+                }else if(this.patientStateVal == 1){
219
+                    fisrtQueueInfo = this.newFisrtQueueInfo.afternoon
220
+                    if(fisrtQueueInfo.create_time){
221
+                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
222
+                    }
223
+                }
224
+            }
225
+            this.fisrtQueueInfo = fisrtQueueInfo
166
         },
226
         },
167
         call(patient_id){
227
         call(patient_id){
168
             if(patient_id == undefined || patient_id == ""){
228
             if(patient_id == undefined || patient_id == ""){
185
                 }
245
                 }
186
             })
246
             })
187
         },
247
         },
188
-        next(patient_id){
248
+        next(patient_id,schedule_type){
189
             if(patient_id == undefined || patient_id == ""){
249
             if(patient_id == undefined || patient_id == ""){
190
                 this.$message.error('已经是最后一位了');
250
                 this.$message.error('已经是最后一位了');
191
                 return
251
                 return
193
             console.log('patient_id',patient_id)
253
             console.log('patient_id',patient_id)
194
             let org_id =  parseInt(sessionStorage.getItem("org_id"));
254
             let org_id =  parseInt(sessionStorage.getItem("org_id"));
195
             let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
255
             let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
196
-            axios.get('/api/index/nextcall?org_id=' + org_id + '&patient_id=' + patient_id + '&admin_user_id=' + admin_user_id).then(res => {
256
+            axios.get('/api/index/nextcall?org_id=' + org_id + '&patient_id=' + patient_id + '&admin_user_id=' + admin_user_id + '&schedule_type=' + schedule_type).then(res => {
197
                 console.log(res)
257
                 console.log(res)
198
                 // let patientArr = res.data.queue_list.data
258
                 // let patientArr = res.data.queue_list.data
199
                 // this.patientArr = patientArr
259
                 // this.patientArr = patientArr

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

11
         </div>
11
         </div>
12
         <div style="display:flex;justify-content: space-between;">
12
         <div style="display:flex;justify-content: space-between;">
13
             <div class="callingArea">
13
             <div class="callingArea">
14
-                <called v-if="patientStateVal == 0" :index='1' :called='waitingCalled'></called>
15
-                <called v-if="patientStateVal == 1" :called="called"></called>
14
+                <called v-if="patientStateVal == 0" :index='1' :called='waitingCalledAm'></called>
15
+                <called v-if="patientStateVal == 1" :index='1' :called='waitingCalledPm'></called>
16
+                <called v-if="patientStateVal == w" :called="called"></called>
16
             </div>
17
             </div>
17
             <div class="nowCalling" v-if="patientStateVal == 0">
18
             <div class="nowCalling" v-if="patientStateVal == 0">
18
                 <p class="nowCallingTitle">当前叫号</p>
19
                 <p class="nowCallingTitle">当前叫号</p>
19
                 <p class="nowCallingName">{{ fisrtQueueInfo ? fisrtQueueInfo.patient_name : '' }}</p>
20
                 <p class="nowCallingName">{{ fisrtQueueInfo ? fisrtQueueInfo.patient_name : '' }}</p>
20
                 <p class="nowCallingTime">签到时间:{{ fisrtQueueInfo ? fisrtQueueInfo.create_time : '' }}</p>
21
                 <p class="nowCallingTime">签到时间:{{ fisrtQueueInfo ? fisrtQueueInfo.create_time : '' }}</p>
21
                 <p><el-button type="primary" @click="call(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')" style="margin-left:0;margin: 30px 0 20px 0;">&ensp;叫号&ensp;</el-button></p>
22
                 <p><el-button type="primary" @click="call(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')" style="margin-left:0;margin: 30px 0 20px 0;">&ensp;叫号&ensp;</el-button></p>
22
-                <el-button style="margin:0 auto;" @click="next(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '')">下一位</el-button>
23
+                <el-button style="margin:0 auto;" @click="next(fisrtQueueInfo && fisrtQueueInfo.patient_id ? fisrtQueueInfo.patient_id : '',fisrtQueueInfo && fisrtQueueInfo.schedule_type ? fisrtQueueInfo.schedule_type : '')">下一位</el-button>
23
             </div>
24
             </div>
24
         </div>
25
         </div>
25
     </div>
26
     </div>
36
     data(){
37
     data(){
37
         return{
38
         return{
38
             patient_state:[
39
             patient_state:[
39
-                {value: 0,label: '待叫号'},
40
-                {value: 1,label: '已叫号'},
40
+                {value: 0,label: '上午待叫号'},
41
+                {value: 1,label: '下午待叫号'},
42
+                {value: 2,label: '已叫号'},
41
             ],
43
             ],
42
             patientStateVal: 0,
44
             patientStateVal: 0,
43
             waitingCalled:[],
45
             waitingCalled:[],
45
             fisrtQueueInfo:{},
47
             fisrtQueueInfo:{},
46
             timer:null,
48
             timer:null,
47
 
49
 
50
+            waitingCalledAm:[],
51
+            waitingCalledPm:[],
52
+            newFisrtQueueInfo:{}
53
+
48
         }
54
         }
49
     },
55
     },
50
     computed: {
56
     computed: {
89
         },
95
         },
90
         websocketMess() {
96
         websocketMess() {
91
             this.websocket.onmessage = e => {
97
             this.websocket.onmessage = e => {
98
+                
92
                 let res = JSON.parse(e.data);
99
                 let res = JSON.parse(e.data);
93
                 // let res = re.data;
100
                 // let res = re.data;
94
                 console.log('res',res)
101
                 console.log('res',res)
95
-                if(res.channel == 'queue/join'){
96
-                    if(res.data.fisrtQueueInfo != null){
97
-                        if(res.data.fisrtQueueInfo.create_time){
98
-                            res.data.fisrtQueueInfo.create_time = moment(parseInt(res.data.fisrtQueueInfo.create_time) * 1000).format('HH:mm')
99
-                        }
100
-                    }
101
-                    this.fisrtQueueInfo = res.data.fisrtQueueInfo
102
-                    let arr = res.data.patientQueueList.data
103
-                    let waitingCalledArr = []
104
-                    let calledArr = []
105
-                    arr.map(item => {
106
-                        if(item.status == 2){
107
-                            item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
108
-                            waitingCalledArr.push(item)
109
-                        }else if(item.status == 3){
110
-                            item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
111
-                            calledArr.push(item)
112
-                        }
113
-                    })
114
-                    console.log('waitingCalledArr',waitingCalledArr)
115
-                    console.log('waitingCalledArr',calledArr)
116
-                    this.waitingCalled = waitingCalledArr
117
-                    this.called = calledArr
118
-                }else if(res.channel == 'allQueueList'){
119
-                    let arr = res.data.queue_list.data
120
-                    let waitingCalledArr = []
121
-                    let calledArr = []
122
-                    arr.map(item => {
123
-                        if(item.status == 2){
124
-                            item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
125
-                            waitingCalledArr.push(item)
126
-                        }else if(item.status == 3){
127
-                            item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
128
-                            calledArr.push(item)
102
+                if(res.data.type == 4){
103
+                    if(res.channel == 'queue/join'){
104
+                        let fisrtQueueInfo = []
105
+                        this.newFisrtQueueInfo = res.data.fisrtQueueInfo
106
+                        if(res.data.fisrtQueueInfo != null){
107
+                            if(this.patientStateVal == 0){
108
+                                fisrtQueueInfo = res.data.fisrtQueueInfo.morning
109
+                                if(fisrtQueueInfo.create_time){
110
+                                    fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
111
+                                }
112
+                            }else if(this.patientStateVal == 1){
113
+                                fisrtQueueInfo = res.data.fisrtQueueInfo.afternoon
114
+                                if(fisrtQueueInfo.create_time){
115
+                                    fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
116
+                                }
117
+                            }
129
                         }
118
                         }
130
-                    })
131
-                    this.waitingCalled = waitingCalledArr
132
-                    this.called = calledArr
133
-                }else if(res.channel == 'patientCallInfo'){
134
-                    res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
135
-                    this.fisrtQueueInfo = res.data.patientInfo
119
+                        this.fisrtQueueInfo = fisrtQueueInfo
120
+                        let arr = res.data.patientQueueList.data
121
+                        // let waitingCalledArr = []
122
+                        let waitingCalledAm = []
123
+                        let waitingCalledPm = []
124
+                        let calledArr = []
125
+                        arr.map(item => {
126
+                            if(item.status == 2){
127
+                                item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
128
+                                // waitingCalledArr.push(item)
129
+                                if(item.schedule_type == 1){
130
+                                    waitingCalledAm.push(item)
131
+                                }else if(item.schedule_type == 2){
132
+                                    waitingCalledPm.push(item)
133
+                                }
134
+                            }else if(item.status == 3){
135
+                                item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
136
+                                calledArr.push(item)
137
+                            }
138
+                        })
139
+                        console.log('waitingCalledArr',waitingCalledArr)
140
+                        console.log('waitingCalledArr',calledArr)
141
+                        // this.waitingCalled = waitingCalledArr
142
+                        this.waitingCalledAm = waitingCalledArr
143
+                        this.waitingCalledPm = waitingCalledArr
144
+                        this.called = calledArr
145
+                    }else if(res.channel == 'allQueueList'){
146
+                        let arr = res.data.queue_list.data
147
+                        let waitingCalledArr = []
148
+                        let calledArr = []
149
+                        arr.map(item => {
150
+                            if(item.status == 2){
151
+                                item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
152
+                                waitingCalledArr.push(item)
153
+                            }else if(item.status == 3){
154
+                                item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
155
+                                calledArr.push(item)
156
+                            }
157
+                        })
158
+                        this.waitingCalled = waitingCalledArr
159
+                        this.called = calledArr
160
+                    }else if(res.channel == 'patientCallInfo'){
161
+                        res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
162
+                        this.fisrtQueueInfo = res.data.patientInfo
163
+                    } 
136
                 }
164
                 }
137
             }
165
             }
138
         },
166
         },
139
         handleStateChange: function(index) {
167
         handleStateChange: function(index) {
140
             this.patientStateVal = index
168
             this.patientStateVal = index
169
+            // if(index == 0){
170
+            //     let arr = this.waitingCalledAm
171
+            //     let newArr = []
172
+            //     arr.map(item => {
173
+            //         if(item.schedule_type == 1){
174
+            //             newArr.push(item)
175
+            //         }
176
+            //     }) 
177
+            //     this.waitingCalledAm = newArr
178
+            // }else if(index == 1){
179
+            //     let arr = this.waitingCalledPm
180
+            //     let newArr = []
181
+            //     arr.map(item => {
182
+            //         if(item.schedule_type == 2){
183
+            //             newArr.push(item)
184
+            //         }
185
+            //     }) 
186
+            //     this.waitingCalledPm = newArr
187
+            // }
188
+            let fisrtQueueInfo = []
189
+            if(this.newFisrtQueueInfo != null){
190
+                if(this.patientStateVal == 0){
191
+                    fisrtQueueInfo = this.newFisrtQueueInfo.morning
192
+                    if(fisrtQueueInfo.create_time){
193
+                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
194
+                    }
195
+                }else if(this.patientStateVal == 1){
196
+                    fisrtQueueInfo = this.newFisrtQueueInfo.afternoon
197
+                    if(fisrtQueueInfo.create_time){
198
+                        fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
199
+                    }
200
+                }
201
+            }
202
+            this.fisrtQueueInfo = fisrtQueueInfo
141
         },
203
         },
142
         call(patient_id){
204
         call(patient_id){
143
             if(patient_id == undefined || patient_id == ""){
205
             if(patient_id == undefined || patient_id == ""){
160
                 }
222
                 }
161
             })
223
             })
162
         },
224
         },
163
-        next(patient_id){
225
+        next(patient_id,schedule_type){
164
             if(patient_id == undefined || patient_id == ""){
226
             if(patient_id == undefined || patient_id == ""){
165
                 this.$message.error('已经是最后一位了');
227
                 this.$message.error('已经是最后一位了');
166
                 return
228
                 return
168
             console.log('patient_id',patient_id)
230
             console.log('patient_id',patient_id)
169
             let org_id =  parseInt(sessionStorage.getItem("org_id"));
231
             let org_id =  parseInt(sessionStorage.getItem("org_id"));
170
             let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
232
             let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
171
-            axios.get('/api/index/nextupcall?org_id=' + org_id + '&patient_id=' + patient_id + '&admin_user_id=' + admin_user_id).then(res => {
233
+            axios.get('/api/index/nextupcall?org_id=' + org_id + '&patient_id=' + patient_id + '&admin_user_id=' + admin_user_id + '&schedule_type=' + schedule_type).then(res => {
172
                 console.log(res)
234
                 console.log(res)
173
                 // let patientArr = res.data.queue_list.data
235
                 // let patientArr = res.data.queue_list.data
174
                 // this.patientArr = patientArr
236
                 // this.patientArr = patientArr

+ 70 - 68
src/xt_pages/sign/lineUp.vue View File

353
                 let res = JSON.parse(e.data);
353
                 let res = JSON.parse(e.data);
354
                 // let res = re.data;
354
                 // let res = re.data;
355
                 console.log('res',res)
355
                 console.log('res',res)
356
-                if(res.channel == 'queue/join'){
357
-                    this.queueConfig = res.data.queueConfig
358
-                    this.lineUpList = res.data.patientQueueList.data
359
-                    this.receivingPatient = res.data.receivingPatient
360
-                    this.waitDoctorList = res.data.waitDoctorList
361
-                    this.upPatientList = res.data.upPatientList
362
-                    this.count = res.data.patientQueueList.count
363
-                    // this.lineUpList.map(item => {
364
-                    //     item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
365
-                    //     // item.start_time = moment(item.start_time * 1000).format('HH:mm')
366
-                    // })
367
-                }else if(res.channel == 'queue/queuelist'){
368
-                    this.lineUpList = res.data.patientQueueList.data
369
-                    this.count = res.data.patientQueueList.count
370
-                    // this.lineUpList.map(item => {
371
-                    //     item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
372
-                    //     // item.start_time = moment(item.start_time * 1000).format('HH:mm')
373
-                    //     if(item.start_time != null){
374
-                    //         item.start_time = moment(item.start_time * 1000).format('HH:mm:ss')
375
-                    //     }
376
-                    //     if(item.status == 5 || item.end_time){
377
-                    //         item.end_time = moment(item.end_time * 1000).format('HH:mm:ss')
378
-                    //     }
379
-                    // })
380
-                }else if(res.channel == 'patientCallInfo'){
381
-                    console.log(999999999999,res.data)
382
-                    
383
-                    
384
-                    console.log('执行几次',this.voiceNum)
385
-                    if(this.voice == true){
386
-                        this.patient_id = res.data.patientInfo.patient_id
387
-                        this.voice = false
388
-                        // let time1 = null
389
-                        this.voicePrompt(res.data.callVolUrl)
390
-                        this.voiceTime = setInterval(() => {
391
-                            let num = null
392
-                            if(res.data.patientInfo.status == 2){
393
-                                num = parseInt(this.queueConfig.jzdcbbcs)
394
-                            }else if(res.data.patientInfo.status == 3){
395
-                                num = parseInt(this.queueConfig.sjdcbbcs)
396
-                            }
397
-                            if(this.voiceNum < num){
398
-                                this.voiceNum++
399
-                                this.voicePrompt(res.data.callVolUrl)
400
-                            }else{
401
-                                this.voiceNum = 1;
402
-                                this.voice = true 
403
-                                let obj = {
404
-                                    cmd: "queue/callreturn",
405
-                                    data: {patient_id:this.patient_id},
406
-                                };
407
-                                this.websocketSend(obj)
408
-                                clearInterval(this.voiceTime);
409
-                                this.voiceTime = null
410
-                            }
411
-                        },6000)
412
-                    }else {
413
-                        // this.$message({
414
-                        //     message: '警告哦,这是一条警告消息',
415
-                        //     type: 'warning'
416
-                        // });
356
+                if(res.data.type == 2){
357
+                    if(res.channel == 'queue/join'){
358
+                        this.queueConfig = res.data.queueConfig
359
+                        this.lineUpList = res.data.patientQueueList.data
360
+                        this.receivingPatient = res.data.receivingPatient
361
+                        this.waitDoctorList = res.data.waitDoctorList
362
+                        this.upPatientList = res.data.upPatientList
363
+                        this.count = res.data.patientQueueList.count
364
+                        // this.lineUpList.map(item => {
365
+                        //     item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
366
+                        //     // item.start_time = moment(item.start_time * 1000).format('HH:mm')
367
+                        // })
368
+                    }else if(res.channel == 'queue/queuelist'){
369
+                        this.lineUpList = res.data.patientQueueList.data
370
+                        this.count = res.data.patientQueueList.count
371
+                        // this.lineUpList.map(item => {
372
+                        //     item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
373
+                        //     // item.start_time = moment(item.start_time * 1000).format('HH:mm')
374
+                        //     if(item.start_time != null){
375
+                        //         item.start_time = moment(item.start_time * 1000).format('HH:mm:ss')
376
+                        //     }
377
+                        //     if(item.status == 5 || item.end_time){
378
+                        //         item.end_time = moment(item.end_time * 1000).format('HH:mm:ss')
379
+                        //     }
380
+                        // })
381
+                    }else if(res.channel == 'patientCallInfo'){
382
+                        console.log(999999999999,res.data)
383
+                        
384
+                        
385
+                        console.log('执行几次',this.voiceNum)
386
+                        if(this.voice == true){
387
+                            this.patient_id = res.data.patientInfo.patient_id
388
+                            this.voice = false
389
+                            // let time1 = null
390
+                            this.voicePrompt(res.data.callVolUrl)
391
+                            this.voiceTime = setInterval(() => {
392
+                                let num = null
393
+                                if(res.data.patientInfo.status == 2){
394
+                                    num = parseInt(this.queueConfig.jzdcbbcs)
395
+                                }else if(res.data.patientInfo.status == 3){
396
+                                    num = parseInt(this.queueConfig.sjdcbbcs)
397
+                                }
398
+                                if(this.voiceNum < num){
399
+                                    this.voiceNum++
400
+                                    this.voicePrompt(res.data.callVolUrl)
401
+                                }else{
402
+                                    this.voiceNum = 1;
403
+                                    this.voice = true 
404
+                                    let obj = {
405
+                                        cmd: "queue/callreturn",
406
+                                        data: {patient_id:this.patient_id},
407
+                                    };
408
+                                    this.websocketSend(obj)
409
+                                    clearInterval(this.voiceTime);
410
+                                    this.voiceTime = null
411
+                                }
412
+                            },6000)
413
+                        }else {
414
+                            // this.$message({
415
+                            //     message: '警告哦,这是一条警告消息',
416
+                            //     type: 'warning'
417
+                            // });
418
+                        }
419
+                    }else if(res.channel == 'updateCallList'){
420
+                        this.receivingPatient = res.data.queue_list
421
+                        
422
+                    }else if(res.channel == 'updateWaitCallList'){
423
+                        this.waitDoctorList = res.data.queue_list
424
+                    }else if(res.channel == 'updateUpCallList'){
425
+                        this.upPatientList = res.data.queue_list
417
                     }
426
                     }
418
-                }else if(res.channel == 'updateCallList'){
419
-                    this.receivingPatient = res.data.queue_list
420
-                    
421
-                }else if(res.channel == 'updateWaitCallList'){
422
-                    this.waitDoctorList = res.data.queue_list
423
-                }else if(res.channel == 'updateUpCallList'){
424
-                    this.upPatientList = res.data.queue_list
425
                 }
427
                 }
426
                 // else if(res.channel == "patientQueueInfo"){
428
                 // else if(res.channel == "patientQueueInfo"){
427
                 //     this.queueInfo = res.data.queueInfo
429
                 //     this.queueInfo = res.data.queueInfo

+ 30 - 28
src/xt_pages/sign/signIn.vue View File

216
                 let res = JSON.parse(e.data);
216
                 let res = JSON.parse(e.data);
217
                 // let res = re.data;
217
                 // let res = re.data;
218
                 console.log('res',res)
218
                 console.log('res',res)
219
-                if(res.channel == 'queue/join'){
220
-                    this.signInList = res.data.patientQueueList.data
221
-                    this.count = res.data.patientQueueList.count
222
-                    this.signInList.map(item => {
223
-                        item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
224
-                    })
225
-                }else if(res.channel == "patientQueueInfo"){
226
-                    clearTimeout(this.ds)
227
-                    this.ds = null
228
-                    this.queueInfo = res.data.queueInfo
229
-                    this.page = 1
230
-                    let obj = {
231
-                        cmd: "queue/queuelist",
232
-                        data: {page:1,size:10,sort:1}
233
-                    };
234
-                    this.websocketSend(obj)
235
-                    
236
-                    this.ds = setTimeout(() => { 
237
-                       this.queueInfo = {} 
238
-                    }, 60000);
239
-                    
240
-                }else if(res.channel == 'queue/queuelist'){
241
-                    console.log(11111111111,res.data)
242
-                    this.signInList = res.data.patientQueueList.data
243
-                    this.count = res.data.patientQueueList.count
244
-                    this.signInList.map(item => {
245
-                        item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
246
-                    })
219
+                if(res.data.type == 1){
220
+                    if(res.channel == 'queue/join'){
221
+                        this.signInList = res.data.patientQueueList.data
222
+                        this.count = res.data.patientQueueList.count
223
+                        this.signInList.map(item => {
224
+                            item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
225
+                        })
226
+                    }else if(res.channel == "patientQueueInfo"){
227
+                        clearTimeout(this.ds)
228
+                        this.ds = null
229
+                        this.queueInfo = res.data.queueInfo
230
+                        this.page = 1
231
+                        let obj = {
232
+                            cmd: "queue/queuelist",
233
+                            data: {page:1,size:10,sort:1}
234
+                        };
235
+                        this.websocketSend(obj)
236
+                        
237
+                        this.ds = setTimeout(() => { 
238
+                        this.queueInfo = {} 
239
+                        }, 60000);
240
+                        
241
+                    }else if(res.channel == 'queue/queuelist'){
242
+                        console.log(11111111111,res.data)
243
+                        this.signInList = res.data.patientQueueList.data
244
+                        this.count = res.data.patientQueueList.count
245
+                        this.signInList.map(item => {
246
+                            item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
247
+                        })
248
+                    }
247
                 }
249
                 }
248
                 // console.log("action", re.action);
250
                 // console.log("action", re.action);
249
                 // console.log("data", JSON.stringify(res));
251
                 // console.log("data", JSON.stringify(res));