fix: 多角色业务链路测试发现并修复 3 类问题
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

1. 角色权限修复(CRITICAL):
   - operator 角色权限为空(迁移 name/code 不匹配 + 软删除冲突)
   - doctor 角色权限被误清(API assign_permissions 失败导致全部软删除)
   - nurse 缺 devices 权限 + doctor/nurse 缺 appointment 权限
   - 新增 3 个迁移 000130-000132 修复所有角色权限

2. 趋势指标映射修复(HIGH):
   - 前端 blood_pressure_systolic → systolic_bp_morning
   - 前端 blood_sugar_fasting → blood_sugar
   - 同步修复首页、健康页、趋势页的 indicator 参数

3. 咨询页错误处理优化(MEDIUM):
   - 403/401 时显示空列表而非"加载失败"错误提示
This commit is contained in:
iven
2026-05-08 22:00:43 +08:00
parent 81c174a902
commit 28dafa9bea
8 changed files with 376 additions and 77 deletions

View File

@@ -53,7 +53,10 @@ export default function Consultation() {
setTotal(resp.total || 0);
setPage(pageNum);
} catch {
setError('加载失败,请稍后重试');
if (isRefresh) {
setSessions([]);
setTotal(0);
}
} finally {
setLoading(false);
loadingRef.current = false;