|
@@ -0,0 +1,416 @@
|
|
1
|
+<template>
|
|
2
|
+ <div>
|
|
3
|
+ <div class="cell clearfix" style="float: right">
|
|
4
|
+ <el-button
|
|
5
|
+ style="float: right"
|
|
6
|
+ size="small"
|
|
7
|
+ icon="el-icon-printer"
|
|
8
|
+ @click="printAction()"
|
|
9
|
+ type="primary"
|
|
10
|
+ >打印
|
|
11
|
+ </el-button>
|
|
12
|
+ </div>
|
|
13
|
+
|
|
14
|
+ <div class="cell clearfix">
|
|
15
|
+ <label class="title"> <span class="name">时间</span> : </label>
|
|
16
|
+ <div class="time">
|
|
17
|
+ <ul class>
|
|
18
|
+ <li
|
|
19
|
+ :class="item.id == week_type ? 'active' : ''"
|
|
20
|
+ @click="selectWeekType(item.id)"
|
|
21
|
+ v-for="item in weekArr"
|
|
22
|
+ :key="item.id"
|
|
23
|
+ >
|
|
24
|
+ {{ item.name }}
|
|
25
|
+ </li>
|
|
26
|
+ </ul>
|
|
27
|
+ </div>
|
|
28
|
+
|
|
29
|
+ <div class="title"><span class="name">班 次</span> :</div>
|
|
30
|
+ <div class="time">
|
|
31
|
+ <ul class>
|
|
32
|
+ <li
|
|
33
|
+ :class="item.id == week_time ? 'active' : ''"
|
|
34
|
+ @click="selectWeekTime(item.id)"
|
|
35
|
+ v-for="item in weekTimes"
|
|
36
|
+ :key="item.id"
|
|
37
|
+ >
|
|
38
|
+ {{ item.name }}
|
|
39
|
+ </li>
|
|
40
|
+ </ul>
|
|
41
|
+ </div>
|
|
42
|
+ </div>
|
|
43
|
+ <el-table
|
|
44
|
+ :row-style="{ color: '#303133' }"
|
|
45
|
+ :data="scheduleData"
|
|
46
|
+ border
|
|
47
|
+ :header-cell-style="{
|
|
48
|
+ backgroundColor: 'rgb(245, 247, 250)',
|
|
49
|
+ color: '#606266'
|
|
50
|
+ }"
|
|
51
|
+ style="width: 100%"
|
|
52
|
+ >
|
|
53
|
+ <el-table-column label="姓名" min-width="100" align="center">
|
|
54
|
+ <template slot-scope="scope">
|
|
55
|
+ {{ scope.row.patient }}
|
|
56
|
+ </template>
|
|
57
|
+ </el-table-column>
|
|
58
|
+ <el-table-column label="分区" min-width="70" align="center">
|
|
59
|
+ <template slot-scope="scope">
|
|
60
|
+ {{ scope.row.zone.name }}
|
|
61
|
+ </template>
|
|
62
|
+ </el-table-column>
|
|
63
|
+ <el-table-column label="班次" min-width="70" align="center">
|
|
64
|
+ <template slot-scope="scope">
|
|
65
|
+ {{ getSchedulesType(scope.row.schedule_type) }}
|
|
66
|
+ </template>
|
|
67
|
+ </el-table-column>
|
|
68
|
+ <el-table-column label="机号" min-width="70" align="center">
|
|
69
|
+ <template slot-scope="scope">
|
|
70
|
+ {{ scope.row.number.number }}
|
|
71
|
+ </template>
|
|
72
|
+ </el-table-column>
|
|
73
|
+ <el-table-column label="透析模式" min-width="100" align="center">
|
|
74
|
+ <template slot-scope="scope">
|
|
75
|
+ {{
|
|
76
|
+ scope.row.mode_id && modeOptions[scope.row.mode_id]
|
|
77
|
+ ? modeOptions[scope.row.mode_id].name
|
|
78
|
+ : ""
|
|
79
|
+ }}
|
|
80
|
+ </template>
|
|
81
|
+ </el-table-column>
|
|
82
|
+ <el-table-column label="透析器" min-width="100" align="center">
|
|
83
|
+ <template slot-scope="scope">
|
|
84
|
+ {{ scope.row.prescription.dialyzer_perfusion_apparatus }}
|
|
85
|
+ </template>
|
|
86
|
+ </el-table-column>
|
|
87
|
+ <el-table-column label="抗凝剂" min-width="100" align="center">
|
|
88
|
+ <template slot-scope="scope">
|
|
89
|
+ <span v-if="scope.row.prescription.anticoagulant === 1">无肝素</span>
|
|
90
|
+ <span v-if="scope.row.prescription.anticoagulant === 2"
|
|
91
|
+ >普通肝素</span
|
|
92
|
+ >
|
|
93
|
+ <span v-if="scope.row.prescription.anticoagulant === 3"
|
|
94
|
+ >低分子肝素</span
|
|
95
|
+ >
|
|
96
|
+ <span v-if="scope.row.prescription.anticoagulant === 4"
|
|
97
|
+ >阿加曲班</span
|
|
98
|
+ >
|
|
99
|
+ <span v-if="scope.row.prescription.anticoagulant === 5"
|
|
100
|
+ >枸橼酸钠</span
|
|
101
|
+ >
|
|
102
|
+ <span v-if="scope.row.prescription.anticoagulant === 6"
|
|
103
|
+ >低分子肝素钙</span
|
|
104
|
+ >
|
|
105
|
+ <span v-if="scope.row.prescription.anticoagulant === 7"
|
|
106
|
+ >低分子肝素钠</span
|
|
107
|
+ >
|
|
108
|
+ </template>
|
|
109
|
+ </el-table-column>
|
|
110
|
+ <el-table-column label="总量" min-width="100" align="center">
|
|
111
|
+ <template slot-scope="scope">
|
|
112
|
+ <span v-if="scope.row.prescription.anticoagulant == 1">{{
|
|
113
|
+ scope.row.prescription.anticoagulant_zongliang
|
|
114
|
+ ? scope.row.prescription.anticoagulant_zongliang + "mg"
|
|
115
|
+ : ""
|
|
116
|
+ }}</span>
|
|
117
|
+ <span v-if="scope.row.prescription.anticoagulant == 2">{{
|
|
118
|
+ scope.row.prescription.anticoagulant_zongliang
|
|
119
|
+ ? scope.row.prescription.anticoagulant_zongliang + "iu"
|
|
120
|
+ : ""
|
|
121
|
+ }}</span>
|
|
122
|
+ <span v-if="scope.row.prescription.anticoagulant == 3">{{
|
|
123
|
+ scope.row.prescription.anticoagulant_zongliang
|
|
124
|
+ ? scope.row.prescription.anticoagulant_zongliang + "iu"
|
|
125
|
+ : ""
|
|
126
|
+ }}</span>
|
|
127
|
+ <span v-if="scope.row.prescription.anticoagulant == 4">{{
|
|
128
|
+ scope.row.prescription.anticoagulant_zongliang
|
|
129
|
+ ? scope.row.prescription.anticoagulant_zongliang + "mg"
|
|
130
|
+ : ""
|
|
131
|
+ }}</span>
|
|
132
|
+ <span v-if="scope.row.prescription.anticoagulant == 5">{{
|
|
133
|
+ scope.row.prescription.anticoagulant_zongliang
|
|
134
|
+ ? scope.row.prescription.anticoagulant_zongliang + "mg"
|
|
135
|
+ : ""
|
|
136
|
+ }}</span>
|
|
137
|
+ <span v-if="scope.row.prescription.anticoagulant == 6">{{
|
|
138
|
+ scope.row.prescription.anticoagulant_zongliang
|
|
139
|
+ ? scope.row.prescription.anticoagulant_zongliang + "iu"
|
|
140
|
+ : ""
|
|
141
|
+ }}</span>
|
|
142
|
+ <span v-if="scope.row.prescription.anticoagulant == 7">{{
|
|
143
|
+ scope.row.prescription.anticoagulant_zongliang
|
|
144
|
+ ? scope.row.prescription.anticoagulant_zongliang + "iu"
|
|
145
|
+ : ""
|
|
146
|
+ }}</span>
|
|
147
|
+ </template>
|
|
148
|
+ </el-table-column>
|
|
149
|
+
|
|
150
|
+ <el-table-column label="长期医嘱" min-width="440" align="center">
|
|
151
|
+ <template slot-scope="scope">
|
|
152
|
+ <span style="white-space: pre">{{
|
|
153
|
+ getAdvice(scope.row.doctor_advice)
|
|
154
|
+ }}</span>
|
|
155
|
+ </template>
|
|
156
|
+ </el-table-column>
|
|
157
|
+ </el-table>
|
|
158
|
+ </div>
|
|
159
|
+</template>
|
|
160
|
+
|
|
161
|
+<script>
|
|
162
|
+import { getNextScheduleWeekDay } from "@/api/schedule";
|
|
163
|
+import WeekItem from "./WeekItem";
|
|
164
|
+const moment = require('moment')
|
|
165
|
+export default {
|
|
166
|
+ name: "tableWeeks",
|
|
167
|
+ props: {
|
|
168
|
+ weekTime: {
|
|
169
|
+ type: String,
|
|
170
|
+ default: "thisWeek"
|
|
171
|
+ }
|
|
172
|
+ },
|
|
173
|
+
|
|
174
|
+ data() {
|
|
175
|
+ return {
|
|
176
|
+ weekArr: [
|
|
177
|
+ { id: 1, name: "周一" },
|
|
178
|
+ { id: 2, name: "周二" },
|
|
179
|
+ { id: 3, name: "周三" },
|
|
180
|
+ { id: 4, name: "周四" },
|
|
181
|
+ { id: 5, name: "周五" },
|
|
182
|
+ { id: 6, name: "周六" },
|
|
183
|
+ { id: 7, name: "周日" }
|
|
184
|
+ ],
|
|
185
|
+ anticoagulants_confit: null,
|
|
186
|
+
|
|
187
|
+ week_type: "1",
|
|
188
|
+ week_time:0,
|
|
189
|
+ weekTimes:[
|
|
190
|
+ {id:0,name:"全部"},
|
|
191
|
+ {id:1,name:"上午"},
|
|
192
|
+ {id:2,name:"下午"},
|
|
193
|
+ {id:3,name:"晚上"},
|
|
194
|
+ ],
|
|
195
|
+ weekTitle: ["", "", "", "", "", "", ""],
|
|
196
|
+ weekData: {
|
|
197
|
+ Monday: [],
|
|
198
|
+ Tuesday: [],
|
|
199
|
+ Wednesday: [],
|
|
200
|
+ Thursday: [],
|
|
201
|
+ Friday: [],
|
|
202
|
+ Saturday: [],
|
|
203
|
+ Sunday: []
|
|
204
|
+ },
|
|
205
|
+ scheduleData: [],
|
|
206
|
+ modeOptions: null
|
|
207
|
+ };
|
|
208
|
+ },
|
|
209
|
+ watch: {
|
|
210
|
+
|
|
211
|
+ weekTime: function() {
|
|
212
|
+
|
|
213
|
+ var theType = this.weekType(this.weekTime);
|
|
214
|
+ this.getSchedules(theType);
|
|
215
|
+ }
|
|
216
|
+ },
|
|
217
|
+
|
|
218
|
+ methods: {
|
|
219
|
+ printAction() {
|
|
220
|
+ this.$router.push({
|
|
221
|
+ path: "/schedule/remind/print/next?week_type=" + this.week_type+"&week_time="+this.week_time
|
|
222
|
+ });
|
|
223
|
+ },
|
|
224
|
+ getNextScheduleWeekDay() {
|
|
225
|
+ const params = {
|
|
226
|
+ start_time:moment().week(moment().week() + 1).startOf('week').unix(),
|
|
227
|
+ end_time:moment().week(moment().week() + 1).endOf('week').unix(),
|
|
228
|
+ week_type:this.week_type,
|
|
229
|
+ week_time:this.week_time,
|
|
230
|
+ }
|
|
231
|
+
|
|
232
|
+ getNextScheduleWeekDay(params).then(response => {
|
|
233
|
+ this.scheduleData = [];
|
|
234
|
+ if (response.data.state == 1) {
|
|
235
|
+ this.scheduleData = response.data.data.schedule;
|
|
236
|
+ console.log("下周数据",response.data.data.schedule)
|
|
237
|
+
|
|
238
|
+ } else {
|
|
239
|
+ this.$message.error("网络错误");
|
|
240
|
+ return false;
|
|
241
|
+ }
|
|
242
|
+ });
|
|
243
|
+ },
|
|
244
|
+
|
|
245
|
+ weekType(weekTime) {
|
|
246
|
+ var theType = 2;
|
|
247
|
+ switch (weekTime) {
|
|
248
|
+ case "lastWeek":
|
|
249
|
+ theType = 1;
|
|
250
|
+ break;
|
|
251
|
+ case "thisWeek":
|
|
252
|
+ theType = 2;
|
|
253
|
+ break;
|
|
254
|
+ case "nextWeek":
|
|
255
|
+ theType = 3;
|
|
256
|
+ break;
|
|
257
|
+ case "nextTwoWeek":
|
|
258
|
+ theType = 4;
|
|
259
|
+ break;
|
|
260
|
+ default:
|
|
261
|
+ theType = 2;
|
|
262
|
+ break;
|
|
263
|
+ }
|
|
264
|
+ return theType;
|
|
265
|
+ },
|
|
266
|
+ weekPath(week) {
|
|
267
|
+ var weekArr = {
|
|
268
|
+ 1: "Monday",
|
|
269
|
+ 2: "Tuesday",
|
|
270
|
+ 3: "Wednesday",
|
|
271
|
+ 4: "Thursday",
|
|
272
|
+ 5: "Friday",
|
|
273
|
+ 6: "Saturday",
|
|
274
|
+ 7: "Sunday"
|
|
275
|
+ };
|
|
276
|
+ if (typeof weekArr[week] == "undefined") {
|
|
277
|
+ return "";
|
|
278
|
+ }
|
|
279
|
+ return weekArr[week];
|
|
280
|
+ },
|
|
281
|
+ selectWeekType(type) {
|
|
282
|
+ this.week_type = type;
|
|
283
|
+ // let params = {
|
|
284
|
+ // week_type: this.week_type
|
|
285
|
+ // };
|
|
286
|
+ this.getNextScheduleWeekDay();
|
|
287
|
+ },
|
|
288
|
+ selectWeekTime(type){
|
|
289
|
+ this.week_time = type
|
|
290
|
+ this.getNextScheduleWeekDay()
|
|
291
|
+ },
|
|
292
|
+
|
|
293
|
+ getSchedulesType: function(type) {
|
|
294
|
+ let type_name = "";
|
|
295
|
+ switch (type) {
|
|
296
|
+ case 1:
|
|
297
|
+ type_name = "上午";
|
|
298
|
+ break;
|
|
299
|
+ case 2:
|
|
300
|
+ type_name = "下午";
|
|
301
|
+ break;
|
|
302
|
+ case 3:
|
|
303
|
+ type_name = "晚上";
|
|
304
|
+ break;
|
|
305
|
+ }
|
|
306
|
+ return type_name;
|
|
307
|
+ },
|
|
308
|
+ getAdvice: function(doctor_advice) {
|
|
309
|
+ if (doctor_advice != null) {
|
|
310
|
+ let name = "";
|
|
311
|
+ for (let i = 0; i < doctor_advice.length; i++) {
|
|
312
|
+ let prescribing_number = "";
|
|
313
|
+ let single_dose = "";
|
|
314
|
+ let drug_spec = "";
|
|
315
|
+
|
|
316
|
+ if (doctor_advice[i].prescribing_number > 0) {
|
|
317
|
+ prescribing_number =
|
|
318
|
+ doctor_advice[i].prescribing_number +
|
|
319
|
+ doctor_advice[i].prescribing_number_unit;
|
|
320
|
+ }
|
|
321
|
+ if (doctor_advice[i].single_dose > 0) {
|
|
322
|
+ single_dose =
|
|
323
|
+ " 单次用量 " +
|
|
324
|
+ doctor_advice[i].single_dose +
|
|
325
|
+ doctor_advice[i].single_dose_unit;
|
|
326
|
+ }
|
|
327
|
+
|
|
328
|
+ if (doctor_advice[i].drug_spec > 0) {
|
|
329
|
+ drug_spec =
|
|
330
|
+ doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit;
|
|
331
|
+ }
|
|
332
|
+
|
|
333
|
+ name =
|
|
334
|
+ name +
|
|
335
|
+ doctor_advice[i].advice_name +
|
|
336
|
+ " " +
|
|
337
|
+ drug_spec +
|
|
338
|
+ " " +
|
|
339
|
+ prescribing_number +
|
|
340
|
+ " " +
|
|
341
|
+ single_dose +
|
|
342
|
+ " " +
|
|
343
|
+ doctor_advice[i].delivery_way +
|
|
344
|
+ " " +
|
|
345
|
+ doctor_advice[i].execution_frequency +
|
|
346
|
+ " " +
|
|
347
|
+ doctor_advice[i].remark +
|
|
348
|
+ "\n";
|
|
349
|
+
|
|
350
|
+ if (doctor_advice[i].child.length > 0) {
|
|
351
|
+ for (let a = 0; a < doctor_advice[i].child.length; a++) {
|
|
352
|
+ if (doctor_advice[i].child[a].prescribing_number > 0) {
|
|
353
|
+ doctor_advice[i].child[a]["presc"] =
|
|
354
|
+ doctor_advice[i].child[a].prescribing_number +
|
|
355
|
+ doctor_advice[i].child[a].prescribing_number_unit;
|
|
356
|
+ } else {
|
|
357
|
+ doctor_advice[i].child[a]["presc"] = "";
|
|
358
|
+ }
|
|
359
|
+
|
|
360
|
+ if (doctor_advice[i].child[a].single_dose > 0) {
|
|
361
|
+ doctor_advice[i].child[a]["single"] =
|
|
362
|
+ " " +
|
|
363
|
+ " 单次用量 " +
|
|
364
|
+ " " +
|
|
365
|
+ doctor_advice[i].child[a].single_dose +
|
|
366
|
+ doctor_advice[i].child[a].single_dose_unit;
|
|
367
|
+ } else {
|
|
368
|
+ doctor_advice[i].child[a]["single"] = "";
|
|
369
|
+ }
|
|
370
|
+
|
|
371
|
+ name =
|
|
372
|
+ name +
|
|
373
|
+ "▲" +
|
|
374
|
+ doctor_advice[i].child[a].advice_name +
|
|
375
|
+ "" +
|
|
376
|
+ doctor_advice[i].child[a].advice_desc +
|
|
377
|
+ doctor_advice[i].child[a].drug_spec_unit +
|
|
378
|
+ doctor_advice[i].child[a].presc +
|
|
379
|
+ doctor_advice[i].child[a].single +
|
|
380
|
+ "\n";
|
|
381
|
+ }
|
|
382
|
+ }
|
|
383
|
+ }
|
|
384
|
+ return name;
|
|
385
|
+ }
|
|
386
|
+ }
|
|
387
|
+ },
|
|
388
|
+ components: {
|
|
389
|
+ WeekItem
|
|
390
|
+ },
|
|
391
|
+ created() {
|
|
392
|
+ this.modeOptions = this.$store.getters.treatment_mode;
|
|
393
|
+ this.anticoagulants_confit = this.$store.getters.anticoagulants_confit;
|
|
394
|
+ console.log("抗凝机", this.anticoagulants_confit);
|
|
395
|
+ this.week_type = new Date().getDay();
|
|
396
|
+ if (this.week_type == 0) {
|
|
397
|
+ this.week_type = 7;
|
|
398
|
+ }
|
|
399
|
+ this.getNextScheduleWeekDay();
|
|
400
|
+ }
|
|
401
|
+};
|
|
402
|
+</script>
|
|
403
|
+
|
|
404
|
+<style rel="stylesheet/css" lang="scss">
|
|
405
|
+.el-table td,
|
|
406
|
+.el-table th.is-leaf,
|
|
407
|
+.el-table--border,
|
|
408
|
+.el-table--group {
|
|
409
|
+ border-color: #d0d3da;
|
|
410
|
+}
|
|
411
|
+.el-table--border::after,
|
|
412
|
+.el-table--group::after,
|
|
413
|
+.el-table::before {
|
|
414
|
+ background-color: #d0d3da;
|
|
415
|
+}
|
|
416
|
+</style>
|