123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- import 'package:flutter/material.dart';
- import 'package:get/get.dart';
- import 'package:vnoteapp/components/button.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/controllers/crowd_labels.dart';
- import 'package:vnoteapp/pages/patient/create/controller.dart';
- import 'package:vnoteapp/pages/patient/create/widgets/area.dart';
- import 'package:vnoteapp/pages/patient/create/widgets/crowd_label.dart';
- import 'package:vnoteapp/pages/patient/create/widgets/patient_info.dart';
- import 'package:vnoteapp/routes/nav_ids.dart';
- import 'package:vnoteapp/routes/route_setting.dart';
- class CreatePatientPage extends GetView<CreatePatientController> {
- const CreatePatientPage({super.key});
- @override
- Widget build(BuildContext context) {
- return Stack(
- children: [
- VSideNavView(
- navId: NavIds.CREATE,
- items: _buildItems(),
- ),
- Positioned(
- bottom: 8,
- left: 200,
- right: 200,
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- children: [
- VButton(
- label: "下一步",
- onTap: () {
- controller.gotoSignContract();
- },
- ),
- VButton(
- label: "存为档案",
- onTap: () {
- controller.gotoPatientDetail();
- },
- ),
- ],
- ),
- ),
- const FloatingWindow(),
- ],
- );
- }
- List<VSideNavMenuItem> _buildItems() {
- final items = <VSideNavMenuItem>[];
- items.add(_buildSignatureItem());
- items.add(_buildAboutItem());
- items.add(_buildLogOutItem());
- return items;
- }
- VSideNavMenuItem _buildSignatureItem() {
- return VSideNavMenuItem(
- title: "签约信息",
- icon: Icon(Icons.edit_document, color: Colors.grey.shade700),
- // onTap: () {}
- route: VRouteSetting(
- "/area_panel",
- () => const Area(),
- binding: BindingsBuilder(
- () {
- Get.lazyPut(() => CreatePatientController());
- },
- ),
- ),
- );
- }
- VSideNavMenuItem _buildAboutItem() {
- return VSideNavMenuItem(
- title: "人群分类",
- isRequired: true,
- icon: Icon(Icons.info_outline, color: Colors.grey.shade700),
- route: VRouteSetting(
- "/crowd_label_panel",
- () => CrowdLabel(),
- binding: BindingsBuilder(
- () {
- Get.lazyPut(() => CrowdLabelsController());
- Get.lazyPut(() => CreatePatientController());
- },
- ),
- ),
- // route: VRouteSetting("/about", () => const AboutPage()),
- );
- }
- // Floating floating = Floating(
- // GestureDetector(
- // onTap: () {
- // print('You tapped the floating window!');
- // },
- // child: Container(
- // width: 100,
- // height: 100,
- // color: Colors.red,
- // ),
- // ),
- // slideType: FloatingSlideType.onRightAndBottom,
- // isShowLog: true,
- // );
- VSideNavMenuItem _buildLogOutItem() {
- return VSideNavMenuItem(
- title: "个人信息",
- icon: Icon(Icons.exit_to_app, color: Colors.grey.shade700),
- route: VRouteSetting(
- "/patient_info_panel",
- () => const PatientInfo(),
- binding: BindingsBuilder(
- () {
- Get.lazyPut(() => CreatePatientController());
- },
- ),
- ),
- // shouldRearrage: true, // TODO: 调整样式后启用
- );
- }
- }
|