This commit is contained in:
Your Name
2026-08-12 18:18:33 +08:00
parent b2eb18c75f
commit 26839c2957
334 changed files with 317 additions and 328 deletions
@@ -92,29 +92,16 @@
</div>
</template>
</template>
<!-- 处方联不写主方/辅方药材连续展示 -->
<template v-else>
<template v-if="mainHerbs.length">
<div class="rx-herb-section-label">主方</div>
<div
v-for="(h, i) in mainHerbs"
:key="'user-main-' + i"
class="rx-herb-cell"
>
<span class="rx-herb-name">{{ h.name }}</span>
<span class="rx-herb-total">{{ h.dosage }}</span>
</div>
</template>
<template v-if="auxHerbs.length">
<div class="rx-herb-section-label rx-herb-section-label--aux">辅方</div>
<div
v-for="(h, i) in auxHerbs"
:key="'user-aux-' + i"
class="rx-herb-cell"
>
<span class="rx-herb-name">{{ h.name }}</span>
<span class="rx-herb-total">{{ h.dosage }}</span>
</div>
</template>
<div
v-for="(h, i) in userHerbs"
:key="'user-' + i"
class="rx-herb-cell"
>
<span class="rx-herb-name">{{ h.name }}</span>
<span class="rx-herb-total">{{ h.dosage }}</span>
</div>
</template>
</div>
</div>
@@ -229,6 +216,8 @@ const genderLabel = computed(() => slipGenderLabel(props.data?.gender))
const ageText = computed(() => slipAgeText(props.data?.age))
const mainHerbs = computed(() => getMainHerbs(props.data))
const auxHerbs = computed(() => getAuxHerbs(props.data))
/** 处方联用药列表:主+辅连续排列,不标注主/辅方 */
const userHerbs = computed(() => [...mainHerbs.value, ...auxHerbs.value])
const usageText = computed(() => rxUsageText(props.data))
const auxUsageText = computed(() => rxAuxUsageText(props.data))
const adviceText = computed(() => rxAdviceText(props.data))