|
@@ -36,34 +36,273 @@
|
36
|
36
|
</ul>
|
37
|
37
|
</div>
|
38
|
38
|
</div>
|
|
39
|
+
|
|
40
|
+
|
39
|
41
|
<div>
|
40
|
42
|
<!-- <el-button size="small" icon="el-icon-printer" type="primary">打印</el-button> -->
|
41
|
43
|
<el-button size="small" type="primary" @click="statistics">统计表</el-button>
|
42
|
44
|
</div>
|
|
45
|
+ </div>
|
|
46
|
+ <div class="cell clearfix" style="justify-content: space-between;">
|
|
47
|
+ <div class="cell clearfix">
|
|
48
|
+ <label class="title"> <span class="name">给药途径</span> : </label>
|
|
49
|
+ <div class="time">
|
|
50
|
+ <ul class>
|
|
51
|
+ <li
|
|
52
|
+ :class="item.id == delivery_way ? 'active' : ''"
|
|
53
|
+ @click="selectDeliveryWay(item.id)"
|
|
54
|
+ v-for="item in deliveryWay"
|
|
55
|
+ :key="item.id"
|
|
56
|
+ >
|
|
57
|
+ {{ item.name }}
|
|
58
|
+ </li>
|
|
59
|
+ </ul>
|
|
60
|
+ </div>
|
|
61
|
+ </div>
|
43
|
62
|
</div>
|
44
|
63
|
<div>
|
45
|
|
- <el-table
|
46
|
|
- :data="tableData"
|
47
|
|
- height="350"
|
48
|
|
- border
|
49
|
|
- style="width: 100%">
|
50
|
|
- <el-table-column
|
51
|
|
- align="center"
|
52
|
|
- type="selection"
|
53
|
|
- width="55">
|
54
|
|
- </el-table-column>
|
55
|
|
- <el-table-column
|
56
|
|
- align="center"
|
57
|
|
- prop="name"
|
58
|
|
- label="姓名"
|
59
|
|
- width="180">
|
60
|
|
- </el-table-column>
|
61
|
|
- <el-table-column
|
62
|
|
- align="center"
|
63
|
|
- prop="address"
|
64
|
|
- label="地址">
|
65
|
|
- </el-table-column>
|
66
|
|
- </el-table>
|
|
64
|
+ <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
|
65
|
+ @selection-change="handleSelectionChange"
|
|
66
|
+ :row-class-name="tableRowClassName"
|
|
67
|
+ :span-method="objectSpanMethod"
|
|
68
|
+ :cell-class-name="adviceNameShow"
|
|
69
|
+ :modal-append-to-body="false"
|
|
70
|
+ v-show="show">
|
|
71
|
+ <el-table-column type="selection" width="55" align="center"></el-table-column>
|
|
72
|
+ <el-table-column prop="date" label="姓名" align="center" min-width="26px">
|
|
73
|
+ <template slot-scope="scope">
|
|
74
|
+ <span>{{ scope.row.name }}</span>
|
|
75
|
+ <br>
|
|
76
|
+ ({{ scope.row.parent_id == 0 ? scope.row.dialysis_no : ""}})
|
|
77
|
+ <br>
|
|
78
|
+ <span v-if="scope.row.mode_id == 1">(HD)</span>
|
|
79
|
+ <span v-if="scope.row.mode_id == 2">(HDF)</span>
|
|
80
|
+ <span v-if="scope.row.mode_id == 3">(HD+HP)</span>
|
|
81
|
+ <span v-if="scope.row.mode_id == 4">(HP)</span>
|
|
82
|
+ <span v-if="scope.row.mode_id == 5">(HF)</span>
|
|
83
|
+ <span v-if="scope.row.mode_id == 6">(SCUF)</span>
|
|
84
|
+ <span v-if="scope.row.mode_id == 7">(IUF)</span>
|
|
85
|
+ <span v-if="scope.row.mode_id == 8">(HFHD)</span>
|
|
86
|
+ <span v-if="scope.row.mode_id == 9">(HFHD+HP)</span>
|
|
87
|
+ <span v-if="scope.row.mode_id == 10">(PHF)</span>
|
|
88
|
+ <span v-if="scope.row.mode_id == 11">(HFR)</span>
|
|
89
|
+ <span v-if="scope.row.mode_id == 12">(HDF+HP)</span>
|
|
90
|
+ <span v-if="scope.row.mode_id == 13">(CRRT)</span>
|
|
91
|
+ <span v-if="scope.row.mode_id == 14">(腹水回输)</span>
|
|
92
|
+ </template>
|
|
93
|
+ </el-table-column>
|
|
94
|
+ <el-table-column prop="date" label="透析器" align="center" min-width="26px">
|
|
95
|
+ <template slot-scope="scope">
|
|
96
|
+ <span>{{ scope.row.dialyzer_perfusion_apparatus }}</span>
|
|
97
|
+ </template>
|
|
98
|
+ </el-table-column>
|
|
99
|
+ <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
|
|
100
|
+ <template slot-scope="scope">
|
|
101
|
+ <span>
|
|
102
|
+ {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
|
|
103
|
+ </span>
|
|
104
|
+ </template>
|
|
105
|
+ </el-table-column>
|
|
106
|
+ <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
|
|
107
|
+ <template slot-scope="scope">
|
|
108
|
+ <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
|
|
109
|
+ <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
|
|
110
|
+ {{ getAdviceContent(scope.row, 1)}}
|
|
111
|
+ </span>
|
|
112
|
+ </el-dropdown>
|
|
113
|
+
|
|
114
|
+ <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
|
|
115
|
+ <span class="el-dropdown-link">
|
|
116
|
+  {{ getAdviceContent(scope.row, 2)}}
|
|
117
|
+ </span>
|
|
118
|
+ </el-dropdown>
|
|
119
|
+ </template>
|
|
120
|
+ </el-table-column>
|
|
121
|
+ <el-table-column
|
|
122
|
+ prop="start_time"
|
|
123
|
+ align="center"
|
|
124
|
+ min-width="30px"
|
|
125
|
+ label="执行时间"
|
|
126
|
+ sortable
|
|
127
|
+ >
|
|
128
|
+ <template slot-scope="scope">
|
|
129
|
+ <span v-if="scope.row.execution_time != 0">
|
|
130
|
+ {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
|
|
131
|
+ </span>
|
|
132
|
+ <span v-else></span>
|
|
133
|
+ </template>
|
|
134
|
+ </el-table-column>
|
|
135
|
+ <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
|
|
136
|
+ <template slot-scope="scope">
|
|
137
|
+ <span v-if="scope.row.parent_id == 0">
|
|
138
|
+ {{getXuserName(scope.row.execution_staff)}}
|
|
139
|
+ </span>
|
|
140
|
+ <span v-else></span>
|
|
141
|
+ </template>
|
|
142
|
+ </el-table-column>
|
|
143
|
+ <el-table-column prop="checker" align="center" min-width="30px" label="校对护士">
|
|
144
|
+ <template slot-scope="scope">
|
|
145
|
+ <span v-if="scope.row.parent_id == 0">
|
|
146
|
+ {{getXuserName(scope.row.checker)}}
|
|
147
|
+ </span>
|
|
148
|
+ <span v-else></span>
|
|
149
|
+ </template>
|
|
150
|
+ </el-table-column>
|
|
151
|
+ <el-table-column
|
|
152
|
+ prop="check_time"
|
|
153
|
+ align="center"
|
|
154
|
+ min-width="30px"
|
|
155
|
+ label="校对时间"
|
|
156
|
+ sortable
|
|
157
|
+ >
|
|
158
|
+ <template slot-scope="scope">
|
|
159
|
+ <span v-if="scope.row.check_time != 0">
|
|
160
|
+ {{scope.row.check_time | parseTime('{m}-{d} {h}:{i}')}}
|
|
161
|
+ </span>
|
|
162
|
+ <span v-else></span>
|
|
163
|
+ </template>
|
|
164
|
+ </el-table-column>
|
|
165
|
+ <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
|
|
166
|
+ <template slot-scope="scope">
|
|
167
|
+ <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
|
|
168
|
+ </template>
|
|
169
|
+ </el-table-column>
|
|
170
|
+ <el-table-column
|
|
171
|
+ prop="created_time"
|
|
172
|
+ align="center"
|
|
173
|
+ min-width="30px"
|
|
174
|
+ label="校对时间"
|
|
175
|
+ sortable
|
|
176
|
+ >
|
|
177
|
+ <template slot-scope="scope">
|
|
178
|
+ <span v-if="scope.row.created_time != 0">
|
|
179
|
+ {{scope.row.created_time | parseTime('{m}-{d} {h}:{i}')}}
|
|
180
|
+ </span>
|
|
181
|
+ <span v-else></span>
|
|
182
|
+ </template>
|
|
183
|
+ </el-table-column>
|
|
184
|
+ </el-table>
|
|
185
|
+ <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
|
186
|
+ @selection-change="handleSelectionChange"
|
|
187
|
+ :row-class-name="tableRowClassName"
|
|
188
|
+ :span-method="objectSpanMethod"
|
|
189
|
+ :cell-class-name="adviceNameShow"
|
|
190
|
+ :modal-append-to-body="false"
|
|
191
|
+ v-show="showOne">
|
|
192
|
+ <el-table-column type="selection" width="55" align="center"></el-table-column>
|
|
193
|
+ <el-table-column prop="date" label="姓名" align="center" min-width="26px">
|
|
194
|
+ <template slot-scope="scope">
|
|
195
|
+ <span>{{ scope.row.name }}</span>
|
|
196
|
+ <br>
|
|
197
|
+ ({{ scope.row.parent_id == 0 ? scope.row.dialysis_no : ""}})
|
|
198
|
+ <br>
|
|
199
|
+ <span v-if="scope.row.mode_id == 1">(HD)</span>
|
|
200
|
+ <span v-if="scope.row.mode_id == 2">(HDF)</span>
|
|
201
|
+ <span v-if="scope.row.mode_id == 3">(HD+HP)</span>
|
|
202
|
+ <span v-if="scope.row.mode_id == 4">(HP)</span>
|
|
203
|
+ <span v-if="scope.row.mode_id == 5">(HF)</span>
|
|
204
|
+ <span v-if="scope.row.mode_id == 6">(SCUF)</span>
|
|
205
|
+ <span v-if="scope.row.mode_id == 7">(IUF)</span>
|
|
206
|
+ <span v-if="scope.row.mode_id == 8">(HFHD)</span>
|
|
207
|
+ <span v-if="scope.row.mode_id == 9">(HFHD+HP)</span>
|
|
208
|
+ <span v-if="scope.row.mode_id == 10">(PHF)</span>
|
|
209
|
+ <span v-if="scope.row.mode_id == 11">(HFR)</span>
|
|
210
|
+ <span v-if="scope.row.mode_id == 12">(HDF+HP)</span>
|
|
211
|
+ <span v-if="scope.row.mode_id == 13">(CRRT)</span>
|
|
212
|
+ <span v-if="scope.row.mode_id == 14">(腹水回输)</span>
|
|
213
|
+ </template>
|
|
214
|
+ </el-table-column>
|
|
215
|
+ <el-table-column prop="date" label="透析器" align="center" min-width="26px">
|
|
216
|
+ <template slot-scope="scope">
|
|
217
|
+ <span>{{ scope.row.dialyzer_perfusion_apparatus }}</span>
|
|
218
|
+ </template>
|
|
219
|
+ </el-table-column>
|
|
220
|
+ <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
|
|
221
|
+ <template slot-scope="scope">
|
|
222
|
+ <span>
|
|
223
|
+ {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
|
|
224
|
+ </span>
|
|
225
|
+ </template>
|
|
226
|
+ </el-table-column>
|
|
227
|
+ <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
|
|
228
|
+ <template slot-scope="scope">
|
|
229
|
+ <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
|
|
230
|
+ <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
|
|
231
|
+ {{ getAdviceContent(scope.row, 1)}}
|
|
232
|
+ </span>
|
|
233
|
+ </el-dropdown>
|
|
234
|
+
|
|
235
|
+ <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
|
|
236
|
+ <span class="el-dropdown-link">
|
|
237
|
+  {{ getAdviceContent(scope.row, 2)}}
|
|
238
|
+ </span>
|
|
239
|
+ </el-dropdown>
|
|
240
|
+ </template>
|
|
241
|
+ </el-table-column>
|
|
242
|
+ <el-table-column
|
|
243
|
+ prop="start_time"
|
|
244
|
+ align="center"
|
|
245
|
+ min-width="30px"
|
|
246
|
+ label="执行时间"
|
|
247
|
+ sortable
|
|
248
|
+ >
|
|
249
|
+ <template slot-scope="scope">
|
|
250
|
+ <span v-if="scope.row.execution_time != 0">
|
|
251
|
+ {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
|
|
252
|
+ </span>
|
|
253
|
+ <span v-else></span>
|
|
254
|
+ </template>
|
|
255
|
+ </el-table-column>
|
|
256
|
+ <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
|
|
257
|
+ <template slot-scope="scope">
|
|
258
|
+ <span v-if="scope.row.parent_id == 0">
|
|
259
|
+ {{getXuserName(scope.row.execution_staff)}}
|
|
260
|
+ </span>
|
|
261
|
+ <span v-else></span>
|
|
262
|
+ </template>
|
|
263
|
+ </el-table-column>
|
|
264
|
+ <el-table-column prop="checker" align="center" min-width="30px" label="校对护士">
|
|
265
|
+ <template slot-scope="scope">
|
|
266
|
+ <span v-if="scope.row.parent_id == 0">
|
|
267
|
+ {{getXuserName(scope.row.checker)}}
|
|
268
|
+ </span>
|
|
269
|
+ <span v-else></span>
|
|
270
|
+ </template>
|
|
271
|
+ </el-table-column>
|
|
272
|
+ <el-table-column
|
|
273
|
+ prop="check_time"
|
|
274
|
+ align="center"
|
|
275
|
+ min-width="30px"
|
|
276
|
+ label="校对时间"
|
|
277
|
+ sortable
|
|
278
|
+ >
|
|
279
|
+ <template slot-scope="scope">
|
|
280
|
+ <span v-if="scope.row.check_time != 0">
|
|
281
|
+ {{scope.row.check_time | parseTime('{m}-{d} {h}:{i}')}}
|
|
282
|
+ </span>
|
|
283
|
+ <span v-else></span>
|
|
284
|
+ </template>
|
|
285
|
+ </el-table-column>
|
|
286
|
+ <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
|
|
287
|
+ <template slot-scope="scope">
|
|
288
|
+ <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
|
|
289
|
+ </template>
|
|
290
|
+ </el-table-column>
|
|
291
|
+ <el-table-column
|
|
292
|
+ prop="created_time"
|
|
293
|
+ align="center"
|
|
294
|
+ min-width="30px"
|
|
295
|
+ label="校对时间"
|
|
296
|
+ sortable
|
|
297
|
+ >
|
|
298
|
+ <template slot-scope="scope">
|
|
299
|
+ <span v-if="scope.row.created_time != 0">
|
|
300
|
+ {{scope.row.created_time | parseTime('{m}-{d} {h}:{i}')}}
|
|
301
|
+ </span>
|
|
302
|
+ <span v-else></span>
|
|
303
|
+ </template>
|
|
304
|
+ </el-table-column>
|
|
305
|
+ </el-table>
|
67
|
306
|
</div>
|
68
|
307
|
|
69
|
308
|
<dialysis-drugs-dialog ref="dialysisDrugs"></dialysis-drugs-dialog>
|
|
@@ -72,7 +311,9 @@
|
72
|
311
|
|
73
|
312
|
|
74
|
313
|
<script>
|
|
314
|
+const moment = require('moment')
|
75
|
315
|
import { GetAllZone } from "@/api/dialysis";
|
|
316
|
+import { getSchedualDoctors } from '@/api/advice'
|
76
|
317
|
import dialysisDrugsDialog from './dialysisDrugsDialog'
|
77
|
318
|
export default {
|
78
|
319
|
components:{
|
|
@@ -90,19 +331,34 @@ export default {
|
90
|
331
|
selected_date:new Date(),
|
91
|
332
|
partitionArr:[],
|
92
|
333
|
partitionType: 0,
|
93
|
|
- tableData: []
|
|
334
|
+ tableData: [],
|
|
335
|
+ deliveryWay:[],
|
|
336
|
+ deliver_way:0,
|
|
337
|
+ search_input:"",
|
|
338
|
+ show:true,
|
|
339
|
+ showOne:false,
|
|
340
|
+ deliveryWay:[],
|
|
341
|
+ delivery_way:0,
|
|
342
|
+ scheduleMap:[],
|
|
343
|
+ selecting_schs: [],
|
94
|
344
|
}
|
95
|
345
|
},
|
96
|
346
|
created(){
|
97
|
347
|
this.getAllZone()
|
98
|
|
-
|
|
348
|
+ this.getlist()
|
99
|
349
|
},
|
100
|
350
|
methods:{
|
101
|
351
|
selectSchedulType(scheduleType) {
|
102
|
|
- this.schedulType = scheduleType;
|
|
352
|
+ this.schedulType = scheduleType;
|
|
353
|
+ this.getlist()
|
103
|
354
|
},
|
104
|
355
|
selectPartitionType(partitionType) {
|
105
|
|
- this.partitionType = partitionType;
|
|
356
|
+ this.partitionType = partitionType;
|
|
357
|
+ this.getlist()
|
|
358
|
+ },
|
|
359
|
+ selectDeliveryWay(val){
|
|
360
|
+ this.delivery_way = val
|
|
361
|
+ this.getlist()
|
106
|
362
|
},
|
107
|
363
|
getAllZone: function() {
|
108
|
364
|
GetAllZone().then(response => {
|
|
@@ -112,13 +368,298 @@ export default {
|
112
|
368
|
} else {
|
113
|
369
|
this.partitionArr = response.data.data.zone;
|
114
|
370
|
this.partitionArr.unshift({ id: 0, name: "全部" });
|
|
371
|
+ var dics = response.data.data.dics
|
|
372
|
+ var obj = {id:0,name:"全部"}
|
|
373
|
+ this.deliveryWay.push(obj)
|
|
374
|
+ this.deliveryWay.push(...dics)
|
115
|
375
|
}
|
116
|
376
|
});
|
117
|
377
|
},
|
118
|
378
|
statistics(){
|
119
|
379
|
this.$refs.dialysisDrugs.show();
|
|
380
|
+ },
|
|
381
|
+ getlist(){
|
|
382
|
+ var name = ""
|
|
383
|
+ for(let i=0;i<this.deliveryWay.length;i++){
|
|
384
|
+ if(this.delivery_way == this.deliveryWay[i].id){
|
|
385
|
+ name = this.deliveryWay[i].name
|
|
386
|
+ }
|
120
|
387
|
}
|
121
|
|
- }
|
|
388
|
+ if(name == '全部'){
|
|
389
|
+ name = ""
|
|
390
|
+ }
|
|
391
|
+
|
|
392
|
+ let newTime = moment(this.selected_date).format('YYYY-MM-DD')
|
|
393
|
+ getSchedualDoctors({ date: newTime,patient_type: 0,advice_type: 2,delivery_way:name}).then(rs => {
|
|
394
|
+ var resp = rs.data
|
|
395
|
+ if (resp.state == 1) {
|
|
396
|
+ this.admin_users = resp.data.adminUser
|
|
397
|
+ var schedules = resp.data.scheduals
|
|
398
|
+ console.log("数据多少2223333333",schedules)
|
|
399
|
+ var config = resp.data.config
|
|
400
|
+ if(config.is_open == 0){
|
|
401
|
+ this.show = true
|
|
402
|
+ this.showOne = false
|
|
403
|
+ let arr = []
|
|
404
|
+ let newArr = []
|
|
405
|
+ let newSchedules = []
|
|
406
|
+ schedules.map(item => {
|
|
407
|
+ item.doctor_advice.map(it =>{
|
|
408
|
+ it.name = item.patient.name
|
|
409
|
+ if(item.prescription != null){
|
|
410
|
+ it.dialyzer_perfusion_apparatus = item.prescription.dialyzer_perfusion_apparatus
|
|
411
|
+ }
|
|
412
|
+ it.schedule_type = item.schedule_type
|
|
413
|
+ it.zoneId = item.device_number.zone.id
|
|
414
|
+ it.dialysis_no = item.patient.dialysis_no
|
|
415
|
+ it.mode_id = item.mode_id
|
|
416
|
+ arr.push(it)
|
|
417
|
+ })
|
|
418
|
+ })
|
|
419
|
+ if(this.schedulType == 0){
|
|
420
|
+ newSchedules = arr
|
|
421
|
+ }else{
|
|
422
|
+ arr.map(item => {
|
|
423
|
+ if (item.schedule_type == this.schedulType) {
|
|
424
|
+ newSchedules.push(item)
|
|
425
|
+ }
|
|
426
|
+ })
|
|
427
|
+ }
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+ if(this.partitionType == 0){
|
|
431
|
+ this.scheduleMap = newSchedules
|
|
432
|
+ }else {
|
|
433
|
+ let a = []
|
|
434
|
+ arr.map(item => {
|
|
435
|
+ if(this.partitionType == item.zoneId){
|
|
436
|
+ a.push(item)
|
|
437
|
+ }
|
|
438
|
+ })
|
|
439
|
+ this.scheduleMap = a
|
|
440
|
+ }
|
|
441
|
+ this.scheduleMap.map(ele => {
|
|
442
|
+ let firstIndex = this.scheduleMap.findIndex(item => {
|
|
443
|
+ return item.patient_id === ele.patient_id // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
|
|
444
|
+ })
|
|
445
|
+ if (this.scheduleMap.findIndex(item => { return item.patient_id === firstIndex}) === -1) {
|
|
446
|
+ newArr.push({
|
|
447
|
+ length: this.scheduleMap.filter(item => {
|
|
448
|
+ return item.patient_id === ele.patient_id //利用数组的filter方法,过滤出相同category的数组的长度。数组长度-即为跨多少行
|
|
449
|
+ }).length,
|
|
450
|
+ firstIndex: firstIndex // firstIndex 返回的是第一个catergory就满足的第一个Index,即为rowIndex开始于第几行。
|
|
451
|
+ })
|
|
452
|
+ }
|
|
453
|
+ })
|
|
454
|
+ this.indexInfoList = newArr
|
|
455
|
+ }
|
|
456
|
+ if(config.is_open == 1 || config.is_open == 2){
|
|
457
|
+ this.show = false
|
|
458
|
+ this.showOne = true
|
|
459
|
+ var schedules = resp.data.hisAdvices
|
|
460
|
+
|
|
461
|
+ let arr = []
|
|
462
|
+ let newArr = []
|
|
463
|
+ let newSchedules = []
|
|
464
|
+ schedules.map(item => {
|
|
465
|
+ item.doctor_advice.map(it =>{
|
|
466
|
+ it.name = item.patient.name
|
|
467
|
+ if(item.prescription != null){
|
|
468
|
+ it.dialyzer_perfusion_apparatus = item.prescription.dialyzer_perfusion_apparatus
|
|
469
|
+ }
|
|
470
|
+ it.schedule_type = item.schedule_type
|
|
471
|
+ it.zoneId = item.device_number.zone.id
|
|
472
|
+ it.dialysis_no = item.patient.dialysis_no
|
|
473
|
+ it.mode_id = item.mode_id
|
|
474
|
+ arr.push(it)
|
|
475
|
+ })
|
|
476
|
+ })
|
|
477
|
+ if(this.schedulType == 0){
|
|
478
|
+ newSchedules = arr
|
|
479
|
+ }else{
|
|
480
|
+ arr.map(item => {
|
|
481
|
+ if (item.schedule_type == this.schedulType) {
|
|
482
|
+ newSchedules.push(item)
|
|
483
|
+ }
|
|
484
|
+ })
|
|
485
|
+ }
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+ if(this.partitionType == 0){
|
|
489
|
+ this.scheduleMap = newSchedules
|
|
490
|
+ }else {
|
|
491
|
+ let a = []
|
|
492
|
+ arr.map(item => {
|
|
493
|
+ if(this.partitionType == item.zoneId){
|
|
494
|
+ a.push(item)
|
|
495
|
+ }
|
|
496
|
+ })
|
|
497
|
+ this.scheduleMap = a
|
|
498
|
+ }
|
|
499
|
+ this.scheduleMap.map(ele => {
|
|
500
|
+ let firstIndex = this.scheduleMap.findIndex(item => {
|
|
501
|
+ return item.patient_id === ele.patient_id // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
|
|
502
|
+ })
|
|
503
|
+ if (this.scheduleMap.findIndex(item => { return item.patient_id === firstIndex}) === -1) {
|
|
504
|
+ newArr.push({
|
|
505
|
+ length: this.scheduleMap.filter(item => {
|
|
506
|
+ return item.patient_id === ele.patient_id //利用数组的filter方法,过滤出相同category的数组的长度。数组长度-即为跨多少行
|
|
507
|
+ }).length,
|
|
508
|
+ firstIndex: firstIndex // firstIndex 返回的是第一个catergory就满足的第一个Index,即为rowIndex开始于第几行。
|
|
509
|
+ })
|
|
510
|
+ }
|
|
511
|
+ })
|
|
512
|
+ this.indexInfoList = newArr
|
|
513
|
+ console.log("过年9999999999",this.scheduleMap)
|
|
514
|
+ }
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+ }
|
|
518
|
+ })
|
|
519
|
+ },
|
|
520
|
+ searchAction(){
|
|
521
|
+
|
|
522
|
+ },
|
|
523
|
+ handleScheduleDateChange(){
|
|
524
|
+
|
|
525
|
+ },
|
|
526
|
+ handleSelectionChange(val) {
|
|
527
|
+ this.selecting_schs = val;
|
|
528
|
+ },
|
|
529
|
+ adviceNameShow({ row, column, rowIndex, columnIndex }) {
|
|
530
|
+ if (columnIndex == 2) {
|
|
531
|
+ return 'dialysisadvicenamedisplay'
|
|
532
|
+ } else {
|
|
533
|
+ return ''
|
|
534
|
+ }
|
|
535
|
+ },
|
|
536
|
+ tableRowClassName({ row, rowIndex }) {
|
|
537
|
+
|
|
538
|
+ },
|
|
539
|
+ objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
540
|
+ if (columnIndex === 0) {
|
|
541
|
+ let index = this.indexInfoList.findIndex(item => { //遍历数组
|
|
542
|
+ return item.firstIndex === rowIndex
|
|
543
|
+ })
|
|
544
|
+ if (index > -1) {
|
|
545
|
+ return {
|
|
546
|
+ rowspan: this.indexInfoList[index].length,
|
|
547
|
+ colspan: 1
|
|
548
|
+ }
|
|
549
|
+ } else {
|
|
550
|
+ return {
|
|
551
|
+ rowspan: 0,
|
|
552
|
+ colspan: 0
|
|
553
|
+ }
|
|
554
|
+ }
|
|
555
|
+ }
|
|
556
|
+
|
|
557
|
+ if (columnIndex === 1) {
|
|
558
|
+ let index = this.indexInfoList.findIndex(item => { //遍历数组
|
|
559
|
+ return item.firstIndex === rowIndex
|
|
560
|
+ })
|
|
561
|
+ if (index > -1) {
|
|
562
|
+ return {
|
|
563
|
+ rowspan: this.indexInfoList[index].length,
|
|
564
|
+ colspan: 1
|
|
565
|
+ }
|
|
566
|
+ } else {
|
|
567
|
+ return {
|
|
568
|
+ rowspan: 0,
|
|
569
|
+ colspan: 0
|
|
570
|
+ }
|
|
571
|
+ }
|
|
572
|
+ }
|
|
573
|
+ if (columnIndex === 2) {
|
|
574
|
+ let index = this.indexInfoList.findIndex(item => { //遍历数组
|
|
575
|
+ return item.firstIndex === rowIndex
|
|
576
|
+ })
|
|
577
|
+ if (index > -1) {
|
|
578
|
+ return {
|
|
579
|
+ rowspan: this.indexInfoList[index].length,
|
|
580
|
+ colspan: 1
|
|
581
|
+ }
|
|
582
|
+ } else {
|
|
583
|
+ return {
|
|
584
|
+ rowspan: 0,
|
|
585
|
+ colspan: 0
|
|
586
|
+ }
|
|
587
|
+ }
|
|
588
|
+ }
|
|
589
|
+ },
|
|
590
|
+ getAdviceContent(row, isChild) {
|
|
591
|
+ let tempSingleDoseDesc = ''
|
|
592
|
+ let tempDrugSpecDesc = ''
|
|
593
|
+ let tempPrescribingNumberDesc = ''
|
|
594
|
+
|
|
595
|
+ if (row.prescribing_number) {
|
|
596
|
+ tempPrescribingNumberDesc =
|
|
597
|
+ row.prescribing_number + '' + row.prescribing_number_unit
|
|
598
|
+ }
|
|
599
|
+
|
|
600
|
+ if (row.single_dose) {
|
|
601
|
+ if (this.template_id != 6) {
|
|
602
|
+ tempSingleDoseDesc =
|
|
603
|
+ ' 单次用量 ' + ' ' + row.single_dose + '' + row.single_dose_unit
|
|
604
|
+ } else {
|
|
605
|
+ tempSingleDoseDesc = row.single_dose + '' + row.single_dose_unit
|
|
606
|
+ }
|
|
607
|
+ }
|
|
608
|
+
|
|
609
|
+ if (row.advice_desc) {
|
|
610
|
+ tempDrugSpecDesc = '(' + row.advice_desc + row.drug_spec_unit + ')'
|
|
611
|
+ }
|
|
612
|
+
|
|
613
|
+ if (isChild == 1) {
|
|
614
|
+ // 不是子药
|
|
615
|
+
|
|
616
|
+ return (
|
|
617
|
+ row.advice_name +
|
|
618
|
+ tempDrugSpecDesc +
|
|
619
|
+ ' ' +
|
|
620
|
+ tempPrescribingNumberDesc +
|
|
621
|
+ tempSingleDoseDesc +
|
|
622
|
+ ' ' +
|
|
623
|
+ row.delivery_way +
|
|
624
|
+ ' ' +
|
|
625
|
+ row.execution_frequency
|
|
626
|
+ )
|
|
627
|
+ } else {
|
|
628
|
+ // 是子药
|
|
629
|
+ return (
|
|
630
|
+ row.advice_name +
|
|
631
|
+ tempDrugSpecDesc +
|
|
632
|
+ ' ' +
|
|
633
|
+ tempPrescribingNumberDesc +
|
|
634
|
+ tempSingleDoseDesc
|
|
635
|
+ )
|
|
636
|
+ }
|
|
637
|
+ },
|
|
638
|
+ getXuserName(id) {
|
|
639
|
+ if (id <= 0) {
|
|
640
|
+ return ''
|
|
641
|
+ }
|
|
642
|
+ var name = ''
|
|
643
|
+ if (
|
|
644
|
+ this.admin_users == null ||
|
|
645
|
+ typeof this.admin_users.length === 'undefined'
|
|
646
|
+ ) {
|
|
647
|
+ return name
|
|
648
|
+ }
|
|
649
|
+ var leng = this.admin_users.length
|
|
650
|
+ if (leng == 0) {
|
|
651
|
+ return name
|
|
652
|
+ }
|
|
653
|
+ for (let index = 0; index < leng; index++) {
|
|
654
|
+ if (this.admin_users[index].id == id) {
|
|
655
|
+ name = this.admin_users[index].name
|
|
656
|
+ break
|
|
657
|
+ }
|
|
658
|
+ }
|
|
659
|
+ return name
|
|
660
|
+ },
|
|
661
|
+ },
|
|
662
|
+
|
122
|
663
|
}
|
123
|
664
|
</script>
|
124
|
665
|
|