diff --git a/src/api/inspect/inspectpatient/index.ts b/src/api/inspect/inspectpatient/index.ts index 3eda41a..d383042 100644 --- a/src/api/inspect/inspectpatient/index.ts +++ b/src/api/inspect/inspectpatient/index.ts @@ -24,6 +24,7 @@ export interface PatientVO { auditor: string // 审核人 auditorTime: Date // 审核时间 chargetime: Date // 收费时间 + headimage: string // 个人信息图片 } // 患者信息 API diff --git a/src/views/Department-entry/Department-entryUI.vue b/src/views/Department-entry/Department-entryUI.vue index 4016295..cd7fe06 100644 --- a/src/views/Department-entry/Department-entryUI.vue +++ b/src/views/Department-entry/Department-entryUI.vue @@ -883,15 +883,19 @@ const formattedMedicalDateTime = computed(() => { }).replace(/\//g, '-') }) +// 修改年龄计算属性 const age = computed(() => { - if (!reportData.value.birthday || !Array.isArray(reportData.value.birthday)) return '' + if (!reportData.value.birthday) return '' + + // 处理 YYYY-MM-DD 格式的生日 + const birthDate = new Date(reportData.value.birthday) + if (isNaN(birthDate.getTime())) return '' // 日期无效时返回空字符串 - const [year, month, day] = reportData.value.birthday - const birthDate = new Date(year, month - 1, day) // 注意月份要减1,因为JS中月份从0开始 const today = new Date() let age = today.getFullYear() - birthDate.getFullYear() const monthDiff = today.getMonth() - birthDate.getMonth() + // 如果还没到生日月份,或者是生日月但还没到具体日期,年龄减1 if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) { age-- } diff --git a/src/views/inspect/physicalEnroll/index.vue b/src/views/inspect/physicalEnroll/index.vue index b8c4177..21e6c85 100644 --- a/src/views/inspect/physicalEnroll/index.vue +++ b/src/views/inspect/physicalEnroll/index.vue @@ -161,28 +161,30 @@
- + 人像采集