Initial commit: HealthManager full-stack health management platform

Backend: .NET 10 + PostgreSQL + EF Core + JWT + SignalR
Frontend patient: React 19 + TypeScript + Vite (mobile H5)
Frontend doctor: React 19 + TypeScript + Vite (desktop web)
This commit is contained in:
MingNian
2026-05-20 16:18:56 +08:00
commit 435af55c4a
215 changed files with 18595 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
import { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { Button } from '@/components/common/Button';
import { Input } from '@/components/common/Input';
import { PageHeader } from '@/components/layout/PageHeader';
import { ToastContainer, toast } from '@/components/common/Toast';
import * as reportService from '@/services/report.service';
import styles from './ReportUploadPage.module.css';
export function ReportUploadPage() {
const navigate = useNavigate();
const [title, setTitle] = useState('');
const [category, setCategory] = useState('血液检查');
const [loading, setLoading] = useState(false);
const categories = ['血液检查', '心电图', '影像学', '尿液检查', '其他'];
const handleSubmit = async () => {
if (!title.trim()) { toast('请输入报告名称', 'error'); return; }
setLoading(true);
await reportService.uploadReport({ title, category });
toast('上传成功,正在解读中...');
setTimeout(() => navigate(-1), 800);
};
return (
<div className="page--no-tab">
<PageHeader title="上传报告" />
<div className={styles.form}>
<Input label="报告名称" value={title} onChange={(e) => setTitle(e.target.value)} placeholder="如:血脂全套检查报告" />
<div className={styles.catLabel}></div>
<div className={styles.catGrid}>
{categories.map((c) => (
<button key={c} className={`${styles.catChip} ${category === c ? styles.catActive : ''}`} onClick={() => setCategory(c)}>{c}</button>
))}
</div>
<div className={styles.uploadArea}>
<span style={{ fontSize: 40 }}>📸</span>
<span style={{ fontSize: '14px', color: '#6B7280' }}></span>
<span style={{ fontSize: '11px', color: '#9CA3AF' }}></span>
</div>
<Button variant="primary" size="lg" fullWidth loading={loading} onClick={handleSubmit}>
</Button>
</div>
<ToastContainer />
</div>
);
}