## 后台管理页重构 - admin 端: add_doctor / doctors / home / patients 四页重构 - doctor 端: consultations / dashboard / followup_edit / followups / home / patient_detail / patients / profile / report_detail / reports / settings 十一页重构 - 新增 backoffice 共享模块: backoffice_refresh_providers + backoffice_formatters + backoffice_ui ## 后端 - AdminService 增强(分页/搜索/统计) - doctor_endpoints 微调 - appsettings.Development 调整 - 新增 admin_service_tests ## 前端其他 - 今日健康卡片 taskRow 行高 5->7(每行 44->48px) - 健康仪表盘配色定 #4FACFE 纯色蓝 - admin_drawer / doctor_drawer 微调 - api_client IP 适配 ## 启动脚本 - start-dev.bat: 加后端就绪检测(轮询 openapi 端点, 最多等 30s) ## 清理 - 删除旧品牌图(agent_welcome_abstract / login_background_v1) - 删除 app_status_badge 组件 - 删除旧 HANDOFF 文档, 新增 07-17 版 ## 测试 - 新增 backoffice_formatters / backoffice_refresh / backoffice_ui 三个测试 - app_router_test 扩展
48 lines
1.3 KiB
Dart
48 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import '../../core/app_colors.dart';
|
|
import '../../widgets/admin_drawer.dart';
|
|
import '../../widgets/backoffice_ui.dart';
|
|
import 'admin_doctors_page.dart';
|
|
import 'admin_patients_page.dart';
|
|
|
|
final adminPageProvider = NotifierProvider<AdminPageNotifier, String>(
|
|
AdminPageNotifier.new,
|
|
);
|
|
|
|
class AdminPageNotifier extends Notifier<String> {
|
|
@override
|
|
String build() => 'doctors';
|
|
void set(String page) => state = page;
|
|
}
|
|
|
|
class AdminHomePage extends ConsumerWidget {
|
|
const AdminHomePage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final page = ref.watch(adminPageProvider);
|
|
|
|
return Scaffold(
|
|
backgroundColor: AppColors.pageGrey,
|
|
appBar: AppBar(
|
|
backgroundColor: Colors.transparent,
|
|
elevation: 0,
|
|
title: Text(
|
|
page == 'patients' ? '患者管理' : '医生管理',
|
|
style: TextStyle(color: AppColors.textPrimary),
|
|
),
|
|
iconTheme: const IconThemeData(color: AppColors.textPrimary),
|
|
),
|
|
drawer: const AdminDrawer(),
|
|
body: BackofficeSurface(
|
|
child: switch (page) {
|
|
'doctors' => const AdminDoctorsPage(),
|
|
'patients' => const AdminPatientsPage(),
|
|
_ => const AdminDoctorsPage(),
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|