소스 검색

Merge branch 'master' of http://git.ius.plus:88/Project-Vital/VitalApp

gavin.chen 1 년 전
부모
커밋
77956d22da

+ 1 - 1
lib/global.dart

@@ -52,7 +52,7 @@ abstract class Global {
     // 锁定横屏
     await SystemChrome.setPreferredOrientations([
       DeviceOrientation.landscapeLeft,
-      DeviceOrientation.landscapeRight,
+      // DeviceOrientation.landscapeRight,
     ]);
 
     // SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light);

+ 7 - 8
lib/pages/check/widgets/exam_configurable/exam_card.dart

@@ -101,13 +101,13 @@ class ExamCard2 extends StatelessWidget {
   }
 
   Widget _buildTitle() {
-    Widget titleContent = const SizedBox();
-    if (title?.isNotEmpty ?? false) {
-      titleContent = Text(
-        title!,
-        style: const TextStyle(fontSize: 26),
-      );
-    }
+    // Widget titleContent = const SizedBox();
+    // if (title?.isNotEmpty ?? false) {
+    //   titleContent = Text(
+    //     title!,
+    //     style: const TextStyle(fontSize: 26),
+    //   );
+    // }
     return titleText ??
         Container(
           padding: EdgeInsets.only(
@@ -119,7 +119,6 @@ class ExamCard2 extends StatelessWidget {
             mainAxisAlignment: MainAxisAlignment.center,
             crossAxisAlignment: CrossAxisAlignment.start,
             children: [
-              titleContent,
               Expanded(child: content),
             ],
           ),

+ 28 - 17
lib/pages/check/widgets/exam_configurable/exam_toxic_substance.dart

@@ -26,6 +26,7 @@ class ExamToxicSubstance extends StatelessWidget {
     return ExamCard2(
       title: currentFormObject.label ?? '',
       content: Column(
+        crossAxisAlignment: CrossAxisAlignment.start,
         children: [
           _buildTextField(),
           _buildProtectionMeasuresText(),
@@ -37,18 +38,28 @@ class ExamToxicSubstance extends StatelessWidget {
 
   Widget _buildTextField() {
     return Container(
-      padding: const EdgeInsets.all(32).copyWith(top: 0),
-      child: TextField(
-        readOnly: true,
-        controller: TextEditingController(text: currentValue),
-        style: const TextStyle(fontSize: 30),
-        onTap: () async {
-          final result = await _showInputDialog(
-            title: currentFormObject.label ?? '',
-            initialValue: currentValue,
-          );
-          selectValueChange.call(result);
-        },
+      padding: const EdgeInsets.all(32).copyWith(top: 0, left: 0),
+      child: Row(
+        children: [
+          Text(
+            currentFormObject.label ?? '',
+            style: TextStyle(fontSize: 24),
+          ),
+          Expanded(
+            child: TextField(
+              readOnly: true,
+              controller: TextEditingController(text: currentValue),
+              style: const TextStyle(fontSize: 30),
+              onTap: () async {
+                final result = await _showInputDialog(
+                  title: currentFormObject.label ?? '',
+                  initialValue: currentValue,
+                );
+                selectValueChange.call(result);
+              },
+            ),
+          )
+        ],
       ),
     );
   }
@@ -56,10 +67,10 @@ class ExamToxicSubstance extends StatelessWidget {
   Widget _buildProtectionMeasuresText() {
     return Container(
       alignment: Alignment.centerLeft,
-      padding: const EdgeInsets.only(left: 32, bottom: 12),
+      padding: const EdgeInsets.only(bottom: 12),
       child: const Text(
         '防护措施:',
-        style: TextStyle(fontSize: 25),
+        style: TextStyle(fontSize: 24),
       ),
     );
   }
@@ -121,7 +132,8 @@ class ExamToxicSubstance extends StatelessWidget {
                 )
                 .toList(),
           ),
-          if (selectedValue == '2') _buildProtectionMeasureTextField(),
+          if (selectedValue == '2')
+            Expanded(child: _buildProtectionMeasureTextField()),
         ],
       ),
     );
@@ -132,8 +144,7 @@ class ExamToxicSubstance extends StatelessWidget {
       child: Row(
         children: [
           const SizedBox(width: 16),
-          SizedBox(
-            width: 200,
+          Expanded(
             child: TextField(
               readOnly: true,
               controller: TextEditingController(

+ 11 - 3
lib/pages/check/widgets/new_configurable_card.dart

@@ -180,14 +180,14 @@ class NewConfigurableFormState extends State<NewConfigurableCard> {
     }
     formValue.addAll(newMap);
 
-    ///submit会保存已检测的数据至此条体检记录中
-    submit();
+    ///submitExamData会保存已检测的数据至此条体检记录中
+    submitExamData();
     if (mounted) {
       setState(() {});
     }
   }
 
-  Future<void> submit() async {
+  Future<void> submitExamData() async {
     Map<String, dynamic> normalItems = {};
     Map<String, dynamic> urinaryItems = {};
     formValue.forEach((key, value) {
@@ -215,6 +215,14 @@ class NewConfigurableFormState extends State<NewConfigurableCard> {
     }
   }
 
+  Future<void> submit() async {
+    await widget.callBack(
+      widget.cardKey,
+      templateRelation[widget.cardKey]!,
+      jsonEncode(formValue),
+    );
+  }
+
   Future<void> initTemplate() async {
     Store.app.busy = true;
     await fetchTemplateIndex();

+ 2 - 0
lib/pages/patient/info/controller.dart

@@ -36,6 +36,8 @@ class PatientInfoController extends FControllerBase {
   void onReady() {
     super.onReady();
     patientInfomationState.code = cardNo;
+    // 不自动同步户籍地址到现住地
+    patientInfomationState.isSyncAddresses = false;
     Get.find<IServicePackManager>().getServicePackList(ServicePackPageRequest(
       pageIndex: 1,
       pageSize: 20,