|
@@ -3,13 +3,10 @@ import 'dart:convert';
|
|
|
import 'package:fis_jsonrpc/rpc.dart';
|
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:get/get.dart';
|
|
|
-import 'package:intl/intl.dart' as intl;
|
|
|
import 'package:vnoteapp/components/button.dart';
|
|
|
-import 'package:vnoteapp/components/dialog_date.dart';
|
|
|
import 'package:vnoteapp/components/dialog_input.dart';
|
|
|
import 'package:vnoteapp/components/dialog_number.dart';
|
|
|
import 'package:vnoteapp/components/dynamic_drawer.dart';
|
|
|
-import 'package:vnoteapp/components/input.dart';
|
|
|
import 'package:vnoteapp/managers/interfaces/template.dart';
|
|
|
import 'package:vnoteapp/pages/check/models/form.dart';
|
|
|
import 'package:vnoteapp/pages/check/widgets/exam_configurable/exam_blood_pressure.dart';
|
|
@@ -29,10 +26,12 @@ String tw = '00.0';
|
|
|
class ConfigurableCard extends StatefulWidget {
|
|
|
final String cardKey;
|
|
|
final Function(String, String, dynamic) callBack;
|
|
|
+ final Widget? followUpWidget;
|
|
|
const ConfigurableCard({
|
|
|
super.key,
|
|
|
required this.cardKey,
|
|
|
required this.callBack,
|
|
|
+ this.followUpWidget,
|
|
|
});
|
|
|
|
|
|
@override
|
|
@@ -309,17 +308,17 @@ class _ConfigurableFormState extends State<ConfigurableCard> {
|
|
|
flex: 1,
|
|
|
child: Stack(
|
|
|
children: [
|
|
|
- Container(
|
|
|
- alignment: Alignment.topCenter,
|
|
|
- margin: const EdgeInsets.all(16).copyWith(top: 0),
|
|
|
- child: widget.cardKey == 'TNB'
|
|
|
- ? _buildFollowUp()
|
|
|
- : Image.asset(
|
|
|
+ widget.cardKey == 'TNB'
|
|
|
+ ? widget.followUpWidget!
|
|
|
+ : Container(
|
|
|
+ alignment: Alignment.topCenter,
|
|
|
+ margin: const EdgeInsets.all(16).copyWith(top: 0),
|
|
|
+ child: Image.asset(
|
|
|
'assets/images/exam/normalMeasurementChart.png',
|
|
|
height: double.infinity,
|
|
|
fit: BoxFit.fitWidth, // 设置图像的适应方式
|
|
|
),
|
|
|
- ),
|
|
|
+ ),
|
|
|
_buildPositionedButton(
|
|
|
currentTitleIndex == 0 ? "返回" : "上一步",
|
|
|
() async {
|
|
@@ -337,85 +336,6 @@ class _ConfigurableFormState extends State<ConfigurableCard> {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- Widget _buildFollowUp() {
|
|
|
- return Column(
|
|
|
- children: [
|
|
|
- Row(
|
|
|
- children: [
|
|
|
- const Text(
|
|
|
- '本次随访日期:',
|
|
|
- style: TextStyle(fontSize: 16),
|
|
|
- ),
|
|
|
- Expanded(
|
|
|
- child: VInput(
|
|
|
- readOnly: true,
|
|
|
- controller: TextEditingController(
|
|
|
- text: intl.DateFormat('yyyy-MM-dd').format(DateTime.now()),
|
|
|
- ),
|
|
|
- radius: 4,
|
|
|
- onTap: () async {
|
|
|
- final result = await VDialogDate(
|
|
|
- title: '结束时间',
|
|
|
- initialValue: DateTime.now(),
|
|
|
- ).show();
|
|
|
- // controller.state.startTime.value = result;
|
|
|
- },
|
|
|
- ),
|
|
|
- ),
|
|
|
- ],
|
|
|
- ),
|
|
|
- Row(
|
|
|
- children: [
|
|
|
- const Text(
|
|
|
- '下次随访日期:',
|
|
|
- style: TextStyle(fontSize: 16),
|
|
|
- ),
|
|
|
- Expanded(
|
|
|
- child: VInput(
|
|
|
- readOnly: true,
|
|
|
- controller: TextEditingController(
|
|
|
- text: intl.DateFormat('yyyy-MM-dd').format(DateTime.now()),
|
|
|
- ),
|
|
|
- radius: 4,
|
|
|
- onTap: () async {
|
|
|
- final result = await VDialogDate(
|
|
|
- title: '结束时间',
|
|
|
- initialValue: DateTime.now(),
|
|
|
- ).show();
|
|
|
- // controller.state.startTime.value = result;
|
|
|
- },
|
|
|
- ),
|
|
|
- ),
|
|
|
- ],
|
|
|
- ),
|
|
|
- Row(
|
|
|
- children: [
|
|
|
- const Text(
|
|
|
- '随访方式:',
|
|
|
- style: TextStyle(fontSize: 16),
|
|
|
- ),
|
|
|
- Expanded(
|
|
|
- child: VInput(
|
|
|
- readOnly: true,
|
|
|
- controller: TextEditingController(
|
|
|
- text: intl.DateFormat('yyyy-MM-dd').format(DateTime.now()),
|
|
|
- ),
|
|
|
- radius: 4,
|
|
|
- onTap: () async {
|
|
|
- final result = await VDialogDate(
|
|
|
- title: '结束时间',
|
|
|
- initialValue: DateTime.now(),
|
|
|
- ).show();
|
|
|
- // controller.state.startTime.value = result;
|
|
|
- },
|
|
|
- ),
|
|
|
- ),
|
|
|
- ],
|
|
|
- ),
|
|
|
- ],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
/// 按钮
|
|
|
Widget _buildPositionedButton(String title, Function onTap,
|
|
|
{double? right, double? left}) {
|