|
@@ -0,0 +1,165 @@
|
|
|
+import 'package:flutter/material.dart';
|
|
|
+import 'package:get/get.dart';
|
|
|
+import 'package:vnoteapp/components/appbar.dart';
|
|
|
+import 'package:vnoteapp/components/floating_window/floating_window.dart';
|
|
|
+import 'package:vnoteapp/components/side_nav/defines.dart';
|
|
|
+import 'package:vnoteapp/components/side_nav/side_nav.dart';
|
|
|
+import 'package:vnoteapp/pages/medical/widgets/blood_oxygen.dart';
|
|
|
+import 'package:vnoteapp/pages/medical/widgets/blood_pressure.dart';
|
|
|
+import 'package:vnoteapp/pages/medical/widgets/blood_sugar.dart';
|
|
|
+import 'package:vnoteapp/pages/medical/widgets/body_temperature.dart';
|
|
|
+import 'package:vnoteapp/pages/medical/widgets/body_weight.dart';
|
|
|
+import 'package:vnoteapp/pages/patient/create/controller.dart';
|
|
|
+import 'package:vnoteapp/routes/nav_ids.dart';
|
|
|
+import 'package:vnoteapp/routes/route_setting.dart';
|
|
|
+
|
|
|
+class MedicalPage extends GetView<CreatePatientController> {
|
|
|
+ const MedicalPage({super.key});
|
|
|
+
|
|
|
+ @override
|
|
|
+ Widget build(BuildContext context) {
|
|
|
+ return Scaffold(
|
|
|
+ backgroundColor: Colors.white,
|
|
|
+ appBar: VAppBar(
|
|
|
+ titleWidget: const Text(
|
|
|
+ "诊疗展示",
|
|
|
+ style: TextStyle(fontSize: 24),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ body: Stack(
|
|
|
+ children: [
|
|
|
+ VSideNavView(
|
|
|
+ navId: NavIds.CREATE,
|
|
|
+ items: _buildItems(),
|
|
|
+ ),
|
|
|
+ const Positioned(
|
|
|
+ bottom: 8,
|
|
|
+ left: 200,
|
|
|
+ right: 200,
|
|
|
+ child: Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
+ children: [],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ const FloatingWindow(),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ List<VSideNavMenuItem> _buildItems() {
|
|
|
+ final items = <VSideNavMenuItem>[];
|
|
|
+ items.add(_buildBodyTemperatureItem());
|
|
|
+ items.add(_buildBodyWeightItem());
|
|
|
+ items.add(_buildBloodPressureItem());
|
|
|
+ items.add(_buildBloodSugarItem());
|
|
|
+ items.add(_buildBloodOxygenItem());
|
|
|
+ return items;
|
|
|
+ }
|
|
|
+
|
|
|
+ VSideNavMenuItem _buildBodyTemperatureItem() {
|
|
|
+ return VSideNavMenuItem(
|
|
|
+ title: "体温",
|
|
|
+ icon: Icon(Icons.edit_document, color: Colors.grey.shade700),
|
|
|
+
|
|
|
+ route: VRouteSetting(
|
|
|
+ "/body_temperature",
|
|
|
+ () => const Column(
|
|
|
+ children: [
|
|
|
+ BodyTemperature(),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ binding: BindingsBuilder(
|
|
|
+ () {
|
|
|
+
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ VSideNavMenuItem _buildBodyWeightItem() {
|
|
|
+ return VSideNavMenuItem(
|
|
|
+ title: "体重",
|
|
|
+ icon: Icon(Icons.info_outline, color: Colors.grey.shade700),
|
|
|
+ route: VRouteSetting(
|
|
|
+ "/body_weight",
|
|
|
+ () => const Column(
|
|
|
+ children: [
|
|
|
+ BodyWeight(),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ binding: BindingsBuilder(
|
|
|
+ () {
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ VSideNavMenuItem _buildBloodPressureItem() {
|
|
|
+ return VSideNavMenuItem(
|
|
|
+ title: "血压",
|
|
|
+ icon: Icon(Icons.exit_to_app, color: Colors.grey.shade700),
|
|
|
+ route: VRouteSetting(
|
|
|
+ "/blood_pressure",
|
|
|
+ () => const Column(
|
|
|
+ children: [
|
|
|
+ BloodPressure(),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ binding: BindingsBuilder(
|
|
|
+ () {
|
|
|
+ Get.lazyPut(() => CreatePatientController());
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ VSideNavMenuItem _buildBloodSugarItem() {
|
|
|
+ return VSideNavMenuItem(
|
|
|
+ title: "血糖",
|
|
|
+ icon: Icon(Icons.exit_to_app, color: Colors.grey.shade700),
|
|
|
+ route: VRouteSetting(
|
|
|
+ "/blood_sugar",
|
|
|
+ () => const Column(
|
|
|
+ children: [
|
|
|
+ BloodSugar(),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ binding: BindingsBuilder(
|
|
|
+ () {
|
|
|
+ Get.lazyPut(() => CreatePatientController());
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ VSideNavMenuItem _buildBloodOxygenItem() {
|
|
|
+ return VSideNavMenuItem(
|
|
|
+ title: "血氧",
|
|
|
+ icon: Icon(Icons.exit_to_app, color: Colors.grey.shade700),
|
|
|
+ route: VRouteSetting(
|
|
|
+ "/blood_oxygen",
|
|
|
+ () => const Column(
|
|
|
+ children: [
|
|
|
+ BloodOxygen(),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ binding: BindingsBuilder(
|
|
|
+ () {
|
|
|
+ Get.lazyPut(() => CreatePatientController());
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ );
|
|
|
+ }
|
|
|
+}
|