2026-10-10 16:05:08 +08:00
|
|
|
|
<!-- App.vue —— B1 归属。挂载三栏 AppShell + 教育科研覆盖层(步骤5;v-show 切换不卸载)。 -->
|
2026-08-25 20:47:08 +08:00
|
|
|
|
<script setup>
|
|
|
|
|
|
import { onMounted, onUnmounted } from 'vue';
|
|
|
|
|
|
import AppShell from './components/layout/AppShell.vue';
|
2026-10-10 16:05:08 +08:00
|
|
|
|
import EduWorkspace from './components/edu/EduWorkspace.vue';
|
2026-08-25 20:47:08 +08:00
|
|
|
|
import { useHealthStore } from './stores/health.js';
|
2026-10-10 16:05:08 +08:00
|
|
|
|
import { useAppStore } from './stores/app.js';
|
2026-08-25 20:47:08 +08:00
|
|
|
|
|
|
|
|
|
|
// FR-SHELL-007 首屏初始化:并行请求健康与 QA 元信息(失败不阻塞渲染)
|
|
|
|
|
|
const health = useHealthStore();
|
2026-10-10 16:05:08 +08:00
|
|
|
|
const appStore = useAppStore();
|
2026-08-25 20:47:08 +08:00
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
health.start();
|
|
|
|
|
|
health.fetchQaInfo();
|
|
|
|
|
|
});
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
|
|
health.stop();
|
|
|
|
|
|
});
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
2026-10-10 16:05:08 +08:00
|
|
|
|
<!-- 覆盖层语义(D1):两者始终挂载,仅 display 切换——RAG 会话/上传/滚动零丢失 -->
|
|
|
|
|
|
<AppShell v-show="appStore.isChat" />
|
|
|
|
|
|
<EduWorkspace v-show="appStore.isEdu" />
|
2026-08-25 20:47:08 +08:00
|
|
|
|
</template>
|