Merge branch 'long-consultation-desk'

This commit is contained in:
2026-04-30 10:59:02 +08:00
4 changed files with 112 additions and 73 deletions
@@ -10,11 +10,25 @@
</div>
</div>
<div v-if="note.tongue_images?.length" class="timeline-images">
<span class="images-label">舌苔照片</span>
<el-image
v-for="(url, idx) in note.tongue_images"
:key="idx"
:src="url"
:preview-src-list="note.tongue_images"
:src="getImageUrl(url)"
:preview-src-list="note.tongue_images.map(getImageUrl)"
:initial-index="idx"
fit="cover"
class="timeline-thumb"
preview-teleported
/>
</div>
<div v-if="note.report_files?.length" class="timeline-images">
<span class="images-label">检查报告</span>
<el-image
v-for="(url, idx) in note.report_files"
:key="idx"
:src="getImageUrl(url)"
:preview-src-list="note.report_files.map(getImageUrl)"
:initial-index="idx"
fit="cover"
class="timeline-thumb"
@@ -27,15 +41,21 @@
</template>
<script setup lang="ts">
import useAppStore from '@/stores/modules/app'
export interface DoctorNoteItem {
id: number
note_date: string
content: string | null
tongue_images: string[]
report_files: string[]
}
defineProps<{ notes: DoctorNoteItem[] }>()
const appStore = useAppStore()
const getImageUrl = (url: string) => appStore.getImageUrl(url)
const splitLines = (content: string | null): string[] => {
if (!content) return []
return content.split('\n').filter(Boolean)
@@ -100,8 +120,14 @@ const splitLines = (content: string | null): string[] => {
.timeline-images {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
}
.images-label {
font-size: 12px;
color: #909399;
flex-shrink: 0;
}
.timeline-thumb {
width: 64px;
height: 64px;