|
@@ -46,7 +46,7 @@
|
46
|
46
|
<div class="inline_block" style="margin-left: 10px">
|
47
|
47
|
年龄:
|
48
|
48
|
<div class="under_line" style="width: 30px; text-align: center">
|
49
|
|
- {{ getAge(patientInfo)}}
|
|
49
|
+ {{ getAge(patientInfo) }}
|
50
|
50
|
</div>
|
51
|
51
|
岁
|
52
|
52
|
</div>
|
|
@@ -1673,19 +1673,19 @@
|
1673
|
1673
|
<div class="inline_block" style="margin-left: 5px">
|
1674
|
1674
|
住院号/门诊号:
|
1675
|
1675
|
<div
|
1676
|
|
- class="under_line"
|
1677
|
|
- style="width: 70px; text-align: left"
|
1678
|
|
- v-if="receiverTreatmentAccess.admission_number"
|
1679
|
|
- >
|
1680
|
|
- {{ receiverTreatmentAccess.admission_number }}
|
1681
|
|
- </div>
|
1682
|
|
- <div
|
1683
|
|
- class="under_line"
|
1684
|
|
- style="width: 70px; text-align: left"
|
1685
|
|
- v-else
|
1686
|
|
- >
|
1687
|
|
- {{ "/" }}
|
1688
|
|
- </div>
|
|
1676
|
+ class="under_line"
|
|
1677
|
+ style="width: 70px; text-align: left"
|
|
1678
|
+ v-if="receiverTreatmentAccess.admission_number"
|
|
1679
|
+ >
|
|
1680
|
+ {{ receiverTreatmentAccess.admission_number }}
|
|
1681
|
+ </div>
|
|
1682
|
+ <div
|
|
1683
|
+ class="under_line"
|
|
1684
|
+ style="width: 70px; text-align: left"
|
|
1685
|
+ v-else
|
|
1686
|
+ >
|
|
1687
|
+ {{ "/" }}
|
|
1688
|
+ </div>
|
1689
|
1689
|
</div>
|
1690
|
1690
|
</div>
|
1691
|
1691
|
<div class="row" style="margin-bottom: 10px">
|
|
@@ -2695,34 +2695,32 @@ export default {
|
2695
|
2695
|
},
|
2696
|
2696
|
methods: {
|
2697
|
2697
|
// 获取当前年份,用于年龄计算
|
2698
|
|
- getoldAge(){
|
2699
|
|
- let date = new Date()
|
2700
|
|
- let year = date.getFullYear()
|
2701
|
|
- let year_d = this.xtdate.split('-')[0]-this.patientInfo.birth.split('-')[0]
|
2702
|
|
- let year_m = this.xtdate.split('-')[1]
|
2703
|
|
- let birth_m = this.patientInfo.birth.split('-')[1]
|
2704
|
|
- let year_date = this.xtdate.split('-')[2]
|
2705
|
|
- let birth_date = this.patientInfo.birth.split('-')[2]
|
|
2698
|
+ getoldAge() {
|
|
2699
|
+ let date = new Date();
|
|
2700
|
+ let year = date.getFullYear();
|
|
2701
|
+ let year_d =
|
|
2702
|
+ this.xtdate.split("-")[0] - this.patientInfo.birth.split("-")[0];
|
|
2703
|
+ let year_m = this.xtdate.split("-")[1];
|
|
2704
|
+ let birth_m = this.patientInfo.birth.split("-")[1];
|
|
2705
|
+ let year_date = this.xtdate.split("-")[2];
|
|
2706
|
+ let birth_date = this.patientInfo.birth.split("-")[2];
|
2706
|
2707
|
// console.log(year,'今年年月')
|
2707
|
2708
|
// console.log(this.xtdate.split('-'),'病人就诊年月')
|
2708
|
|
- console.log(this.patientInfo.birth,'病人生日')
|
|
2709
|
+ console.log(this.patientInfo.birth, "病人生日");
|
2709
|
2710
|
// console.log(year_d,'year_d')
|
2710
|
|
- if(year_m < birth_m){
|
2711
|
|
- return year_d - 1
|
2712
|
|
- }else if(year_m = birth_m){
|
2713
|
|
- if(year_date < birth_date){
|
2714
|
|
- return year_d - 1
|
2715
|
|
- }else{
|
2716
|
|
- return year_d
|
|
2711
|
+ if (year_m < birth_m) {
|
|
2712
|
+ return year_d - 1;
|
|
2713
|
+ } else if (year_m == birth_m) {
|
|
2714
|
+ if (year_date < birth_date) {
|
|
2715
|
+ return year_d - 1;
|
|
2716
|
+ } else {
|
|
2717
|
+ return year_d;
|
2717
|
2718
|
}
|
2718
|
|
- }else{
|
2719
|
|
- return year_d
|
|
2719
|
+ } else {
|
|
2720
|
+ return year_d;
|
2720
|
2721
|
}
|
2721
|
2722
|
},
|
2722
|
2723
|
|
2723
|
|
-
|
2724
|
|
-
|
2725
|
|
-
|
2726
|
2724
|
checkData() {
|
2727
|
2725
|
if (this.receiverTreatmentAccess.way == 0) {
|
2728
|
2726
|
this.$message.error("入科方式未填");
|
|
@@ -3470,7 +3468,7 @@ export default {
|
3470
|
3468
|
return val.age;
|
3471
|
3469
|
}
|
3472
|
3470
|
} else {
|
3473
|
|
- return this.getoldAge()
|
|
3471
|
+ return this.getoldAge();
|
3474
|
3472
|
}
|
3475
|
3473
|
},
|
3476
|
3474
|
newAdviceGroupObject: function () {
|