feat: 病例列表联调

This commit is contained in:
王天骄
2026-06-13 06:05:37 +08:00
parent 37716f200b
commit bc2e03920e
13 changed files with 1518 additions and 258 deletions
+2 -3
View File
@@ -126,7 +126,7 @@
<script setup lang="ts">
import { computed, onMounted, onUnmounted, ref } from 'vue'
import { readStoredClinicalCase, type ClinicalCase } from '../../api/cases'
import { readStoredClinicalCase, resolveClinicalCaseId, type ClinicalCase } from '../../api/cases'
import { createHomeNavigator, createProfileOpener, createSettingsOpener } from '../../api/navigation'
import {
fetchTeachingCaseItems,
@@ -148,7 +148,6 @@ const emit = defineEmits<{
const openProfile = createProfileOpener(emit)
const openSettings = createSettingsOpener(emit)
const goHome = createHomeNavigator(emit)
const TEACHING_CASE_ID = 1
const questionIndex = ref(0)
const selectedOption = ref('')
@@ -166,7 +165,7 @@ const toastVisible = ref(false)
let toastTimer: ReturnType<typeof setTimeout> | null = null
const activeCase = computed(() => props.caseItem || storedCase.value)
const activeCaseId = computed(() => TEACHING_CASE_ID)
const activeCaseId = computed(() => resolveClinicalCaseId(activeCase.value))
const patient = computed(() => ({
name: activeCase.value?.patientName || '未选择病例',