123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- import 'package:fis_jsonrpc/rpc.dart';
- import 'package:flutter/material.dart';
- import 'package:get/get.dart';
- import 'package:vitalapp/pages/check/follow_up/widgets/follow_up_from.dart';
- import 'package:vitalapp/pages/check/widgets/check_category_widget.dart';
- import 'package:vitalapp/pages/check/widgets/configurable_card.dart';
- import 'index.dart';
- class FollowUpPage extends GetView<FollowUpController> {
- const FollowUpPage({Key? key}) : super(key: key);
- @override
- Widget build(BuildContext context) {
- return GetBuilder<FollowUpController>(
- init: FollowUpController(),
- id: "examination",
- builder: (_) => buildFollowUpPage(),
- );
- }
- Widget buildFollowUpPage() {
- return Scaffold(
- backgroundColor: const Color.fromRGBO(238, 238, 238, 1),
- // appBar: VAppBar(
- // titleWidget: const Text('人群随访'),
- // ),
- body: Scrollbar(
- thumbVisibility: true,
- child: SingleChildScrollView(
- child: Container(
- padding: const EdgeInsets.symmetric(
- horizontal: 20,
- vertical: 20,
- ),
- child: buildFollowUpList(),
- ),
- ),
- ),
- );
- }
- Widget buildFollowUpList() {
- return Wrap(
- spacing: 26,
- runSpacing: 26,
- children: controller.menuList
- .map((e) => CheckCategoryWidget(
- label: e.label,
- assetName: "${e.label}.png",
- onTap: () {
- changePage(e.value);
- },
- ))
- .toList(),
- );
- }
- void changePage(String key) {
- controller.state.followUpTime = DateTime.now();
- controller.state.nextFollowUpTime = null;
- controller.state.followUpMode = FollowUpModeEnum.Outpatient;
- controller.state.followUpPhoto = '';
- Get.to(
- ConfigurableCard(
- cardKey: key,
- callBack: (key, templateCode, data, prescriptionKey) async {
- final result = await controller.createFollowUp(
- key,
- templateCode,
- data,
- prescriptionKey.toString(),
- );
- return result;
- },
- followUpWidget: FollowUpFrom(cardKey: key),
- ),
- transition: Transition.rightToLeft,
- );
- }
- }
|