|
@@ -0,0 +1,909 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="main-contain">
|
|
3
|
+ <div class="position">
|
|
4
|
+ <bread-crumb :crumbs="crumbs" style="flex:1;"></bread-crumb>
|
|
5
|
+ </div>
|
|
6
|
+ <div class="app-container" style="background-color: white">
|
|
7
|
+ <div id="print_content">
|
|
8
|
+ <div style="margin: 20px 0;">
|
|
9
|
+ <div class="content_top">日期:
|
|
10
|
+ <el-date-picker
|
|
11
|
+ @change="date_picker"
|
|
12
|
+ v-model="date"
|
|
13
|
+ type="date"
|
|
14
|
+ placeholder="选择日期">
|
|
15
|
+ </el-date-picker>
|
|
16
|
+ </div>
|
|
17
|
+ <div class="content_top">排班班次:
|
|
18
|
+ <el-select v-model="classes" placeholder="请选择" @change="banci_select">
|
|
19
|
+ <el-option
|
|
20
|
+ v-for="item in schedulArr"
|
|
21
|
+ :key="item.value"
|
|
22
|
+ :label="item.label"
|
|
23
|
+ :value="item.value">
|
|
24
|
+ </el-option>
|
|
25
|
+ </el-select>
|
|
26
|
+ </div>
|
|
27
|
+ <div class="content_top">病区选择:
|
|
28
|
+ <el-select v-model="bingqu" placeholder="请选择" @change="bingqu_select">
|
|
29
|
+ <el-option
|
|
30
|
+ v-for="item in partitionArr"
|
|
31
|
+ :key="item.value"
|
|
32
|
+ :label="item.name"
|
|
33
|
+ :value="item.id">
|
|
34
|
+ </el-option>
|
|
35
|
+ </el-select>
|
|
36
|
+ </div>
|
|
37
|
+ <div class="content_top">隐藏备注:
|
|
38
|
+ <el-switch
|
|
39
|
+ v-model="value"
|
|
40
|
+ active-color="#13ce66"
|
|
41
|
+ inactive-color="#ff4949"
|
|
42
|
+ active-text="ON"
|
|
43
|
+ inactive-text="OFF">
|
|
44
|
+ </el-switch>
|
|
45
|
+ </div>
|
|
46
|
+ </div>
|
|
47
|
+ <div class="table_panel" v-for="(item, index) in tableData" :key="index">
|
|
48
|
+ <table class="table">
|
|
49
|
+ <thead>
|
|
50
|
+ <tr>
|
|
51
|
+ <td :width="td_1_width">分区</td>
|
|
52
|
+ <td :width="td_3_width">病人姓名</td>
|
|
53
|
+ </tr>
|
|
54
|
+ </thead>
|
|
55
|
+ <tbody>
|
|
56
|
+ <tr v-for="(ite,index) in item.zones" :key="index">
|
|
57
|
+ <td style="text-align: center;">{{ getZoneName(ite.partition_id) }}</td>
|
|
58
|
+ <td>
|
|
59
|
+ <template v-for="(it,index) in item.list">
|
|
60
|
+ <div v-if="ite.partition_id==it.partition_id" class="huanzhekuai" style="" @dblclick="db_click">
|
|
61
|
+ <div style="max-height: 110px; margin-top: 10px;margin-bottom: 5px;background: rgb(74 197 235);" @dragstart.self="curInfoDragStart($event,it)" @drop.self="drop($event,it)" @dragover="allowDrop" draggable="true" >
|
|
62
|
+ <span>{{ it.name }}({{ getmode(it.mode_id) }})</span><br>
|
|
63
|
+ <div v-if="value" >
|
|
64
|
+ <span style="font-size: 14px;color: rgb(12, 185, 50);margin-bottom: 5px;">{{it.order.DeviceNumber.zone.name}}-{{it.order.DeviceNumber.number}}</span><br>
|
|
65
|
+ <span style="font-size: 14px;color:orange;margin-bottom: 5px;">{{getBloodAccess(it.order.blood_access_id)}}</span><br>
|
|
66
|
+ <span style="font-size: 13px;color:rgb(102, 13, 161);margin-bottom: 5px;">{{it.order.schedule_remark}}</span>
|
|
67
|
+ </div>
|
|
68
|
+ </div>
|
|
69
|
+
|
|
70
|
+ </div>
|
|
71
|
+ </template>
|
|
72
|
+ </td>
|
|
73
|
+ </tr>
|
|
74
|
+ </tbody>
|
|
75
|
+ </table>
|
|
76
|
+
|
|
77
|
+ </div>
|
|
78
|
+ <!-- 双击弹窗 -->
|
|
79
|
+ <el-dialog
|
|
80
|
+ title="提示"
|
|
81
|
+ :visible.sync="centerDialogVisible"
|
|
82
|
+ width="30%"
|
|
83
|
+ center>
|
|
84
|
+ <div>
|
|
85
|
+ <div style="display: flex;">
|
|
86
|
+ <div style="width:300px;margin-right: 10px;">
|
|
87
|
+ <div style="margin: 10px 0;">分区
|
|
88
|
+ <el-select v-model="fenqu_dialog" placeholder="请选择">
|
|
89
|
+ <el-option
|
|
90
|
+ v-for="item in options"
|
|
91
|
+ :key="item.value"
|
|
92
|
+ :label="item.label"
|
|
93
|
+ :value="item.value">
|
|
94
|
+ </el-option>
|
|
95
|
+ </el-select>
|
|
96
|
+ </div>
|
|
97
|
+ <div>床位
|
|
98
|
+ <el-select v-model="chuangwei" placeholder="请选择">
|
|
99
|
+ <el-option
|
|
100
|
+ v-for="item in options"
|
|
101
|
+ :key="item.value"
|
|
102
|
+ :label="item.label"
|
|
103
|
+ :value="item.value">
|
|
104
|
+ </el-option>
|
|
105
|
+ </el-select>
|
|
106
|
+ </div>
|
|
107
|
+ </div>
|
|
108
|
+ <div style="width:200px">
|
|
109
|
+ <div style="margin-top: 10px;margin-bottom: 5px;background: rgb(74 197 235);height: 110px;width: 125px;text-align: center;">
|
|
110
|
+ <span >周建(HD)</span><br>
|
|
111
|
+ <span style="font-size: 14px;color: rgb(12, 185, 50);margin-bottom: 5px;">A1区-6号床</span><br>
|
|
112
|
+ <span style="font-size: 14px;color:orange;margin-bottom: 5px;">颈部长期置管</span><br>
|
|
113
|
+ <span style="font-size: 13px;color:rgb(102, 13, 161);margin-bottom: 5px;">不睡7区,下机动脉用纱布压。用德朗</span>
|
|
114
|
+ </div>
|
|
115
|
+ </div>
|
|
116
|
+ </div>
|
|
117
|
+ </div>
|
|
118
|
+ <span slot="footer" class="dialog-footer">
|
|
119
|
+ <el-button @click="centerDialogVisible = false">取 消</el-button>
|
|
120
|
+ <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
|
|
121
|
+ </span>
|
|
122
|
+ </el-dialog>
|
|
123
|
+ <!-- 排班替换/交换提示弹窗 -->
|
|
124
|
+ <el-dialog
|
|
125
|
+ title="提示"
|
|
126
|
+ :visible.sync="tipDialogVisible"
|
|
127
|
+ width="300px"
|
|
128
|
+ :modal-append-to-body='false'
|
|
129
|
+ :close-on-click-modal="false"
|
|
130
|
+ >
|
|
131
|
+ <div>
|
|
132
|
+ 所选位置已有排班,请选择操作
|
|
133
|
+ </div>
|
|
134
|
+ <span slot="footer" class="dialog-footer">
|
|
135
|
+ <el-button
|
|
136
|
+ type="danger"
|
|
137
|
+ @click="tipDialogVisibleTwo = true"
|
|
138
|
+ >替换</el-button>
|
|
139
|
+ <el-button
|
|
140
|
+ type="primary"
|
|
141
|
+ @click="tipDialogVisibleThree = true"
|
|
142
|
+ >交换</el-button>
|
|
143
|
+ <el-button @click="tipDialogVisible = false">取 消</el-button>
|
|
144
|
+ </span>
|
|
145
|
+ </el-dialog>
|
|
146
|
+ <!-- 排班替换 -->
|
|
147
|
+ <el-dialog
|
|
148
|
+ title="提示"
|
|
149
|
+ :visible.sync="tipDialogVisibleTwo"
|
|
150
|
+ width="300px"
|
|
151
|
+ class="replace"
|
|
152
|
+ :modal-append-to-body='false'
|
|
153
|
+ :close-on-click-modal="false"
|
|
154
|
+ >
|
|
155
|
+ <div>
|
|
156
|
+ 是否将此位置排班替换
|
|
157
|
+ </div>
|
|
158
|
+ <span slot="footer" class="dialog-footer">
|
|
159
|
+ <el-button
|
|
160
|
+ type="primary"
|
|
161
|
+ @click="coverSch()"
|
|
162
|
+ >确定</el-button>
|
|
163
|
+
|
|
164
|
+ <el-button @click="tipDialogVisibleTwo = false">取 消</el-button>
|
|
165
|
+ </span>
|
|
166
|
+ </el-dialog>
|
|
167
|
+ <!-- 将此位置排班互换 -->
|
|
168
|
+ <el-dialog
|
|
169
|
+ title="提示"
|
|
170
|
+ :visible.sync="tipDialogVisibleThree"
|
|
171
|
+ width="300px"
|
|
172
|
+ class="exchange"
|
|
173
|
+ :modal-append-to-body='false'
|
|
174
|
+ :close-on-click-modal="false"
|
|
175
|
+ >
|
|
176
|
+ <div>
|
|
177
|
+ 是否将此位置排班互换
|
|
178
|
+ </div>
|
|
179
|
+ <span slot="footer" class="dialog-footer">
|
|
180
|
+ <el-button
|
|
181
|
+ type="primary"
|
|
182
|
+ @click="changeSchTwo()"
|
|
183
|
+ >确定</el-button>
|
|
184
|
+ <el-button @click="tipDialogVisibleThree = false">取 消</el-button>
|
|
185
|
+ </span>
|
|
186
|
+ </el-dialog>
|
|
187
|
+ </div>
|
|
188
|
+ </div>
|
|
189
|
+ </div>
|
|
190
|
+</template>
|
|
191
|
+
|
|
192
|
+<script>
|
|
193
|
+import { GetAllZone, getSchedualPrintList } from '@/api/dialysis'
|
|
194
|
+import { parseTime } from '@/utils'
|
|
195
|
+import { uParseTime } from '@/utils/tools'
|
|
196
|
+import { getDataConfig } from '@/utils/data'
|
|
197
|
+import {getSchedulesOne } from "@/api/schedule";
|
|
198
|
+import {CoverSch,ExchangeSch,} from "@/api/schedule_template/sch_template";
|
|
199
|
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
|
200
|
+import print from 'print-js'
|
|
201
|
+const moment = require('moment')
|
|
202
|
+// import {getAllZones} from "@/api/schedule"
|
|
203
|
+export default {
|
|
204
|
+ name: 'SchedulePrint',
|
|
205
|
+ data() {
|
|
206
|
+ return {
|
|
207
|
+ crumbs: [
|
|
208
|
+ { path: false, name: '排班管理' },
|
|
209
|
+ { path: false, name: '患者调班' }
|
|
210
|
+ ],
|
|
211
|
+ tipDialogVisible:false,
|
|
212
|
+ tipDialogVisibleTwo:false,
|
|
213
|
+ tipDialogVisibleThree:false,
|
|
214
|
+ value: false,
|
|
215
|
+ td_1_width: '8%',
|
|
216
|
+ td_3_width: '90%',
|
|
217
|
+ date:'',
|
|
218
|
+ classes:1,
|
|
219
|
+ bingqu:0,
|
|
220
|
+ chuangwei:'',
|
|
221
|
+ fenqu:'',
|
|
222
|
+ fenqu_dialog:'',
|
|
223
|
+ chuangwei:'',
|
|
224
|
+ options:[],
|
|
225
|
+ centerDialogVisible:false,
|
|
226
|
+ cur_drag_info:{
|
|
227
|
+ id:'',
|
|
228
|
+ name:'',
|
|
229
|
+ quhao:'',
|
|
230
|
+ chaung:'',
|
|
231
|
+ },
|
|
232
|
+ currentData:{
|
|
233
|
+ currentData_id:'',
|
|
234
|
+ currentData_name:'',
|
|
235
|
+ currentData_quhao:'',
|
|
236
|
+ currentData_chaung:'',
|
|
237
|
+ },
|
|
238
|
+ schedulArr: [
|
|
239
|
+ { value: 1, label: "上午" },
|
|
240
|
+ { value: 2, label: "下午" },
|
|
241
|
+ { value: 3, label: "晚上" }
|
|
242
|
+ ],
|
|
243
|
+ zones:[],
|
|
244
|
+ schedules: [
|
|
245
|
+ {
|
|
246
|
+ day: 1,
|
|
247
|
+ weekday: '星期一',
|
|
248
|
+ all: {
|
|
249
|
+ am: {
|
|
250
|
+ /* zone_name: [ schedule, ... ] */
|
|
251
|
+ },
|
|
252
|
+ pm: {
|
|
253
|
+ /* zone_name: [ schedule, ... ] */
|
|
254
|
+ },
|
|
255
|
+ evening: {
|
|
256
|
+ /* zone_name: [ schedule, ... ] */
|
|
257
|
+ }
|
|
258
|
+ },
|
|
259
|
+ hdf: [
|
|
260
|
+ /* schedule, ... */
|
|
261
|
+ ],
|
|
262
|
+ hd_hp: [
|
|
263
|
+ /* schedule, ... */
|
|
264
|
+ ],
|
|
265
|
+
|
|
266
|
+ new_hdf: {
|
|
267
|
+ am: {
|
|
268
|
+ /* zone_name: [ schedule, ... ] */
|
|
269
|
+ },
|
|
270
|
+ pm: {
|
|
271
|
+ /* zone_name: [ schedule, ... ] */
|
|
272
|
+ },
|
|
273
|
+ evening: {
|
|
274
|
+ /* zone_name: [ schedule, ... ] */
|
|
275
|
+ }
|
|
276
|
+ },
|
|
277
|
+ new_hd_hp: {
|
|
278
|
+ am: {
|
|
279
|
+ /* zone_name: [ schedule, ... ] */
|
|
280
|
+ },
|
|
281
|
+ pm: {
|
|
282
|
+ /* zone_name: [ schedule, ... ] */
|
|
283
|
+ },
|
|
284
|
+ evening: {
|
|
285
|
+ /* zone_name: [ schedule, ... ] */
|
|
286
|
+ }
|
|
287
|
+ }
|
|
288
|
+ },
|
|
289
|
+ {
|
|
290
|
+ day: 2,
|
|
291
|
+ weekday: '星期二',
|
|
292
|
+ all: {
|
|
293
|
+ am: {
|
|
294
|
+ /* zone_name: [ schedule, ... ] */
|
|
295
|
+ },
|
|
296
|
+ pm: {
|
|
297
|
+ /* zone_name: [ schedule, ... ] */
|
|
298
|
+ },
|
|
299
|
+ evening: {
|
|
300
|
+ /* zone_name: [ schedule, ... ] */
|
|
301
|
+ }
|
|
302
|
+ },
|
|
303
|
+ hdf: [
|
|
304
|
+ /* schedule, ... */
|
|
305
|
+ ],
|
|
306
|
+ hd_hp: [
|
|
307
|
+ /* schedule, ... */
|
|
308
|
+ ],
|
|
309
|
+ new_hdf: {
|
|
310
|
+ am: {
|
|
311
|
+ /* zone_name: [ schedule, ... ] */
|
|
312
|
+ },
|
|
313
|
+ pm: {
|
|
314
|
+ /* zone_name: [ schedule, ... ] */
|
|
315
|
+ },
|
|
316
|
+ evening: {
|
|
317
|
+ /* zone_name: [ schedule, ... ] */
|
|
318
|
+ }
|
|
319
|
+ },
|
|
320
|
+ new_hd_hp: {
|
|
321
|
+ am: {
|
|
322
|
+ /* zone_name: [ schedule, ... ] */
|
|
323
|
+ },
|
|
324
|
+ pm: {
|
|
325
|
+ /* zone_name: [ schedule, ... ] */
|
|
326
|
+ },
|
|
327
|
+ evening: {
|
|
328
|
+ /* zone_name: [ schedule, ... ] */
|
|
329
|
+ }
|
|
330
|
+ }
|
|
331
|
+ },
|
|
332
|
+ {
|
|
333
|
+ day: 3,
|
|
334
|
+ weekday: '星期三',
|
|
335
|
+ all: {
|
|
336
|
+ am: {
|
|
337
|
+ /* zone_name: [ schedule, ... ] */
|
|
338
|
+ },
|
|
339
|
+ pm: {
|
|
340
|
+ /* zone_name: [ schedule, ... ] */
|
|
341
|
+ },
|
|
342
|
+ evening: {
|
|
343
|
+ /* zone_name: [ schedule, ... ] */
|
|
344
|
+ }
|
|
345
|
+ },
|
|
346
|
+ hdf: [
|
|
347
|
+ /* schedule, ... */
|
|
348
|
+ ],
|
|
349
|
+ hd_hp: [
|
|
350
|
+ /* schedule, ... */
|
|
351
|
+ ],
|
|
352
|
+ new_hdf: {
|
|
353
|
+ am: {
|
|
354
|
+ /* zone_name: [ schedule, ... ] */
|
|
355
|
+ },
|
|
356
|
+ pm: {
|
|
357
|
+ /* zone_name: [ schedule, ... ] */
|
|
358
|
+ },
|
|
359
|
+ evening: {
|
|
360
|
+ /* zone_name: [ schedule, ... ] */
|
|
361
|
+ }
|
|
362
|
+ },
|
|
363
|
+ new_hd_hp: {
|
|
364
|
+ am: {
|
|
365
|
+ /* zone_name: [ schedule, ... ] */
|
|
366
|
+ },
|
|
367
|
+ pm: {
|
|
368
|
+ /* zone_name: [ schedule, ... ] */
|
|
369
|
+ },
|
|
370
|
+ evening: {
|
|
371
|
+ /* zone_name: [ schedule, ... ] */
|
|
372
|
+ }
|
|
373
|
+ }
|
|
374
|
+ },
|
|
375
|
+ {
|
|
376
|
+ day: 4,
|
|
377
|
+ weekday: '星期四',
|
|
378
|
+ all: {
|
|
379
|
+ am: {
|
|
380
|
+ /* zone_name: [ schedule, ... ] */
|
|
381
|
+ },
|
|
382
|
+ pm: {
|
|
383
|
+ /* zone_name: [ schedule, ... ] */
|
|
384
|
+ },
|
|
385
|
+ evening: {
|
|
386
|
+ /* zone_name: [ schedule, ... ] */
|
|
387
|
+ }
|
|
388
|
+ },
|
|
389
|
+ hdf: [
|
|
390
|
+ /* schedule, ... */
|
|
391
|
+ ],
|
|
392
|
+ hd_hp: [
|
|
393
|
+ /* schedule, ... */
|
|
394
|
+ ],
|
|
395
|
+ new_hdf: {
|
|
396
|
+ am: {
|
|
397
|
+ /* zone_name: [ schedule, ... ] */
|
|
398
|
+ },
|
|
399
|
+ pm: {
|
|
400
|
+ /* zone_name: [ schedule, ... ] */
|
|
401
|
+ },
|
|
402
|
+ evening: {
|
|
403
|
+ /* zone_name: [ schedule, ... ] */
|
|
404
|
+ }
|
|
405
|
+ },
|
|
406
|
+ new_hd_hp: {
|
|
407
|
+ am: {
|
|
408
|
+ /* zone_name: [ schedule, ... ] */
|
|
409
|
+ },
|
|
410
|
+ pm: {
|
|
411
|
+ /* zone_name: [ schedule, ... ] */
|
|
412
|
+ },
|
|
413
|
+ evening: {
|
|
414
|
+ /* zone_name: [ schedule, ... ] */
|
|
415
|
+ }
|
|
416
|
+ }
|
|
417
|
+ },
|
|
418
|
+ {
|
|
419
|
+ day: 5,
|
|
420
|
+ weekday: '星期五',
|
|
421
|
+ all: {
|
|
422
|
+ am: {
|
|
423
|
+ /* zone_name: [ schedule, ... ] */
|
|
424
|
+ },
|
|
425
|
+ pm: {
|
|
426
|
+ /* zone_name: [ schedule, ... ] */
|
|
427
|
+ },
|
|
428
|
+ evening: {
|
|
429
|
+ /* zone_name: [ schedule, ... ] */
|
|
430
|
+ }
|
|
431
|
+ },
|
|
432
|
+ hdf: [
|
|
433
|
+ /* schedule, ... */
|
|
434
|
+ ],
|
|
435
|
+ hd_hp: [
|
|
436
|
+ /* schedule, ... */
|
|
437
|
+ ],
|
|
438
|
+ new_hdf: {
|
|
439
|
+ am: {
|
|
440
|
+ /* zone_name: [ schedule, ... ] */
|
|
441
|
+ },
|
|
442
|
+ pm: {
|
|
443
|
+ /* zone_name: [ schedule, ... ] */
|
|
444
|
+ },
|
|
445
|
+ evening: {
|
|
446
|
+ /* zone_name: [ schedule, ... ] */
|
|
447
|
+ }
|
|
448
|
+ },
|
|
449
|
+ new_hd_hp: {
|
|
450
|
+ am: {
|
|
451
|
+ /* zone_name: [ schedule, ... ] */
|
|
452
|
+ },
|
|
453
|
+ pm: {
|
|
454
|
+ /* zone_name: [ schedule, ... ] */
|
|
455
|
+ },
|
|
456
|
+ evening: {
|
|
457
|
+ /* zone_name: [ schedule, ... ] */
|
|
458
|
+ }
|
|
459
|
+ }
|
|
460
|
+ },
|
|
461
|
+ {
|
|
462
|
+ day: 6,
|
|
463
|
+ weekday: '星期六',
|
|
464
|
+ all: {
|
|
465
|
+ am: {
|
|
466
|
+ /* zone_name: [ schedule, ... ] */
|
|
467
|
+ },
|
|
468
|
+ pm: {
|
|
469
|
+ /* zone_name: [ schedule, ... ] */
|
|
470
|
+ },
|
|
471
|
+ evening: {
|
|
472
|
+ /* zone_name: [ schedule, ... ] */
|
|
473
|
+ }
|
|
474
|
+ },
|
|
475
|
+ hdf: [
|
|
476
|
+ /* schedule, ... */
|
|
477
|
+ ],
|
|
478
|
+ hd_hp: [
|
|
479
|
+ /* schedule, ... */
|
|
480
|
+ ],
|
|
481
|
+ new_hdf: {
|
|
482
|
+ am: {
|
|
483
|
+ /* zone_name: [ schedule, ... ] */
|
|
484
|
+ },
|
|
485
|
+ pm: {
|
|
486
|
+ /* zone_name: [ schedule, ... ] */
|
|
487
|
+ },
|
|
488
|
+ evening: {
|
|
489
|
+ /* zone_name: [ schedule, ... ] */
|
|
490
|
+ }
|
|
491
|
+ },
|
|
492
|
+ new_hd_hp: {
|
|
493
|
+ am: {
|
|
494
|
+ /* zone_name: [ schedule, ... ] */
|
|
495
|
+ },
|
|
496
|
+ pm: {
|
|
497
|
+ /* zone_name: [ schedule, ... ] */
|
|
498
|
+ },
|
|
499
|
+ evening: {
|
|
500
|
+ /* zone_name: [ schedule, ... ] */
|
|
501
|
+ }
|
|
502
|
+ }
|
|
503
|
+ },
|
|
504
|
+ {
|
|
505
|
+ day: 7,
|
|
506
|
+ weekday: '星期日',
|
|
507
|
+ all: {
|
|
508
|
+ am: {
|
|
509
|
+ /* zone_name: [ schedule, ... ] */
|
|
510
|
+ },
|
|
511
|
+ pm: {
|
|
512
|
+ /* zone_name: [ schedule, ... ] */
|
|
513
|
+ },
|
|
514
|
+ evening: {
|
|
515
|
+ /* zone_name: [ schedule, ... ] */
|
|
516
|
+ }
|
|
517
|
+ },
|
|
518
|
+ hdf: [
|
|
519
|
+ /* schedule, ... */
|
|
520
|
+ ],
|
|
521
|
+ hd_hp: [
|
|
522
|
+ /* schedule, ... */
|
|
523
|
+ ],
|
|
524
|
+ new_hdf: {
|
|
525
|
+ am: {
|
|
526
|
+ /* zone_name: [ schedule, ... ] */
|
|
527
|
+ },
|
|
528
|
+ pm: {
|
|
529
|
+ /* zone_name: [ schedule, ... ] */
|
|
530
|
+ },
|
|
531
|
+ evening: {
|
|
532
|
+ /* zone_name: [ schedule, ... ] */
|
|
533
|
+ }
|
|
534
|
+ },
|
|
535
|
+ new_hd_hp: {
|
|
536
|
+ am: {
|
|
537
|
+ /* zone_name: [ schedule, ... ] */
|
|
538
|
+ },
|
|
539
|
+ pm: {
|
|
540
|
+ /* zone_name: [ schedule, ... ] */
|
|
541
|
+ },
|
|
542
|
+ evening: {
|
|
543
|
+ /* zone_name: [ schedule, ... ] */
|
|
544
|
+ }
|
|
545
|
+ }
|
|
546
|
+ }
|
|
547
|
+ ],
|
|
548
|
+ total: [],
|
|
549
|
+ list: [],
|
|
550
|
+ loading: false,
|
|
551
|
+ tableData: [],
|
|
552
|
+ numberList: [],
|
|
553
|
+ partitionArr: [],
|
|
554
|
+ listname:[],
|
|
555
|
+ mode:[{id:1,name:'HD'},{id:2,name:'HDF'},{id:3,name:'HD+HP'},{id:4,name:'HP'},{id:5,name:'HF'},{id:6,name:'SCUF'},{id:7,name:'IUF'},{id:8,name:'HFHD'},
|
|
556
|
+ {id:9,name:'HFHD+HP'},{id:10,name:'PHF'},{id:11,name:'HFR'},{id:12,name:'HDF+HP'},{id:13,name:'CRRT'},{id:14,name:'腹水回输'},{id:15,name:'IUF+HD'},{id:16,name:'UF'},
|
|
557
|
+ {id:17,name:'HD+'},{id:18,name:'血浆胆红素吸附+HDF'},{id:19,name:'血浆胆红素吸附'},{id:20,name:'I-HDF'},{id:21,name:'HD高通'},{id:22,name:'CVVH'},{id:23,name:'CVVHD'},
|
|
558
|
+ {id:24,name:'CVVHDF'},{id:25,name:'PE'},{id:26,name:'血浆胆红素吸附+HP'},{id:27,name:'HPD'},{id:28,name:'HDP'}]
|
|
559
|
+
|
|
560
|
+ }
|
|
561
|
+ },
|
|
562
|
+ components: {
|
|
563
|
+ BreadCrumb
|
|
564
|
+ },
|
|
565
|
+ created() {
|
|
566
|
+ this.date= moment(new Date()).format("YYYY-MM-DD");
|
|
567
|
+ console.log('dsafas',this.date);
|
|
568
|
+ this.getAllZones()
|
|
569
|
+ this.getlist()
|
|
570
|
+ this.getSchedulesOne()
|
|
571
|
+ },
|
|
572
|
+ methods:{
|
|
573
|
+ db_click(e){
|
|
574
|
+ this.centerDialogVisible=true
|
|
575
|
+ console.log('2222',e);
|
|
576
|
+ },
|
|
577
|
+ drop(e,val){
|
|
578
|
+ this.allowDrop(e)
|
|
579
|
+
|
|
580
|
+ this.currentData={
|
|
581
|
+ currentData_id:val.order.id,
|
|
582
|
+ currentData_name:val.name,
|
|
583
|
+ currentData_quhao:val.order.DeviceNumber.zone.name,
|
|
584
|
+ currentData_chaung:val.order.DeviceNumber.number,
|
|
585
|
+ },
|
|
586
|
+ this.tipDialogVisible=true
|
|
587
|
+ // this.currentData={
|
|
588
|
+ // currentData_id:this.cur_drag_info.id,
|
|
589
|
+ // currentData_name:this.cur_drag_info.name,
|
|
590
|
+ // currentData_quhao:this.cur_drag_info.quhao,
|
|
591
|
+ // currentData_chaung:this.cur_drag_info.chaung,
|
|
592
|
+ // },
|
|
593
|
+
|
|
594
|
+ console.log('3333',this.currentData);
|
|
595
|
+ console.log('6666',val);
|
|
596
|
+ },
|
|
597
|
+ allowDrop(e) {
|
|
598
|
+ e.preventDefault();
|
|
599
|
+ },
|
|
600
|
+ // 替换
|
|
601
|
+ coverSch(){
|
|
602
|
+ this.tipDialogVisible=false
|
|
603
|
+ this.currentData={
|
|
604
|
+ currentData_id:this.cur_drag_info.id,
|
|
605
|
+ currentData_name:this.cur_drag_info.name,
|
|
606
|
+ currentData_quhao:this.cur_drag_info.quhao,
|
|
607
|
+ currentData_chaung:this.cur_drag_info.chaung,
|
|
608
|
+ }
|
|
609
|
+ let params={
|
|
610
|
+ id_one:this.cur_drag_info.id,
|
|
611
|
+ id_two:this.currentData.currentData_id
|
|
612
|
+ }
|
|
613
|
+ CoverSch(params).then((response) => {
|
|
614
|
+ if (response.data.state == 0) {
|
|
615
|
+ this.$message.error(response.data.msg);
|
|
616
|
+ this.tipDialogVisibleTwo = false
|
|
617
|
+ } else {
|
|
618
|
+ console.log('888888888888',response.data);
|
|
619
|
+ this.$message.success("替换成功");
|
|
620
|
+ this.tipDialogVisible = false
|
|
621
|
+ this.tipDialogVisibleTwo = false
|
|
622
|
+ this.getSchedulesOne();
|
|
623
|
+ }
|
|
624
|
+ });
|
|
625
|
+ },
|
|
626
|
+ // 交换
|
|
627
|
+ changeSchTwo(){
|
|
628
|
+ this.tipDialogVisible=false
|
|
629
|
+ let params={
|
|
630
|
+ id_one:this.cur_drag_info.id,
|
|
631
|
+ id_two:this.currentData.id
|
|
632
|
+
|
|
633
|
+ }
|
|
634
|
+ ExchangeSch(params).then((response) => {
|
|
635
|
+ if (response.data.state == 0) {
|
|
636
|
+ this.$message.error(response.data.msg);
|
|
637
|
+ this.tipDialogVisibleThree = false
|
|
638
|
+ } else {
|
|
639
|
+ console.log('22222222',response.data);
|
|
640
|
+ this.$message.success("交换成功");
|
|
641
|
+ this.tipDialogVisible = false
|
|
642
|
+ this.tipDialogVisibleThree = false
|
|
643
|
+ this.getlist();
|
|
644
|
+ }
|
|
645
|
+ });
|
|
646
|
+ },
|
|
647
|
+ curInfoDragStart(e,val){
|
|
648
|
+ this.cur_drag_info={
|
|
649
|
+ id:val.order.id,
|
|
650
|
+ name:val.name,
|
|
651
|
+ quhao:val.order.DeviceNumber.zone.name,
|
|
652
|
+ chaung:val.order.DeviceNumber.number,
|
|
653
|
+
|
|
654
|
+ }
|
|
655
|
+ console.log('4444',e);
|
|
656
|
+ console.log('5555',this.cur_drag_info);
|
|
657
|
+ },
|
|
658
|
+ // 选中日期
|
|
659
|
+ date_picker(e){
|
|
660
|
+ var time=moment(e).format("YYYY-MM-DD");
|
|
661
|
+ console.log('sfddas',time);
|
|
662
|
+ this.date=time
|
|
663
|
+ this.getlist()
|
|
664
|
+ },
|
|
665
|
+ // 选择班次
|
|
666
|
+ banci_select(e){
|
|
667
|
+ console.log(e);
|
|
668
|
+ for(let i=0;i<this.schedulArr.length;i++){
|
|
669
|
+ if(e==this.schedulArr[i].value){
|
|
670
|
+ this.classes = e
|
|
671
|
+ }
|
|
672
|
+ this.getlist()
|
|
673
|
+ }
|
|
674
|
+ },
|
|
675
|
+ // 选择分区
|
|
676
|
+ bingqu_select(e){
|
|
677
|
+ console.log('1234546',e);
|
|
678
|
+ for (let i = 0; i < this.partitionArr.length; i++) {
|
|
679
|
+ if(e==this.partitionArr[i].id){
|
|
680
|
+ this.bingqu=e
|
|
681
|
+ }
|
|
682
|
+ }
|
|
683
|
+ this.getlist()
|
|
684
|
+ },
|
|
685
|
+ // 分区
|
|
686
|
+ getAllZones() {
|
|
687
|
+ GetAllZone().then(response => {
|
|
688
|
+ if (response.data.state == 0) {
|
|
689
|
+ this.$message.error(response.data.msg);
|
|
690
|
+ return false;
|
|
691
|
+ } else {
|
|
692
|
+ this.partitionArr = response.data.data.zone;
|
|
693
|
+ this.partitionArr.unshift({ id: 0, name: "全部" });
|
|
694
|
+ console.log('asfasdfsadfa',this.partitionArr);
|
|
695
|
+ }
|
|
696
|
+ });
|
|
697
|
+ },
|
|
698
|
+ getlist() {
|
|
699
|
+ var params = {
|
|
700
|
+ schedule_date: this.date,
|
|
701
|
+ schedule_type: this.classes,
|
|
702
|
+ partition_type: this.bingqu,
|
|
703
|
+ keywords: '',
|
|
704
|
+ page: 1,
|
|
705
|
+ limit: 5000
|
|
706
|
+ }
|
|
707
|
+ this.loading = true
|
|
708
|
+ this.tableData = []
|
|
709
|
+ console.log('111111111',params);
|
|
710
|
+ getSchedualPrintList(params).then((response) => {
|
|
711
|
+ if (response.data.state == 1) {
|
|
712
|
+ this.loading = false
|
|
713
|
+ console.log('111111',response.data.data);
|
|
714
|
+ var list = response.data.data.list
|
|
715
|
+ this.list = list
|
|
716
|
+ var listOne = response.data.data.listOne
|
|
717
|
+ this.zones =listOne
|
|
718
|
+ if (list != null && list.length > 0) {
|
|
719
|
+ const dataInfo = {}
|
|
720
|
+ list.forEach((item, index) => {
|
|
721
|
+ const { schedule_type } = item
|
|
722
|
+ if (!dataInfo[schedule_type]) {
|
|
723
|
+ dataInfo[schedule_type] = {
|
|
724
|
+ schedule_type: item.schedule_type,
|
|
725
|
+ schedule_date: item.schedule_date,
|
|
726
|
+ zones: [],
|
|
727
|
+ list:[]
|
|
728
|
+ }
|
|
729
|
+ }
|
|
730
|
+ })
|
|
731
|
+ const arr = Object.values(dataInfo)
|
|
732
|
+ // console.log('arr222', arr)
|
|
733
|
+
|
|
734
|
+ if (arr != null && arr.length > 0) {
|
|
735
|
+ for (let i = 0; i < arr.length; i++) {
|
|
736
|
+ for (let j = 0; j < listOne.length; j++) {
|
|
737
|
+ if (arr[i].schedule_type == listOne[j].schedule_type) {
|
|
738
|
+ arr[i].zones.push(listOne[j])
|
|
739
|
+ }
|
|
740
|
+ }
|
|
741
|
+ for(let x=0;x<list.length;x++){
|
|
742
|
+ arr[i].list.push(list[x])
|
|
743
|
+ }
|
|
744
|
+ }
|
|
745
|
+ }
|
|
746
|
+ // console.log('排班数据------------------', arr)
|
|
747
|
+
|
|
748
|
+ this.tableData = arr
|
|
749
|
+ console.log('22222222',this.tableData);
|
|
750
|
+ }
|
|
751
|
+
|
|
752
|
+ this.numberList = response.data.data.numberList
|
|
753
|
+ // console.log('list2332233232wo', list)
|
|
754
|
+ // console.log('numberList', this.numberList)
|
|
755
|
+ }
|
|
756
|
+ })
|
|
757
|
+ },
|
|
758
|
+
|
|
759
|
+ getTimeOne(val) {
|
|
760
|
+ if (val == '') {
|
|
761
|
+ return ''
|
|
762
|
+ } else {
|
|
763
|
+ return uParseTime(val, '{y}-{m}-{d}')
|
|
764
|
+ }
|
|
765
|
+ },
|
|
766
|
+
|
|
767
|
+ getPatientName(schedule_type, partition_id) {
|
|
768
|
+ var str = ''
|
|
769
|
+ var arr = []
|
|
770
|
+ if (this.list != null && this.list.length > 0) {
|
|
771
|
+ for (let i = 0; i < this.list.length; i++) {
|
|
772
|
+ if (this.list[i].schedule_type == schedule_type && this.list[i].partition_id == partition_id) {
|
|
773
|
+ arr.push(this.list[i])
|
|
774
|
+ }
|
|
775
|
+ }
|
|
776
|
+ }
|
|
777
|
+ if (arr.length > 0) {
|
|
778
|
+ for (let i = 0; i < arr.length; i++) {
|
|
779
|
+ arr[i].name = this.nameSplit(arr[i].name)
|
|
780
|
+ console.log('666666',arr[i].name);
|
|
781
|
+ if (this.hiddenFlag) {
|
|
782
|
+ str+= arr[i].name + '        '
|
|
783
|
+ } else {
|
|
784
|
+ str+=arr[i].name
|
|
785
|
+ }
|
|
786
|
+ }
|
|
787
|
+ }
|
|
788
|
+ // console.log(str, 'strstrstr')
|
|
789
|
+ return str
|
|
790
|
+ },
|
|
791
|
+ // 透析模式
|
|
792
|
+ getmode(id){
|
|
793
|
+ for(let i=0;i<this.mode.length;i++){
|
|
794
|
+ if(id=this.mode[i].id){
|
|
795
|
+ return this.mode[i].name
|
|
796
|
+ }
|
|
797
|
+ }
|
|
798
|
+ },
|
|
799
|
+ // 切割患者姓名
|
|
800
|
+ nameSplit(val) {
|
|
801
|
+ var reg = /[\u4e00-\u9fa5]/g
|
|
802
|
+ let name = val
|
|
803
|
+ name = name.substr(-4)
|
|
804
|
+ var names = name.match(reg)
|
|
805
|
+ name = names.join('')
|
|
806
|
+ if (name.includes('区')) {
|
|
807
|
+ name = name.replace('区', '')
|
|
808
|
+ }
|
|
809
|
+ if (name.includes('号')) {
|
|
810
|
+ name = name.replace('号', '')
|
|
811
|
+ }
|
|
812
|
+ return name
|
|
813
|
+ },
|
|
814
|
+ // 分区
|
|
815
|
+ getZoneName(id) {
|
|
816
|
+ var name = ''
|
|
817
|
+ for (let i = 0; i < this.partitionArr.length; i++) {
|
|
818
|
+ if (id == this.partitionArr[i].id) {
|
|
819
|
+ name = this.partitionArr[i].name
|
|
820
|
+ }
|
|
821
|
+ }
|
|
822
|
+
|
|
823
|
+ return name
|
|
824
|
+ },
|
|
825
|
+ getBloodAccess(id) {
|
|
826
|
+ var name = ''
|
|
827
|
+ var list = getDataConfig(
|
|
828
|
+ 'hemodialysis',
|
|
829
|
+ 'vascular_access_desc'
|
|
830
|
+ )
|
|
831
|
+ for (let i = 0; i < list.length; i++) {
|
|
832
|
+ if (id == list[i].id) {
|
|
833
|
+ name = list[i].name
|
|
834
|
+ }
|
|
835
|
+ }
|
|
836
|
+ return name
|
|
837
|
+ },
|
|
838
|
+ getSchedulesOne(){
|
|
839
|
+ const params = {
|
|
840
|
+ weekTime: 2,
|
|
841
|
+ patitionid: '375,376,384,424,425,',
|
|
842
|
+ schedule_type: '',
|
|
843
|
+ };
|
|
844
|
+ getSchedulesOne(params).then((res)=>{
|
|
845
|
+ console.log('qqqqwwwwweeee',res.data.data);
|
|
846
|
+ })
|
|
847
|
+ }
|
|
848
|
+
|
|
849
|
+ }
|
|
850
|
+
|
|
851
|
+}
|
|
852
|
+</script>
|
|
853
|
+
|
|
854
|
+<style rel="stylesheet/scss" lang="scss" scoped>
|
|
855
|
+#print_content {
|
|
856
|
+ background-color: white;
|
|
857
|
+ padding: 0 0 20px 0;
|
|
858
|
+ .content_top{
|
|
859
|
+ display: inline-block;
|
|
860
|
+ }
|
|
861
|
+ .order_title_panl {
|
|
862
|
+ text-align: center;
|
|
863
|
+
|
|
864
|
+ .main_title {
|
|
865
|
+ font-size: 18px;
|
|
866
|
+ line-height: 40px;
|
|
867
|
+ font-weight: 500;
|
|
868
|
+ }
|
|
869
|
+ }
|
|
870
|
+ .table_panel {
|
|
871
|
+ .table {
|
|
872
|
+ width: 100%;
|
|
873
|
+ border: 1px solid;
|
|
874
|
+ border-collapse: collapse;
|
|
875
|
+ padding: 2px;
|
|
876
|
+
|
|
877
|
+ thead {
|
|
878
|
+ tr {
|
|
879
|
+ td {
|
|
880
|
+ border: 1px solid;
|
|
881
|
+ text-align: center;
|
|
882
|
+ font-size: 20px;
|
|
883
|
+ padding: 15px 5px;
|
|
884
|
+ }
|
|
885
|
+ }
|
|
886
|
+ }
|
|
887
|
+ tbody {
|
|
888
|
+ tr {
|
|
889
|
+ td {
|
|
890
|
+ border: 1px solid;
|
|
891
|
+ // text-align: center;
|
|
892
|
+ font-size: 18px;
|
|
893
|
+ padding: 5px 5px;
|
|
894
|
+
|
|
895
|
+ .huanzhekuai{
|
|
896
|
+ width: 125px;
|
|
897
|
+ display: inline-block;
|
|
898
|
+ text-align: center;
|
|
899
|
+ margin:0 10px;
|
|
900
|
+ }
|
|
901
|
+
|
|
902
|
+ }
|
|
903
|
+ }
|
|
904
|
+ }
|
|
905
|
+ }
|
|
906
|
+ }
|
|
907
|
+}
|
|
908
|
+</style>
|
|
909
|
+
|