|
@@ -52,11 +52,91 @@
|
52
|
52
|
</div>
|
53
|
53
|
|
54
|
54
|
<div style="flex:1">
|
|
55
|
+ <el-container class="newContainer">
|
|
56
|
+ <div style="width:270px">
|
|
57
|
+ <div class="tableTitle">患者列表</div>
|
|
58
|
+ <div class="cell clearfix" style="margin-bottom:10px;">
|
|
59
|
+ <el-date-picker v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange" :editable="false" :clearable="false" style="width: 130px;margin-right:10px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
|
|
60
|
+ <el-input size="small" style="width:80px;" v-model.trim="search_input" class="filter-item"/>
|
|
61
|
+ <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
|
|
62
|
+ </div>
|
|
63
|
+ <div class="cell clearfix" style="margin-bottom:10px;">
|
|
64
|
+ <el-select v-model="patientStateVal" placeholder="全部患者状态" style="width:130px;margin-right:10px;" @change="handleStateChange">
|
|
65
|
+ <el-option
|
|
66
|
+ v-for="item in patient_state"
|
|
67
|
+ :key="item.value"
|
|
68
|
+ :label="item.label"
|
|
69
|
+ :value="item.value">
|
|
70
|
+ </el-option>
|
|
71
|
+ </el-select>
|
|
72
|
+ <el-select v-model="treatStateVal" placeholder="全部治疗状态" style="width:130px;margin-right:10px;" @change="handleTreatChange">
|
|
73
|
+ <el-option
|
|
74
|
+ v-for="item in treat_state"
|
|
75
|
+ :key="item.value"
|
|
76
|
+ :label="item.label"
|
|
77
|
+ :value="item.value">
|
|
78
|
+ </el-option>
|
|
79
|
+ </el-select>
|
|
80
|
+ </div>
|
|
81
|
+ <div class="cell clearfix" style="margin-bottom:10px;">
|
|
82
|
+ <el-select v-model="scheduleStateVal" placeholder="班次" style="width:130px;margin-right:10px;" @change="handletimeType">
|
|
83
|
+ <el-option
|
|
84
|
+ v-for="item in schedule_options"
|
|
85
|
+ :key="item.value"
|
|
86
|
+ :label="item.label"
|
|
87
|
+ :value="item.value">
|
|
88
|
+ </el-option>
|
|
89
|
+ </el-select>
|
|
90
|
+ <el-select v-model="zoneVal" placeholder="分区" style="width:130px;margin-right:10px;" @change="handleZoneChange">
|
|
91
|
+ <el-option
|
|
92
|
+ v-for="item in zone_options"
|
|
93
|
+ :key="item.id"
|
|
94
|
+ :label="item.text"
|
|
95
|
+ :value="item.id">
|
|
96
|
+ </el-option>
|
|
97
|
+ </el-select>
|
|
98
|
+ </div>
|
|
99
|
+ <div style="padding-right:20px;">
|
|
100
|
+ <el-table
|
|
101
|
+ ref="tab"
|
|
102
|
+ @row-click="changePatient"
|
|
103
|
+ highlight-current-row
|
|
104
|
+ :data="tableData"
|
|
105
|
+ height="500"
|
|
106
|
+ border
|
|
107
|
+ style="width: 100%">
|
|
108
|
+ <el-table-column
|
|
109
|
+ prop="date"
|
|
110
|
+ label="患者"
|
|
111
|
+ >
|
|
112
|
+ <template slot-scope="scope">
|
|
113
|
+ {{ scope.row.patient.name }}
|
|
114
|
+ </template>
|
|
115
|
+ </el-table-column>
|
|
116
|
+ <el-table-column
|
|
117
|
+ prop="name"
|
|
118
|
+ label="状态"
|
|
119
|
+ >
|
|
120
|
+ <template slot-scope="scope">
|
|
121
|
+ <div style="display:flex;align-items:center;justify-content:space-around;">
|
|
122
|
+ <span class="tip1" v-if="scope.row.prescription == null || scope.row.prescription.creater == 0">
|
|
123
|
+ 待开处方
|
|
124
|
+ </span>
|
|
125
|
+ <span class="tip2" v-if="scope.row.assessment_before_dislysis == null || scope.row.assessment_before_dislysis.weight_before == ''">
|
|
126
|
+ 待称重
|
|
127
|
+ </span>
|
|
128
|
+ </div>
|
|
129
|
+ </template>
|
|
130
|
+ </el-table-column>
|
|
131
|
+ </el-table>
|
|
132
|
+ </div>
|
|
133
|
+ </div>
|
55
|
134
|
<basic-info v-if="wayType == 0"></basic-info>
|
56
|
135
|
<treat-info v-if="wayType == 1"></treat-info>
|
57
|
136
|
<dialysis-params v-if="wayType == 2"></dialysis-params>
|
58
|
137
|
<dialysis-summary v-if="wayType == 3"></dialysis-summary>
|
59
|
138
|
<rescue-record v-if="wayType == 4"></rescue-record>
|
|
139
|
+ </el-container>
|
60
|
140
|
</div>
|
61
|
141
|
|
62
|
142
|
|
|
@@ -72,6 +152,12 @@
|
72
|
152
|
import dialysisSummary from "../fast/dialysisSummary"
|
73
|
153
|
import rescueRecord from "../fast/rescueRecord"
|
74
|
154
|
|
|
155
|
+ import {
|
|
156
|
+ getDialysisRecordInitData,
|
|
157
|
+ getDialysisSchedules
|
|
158
|
+} from "@/api/dialysis_record";
|
|
159
|
+import { parseTime } from "@/utils";
|
|
160
|
+
|
75
|
161
|
export default {
|
76
|
162
|
name: 'FastProvince',
|
77
|
163
|
components:{
|
|
@@ -107,59 +193,69 @@
|
107
|
193
|
{ value: 4, label: "抢救记录", state: 4 },
|
108
|
194
|
],
|
109
|
195
|
wayType: 0,
|
110
|
|
- tableData: [
|
111
|
|
- {
|
112
|
|
- date: "2016",
|
113
|
|
- name: "王小虎"
|
114
|
|
- },
|
115
|
|
- {
|
116
|
|
- date: "2016",
|
117
|
|
- name: "王小虎"
|
118
|
|
- },
|
119
|
|
- {
|
120
|
|
- date: "2016",
|
121
|
|
- name: "王小虎"
|
122
|
|
- },
|
123
|
|
- {
|
124
|
|
- date: "2016",
|
125
|
|
- name: "王小虎"
|
126
|
|
- },
|
127
|
|
- {
|
128
|
|
- date: "2016",
|
129
|
|
- name: "王小虎"
|
130
|
|
- },
|
131
|
|
- {
|
132
|
|
- date: "2016",
|
133
|
|
- name: "王小虎"
|
134
|
|
- },
|
135
|
|
- {
|
136
|
|
- date: "2016",
|
137
|
|
- name: "王小虎"
|
138
|
|
- },
|
139
|
|
- {
|
140
|
|
- date: "2016",
|
141
|
|
- name: "王小虎"
|
142
|
|
- },
|
143
|
|
- {
|
144
|
|
- date: "2016",
|
145
|
|
- name: "王小虎"
|
146
|
|
- },
|
147
|
|
- {
|
148
|
|
- date: "2016",
|
149
|
|
- name: "王小虎"
|
150
|
|
- },
|
151
|
|
- {
|
152
|
|
- date: "2016",
|
153
|
|
- name: "王小虎"
|
154
|
|
- },
|
155
|
|
- {
|
156
|
|
- date: "2016",
|
157
|
|
- name: "王小虎"
|
158
|
|
- }
|
|
196
|
+
|
|
197
|
+ //
|
|
198
|
+ tableData: [],
|
|
199
|
+ selected_date: new Date(),
|
|
200
|
+ // search_input 和 search_keyword,使输入关键字时不会经常刷新 filtedSchedules
|
|
201
|
+ search_keyword: '', // 确定用于搜索的关键字
|
|
202
|
+ search_input: '', // 输入中的关键字
|
|
203
|
+ patient_state:[
|
|
204
|
+ {value: 0,label: '全部'},
|
|
205
|
+ {value: 1,label: '已签到'},
|
|
206
|
+ {value: 2,label: '未签到'},
|
|
207
|
+ {value: 3,label: '已上机'},
|
|
208
|
+ {value: 4,label: '已下机'},
|
|
209
|
+ ],
|
|
210
|
+ patientStateVal: 0,
|
|
211
|
+ treat_state:[
|
|
212
|
+ {value: 0,label: '全部'},
|
|
213
|
+ {value: 1,label: '待开处方'},
|
|
214
|
+ {value: 2,label: '待开小结'},
|
|
215
|
+ ],
|
|
216
|
+ treatStateVal: 0,
|
|
217
|
+ schedule_options:[
|
|
218
|
+ {value: 0,label: '全部'},
|
|
219
|
+ {value: 1,label: '上午'},
|
|
220
|
+ {value: 2,label: '下午'},
|
|
221
|
+ {value: 3,label: '晚上'},
|
159
|
222
|
],
|
|
223
|
+ scheduleStateVal: 0,
|
|
224
|
+ zone_options:[
|
|
225
|
+ { id: 0, text: '全部' }
|
|
226
|
+ ],
|
|
227
|
+ zoneVal:0,
|
160
|
228
|
|
161
|
229
|
}
|
162
|
|
- }, created() {
|
|
230
|
+ },
|
|
231
|
+ computed:{
|
|
232
|
+ filtedSchedules: function() {
|
|
233
|
+ var search_keyword = this.search_keyword
|
|
234
|
+ if (search_keyword.length > 0) {
|
|
235
|
+ var schedules = []
|
|
236
|
+ for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
|
|
237
|
+ const scheduleInfo = this.zone_schedules[o_i]
|
|
238
|
+ var originSchedules = scheduleInfo.schedules
|
|
239
|
+ if (originSchedules.length == 0) {
|
|
240
|
+ continue
|
|
241
|
+ }
|
|
242
|
+ var filtedSchedules = []
|
|
243
|
+ for (let s_i = 0; s_i < originSchedules.length; s_i++) {
|
|
244
|
+ const schedule = originSchedules[s_i]
|
|
245
|
+ if (schedule.patient.name.indexOf(search_keyword) != -1) {
|
|
246
|
+ filtedSchedules.push(schedule)
|
|
247
|
+ // break
|
|
248
|
+ }
|
|
249
|
+ }
|
|
250
|
+ if (filtedSchedules.length > 0) {
|
|
251
|
+ schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
|
|
252
|
+ }
|
|
253
|
+ }
|
|
254
|
+ return schedules
|
|
255
|
+ }
|
|
256
|
+ }
|
|
257
|
+ },
|
|
258
|
+ created() {
|
163
|
259
|
this.getDistricts()
|
164
|
260
|
var province = sessionStorage.getItem('province')
|
165
|
261
|
if (province == null) {
|
|
@@ -168,6 +264,8 @@
|
168
|
264
|
this.form.province = parseInt(province)
|
169
|
265
|
}
|
170
|
266
|
|
|
267
|
+ this.getInitData();
|
|
268
|
+
|
171
|
269
|
}, methods: {
|
172
|
270
|
getDistricts: function() {
|
173
|
271
|
GetDistrictsByUpid({ id: 0 }).then(response => {
|
|
@@ -201,7 +299,283 @@
|
201
|
299
|
},
|
202
|
300
|
chooseWay(way) {
|
203
|
301
|
this.wayType = way;
|
204
|
|
- }
|
|
302
|
+ },
|
|
303
|
+ //日期
|
|
304
|
+ handleScheduleDateChange: function() {
|
|
305
|
+ this.treatStateVal = 0
|
|
306
|
+ this.patientStateVal = 0
|
|
307
|
+ this.zoneVal = 0
|
|
308
|
+ this.scheduleStateVal = 0
|
|
309
|
+ this.search_keyword = this.search_input = ''
|
|
310
|
+ // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
|
|
311
|
+ // zone: this.zone_selected,
|
|
312
|
+ // schedule_type: this.schedule_type_selected,
|
|
313
|
+ // schedule_date: this.selected_date,
|
|
314
|
+ // })
|
|
315
|
+ this.requestDialysisSchedules()
|
|
316
|
+ },
|
|
317
|
+ //初始化数据
|
|
318
|
+ getInitData: function() {
|
|
319
|
+ getDialysisRecordInitData().then(rs => {
|
|
320
|
+ var resp = rs.data
|
|
321
|
+ if (resp.state == 1) {
|
|
322
|
+ var zones = resp.data.zones
|
|
323
|
+ var schedules = resp.data.schedules
|
|
324
|
+ var zone_options = [{ id: 0, text: '全部' }]
|
|
325
|
+ for (let z_i = 0; z_i < zones.length; z_i++) {
|
|
326
|
+ const zone = zones[z_i]
|
|
327
|
+ zone_options.push({ id: zone.id, text: zone.name })
|
|
328
|
+ }
|
|
329
|
+ this.zone_options = zone_options
|
|
330
|
+ this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
|
|
331
|
+ this.arr = this.processedDialysisSchedules(schedules, this.zone_options)
|
|
332
|
+ this.getData()
|
|
333
|
+ } else {
|
|
334
|
+ this.$message.error(resp.msg)
|
|
335
|
+ }
|
|
336
|
+ })
|
|
337
|
+ },
|
|
338
|
+ // 班次
|
|
339
|
+ handletimeType: function(index) {
|
|
340
|
+ this.scheduleStateVal = index
|
|
341
|
+ // this.$store.dispatch('SetScheduleTypeSelected', { schedule_type_selected: index })
|
|
342
|
+ this.search_keyword = this.search_input = ''
|
|
343
|
+ this.getData()
|
|
344
|
+ },
|
|
345
|
+ //分区
|
|
346
|
+ handleZoneChange: function(index) {
|
|
347
|
+ this.zoneVal = index
|
|
348
|
+ // this.$store.dispatch('SetZoneSelected', { zone_selected: index })
|
|
349
|
+ this.search_keyword = this.search_input = ''
|
|
350
|
+ this.getData()
|
|
351
|
+ },
|
|
352
|
+ //患者状态
|
|
353
|
+ handleStateChange: function(index) {
|
|
354
|
+ this.patientStateVal = index
|
|
355
|
+ // this.$store.dispatch('SetPatientStateSelected', { patient_state_selected: index })
|
|
356
|
+ this.search_keyword = this.search_input = ''
|
|
357
|
+ this.getData()
|
|
358
|
+ },
|
|
359
|
+ handleTreatChange: function(index) {
|
|
360
|
+ this.treatStateVal = index
|
|
361
|
+ // this.$store.dispatch('SetTreatStateSelected', { treat_state_selected: index })
|
|
362
|
+ this.search_keyword = this.search_input = ''
|
|
363
|
+ this.getData()
|
|
364
|
+ },
|
|
365
|
+ processedDialysisSchedules: function(schedules, zone_options) {
|
|
366
|
+ var zoneMap = {}
|
|
367
|
+ var scheduleMap = {}
|
|
368
|
+ for (let z_i = 0; z_i < zone_options.length; z_i++) {
|
|
369
|
+ const zone = zone_options[z_i]
|
|
370
|
+ if (zone.id == 0) {
|
|
371
|
+ continue
|
|
372
|
+ }
|
|
373
|
+ scheduleMap[zone.id] = []
|
|
374
|
+ }
|
|
375
|
+ for (let index = 0; index < schedules.length; index++) {
|
|
376
|
+ const schedule = schedules[index]
|
|
377
|
+ scheduleMap[schedule.device_number.zone.id].push(schedule)
|
|
378
|
+ }
|
|
379
|
+ var zone_schedules = []
|
|
380
|
+ for (let index = 0; index < zone_options.length; index++) {
|
|
381
|
+ const zone = zone_options[index]
|
|
382
|
+ if (zone.id == 0) {
|
|
383
|
+ continue
|
|
384
|
+ }
|
|
385
|
+ var schedules = scheduleMap[zone.id]
|
|
386
|
+ zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
|
|
387
|
+ }
|
|
388
|
+ return zone_schedules
|
|
389
|
+ },
|
|
390
|
+ searchAction: function() {
|
|
391
|
+ this.search_keyword = this.search_input
|
|
392
|
+ this.scheduleStateVal = 0
|
|
393
|
+ this.zoneVal = 0
|
|
394
|
+ this.treatStateVal = 0
|
|
395
|
+ this.patientStateVal = 0
|
|
396
|
+ if(this.search_input != ''){
|
|
397
|
+ let arr = []
|
|
398
|
+ this.filtedSchedules.map(item => {
|
|
399
|
+ arr.push(...item.schedules)
|
|
400
|
+ })
|
|
401
|
+ if(this.activeName == "first"){
|
|
402
|
+ this.tableData = arr
|
|
403
|
+ }else if(this.activeName == "second"){
|
|
404
|
+ this.tableData1 = arr
|
|
405
|
+ }
|
|
406
|
+
|
|
407
|
+ }else{
|
|
408
|
+ this.getData()
|
|
409
|
+ }
|
|
410
|
+ },
|
|
411
|
+ requestDialysisSchedules: function() {
|
|
412
|
+ var ymd = parseTime(this.selected_date, '{y}-{m}-{d}')
|
|
413
|
+ getDialysisSchedules(ymd).then(rs => {
|
|
414
|
+ var resp = rs.data
|
|
415
|
+ if (resp.state == 1) {
|
|
416
|
+ var schedules = resp.data.schedules
|
|
417
|
+ this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
|
|
418
|
+ let newArr = []
|
|
419
|
+ this.zone_schedules.map(item => {
|
|
420
|
+ newArr.push(...item.schedules)
|
|
421
|
+ })
|
|
422
|
+ this.tableData = newArr
|
|
423
|
+ } else {
|
|
424
|
+ this.$message.error(resp.msg)
|
|
425
|
+ }
|
|
426
|
+ })
|
|
427
|
+ },
|
|
428
|
+ changePatient(schedual){
|
|
429
|
+ // console.log(schedual)
|
|
430
|
+ // this.patient_id = schedual.patient_id;
|
|
431
|
+ // this.date = schedual.schedule_date;
|
|
432
|
+ // // this.getScheduleDetail();
|
|
433
|
+ // // this.getLongAdvice();
|
|
434
|
+
|
|
435
|
+ // var patient_id = schedual.patient_id;
|
|
436
|
+ // var date = schedual.schedule_date;
|
|
437
|
+ // this.$router.push({
|
|
438
|
+ // path: "/dialysis/details",
|
|
439
|
+ // query: {
|
|
440
|
+ // patient_id: patient_id,
|
|
441
|
+ // date: date,
|
|
442
|
+ // patient_name: schedual.patient.name
|
|
443
|
+ // }
|
|
444
|
+ // });
|
|
445
|
+ },
|
|
446
|
+ getData(){
|
|
447
|
+ let patientArr = []
|
|
448
|
+ patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
|
|
449
|
+ console.log('patientArr',patientArr)
|
|
450
|
+ let arr1 = []
|
|
451
|
+ if(this.patientStateVal == 0){
|
|
452
|
+ arr1 = patientArr
|
|
453
|
+ console.log(arr1)
|
|
454
|
+ }else if(this.patientStateVal == 1){
|
|
455
|
+ let arr = []
|
|
456
|
+ arr = patientArr
|
|
457
|
+ for (let i = 0; i <arr.length; i++) {
|
|
458
|
+ for (let j = 0; j < arr[i].schedules.length; j++) {
|
|
459
|
+ if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis == null || arr[i].schedules[j].assessment_before_dislysis.weight_before == '' || arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure == '' || arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure == '')) {
|
|
460
|
+ // 删除元素后改变i的值
|
|
461
|
+ arr[i].schedules.splice(j--, 1);
|
|
462
|
+ }
|
|
463
|
+ }
|
|
464
|
+ }
|
|
465
|
+ console.log("执行1",arr)
|
|
466
|
+ arr1 = arr
|
|
467
|
+ }else if(this.patientStateVal == 2){
|
|
468
|
+ let arr = []
|
|
469
|
+ arr = patientArr
|
|
470
|
+ for (let i = 0; i < arr.length; i++) {
|
|
471
|
+ for (let j = 0; j < arr[i].schedules.length; j++) {
|
|
472
|
+ if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis != null && (arr[i].schedules[j].assessment_before_dislysis.weight_before != 0 || arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure != 0 || arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure != 0))) {
|
|
473
|
+ // 删除元素后改变i的值
|
|
474
|
+ console.log('几次')
|
|
475
|
+ arr[i].schedules.splice(j--, 1);
|
|
476
|
+ }
|
|
477
|
+ }
|
|
478
|
+ }
|
|
479
|
+ console.log("执行2",arr)
|
|
480
|
+ arr1 = arr
|
|
481
|
+ }else if(this.patientStateVal == 3){
|
|
482
|
+ let arr = []
|
|
483
|
+ arr = patientArr
|
|
484
|
+ for (let i = 0; i <arr.length; i++) {
|
|
485
|
+ for (let j = 0; j < arr[i].schedules.length; j++) {
|
|
486
|
+ if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order == null || (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 1))) {
|
|
487
|
+ // 删除元素后改变i的值
|
|
488
|
+ arr[i].schedules.splice(j--, 1);
|
|
489
|
+ }
|
|
490
|
+ }
|
|
491
|
+ }
|
|
492
|
+ console.log("执行1",arr)
|
|
493
|
+ arr1 = arr
|
|
494
|
+ }else if(this.patientStateVal == 4){
|
|
495
|
+ let arr = []
|
|
496
|
+ arr = patientArr
|
|
497
|
+ for (let i = 0; i < arr.length; i++) {
|
|
498
|
+ for (let j = 0; j < arr[i].schedules.length; j++) {
|
|
499
|
+ if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order == null || (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 2))) {
|
|
500
|
+ // 删除元素后改变i的值
|
|
501
|
+ arr[i].schedules.splice(j--, 1);
|
|
502
|
+ }
|
|
503
|
+ }
|
|
504
|
+ }
|
|
505
|
+ console.log("执行2",arr)
|
|
506
|
+ arr1 = arr
|
|
507
|
+ }
|
|
508
|
+
|
|
509
|
+ let arr2 = []
|
|
510
|
+ if(this.treatStateVal == 0){
|
|
511
|
+ arr2 = JSON.parse(JSON.stringify(arr1))
|
|
512
|
+ }else if(this.treatStateVal == 1){
|
|
513
|
+ let arr = []
|
|
514
|
+ arr = JSON.parse(JSON.stringify(arr1))
|
|
515
|
+ for (let i = 0; i < arr.length; i++) {
|
|
516
|
+ for (let j = 0; j < arr[i].schedules.length; j++) {
|
|
517
|
+ if (arr[i].schedules.length > 0 && (arr[i].schedules[j].prescription != null || arr[i].schedules[j].prescription != null ? arr[i].schedules[j].prescription.creater != 0 : false)) {
|
|
518
|
+ // 删除元素后改变i的值
|
|
519
|
+ arr[i].schedules.splice(j--, 1);
|
|
520
|
+ }
|
|
521
|
+ }
|
|
522
|
+ }
|
|
523
|
+ arr2 = arr
|
|
524
|
+ }else if(this.treatStateVal == 2){
|
|
525
|
+ let arr = []
|
|
526
|
+ arr = JSON.parse(JSON.stringify(arr1))
|
|
527
|
+ for (let i = 0; i < arr.length; i++) {
|
|
528
|
+ for (let j = 0; j < arr[i].schedules.length; j++) {
|
|
529
|
+ if (arr[i].schedules.length > 0 && arr[i].schedules[j].treatment_summary != null && arr[i].schedules[j].treatment_summary.dialysis_summary != '') {
|
|
530
|
+ // 删除元素后改变i的值
|
|
531
|
+ arr[i].schedules.splice(j--, 1);
|
|
532
|
+ }
|
|
533
|
+ }
|
|
534
|
+ }
|
|
535
|
+ arr2 = arr
|
|
536
|
+ }
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+ let arr3 = []
|
|
540
|
+ if(this.scheduleStateVal == 0){
|
|
541
|
+ arr3 = JSON.parse(JSON.stringify(arr2))
|
|
542
|
+ }else{
|
|
543
|
+ let arr = []
|
|
544
|
+ arr = JSON.parse(JSON.stringify(arr2))
|
|
545
|
+ for (let i = 0; i < arr.length; i++) {
|
|
546
|
+ for (let j = 0; j < arr[i].schedules.length; j++) {
|
|
547
|
+ if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
|
|
548
|
+ // 删除元素后改变i的值
|
|
549
|
+ arr[i].schedules.splice(j--, 1);
|
|
550
|
+ }
|
|
551
|
+ }
|
|
552
|
+ }
|
|
553
|
+ arr3 = arr
|
|
554
|
+ console.log("上午",arr)
|
|
555
|
+ }
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+ let arr4 = []
|
|
559
|
+ if(this.zoneVal == 0){
|
|
560
|
+ arr4 = JSON.parse(JSON.stringify(arr3))
|
|
561
|
+ }else{
|
|
562
|
+ let arr = []
|
|
563
|
+ arr = JSON.parse(JSON.stringify(arr3))
|
|
564
|
+ for (let i = 0; i < arr.length; i++) {
|
|
565
|
+ if (this.zoneVal != arr[i].zone_id) {
|
|
566
|
+ // 删除元素后改变i的值
|
|
567
|
+ arr.splice(i--, 1);
|
|
568
|
+ }
|
|
569
|
+ }
|
|
570
|
+ arr4 = arr
|
|
571
|
+ }
|
|
572
|
+ let newArr = []
|
|
573
|
+ arr4.map(item => {
|
|
574
|
+ newArr.push(...item.schedules)
|
|
575
|
+ })
|
|
576
|
+ this.tableData = newArr
|
|
577
|
+ console.log('table',this.tableData)
|
|
578
|
+ },
|
205
|
579
|
|
206
|
580
|
}
|
207
|
581
|
}
|
|
@@ -215,6 +589,12 @@
|
215
|
589
|
}
|
216
|
590
|
}
|
217
|
591
|
}
|
|
592
|
+.tableTitle {
|
|
593
|
+ font-size: 16px;
|
|
594
|
+ color: #000;
|
|
595
|
+ font-weight: bold;
|
|
596
|
+ line-height: 40px;
|
|
597
|
+}
|
218
|
598
|
</style>
|
219
|
599
|
<style lang="scss">
|
220
|
600
|
.fastProvince{
|
|
@@ -225,4 +605,11 @@
|
225
|
605
|
// padding: 10px 6px;
|
226
|
606
|
// }
|
227
|
607
|
}
|
|
608
|
+.newContainer{
|
|
609
|
+ .el-date-editor{
|
|
610
|
+ .el-input__inner{
|
|
611
|
+ padding-right:0px;
|
|
612
|
+ }
|
|
613
|
+ }
|
|
614
|
+}
|
228
|
615
|
</style>
|