|
@@ -23,7 +23,7 @@
|
23
|
23
|
</el-button>
|
24
|
24
|
</div>
|
25
|
25
|
<div>
|
26
|
|
- <el-table :data="patientTableData" :height="tableHeight" @row-click='choosePatient' border style="width: 100%;"
|
|
26
|
+ <el-table :data="patientTableData" :height="tableHeight" @row-click='choosePatient' @current-change='currentChange' border style="width: 100%;"
|
27
|
27
|
:row-style="{ color: '#303133' }"
|
28
|
28
|
:header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
29
|
29
|
highlight-current-row
|
|
@@ -69,7 +69,7 @@
|
69
|
69
|
<desk-prescription :addtions_charge="addtions_charge" :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
|
70
|
70
|
ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
|
71
|
71
|
:hisPatientInfo="hisPatientInfo" @event1="changetwo($event)"
|
72
|
|
- v-if="titleType == '电子处方'" style="flex:1;"></desk-prescription>
|
|
72
|
+ v-if="titleType == '电子处方'" style="flex:1;" v-on:change="changeTab"></desk-prescription>
|
73
|
73
|
<desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
|
74
|
74
|
:hisPatientInfo="hisPatientInfo" v-if="titleType == '电子病历'" :detalid="detalid" ref="child"></desk-record>
|
75
|
75
|
|
|
@@ -209,11 +209,35 @@
|
209
|
209
|
}
|
210
|
210
|
|
211
|
211
|
|
|
212
|
+ },changeTab(){
|
|
213
|
+ this.radio = 2
|
|
214
|
+ let params = {
|
|
215
|
+ 'record_date': this.record_date,
|
|
216
|
+ 'type': this.radio
|
|
217
|
+ }
|
|
218
|
+ this.patientTableData = []
|
|
219
|
+ getSchedulePatientList(params).then(response => {
|
|
220
|
+ if (response.data.state == 0) {
|
|
221
|
+ this.$message.error(response.data.msg)
|
|
222
|
+ return false
|
|
223
|
+ } else {
|
|
224
|
+ this.patientTableData = response.data.data.list
|
|
225
|
+ this.patientTableDataTwo = response.data.data.list
|
|
226
|
+ this.cal_one = response.data.data.total_one
|
|
227
|
+ this.cal_two = response.data.data.total_two
|
|
228
|
+ this.admin_info = response.data.data.info
|
|
229
|
+ for (let i = 0; i< this.patientTableData.length; i++){
|
|
230
|
+ if(this.patientTableData[i].patients.id == this.patientid){
|
|
231
|
+ this.$refs.tab.setCurrentRow(this.patientTableData[i])
|
|
232
|
+ }
|
|
233
|
+ }
|
|
234
|
+
|
|
235
|
+ }
|
|
236
|
+ })
|
|
237
|
+
|
212
|
238
|
},
|
213
|
239
|
change(val) {
|
214
|
240
|
this.getList()
|
215
|
|
-
|
216
|
|
-
|
217
|
241
|
},
|
218
|
242
|
getList() {
|
219
|
243
|
let params = {
|
|
@@ -236,6 +260,7 @@
|
236
|
260
|
|
237
|
261
|
if(this.patientTableData.length > 0) {
|
238
|
262
|
this.$refs.tab.setCurrentRow(this.patientTableData[0])
|
|
263
|
+ this.oldCurrentRow = this.patientTableData[0]
|
239
|
264
|
this.getPatientInfo(this.patientTableData[0])
|
240
|
265
|
}
|
241
|
266
|
|
|
@@ -395,6 +420,7 @@
|
395
|
420
|
|
396
|
421
|
|
397
|
422
|
},
|
|
423
|
+
|
398
|
424
|
choosePatient(val) {
|
399
|
425
|
let isShowDailog = false
|
400
|
426
|
for (let i = 0; i < this.prescriptions.length; i++){
|
|
@@ -403,6 +429,12 @@
|
403
|
429
|
}
|
404
|
430
|
}
|
405
|
431
|
if(isShowDailog){
|
|
432
|
+
|
|
433
|
+ this.patientTableData.map((item,index) => {
|
|
434
|
+ if(item.patient_id == this.oldCurrentRow.patient_id){
|
|
435
|
+ this.$refs.tab.setCurrentRow(this.patientTableData[index])
|
|
436
|
+ }
|
|
437
|
+ })
|
406
|
438
|
this.$message.error('需要保存当前处方才能切换')
|
407
|
439
|
return
|
408
|
440
|
}
|
|
@@ -540,6 +572,20 @@
|
540
|
572
|
this.$refs.prescriptions.setData(this.prescriptions,this.info)
|
541
|
573
|
}
|
542
|
574
|
})
|
|
575
|
+ },
|
|
576
|
+ currentChange(currentRow, oldCurrentRow){
|
|
577
|
+ let isShowDailog = false
|
|
578
|
+ for (let i = 0; i < this.prescriptions.length; i++){
|
|
579
|
+ if((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)){
|
|
580
|
+ isShowDailog = true
|
|
581
|
+ }
|
|
582
|
+ }
|
|
583
|
+ if(!isShowDailog){
|
|
584
|
+ this.oldCurrentRow = currentRow
|
|
585
|
+ return
|
|
586
|
+ }
|
|
587
|
+
|
|
588
|
+
|
543
|
589
|
},
|
544
|
590
|
open(index) {
|
545
|
591
|
console.log("index0999999",this.prescriptions)
|