|
@@ -21,7 +21,10 @@
|
21
|
21
|
<div v-for="(main_collection,index) in scheduleData" :key="index" style="page-break-after: always;">
|
22
|
22
|
<div class="signPrint">
|
23
|
23
|
<div>分区/床位号:{{main_collection.zone.name}}/{{main_collection.number.number}}</div>
|
24
|
|
- <div>姓名:{{main_collection.patient.name}}</div>
|
|
24
|
+ <div>姓名:
|
|
25
|
+ <span v-if="type ==1">{{main_collection.patient.name}} </span>
|
|
26
|
+ <span v-if="type ==2">{{main_collection.patient}} </span>
|
|
27
|
+ </div>
|
25
|
28
|
<div>抗凝剂:
|
26
|
29
|
<span v-if="org_id == 10138">{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name + ' 5000iu/瓶' : ''}}</span>
|
27
|
30
|
<span v-else >{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name: ''}}</span>
|
|
@@ -51,7 +54,7 @@
|
51
|
54
|
</template>
|
52
|
55
|
|
53
|
56
|
<script>
|
54
|
|
- import { getScheduleList,getPrintList } from '@/api/schedule'
|
|
57
|
+ import { getScheduleList,getPrintList,getNextScheduleWeekDay } from '@/api/schedule'
|
55
|
58
|
import { parseTime } from '@/utils'
|
56
|
59
|
import { uParseTime } from '@/utils/tools'
|
57
|
60
|
import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
|
@@ -81,24 +84,29 @@
|
81
|
84
|
now_time:0,
|
82
|
85
|
zone:"",
|
83
|
86
|
pre_status:0,
|
84
|
|
- printObj:{}
|
|
87
|
+ printObj:{},
|
|
88
|
+ type:1,
|
85
|
89
|
}
|
86
|
90
|
},
|
87
|
91
|
components: {
|
88
|
92
|
BreadCrumb
|
89
|
93
|
},
|
90
|
94
|
created() {
|
|
95
|
+ console.log("type2323233223232",this.$route.query.type)
|
|
96
|
+ this.type = this.$route.query.type
|
91
|
97
|
this.getPrintList()
|
92
|
98
|
this.org_id = this.$store.getters.xt_user.org.id
|
93
|
99
|
this.currentDate = this.getCurrentDate()
|
94
|
100
|
|
95
|
|
- this.modeOptions = this.$store.getters.treatment_mode
|
96
|
|
- this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
|
97
|
|
- this.week_type = this.$route.query.week_type
|
98
|
|
- this.week_time = this.$route.query.week_time
|
99
|
|
- this.zone = this.$route.query.zone
|
100
|
|
- this.pre_status = this.$route.query.prestatus
|
101
|
|
- const params = {
|
|
101
|
+ this.modeOptions = this.$store.getters.treatment_mode
|
|
102
|
+ this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
|
|
103
|
+ this.week_type = this.$route.query.week_type
|
|
104
|
+ this.week_time = this.$route.query.week_time
|
|
105
|
+ this.zone = this.$route.query.zone
|
|
106
|
+ this.pre_status = this.$route.query.prestatus
|
|
107
|
+
|
|
108
|
+ if(parseInt(this.$route.query.type) == 1){
|
|
109
|
+ const params = {
|
102
|
110
|
week_type:this.week_type,
|
103
|
111
|
week_time:this.week_time,
|
104
|
112
|
zone:this.zone,
|
|
@@ -152,6 +160,11 @@
|
152
|
160
|
var now_time = parseInt(this.week_type) * 86400 + this.start_time
|
153
|
161
|
console.log("now",now_time)
|
154
|
162
|
this.now_time = now_time
|
|
163
|
+ }
|
|
164
|
+ if(parseInt(this.$route.query.type) == 2){
|
|
165
|
+ this.getNextScheduleWeekDay()
|
|
166
|
+ }
|
|
167
|
+
|
155
|
168
|
},
|
156
|
169
|
methods: {
|
157
|
170
|
getAdvice:function(doctor_advice) {
|
|
@@ -305,6 +318,63 @@
|
305
|
318
|
this.printObj = list
|
306
|
319
|
}
|
307
|
320
|
})
|
|
321
|
+ },
|
|
322
|
+ getNextScheduleWeekDay() {
|
|
323
|
+ const start = moment().weekday(1).format('YYYY-MM-DD'); //本周一
|
|
324
|
+ const end = moment().weekday(7).format('YYYY-MM-DD')
|
|
325
|
+ var zone = this.zone
|
|
326
|
+ // var newArr = []
|
|
327
|
+ // for(let i=0;i<this.zoneList.length;i++){
|
|
328
|
+ // newArr.push(this.zoneList[i].id)
|
|
329
|
+ // }
|
|
330
|
+ // var arr = newArr.join(",")
|
|
331
|
+ // var str = ""
|
|
332
|
+ // if(this.zone == 0){
|
|
333
|
+ // str = arr
|
|
334
|
+ // }
|
|
335
|
+ // if(zone != 0){
|
|
336
|
+ // str = zone.join(",")
|
|
337
|
+ // }
|
|
338
|
+ const params = {
|
|
339
|
+ start_time:moment().week(moment().week() + 1).startOf('week').unix(),
|
|
340
|
+ end_time:moment().week(moment().week() + 1).endOf('week').unix(),
|
|
341
|
+ week_type:this.week_type,
|
|
342
|
+ week_time:this.week_time,
|
|
343
|
+ zone:this.zone,
|
|
344
|
+ }
|
|
345
|
+ // const params = {
|
|
346
|
+ // start_time:1609603200,
|
|
347
|
+ // end_time:1610208000,
|
|
348
|
+ // week_type:this.week_type,
|
|
349
|
+ // week_time:this.week_time,
|
|
350
|
+ // }
|
|
351
|
+ console.log("params",params)
|
|
352
|
+ getNextScheduleWeekDay(params).then(response => {
|
|
353
|
+ this.scheduleData = [];
|
|
354
|
+ if (response.data.state == 1) {
|
|
355
|
+ var scheduleData = response.data.data.schedule;
|
|
356
|
+
|
|
357
|
+ for(let i=0;i<scheduleData.length;i++){
|
|
358
|
+ scheduleData[i].sort = scheduleData[i].number.sort
|
|
359
|
+ }
|
|
360
|
+ var arr = scheduleData.sort(this.compare('sort'))
|
|
361
|
+ console.log("元旦快乐",arr)
|
|
362
|
+ this.scheduleData = arr
|
|
363
|
+
|
|
364
|
+ // var newList = []
|
|
365
|
+ // for(let i=0;i<scheduleData.length;i++){
|
|
366
|
+ // if(scheduleData.prescription.id > 0){
|
|
367
|
+ // newList.push(scheduleData[i])
|
|
368
|
+ // }
|
|
369
|
+ // }
|
|
370
|
+ // var arr = newList.sort(this.compare('sort'))
|
|
371
|
+ // console.log("元旦快乐",arr)
|
|
372
|
+ // this.scheduleData = arr
|
|
373
|
+ } else {
|
|
374
|
+ this.$message.error("网络错误");
|
|
375
|
+ return false;
|
|
376
|
+ }
|
|
377
|
+ });
|
308
|
378
|
}
|
309
|
379
|
}
|
310
|
380
|
}
|