|
@@ -0,0 +1,792 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="main-contain">
|
|
3
|
+ <div class="position">
|
|
4
|
+ <bread-crumb :crumbs="crumbs"></bread-crumb>
|
|
5
|
+ <el-row style="float:right;">
|
|
6
|
+ <el-col :span="24">
|
|
7
|
+ <el-button
|
|
8
|
+ size="small"
|
|
9
|
+ icon="el-icon-printer"
|
|
10
|
+ type="primary"
|
|
11
|
+ @click="printAction"
|
|
12
|
+ >打印</el-button
|
|
13
|
+ >
|
|
14
|
+ </el-col>
|
|
15
|
+ </el-row>
|
|
16
|
+ </div>
|
|
17
|
+ <div class="app-container" style="background-color: white;">
|
|
18
|
+ <div id="print_content">
|
|
19
|
+ <div class="print_main_content">
|
|
20
|
+ <div class="table_panel">
|
|
21
|
+ <div v-for="(main_collection,index) in scheduleData" :key="index" style="page-break-after: always;">
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+ <div class="signPrint" style="font-size:16px;">
|
|
25
|
+ <div>姓名:
|
|
26
|
+ <span v-if="type ==1 && printObj.name == 1">{{main_collection.patient.name}} </span>
|
|
27
|
+ <span v-if="type ==2 && printObj.name == 1">{{main_collection.patient}} </span>
|
|
28
|
+ <span v-if="type ==1 && printObj.name == 1">({{ main_collection.patient.dialysis_no }},
|
|
29
|
+ <span> {{getGender(main_collection.patient.gender)}},</span>
|
|
30
|
+ {{getNewAge(main_collection.patient.id_card_no) }}岁)</span>
|
|
31
|
+ <span v-if="type ==2 && printObj.name == 1">({{ main_collection.dialysis_no }},
|
|
32
|
+ <span>{{getGender(main_collection.gender) }},</span>
|
|
33
|
+ {{getNewAge(main_collection.id_card_no) }}岁)</span>
|
|
34
|
+
|
|
35
|
+ </div>
|
|
36
|
+ <div class="printCell">身份证:
|
|
37
|
+ <span v-if="type ==1">{{main_collection.patient.id_card_no}} </span>
|
|
38
|
+ <span v-if="type ==2">{{main_collection.id_card_no}} </span>
|
|
39
|
+ </div>
|
|
40
|
+ <div class="printCell">电话号码:
|
|
41
|
+ <span v-if="type ==1">{{main_collection.patient.phone}} </span>
|
|
42
|
+ <span v-if="type ==2">{{main_collection.phone}} </span>
|
|
43
|
+ </div>
|
|
44
|
+ <div class="printCell">
|
|
45
|
+ 透析模式:
|
|
46
|
+ <span>{{getModeId(main_collection.mode_id)}}</span>
|
|
47
|
+
|
|
48
|
+ </div>
|
|
49
|
+ <div class="printCell">
|
|
50
|
+ <span>
|
|
51
|
+ 分区/床号
|
|
52
|
+ <span style="width:auto;">{{main_collection.zone.name}}/</span>
|
|
53
|
+ {{ main_collection.number.number }}
|
|
54
|
+ <!-- <span style="width:auto;" v-if="main_collection.schedule_type == 1">上午</span>
|
|
55
|
+ <span style="width:auto;" v-if="main_collection.schedule_type == 2">下午</span>
|
|
56
|
+ <span style="width:auto;" v-if="main_collection.schedule_type == 3">晚上</span> -->
|
|
57
|
+ </span>
|
|
58
|
+
|
|
59
|
+ </div>
|
|
60
|
+ <div class="printCell" v-if="org_id==9671 || org_id==9675 || org_id==10340">
|
|
61
|
+ <span>上次脱水量:{{ main_collection.prescription.target_ultrafiltration }}ml</span>
|
|
62
|
+ </div>
|
|
63
|
+ <div class="printCell">
|
|
64
|
+ <span>抗凝剂:{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name : ''}}</span>
|
|
65
|
+ </div>
|
|
66
|
+
|
|
67
|
+ <div class="printCell">
|
|
68
|
+ 首剂:<span v-if="main_collection.dialysissolution.anticoagulant == 1">{{main_collection.dialysissolution.anticoagulant_shouji}} mg</span>
|
|
69
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 2">
|
|
70
|
+ {{main_collection.dialysissolution.anticoagulant_shouji}}mg
|
|
71
|
+ </span>
|
|
72
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 3">
|
|
73
|
+ {{main_collection.dialysissolution.anticoagulant_shouji}}iu
|
|
74
|
+ </span>
|
|
75
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 4">
|
|
76
|
+ {{main_collection.dialysissolution.anticoagulant_shouji}}mg
|
|
77
|
+ </span>
|
|
78
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 5">
|
|
79
|
+ {{main_collection.dialysissolution.anticoagulant_shouji}} mg
|
|
80
|
+ </span>
|
|
81
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 6">
|
|
82
|
+ {{main_collection.dialysissolution.anticoagulant_shouji}}iu
|
|
83
|
+ </span>
|
|
84
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 7">
|
|
85
|
+ {{main_collection.dialysissolution.anticoagulant_shouji}}iu
|
|
86
|
+ </span>
|
|
87
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 8">
|
|
88
|
+ {{main_collection.dialysissolution.anticoagulant_shouji}}iu
|
|
89
|
+ </span>
|
|
90
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 9">
|
|
91
|
+ {{main_collection.dialysissolution.anticoagulant_shouji}}iu
|
|
92
|
+ </span>
|
|
93
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 10">
|
|
94
|
+ {{main_collection.dialysissolution.anticoagulant_shouji}}iu
|
|
95
|
+ </span>
|
|
96
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 11">
|
|
97
|
+ {{main_collection.dialysissolution.anticoagulant_shouji}}iu
|
|
98
|
+ </span>
|
|
99
|
+
|
|
100
|
+ </div>
|
|
101
|
+ <div class="printCell">
|
|
102
|
+ 维持:{{main_collection.dialysissolution.anticoagulant_weichi}}
|
|
103
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 1">
|
|
104
|
+ mg/h
|
|
105
|
+ </span>
|
|
106
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 2">
|
|
107
|
+ mg/h
|
|
108
|
+ </span>
|
|
109
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 3">
|
|
110
|
+ iu/h
|
|
111
|
+ </span>
|
|
112
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 4">
|
|
113
|
+ mg/h
|
|
114
|
+ </span>
|
|
115
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 5">
|
|
116
|
+ mg/h
|
|
117
|
+ </span>
|
|
118
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 6">
|
|
119
|
+ iu/h
|
|
120
|
+ </span>
|
|
121
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 7">
|
|
122
|
+ iu/h
|
|
123
|
+ </span>
|
|
124
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 8">
|
|
125
|
+ iu/h
|
|
126
|
+ </span>
|
|
127
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 9">
|
|
128
|
+ iu/h
|
|
129
|
+ </span>
|
|
130
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 10">
|
|
131
|
+ iu/h
|
|
132
|
+ </span>
|
|
133
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 11">
|
|
134
|
+ iu/h
|
|
135
|
+ </span>
|
|
136
|
+
|
|
137
|
+ </div>
|
|
138
|
+
|
|
139
|
+ <div class="printCell">
|
|
140
|
+ 总量:{{main_collection.dialysissolution.anticoagulant_zongliang}}
|
|
141
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 1">
|
|
142
|
+ mg
|
|
143
|
+ </span>
|
|
144
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 2">
|
|
145
|
+ mg
|
|
146
|
+ </span>
|
|
147
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 3">
|
|
148
|
+ iu
|
|
149
|
+ </span>
|
|
150
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 4">
|
|
151
|
+ mg
|
|
152
|
+ </span>
|
|
153
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 5">
|
|
154
|
+ mg
|
|
155
|
+ </span>
|
|
156
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 6">
|
|
157
|
+ iu
|
|
158
|
+ </span>
|
|
159
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 7">
|
|
160
|
+ iu
|
|
161
|
+ </span>
|
|
162
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 8">
|
|
163
|
+ iu
|
|
164
|
+ </span>
|
|
165
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 9">
|
|
166
|
+ iu
|
|
167
|
+ </span>
|
|
168
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 10">
|
|
169
|
+ iu
|
|
170
|
+ </span>
|
|
171
|
+ <span v-if="main_collection.dialysissolution.anticoagulant == 11">
|
|
172
|
+ iu
|
|
173
|
+ </span>
|
|
174
|
+
|
|
175
|
+ </div>
|
|
176
|
+
|
|
177
|
+ <div class="printCell">
|
|
178
|
+ 透析器:
|
|
179
|
+ <span v-if="type ==1">{{main_collection.dialysis_order.dialysis_dialyszers}} </span>
|
|
180
|
+ <span v-if="type ==2">{{main_collection.dialysis_order.dialysis_dialyszers}} </span>
|
|
181
|
+
|
|
182
|
+ </div>
|
|
183
|
+ <div class="printCell">
|
|
184
|
+ 灌流器:
|
|
185
|
+ <span v-if="type ==1">{{main_collection.dialysis_order.dialysis_irrigation}} </span>
|
|
186
|
+ <span v-if="type ==2">{{main_collection.dialysis_order.dialysis_irrigation}} </span>
|
|
187
|
+ </div>
|
|
188
|
+ <div class="printCell">
|
|
189
|
+ 血管通路:
|
|
190
|
+ <span v-if="type ==1">{{getBloodAccess(main_collection.dialysis_order.blood_access_id)}} </span>
|
|
191
|
+ <span v-if="type ==2">{{getBloodAccess(main_collection.dialysis_order.blood_access_id)}} </span>
|
|
192
|
+ </div>
|
|
193
|
+
|
|
194
|
+ </div>
|
|
195
|
+ </div>
|
|
196
|
+ </div>
|
|
197
|
+ </div>
|
|
198
|
+ </div>
|
|
199
|
+ </div>
|
|
200
|
+ </div>
|
|
201
|
+</template>
|
|
202
|
+
|
|
203
|
+<script>
|
|
204
|
+ import { getScheduleList,getPrintList,getNextScheduleWeekDayOne } from '@/api/schedule'
|
|
205
|
+ import { parseTime } from '@/utils'
|
|
206
|
+ import { uParseTime } from '@/utils/tools'
|
|
207
|
+ import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
|
208
|
+ import { getDataConfig } from '@/utils/data'
|
|
209
|
+ import print from 'print-js'
|
|
210
|
+ const moment = require('moment')
|
|
211
|
+ export default {
|
|
212
|
+ name: 'SchedulePrint',
|
|
213
|
+ data() {
|
|
214
|
+ return {
|
|
215
|
+ crumbs: [
|
|
216
|
+ { path: false, name: '排班提醒' },
|
|
217
|
+ { path: false, name: '排班提醒打印' }
|
|
218
|
+ ],
|
|
219
|
+ scheduleData:[],
|
|
220
|
+ week_type: 0,
|
|
221
|
+ day:'',
|
|
222
|
+ td_1_width: '10%',
|
|
223
|
+ td_2_width: '10%',
|
|
224
|
+ td_3_width: '25%',
|
|
225
|
+ td_4_width: '45%',
|
|
226
|
+ modeOptions: null,
|
|
227
|
+ anticoagulants_confit:null,
|
|
228
|
+ currentDate:'',
|
|
229
|
+ start_time:moment().week(moment().week() + 1).startOf('week').unix(),
|
|
230
|
+ end_time:moment().week(moment().week() + 1).endOf('week').unix(),
|
|
231
|
+ org_id:0,
|
|
232
|
+ now_time:0,
|
|
233
|
+ zone:"",
|
|
234
|
+ pre_status:0,
|
|
235
|
+ printObj:{},
|
|
236
|
+ type:1,
|
|
237
|
+ printDate:''
|
|
238
|
+ }
|
|
239
|
+ },
|
|
240
|
+ components: {
|
|
241
|
+ BreadCrumb
|
|
242
|
+ },
|
|
243
|
+ created() {
|
|
244
|
+ this.type = this.$route.query.type
|
|
245
|
+ this.getPrintList()
|
|
246
|
+ this.org_id = this.$store.getters.xt_user.org.id
|
|
247
|
+ console.log("机构ID",this.org_id)
|
|
248
|
+ this.currentDate = this.getCurrentDate()
|
|
249
|
+
|
|
250
|
+ this.printDate = moment().format("YYYY-MM-DD HH:mm:ss")
|
|
251
|
+ this.modeOptions = this.$store.getters.treatment_mode
|
|
252
|
+ this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
|
|
253
|
+ this.week_type = this.$route.query.week_type
|
|
254
|
+ this.week_time = this.$route.query.week_time
|
|
255
|
+ this.zone = this.$route.query.zone
|
|
256
|
+ this.pre_status = this.$route.query.prestatus
|
|
257
|
+
|
|
258
|
+ if(parseInt(this.$route.query.type) == 1){
|
|
259
|
+ const params = {
|
|
260
|
+ week_type:this.week_type,
|
|
261
|
+ week_time:this.week_time,
|
|
262
|
+ zone:this.zone,
|
|
263
|
+ }
|
|
264
|
+ console.log("params",params)
|
|
265
|
+ getScheduleList(params).then(response=>{
|
|
266
|
+ if(response.data.state ==1){
|
|
267
|
+ var list = response.data.data.list
|
|
268
|
+
|
|
269
|
+ for(let i=0;i<list.length;i++){
|
|
270
|
+ list[i].sort = list[i].number.sort
|
|
271
|
+ }
|
|
272
|
+ var arr = list.sort(this.compare('sort'))
|
|
273
|
+
|
|
274
|
+ this.scheduleData = arr
|
|
275
|
+
|
|
276
|
+ let a = response.data.data.day
|
|
277
|
+ console.log("a",a)
|
|
278
|
+ var myDate = new Date(a);
|
|
279
|
+ var year = myDate.getFullYear(); //年
|
|
280
|
+ var month = myDate.getMonth() + 1; //月
|
|
281
|
+ var day = myDate.getDate(); //日
|
|
282
|
+ var days = myDate.getDay();
|
|
283
|
+ switch(days) {
|
|
284
|
+ case 1:
|
|
285
|
+ days = '星期一';
|
|
286
|
+ break;
|
|
287
|
+ case 2:
|
|
288
|
+ days = '星期二';
|
|
289
|
+ break;
|
|
290
|
+ case 3:
|
|
291
|
+ days = '星期三';
|
|
292
|
+ break;
|
|
293
|
+ case 4:
|
|
294
|
+ days = '星期四';
|
|
295
|
+ break;
|
|
296
|
+ case 5:
|
|
297
|
+ days = '星期五';
|
|
298
|
+ break;
|
|
299
|
+ case 6:
|
|
300
|
+ days = '星期六';
|
|
301
|
+ break;
|
|
302
|
+ case 0:
|
|
303
|
+ days = '星期日';
|
|
304
|
+ break;
|
|
305
|
+ }
|
|
306
|
+ var str = year + "年" + month + "月" + day + "日 " + days;
|
|
307
|
+ this.currentDate = str
|
|
308
|
+ }
|
|
309
|
+ })
|
|
310
|
+
|
|
311
|
+ var now_time = parseInt(this.week_type) * 86400 + this.start_time
|
|
312
|
+ console.log("now",now_time)
|
|
313
|
+ this.now_time = now_time
|
|
314
|
+ }
|
|
315
|
+ if(parseInt(this.$route.query.type) == 2){
|
|
316
|
+ this.getNextScheduleWeekDay()
|
|
317
|
+ }
|
|
318
|
+
|
|
319
|
+ },
|
|
320
|
+ methods: {
|
|
321
|
+ getAdvice:function(doctor_advice) {
|
|
322
|
+ if (doctor_advice != null) {
|
|
323
|
+
|
|
324
|
+ let name = ""
|
|
325
|
+ for (let i = 0; i< doctor_advice.length; i++) {
|
|
326
|
+
|
|
327
|
+ let prescribing_number = ''
|
|
328
|
+ let single_dose = ''
|
|
329
|
+ let drug_spec = ''
|
|
330
|
+
|
|
331
|
+ if (doctor_advice[i].prescribing_number > 0) {
|
|
332
|
+ prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
|
|
333
|
+ }
|
|
334
|
+ if (doctor_advice[i].single_dose > 0) {
|
|
335
|
+ single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
|
|
336
|
+ }
|
|
337
|
+
|
|
338
|
+ if (doctor_advice[i].drug_spec > 0) {
|
|
339
|
+ drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
|
|
340
|
+ }
|
|
341
|
+
|
|
342
|
+ name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
|
|
343
|
+
|
|
344
|
+ if (doctor_advice[i].child.length > 0) {
|
|
345
|
+
|
|
346
|
+ for (let a = 0; a < doctor_advice[i].child.length; a++) {
|
|
347
|
+
|
|
348
|
+ if (doctor_advice[i].child[a].prescribing_number > 0) {
|
|
349
|
+ doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
|
|
350
|
+ } else {
|
|
351
|
+ doctor_advice[i].child[a]['presc'] = ''
|
|
352
|
+ }
|
|
353
|
+
|
|
354
|
+ if (doctor_advice[i].child[a].single_dose > 0) {
|
|
355
|
+ doctor_advice[i].child[a]['single'] = " " + ' 单次用量 ' + " " + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
|
|
356
|
+ } else {
|
|
357
|
+ doctor_advice[i].child[a]['single'] = ''
|
|
358
|
+ }
|
|
359
|
+
|
|
360
|
+ name = name + "▲" + doctor_advice[i].child[a].advice_name + ""
|
|
361
|
+ + doctor_advice[i].child[a].advice_desc
|
|
362
|
+ + doctor_advice[i].child[a].drug_spec_unit
|
|
363
|
+ + doctor_advice[i].child[a].presc
|
|
364
|
+ + doctor_advice[i].child[a].single + "\n"
|
|
365
|
+ }
|
|
366
|
+
|
|
367
|
+ }
|
|
368
|
+ }
|
|
369
|
+ return name
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+ }
|
|
373
|
+
|
|
374
|
+ },
|
|
375
|
+ printAction: function() {
|
|
376
|
+ const style = '@media print {.signPrint{margin-left:30px;} .print_main_content { background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 180px;} @page {margin-top:10px;}}'
|
|
377
|
+ const style1 = '@media print { .print_main_content { background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 170px;} @page {margin-top:10px;}}'
|
|
378
|
+ if(this.org_id == 10188 || this.org_id == 10217 || this.org_id == 10340){
|
|
379
|
+ printJS({
|
|
380
|
+ printable: 'print_content',
|
|
381
|
+ type: 'html',
|
|
382
|
+ documentTitle: ' ',
|
|
383
|
+ style: style1,
|
|
384
|
+ scanStyles: false
|
|
385
|
+ })
|
|
386
|
+ }else{
|
|
387
|
+ printJS({
|
|
388
|
+ printable: 'print_content',
|
|
389
|
+ type: 'html',
|
|
390
|
+ documentTitle: ' ',
|
|
391
|
+ style: style,
|
|
392
|
+ scanStyles: false
|
|
393
|
+ })
|
|
394
|
+ }
|
|
395
|
+
|
|
396
|
+ }, getSchedulesType: function(type) {
|
|
397
|
+ let type_name = ''
|
|
398
|
+ switch (type) {
|
|
399
|
+ case 1:
|
|
400
|
+ type_name = '上午'
|
|
401
|
+ break
|
|
402
|
+ case 2:
|
|
403
|
+ type_name = '下午'
|
|
404
|
+ break
|
|
405
|
+ case 3:
|
|
406
|
+ type_name = '晚上'
|
|
407
|
+ break
|
|
408
|
+ }
|
|
409
|
+ return type_name
|
|
410
|
+ },
|
|
411
|
+ getCurrentDate: function () {
|
|
412
|
+ console.log(this.$route.query.week_type)
|
|
413
|
+ var myDate = new Date();
|
|
414
|
+ var year = myDate.getFullYear(); //年
|
|
415
|
+ var month = myDate.getMonth() + 1; //月
|
|
416
|
+ var day = myDate.getDate() + 7; //日
|
|
417
|
+ var newday = myDate.getDay();
|
|
418
|
+ var days = parseInt(this.$route.query.week_type);
|
|
419
|
+ var dayNum = parseInt(this.$route.query.week_type);
|
|
420
|
+ switch(days) {
|
|
421
|
+ case 1:
|
|
422
|
+ days = '星期一';
|
|
423
|
+ break;
|
|
424
|
+ case 2:
|
|
425
|
+ days = '星期二';
|
|
426
|
+ break;
|
|
427
|
+ case 3:
|
|
428
|
+ days = '星期三';
|
|
429
|
+ break;
|
|
430
|
+ case 4:
|
|
431
|
+ days = '星期四';
|
|
432
|
+ break;
|
|
433
|
+ case 5:
|
|
434
|
+ days = '星期五';
|
|
435
|
+ break;
|
|
436
|
+ case 6:
|
|
437
|
+ days = '星期六';
|
|
438
|
+ break;
|
|
439
|
+ case 7:
|
|
440
|
+ days = '星期日';
|
|
441
|
+ break;
|
|
442
|
+ }
|
|
443
|
+ if(newday > dayNum){
|
|
444
|
+ let lastDay = day - (newday - dayNum)
|
|
445
|
+ console.log("lastDay1",lastDay)
|
|
446
|
+ var str = year + "年" + month + "月" + lastDay + "日 " + days;
|
|
447
|
+ return str;
|
|
448
|
+ }else if(newday < dayNum){
|
|
449
|
+ let lastDay = day + (dayNum - newday)
|
|
450
|
+ console.log("lastDay2",lastDay)
|
|
451
|
+ var str = year + "年" + month + "月" + lastDay + "日 " + days;
|
|
452
|
+ return str;
|
|
453
|
+ }else{
|
|
454
|
+ var str = year + "年" + month + "月" + day + "日 " + days;
|
|
455
|
+ return str;
|
|
456
|
+ }
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+ },
|
|
460
|
+
|
|
461
|
+ compare(property) {
|
|
462
|
+ return function (a, b) {
|
|
463
|
+ var value1 = a[property];
|
|
464
|
+ var value2 = b[property];
|
|
465
|
+ return value1 - value2;
|
|
466
|
+ }
|
|
467
|
+ },
|
|
468
|
+ getTime(val) {
|
|
469
|
+ if(val == ""){
|
|
470
|
+ return ""
|
|
471
|
+ }else {
|
|
472
|
+ return uParseTime(val, '{y}-{m}-{d}')
|
|
473
|
+ }
|
|
474
|
+ },
|
|
475
|
+ getPrintList(){
|
|
476
|
+ getPrintList().then(response=>{
|
|
477
|
+ if(response.data.state == 1){
|
|
478
|
+ var list = response.data.data.list
|
|
479
|
+ console.log("打印设置",list)
|
|
480
|
+ this.printObj = list
|
|
481
|
+ }
|
|
482
|
+ })
|
|
483
|
+ },
|
|
484
|
+ getNextScheduleWeekDay() {
|
|
485
|
+ const start = moment().weekday(1).format('YYYY-MM-DD'); //本周一
|
|
486
|
+ const end = moment().weekday(7).format('YYYY-MM-DD')
|
|
487
|
+ var zone = this.zone
|
|
488
|
+ // var newArr = []
|
|
489
|
+ // for(let i=0;i<this.zoneList.length;i++){
|
|
490
|
+ // newArr.push(this.zoneList[i].id)
|
|
491
|
+ // }
|
|
492
|
+ // var arr = newArr.join(",")
|
|
493
|
+ // var str = ""
|
|
494
|
+ // if(this.zone == 0){
|
|
495
|
+ // str = arr
|
|
496
|
+ // }
|
|
497
|
+ // if(zone != 0){
|
|
498
|
+ // str = zone.join(",")
|
|
499
|
+ // }
|
|
500
|
+ var now_time = parseInt(this.week_type) * 86400 + this.start_time
|
|
501
|
+ const params = {
|
|
502
|
+ start_time:moment().week(moment().week() + 1).startOf('week').unix(),
|
|
503
|
+ end_time:moment().week(moment().week() + 1).endOf('week').unix(),
|
|
504
|
+ week_type:this.week_type,
|
|
505
|
+ week_time:this.week_time,
|
|
506
|
+ zone:this.zone,
|
|
507
|
+ record_date:this.getTime(now_time)
|
|
508
|
+ }
|
|
509
|
+ // const params = {
|
|
510
|
+ // start_time:1609603200,
|
|
511
|
+ // end_time:1610208000,
|
|
512
|
+ // week_type:this.week_type,
|
|
513
|
+ // week_time:this.week_time,
|
|
514
|
+ // }
|
|
515
|
+ console.log("params",params)
|
|
516
|
+ getNextScheduleWeekDayOne(params).then(response => {
|
|
517
|
+ this.scheduleData = [];
|
|
518
|
+ if (response.data.state == 1) {
|
|
519
|
+ var scheduleData = response.data.data.schedule;
|
|
520
|
+
|
|
521
|
+ for(let i=0;i<scheduleData.length;i++){
|
|
522
|
+ scheduleData[i].sort = scheduleData[i].number.sort
|
|
523
|
+ }
|
|
524
|
+ var arr = scheduleData.sort(this.compare('sort'))
|
|
525
|
+ console.log("元旦快乐",arr)
|
|
526
|
+ this.scheduleData = arr
|
|
527
|
+
|
|
528
|
+ // var newList = []
|
|
529
|
+ // for(let i=0;i<scheduleData.length;i++){
|
|
530
|
+ // if(scheduleData.prescription.id > 0){
|
|
531
|
+ // newList.push(scheduleData[i])
|
|
532
|
+ // }
|
|
533
|
+ // }
|
|
534
|
+ // var arr = newList.sort(this.compare('sort'))
|
|
535
|
+ // console.log("元旦快乐",arr)
|
|
536
|
+ // this.scheduleData = arr
|
|
537
|
+ } else {
|
|
538
|
+ this.$message.error("网络错误");
|
|
539
|
+ return false;
|
|
540
|
+ }
|
|
541
|
+ });
|
|
542
|
+ },
|
|
543
|
+ getAnticoagulant(name){
|
|
544
|
+
|
|
545
|
+ if(name == 0){
|
|
546
|
+ name = ""
|
|
547
|
+ }
|
|
548
|
+ if(name == 1){
|
|
549
|
+ name = "无肝素"
|
|
550
|
+ }
|
|
551
|
+ if(name == 2){
|
|
552
|
+ name = "普通肝素"
|
|
553
|
+ }
|
|
554
|
+ if(name == 3){
|
|
555
|
+ name ="低分子肝素"
|
|
556
|
+ }
|
|
557
|
+
|
|
558
|
+ if(name == 4){
|
|
559
|
+ name = "阿加曲班"
|
|
560
|
+ }
|
|
561
|
+ if(name == 5){
|
|
562
|
+ name = "枸橼酸钠"
|
|
563
|
+ }
|
|
564
|
+ if(name == 6){
|
|
565
|
+ name = "低分子肝素钙"
|
|
566
|
+ }
|
|
567
|
+ if(name == 7){
|
|
568
|
+ name = "低分子肝素钠"
|
|
569
|
+ }
|
|
570
|
+
|
|
571
|
+ return name
|
|
572
|
+ },
|
|
573
|
+ getAnticoagulantZonliang(arr,mode_id){
|
|
574
|
+ var name = 0
|
|
575
|
+ if(arr.length > 0){
|
|
576
|
+ for(let i=0;i<arr.length;i++){
|
|
577
|
+ if(mode_id == arr[i].mode_id){
|
|
578
|
+ name = arr[i].anticoagulant_zongliang
|
|
579
|
+ }
|
|
580
|
+ }
|
|
581
|
+ }
|
|
582
|
+ return name
|
|
583
|
+ },
|
|
584
|
+ getNewAge(UUserCard) {
|
|
585
|
+ if (UUserCard != null && UUserCard != '') {
|
|
586
|
+ // 获取年龄
|
|
587
|
+ var myDate = new Date()
|
|
588
|
+ var month = myDate.getMonth() + 1
|
|
589
|
+ var day = myDate.getDate()
|
|
590
|
+ var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
|
|
591
|
+ if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
|
|
592
|
+ age++
|
|
593
|
+ }
|
|
594
|
+ return age
|
|
595
|
+ }
|
|
596
|
+ },
|
|
597
|
+ getGender(gender){
|
|
598
|
+ var name = ""
|
|
599
|
+ if(gender == 1){
|
|
600
|
+ name = "男"
|
|
601
|
+ }
|
|
602
|
+ if(gender == 2){
|
|
603
|
+ name = "女"
|
|
604
|
+ }
|
|
605
|
+ return name
|
|
606
|
+ },
|
|
607
|
+ getModeId(id){
|
|
608
|
+ var name = ""
|
|
609
|
+ if(id == 1){
|
|
610
|
+ name = "HD"
|
|
611
|
+ }
|
|
612
|
+ if(id == 2){
|
|
613
|
+ name = "HDF"
|
|
614
|
+ }
|
|
615
|
+ if(id == 3){
|
|
616
|
+ name = "HD+HP"
|
|
617
|
+ }
|
|
618
|
+ if(id == 4){
|
|
619
|
+ name = "HP"
|
|
620
|
+ }
|
|
621
|
+ if(id == 5){
|
|
622
|
+ name = "HF"
|
|
623
|
+ }
|
|
624
|
+ if(id == 6){
|
|
625
|
+ name = "SCUF"
|
|
626
|
+ }
|
|
627
|
+ if(id == 7){
|
|
628
|
+ name = "IUF"
|
|
629
|
+ }
|
|
630
|
+ if(id == 8){
|
|
631
|
+ name = "HFHD"
|
|
632
|
+ }
|
|
633
|
+ if(id == 9){
|
|
634
|
+ name = "HFHD+HP"
|
|
635
|
+ }
|
|
636
|
+ if(id == 10){
|
|
637
|
+ name = "PHF"
|
|
638
|
+ }
|
|
639
|
+ if(id == 11){
|
|
640
|
+ name = "HFR"
|
|
641
|
+ }
|
|
642
|
+ if(id == 12){
|
|
643
|
+ name = "HDF+HP"
|
|
644
|
+ }
|
|
645
|
+ if(id == 13){
|
|
646
|
+ name = "CRRT"
|
|
647
|
+ }
|
|
648
|
+ if(id == 14){
|
|
649
|
+ name = "腹水回输"
|
|
650
|
+ }
|
|
651
|
+ if(id == 19){
|
|
652
|
+ name = "IUF+HD"
|
|
653
|
+ }
|
|
654
|
+ if(id == 20){
|
|
655
|
+ name = "UF"
|
|
656
|
+ }
|
|
657
|
+ if(id == 21){
|
|
658
|
+ name = "HD+"
|
|
659
|
+ }
|
|
660
|
+ if(id == 22){
|
|
661
|
+ name = "血浆胆红素吸附+HDF"
|
|
662
|
+ }
|
|
663
|
+ if(id == 23){
|
|
664
|
+ name = "血浆胆红素吸附"
|
|
665
|
+ }
|
|
666
|
+ if(id == 24){
|
|
667
|
+ name = "I-HDF"
|
|
668
|
+ }
|
|
669
|
+ if(id == 25){
|
|
670
|
+ name = "HD高通"
|
|
671
|
+ }
|
|
672
|
+ if(id == 26){
|
|
673
|
+ name = "CVVH"
|
|
674
|
+ }
|
|
675
|
+ if(id == 27){
|
|
676
|
+ name = "CVVHD"
|
|
677
|
+ }
|
|
678
|
+ if(id == 28){
|
|
679
|
+ name = "CVVHDF"
|
|
680
|
+ }
|
|
681
|
+ if(id == 29){
|
|
682
|
+ name = "PE"
|
|
683
|
+ }
|
|
684
|
+ if(id == 30){
|
|
685
|
+ name = "血浆胆红素吸附+HP"
|
|
686
|
+ }
|
|
687
|
+ if(id == 31){
|
|
688
|
+ name = "HPD"
|
|
689
|
+ }
|
|
690
|
+ if(id == 32){
|
|
691
|
+ name = "HDP"
|
|
692
|
+ }
|
|
693
|
+ return name
|
|
694
|
+ },
|
|
695
|
+ getBloodAccess(id){
|
|
696
|
+ var name = ""
|
|
697
|
+ var list = getDataConfig(
|
|
698
|
+ 'hemodialysis',
|
|
699
|
+ 'vascular_access_desc'
|
|
700
|
+ )
|
|
701
|
+ for(let i=0;i<list.length;i++){
|
|
702
|
+ if(id== list[i].id){
|
|
703
|
+ name = list[i].name
|
|
704
|
+ }
|
|
705
|
+ }
|
|
706
|
+ return name
|
|
707
|
+ }
|
|
708
|
+
|
|
709
|
+ }
|
|
710
|
+ }
|
|
711
|
+</script>
|
|
712
|
+
|
|
713
|
+<style rel="stylesheet/scss" lang="scss" scoped>
|
|
714
|
+.print_main_content {
|
|
715
|
+ background-color: white;
|
|
716
|
+ max-width: 1500px;
|
|
717
|
+ margin: 0 auto;
|
|
718
|
+ padding: 0 0 20px 0;
|
|
719
|
+
|
|
720
|
+ .order_title_panl {
|
|
721
|
+ text-align: center;
|
|
722
|
+
|
|
723
|
+ .main_title {
|
|
724
|
+ font-size: 18px;
|
|
725
|
+ line-height: 40px;
|
|
726
|
+ font-weight: 500;
|
|
727
|
+ }
|
|
728
|
+ }
|
|
729
|
+ .table_panel {
|
|
730
|
+ .table {
|
|
731
|
+ width: 100%;
|
|
732
|
+ border: 1px solid;
|
|
733
|
+ border-collapse: collapse;
|
|
734
|
+ padding: 2px;
|
|
735
|
+
|
|
736
|
+ thead {
|
|
737
|
+ tr {
|
|
738
|
+ td {
|
|
739
|
+ border: 1px solid;
|
|
740
|
+ text-align: center;
|
|
741
|
+ font-size: 20px;
|
|
742
|
+ padding: 15px 5px;
|
|
743
|
+ }
|
|
744
|
+ }
|
|
745
|
+ }
|
|
746
|
+ tbody {
|
|
747
|
+ tr {
|
|
748
|
+ td {
|
|
749
|
+ border: 1px solid;
|
|
750
|
+ text-align: center;
|
|
751
|
+ font-size: 18px;
|
|
752
|
+ padding: 10px 5px;
|
|
753
|
+
|
|
754
|
+ .proj {
|
|
755
|
+ padding: 5px 0;
|
|
756
|
+ text-align: left;
|
|
757
|
+
|
|
758
|
+ .proj_title {
|
|
759
|
+ font-size: 16px;
|
|
760
|
+ font-weight: 500;
|
|
761
|
+ line-height: 25px;
|
|
762
|
+ }
|
|
763
|
+
|
|
764
|
+ .proj_item {
|
|
765
|
+ font-size: 15px;
|
|
766
|
+ line-height: 20px;
|
|
767
|
+
|
|
768
|
+ .zone_name {
|
|
769
|
+ font-weight: 500;
|
|
770
|
+ }
|
|
771
|
+ }
|
|
772
|
+ }
|
|
773
|
+ }
|
|
774
|
+ }
|
|
775
|
+ }
|
|
776
|
+ }
|
|
777
|
+ }
|
|
778
|
+}
|
|
779
|
+.signPrint{
|
|
780
|
+ -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
|
|
781
|
+ -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
|
|
782
|
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
|
|
783
|
+ margin-bottom: 20px;
|
|
784
|
+ padding: 20px 10px;
|
|
785
|
+}
|
|
786
|
+.printCell{
|
|
787
|
+ span{
|
|
788
|
+ display: inline-block;
|
|
789
|
+ width: 180px;
|
|
790
|
+ }
|
|
791
|
+}
|
|
792
|
+</style>
|