|
@@ -7,7 +7,9 @@
|
7
|
7
|
<li slot="reference">{{patient_types[patient_selected].text}}<span class="iconfont"></span></li>
|
8
|
8
|
<div class="popover-demo-content">
|
9
|
9
|
<ul>
|
10
|
|
- <li v-for="type in patient_types" :key="type.value" @click="handlePaitentType(type.value)" :class="advice_type_selected == type.value ? 'tick' : ''" >{{type.text}}</li>
|
|
10
|
+ <li v-for="type in patient_types" :key="type.value" @click="handlePaitentType(type.value)"
|
|
11
|
+ :class="advice_type_selected == type.value ? 'tick' : ''">{{type.text}}
|
|
12
|
+ </li>
|
11
|
13
|
</ul>
|
12
|
14
|
</div>
|
13
|
15
|
</el-popover>
|
|
@@ -17,25 +19,31 @@
|
17
|
19
|
<li slot="reference">{{zones[zone_selected].text}}<span class="iconfont"></span></li>
|
18
|
20
|
<div class="popover-demo-content">
|
19
|
21
|
<ul>
|
20
|
|
- <li v-for="(zone, index) in zones" :key="zone.value" @click="handleZoneChange(index)" :class="zone_selected == index ? 'tick' : ''">{{zone.text}}</li>
|
|
22
|
+ <li v-for="(zone, index) in zones" :key="zone.value" @click="handleZoneChange(index)"
|
|
23
|
+ :class="zone_selected == index ? 'tick' : ''">{{zone.text}}
|
|
24
|
+ </li>
|
21
|
25
|
</ul>
|
22
|
26
|
</div>
|
23
|
27
|
</el-popover>
|
24
|
28
|
<el-popover placement="bottom" trigger="click" v-model="show_sch_type_selector">
|
25
|
|
- <li slot="reference">{{schedule_types[schedule_type_selected].text}}<span class="iconfont"></span></li>
|
|
29
|
+ <li slot="reference">{{schedule_types[schedule_type_selected].text}}<span class="iconfont"></span>
|
|
30
|
+ </li>
|
26
|
31
|
<div class="popover-demo-content">
|
27
|
32
|
<ul>
|
28
|
|
- <li v-for="scheduleType in schedule_types" :key="scheduleType.value" @click="handletimeType(scheduleType.value)" :class="schedule_type_selected == scheduleType.value ? 'tick' : ''" >{{scheduleType.text}}</li>
|
|
33
|
+ <li v-for="scheduleType in schedule_types" :key="scheduleType.value"
|
|
34
|
+ @click="handletimeType(scheduleType.value)"
|
|
35
|
+ :class="schedule_type_selected == scheduleType.value ? 'tick' : ''">{{scheduleType.text}}
|
|
36
|
+ </li>
|
29
|
37
|
</ul>
|
30
|
38
|
</div>
|
31
|
39
|
</el-popover>
|
32
|
40
|
<!--<el-popover placement="bottom" trigger="click" v-model="show_advice_type_selector">-->
|
33
|
|
- <!--<li slot="reference">{{advice_types[advice_type_selected].text}}<span class="iconfont"></span></li>-->
|
34
|
|
- <!--<div class="popover-demo-content">-->
|
35
|
|
- <!--<ul>-->
|
36
|
|
- <!--<li v-for="type in advice_types" :key="type.value" @click="handleAdviceType(type.value)" :class="advice_type_selected == type.value ? 'tick' : ''" >{{type.text}}</li>-->
|
37
|
|
- <!--</ul>-->
|
38
|
|
- <!--</div>-->
|
|
41
|
+ <!--<li slot="reference">{{advice_types[advice_type_selected].text}}<span class="iconfont"></span></li>-->
|
|
42
|
+ <!--<div class="popover-demo-content">-->
|
|
43
|
+ <!--<ul>-->
|
|
44
|
+ <!--<li v-for="type in advice_types" :key="type.value" @click="handleAdviceType(type.value)" :class="advice_type_selected == type.value ? 'tick' : ''" >{{type.text}}</li>-->
|
|
45
|
+ <!--</ul>-->
|
|
46
|
+ <!--</div>-->
|
39
|
47
|
<!--</el-popover>-->
|
40
|
48
|
|
41
|
49
|
<li @click="openPicker()">
|
|
@@ -46,379 +54,399 @@
|
46
|
54
|
</div>
|
47
|
55
|
|
48
|
56
|
<div style="width:100%;overflow:hildden;overflow-x:auto;" class="DialysisAdvice">
|
49
|
|
- <div class="blueBorder"></div>
|
50
|
|
- <table class="table">
|
51
|
|
- <tr>
|
52
|
|
- <th width="50px">机号</th>
|
53
|
|
- <th width="50px">姓名</th>
|
54
|
|
- <th width="50px">透析号</th>
|
55
|
|
- <th width="50px">期效</th>
|
56
|
|
- <th width="100px">开始时间</th>
|
57
|
|
- <th width="200px">医嘱内容</th>
|
58
|
|
- <th width="50px">执行时间</th>
|
59
|
|
- <th width="50px">执行护士</th>
|
60
|
|
- <th width="50px">校对护士</th>
|
61
|
|
- <th width="100px">校对时间</th>
|
62
|
|
- <th width="50px">开嘱医生</th>
|
63
|
|
- <th width="100px">开嘱时间</th>
|
64
|
|
-
|
65
|
|
-
|
66
|
|
-
|
67
|
|
- </tr>
|
68
|
|
- <template v-for="(schedules, zone_name, index) in filtedScheduals">
|
69
|
|
- <tr :key="index">
|
70
|
|
- <td>{{ zone_name }}</td>
|
71
|
|
- <td></td>
|
72
|
|
- <td></td>
|
73
|
|
- <td></td>
|
74
|
|
- <td></td>
|
75
|
|
- <td></td>
|
76
|
|
- <td></td>
|
77
|
|
- <td></td>
|
78
|
|
- <td></td>
|
79
|
|
- <td></td>
|
80
|
|
- <td></td>
|
81
|
|
- <td></td>
|
82
|
|
- </tr>
|
83
|
|
- <template v-for="(schedule) in schedules">
|
84
|
|
- <template v-for="(group, group_index) in schedule.new_advice">
|
85
|
|
- <tr v-for="(advice, advice_index) in group.advices" @click="clickfunction(schedule)">
|
86
|
|
- <td v-if="advice_index == 0"
|
87
|
|
- :rowspan="group.advices.length">{{ advice.parent_id == 0 ? schedule.device_number.number : "" }}</td>
|
88
|
|
- <td v-if="advice_index == 0"
|
89
|
|
- :rowspan="group.advices.length" style="color:#409eff;">{{ advice.parent_id == 0 ? schedule.patient.name : "" }}</td>
|
90
|
|
- <td v-if="advice_index == 0"
|
91
|
|
- :rowspan="group.advices.length">{{ advice.parent_id == 0 ? schedule.patient.dialysis_no : "" }}</td>
|
92
|
|
- <td v-if="advice_index == 0"
|
93
|
|
- :rowspan="group.advices.length">{{ getAdaviceType(advice.advice_type,advice.parent_id)}}</td>
|
94
|
|
- <td v-if="advice_index == 0"
|
95
|
|
- :rowspan="group.advices.length">{{ advice.parent_id == 0 ? parseTime(advice.start_time, "{m}-{d} {h}:{i}") : "" }}</td>
|
96
|
|
- <td :class="advice.parent_id == 0 ? 'advice_content' : 'subadvice_content'">
|
97
|
|
- <span >{{advice.advice_name }}</span>
|
98
|
|
- <span >{{advice.advice_desc}}</span>
|
99
|
|
- <span v-if="advice.prescribing_number">{{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
|
100
|
|
- <span v-if="advice.single_dose"> 单次用量 {{advice.single_dose}}{{advice.single_dose_unit}}</span>
|
101
|
|
- <span >{{advice.delivery_way}}</span>
|
102
|
|
- <span >{{advice.execution_frequency}}</span>
|
103
|
|
- <span v-if="advice.parent_id == 0 && advice.remark.length > 0">({{advice.remark}})</span>
|
104
|
|
-
|
105
|
|
- </td>
|
106
|
|
- <td>{{ parseTime(advice.execution_time, "{m}-{d} {h}:{i}") }}</td>
|
107
|
|
- <td>{{ getName(advice.execution_staff) }}</td>
|
108
|
|
- <td>{{ getName(advice.checker) }}</td>
|
109
|
|
- <td>{{ parseTime(advice.check_time, "{m}-{d} {h}:{i}") }}</td>
|
110
|
|
- <td>{{ getName(advice.advice_doctor) }}</td>
|
111
|
|
- <td>{{ parseTime(advice.created_time, "{m}-{d} {h}:{i}")}}</td>
|
|
57
|
+ <div class="blueBorder"></div>
|
|
58
|
+ <table class="table">
|
|
59
|
+ <tr>
|
|
60
|
+ <!--<th width="50px">机号</th>-->
|
|
61
|
+ <th width="50px">姓名</th>
|
|
62
|
+ <th width="50px">透析号</th>
|
|
63
|
+ <th width="50px">期效</th>
|
|
64
|
+ <th width="100px">开始时间</th>
|
|
65
|
+ <th width="200px">医嘱内容</th>
|
|
66
|
+ <th width="50px">执行时间</th>
|
|
67
|
+ <th width="50px">执行护士</th>
|
|
68
|
+ <th width="50px">校对护士</th>
|
|
69
|
+ <th width="100px">校对时间</th>
|
|
70
|
+ <th width="50px">开嘱医生</th>
|
|
71
|
+ <th width="100px">开嘱时间</th>
|
112
|
72
|
|
113
|
73
|
|
|
74
|
+ </tr>
|
|
75
|
+ <template v-for="(schedules, zone_name, index) in filtedScheduals">
|
|
76
|
+ <tr :key="index">
|
|
77
|
+ <td>{{ zone_name }}</td>
|
|
78
|
+ <!--<td></td>-->
|
|
79
|
+ <td></td>
|
|
80
|
+ <td></td>
|
|
81
|
+ <td></td>
|
|
82
|
+ <td></td>
|
|
83
|
+ <td></td>
|
|
84
|
+ <td></td>
|
|
85
|
+ <td></td>
|
|
86
|
+ <td></td>
|
|
87
|
+ <td></td>
|
|
88
|
+ <td></td>
|
114
|
89
|
</tr>
|
115
|
|
- </template>
|
|
90
|
+ <template v-for="(schedule) in schedules">
|
|
91
|
+ <template v-for="(group, group_index) in schedule.new_advice">
|
|
92
|
+ <tr v-for="(advice, advice_index) in group.advices" @click="clickfunction(schedule)">
|
|
93
|
+ <!--<td v-if="advice_index == 0"-->
|
|
94
|
+ <!--:rowspan="group.advices.length">{{ advice.parent_id == 0 ? schedule.device_number.number : "" }}</td>-->
|
|
95
|
+
|
|
96
|
+ <!--<td v-if="advice_index == 0" :rowspan="group.advices.length">{{ advice.parent_id == 0 && advice.dialysis_order&&advice.dialysis_order.device_number&& advice.dialysis_order.device_number.number.length > 0 ? advice.dialysis_order.device_number.number : schedule.device_number.number }}</td>-->
|
|
97
|
+ <!--<td v-if="advice_index == 0" :rowspan="group.advices.length">-->
|
|
98
|
+ <!--{{getNumber(advice,schedule)}}-->
|
|
99
|
+ <!--</td>-->
|
|
100
|
+
|
|
101
|
+ <td v-if="advice_index == 0"
|
|
102
|
+ :rowspan="group.advices.length" style="color:#409eff;">{{ advice.parent_id == 0 ?
|
|
103
|
+ schedule.patient.name : '' }}
|
|
104
|
+ </td>
|
|
105
|
+ <td v-if="advice_index == 0"
|
|
106
|
+ :rowspan="group.advices.length">{{ advice.parent_id == 0 ? schedule.patient.dialysis_no : '' }}
|
|
107
|
+ </td>
|
|
108
|
+ <td v-if="advice_index == 0"
|
|
109
|
+ :rowspan="group.advices.length">{{ getAdaviceType(advice.advice_type,advice.parent_id)}}
|
|
110
|
+ </td>
|
|
111
|
+ <td v-if="advice_index == 0" :rowspan="group.advices.length">{{ advice.parent_id == 0 ? parseTime(advice.start_time, "{m}-{d} {h}:{i}"):''}}
|
|
112
|
+ </td>
|
|
113
|
+ <td :class="advice.parent_id == 0 ? 'advice_content' : 'subadvice_content'">
|
|
114
|
+ <span>{{advice.advice_name }}</span>
|
|
115
|
+ <span>{{advice.advice_desc}}</span>
|
|
116
|
+ <span
|
|
117
|
+ v-if="advice.prescribing_number">{{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
|
|
118
|
+ <span v-if="advice.single_dose"> 单次用量 {{advice.single_dose}}{{advice.single_dose_unit}}</span>
|
|
119
|
+ <span>{{advice.delivery_way}}</span>
|
|
120
|
+ <span>{{advice.execution_frequency}}</span>
|
|
121
|
+ <span v-if="advice.parent_id == 0 && advice.remark.length > 0">({{advice.remark}})</span>
|
|
122
|
+
|
|
123
|
+ </td>
|
|
124
|
+ <td>{{ parseTime(advice.execution_time, '{m}-{d} {h}:{i}') }}</td>
|
|
125
|
+ <td>{{ getName(advice.execution_staff) }}</td>
|
|
126
|
+ <td>{{ getName(advice.checker) }}</td>
|
|
127
|
+ <td>{{ parseTime(advice.check_time, '{m}-{d} {h}:{i}') }}</td>
|
|
128
|
+ <td>{{ getName(advice.advice_doctor) }}</td>
|
|
129
|
+ <td>{{ parseTime(advice.created_time, '{m}-{d} {h}:{i}')}}</td>
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+ </tr>
|
|
133
|
+ </template>
|
116
|
134
|
|
|
135
|
+ </template>
|
117
|
136
|
</template>
|
118
|
|
- </template>
|
119
|
|
- </table>
|
120
|
|
- <div class="NoData" v-show="zones.length <= 1"><img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/data.jpg" alt=""></div>
|
|
137
|
+ </table>
|
|
138
|
+ <div class="NoData" v-show="zones.length <= 1"><img style="margin-top: 50px; margin-bottom: 50px"
|
|
139
|
+ src="@/assets/login/data.jpg" alt=""></div>
|
121
|
140
|
|
122
|
141
|
</div>
|
123
|
142
|
|
124
|
|
- <mt-datetime-picker
|
125
|
|
- v-model="selected_date"
|
126
|
|
- type="date"
|
127
|
|
- ref="picker"
|
128
|
|
- year-format="{value} "
|
129
|
|
- month-format="{value} "
|
130
|
|
- date-format="{value} "
|
131
|
|
- @confirm="requestSchedualDoctors">
|
132
|
|
- </mt-datetime-picker>
|
|
143
|
+ <mt-datetime-picker
|
|
144
|
+ v-model="selected_date"
|
|
145
|
+ type="date"
|
|
146
|
+ ref="picker"
|
|
147
|
+ year-format="{value} "
|
|
148
|
+ month-format="{value} "
|
|
149
|
+ date-format="{value} "
|
|
150
|
+ @confirm="requestSchedualDoctors">
|
|
151
|
+ </mt-datetime-picker>
|
133
|
152
|
</div>
|
134
|
153
|
</template>
|
135
|
154
|
|
136
|
155
|
<script>
|
137
|
|
-import SideBar from "@/pages/layout/SideBar";
|
138
|
|
-import { parseTime } from "@/utils";
|
139
|
|
-import { getSchedualDoctors } from "@/api/advice";
|
140
|
|
-
|
141
|
|
-export default {
|
142
|
|
- name: "DialysisAdviceTable",
|
143
|
|
- components: {
|
144
|
|
- SideBar
|
145
|
|
- },
|
146
|
|
- data() {
|
147
|
|
- return {
|
148
|
|
- selected_date: new Date(),
|
149
|
|
- admin_user: [],
|
150
|
|
-
|
151
|
|
- show_sch_type_selector: false,
|
152
|
|
- schedule_type_selected: 0,
|
153
|
|
- schedule_types: [
|
154
|
|
- { value: 0, text: "全部班次" },
|
155
|
|
- { value: 1, text: "上午" },
|
156
|
|
- { value: 2, text: "下午" },
|
157
|
|
- { value: 3, text: "晚上" }
|
158
|
|
- ],
|
159
|
|
-
|
160
|
|
- show_zone_selector: false,
|
161
|
|
- zone_selected: 0,
|
162
|
|
- show_patient_type_selector: false,
|
163
|
|
- zones: [{ value: 0, text: "全部分区", select: true }],
|
164
|
|
-
|
165
|
|
- show_advice_type_selector: false,
|
166
|
|
- advice_type_selected: 0,
|
167
|
|
- advice_types: [
|
168
|
|
- { value: 0, text: "全部医嘱" },
|
169
|
|
- { value: 1, text: "长期医嘱" },
|
170
|
|
- { value: 3, text: "临时医嘱" }
|
171
|
|
- ],
|
172
|
|
-
|
173
|
|
- patient_types: [
|
174
|
|
- { value: 0, text: "全部病人" },
|
175
|
|
- { value: 1, text: "我的病人" },
|
176
|
|
- { value: 2, text: "未执行病人" }
|
177
|
|
- ],
|
178
|
|
- patient_selected: 0,
|
179
|
|
-
|
180
|
|
- scheduleMap: {}
|
181
|
|
- };
|
182
|
|
- },
|
183
|
|
- computed: {
|
184
|
|
- selected_date_str: function() {
|
185
|
|
- return parseTime(this.selected_date, "{y}-{m}-{d}");
|
|
156
|
+ import SideBar from '@/pages/layout/SideBar'
|
|
157
|
+ import {parseTime} from '@/utils'
|
|
158
|
+ import {getSchedualDoctors} from '@/api/advice'
|
|
159
|
+
|
|
160
|
+ export default {
|
|
161
|
+ name: 'DialysisAdviceTable',
|
|
162
|
+ components: {
|
|
163
|
+ SideBar
|
186
|
164
|
},
|
187
|
|
- filtedScheduals: function() {
|
188
|
|
- var scheduleMap = new Object();
|
189
|
|
- if (this.zone_selected == 0) {
|
190
|
|
- for (const key in this.scheduleMap) {
|
191
|
|
- scheduleMap[key] = this.scheduleMap[key];
|
192
|
|
- }
|
193
|
|
- } else {
|
194
|
|
- var zone_name = this.zones[this.zone_selected].text;
|
195
|
|
- scheduleMap[zone_name] = this.scheduleMap[zone_name];
|
|
165
|
+ data () {
|
|
166
|
+ return {
|
|
167
|
+ selected_date: new Date(),
|
|
168
|
+ admin_user: [],
|
|
169
|
+
|
|
170
|
+ show_sch_type_selector: false,
|
|
171
|
+ schedule_type_selected: 0,
|
|
172
|
+ schedule_types: [
|
|
173
|
+ {value: 0, text: '全部班次'},
|
|
174
|
+ {value: 1, text: '上午'},
|
|
175
|
+ {value: 2, text: '下午'},
|
|
176
|
+ {value: 3, text: '晚上'}
|
|
177
|
+ ],
|
|
178
|
+
|
|
179
|
+ show_zone_selector: false,
|
|
180
|
+ zone_selected: 0,
|
|
181
|
+ show_patient_type_selector: false,
|
|
182
|
+ zones: [{value: 0, text: '全部分区', select: true}],
|
|
183
|
+
|
|
184
|
+ show_advice_type_selector: false,
|
|
185
|
+ advice_type_selected: 0,
|
|
186
|
+ advice_types: [
|
|
187
|
+ {value: 0, text: '全部医嘱'},
|
|
188
|
+ {value: 1, text: '长期医嘱'},
|
|
189
|
+ {value: 3, text: '临时医嘱'}
|
|
190
|
+ ],
|
|
191
|
+
|
|
192
|
+ patient_types: [
|
|
193
|
+ {value: 0, text: '全部病人'},
|
|
194
|
+ {value: 1, text: '我的病人'},
|
|
195
|
+ {value: 2, text: '未执行病人'}
|
|
196
|
+ ],
|
|
197
|
+ patient_selected: 0,
|
|
198
|
+
|
|
199
|
+ scheduleMap: {}
|
196
|
200
|
}
|
|
201
|
+ },
|
|
202
|
+ computed: {
|
|
203
|
+ selected_date_str: function () {
|
|
204
|
+ return parseTime(this.selected_date, '{y}-{m}-{d}')
|
|
205
|
+ },
|
|
206
|
+ filtedScheduals: function () {
|
|
207
|
+ var scheduleMap = new Object()
|
|
208
|
+ if (this.zone_selected == 0) {
|
|
209
|
+ for (const key in this.scheduleMap) {
|
|
210
|
+ scheduleMap[key] = this.scheduleMap[key]
|
|
211
|
+ }
|
|
212
|
+ } else {
|
|
213
|
+ var zone_name = this.zones[this.zone_selected].text
|
|
214
|
+ scheduleMap[zone_name] = this.scheduleMap[zone_name]
|
|
215
|
+ }
|
197
|
216
|
|
198
|
|
- if (this.schedule_type_selected != 0) {
|
199
|
|
- var _scheduleMap = {};
|
200
|
|
- for (const key in scheduleMap) {
|
201
|
|
- var origin_schedules = scheduleMap[key];
|
202
|
|
- var schedules = [];
|
203
|
|
- for (let index = 0; index < origin_schedules.length; index++) {
|
204
|
|
- const schedule = origin_schedules[index];
|
205
|
|
- if (schedule.schedule_type == this.schedule_type_selected) {
|
206
|
|
- schedules.push(schedule);
|
|
217
|
+ if (this.schedule_type_selected != 0) {
|
|
218
|
+ var _scheduleMap = {}
|
|
219
|
+ for (const key in scheduleMap) {
|
|
220
|
+ var origin_schedules = scheduleMap[key]
|
|
221
|
+ var schedules = []
|
|
222
|
+ for (let index = 0; index < origin_schedules.length; index++) {
|
|
223
|
+ const schedule = origin_schedules[index]
|
|
224
|
+ if (schedule.schedule_type == this.schedule_type_selected) {
|
|
225
|
+ schedules.push(schedule)
|
|
226
|
+ }
|
|
227
|
+ }
|
|
228
|
+ if (schedules.length > 0) {
|
|
229
|
+ _scheduleMap[key] = schedules
|
207
|
230
|
}
|
208
|
231
|
}
|
209
|
|
- if (schedules.length > 0) {
|
210
|
|
- _scheduleMap[key] = schedules;
|
211
|
|
- }
|
212
|
|
- }
|
213
|
232
|
|
214
|
|
- scheduleMap = _scheduleMap;
|
215
|
|
- }
|
216
|
|
- for(var key in scheduleMap) {
|
217
|
|
- let mapArr = scheduleMap[key]
|
218
|
|
- for (let i = 0; i < mapArr.length; i++) {
|
219
|
|
- mapArr[i]['new_advice'] = []
|
|
233
|
+ scheduleMap = _scheduleMap
|
|
234
|
+ }
|
|
235
|
+ for (var key in scheduleMap) {
|
|
236
|
+ let mapArr = scheduleMap[key]
|
|
237
|
+ for (let i = 0; i < mapArr.length; i++) {
|
|
238
|
+ mapArr[i]['new_advice'] = []
|
|
239
|
+ }
|
220
|
240
|
}
|
221
|
|
- }
|
222
|
241
|
|
223
|
|
- for(var key in scheduleMap) {
|
224
|
|
- let mapArr = scheduleMap[key]
|
225
|
|
- for (let i = 0; i < mapArr.length; i++) {
|
226
|
|
- var maps = mapArr[i]
|
227
|
|
- var resp_advices = maps.doctor_advice
|
228
|
|
- if (resp_advices.length > 0) {
|
229
|
|
- var newGroupObject = function () {
|
230
|
|
- return Object.assign({}, {
|
231
|
|
- group_no: 0,
|
232
|
|
- advices: [],
|
233
|
|
- })
|
234
|
|
- }
|
235
|
|
- var initGroupBlock = function (group, advice) {
|
236
|
|
- group.group_no = advice.groupno
|
237
|
|
- }
|
|
242
|
+ for (var key in scheduleMap) {
|
|
243
|
+ let mapArr = scheduleMap[key]
|
|
244
|
+ for (let i = 0; i < mapArr.length; i++) {
|
|
245
|
+ var maps = mapArr[i]
|
|
246
|
+ var resp_advices = maps.doctor_advice
|
|
247
|
+ if (resp_advices.length > 0) {
|
|
248
|
+ var newGroupObject = function () {
|
|
249
|
+ return Object.assign({}, {
|
|
250
|
+ group_no: 0,
|
|
251
|
+ advices: [],
|
|
252
|
+ })
|
|
253
|
+ }
|
|
254
|
+ var initGroupBlock = function (group, advice) {
|
|
255
|
+ group.group_no = advice.groupno
|
|
256
|
+ }
|
238
|
257
|
|
239
|
|
- var advice_groups = []
|
240
|
|
- var group = newGroupObject()
|
241
|
|
- for (let index = 0; index < resp_advices.length; index++) {
|
242
|
|
- const advice = resp_advices[index];
|
243
|
|
- if (advice.groupno == 0) { // 老版本的医嘱
|
244
|
|
- if (advice.parent_id > 0) {
|
245
|
|
- if (advice_groups.length > 0) {
|
246
|
|
- var parent_group = advice_groups[advice_groups.length - 1]
|
247
|
|
- if (parent_group.advices.length > 0) {
|
248
|
|
- if (parent_group.advices[0].id == advice.parent_id) {
|
249
|
|
- parent_group.advices.push(advice)
|
|
258
|
+ var advice_groups = []
|
|
259
|
+ var group = newGroupObject()
|
|
260
|
+ for (let index = 0; index < resp_advices.length; index++) {
|
|
261
|
+ const advice = resp_advices[index]
|
|
262
|
+ if (advice.groupno == 0) { // 老版本的医嘱
|
|
263
|
+ if (advice.parent_id > 0) {
|
|
264
|
+ if (advice_groups.length > 0) {
|
|
265
|
+ var parent_group = advice_groups[advice_groups.length - 1]
|
|
266
|
+ if (parent_group.advices.length > 0) {
|
|
267
|
+ if (parent_group.advices[0].id == advice.parent_id) {
|
|
268
|
+ parent_group.advices.push(advice)
|
|
269
|
+ }
|
250
|
270
|
}
|
251
|
271
|
}
|
|
272
|
+ continue
|
|
273
|
+
|
|
274
|
+ } else {
|
|
275
|
+ if (group.group_no > 0) {
|
|
276
|
+ advice_groups.push(group)
|
|
277
|
+ group = newGroupObject()
|
|
278
|
+ }
|
|
279
|
+
|
|
280
|
+ initGroupBlock(group, advice)
|
|
281
|
+ group.advices.push(advice)
|
|
282
|
+ advice_groups.push(group)
|
|
283
|
+ group = newGroupObject()
|
|
284
|
+ continue
|
252
|
285
|
}
|
253
|
|
- continue
|
254
|
286
|
|
255
|
287
|
} else {
|
256
|
|
- if (group.group_no > 0) {
|
|
288
|
+ if (group.group_no > 0 && group.group_no != advice.groupno) {
|
257
|
289
|
advice_groups.push(group)
|
258
|
290
|
group = newGroupObject()
|
259
|
291
|
}
|
260
|
|
-
|
261
|
|
- initGroupBlock(group, advice)
|
262
|
|
- group.advices.push(advice)
|
263
|
|
- advice_groups.push(group)
|
264
|
|
- group = newGroupObject()
|
265
|
|
- continue
|
266
|
|
- }
|
267
|
|
-
|
268
|
|
- } else {
|
269
|
|
- if (group.group_no > 0 && group.group_no != advice.groupno) {
|
270
|
|
- advice_groups.push(group)
|
271
|
|
- group = newGroupObject()
|
272
|
|
- }
|
273
|
|
- if (group.group_no == 0) {
|
274
|
|
- initGroupBlock(group, advice)
|
275
|
|
- }
|
276
|
|
- if (group.group_no == advice.groupno) {
|
277
|
|
- group.advices.push(advice)
|
|
292
|
+ if (group.group_no == 0) {
|
|
293
|
+ initGroupBlock(group, advice)
|
|
294
|
+ }
|
|
295
|
+ if (group.group_no == advice.groupno) {
|
|
296
|
+ group.advices.push(advice)
|
|
297
|
+ }
|
278
|
298
|
}
|
279
|
299
|
}
|
|
300
|
+ if (group.group_no > 0) { // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
|
|
301
|
+ advice_groups.push(group)
|
|
302
|
+ }
|
|
303
|
+ advice_groups = advice_groups
|
|
304
|
+ } else {
|
|
305
|
+ advice_groups = []
|
280
|
306
|
}
|
281
|
|
- if (group.group_no > 0) { // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
|
282
|
|
- advice_groups.push(group)
|
283
|
|
- }
|
284
|
|
- advice_groups = advice_groups
|
285
|
|
- } else {
|
286
|
|
- advice_groups = []
|
|
307
|
+ maps.new_advice = advice_groups
|
287
|
308
|
}
|
288
|
|
- maps.new_advice = advice_groups
|
289
|
309
|
}
|
290
|
|
- }
|
291
|
|
-
|
292
|
|
-
|
293
|
|
- console.log(scheduleMap)
|
294
|
310
|
|
|
311
|
+ console.log(scheduleMap)
|
295
|
312
|
|
296
|
|
-
|
297
|
|
- return scheduleMap;
|
298
|
|
- }
|
299
|
|
- },
|
300
|
|
- created() {
|
301
|
|
- this.requestSchedualDoctors();
|
302
|
|
- },
|
303
|
|
- methods: {
|
304
|
|
- clickfunction: function(val) {
|
305
|
|
- // console.log(val);
|
306
|
|
- this.$router.push({
|
307
|
|
- path: "/details",
|
308
|
|
- query: {
|
309
|
|
- patient_id: val.patient.id,
|
310
|
|
- date: this.selected_date.getTime() / 1000,
|
311
|
|
- patient_name: val.patient.name
|
312
|
|
- }
|
313
|
|
- });
|
314
|
|
- },
|
315
|
|
- handlePaitentType: function(index) {
|
316
|
|
- this.patient_selected = index;
|
317
|
|
- this.show_patient_type_selector = false;
|
318
|
|
- this.requestSchedualDoctors();
|
|
313
|
+ return scheduleMap
|
|
314
|
+ }
|
319
|
315
|
},
|
320
|
|
- openPicker() {
|
321
|
|
- this.$refs.picker.open();
|
|
316
|
+ created () {
|
|
317
|
+ this.requestSchedualDoctors()
|
322
|
318
|
},
|
323
|
|
- getAdaviceType(type,parent_id) {
|
324
|
|
- if(parent_id == 0) {
|
325
|
|
- if (type == 1) {
|
326
|
|
- return "长嘱";
|
327
|
|
- } else if (type == 2) {
|
328
|
|
- return "临嘱";
|
329
|
|
- } else if (type == 3) {
|
330
|
|
- return "临嘱";
|
|
319
|
+ methods: {
|
|
320
|
+ // getNumber: function (advice,schedule) {
|
|
321
|
+ // console.log(advice)
|
|
322
|
+ // if (advice.parent_id == 0 ) {
|
|
323
|
+ // if(advice.dialysis_order && advice.dialysis_order.device_number && advice.dialysis_order.device_number.number.length > 0){
|
|
324
|
+ // return advice.dialysis_order.device_number.number
|
|
325
|
+ // }else{
|
|
326
|
+ // return schedule.device_number.number
|
|
327
|
+ // }
|
|
328
|
+ // }
|
|
329
|
+ //
|
|
330
|
+ // },
|
|
331
|
+ clickfunction: function (val) {
|
|
332
|
+ // console.log(val);
|
|
333
|
+ this.$router.push({
|
|
334
|
+ path: '/details',
|
|
335
|
+ query: {
|
|
336
|
+ patient_id: val.patient.id,
|
|
337
|
+ date: this.selected_date.getTime() / 1000,
|
|
338
|
+ patient_name: val.patient.name
|
|
339
|
+ }
|
|
340
|
+ })
|
|
341
|
+ },
|
|
342
|
+ handlePaitentType: function (index) {
|
|
343
|
+ this.patient_selected = index
|
|
344
|
+ this.show_patient_type_selector = false
|
|
345
|
+ this.requestSchedualDoctors()
|
|
346
|
+ },
|
|
347
|
+ openPicker () {
|
|
348
|
+ this.$refs.picker.open()
|
|
349
|
+ },
|
|
350
|
+ getAdaviceType (type, parent_id) {
|
|
351
|
+ if (parent_id == 0) {
|
|
352
|
+ if (type == 1) {
|
|
353
|
+ return '长嘱'
|
|
354
|
+ } else if (type == 2) {
|
|
355
|
+ return '临嘱'
|
|
356
|
+ } else if (type == 3) {
|
|
357
|
+ return '临嘱'
|
|
358
|
+ }
|
331
|
359
|
}
|
332
|
|
- }
|
333
|
|
- },
|
334
|
|
- getName(val) {
|
335
|
|
- console.log(this.admin_user)
|
|
360
|
+ },
|
|
361
|
+ getName (val) {
|
|
362
|
+ console.log(this.admin_user)
|
336
|
363
|
|
337
|
|
- for (let i = 0; i < this.admin_user.length; i++) {
|
338
|
|
- if (this.admin_user[i].id == val) {
|
339
|
|
- return this.admin_user[i].name;
|
|
364
|
+ for (let i = 0; i < this.admin_user.length; i++) {
|
|
365
|
+ if (this.admin_user[i].id == val) {
|
|
366
|
+ return this.admin_user[i].name
|
|
367
|
+ }
|
340
|
368
|
}
|
341
|
|
- }
|
342
|
|
- },
|
343
|
|
- handletimeType: function(index) {
|
344
|
|
- this.schedule_type_selected = index;
|
345
|
|
- this.show_sch_type_selector = false;
|
346
|
|
- },
|
347
|
|
- handleAdviceType: function(index) {
|
348
|
|
- this.advice_type_selected = index;
|
349
|
|
- this.show_advice_type_selector = false;
|
350
|
|
- this.requestSchedualDoctors();
|
351
|
|
- },
|
352
|
|
- handleZoneChange: function(index) {
|
353
|
|
- this.zone_selected = index;
|
354
|
|
- this.show_zone_selector = false;
|
355
|
|
- },
|
356
|
|
- parseTime: function(time, layout) {
|
357
|
|
- // console.log(time);
|
358
|
|
- if (time == 0) {
|
359
|
|
- return "";
|
360
|
|
- }
|
361
|
|
- return parseTime(time, layout);
|
362
|
|
- },
|
363
|
|
- requestSchedualDoctors() {
|
364
|
|
- getSchedualDoctors({
|
365
|
|
- date: this.selected_date_str,
|
366
|
|
- patient_type: this.patient_selected,
|
367
|
|
- advice_type: 2
|
368
|
|
- }).then(rs => {
|
369
|
|
- var resp = rs.data;
|
370
|
|
- if (resp.state == 1) {
|
371
|
|
- this.admin_user = resp.data.adminUser;
|
372
|
|
- var schedules = resp.data.scheduals;
|
373
|
|
- var zoneMap = {};
|
374
|
|
- var scheduleMap = {};
|
375
|
|
- for (let index = 0; index < schedules.length; index++) {
|
376
|
|
- const schedule = schedules[index];
|
377
|
|
- if (schedule.doctor_advice.length == 0) {
|
378
|
|
- continue;
|
379
|
|
- }
|
380
|
|
- if (scheduleMap[schedule.device_number.zone.name] == null) {
|
381
|
|
- scheduleMap[schedule.device_number.zone.name] = [];
|
382
|
|
- }
|
383
|
|
- scheduleMap[schedule.device_number.zone.name].push(schedule);
|
384
|
|
- if (zoneMap[schedule.device_number.zone.name] == null) {
|
385
|
|
- zoneMap[schedule.device_number.zone.name] = schedule.device_number.zone;
|
|
369
|
+ },
|
|
370
|
+ handletimeType: function (index) {
|
|
371
|
+ this.schedule_type_selected = index
|
|
372
|
+ this.show_sch_type_selector = false
|
|
373
|
+ },
|
|
374
|
+ handleAdviceType: function (index) {
|
|
375
|
+ this.advice_type_selected = index
|
|
376
|
+ this.show_advice_type_selector = false
|
|
377
|
+ this.requestSchedualDoctors()
|
|
378
|
+ },
|
|
379
|
+ handleZoneChange: function (index) {
|
|
380
|
+ this.zone_selected = index
|
|
381
|
+ this.show_zone_selector = false
|
|
382
|
+ },
|
|
383
|
+ parseTime: function (time, layout) {
|
|
384
|
+ // console.log(time);
|
|
385
|
+ if (time == 0) {
|
|
386
|
+ return ''
|
|
387
|
+ }
|
|
388
|
+ return parseTime(time, layout)
|
|
389
|
+ },
|
|
390
|
+ requestSchedualDoctors () {
|
|
391
|
+ getSchedualDoctors({
|
|
392
|
+ date: this.selected_date_str,
|
|
393
|
+ patient_type: this.patient_selected,
|
|
394
|
+ advice_type: 2
|
|
395
|
+ }).then(rs => {
|
|
396
|
+ var resp = rs.data
|
|
397
|
+ if (resp.state == 1) {
|
|
398
|
+ this.admin_user = resp.data.adminUser
|
|
399
|
+ var schedules = resp.data.scheduals
|
|
400
|
+ var zoneMap = {}
|
|
401
|
+ var scheduleMap = {}
|
|
402
|
+ for (let index = 0; index < schedules.length; index++) {
|
|
403
|
+ const schedule = schedules[index]
|
|
404
|
+ if (schedule.doctor_advice.length == 0) {
|
|
405
|
+ continue
|
|
406
|
+ }
|
|
407
|
+ if (scheduleMap[schedule.device_number.zone.name] == null) {
|
|
408
|
+ scheduleMap[schedule.device_number.zone.name] = []
|
|
409
|
+ }
|
|
410
|
+ scheduleMap[schedule.device_number.zone.name].push(schedule)
|
|
411
|
+ if (zoneMap[schedule.device_number.zone.name] == null) {
|
|
412
|
+ zoneMap[schedule.device_number.zone.name] = schedule.device_number.zone
|
|
413
|
+ }
|
386
|
414
|
}
|
387
|
|
- }
|
388
|
415
|
|
389
|
|
- var zones = [];
|
390
|
|
- zones.push({ value: 0, text: "全部分区" });
|
391
|
|
- for (var zoneName in zoneMap) {
|
392
|
|
- zones.push({ value: zoneMap[zoneName].id, text: zoneName });
|
393
|
|
- }
|
|
416
|
+ var zones = []
|
|
417
|
+ zones.push({value: 0, text: '全部分区'})
|
|
418
|
+ for (var zoneName in zoneMap) {
|
|
419
|
+ zones.push({value: zoneMap[zoneName].id, text: zoneName})
|
|
420
|
+ }
|
394
|
421
|
|
395
|
|
- zones = zones.sort(function(a, b) {
|
396
|
|
- return a.value > b.value;
|
397
|
|
- });
|
398
|
|
- this.zones = zones;
|
|
422
|
+ zones = zones.sort(function (a, b) {
|
|
423
|
+ return a.value > b.value
|
|
424
|
+ })
|
|
425
|
+ this.zones = zones
|
399
|
426
|
|
400
|
|
- this.scheduleMap = scheduleMap;
|
401
|
|
- } else {
|
402
|
|
- this.$toast({
|
403
|
|
- message: resp.msg
|
404
|
|
- });
|
405
|
|
- }
|
406
|
|
- });
|
407
|
|
- },
|
408
|
|
- adviceDesc(advice) {}
|
|
427
|
+ this.scheduleMap = scheduleMap
|
|
428
|
+ } else {
|
|
429
|
+ this.$toast({
|
|
430
|
+ message: resp.msg
|
|
431
|
+ })
|
|
432
|
+ }
|
|
433
|
+ })
|
|
434
|
+ },
|
|
435
|
+ adviceDesc (advice) {
|
|
436
|
+ }
|
|
437
|
+ }
|
409
|
438
|
}
|
410
|
|
-};
|
411
|
439
|
</script>
|
412
|
440
|
|
413
|
441
|
<style style="stylesheet/scss" lang="scss" scoped>
|
414
|
|
-.top {
|
|
442
|
+ .top {
|
415
|
443
|
.hospital {
|
416
|
|
- width: 2rem;
|
|
444
|
+ width: 2rem;
|
417
|
445
|
}
|
418
|
446
|
.TopTitle {
|
419
|
|
- font-size: 0.36rem;
|
420
|
|
- color: $title-color;
|
421
|
|
- font-weight: normal;
|
|
447
|
+ font-size: 0.36rem;
|
|
448
|
+ color: $title-color;
|
|
449
|
+ font-weight: normal;
|
422
|
450
|
}
|
423
|
451
|
padding: 0.3rem 0.3rem;
|
424
|
452
|
@include display-flex;
|
|
@@ -427,16 +455,16 @@ export default {
|
427
|
455
|
@include justify-content-between;
|
428
|
456
|
border-bottom: 1px #e5e5e5 solid;
|
429
|
457
|
.title {
|
430
|
|
- font-size: 0.3rem;
|
431
|
|
- font-weight: bold;
|
432
|
|
- color: $pgh-color;
|
|
458
|
+ font-size: 0.3rem;
|
|
459
|
+ font-weight: bold;
|
|
460
|
+ color: $pgh-color;
|
433
|
461
|
}
|
434
|
462
|
.iconfont {
|
435
|
|
- font-size: 0.4rem;
|
436
|
|
- color: #a8b3ba;
|
|
463
|
+ font-size: 0.4rem;
|
|
464
|
+ color: #a8b3ba;
|
|
465
|
+ }
|
437
|
466
|
}
|
438
|
|
-}
|
439
|
|
-.search {
|
|
467
|
+ .search {
|
440
|
468
|
background: #ebf1f7;
|
441
|
469
|
border-radius: 30px;
|
442
|
470
|
padding: 0 0.3rem;
|
|
@@ -445,17 +473,17 @@ export default {
|
445
|
473
|
color: #a8b3ba;
|
446
|
474
|
|
447
|
475
|
.iconfont {
|
448
|
|
- color: #a8b3ba;
|
449
|
|
- font-size: 0.28rem;
|
|
476
|
+ color: #a8b3ba;
|
|
477
|
+ font-size: 0.28rem;
|
450
|
478
|
}
|
451
|
479
|
.searchInput {
|
452
|
|
- font-size: 0.28rem;
|
453
|
|
- border: none;
|
454
|
|
- outline: none;
|
455
|
|
- background: #ebf1f7;
|
|
480
|
+ font-size: 0.28rem;
|
|
481
|
+ border: none;
|
|
482
|
+ outline: none;
|
|
483
|
+ background: #ebf1f7;
|
|
484
|
+ }
|
456
|
485
|
}
|
457
|
|
-}
|
458
|
|
-.choice {
|
|
486
|
+ .choice {
|
459
|
487
|
border-bottom: 1px #e5e5e5 solid;
|
460
|
488
|
position: fixed;
|
461
|
489
|
top: 63px;
|
|
@@ -464,39 +492,39 @@ export default {
|
464
|
492
|
left: 1.58rem;
|
465
|
493
|
background: #fff;
|
466
|
494
|
ul {
|
467
|
|
- @include display-flex;
|
468
|
|
- @include align-items-center;
|
469
|
|
- @include text-align;
|
470
|
|
- @include justify-content-between;
|
471
|
|
- width: 70%;
|
472
|
|
- margin: 0 auto;
|
473
|
|
- font-size: 0.32rem;
|
474
|
|
- color: $pgh-color;
|
475
|
|
- li {
|
476
|
|
- @include display-flex;
|
477
|
|
- @include align-items-center;
|
478
|
|
- @include text-align;
|
479
|
|
- @include justify-content-between;
|
480
|
|
- padding: 0.3rem 0;
|
481
|
|
- font-size: 0.32rem;
|
482
|
|
- .iconfont {
|
483
|
|
- margin: 0 0.1rem;
|
484
|
|
- }
|
485
|
|
- .line {
|
486
|
|
- background: #a8b3ba;
|
487
|
|
- width: 0.2rem;
|
488
|
|
- height: 1px;
|
489
|
|
- margin: 0 0.2rem;
|
490
|
|
- display: inline-block;
|
491
|
|
- }
|
492
|
|
- }
|
|
495
|
+ @include display-flex;
|
|
496
|
+ @include align-items-center;
|
|
497
|
+ @include text-align;
|
|
498
|
+ @include justify-content-between;
|
|
499
|
+ width: 70%;
|
|
500
|
+ margin: 0 auto;
|
|
501
|
+ font-size: 0.32rem;
|
|
502
|
+ color: $pgh-color;
|
|
503
|
+ li {
|
|
504
|
+ @include display-flex;
|
|
505
|
+ @include align-items-center;
|
|
506
|
+ @include text-align;
|
|
507
|
+ @include justify-content-between;
|
|
508
|
+ padding: 0.3rem 0;
|
|
509
|
+ font-size: 0.32rem;
|
|
510
|
+ .iconfont {
|
|
511
|
+ margin: 0 0.1rem;
|
493
|
512
|
}
|
494
|
|
-}
|
495
|
|
-.DialysisAdvice{
|
|
513
|
+ .line {
|
|
514
|
+ background: #a8b3ba;
|
|
515
|
+ width: 0.2rem;
|
|
516
|
+ height: 1px;
|
|
517
|
+ margin: 0 0.2rem;
|
|
518
|
+ display: inline-block;
|
|
519
|
+ }
|
|
520
|
+ }
|
|
521
|
+ }
|
|
522
|
+ }
|
|
523
|
+ .DialysisAdvice{
|
496
|
524
|
padding-top:115px;
|
497
|
525
|
background: #fff;
|
498
|
526
|
min-height: calc(100vh - 2px);
|
499
|
|
-}
|
|
527
|
+ }
|
500
|
528
|
|
501
|
529
|
|
502
|
530
|
.advice_content {
|