|
@@ -3,6 +3,7 @@ import 'package:get/get.dart';
|
|
|
import 'package:vitalapp/components/cell.dart';
|
|
|
import 'package:vitalapp/components/dialog_input.dart';
|
|
|
import 'package:vitalapp/components/dialog_number.dart';
|
|
|
+import 'package:vitalapp/components/dialog_select.dart';
|
|
|
import 'package:vitalapp/pages/check/models/form.dart';
|
|
|
|
|
|
import 'alert_dialog.dart';
|
|
@@ -47,7 +48,7 @@ class _VDialogMedicationState extends State<VDialogMedication> {
|
|
|
title: "主要用药情况填写",
|
|
|
width: 600,
|
|
|
content: Container(
|
|
|
- height: 220,
|
|
|
+ height: 280,
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 24),
|
|
|
alignment: Alignment.center,
|
|
|
child: VListFormCellGroup(
|
|
@@ -66,11 +67,28 @@ class _VDialogMedicationState extends State<VDialogMedication> {
|
|
|
},
|
|
|
),
|
|
|
_buildFormCell(
|
|
|
- label: '用法:每日(月)/次',
|
|
|
+ label: '频率:每日(月)',
|
|
|
+ content: medicationModel.monthOrDay,
|
|
|
+ onTap: () async {
|
|
|
+ String? result = await VDialogSelect<String, String>(
|
|
|
+ source: [
|
|
|
+ "每月",
|
|
|
+ "每日",
|
|
|
+ ],
|
|
|
+ labelGetter: (data) => data,
|
|
|
+ valueGetter: (data) => data,
|
|
|
+ ).show();
|
|
|
+ setState(() {
|
|
|
+ medicationModel.monthOrDay = result;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ _buildFormCell(
|
|
|
+ label: '用法(次)',
|
|
|
content: medicationModel.usage,
|
|
|
onTap: () async {
|
|
|
final result = await _showNumberDialog(
|
|
|
- title: '用法:每日(月)/次',
|
|
|
+ title: '用法(次)',
|
|
|
initialValue: medicationModel.usage ?? '',
|
|
|
);
|
|
|
setState(() {
|