12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import 'package:flutter/material.dart';
- import 'package:get/get.dart';
- import 'package:vnoteapp/architecture/types/kv.dart';
- import 'package:vnoteapp/components/cell.dart';
- import 'package:vnoteapp/components/dialog_select.dart';
- import 'package:vnoteapp/pages/patient/create/controller.dart';
- class Area extends GetView<CreatePatientController> {
- const Area({super.key});
- @override
- Widget build(BuildContext context) {
- return Column(
- children: [
- VListFormCellGroup(
- children: [
- VListFormCell(
- label: "签约机构",
- content: controller.state.organizationName,
- ),
- Obx(
- () {
- return VListFormCell(
- label: "签约区域",
- content: controller.state.villageName,
- onTap: () async {
- final result = await VDialogSelect<StringKVModel, String>(
- title: "选择签约区域",
- source: controller.state.villageOptions,
- valueGetter: (data) => data.key,
- labelGetter: (data) => data.value,
- initialValue: controller.state.villageCode,
- ).show();
- if (result != null) {
- controller.state.villageCode = result;
- }
- },
- );
- },
- ),
- ],
- ),
- ],
- );
- }
- }
|