See999 hace 4 años
padre
commit
7fa615a848

+ 30 - 11
package-lock.json Ver fichero

@@ -4745,7 +4745,8 @@
4745 4745
         "ansi-regex": {
4746 4746
           "version": "2.1.1",
4747 4747
           "bundled": true,
4748
-          "dev": true
4748
+          "dev": true,
4749
+          "optional": true
4749 4750
         },
4750 4751
         "aproba": {
4751 4752
           "version": "1.2.0",
@@ -4768,13 +4769,15 @@
4768 4769
         "balanced-match": {
4769 4770
           "version": "1.0.0",
4770 4771
           "bundled": true,
4771
-          "dev": true
4772
+          "dev": true,
4773
+          "optional": true
4772 4774
         },
4773 4775
         "brace-expansion": {
4774 4776
           "version": "1.1.11",
4775 4777
           "resolved": false,
4776 4778
           "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
4777 4779
           "dev": true,
4780
+          "optional": true,
4778 4781
           "requires": {
4779 4782
             "balanced-match": "^1.0.0",
4780 4783
             "concat-map": "0.0.1"
@@ -4790,19 +4793,22 @@
4790 4793
         "code-point-at": {
4791 4794
           "version": "1.1.0",
4792 4795
           "bundled": true,
4793
-          "dev": true
4796
+          "dev": true,
4797
+          "optional": true
4794 4798
         },
4795 4799
         "concat-map": {
4796 4800
           "version": "0.0.1",
4797 4801
           "resolved": false,
4798 4802
           "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
4799
-          "dev": true
4803
+          "dev": true,
4804
+          "optional": true
4800 4805
         },
4801 4806
         "console-control-strings": {
4802 4807
           "version": "1.1.0",
4803 4808
           "resolved": false,
4804 4809
           "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
4805
-          "dev": true
4810
+          "dev": true,
4811
+          "optional": true
4806 4812
         },
4807 4813
         "core-util-is": {
4808 4814
           "version": "1.0.2",
@@ -4932,7 +4938,8 @@
4932 4938
         "inherits": {
4933 4939
           "version": "2.0.3",
4934 4940
           "bundled": true,
4935
-          "dev": true
4941
+          "dev": true,
4942
+          "optional": true
4936 4943
         },
4937 4944
         "ini": {
4938 4945
           "version": "1.3.5",
@@ -4946,6 +4953,7 @@
4946 4953
           "resolved": false,
4947 4954
           "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
4948 4955
           "dev": true,
4956
+          "optional": true,
4949 4957
           "requires": {
4950 4958
             "number-is-nan": "^1.0.0"
4951 4959
           }
@@ -4962,6 +4970,7 @@
4962 4970
           "resolved": false,
4963 4971
           "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
4964 4972
           "dev": true,
4973
+          "optional": true,
4965 4974
           "requires": {
4966 4975
             "brace-expansion": "^1.1.7"
4967 4976
           }
@@ -4969,13 +4978,15 @@
4969 4978
         "minimist": {
4970 4979
           "version": "0.0.8",
4971 4980
           "bundled": true,
4972
-          "dev": true
4981
+          "dev": true,
4982
+          "optional": true
4973 4983
         },
4974 4984
         "minipass": {
4975 4985
           "version": "2.3.5",
4976 4986
           "resolved": false,
4977 4987
           "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
4978 4988
           "dev": true,
4989
+          "optional": true,
4979 4990
           "requires": {
4980 4991
             "safe-buffer": "^5.1.2",
4981 4992
             "yallist": "^3.0.0"
@@ -4996,6 +5007,7 @@
4996 5007
           "resolved": false,
4997 5008
           "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
4998 5009
           "dev": true,
5010
+          "optional": true,
4999 5011
           "requires": {
5000 5012
             "minimist": "0.0.8"
5001 5013
           }
@@ -5083,7 +5095,8 @@
5083 5095
         "number-is-nan": {
5084 5096
           "version": "1.0.1",
5085 5097
           "bundled": true,
5086
-          "dev": true
5098
+          "dev": true,
5099
+          "optional": true
5087 5100
         },
5088 5101
         "object-assign": {
5089 5102
           "version": "4.1.1",
@@ -5097,6 +5110,7 @@
5097 5110
           "resolved": false,
5098 5111
           "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
5099 5112
           "dev": true,
5113
+          "optional": true,
5100 5114
           "requires": {
5101 5115
             "wrappy": "1"
5102 5116
           }
@@ -5191,7 +5205,8 @@
5191 5205
         "safe-buffer": {
5192 5206
           "version": "5.1.2",
5193 5207
           "bundled": true,
5194
-          "dev": true
5208
+          "dev": true,
5209
+          "optional": true
5195 5210
         },
5196 5211
         "safer-buffer": {
5197 5212
           "version": "2.1.2",
@@ -5233,6 +5248,7 @@
5233 5248
           "resolved": false,
5234 5249
           "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
5235 5250
           "dev": true,
5251
+          "optional": true,
5236 5252
           "requires": {
5237 5253
             "code-point-at": "^1.0.0",
5238 5254
             "is-fullwidth-code-point": "^1.0.0",
@@ -5254,6 +5270,7 @@
5254 5270
           "resolved": false,
5255 5271
           "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
5256 5272
           "dev": true,
5273
+          "optional": true,
5257 5274
           "requires": {
5258 5275
             "ansi-regex": "^2.0.0"
5259 5276
           }
@@ -5301,13 +5318,15 @@
5301 5318
         "wrappy": {
5302 5319
           "version": "1.0.2",
5303 5320
           "bundled": true,
5304
-          "dev": true
5321
+          "dev": true,
5322
+          "optional": true
5305 5323
         },
5306 5324
         "yallist": {
5307 5325
           "version": "3.0.3",
5308 5326
           "resolved": false,
5309 5327
           "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
5310
-          "dev": true
5328
+          "dev": true,
5329
+          "optional": true
5311 5330
         }
5312 5331
       }
5313 5332
     },

+ 108 - 48
src/xt_pages/sign/components/beforeDialysisCalling.vue Ver fichero

@@ -11,16 +11,17 @@
11 11
         </div>
12 12
         <div style="display:flex;justify-content: space-between;">
13 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 17
             </div>
17
-            <div class="nowCalling" v-if="patientStateVal == 0">
18
+            <div class="nowCalling" v-if="patientStateVal == 0 || patientStateVal == 1">
18 19
                 <p class="nowCallingTitle">当前叫号</p>
19 20
                 <p class="nowCallingName">{{ fisrtQueueInfo ? fisrtQueueInfo.patient_name : '' }}</p>
20 21
                 <p class="nowCallingTime">签到时间:{{ fisrtQueueInfo ? fisrtQueueInfo.create_time : '' }}</p>
21 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 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 25
             </div>
25 26
         </div>
26 27
     </div>
@@ -40,8 +41,9 @@ export default {
40 41
     data(){
41 42
         return{
42 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 48
             patientStateVal: 0,
47 49
             waitingCalled:[],
@@ -49,6 +51,10 @@ export default {
49 51
             fisrtQueueInfo:{},
50 52
             timer:null,
51 53
 
54
+            waitingCalledAm:[],
55
+            waitingCalledPm:[],
56
+            newFisrtQueueInfo:{}
57
+
52 58
         }
53 59
     },
54 60
     computed: {
@@ -116,53 +122,107 @@ export default {
116 122
                 let res = JSON.parse(e.data);
117 123
                 // let res = re.data;
118 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 190
         handleStateChange: function(index) {
165 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 227
         call(patient_id){
168 228
             if(patient_id == undefined || patient_id == ""){
@@ -185,7 +245,7 @@ export default {
185 245
                 }
186 246
             })
187 247
         },
188
-        next(patient_id){
248
+        next(patient_id,schedule_type){
189 249
             if(patient_id == undefined || patient_id == ""){
190 250
                 this.$message.error('已经是最后一位了');
191 251
                 return
@@ -193,7 +253,7 @@ export default {
193 253
             console.log('patient_id',patient_id)
194 254
             let org_id =  parseInt(sessionStorage.getItem("org_id"));
195 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 257
                 console.log(res)
198 258
                 // let patientArr = res.data.queue_list.data
199 259
                 // this.patientArr = patientArr

+ 109 - 47
src/xt_pages/sign/components/computerCalling.vue Ver fichero

@@ -11,15 +11,16 @@
11 11
         </div>
12 12
         <div style="display:flex;justify-content: space-between;">
13 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 17
             </div>
17 18
             <div class="nowCalling" v-if="patientStateVal == 0">
18 19
                 <p class="nowCallingTitle">当前叫号</p>
19 20
                 <p class="nowCallingName">{{ fisrtQueueInfo ? fisrtQueueInfo.patient_name : '' }}</p>
20 21
                 <p class="nowCallingTime">签到时间:{{ fisrtQueueInfo ? fisrtQueueInfo.create_time : '' }}</p>
21 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 24
             </div>
24 25
         </div>
25 26
     </div>
@@ -36,8 +37,9 @@ export default {
36 37
     data(){
37 38
         return{
38 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 44
             patientStateVal: 0,
43 45
             waitingCalled:[],
@@ -45,6 +47,10 @@ export default {
45 47
             fisrtQueueInfo:{},
46 48
             timer:null,
47 49
 
50
+            waitingCalledAm:[],
51
+            waitingCalledPm:[],
52
+            newFisrtQueueInfo:{}
53
+
48 54
         }
49 55
     },
50 56
     computed: {
@@ -89,55 +95,111 @@ export default {
89 95
         },
90 96
         websocketMess() {
91 97
             this.websocket.onmessage = e => {
98
+                
92 99
                 let res = JSON.parse(e.data);
93 100
                 // let res = re.data;
94 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 167
         handleStateChange: function(index) {
140 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 204
         call(patient_id){
143 205
             if(patient_id == undefined || patient_id == ""){
@@ -160,7 +222,7 @@ export default {
160 222
                 }
161 223
             })
162 224
         },
163
-        next(patient_id){
225
+        next(patient_id,schedule_type){
164 226
             if(patient_id == undefined || patient_id == ""){
165 227
                 this.$message.error('已经是最后一位了');
166 228
                 return
@@ -168,7 +230,7 @@ export default {
168 230
             console.log('patient_id',patient_id)
169 231
             let org_id =  parseInt(sessionStorage.getItem("org_id"));
170 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 234
                 console.log(res)
173 235
                 // let patientArr = res.data.queue_list.data
174 236
                 // this.patientArr = patientArr

+ 70 - 68
src/xt_pages/sign/lineUp.vue Ver fichero

@@ -353,75 +353,77 @@ export default {
353 353
                 let res = JSON.parse(e.data);
354 354
                 // let res = re.data;
355 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 428
                 // else if(res.channel == "patientQueueInfo"){
427 429
                 //     this.queueInfo = res.data.queueInfo

+ 30 - 28
src/xt_pages/sign/signIn.vue Ver fichero

@@ -216,34 +216,36 @@ export default {
216 216
                 let res = JSON.parse(e.data);
217 217
                 // let res = re.data;
218 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 250
                 // console.log("action", re.action);
249 251
                 // console.log("data", JSON.stringify(res));