|
@@ -17,25 +17,22 @@
|
17
|
17
|
<el-container class="newContainer">
|
18
|
18
|
<div style="width:270px;margin-right:20px;">
|
19
|
19
|
<div class="cell clearfix" style="margin-bottom:10px;">
|
20
|
|
- <el-input size="small" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
|
|
20
|
+ <el-input size="small" v-model.trim="search_input" class="filter-item"/>
|
21
|
21
|
<el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
|
22
|
22
|
</div>
|
23
|
|
- <el-table ref="tab" @row-click="changePatient" highlight-current-row :data="tableData" height="480" border style="width: 100%">
|
24
|
|
- <el-table-column prop="date" label="患者">
|
25
|
|
- <template slot-scope="scope">
|
26
|
|
- {{ scope.row.patient.name }}
|
27
|
|
- </template>
|
|
23
|
+ <el-table ref="tab" @current-change="changePatient" highlight-current-row :data="patientTableData"
|
|
24
|
+ height="480" border style="width: 100%">
|
|
25
|
+ <el-table-column prop="date" label="患者">
|
|
26
|
+ <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template>
|
28
|
27
|
</el-table-column>
|
29
|
|
- <el-table-column prop="name" label="透析号">
|
30
|
|
- <template slot-scope="scope">
|
31
|
|
- {{ scope.row.patient.dialysis_no }}
|
32
|
|
- </template>
|
|
28
|
+ <el-table-column prop="name" label="就诊号">
|
|
29
|
+ <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
|
33
|
30
|
</el-table-column>
|
34
|
31
|
</el-table>
|
35
|
32
|
</div>
|
36
|
33
|
|
37
|
34
|
<div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px">
|
38
|
|
- <printOne v-bind:childResponse="childResponse"></printOne>
|
|
35
|
+ <printOne v-bind:childResponse="childResponse" :advicePrint="advicePrint" :patient="patient" :hisPatient="hisPatient"></printOne>
|
39
|
36
|
</div>
|
40
|
37
|
</el-container>
|
41
|
38
|
</div>
|
|
@@ -44,18 +41,16 @@
|
44
|
41
|
|
45
|
42
|
<script>
|
46
|
43
|
|
47
|
|
-import {
|
48
|
|
- getDialysisRecordInitData,
|
49
|
|
- getDialysisSchedules
|
50
|
|
-} from "@/api/dialysis_record";
|
|
44
|
+
|
51
|
45
|
import { parseTime } from "@/utils";
|
52
|
46
|
import { getDialysisRecord } from "@/api/dialysis";
|
53
|
47
|
import { getDataConfig } from "@/utils/data";
|
54
|
48
|
import { jsGetAge, uParseTime } from "@/utils/tools";
|
55
|
|
-// import LabelBox from "./printItem/LabelBox";
|
|
49
|
+
|
56
|
50
|
import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
57
|
51
|
import print from "print-js";
|
58
|
52
|
import printOne from "./template/printOne"
|
|
53
|
+import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
|
59
|
54
|
export default {
|
60
|
55
|
name: "dialysisPrintOrder",
|
61
|
56
|
components: {
|
|
@@ -64,856 +59,85 @@ export default {
|
64
|
59
|
},
|
65
|
60
|
data() {
|
66
|
61
|
return {
|
67
|
|
- crumbs: [
|
68
|
|
- { path: false, name: "透析管理" },
|
69
|
|
- { path: false, name: "打印单" }
|
70
|
|
- ],
|
71
|
|
- childResponse: {},
|
72
|
|
- operators: [],
|
73
|
|
- adminUser: [],
|
74
|
|
- check: {},
|
75
|
|
- dialysisOrder: {
|
76
|
|
- DeviceNumber: []
|
77
|
|
- },
|
78
|
|
- operatorMaps: {},
|
79
|
|
- complications: [
|
80
|
|
- "低血压",
|
81
|
|
- "高血压",
|
82
|
|
- "心律失常",
|
83
|
|
- "头晕",
|
84
|
|
- "头痛",
|
85
|
|
- "呕吐",
|
86
|
|
- "抽搐",
|
87
|
|
- "出血",
|
88
|
|
- "心衰",
|
89
|
|
- "腹痛"
|
90
|
|
- ],
|
91
|
|
- jilurow: 0,
|
92
|
|
- advice_jilurow: 0,
|
93
|
|
- loading: false,
|
94
|
|
- orgname: "",
|
95
|
|
- patientInfo_gender_1: false,
|
96
|
|
- patientInfo_gender_2: false,
|
97
|
|
- patientInfo_source_2: false,
|
98
|
|
- patientInfo_source_1: false,
|
99
|
|
- modeOptions: {},
|
100
|
|
- replacementWays: [],
|
101
|
|
- perfusionApparatus: [],
|
102
|
|
- anticoagulantsConfit: {},
|
103
|
|
- bloodAccessParOpera: {},
|
104
|
|
- dialysateFormulationOptions: {},
|
105
|
|
-
|
106
|
|
- queryParams: {
|
107
|
|
- xtdate: "",
|
108
|
|
- xtno: ""
|
109
|
|
- },
|
110
|
|
- patientInfo: {
|
111
|
|
- birth: "",
|
112
|
|
- age: "",
|
113
|
|
- DialysisSchedule: {
|
114
|
|
- device_number: { number: "" },
|
115
|
|
- device_zone: { name: "" }
|
116
|
|
- },
|
117
|
|
- gender: 0
|
118
|
|
- },
|
119
|
|
- predialysis: {
|
120
|
|
- score: "",
|
121
|
|
- internal_fistula: "",
|
122
|
|
- internal_fistula_skin: "",
|
123
|
|
- catheter: "",
|
124
|
|
- blood_access_part_opera_name: ""
|
125
|
|
- },
|
126
|
|
- afterdialysis: {
|
127
|
|
- complications_index: ""
|
128
|
|
- },
|
129
|
|
- prescription: {
|
130
|
|
- dialysate_formulation_name: "",
|
131
|
|
- device: {}
|
132
|
|
- },
|
133
|
|
- advices: [],
|
134
|
|
- users: [],
|
135
|
|
- monitors: [],
|
136
|
|
- summary: {},
|
137
|
|
- receiverTreatmentAccess: {},
|
138
|
|
- org_template_info: {},
|
139
|
|
-
|
140
|
|
- doctor_advices: [],
|
141
|
|
- advice_groups: [],
|
142
|
|
-
|
143
|
|
- AlPanel: {
|
144
|
|
- id: 0,
|
145
|
|
- name: "",
|
146
|
|
- type: 1,
|
147
|
|
- shouji: 2,
|
148
|
|
- weichi: 2,
|
149
|
|
- zongliang: 2,
|
150
|
|
- gaimingcheng: -1,
|
151
|
|
- gaijiliang: -1,
|
152
|
|
- shouji_unit: "mg",
|
153
|
|
- weichi_unit: "mg/h",
|
154
|
|
- zongliang_unit: "mg",
|
155
|
|
- gaimingcheng_unit: "",
|
156
|
|
- gaijiliang_unit: ""
|
157
|
|
- },
|
158
|
|
-
|
159
|
|
-
|
160
|
|
- //
|
161
|
|
- tableData: [],
|
162
|
|
- selected_date: new Date(),
|
163
|
|
- // search_input 和 search_keyword,使输入关键字时不会经常刷新 filtedSchedules
|
164
|
|
- search_keyword: '', // 确定用于搜索的关键字
|
165
|
|
- search_input: '', // 输入中的关键字
|
166
|
|
- patient_state:[
|
167
|
|
- {value: 0,label: '全部'},
|
168
|
|
- {value: 1,label: '已签到'},
|
169
|
|
- {value: 2,label: '未签到'},
|
170
|
|
- {value: 3,label: '已上机'},
|
171
|
|
- {value: 4,label: '已下机'},
|
172
|
|
- ],
|
173
|
|
- patientStateVal: 0,
|
174
|
|
- treat_state:[
|
175
|
|
- {value: 0,label: '全部'},
|
176
|
|
- {value: 1,label: '待开处方'},
|
177
|
|
- {value: 2,label: '待开小结'},
|
178
|
|
- ],
|
179
|
|
- treatStateVal: 0,
|
180
|
|
- schedule_options:[
|
181
|
|
- {value: 0,label: '全部'},
|
182
|
|
- {value: 1,label: '上午'},
|
183
|
|
- {value: 2,label: '下午'},
|
184
|
|
- {value: 3,label: '晚上'},
|
185
|
|
- ],
|
186
|
|
- scheduleStateVal: 0,
|
187
|
|
- zone_options:[
|
188
|
|
- { id: 0, text: '全部' }
|
189
|
|
- ],
|
190
|
|
- zoneVal:0,
|
|
62
|
+ record_date:"",
|
|
63
|
+ patientTableData:[],
|
|
64
|
+ advicePrint:[],
|
|
65
|
+ hisPatient:{},
|
|
66
|
+ patient:{}
|
191
|
67
|
};
|
192
|
68
|
},
|
193
|
|
- methods: {
|
194
|
|
- getAdminUser(id) {
|
195
|
|
- if (id == 0) {
|
196
|
|
- return "";
|
197
|
|
- }
|
198
|
|
- if (id == undefined) {
|
199
|
|
- return "";
|
200
|
|
- }
|
201
|
|
- for (let i = 0; i < this.adminUser.length; i++) {
|
202
|
|
- if (this.adminUser[i].id == id) {
|
203
|
|
- return this.adminUser[i].name;
|
204
|
|
- }
|
205
|
|
- }
|
206
|
|
- },
|
207
|
|
- getTime(value, temp) {
|
208
|
|
- if (value == 0) {
|
209
|
|
- return "";
|
210
|
|
- }
|
211
|
|
- if (value != undefined) {
|
212
|
|
- return uParseTime(value, temp);
|
213
|
|
- }
|
214
|
|
- return "";
|
215
|
|
- },
|
216
|
|
- printThisPage() {
|
217
|
|
- var ptime = Math.round(new Date().getTime() / 1000);
|
218
|
|
- this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
|
219
|
|
-
|
220
|
|
- const style =
|
221
|
|
- '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:10px;line-height: 1px; padding:0 10px;}.infoTitle p{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain p{width: 50%;line-height: 1px;}.prescriptionBox{padding:0 10px;height:750px;}.Rp{font-size: 22px;font-weight: bold;line-height:1px;}.drugsBox{padding-left: 40px;margin-bottom: 10px;margin-bottom: 10px;}.drugsBox p{line-height: 1px;padding-bottom:10px !important;} .drugsOne{line-height: 1px;margin-bottom:10px !important;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; line-height: 1px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; line-height: 1px; padding:0 10px;} .actionBar p{width:150px;}}';
|
222
|
|
- printJS({
|
223
|
|
- printable: "prescription-print",
|
224
|
|
- type: "html",
|
225
|
|
- style: style,
|
226
|
|
- scanStyles: false
|
227
|
|
- });
|
228
|
|
-
|
229
|
|
- // if (this.org_template_info.template_id == 1) {
|
230
|
|
- // printJS({
|
231
|
|
- // printable: "dialysis-print-box",
|
232
|
|
- // type: "html",
|
233
|
|
- // style: style,
|
234
|
|
- // scanStyles: false
|
235
|
|
- // });
|
236
|
|
- // }
|
237
|
|
- },
|
238
|
|
-
|
239
|
|
- getNumber() {
|
240
|
|
- if (this.dialysisOrder != null) {
|
241
|
|
- return (
|
242
|
|
- this.patientInfo.DialysisSchedule.device_zone.name +
|
243
|
|
- this.dialysisOrder.DeviceNumber.number
|
244
|
|
- );
|
245
|
|
- } else {
|
246
|
|
- return (
|
247
|
|
- this.patientInfo.DialysisSchedule.device_zone.name +
|
248
|
|
- this.patientInfo.DialysisSchedule.device_number.number
|
249
|
|
- );
|
250
|
|
- }
|
251
|
|
- },
|
252
|
|
-
|
253
|
|
- getXuserName(id) {
|
254
|
|
- if (id <= 0) {
|
255
|
|
- return "";
|
256
|
|
- }
|
257
|
|
- var name = "";
|
258
|
|
- if (this.users == null || typeof this.users.length === "undefined") {
|
259
|
|
- return name;
|
260
|
|
- }
|
261
|
|
- var leng = this.users.length;
|
262
|
|
- if (leng == 0) {
|
263
|
|
- return name;
|
264
|
|
- }
|
265
|
|
- for (let index = 0; index < leng; index++) {
|
266
|
|
- if (this.users[index].id == id) {
|
267
|
|
- name = this.users[index].name;
|
268
|
|
- break;
|
269
|
|
- }
|
270
|
|
- }
|
271
|
|
- return name;
|
272
|
|
- },
|
273
|
|
- setAdminUserES(id) {
|
274
|
|
- console.log(id);
|
275
|
|
- if (id == 0) {
|
276
|
|
- return "";
|
277
|
|
- }
|
278
|
|
- if (id in this.operatorMaps) {
|
279
|
|
- return this.operatorMaps[id].url;
|
280
|
|
- } else {
|
281
|
|
- return "";
|
282
|
|
- }
|
283
|
|
- },
|
284
|
|
- modeName(mode_id) {
|
285
|
|
- return typeof this.modeOptions[mode_id] !== "undefined" &&
|
286
|
|
- typeof this.modeOptions[mode_id].name !== "undefined"
|
287
|
|
- ? this.modeOptions[mode_id].name
|
288
|
|
- : "";
|
|
69
|
+ methods:{
|
|
70
|
+ getAllDoctorList(){
|
|
71
|
+ getAllDoctorList().then(response=>{
|
|
72
|
+ if(response.data.state == 1){
|
|
73
|
+ var doctor = response.data.data.doctor
|
|
74
|
+
|
|
75
|
+ this.doctorList = doctor
|
|
76
|
+ }
|
|
77
|
+ })
|
|
78
|
+ },
|
|
79
|
+ getAllHisPatientList(){
|
|
80
|
+ const params = {
|
|
81
|
+ record_date:this.record_date
|
|
82
|
+ }
|
|
83
|
+ getAllHisPatientList(params).then(response=>{
|
|
84
|
+ if(response.data.state == 1){
|
|
85
|
+ this.patientTableData = response.data.data.list
|
|
86
|
+ this.patientTableDataTwo = response.data.data.list
|
|
87
|
+
|
|
88
|
+ console.log('222', this.patientTableData)
|
|
89
|
+ let cal_one = 0
|
|
90
|
+ let cal_two = 0
|
|
91
|
+ for (let i = 0; i < response.data.data.list.length; i++) {
|
|
92
|
+ if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
|
|
93
|
+ cal_one = cal_one + 1
|
|
94
|
+ }
|
|
95
|
+ if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
|
|
96
|
+ cal_two = cal_two + 1
|
|
97
|
+ }
|
|
98
|
+ }
|
|
99
|
+ this.$refs.tab.setCurrentRow(this.patientTableData[0])
|
|
100
|
+ console.log(this.patientTableData[0])
|
|
101
|
+ this.choosePatient(this.patientTableData[0])
|
|
102
|
+ this.cal_one = cal_one
|
|
103
|
+ this.cal_two = cal_two
|
|
104
|
+ }
|
|
105
|
+ })
|
289
|
106
|
},
|
290
|
|
- getDialysisRecord() {
|
291
|
|
- this.loading = true;
|
292
|
|
-
|
293
|
|
- getDialysisRecord(this.queryParams).then(response => {
|
294
|
|
- if (response.data.state == 1) {
|
295
|
|
- this.childResponse = response;
|
296
|
|
- this.org_template_info = response.data.data.org_template_info;
|
297
|
|
- this.loading = false;
|
298
|
|
- // this.adminUser = response.data.data.users
|
299
|
|
- // this.users = response.data.data.users
|
300
|
|
- // this.patientInfo = response.data.data.patientInfo
|
301
|
|
- // this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
|
302
|
|
- // // this.patientInfo.age = jsGetAge(this.patientInfo.birth, '-')
|
303
|
|
- // if (response.data.data.patientInfo.first_dialysis_date != 0) {
|
304
|
|
- // this.patientInfo.first_dialysis_date = uParseTime(response.data.data.patientInfo.first_dialysis_date, '{y}-{m}-{d}')
|
305
|
|
- // } else {
|
306
|
|
- // this.patientInfo.first_dialysis_date = ''
|
307
|
|
- // }
|
308
|
|
- // this.check = response.data.data.check
|
309
|
|
- // this.predialysis = response.data.data.PredialysisEvaluation
|
310
|
|
- // this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(this.predialysis.blood_access_part_opera_id)
|
311
|
|
- // this.afterdialysis = response.data.data.AssessmentAfterDislysis
|
312
|
|
- // this.operators = response.data.data.operators
|
313
|
|
- // this.dialysisOrder = response.data.data.dialysisOrder === null ? null : response.data.data.dialysisOrder
|
314
|
|
-
|
315
|
|
- // if (this.operators.length > 0) {
|
316
|
|
- // var operatorsLen = this.operators.length
|
317
|
|
- // for (var index = 0; index < operatorsLen; index++) {
|
318
|
|
- // this.$set(this.operatorMaps, this.operators[index].creator, this.operators[index])
|
319
|
|
- // }
|
320
|
|
- // }
|
321
|
|
-
|
322
|
|
- // this.afterdialysis.txqnx = -1
|
323
|
|
- // if (this.afterdialysis.cruor.indexOf('0度') > -1) {
|
324
|
|
- // this.afterdialysis.txqnx = 0
|
325
|
|
- // }
|
326
|
|
- // if (this.afterdialysis.cruor.indexOf('Ⅰ度') > -1) {
|
327
|
|
- // this.afterdialysis.txqnx = 1
|
328
|
|
- // }
|
329
|
|
- // if (this.afterdialysis.cruor.indexOf('Ⅱ度') > -1) {
|
330
|
|
- // this.afterdialysis.txqnx = 2
|
331
|
|
- // }
|
332
|
|
- // if (this.afterdialysis.cruor.indexOf('Ⅲ度') > -1) {
|
333
|
|
- // this.afterdialysis.txqnx = 3
|
334
|
|
- // }
|
335
|
|
-
|
336
|
|
- // this.afterdialysis.complications = this.afterdialysis.complication.split(',')
|
337
|
|
- // this.afterdialysis.complications_other = []
|
338
|
|
- // this.afterdialysis.complications_index = []
|
339
|
|
- // var acllen = this.afterdialysis.complications.length
|
340
|
|
- // for (let index = 0; index < acllen; index++) {
|
341
|
|
- // if (this.complications.indexOf(this.afterdialysis.complications[index]) >= 0) {
|
342
|
|
- // this.afterdialysis.complications_index.push(this.afterdialysis.complications[index])
|
343
|
|
- // } else if (this.complications.indexOf(this.afterdialysis.complications[index]) < 0 && this.afterdialysis.complications_other.indexOf(this.afterdialysis.complications[index]) < 0) {
|
344
|
|
- // this.afterdialysis.complications_other.push(this.afterdialysis.complications[index])
|
345
|
|
- // }
|
346
|
|
- // }
|
347
|
|
- // this.afterdialysis.complications_other = this.afterdialysis.complications_other.join(',')
|
348
|
|
-
|
349
|
|
- // this.prescription = response.data.data.dialysisPrescription
|
350
|
|
- // this.receiverTreatmentAccess = response.data.data.receiverTreatmentAccess
|
351
|
|
-
|
352
|
|
- // this.prescription.mode = this.modeName(this.prescription.mode_id)
|
353
|
|
- // var rwLen = this.replacementWays.length
|
354
|
|
- // this.prescription.replacement = ''
|
355
|
|
- // for (let index = 0; index < rwLen; index++) {
|
356
|
|
- // if (this.replacementWays[index].id == this.prescription.replacement_way) {
|
357
|
|
- // this.prescription.replacement = this.replacementWays[index].name
|
358
|
|
- // break
|
359
|
|
- // }
|
360
|
|
- // }
|
361
|
|
-
|
362
|
|
- // this.prescription.dialysate_formulation_name = this.dialysateFormulationName(this.prescription.dialysate_formulation)
|
363
|
|
-
|
364
|
|
- // var paLen = this.perfusionApparatus.length
|
365
|
|
- // this.prescription.perfusion_apparatus_name = ''
|
366
|
|
- // for (let index = 0; index < paLen; index++) {
|
367
|
|
- // if (this.perfusionApparatus[index].id == this.prescription.perfusion_apparatus) {
|
368
|
|
- // this.prescription.perfusion_apparatus_name = this.perfusionApparatus[index].name
|
369
|
|
- // break
|
370
|
|
- // }
|
371
|
|
- // }
|
372
|
|
-
|
373
|
|
- // var acLen = this.anticoagulantsConfit.length
|
374
|
|
- // var thisALID = this.prescription.anticoagulant
|
375
|
|
- // this.prescription.anticoagulant_name = ''
|
376
|
|
-
|
377
|
|
- // if (typeof (this.anticoagulantsConfit[thisALID]) !== 'undefined' && this.anticoagulantsConfit[thisALID] != null) {
|
378
|
|
- // this.prescription.anticoagulant_name = this.anticoagulantsConfit[thisALID].name
|
379
|
|
- // this.AlPanel = this.anticoagulantsConfit[thisALID]
|
380
|
|
- // }
|
381
|
|
-
|
382
|
|
- // this.advices = response.data.data.advices
|
383
|
|
- // this.monitors = response.data.data.monitors
|
384
|
|
- // this.summary = response.data.data.summary
|
385
|
|
- // this.org_template_info = response.data.data.org_template_info
|
386
|
|
- // if (this.monitors.length < 8) {
|
387
|
|
- // var nl = 8 - this.monitors.length
|
388
|
|
- // for (let index = 0; index < nl; index++) {
|
389
|
|
- // this.monitors.push([])
|
390
|
|
- // }
|
391
|
|
- // }
|
392
|
|
- // this.jilurow = this.monitors.length + 1
|
393
|
|
-
|
394
|
|
- // this.advice_jilurow = this.advices.length + 1
|
395
|
|
-
|
396
|
|
- // var childMap = {}
|
397
|
|
- // for (const index in this.advices) {
|
398
|
|
- // if (this.advices[index].parent_id == 0) {
|
399
|
|
- // continue
|
400
|
|
- // }
|
401
|
|
- // if (!(this.advices[index].parent_id in childMap)) {
|
402
|
|
- // childMap[this.advices[index].parent_id] = []
|
403
|
|
- // }
|
404
|
|
- // childMap[this.advices[index].parent_id].push(this.advices[index])
|
405
|
|
- // }
|
406
|
|
-
|
407
|
|
- // var advices = []
|
408
|
|
- // for (const index in this.advices) {
|
409
|
|
- // if (this.advices[index].parent_id > 0) {
|
410
|
|
- // continue
|
411
|
|
- // }
|
412
|
|
- // var item = this.advices[index]
|
413
|
|
- // if (item.id in childMap) {
|
414
|
|
- // item.children = childMap[item.id]
|
415
|
|
- // } else {
|
416
|
|
- // item.children = []
|
417
|
|
- // }
|
418
|
|
- // advices.push(item)
|
419
|
|
- // }
|
420
|
|
-
|
421
|
|
- // var leftAdvice = []
|
422
|
|
- // var rightAdvice = []
|
423
|
|
- // var adlen = advices.length
|
424
|
|
-
|
425
|
|
- // var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
|
426
|
|
- // for (var i = 0; i < halfLen; i++) {
|
427
|
|
- // leftAdvice.push(advices[i])
|
428
|
|
- // rightAdvice.push(advices[i + halfLen])
|
429
|
|
- // }
|
430
|
|
- // if (halfLen < 5) {
|
431
|
|
- // var nl = 5 - leftAdvice.length
|
432
|
|
- // for (let index = 0; index < nl; index++) {
|
433
|
|
- // leftAdvice.push([])
|
434
|
|
- // }
|
435
|
|
- // var nl = 5 - rightAdvice.length
|
436
|
|
- // for (let index = 0; index < nl; index++) {
|
437
|
|
- // rightAdvice.push([])
|
438
|
|
- // }
|
439
|
|
- // }
|
440
|
|
-
|
441
|
|
- // this.advices = []
|
442
|
|
- // for (var i = 0; i < halfLen; i++) {
|
443
|
|
- // var item = []
|
444
|
|
- // item.push(leftAdvice[i])
|
445
|
|
- // item.push(rightAdvice[i])
|
446
|
|
- // this.advices.push(item)
|
447
|
|
- // }
|
448
|
|
- // this.loading = false
|
449
|
|
-
|
450
|
|
- // this.doctor_advices = response.data.data.advices == null ? [] : response.data.data.advices
|
451
|
|
-
|
452
|
|
- // for (let index = 0; index < this.doctor_advices.length; index++) {
|
453
|
|
- // this.doctor_advices[index]['isShow'] = 2
|
454
|
|
- // }
|
455
|
107
|
|
456
|
|
- // if (this.doctor_advices.length > 0) {
|
457
|
|
- // var group = this.newAdviceGroupObject()
|
458
|
|
- // var initGroupBlock = function(group, advice) {
|
459
|
|
- // group.group_no = advice.groupno
|
460
|
|
- // }
|
461
|
|
- // for (let index = this.doctor_advices.length - 1; index >= 0; index--) {
|
462
|
|
- // var new_advice_index = 0
|
463
|
|
-
|
464
|
|
- // if ('children' in this.doctor_advices[index] && this.doctor_advices[index].children.length > 0) {
|
465
|
|
- // new_advice_index = index + this.doctor_advices[index].children.length + 1
|
466
|
|
-
|
467
|
|
- // var doctor_advice = {
|
468
|
|
- // delivery_way: this.doctor_advices[index].delivery_way,
|
469
|
|
- // execution_frequency: this.doctor_advices[index].execution_frequency,
|
470
|
|
- // groupno: this.doctor_advices[index].groupno,
|
471
|
|
- // id: this.doctor_advices[index].id,
|
472
|
|
- // parent_id: this.doctor_advices[index].parent_id,
|
473
|
|
- // children: this.doctor_advices[index].children,
|
474
|
|
- // remark: this.doctor_advices[index].remark,
|
475
|
|
- // execution_staff: this.doctor_advices[index].execution_staff,
|
476
|
|
- // checker: this.doctor_advices[index].checker,
|
477
|
|
- // advice_doctor: this.doctor_advices[index].advice_doctor,
|
478
|
|
-
|
479
|
|
- // }
|
480
|
|
- // doctor_advice['isShow'] = 1
|
481
|
|
- // this.doctor_advices.splice(new_advice_index, 0, doctor_advice)
|
482
|
|
- // // this.doctor_advices.push(doctor_advice)
|
483
|
|
- // }
|
484
|
|
- // }
|
485
|
|
-
|
486
|
|
- // for (let index = 0; index < this.doctor_advices.length; index++) {
|
487
|
|
- // const advice = this.doctor_advices[index]
|
488
|
|
- // if (advice.groupno == 0) {
|
489
|
|
- // // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
|
490
|
|
- // if (advice.parent_id > 0) {
|
491
|
|
- // if (this.advice_groups.length > 0) {
|
492
|
|
- // var parent_group = this.advice_groups[
|
493
|
|
- // this.advice_groups.length - 1
|
494
|
|
- // ]
|
495
|
|
- // if (parent_group.advices.length > 0) {
|
496
|
|
- // if (parent_group.advices[0].id == advice.parent_id) {
|
497
|
|
- // parent_group.advices.push(advice)
|
498
|
|
- // }
|
499
|
|
- // }
|
500
|
|
- // }
|
501
|
|
- // continue
|
502
|
|
- // } else {
|
503
|
|
- // if (group.group_no > 0) {
|
504
|
|
- // this.advice_groups.push(group)
|
505
|
|
- // group = this.newAdviceGroupObject()
|
506
|
|
- // }
|
507
|
|
-
|
508
|
|
- // initGroupBlock(group, advice)
|
509
|
|
- // group.advices.push(advice)
|
510
|
|
- // this.advice_groups.push(group)
|
511
|
|
- // group = this.newAdviceGroupObject()
|
512
|
|
- // continue
|
513
|
|
- // }
|
514
|
|
- // }
|
515
|
|
-
|
516
|
|
- // if (group.group_no > 0 && group.group_no != advice.groupno) {
|
517
|
|
- // this.advice_groups.push(group)
|
518
|
|
- // group = this.newAdviceGroupObject()
|
519
|
|
- // }
|
520
|
|
- // if (group.group_no == 0) {
|
521
|
|
- // initGroupBlock(group, advice)
|
522
|
|
- // }
|
523
|
|
- // if (group.group_no == advice.groupno) {
|
524
|
|
- // group.advices.push(advice)
|
525
|
|
- // }
|
526
|
|
- // }
|
527
|
|
- // if (group.group_no > 0) {
|
528
|
|
- // // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
|
529
|
|
- // this.advice_groups.push(group)
|
530
|
|
- // }
|
531
|
|
- // }
|
532
|
|
- // console.log(this.advice_groups)
|
533
|
|
- } else {
|
534
|
|
- this.loading = false;
|
535
|
|
- this.$message.error("请求数据失败");
|
536
|
|
- return false;
|
537
|
|
- }
|
538
|
|
- });
|
539
|
|
- },
|
540
|
|
- bloodAccessParOperaName(id) {
|
541
|
|
- if (id in this.bloodAccessParOpera) {
|
542
|
|
- return this.bloodAccessParOpera[id].name;
|
543
|
|
- }
|
544
|
|
- return "";
|
545
|
|
- },
|
546
|
|
- dialysateFormulationName(id) {
|
547
|
|
- if (id in this.dialysateFormulationOptions) {
|
548
|
|
- return this.dialysateFormulationOptions[id].name;
|
549
|
|
- }
|
550
|
|
- return "";
|
551
|
|
- },
|
552
|
|
- getAge: function(val) {
|
553
|
|
- if (
|
554
|
|
- this.org_template_info.template_id == 2 ||
|
555
|
|
- this.org_template_info.template_id == 0
|
556
|
|
- ) {
|
557
|
|
- if (val.age == 0) {
|
558
|
|
- return jsGetAge(val.birth, "-");
|
559
|
|
- } else {
|
560
|
|
- return val.age;
|
|
108
|
+ changePatient(row){
|
|
109
|
+ console.log("row",row)
|
|
110
|
+ var params = {
|
|
111
|
+ patient_id:row.patient_id,
|
|
112
|
+ record_date:this.record_date,
|
561
|
113
|
}
|
562
|
|
- } else {
|
563
|
|
- return jsGetAge(val.birth, "-");
|
564
|
|
- }
|
565
|
|
- },
|
566
|
|
- newAdviceGroupObject: function() {
|
567
|
|
- return Object.assign(
|
568
|
|
- {},
|
569
|
|
- {
|
570
|
|
- group_no: 0,
|
571
|
|
- // advice_doctor: 0,
|
572
|
|
- // start_time: 0,
|
573
|
|
- advices: []
|
574
|
|
- // exec_staff: 0,
|
575
|
|
- // exec_time: 0,
|
576
|
|
- // checker: 0,
|
577
|
|
- }
|
578
|
|
- );
|
579
|
|
- },
|
580
|
|
- //日期
|
581
|
|
- handleScheduleDateChange: function(index) {
|
582
|
|
- this.treatStateVal = 0
|
583
|
|
- this.patientStateVal = 0
|
584
|
|
- this.zoneVal = 0
|
585
|
|
- this.scheduleStateVal = 0
|
586
|
|
- this.search_keyword = this.search_input = ''
|
587
|
|
- // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
|
588
|
|
- // zone: this.zone_selected,
|
589
|
|
- // schedule_type: this.schedule_type_selected,
|
590
|
|
- // schedule_date: this.selected_date,
|
591
|
|
- // })
|
592
|
|
- this.selected_date = index
|
593
|
|
- this.$store.dispatch('SetSelectedDate', { selected_date: index })
|
594
|
|
- this.requestDialysisSchedules()
|
595
|
|
- },
|
596
|
|
- //初始化数据
|
597
|
|
- getInitData: function() {
|
598
|
|
- getDialysisRecordInitData().then(rs => {
|
599
|
|
- var resp = rs.data
|
600
|
|
- if (resp.state == 1) {
|
601
|
|
- var zones = resp.data.zones
|
602
|
|
- var schedules = resp.data.schedules
|
603
|
|
- var zone_options = [{ id: 0, text: '全部' }]
|
604
|
|
- for (let z_i = 0; z_i < zones.length; z_i++) {
|
605
|
|
- const zone = zones[z_i]
|
606
|
|
- zone_options.push({ id: zone.id, text: zone.name })
|
607
|
|
- }
|
608
|
|
- this.zone_options = zone_options
|
609
|
|
- // this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
|
610
|
|
- this.arr = this.processedDialysisSchedules(schedules, this.zone_options)
|
611
|
|
- this.requestDialysisSchedules()
|
612
|
|
- // this.getData()
|
613
|
|
- } else {
|
614
|
|
- this.$message.error(resp.msg)
|
615
|
|
- }
|
616
|
|
- })
|
617
|
|
- },
|
618
|
|
- // 班次
|
619
|
|
- handletimeType: function(index) {
|
620
|
|
- this.scheduleStateVal = index
|
621
|
|
- this.$store.dispatch('SetScheduleTypeSelected', { schedule_type_selected: index })
|
622
|
|
- this.search_keyword = this.search_input = ''
|
623
|
|
- this.getData()
|
624
|
|
- },
|
625
|
|
- //分区
|
626
|
|
- handleZoneChange: function(index) {
|
627
|
|
- this.zoneVal = index
|
628
|
|
- this.$store.dispatch('SetZoneSelected', { zone_selected: index })
|
629
|
|
- this.search_keyword = this.search_input = ''
|
630
|
|
- this.getData()
|
631
|
|
- },
|
632
|
|
- //患者状态
|
633
|
|
- handleStateChange: function(index) {
|
634
|
|
- this.patientStateVal = index
|
635
|
|
- this.$store.dispatch('SetPatientStateSelected', { patient_state_selected: index })
|
636
|
|
- this.search_keyword = this.search_input = ''
|
637
|
|
- this.getData()
|
638
|
|
- },
|
639
|
|
- handleTreatChange: function(index) {
|
640
|
|
- this.treatStateVal = index
|
641
|
|
- this.$store.dispatch('SetTreatStateSelected', { treat_state_selected: index })
|
642
|
|
- this.search_keyword = this.search_input = ''
|
643
|
|
- this.getData()
|
644
|
|
- },
|
645
|
|
- processedDialysisSchedules: function(schedules, zone_options) {
|
646
|
|
- var zoneMap = {}
|
647
|
|
- var scheduleMap = {}
|
648
|
|
- for (let z_i = 0; z_i < zone_options.length; z_i++) {
|
649
|
|
- const zone = zone_options[z_i]
|
650
|
|
- if (zone.id == 0) {
|
651
|
|
- continue
|
652
|
|
- }
|
653
|
|
- scheduleMap[zone.id] = []
|
654
|
|
- }
|
655
|
|
- for (let index = 0; index < schedules.length; index++) {
|
656
|
|
- const schedule = schedules[index]
|
657
|
|
- scheduleMap[schedule.device_number.zone.id].push(schedule)
|
658
|
|
- }
|
659
|
|
- var zone_schedules = []
|
660
|
|
- for (let index = 0; index < zone_options.length; index++) {
|
661
|
|
- const zone = zone_options[index]
|
662
|
|
- if (zone.id == 0) {
|
663
|
|
- continue
|
664
|
|
- }
|
665
|
|
- var schedules = scheduleMap[zone.id]
|
666
|
|
- zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
|
667
|
|
- }
|
668
|
|
- return zone_schedules
|
669
|
|
- },
|
670
|
|
- searchAction: function() {
|
671
|
|
- this.search_keyword = this.search_input
|
672
|
|
- this.scheduleStateVal = 0
|
673
|
|
- this.zoneVal = 0
|
674
|
|
- this.treatStateVal = 0
|
675
|
|
- this.patientStateVal = 0
|
676
|
|
- if(this.search_input != ''){
|
677
|
|
- let arr = []
|
678
|
|
- this.filtedSchedules.map(item => {
|
679
|
|
- arr.push(...item.schedules)
|
680
|
|
- })
|
681
|
|
- this.tableData = arr
|
682
|
|
-
|
683
|
|
- }else{
|
684
|
|
- this.getData()
|
685
|
|
- }
|
686
|
|
- },
|
687
|
|
- requestDialysisSchedules: function() {
|
688
|
|
- var ymd = parseTime(this.selected_date, '{y}-{m}-{d}')
|
689
|
|
- getDialysisSchedules(ymd).then(rs => {
|
690
|
|
- var resp = rs.data
|
691
|
|
- if (resp.state == 1) {
|
692
|
|
- var schedules = resp.data.schedules
|
693
|
|
- this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
|
694
|
|
-
|
695
|
|
- let newArr = []
|
696
|
|
- this.zone_schedules.map(item => {
|
697
|
|
- newArr.push(...item.schedules)
|
698
|
|
- })
|
699
|
|
- this.tableData = newArr
|
700
|
|
- this.getData()
|
701
|
|
- } else {
|
702
|
|
- this.$message.error(resp.msg)
|
703
|
|
- }
|
704
|
|
- })
|
705
|
|
- },
|
706
|
|
- changePatient(schedual){
|
707
|
|
- console.log(schedual)
|
708
|
|
- var xtdate = parseTime(schedual.schedule_date, '{y}-{m}-{d}')
|
709
|
|
- this.$router.push(
|
710
|
|
- '/dialysis/print?xtdate=' + xtdate + '&xtno=' + schedual.patient.dialysis_no
|
711
|
|
- )
|
712
|
|
- // this.patient_id = schedual.patient_id;
|
713
|
|
- // this.date = schedual.schedule_date;
|
714
|
|
- // // this.getScheduleDetail();
|
715
|
|
- // // this.getLongAdvice();
|
716
|
|
-
|
717
|
|
- // var patient_id = schedual.patient_id;
|
718
|
|
- // var date = schedual.schedule_date;
|
719
|
|
- // this.$router.push({
|
720
|
|
- // path: "/dialysis/details",
|
721
|
|
- // query: {
|
722
|
|
- // patient_id: patient_id,
|
723
|
|
- // date: date,
|
724
|
|
- // patient_name: schedual.patient.name
|
725
|
|
- // }
|
726
|
|
- // });
|
727
|
|
- },
|
728
|
|
- getData(){
|
729
|
|
- let patientArr = []
|
730
|
|
- patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
|
731
|
|
- console.log('patientArr',patientArr)
|
732
|
|
- let arr1 = []
|
733
|
|
- if(this.patientStateVal == 0){
|
734
|
|
- arr1 = patientArr
|
735
|
|
- console.log(arr1)
|
736
|
|
- }else if(this.patientStateVal == 1){
|
737
|
|
- let arr = []
|
738
|
|
- arr = patientArr
|
739
|
|
- for (let i = 0; i <arr.length; i++) {
|
740
|
|
- for (let j = 0; j < arr[i].schedules.length; j++) {
|
741
|
|
- 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 == ''))) {
|
742
|
|
- // 删除元素后改变i的值
|
743
|
|
- arr[i].schedules.splice(j--, 1);
|
744
|
|
- }
|
745
|
|
- }
|
746
|
|
- }
|
747
|
|
- console.log("执行1",arr)
|
748
|
|
- arr1 = arr
|
749
|
|
- }else if(this.patientStateVal == 2){
|
750
|
|
- let arr = []
|
751
|
|
- arr = patientArr
|
752
|
|
- for (let i = 0; i < arr.length; i++) {
|
753
|
|
- for (let j = 0; j < arr[i].schedules.length; j++) {
|
754
|
|
- 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))) {
|
755
|
|
- // 删除元素后改变i的值
|
756
|
|
- console.log('几次')
|
757
|
|
- arr[i].schedules.splice(j--, 1);
|
758
|
|
- }
|
759
|
|
- }
|
760
|
|
- }
|
761
|
|
- console.log("执行2",arr)
|
762
|
|
- arr1 = arr
|
763
|
|
- }else if(this.patientStateVal == 3){
|
764
|
|
- let arr = []
|
765
|
|
- arr = patientArr
|
766
|
|
- for (let i = 0; i <arr.length; i++) {
|
767
|
|
- for (let j = 0; j < arr[i].schedules.length; j++) {
|
768
|
|
- 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))) {
|
769
|
|
- // 删除元素后改变i的值
|
770
|
|
- arr[i].schedules.splice(j--, 1);
|
771
|
|
- }
|
772
|
|
- }
|
773
|
|
- }
|
774
|
|
- console.log("执行1",arr)
|
775
|
|
- arr1 = arr
|
776
|
|
- }else if(this.patientStateVal == 4){
|
777
|
|
- let arr = []
|
778
|
|
- arr = patientArr
|
779
|
|
- for (let i = 0; i < arr.length; i++) {
|
780
|
|
- for (let j = 0; j < arr[i].schedules.length; j++) {
|
781
|
|
- 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))) {
|
782
|
|
- // 删除元素后改变i的值
|
783
|
|
- arr[i].schedules.splice(j--, 1);
|
784
|
|
- }
|
785
|
|
- }
|
786
|
|
- }
|
787
|
|
- console.log("执行2",arr)
|
788
|
|
- arr1 = arr
|
789
|
|
- }
|
790
|
|
-
|
791
|
|
- let arr2 = []
|
792
|
|
- if(this.treatStateVal == 0){
|
793
|
|
- arr2 = JSON.parse(JSON.stringify(arr1))
|
794
|
|
- }else if(this.treatStateVal == 1){
|
795
|
|
- let arr = []
|
796
|
|
- arr = JSON.parse(JSON.stringify(arr1))
|
797
|
|
- for (let i = 0; i < arr.length; i++) {
|
798
|
|
- for (let j = 0; j < arr[i].schedules.length; j++) {
|
799
|
|
- 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)) {
|
800
|
|
- // 删除元素后改变i的值
|
801
|
|
- arr[i].schedules.splice(j--, 1);
|
802
|
|
- }
|
803
|
|
- }
|
804
|
|
- }
|
805
|
|
- arr2 = arr
|
806
|
|
- }else if(this.treatStateVal == 2){
|
807
|
|
- let arr = []
|
808
|
|
- arr = JSON.parse(JSON.stringify(arr1))
|
809
|
|
- for (let i = 0; i < arr.length; i++) {
|
810
|
|
- for (let j = 0; j < arr[i].schedules.length; j++) {
|
811
|
|
- if (arr[i].schedules.length > 0 && arr[i].schedules[j].treatment_summary != null && arr[i].schedules[j].treatment_summary.dialysis_summary != '') {
|
812
|
|
- // 删除元素后改变i的值
|
813
|
|
- arr[i].schedules.splice(j--, 1);
|
814
|
|
- }
|
815
|
|
- }
|
816
|
|
- }
|
817
|
|
- arr2 = arr
|
818
|
|
- }
|
819
|
|
-
|
820
|
|
-
|
821
|
|
- let arr3 = []
|
822
|
|
- if(this.scheduleStateVal == 0){
|
823
|
|
- arr3 = JSON.parse(JSON.stringify(arr2))
|
824
|
|
- }else{
|
825
|
|
- let arr = []
|
826
|
|
- arr = JSON.parse(JSON.stringify(arr2))
|
827
|
|
- for (let i = 0; i < arr.length; i++) {
|
828
|
|
- for (let j = 0; j < arr[i].schedules.length; j++) {
|
829
|
|
- if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
|
830
|
|
- // 删除元素后改变i的值
|
831
|
|
- arr[i].schedules.splice(j--, 1);
|
832
|
|
- }
|
833
|
|
- }
|
834
|
|
- }
|
835
|
|
- arr3 = arr
|
836
|
|
- console.log("上午",arr)
|
837
|
|
- }
|
838
|
|
-
|
839
|
|
-
|
840
|
|
- let arr4 = []
|
841
|
|
- if(this.zoneVal == 0){
|
842
|
|
- arr4 = JSON.parse(JSON.stringify(arr3))
|
843
|
|
- }else{
|
844
|
|
- let arr = []
|
845
|
|
- arr = JSON.parse(JSON.stringify(arr3))
|
846
|
|
- for (let i = 0; i < arr.length; i++) {
|
847
|
|
- if (this.zoneVal != arr[i].zone_id) {
|
848
|
|
- // 删除元素后改变i的值
|
849
|
|
- arr.splice(i--, 1);
|
850
|
|
- }
|
851
|
|
- }
|
852
|
|
- arr4 = arr
|
853
|
|
- }
|
854
|
|
- let newArr = []
|
855
|
|
- arr4.map(item => {
|
856
|
|
- newArr.push(...item.schedules)
|
857
|
|
- })
|
858
|
|
- this.tableData = newArr
|
859
|
|
- console.log('table',this.tableData)
|
860
|
|
- },
|
861
|
|
- },
|
862
|
|
- watch: {
|
863
|
|
- "patientInfo.gender": function() {
|
864
|
|
- if (this.patientInfo.gender == 1) {
|
865
|
|
- this.patientInfo_gender_1 = true;
|
866
|
|
- this.patientInfo_gender_2 = false;
|
867
|
|
- } else if (this.patientInfo.gender == 2) {
|
868
|
|
- this.patientInfo_gender_2 = true;
|
869
|
|
- this.patientInfo_gender_1 = false;
|
870
|
|
- } else {
|
871
|
|
- this.patientInfo_gender_2 = false;
|
872
|
|
- this.patientInfo_gender_1 = false;
|
873
|
|
- }
|
874
|
|
- },
|
875
|
|
- "patientInfo.source": function() {
|
876
|
|
- if (this.patientInfo.source == 1) {
|
877
|
|
- this.patientInfo_source_1 = true;
|
878
|
|
- this.patientInfo_source_2 = false;
|
879
|
|
- } else if (this.patientInfo.source == 2) {
|
880
|
|
- this.patientInfo_source_2 = true;
|
881
|
|
- this.patientInfo_source_1 = false;
|
882
|
|
- } else {
|
883
|
|
- this.patientInfo_source_2 = false;
|
884
|
|
- this.patientInfo_source_1 = false;
|
885
|
|
- }
|
|
114
|
+ getPrescriptionPrint(params).then(response=>{
|
|
115
|
+ if(response.data.state == 1){
|
|
116
|
+ var advicePrint = response.data.data.advicePrint
|
|
117
|
+ console.log("adviceprint",advicePrint)
|
|
118
|
+ this.advicePrint = advicePrint
|
|
119
|
+ // var hisPatient = response.data.data.hisPatient
|
|
120
|
+ // console.log("hispatient",hisPatient)
|
|
121
|
+ // this.hisPatient = hisPatient
|
|
122
|
+ var patient = response.data.data.patient
|
|
123
|
+ console.log("patient",patient)
|
|
124
|
+ this.patient = patient
|
|
125
|
+ var doctorPorject = response.data.data.doctorPorject
|
|
126
|
+ console.log("doctorporject",doctorPorject)
|
|
127
|
+ }
|
|
128
|
+ })
|
886
|
129
|
}
|
|
130
|
+
|
887
|
131
|
},
|
|
132
|
+
|
888
|
133
|
created() {
|
|
134
|
+ this.getAllDoctorList()
|
|
135
|
+ var record_date = this.$route.query.record
|
|
136
|
+ this.record_date = record_date
|
|
137
|
+ console.log("record_date",record_date)
|
|
138
|
+ this.getAllHisPatientList(record_date)
|
889
|
139
|
},
|
890
|
|
- computed:{
|
891
|
|
- filtedSchedules: function() {
|
892
|
|
- var search_keyword = this.search_keyword
|
893
|
|
- if (search_keyword.length > 0) {
|
894
|
|
- var schedules = []
|
895
|
|
- for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
|
896
|
|
- const scheduleInfo = this.zone_schedules[o_i]
|
897
|
|
- var originSchedules = scheduleInfo.schedules
|
898
|
|
- if (originSchedules.length == 0) {
|
899
|
|
- continue
|
900
|
|
- }
|
901
|
|
- var filtedSchedules = []
|
902
|
|
- for (let s_i = 0; s_i < originSchedules.length; s_i++) {
|
903
|
|
- const schedule = originSchedules[s_i]
|
904
|
|
- if (schedule.patient.name.indexOf(search_keyword) != -1) {
|
905
|
|
- filtedSchedules.push(schedule)
|
906
|
|
- // break
|
907
|
|
- }
|
908
|
|
- }
|
909
|
|
- if (filtedSchedules.length > 0) {
|
910
|
|
- schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
|
911
|
|
- }
|
912
|
|
- }
|
913
|
|
- return schedules
|
914
|
|
- }
|
915
|
|
- }
|
916
|
|
- },
|
|
140
|
+
|
917
|
141
|
};
|
918
|
142
|
</script>
|
919
|
143
|
|