瀏覽代碼

1、体检血氧控件优化

guanxinyi 1 年之前
父節點
當前提交
9a672e940e

+ 1 - 1
lib/pages/check/examination/controller.dart

@@ -82,7 +82,7 @@ class ExaminationController extends GetxController {
     if (result ?? false) {
       try {
         template.save(data);
-        // PromptBox.toast('保存成功');
+        PromptBox.toast('保存成功');
       } catch (err) {
         PromptBox.toast('保存失败');
       }

+ 2 - 2
lib/pages/check/widgets/exam_configurable/exam_boold_oxygen.dart

@@ -41,14 +41,14 @@ class _ExamBloodOxygenState extends State<ExamBloodOxygen> {
             children: [
               ExamSideBar(
                 title: '血氧饱和度',
-                value: spO2,
+                value: widget.currentValue['Pulse_Frequency'] ?? '',
                 unit: '%',
                 onTap: () => _inputSpo2("血氧饱和度"),
               ),
               const Divider(indent: 3),
               ExamSideBar(
                 title: '脉率',
-                value: pulse,
+                value: widget.currentValue['Spo2'] ?? '',
                 unit: 'bpm',
                 onTap: () => _inputPulseFrequency("脉率"),
               ),

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

@@ -40,7 +40,6 @@ class NewConfigurableCard extends StatefulWidget {
   final String? examData;
 
   final FEventHandler<bool>? onSubmitEvent;
-  final FEventHandler<bool>? onCloseEvent;
   const NewConfigurableCard({
     super.key,
     required this.cardKey,
@@ -49,7 +48,6 @@ class NewConfigurableCard extends StatefulWidget {
     this.patientCode,
     this.examData,
     this.onSubmitEvent,
-    this.onCloseEvent,
   });
 
   @override
@@ -100,25 +98,19 @@ class NewConfigurableFormState extends State<NewConfigurableCard> {
       }
     });
     widget.onSubmitEvent?.addListener(submitEvent);
-    widget.onCloseEvent?.addListener(submitEvent);
   }
 
   @override
   void dispose() {
     super.dispose();
     widget.onSubmitEvent?.removeListener(submitEvent);
-    widget.onCloseEvent?.removeListener(submitEvent);
   }
 
   void submitEvent(sender, e) {
     if (e) {
-      submit();
-    }
-  }
-
-  void closeEvent(sender, e) {
-    if (e) {
-      submit();
+      if (formValue.isNotEmpty) {
+        submit();
+      }
     }
   }