|
@@ -0,0 +1,731 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="main-contain">
|
|
3
|
+ <div class="position">
|
|
4
|
+ <bread-crumb :crumbs="crumbs"></bread-crumb>
|
|
5
|
+ <el-button
|
|
6
|
+ size="small"
|
|
7
|
+ icon="el-icon-printer"
|
|
8
|
+ :disabled="selecting_schs.length == 0"
|
|
9
|
+ @click="batchPrintAction"
|
|
10
|
+ type="primary"
|
|
11
|
+ >打印</el-button>
|
|
12
|
+ </div>
|
|
13
|
+ <div class="app-container">
|
|
14
|
+ <!-- <div class="filter-container">
|
|
15
|
+ <el-input style="width: 400px;" v-model="searchKey" class="filter-item"/>
|
|
16
|
+ <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
|
|
17
|
+ </div>-->
|
|
18
|
+ <div class="cell clearfix">
|
|
19
|
+ <label class="title">
|
|
20
|
+ <span class="name">日期查询:</span>
|
|
21
|
+ </label>
|
|
22
|
+ <el-date-picker
|
|
23
|
+ v-model="time"
|
|
24
|
+ prefix-icon="el-icon-date"
|
|
25
|
+ @change="changeTime"
|
|
26
|
+ :editable="false"
|
|
27
|
+ style="width: 250px;"
|
|
28
|
+ type="date"
|
|
29
|
+ placeholder="选择日期时间"
|
|
30
|
+ align="right"
|
|
31
|
+ format="yyyy-MM-dd"
|
|
32
|
+ value-format="timestamp"
|
|
33
|
+ ></el-date-picker>
|
|
34
|
+
|
|
35
|
+ <!-- <el-button type="primary" :disabled="selecting_schs.length == 0" @click="batchPrintAction">打印</el-button> -->
|
|
36
|
+ </div>
|
|
37
|
+ <div class="cell clearfix">
|
|
38
|
+ <label class="title"> <span class="name">排班班次</span> : </label>
|
|
39
|
+ <div class="time">
|
|
40
|
+ <ul class>
|
|
41
|
+ <li
|
|
42
|
+ :class="item.value == schedulType ? 'active' : ''"
|
|
43
|
+ @click="selectSchedulType(item.value)"
|
|
44
|
+ v-for="item in schedulArr"
|
|
45
|
+ :key="item.value"
|
|
46
|
+ >
|
|
47
|
+ {{ item.label }}
|
|
48
|
+ </li>
|
|
49
|
+ </ul>
|
|
50
|
+ </div>
|
|
51
|
+ </div>
|
|
52
|
+ <div class="cell clearfix">
|
|
53
|
+ <label class="title"> <span class="name">分区</span> : </label>
|
|
54
|
+ <div class="time">
|
|
55
|
+ <ul class>
|
|
56
|
+ <li
|
|
57
|
+ :class="item.id == partitionType ? 'active' : ''"
|
|
58
|
+ @click="selectPartitionType(item.id)"
|
|
59
|
+ v-for="item in partitionArr"
|
|
60
|
+ :key="item.id"
|
|
61
|
+ >
|
|
62
|
+ {{ item.name }}
|
|
63
|
+ </li>
|
|
64
|
+ </ul>
|
|
65
|
+ </div>
|
|
66
|
+ </div>
|
|
67
|
+
|
|
68
|
+ <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
|
69
|
+ @selection-change="handleSelectionChange"
|
|
70
|
+ :row-class-name="tableRowClassName"
|
|
71
|
+ :span-method="objectSpanMethod"
|
|
72
|
+ :cell-class-name="adviceNameShow"
|
|
73
|
+ :modal-append-to-body="false">
|
|
74
|
+ <el-table-column type="selection" width="55" align="center"></el-table-column>
|
|
75
|
+ <el-table-column prop="date" label="姓名" align="center" min-width="26px">
|
|
76
|
+ <template slot-scope="scope">
|
|
77
|
+ <span>{{ scope.row.name }}</span>
|
|
78
|
+ <br>
|
|
79
|
+ ({{ scope.row.parent_id == 0 ? scope.row.dialysis_no : ""}})
|
|
80
|
+ <br>
|
|
81
|
+ <span v-if="scope.row.mode_id == 1">(HD)</span>
|
|
82
|
+ <span v-if="scope.row.mode_id == 2">(HDF)</span>
|
|
83
|
+ <span v-if="scope.row.mode_id == 3">(HD+HP)</span>
|
|
84
|
+ <span v-if="scope.row.mode_id == 4">(HP)</span>
|
|
85
|
+ <span v-if="scope.row.mode_id == 5">(HF)</span>
|
|
86
|
+ <span v-if="scope.row.mode_id == 6">(SCUF)</span>
|
|
87
|
+ <span v-if="scope.row.mode_id == 7">(IUF)</span>
|
|
88
|
+ <span v-if="scope.row.mode_id == 8">(HFHD)</span>
|
|
89
|
+ <span v-if="scope.row.mode_id == 9">(HFHD+HP)</span>
|
|
90
|
+ <span v-if="scope.row.mode_id == 10">(PHF)</span>
|
|
91
|
+ <span v-if="scope.row.mode_id == 11">(HFR)</span>
|
|
92
|
+ <span v-if="scope.row.mode_id == 12">(HDF+HP)</span>
|
|
93
|
+ <span v-if="scope.row.mode_id == 13">(CRRT)</span>
|
|
94
|
+ <span v-if="scope.row.mode_id == 14">(腹水回输)</span>
|
|
95
|
+ </template>
|
|
96
|
+ </el-table-column>
|
|
97
|
+ <el-table-column prop="date" label="透析器" align="center" min-width="26px">
|
|
98
|
+ <template slot-scope="scope">
|
|
99
|
+ <span>{{ scope.row.dialyzer_perfusion_apparatus }}</span>
|
|
100
|
+ </template>
|
|
101
|
+ </el-table-column>
|
|
102
|
+ <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
|
|
103
|
+ <template slot-scope="scope">
|
|
104
|
+ <span>
|
|
105
|
+ {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
|
|
106
|
+ </span>
|
|
107
|
+ </template>
|
|
108
|
+ </el-table-column>
|
|
109
|
+ <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
|
|
110
|
+ <template slot-scope="scope">
|
|
111
|
+ <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
|
|
112
|
+ <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
|
|
113
|
+ {{ getAdviceContent(scope.row, 1)}}
|
|
114
|
+ </span>
|
|
115
|
+ </el-dropdown>
|
|
116
|
+
|
|
117
|
+ <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
|
|
118
|
+ <span class="el-dropdown-link">
|
|
119
|
+  {{ getAdviceContent(scope.row, 2)}}
|
|
120
|
+ </span>
|
|
121
|
+ </el-dropdown>
|
|
122
|
+ </template>
|
|
123
|
+ </el-table-column>
|
|
124
|
+ <el-table-column
|
|
125
|
+ prop="start_time"
|
|
126
|
+ align="center"
|
|
127
|
+ min-width="30px"
|
|
128
|
+ label="执行时间"
|
|
129
|
+ sortable
|
|
130
|
+ >
|
|
131
|
+ <template slot-scope="scope">
|
|
132
|
+ <span v-if="scope.row.execution_time != 0">
|
|
133
|
+ {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
|
|
134
|
+ </span>
|
|
135
|
+ <span v-else></span>
|
|
136
|
+ </template>
|
|
137
|
+ </el-table-column>
|
|
138
|
+ <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
|
|
139
|
+ <template slot-scope="scope">
|
|
140
|
+ <span v-if="scope.row.parent_id == 0">
|
|
141
|
+ {{getXuserName(scope.row.execution_staff)}}
|
|
142
|
+ </span>
|
|
143
|
+ <span v-else></span>
|
|
144
|
+ </template>
|
|
145
|
+ </el-table-column>
|
|
146
|
+ <el-table-column prop="checker" align="center" min-width="30px" label="校对护士">
|
|
147
|
+ <template slot-scope="scope">
|
|
148
|
+ <span v-if="scope.row.parent_id == 0">
|
|
149
|
+ {{getXuserName(scope.row.checker)}}
|
|
150
|
+ </span>
|
|
151
|
+ <span v-else></span>
|
|
152
|
+ </template>
|
|
153
|
+ </el-table-column>
|
|
154
|
+ <el-table-column
|
|
155
|
+ prop="check_time"
|
|
156
|
+ align="center"
|
|
157
|
+ min-width="30px"
|
|
158
|
+ label="校对时间"
|
|
159
|
+ sortable
|
|
160
|
+ >
|
|
161
|
+ <template slot-scope="scope">
|
|
162
|
+ <span v-if="scope.row.check_time != 0">
|
|
163
|
+ {{scope.row.check_time | parseTime('{m}-{d} {h}:{i}')}}
|
|
164
|
+ </span>
|
|
165
|
+ <span v-else></span>
|
|
166
|
+ </template>
|
|
167
|
+ </el-table-column>
|
|
168
|
+ <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
|
|
169
|
+ <template slot-scope="scope">
|
|
170
|
+ <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
|
|
171
|
+ </template>
|
|
172
|
+ </el-table-column>
|
|
173
|
+ <el-table-column
|
|
174
|
+ prop="created_time"
|
|
175
|
+ align="center"
|
|
176
|
+ min-width="30px"
|
|
177
|
+ label="校对时间"
|
|
178
|
+ sortable
|
|
179
|
+ >
|
|
180
|
+ <template slot-scope="scope">
|
|
181
|
+ <span v-if="scope.row.created_time != 0">
|
|
182
|
+ {{scope.row.created_time | parseTime('{m}-{d} {h}:{i}')}}
|
|
183
|
+ </span>
|
|
184
|
+ <span v-else></span>
|
|
185
|
+ </template>
|
|
186
|
+ </el-table-column>
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+ <!-- <el-table-column
|
|
192
|
+ v-if="template_id != 6"
|
|
193
|
+ prop="checker"
|
|
194
|
+ min-width="30px"
|
|
195
|
+ align="center"
|
|
196
|
+ label="核对人员"
|
|
197
|
+ >
|
|
198
|
+ <template slot-scope="scope">
|
|
199
|
+ <span v-if="scope.row.parent_id == 0">
|
|
200
|
+ {{getXuserName(scope.row.checker)}}
|
|
201
|
+ </span>
|
|
202
|
+ <span v-else></span>
|
|
203
|
+ </template>
|
|
204
|
+ </el-table-column> -->
|
|
205
|
+ </el-table>
|
|
206
|
+ </div>
|
|
207
|
+ </div>
|
|
208
|
+</template>
|
|
209
|
+
|
|
210
|
+<script>
|
|
211
|
+const moment = require('moment')
|
|
212
|
+import { getSchedualPatient, GetAllZone } from "@/api/dialysis";
|
|
213
|
+import { parseTime } from "@/utils";
|
|
214
|
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
|
215
|
+import { getPrintTemplate } from "@/api/data";
|
|
216
|
+import { getSchedualDoctors } from '@/api/advice'
|
|
217
|
+
|
|
218
|
+export default {
|
|
219
|
+ name: "Patient",
|
|
220
|
+ data() {
|
|
221
|
+ return {
|
|
222
|
+ crumbs: [
|
|
223
|
+ { path: false, name: "透析管理" },
|
|
224
|
+ { path: false, name: "透析监测" }
|
|
225
|
+ ],
|
|
226
|
+ loading: false,
|
|
227
|
+ time: "",
|
|
228
|
+
|
|
229
|
+ search_mode: 1, // 搜索模式 1.日期搜索 2.病人搜索
|
|
230
|
+ patient_search_keyword: "",
|
|
231
|
+
|
|
232
|
+ SchedualPatientsTableData: [],
|
|
233
|
+ active: true,
|
|
234
|
+ schedulType: 0,
|
|
235
|
+ schedulArr: [
|
|
236
|
+ { value: 0, label: "全部" },
|
|
237
|
+ { value: 1, label: "上午" },
|
|
238
|
+ { value: 2, label: "下午" },
|
|
239
|
+ { value: 3, label: "晚上" }
|
|
240
|
+ ],
|
|
241
|
+ template_id: 0,
|
|
242
|
+
|
|
243
|
+ partitionType: 0,
|
|
244
|
+
|
|
245
|
+ total: 0,
|
|
246
|
+ listQuery: {
|
|
247
|
+ page: 1,
|
|
248
|
+ limit: 10,
|
|
249
|
+ schedul_type: 0,
|
|
250
|
+ partition_type: 0,
|
|
251
|
+ schedul_time: "",
|
|
252
|
+ keywords: ""
|
|
253
|
+ },
|
|
254
|
+ selecting_schs: [],
|
|
255
|
+ partitionArr: [],
|
|
256
|
+
|
|
257
|
+ scheduleMap:[]
|
|
258
|
+ };
|
|
259
|
+ },
|
|
260
|
+ created() {
|
|
261
|
+ var date = new Date();
|
|
262
|
+ this.time = date;
|
|
263
|
+ var year = date.getFullYear();
|
|
264
|
+ var month = date.getMonth() + 1;
|
|
265
|
+ var day = date.getDate();
|
|
266
|
+ if (month < 10) {
|
|
267
|
+ month = "0" + month;
|
|
268
|
+ }
|
|
269
|
+ if (day < 10) {
|
|
270
|
+ day = "0" + day;
|
|
271
|
+ }
|
|
272
|
+ var nowDate = year + "-" + month + "-" + day;
|
|
273
|
+ var date = new Date(nowDate + " 00:00:00");
|
|
274
|
+ this.listQuery.schedul_time = date.getTime();
|
|
275
|
+ this.getAllZone();
|
|
276
|
+ this.getTemplateInfo();
|
|
277
|
+ this.requestSchedualDoctors(this.time)
|
|
278
|
+ // this.template_id = this.$store.getters.xt_user.template_info.template_id;
|
|
279
|
+ },
|
|
280
|
+ methods: {
|
|
281
|
+ getTemplateInfo() {
|
|
282
|
+ getPrintTemplate().then(response => {
|
|
283
|
+ if (response.data.state == 0) {
|
|
284
|
+ this.$message.error(response.data.msg);
|
|
285
|
+ return false;
|
|
286
|
+ } else {
|
|
287
|
+ var template = response.data.data.template;
|
|
288
|
+ this.template_id = template.template_id;
|
|
289
|
+ }
|
|
290
|
+ });
|
|
291
|
+ },
|
|
292
|
+ clickCurrent(val) {
|
|
293
|
+ console.log(val);
|
|
294
|
+ this.$router.push({
|
|
295
|
+ path: "/dialysis/details",
|
|
296
|
+ query: { patient_id: val.patient_id, date: val.sch_time_int,mode_id:val.mode_id }
|
|
297
|
+ });
|
|
298
|
+ },
|
|
299
|
+ handleSelectionChange(val) {
|
|
300
|
+ this.selecting_schs = val;
|
|
301
|
+ },
|
|
302
|
+
|
|
303
|
+ selectSchedulType(scheduleType) {
|
|
304
|
+ // alert(scheduleType);/
|
|
305
|
+ this.schedulType = scheduleType;
|
|
306
|
+ this.listQuery.schedul_type = scheduleType;
|
|
307
|
+ this.requestSchedualDoctors();
|
|
308
|
+ },
|
|
309
|
+ selectPartitionType(partitionType) {
|
|
310
|
+ this.partitionType = partitionType;
|
|
311
|
+ this.listQuery.partition_type = partitionType;
|
|
312
|
+ this.requestSchedualDoctors();
|
|
313
|
+ },
|
|
314
|
+
|
|
315
|
+ changeTime() {
|
|
316
|
+ this.listQuery.schedul_time = this.time;
|
|
317
|
+ this.requestSchedualDoctors(this.time)
|
|
318
|
+ },
|
|
319
|
+ getAllZone: function() {
|
|
320
|
+ GetAllZone().then(response => {
|
|
321
|
+ if (response.data.state == 0) {
|
|
322
|
+ this.$message.error(response.data.msg);
|
|
323
|
+ return false;
|
|
324
|
+ } else {
|
|
325
|
+ this.partitionArr = response.data.data.zone;
|
|
326
|
+ this.partitionArr.unshift({ id: 0, name: "全部" });
|
|
327
|
+ }
|
|
328
|
+ });
|
|
329
|
+ },
|
|
330
|
+ requestSchedualDoctors (time) {
|
|
331
|
+ let newTime = moment(time).format('YYYY-MM-DD')
|
|
332
|
+ getSchedualDoctors({
|
|
333
|
+ date: newTime,
|
|
334
|
+ patient_type: 0,
|
|
335
|
+ advice_type: 2
|
|
336
|
+ }).then(rs => {
|
|
337
|
+ var resp = rs.data
|
|
338
|
+ if (resp.state == 1) {
|
|
339
|
+ this.admin_users = resp.data.adminUser
|
|
340
|
+ var schedules = resp.data.scheduals
|
|
341
|
+ // console.log("schedules",schedules)
|
|
342
|
+ let arr = []
|
|
343
|
+ let newArr = []
|
|
344
|
+ let newSchedules = []
|
|
345
|
+ schedules.map(item => {
|
|
346
|
+ item.doctor_advice.map(it =>{
|
|
347
|
+ it.name = item.patient.name
|
|
348
|
+ it.dialyzer_perfusion_apparatus = item.prescription.dialyzer_perfusion_apparatus
|
|
349
|
+ it.schedule_type = item.schedule_type
|
|
350
|
+ it.zoneId = item.device_number.zone.id
|
|
351
|
+ it.dialysis_no = item.patient.dialysis_no
|
|
352
|
+ it.mode_id = item.mode_id
|
|
353
|
+ arr.push(it)
|
|
354
|
+ })
|
|
355
|
+ })
|
|
356
|
+ if(this.schedulType == 0){
|
|
357
|
+ newSchedules = arr
|
|
358
|
+ }else{
|
|
359
|
+ arr.map(item => {
|
|
360
|
+ if (item.schedule_type == this.schedulType) {
|
|
361
|
+ newSchedules.push(item)
|
|
362
|
+ }
|
|
363
|
+ })
|
|
364
|
+ }
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+ if(this.partitionType == 0){
|
|
368
|
+ this.scheduleMap = newSchedules
|
|
369
|
+ }else {
|
|
370
|
+ let a = []
|
|
371
|
+ arr.map(item => {
|
|
372
|
+ if(this.partitionType == item.zoneId){
|
|
373
|
+ a.push(item)
|
|
374
|
+ }
|
|
375
|
+ })
|
|
376
|
+ this.scheduleMap = a
|
|
377
|
+ }
|
|
378
|
+ this.scheduleMap.map(ele => {
|
|
379
|
+ let firstIndex = this.scheduleMap.findIndex(item => {
|
|
380
|
+ return item.patient_id === ele.patient_id // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
|
|
381
|
+ })
|
|
382
|
+ if (this.scheduleMap.findIndex(item => { return item.patient_id === firstIndex}) === -1) {
|
|
383
|
+ newArr.push({
|
|
384
|
+ length: this.scheduleMap.filter(item => {
|
|
385
|
+ return item.patient_id === ele.patient_id //利用数组的filter方法,过滤出相同category的数组的长度。数组长度-即为跨多少行
|
|
386
|
+ }).length,
|
|
387
|
+ firstIndex: firstIndex // firstIndex 返回的是第一个catergory就满足的第一个Index,即为rowIndex开始于第几行。
|
|
388
|
+ })
|
|
389
|
+ }
|
|
390
|
+ })
|
|
391
|
+ this.indexInfoList = newArr
|
|
392
|
+ }
|
|
393
|
+ })
|
|
394
|
+ },
|
|
395
|
+ getValue: function(val) {
|
|
396
|
+ if (val != undefined) {
|
|
397
|
+ return val.value;
|
|
398
|
+ } else {
|
|
399
|
+ return "";
|
|
400
|
+ }
|
|
401
|
+ },
|
|
402
|
+
|
|
403
|
+ handleCurrentChange(val) {
|
|
404
|
+ this.listQuery.page = val;
|
|
405
|
+ this.getSchedualPatientList();
|
|
406
|
+ },
|
|
407
|
+ changeSearchMode: function() {
|
|
408
|
+ if (this.search_mode == 1) {
|
|
409
|
+ this.search_mode = 2;
|
|
410
|
+ } else {
|
|
411
|
+ this.search_mode = 1;
|
|
412
|
+ }
|
|
413
|
+ },
|
|
414
|
+ searchPatientAction: function() {
|
|
415
|
+ this.listQuery.keywords = this.patient_search_keyword;
|
|
416
|
+ console.log(this.patient_search_keyword);
|
|
417
|
+ if (this.patient_search_keyword.length == 0) {
|
|
418
|
+ return;
|
|
419
|
+ }
|
|
420
|
+ this.getSchedualPatientList();
|
|
421
|
+ },
|
|
422
|
+ handleSizeChange(val) {
|
|
423
|
+ this.listQuery.limit = val;
|
|
424
|
+ this.getSchedualPatientList();
|
|
425
|
+ },
|
|
426
|
+ batchPrintAction: function() {
|
|
427
|
+ if (this.selecting_schs.length === 0) {
|
|
428
|
+ this.$message.error("请至少选择一条需要打印的内容");
|
|
429
|
+ return false;
|
|
430
|
+ }
|
|
431
|
+ // 模板ID为6
|
|
432
|
+ var sch_ids = [];
|
|
433
|
+
|
|
434
|
+ for (let index = 0; index < this.selecting_schs.length; index++) {
|
|
435
|
+ sch_ids.push(this.selecting_schs[index].patient_id);
|
|
436
|
+ }
|
|
437
|
+ // console.log("sch_ids",sch_ids)
|
|
438
|
+ this.$store.dispatch("SetAdviceIDs", sch_ids);
|
|
439
|
+ this.$router.push({ path: "/dialysis/doctorAdvicePrint",query:{time: new Date(this.time).getTime()} });
|
|
440
|
+
|
|
441
|
+ },
|
|
442
|
+ batchPrintActionOne: function() {
|
|
443
|
+ if (this.selecting_schs.length === 0) {
|
|
444
|
+ this.$message.error("请至少选择一条需要打印的内容");
|
|
445
|
+ return false;
|
|
446
|
+ }
|
|
447
|
+ var sch_ids = [];
|
|
448
|
+ for (let index = 0; index < this.selecting_schs.length; index++) {
|
|
449
|
+ sch_ids.push(this.selecting_schs[index].sch_id);
|
|
450
|
+ }
|
|
451
|
+ this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
|
|
452
|
+ if (this.template_id == 2 || this.template_id == 0) {
|
|
453
|
+ this.$router.push({ path: "/dialysis/print/batch/otherone" });
|
|
454
|
+ } else if (this.template_id == 1) {
|
|
455
|
+ this.$router.push({ path: "/dialysis/print/batch" });
|
|
456
|
+ } else if (this.template_id == 5) {
|
|
457
|
+ this.$router.push({ path: "/dialysis/print/batch/fiveone" });
|
|
458
|
+ } else if (this.template_id == 22) {
|
|
459
|
+ this.$router.push({ path: "/dialysis/print/batch/twentyTwo_one" });
|
|
460
|
+ }
|
|
461
|
+ },
|
|
462
|
+ batchPrintActionTwo: function() {
|
|
463
|
+ if (this.selecting_schs.length === 0) {
|
|
464
|
+ this.$message.error("请至少选择一条需要打印的内容");
|
|
465
|
+ return false;
|
|
466
|
+ }
|
|
467
|
+ var sch_ids = [];
|
|
468
|
+ for (let index = 0; index < this.selecting_schs.length; index++) {
|
|
469
|
+ sch_ids.push(this.selecting_schs[index].sch_id);
|
|
470
|
+ }
|
|
471
|
+ this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
|
|
472
|
+ if (this.template_id == 2 || this.template_id == 0) {
|
|
473
|
+ this.$router.push({ path: "/dialysis/print/batch/othertwo" });
|
|
474
|
+ } else if (this.template_id == 1) {
|
|
475
|
+ this.$router.push({ path: "/dialysis/print/batch" });
|
|
476
|
+ } else if (this.template_id == 5) {
|
|
477
|
+ this.$router.push({ path: "/dialysis/print/batch/fivetwo" });
|
|
478
|
+ } else if (this.template_id == 22) {
|
|
479
|
+ this.$router.push({ path: "/dialysis/print/batch/twentyTwo_two" });
|
|
480
|
+ }
|
|
481
|
+ },
|
|
482
|
+ compare (property) {
|
|
483
|
+ return function (a, b) {
|
|
484
|
+ var value1 = a[property]
|
|
485
|
+ var value2 = b[property]
|
|
486
|
+ return value1 - value2
|
|
487
|
+ }
|
|
488
|
+ },
|
|
489
|
+ tableRowClassName({ row, rowIndex }) {
|
|
490
|
+ // if (row.stop_state == 1 || row.execution_state == 1) {
|
|
491
|
+ // return 'stoped-row';
|
|
492
|
+ // }
|
|
493
|
+ // return 'success-rows'
|
|
494
|
+ // row.index = rowIndex
|
|
495
|
+ // const arr = this.hoverOrderArr
|
|
496
|
+ // for (let i = 0; i < arr.length; i++) {
|
|
497
|
+ // if (rowIndex == arr[i]) {
|
|
498
|
+ // return 'success-row'
|
|
499
|
+ // }
|
|
500
|
+ // }
|
|
501
|
+ },
|
|
502
|
+ objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
503
|
+ if (columnIndex === 0) {
|
|
504
|
+ let index = this.indexInfoList.findIndex(item => { //遍历数组
|
|
505
|
+ return item.firstIndex === rowIndex
|
|
506
|
+ })
|
|
507
|
+ if (index > -1) {
|
|
508
|
+ return {
|
|
509
|
+ rowspan: this.indexInfoList[index].length,
|
|
510
|
+ colspan: 1
|
|
511
|
+ }
|
|
512
|
+ } else {
|
|
513
|
+ return {
|
|
514
|
+ rowspan: 0,
|
|
515
|
+ colspan: 0
|
|
516
|
+ }
|
|
517
|
+ }
|
|
518
|
+ }
|
|
519
|
+
|
|
520
|
+ if (columnIndex === 1) {
|
|
521
|
+ let index = this.indexInfoList.findIndex(item => { //遍历数组
|
|
522
|
+ return item.firstIndex === rowIndex
|
|
523
|
+ })
|
|
524
|
+ if (index > -1) {
|
|
525
|
+ return {
|
|
526
|
+ rowspan: this.indexInfoList[index].length,
|
|
527
|
+ colspan: 1
|
|
528
|
+ }
|
|
529
|
+ } else {
|
|
530
|
+ return {
|
|
531
|
+ rowspan: 0,
|
|
532
|
+ colspan: 0
|
|
533
|
+ }
|
|
534
|
+ }
|
|
535
|
+ }
|
|
536
|
+ if (columnIndex === 2) {
|
|
537
|
+ let index = this.indexInfoList.findIndex(item => { //遍历数组
|
|
538
|
+ return item.firstIndex === rowIndex
|
|
539
|
+ })
|
|
540
|
+ if (index > -1) {
|
|
541
|
+ return {
|
|
542
|
+ rowspan: this.indexInfoList[index].length,
|
|
543
|
+ colspan: 1
|
|
544
|
+ }
|
|
545
|
+ } else {
|
|
546
|
+ return {
|
|
547
|
+ rowspan: 0,
|
|
548
|
+ colspan: 0
|
|
549
|
+ }
|
|
550
|
+ }
|
|
551
|
+ }
|
|
552
|
+ },
|
|
553
|
+ adviceNameShow({ row, column, rowIndex, columnIndex }) {
|
|
554
|
+ if (columnIndex == 2) {
|
|
555
|
+ return 'dialysisadvicenamedisplay'
|
|
556
|
+ } else {
|
|
557
|
+ return ''
|
|
558
|
+ }
|
|
559
|
+ },
|
|
560
|
+ getXuserName(id) {
|
|
561
|
+ if (id <= 0) {
|
|
562
|
+ return ''
|
|
563
|
+ }
|
|
564
|
+ var name = ''
|
|
565
|
+ if (
|
|
566
|
+ this.admin_users == null ||
|
|
567
|
+ typeof this.admin_users.length === 'undefined'
|
|
568
|
+ ) {
|
|
569
|
+ return name
|
|
570
|
+ }
|
|
571
|
+ var leng = this.admin_users.length
|
|
572
|
+ if (leng == 0) {
|
|
573
|
+ return name
|
|
574
|
+ }
|
|
575
|
+ for (let index = 0; index < leng; index++) {
|
|
576
|
+ if (this.admin_users[index].id == id) {
|
|
577
|
+ name = this.admin_users[index].name
|
|
578
|
+ break
|
|
579
|
+ }
|
|
580
|
+ }
|
|
581
|
+ return name
|
|
582
|
+ },
|
|
583
|
+ getAdviceContent(row, isChild) {
|
|
584
|
+ let tempSingleDoseDesc = ''
|
|
585
|
+ let tempDrugSpecDesc = ''
|
|
586
|
+ let tempPrescribingNumberDesc = ''
|
|
587
|
+
|
|
588
|
+ if (row.prescribing_number) {
|
|
589
|
+ tempPrescribingNumberDesc =
|
|
590
|
+ row.prescribing_number + '' + row.prescribing_number_unit
|
|
591
|
+ }
|
|
592
|
+
|
|
593
|
+ if (row.single_dose) {
|
|
594
|
+ if (this.template_id != 6) {
|
|
595
|
+ tempSingleDoseDesc =
|
|
596
|
+ ' 单次用量 ' + ' ' + row.single_dose + '' + row.single_dose_unit
|
|
597
|
+ } else {
|
|
598
|
+ tempSingleDoseDesc = row.single_dose + '' + row.single_dose_unit
|
|
599
|
+ }
|
|
600
|
+ }
|
|
601
|
+
|
|
602
|
+ if (row.advice_desc) {
|
|
603
|
+ tempDrugSpecDesc = '(' + row.advice_desc + row.drug_spec_unit + ')'
|
|
604
|
+ }
|
|
605
|
+
|
|
606
|
+ if (isChild == 1) {
|
|
607
|
+ // 不是子药
|
|
608
|
+
|
|
609
|
+ return (
|
|
610
|
+ row.advice_name +
|
|
611
|
+ tempDrugSpecDesc +
|
|
612
|
+ ' ' +
|
|
613
|
+ tempPrescribingNumberDesc +
|
|
614
|
+ tempSingleDoseDesc +
|
|
615
|
+ ' ' +
|
|
616
|
+ row.delivery_way +
|
|
617
|
+ ' ' +
|
|
618
|
+ row.execution_frequency
|
|
619
|
+ )
|
|
620
|
+ } else {
|
|
621
|
+ // 是子药
|
|
622
|
+ return (
|
|
623
|
+ row.advice_name +
|
|
624
|
+ tempDrugSpecDesc +
|
|
625
|
+ ' ' +
|
|
626
|
+ tempPrescribingNumberDesc +
|
|
627
|
+ tempSingleDoseDesc
|
|
628
|
+ )
|
|
629
|
+ }
|
|
630
|
+ },
|
|
631
|
+ handleSelectionChange(val){
|
|
632
|
+ // console.log('val',val)
|
|
633
|
+ this.selecting_schs = val;
|
|
634
|
+ }
|
|
635
|
+ },
|
|
636
|
+ components: {
|
|
637
|
+ BreadCrumb
|
|
638
|
+ }
|
|
639
|
+};
|
|
640
|
+</script>
|
|
641
|
+
|
|
642
|
+<style rel="stylesheet/scss" lang="scss" scoped>
|
|
643
|
+.app-container {
|
|
644
|
+ // margin: 20px;
|
|
645
|
+ font-size: 15px;
|
|
646
|
+ .filter-container {
|
|
647
|
+ padding-bottom: 5px;
|
|
648
|
+ }
|
|
649
|
+ .cqd-dataTitle {
|
|
650
|
+ color: #303133;
|
|
651
|
+ font-size: 14px;
|
|
652
|
+ border-bottom: 2px #e4e7ed solid;
|
|
653
|
+ height: 36px;
|
|
654
|
+ line-height: 36px;
|
|
655
|
+ margin: 0 0 25px 0;
|
|
656
|
+ position: relative;
|
|
657
|
+ }
|
|
658
|
+ .cqd-dataTitle::before {
|
|
659
|
+ position: absolute;
|
|
660
|
+ left: 0;
|
|
661
|
+ bottom: -2px;
|
|
662
|
+ content: "";
|
|
663
|
+ width: 42px;
|
|
664
|
+ height: 2px;
|
|
665
|
+ background: #409eff;
|
|
666
|
+ }
|
|
667
|
+ .search-component {
|
|
668
|
+ width: 500px;
|
|
669
|
+ .searchBox {
|
|
670
|
+ width: 300px;
|
|
671
|
+ height: 36px;
|
|
672
|
+ line-height: 36px;
|
|
673
|
+ padding-left: 15px;
|
|
674
|
+ border: 1px #dcdfe6 solid;
|
|
675
|
+ border-right: none;
|
|
676
|
+ outline: none;
|
|
677
|
+ float: left;
|
|
678
|
+ border-radius: 6px 0 0 6px;
|
|
679
|
+ font-size: 14px;
|
|
680
|
+ color: #333;
|
|
681
|
+ background: #fff;
|
|
682
|
+ box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
|
|
683
|
+ }
|
|
684
|
+ .searchBtn {
|
|
685
|
+ background-color: #409eff;
|
|
686
|
+ color: #fff;
|
|
687
|
+ font-size: 15px;
|
|
688
|
+ text-align: center;
|
|
689
|
+ height: 36px;
|
|
690
|
+ line-height: 36px;
|
|
691
|
+ float: left;
|
|
692
|
+ outline: none;
|
|
693
|
+ width: 70px;
|
|
694
|
+ border: none;
|
|
695
|
+ border-radius: 0 6px 6px 0;
|
|
696
|
+ font-family: "Microsoft Yahei";
|
|
697
|
+ cursor: pointer;
|
|
698
|
+ }
|
|
699
|
+ }
|
|
700
|
+ .amount {
|
|
701
|
+ font-weight: normal;
|
|
702
|
+ padding: 10px 0 0 0;
|
|
703
|
+ color: #606266;
|
|
704
|
+ font-size: 14px;
|
|
705
|
+ span {
|
|
706
|
+ color: #ef2525;
|
|
707
|
+ font-family: "Arial";
|
|
708
|
+ padding: 0 2px;
|
|
709
|
+ }
|
|
710
|
+ }
|
|
711
|
+}
|
|
712
|
+.el-table td,
|
|
713
|
+.el-table th.is-leaf,
|
|
714
|
+.el-table--border,
|
|
715
|
+.el-table--group {
|
|
716
|
+ border-color: #d0d3da;
|
|
717
|
+}
|
|
718
|
+.el-table--border::after,
|
|
719
|
+.el-table--group::after,
|
|
720
|
+.el-table::before {
|
|
721
|
+ background-color: #d0d3da;
|
|
722
|
+}
|
|
723
|
+.el-checkbox__inner::after {
|
|
724
|
+ height: 10px;
|
|
725
|
+ left: 7px;
|
|
726
|
+}
|
|
727
|
+.el-checkbox__inner {
|
|
728
|
+ width: 20px;
|
|
729
|
+ height: 20px;
|
|
730
|
+}
|
|
731
|
+</style>
|