|
@@ -18,7 +18,7 @@
|
18
|
18
|
:key="record.id"
|
19
|
19
|
class="print_page_main_content"
|
20
|
20
|
>
|
21
|
|
- <div id="dialysis-print-box">
|
|
21
|
+ <div id="dialysis-print-box" style="page-break-after:always">
|
22
|
22
|
<div class="dialysis-print-order print-template-two print_page_main_content">
|
23
|
23
|
<div style="display:inline-block;width:100%;text-align:center;">
|
24
|
24
|
<div
|
|
@@ -588,45 +588,58 @@
|
588
|
588
|
|
589
|
589
|
<tr v-for="(advice, advice_index) in record.advices" :key="advice_index">
|
590
|
590
|
<td height="30px" style="padding:4px 5px;">
|
591
|
|
- <span v-if="advice.start_time">
|
592
|
|
- {{ getTime(advice.start_time, "{h}:{i}") }}
|
|
591
|
+ <span v-if="advice[0].start_time">
|
|
592
|
+ {{ getTime(advice[0].start_time, "{h}:{i}") }}
|
593
|
593
|
</span>
|
594
|
594
|
</td>
|
595
|
595
|
<td height="30px" colspan="2" class="advice-name" style="padding:4px 5px;">
|
596
|
|
- <span v-if="advice.parent_id > 0">---></span>
|
597
|
|
- <span>{{ advice.advice_name }}</span>
|
598
|
|
- <span v-if="advice && advice.advice_desc">({{ advice.advice_desc }}{{ advice.drug_spec_unit }})</span>
|
599
|
|
- <span v-if="advice.prescribing_number"> {{ advice.prescribing_number }}{{ advice.prescribing_number_unit }}</span>
|
600
|
|
- <span v-if="advice.single_dose != 0">{{ advice.single_dose }}{{ advice.single_dose_unit }}</span>
|
601
|
|
- <span v-if="advice.parent_id == 0">{{ advice.delivery_way }}</span>
|
602
|
|
- <span v-if="advice.parent_id == 0">{{ advice.execution_frequency }}</span>
|
603
|
|
- <span v-if="advice.parent_id == 0 && advice.remark.length > 0">({{ advice.remark }})</span>
|
|
596
|
+ <span v-for="(item,index) in advice" :key="index">
|
|
597
|
+ <!-- <span v-if="item.children.length > 0"> -->
|
|
598
|
+ <span v-if="item.parent_id > 0">---></span>
|
|
599
|
+ <span v-if="item.advice_name"> {{ item.advice_name }}</span>
|
|
600
|
+ <span v-if="item && item.advice_desc">({{ item.advice_desc }}{{ item.drug_spec_unit }})</span>
|
|
601
|
+ <span v-if="item.prescribing_number"> {{ item.prescribing_number }}{{ item.prescribing_number_unit }}</span>
|
|
602
|
+ <span v-if="item.single_dose != 0">{{ item.single_dose }}{{ item.single_dose_unit }}</span>
|
|
603
|
+ <span v-if="item.parent_id == 0">{{ item.delivery_way }}</span>
|
|
604
|
+ <span v-if="item.parent_id == 0">{{ item.execution_frequency }}</span>
|
|
605
|
+ <span v-if="item.parent_id == 0 && item.remark.length > 0">({{ item.remark }})</span>
|
|
606
|
+ <span v-if="item.children && !Array.isArray(item)" style="display:block;border-top: 1px solid #000;" v-for="(child, childindex) in item.children" :key="childindex" class="advice-children">
|
|
607
|
+ <span style="padding-left: 20px !important;">---></span>
|
|
608
|
+ <span>
|
|
609
|
+ <span>{{ child.advice_name }}</span>
|
|
610
|
+ <span v-if="child.advice_desc">{{ child.advice_desc }}{{ child.drug_spec_unit }}</span>
|
|
611
|
+ <span v-if="child.prescribing_number">* {{ child.prescribing_number }}{{ child.prescribing_number_unit }}</span>
|
|
612
|
+ <span v-if="child.single_dose != 0">单次用量 {{ child.single_dose }}{{ child.single_dose_unit }}</span>
|
|
613
|
+ </span>
|
|
614
|
+ </span>
|
|
615
|
+ <!-- </span> -->
|
|
616
|
+ </span>
|
604
|
617
|
</td>
|
605
|
618
|
|
606
|
619
|
<td height="30px" style="padding:4px 5px;">
|
607
|
|
- <span v-if="setAdminUserES(advice, 'advice_doctor') == ''">
|
608
|
|
- {{getAdminUser(advice, 'advice_doctor')}}
|
|
620
|
+ <span v-if="setAdminUserES(advice[0], 'advice_doctor') == ''">
|
|
621
|
+ {{getAdminUser(advice[0], 'advice_doctor')}}
|
609
|
622
|
</span>
|
610
|
623
|
<span v-else style="display:flex;align-items:center;justify-content:space-around;height:36px;">
|
611
|
|
- <img style="height:30px;" :src="setAdminUserES(advice, 'advice_doctor')" alt srcset />
|
|
624
|
+ <img style="height:30px;" :src="setAdminUserES(advice[0], 'advice_doctor')" alt srcset />
|
612
|
625
|
</span>
|
613
|
626
|
</td>
|
614
|
627
|
|
615
|
628
|
<td height="30px" style="padding:4px 5px;">
|
616
|
|
- <span v-if="advice.execution_time">{{ getTime(advice.execution_time, "{h}:{i}") }}</span>
|
|
629
|
+ <span v-if="advice[0].execution_time">{{ getTime(advice[0].execution_time, "{h}:{i}") }}</span>
|
617
|
630
|
</td>
|
618
|
631
|
<td height="30px" style="padding:4px 5px;">
|
619
|
|
- <span v-if="setAdminUserES(advice, 'execution_staff') == ''">
|
620
|
|
- {{getAdminUser(advice, 'execution_staff')}}
|
|
632
|
+ <span v-if="setAdminUserES(advice[0], 'execution_staff') == ''">
|
|
633
|
+ {{getAdminUser(advice[0], 'execution_staff')}}
|
621
|
634
|
</span>
|
622
|
635
|
<span v-else>
|
623
|
|
- <img style="height:30px;" :src="setAdminUserES(advice, 'execution_staff')" alt srcset />
|
|
636
|
+ <img style="height:30px;" :src="setAdminUserES(advice[0], 'execution_staff')" alt srcset />
|
624
|
637
|
</span>
|
625
|
638
|
</td>
|
626
|
639
|
<td height="30px" style="padding:4px 5px;">
|
627
|
|
- <span v-if="setAdminUserES(advice, 'checker') == ''">{{ getAdminUser(advice, "checker") }}</span>
|
|
640
|
+ <span v-if="setAdminUserES(advice[0], 'checker') == ''">{{ getAdminUser(advice[0], "checker") }}</span>
|
628
|
641
|
<span v-else>
|
629
|
|
- <img class="es-img" :src="setAdminUserES(advice, 'checker')" alt="" srcset="" style="height: 30px;" />
|
|
642
|
+ <img class="es-img" :src="setAdminUserES(advice[0], 'checker')" alt="" srcset="" style="height: 30px;" />
|
630
|
643
|
</span>
|
631
|
644
|
</td>
|
632
|
645
|
</tr>
|
|
@@ -789,7 +802,7 @@
|
789
|
802
|
</div>
|
790
|
803
|
</div>
|
791
|
804
|
</div>
|
792
|
|
- <div style="page-break-after:always"></div>
|
|
805
|
+ <!-- <div style="page-break-after:always"></div> -->
|
793
|
806
|
</div>
|
794
|
807
|
</div>
|
795
|
808
|
</div>
|
|
@@ -991,8 +1004,8 @@ export default {
|
991
|
1004
|
}
|
992
|
1005
|
|
993
|
1006
|
var delghTwo = 0
|
994
|
|
- if (this.records[recordIndex].advices && this.records[recordIndex].advices.length < 6) {
|
995
|
|
- delghTwo = 6 - this.records[recordIndex].advices.length
|
|
1007
|
+ if (this.records[recordIndex].advices && this.records[recordIndex].advices.length < 12) {
|
|
1008
|
+ delghTwo = 12 - this.records[recordIndex].advices.length
|
996
|
1009
|
} else {
|
997
|
1010
|
delghTwo = 0
|
998
|
1011
|
}
|
|
@@ -1006,42 +1019,42 @@ export default {
|
1006
|
1019
|
}
|
1007
|
1020
|
}
|
1008
|
1021
|
|
1009
|
|
- // var childMap = {}
|
1010
|
|
- // for (const index in this.records[recordIndex].advices) {
|
1011
|
|
- // if (this.records[recordIndex].advices[index].parent_id == 0) {
|
1012
|
|
- // continue
|
1013
|
|
- // }
|
1014
|
|
- // if (
|
1015
|
|
- // !(
|
1016
|
|
- // this.records[recordIndex].advices[index].parent_id in childMap
|
1017
|
|
- // )
|
1018
|
|
- // ) {
|
1019
|
|
- // childMap[
|
1020
|
|
- // this.records[recordIndex].advices[index].parent_id
|
1021
|
|
- // ] = []
|
1022
|
|
- // }
|
1023
|
|
- // childMap[this.records[recordIndex].advices[index].parent_id].push(
|
1024
|
|
- // this.records[recordIndex].advices[index]
|
1025
|
|
- // )
|
1026
|
|
- // }
|
1027
|
|
-
|
1028
|
|
- // var advices = []
|
1029
|
|
- // for (const index in this.records[recordIndex].advices) {
|
1030
|
|
- // if (this.records[recordIndex].advices[index].parent_id > 0) {
|
1031
|
|
- // continue
|
1032
|
|
- // }
|
1033
|
|
- // var item = this.records[recordIndex].advices[index]
|
1034
|
|
- // if (item.id in childMap) {
|
1035
|
|
- // item.children = childMap[item.id]
|
1036
|
|
- // } else {
|
1037
|
|
- // item.children = []
|
1038
|
|
- // }
|
1039
|
|
- // advices.push(item)
|
1040
|
|
- // }
|
|
1022
|
+ var childMap = {}
|
|
1023
|
+ for (const index in this.records[recordIndex].advices) {
|
|
1024
|
+ if (this.records[recordIndex].advices[index].parent_id == 0) {
|
|
1025
|
+ continue
|
|
1026
|
+ }
|
|
1027
|
+ if (
|
|
1028
|
+ !(
|
|
1029
|
+ this.records[recordIndex].advices[index].parent_id in childMap
|
|
1030
|
+ )
|
|
1031
|
+ ) {
|
|
1032
|
+ childMap[
|
|
1033
|
+ this.records[recordIndex].advices[index].parent_id
|
|
1034
|
+ ] = []
|
|
1035
|
+ }
|
|
1036
|
+ childMap[this.records[recordIndex].advices[index].parent_id].push(
|
|
1037
|
+ this.records[recordIndex].advices[index]
|
|
1038
|
+ )
|
|
1039
|
+ }
|
|
1040
|
+
|
|
1041
|
+ var advices = []
|
|
1042
|
+ for (const index in this.records[recordIndex].advices) {
|
|
1043
|
+ if (this.records[recordIndex].advices[index].parent_id > 0) {
|
|
1044
|
+ continue
|
|
1045
|
+ }
|
|
1046
|
+ var item = this.records[recordIndex].advices[index]
|
|
1047
|
+ if (item.id in childMap) {
|
|
1048
|
+ item.children = childMap[item.id]
|
|
1049
|
+ } else {
|
|
1050
|
+ item.children = []
|
|
1051
|
+ }
|
|
1052
|
+ advices.push(item)
|
|
1053
|
+ }
|
1041
|
1054
|
|
1042
|
1055
|
var leftAdvice = []
|
1043
|
1056
|
var rightAdvice = []
|
1044
|
|
- var adlen = this.records[recordIndex].advices.length
|
|
1057
|
+ var adlen = advices.length
|
1045
|
1058
|
|
1046
|
1059
|
var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
|
1047
|
1060
|
for (var i = 0; i < halfLen; i++) {
|
|
@@ -1142,7 +1155,6 @@ export default {
|
1142
|
1155
|
QueryPartById: function(val) {
|
1143
|
1156
|
let vascular_access_part_name = '/'
|
1144
|
1157
|
const vascular_access = getDataConfig('hemodialysis', 'vascular_access_desc')
|
1145
|
|
- console.log('哈哈哈哈哈哈',vascular_access)
|
1146
|
1158
|
for (let i = 0; i < vascular_access.length; i++) {
|
1147
|
1159
|
if (vascular_access[i].id == val) {
|
1148
|
1160
|
vascular_access_part_name = vascular_access[i].name
|