统一入口客户端前端项目

wangkangyjy fbf56a9495 docs: add development and integration handoff guide il y a 16 heures
.idea e3a51a116e src/state/terminalStore.ts下 sendMessage() 加 if (this.sending) return 防重入 il y a 1 mois
artifacts 0d6effcc38 feat(frontend): implement P0 patient service portal il y a 16 heures
docs fbf56a9495 docs: add development and integration handoff guide il y a 16 heures
prototype cb75bca763 feat(prototype): refine P0 conversational agent flows il y a 16 heures
src 0d6effcc38 feat(frontend): implement P0 patient service portal il y a 16 heures
tests 0d6effcc38 feat(frontend): implement P0 patient service portal il y a 16 heures
web-demos 4d1c7ed71d docs: add P0 portal product and interaction specifications il y a 16 heures
.env.development e3a51a116e src/state/terminalStore.ts下 sendMessage() 加 if (this.sending) return 防重入 il y a 1 mois
.gitignore 598fb66a0b feat: 医梦统一入口客户端 Web Demo 初始化 il y a 1 mois
README.md fbf56a9495 docs: add development and integration handoff guide il y a 16 heures
TEST_REPORT.md 598fb66a0b feat: 医梦统一入口客户端 Web Demo 初始化 il y a 1 mois
design-qa.md 0d6effcc38 feat(frontend): implement P0 patient service portal il y a 16 heures
index.html 0d6effcc38 feat(frontend): implement P0 patient service portal il y a 16 heures
package.json 0d6effcc38 feat(frontend): implement P0 patient service portal il y a 16 heures
playwright.config.ts 0d6effcc38 feat(frontend): implement P0 patient service portal il y a 16 heures
pnpm-lock.yaml 0d6effcc38 feat(frontend): implement P0 patient service portal il y a 16 heures
tsconfig.json 598fb66a0b feat: 医梦统一入口客户端 Web Demo 初始化 il y a 1 mois
tsconfig.node.json 598fb66a0b feat: 医梦统一入口客户端 Web Demo 初始化 il y a 1 mois
vite.config.ts 598fb66a0b feat: 医梦统一入口客户端 Web Demo 初始化 il y a 1 mois
vitest.config.ts 0d6effcc38 feat(frontend): implement P0 patient service portal il y a 16 heures

README.md

医梦患者智能服务门户(Adjutant)

面向单家医院部署的移动端 Web 智能服务门户 P0。患者可通过语音、文字和图片进入智能分诊挂号、检验检查报告解读、中医舌诊三项演示服务。

  • 对外名称:医梦患者智能服务门户
  • 内部代号:Adjutant(副官)
  • 当前范围:单医院、固定 Mock 患者、三个 P0 智能体、移动端 Web

首次接手项目请先阅读 开发与联调接手指引,产品与交互决策见 P0 文档集

环境要求

  • Node.js >= 20
  • pnpm >= 9

快速启动

# 安装依赖
pnpm install

# 启动开发服务器(默认 http://127.0.0.1:5173)
pnpm dev

# 生产构建
pnpm build

# 预览生产构建
pnpm preview

测试

# 单元测试(Vitest)
pnpm test:unit

# E2E 测试(Playwright,需先安装浏览器)
npx playwright install chromium
pnpm test:e2e

# 全部测试
pnpm test

当前可演示流程

  1. 智能分诊挂号:语音式输入、连续补槽、急诊风险分流、Mock 号源与挂号确认。
  2. 报告智能解读:对话内上传报告、模拟识别、结构化解读与风险提醒。
  3. 中医舌诊:体质问答、舌象上传、模拟 MCP 分析与综合结果。

服务目录会展示医院智能体清单,但 P0 只有以上三项可进入。

技术栈

类别 方案
框架 Vue 3 (Composition API)
语言 TypeScript
构建 Vite 6
状态管理 Pinia
单元测试 Vitest + @vue/test-utils
E2E 测试 Playwright
类型检查 vue-tsc

目录结构

src/
├── portal/       # 当前移动端门户页面、三智能体会话和 P0 状态
├── api/          # 既有 API、鉴权、SSE 和 Mock 卡片基础
├── cards/        # 既有挂号业务卡片
├── chat/         # 既有对话组件
├── layouts/      # 既有桌面终端布局(保留作参考,当前未挂载)
├── state/        # 既有终端状态(当前门户尚未接入)
├── theme/        # 全局设计令牌
├── App.vue       # 挂载 PortalApp
└── main.ts       # 应用入口

联调环境变量

VITE_API_BASE_URL=http://localhost:6040/api/v1
VITE_DEMO_MODE=true

当前 src/portal/ 仍使用前端内置 P0 演示状态。后续联调应通过统一 Agent Gateway 接入,不要让页面组件直接绑定 FastGPT 应用 ID。具体顺序与数据边界见 开发与联调接手指引