|
@@ -2233,8 +2233,7 @@
|
2233
|
2233
|
import LabelBox from './printItem/LabelBox'
|
2234
|
2234
|
import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
2235
|
2235
|
import DialysisPrintOrderTwo from './template/dialysisPrintOrderTwo'
|
2236
|
|
- import print from "print-js"
|
2237
|
|
-
|
|
2236
|
+ import print from 'print-js'
|
2238
|
2237
|
|
2239
|
2238
|
export default {
|
2240
|
2239
|
name: 'dialysisPrintOrder',
|
|
@@ -2306,7 +2305,7 @@
|
2306
|
2305
|
receiverTreatmentAccess: {},
|
2307
|
2306
|
org_template_info: {},
|
2308
|
2307
|
|
2309
|
|
- doctor_advices:[],
|
|
2308
|
+ doctor_advices: [],
|
2310
|
2309
|
advice_groups: [],
|
2311
|
2310
|
|
2312
|
2311
|
AlPanel: {
|
|
@@ -2516,7 +2515,6 @@
|
2516
|
2515
|
|
2517
|
2516
|
this.advice_jilurow = this.advices.length + 1
|
2518
|
2517
|
|
2519
|
|
-
|
2520
|
2518
|
var childMap = {}
|
2521
|
2519
|
for (const index in this.advices) {
|
2522
|
2520
|
if (this.advices[index].parent_id == 0) {
|
|
@@ -2571,102 +2569,86 @@
|
2571
|
2569
|
}
|
2572
|
2570
|
this.loading = false
|
2573
|
2571
|
|
2574
|
|
-
|
2575
|
|
-
|
2576
|
|
-
|
2577
|
|
-
|
2578
|
|
- this.doctor_advices = response.data.data.advices == null ? [] : response.data.data.advices
|
|
2572
|
+ this.doctor_advices = response.data.data.advices == null ? [] : response.data.data.advices
|
2579
|
2573
|
|
2580
|
2574
|
for (let index = 0; index < this.doctor_advices.length; index++) {
|
2581
|
|
- this.doctor_advices[index]['isShow'] = 2
|
|
2575
|
+ this.doctor_advices[index]['isShow'] = 2
|
2582
|
2576
|
}
|
2583
|
2577
|
|
2584
|
|
-
|
2585
|
|
- if (this.doctor_advices.length > 0) {
|
2586
|
|
- var group = this.newAdviceGroupObject();
|
|
2578
|
+ if (this.doctor_advices.length > 0) {
|
|
2579
|
+ var group = this.newAdviceGroupObject()
|
2587
|
2580
|
var initGroupBlock = function(group, advice) {
|
2588
|
|
- group.group_no = advice.groupno;
|
2589
|
|
- };
|
2590
|
|
- for (let index = this.doctor_advices.length-1; index >= 0; index--) {
|
2591
|
|
- var new_advice_index = 0;
|
|
2581
|
+ group.group_no = advice.groupno
|
|
2582
|
+ }
|
|
2583
|
+ for (let index = this.doctor_advices.length - 1; index >= 0; index--) {
|
|
2584
|
+ var new_advice_index = 0
|
2592
|
2585
|
|
2593
|
|
- if('children' in this.doctor_advices[index] && this.doctor_advices[index].children.length > 0){
|
2594
|
|
- new_advice_index = index+this.doctor_advices[index].children.length+1
|
|
2586
|
+ if ('children' in this.doctor_advices[index] && this.doctor_advices[index].children.length > 0) {
|
|
2587
|
+ new_advice_index = index + this.doctor_advices[index].children.length + 1
|
2595
|
2588
|
|
2596
|
2589
|
var doctor_advice = {
|
2597
|
|
- delivery_way:this.doctor_advices[index].delivery_way,
|
2598
|
|
- execution_frequency:this.doctor_advices[index].execution_frequency,
|
2599
|
|
- groupno:this.doctor_advices[index].groupno,
|
2600
|
|
- id:this.doctor_advices[index].id,
|
2601
|
|
- parent_id:this.doctor_advices[index].parent_id,
|
2602
|
|
- children:this.doctor_advices[index].children,
|
2603
|
|
- remark:this.doctor_advices[index].remark,
|
|
2590
|
+ delivery_way: this.doctor_advices[index].delivery_way,
|
|
2591
|
+ execution_frequency: this.doctor_advices[index].execution_frequency,
|
|
2592
|
+ groupno: this.doctor_advices[index].groupno,
|
|
2593
|
+ id: this.doctor_advices[index].id,
|
|
2594
|
+ parent_id: this.doctor_advices[index].parent_id,
|
|
2595
|
+ children: this.doctor_advices[index].children,
|
|
2596
|
+ remark: this.doctor_advices[index].remark
|
2604
|
2597
|
|
2605
|
2598
|
}
|
2606
|
|
- doctor_advice['isShow'] =1
|
|
2599
|
+ doctor_advice['isShow'] = 1
|
2607
|
2600
|
this.doctor_advices.splice(new_advice_index, 0, doctor_advice)
|
2608
|
2601
|
// this.doctor_advices.push(doctor_advice)
|
2609
|
2602
|
}
|
2610
|
2603
|
}
|
2611
|
2604
|
|
2612
|
|
-
|
2613
|
|
-
|
2614
|
|
-
|
2615
|
2605
|
for (let index = 0; index < this.doctor_advices.length; index++) {
|
2616
|
|
-
|
2617
|
|
- const advice = this.doctor_advices[index];
|
|
2606
|
+ const advice = this.doctor_advices[index]
|
2618
|
2607
|
if (advice.groupno == 0) {
|
2619
|
2608
|
// 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
|
2620
|
2609
|
if (advice.parent_id > 0) {
|
2621
|
2610
|
if (this.advice_groups.length > 0) {
|
2622
|
2611
|
var parent_group = this.advice_groups[
|
2623
|
|
- this.advice_groups.length - 1
|
2624
|
|
- ];
|
|
2612
|
+ this.advice_groups.length - 1
|
|
2613
|
+ ]
|
2625
|
2614
|
if (parent_group.advices.length > 0) {
|
2626
|
2615
|
if (parent_group.advices[0].id == advice.parent_id) {
|
2627
|
|
- parent_group.advices.push(advice);
|
|
2616
|
+ parent_group.advices.push(advice)
|
2628
|
2617
|
}
|
2629
|
2618
|
}
|
2630
|
2619
|
}
|
2631
|
|
- continue;
|
|
2620
|
+ continue
|
2632
|
2621
|
} else {
|
2633
|
2622
|
if (group.group_no > 0) {
|
2634
|
|
- this.advice_groups.push(group);
|
2635
|
|
- group = this.newAdviceGroupObject();
|
|
2623
|
+ this.advice_groups.push(group)
|
|
2624
|
+ group = this.newAdviceGroupObject()
|
2636
|
2625
|
}
|
2637
|
2626
|
|
2638
|
|
- initGroupBlock(group, advice);
|
2639
|
|
- group.advices.push(advice);
|
2640
|
|
- this.advice_groups.push(group);
|
2641
|
|
- group = this.newAdviceGroupObject();
|
2642
|
|
- continue;
|
|
2627
|
+ initGroupBlock(group, advice)
|
|
2628
|
+ group.advices.push(advice)
|
|
2629
|
+ this.advice_groups.push(group)
|
|
2630
|
+ group = this.newAdviceGroupObject()
|
|
2631
|
+ continue
|
2643
|
2632
|
}
|
2644
|
2633
|
}
|
2645
|
2634
|
|
2646
|
2635
|
if (group.group_no > 0 && group.group_no != advice.groupno) {
|
2647
|
|
- this.advice_groups.push(group);
|
2648
|
|
- group = this.newAdviceGroupObject();
|
|
2636
|
+ this.advice_groups.push(group)
|
|
2637
|
+ group = this.newAdviceGroupObject()
|
2649
|
2638
|
}
|
2650
|
2639
|
if (group.group_no == 0) {
|
2651
|
|
- initGroupBlock(group, advice);
|
|
2640
|
+ initGroupBlock(group, advice)
|
2652
|
2641
|
}
|
2653
|
2642
|
if (group.group_no == advice.groupno) {
|
2654
|
|
- group.advices.push(advice);
|
|
2643
|
+ group.advices.push(advice)
|
2655
|
2644
|
}
|
2656
|
2645
|
}
|
2657
|
2646
|
if (group.group_no > 0) {
|
2658
|
2647
|
// 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
|
2659
|
|
- this.advice_groups.push(group);
|
|
2648
|
+ this.advice_groups.push(group)
|
2660
|
2649
|
}
|
2661
|
2650
|
}
|
2662
|
2651
|
console.log(this.advice_groups)
|
2663
|
|
-
|
2664
|
|
-
|
2665
|
|
-
|
2666
|
|
-
|
2667
|
|
-
|
2668
|
|
-
|
2669
|
|
-
|
2670
|
2652
|
} else {
|
2671
|
2653
|
this.loading = false
|
2672
|
2654
|
this.$message.error('请求数据失败')
|
|
@@ -2707,7 +2689,7 @@
|
2707
|
2689
|
// exec_time: 0,
|
2708
|
2690
|
// checker: 0,
|
2709
|
2691
|
}
|
2710
|
|
- );
|
|
2692
|
+ )
|
2711
|
2693
|
}
|
2712
|
2694
|
},
|
2713
|
2695
|
watch: {
|