Files
pressureSensor/frontend/README.md
2025-09-09 15:00:30 +08:00

18 lines
564 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 前端Vue + Vite
## 安装与运行
```powershell
cd frontend
npm install
npm run dev
```
Vite dev server 默认端口 5173并在 `vite.config.ts` 配置了 `/api``/data``/health` 的代理到 `http://localhost:5000`
## 页面说明
- 当前数据卡片:调用 `GET /api/readings/latest` 展示最新压力、电压与时间。
- 时间序列图:调用 `GET /api/readings?start=...&end=...` 加载一段时间数据并绘制折线图。
- 报警列表:调用 `GET /api/alarms?min_pressure=...&max_pressure=...` 拉取超限记录。