Browse Source

超声工作站图像预览逻辑提交

finlay 11 months ago
parent
commit
651cc30df4

+ 8 - 10
lib/pages/consultation_record_view/controller.dart

@@ -926,16 +926,14 @@ class ConsultationRecordViewController extends GetxController
             .getVitalRecordByPhysicalExamNumberAsync(medicalNumber);
         scanningImageManager.startScan(recordInfo.recordCode ?? '');
         Get.dialog(
-          VAlertDialog(
-            title: "图像采集-居民[${queryData.name}]",
-            width: 500,
-            content: CapturePage(),
-            showCancel: false,
-            confirmLabel: "完成",
-            onConfirm: () {
-              Get.back();
-              scanningImageManager.endScan(recordInfo.recordCode ?? '');
-            },
+          Dialog(
+            child: CapturePage(
+              title: "图像采集-居民[${queryData.name}]",
+              onClose: () {
+                Get.back();
+                scanningImageManager.endScan(recordInfo.recordCode ?? '');
+              },
+            ),
           ),
         );
       }

+ 60 - 33
lib/pages/consultation_record_view/widgets/capture_page.dart

@@ -4,6 +4,9 @@ import 'package:vitalapp/helper/sonopost_preview_helper.dart';
 import 'package:vitalapp/rpc.dart';
 
 class CapturePage extends StatefulWidget {
+  final String title;
+  final Function onClose;
+  const CapturePage({super.key, required this.title, required this.onClose});
   @override
   _CapturePageState createState() => _CapturePageState();
 }
@@ -29,50 +32,74 @@ class _CapturePageState extends State<CapturePage> {
   @override
   Widget build(BuildContext context) {
     return Container(
-      height: 300,
+      height: 800,
       alignment: Alignment.center,
-      child: Column(
+      child: Stack(
         children: [
-          Expanded(
-              child: Container(
-            child: ShellSonopostPlayer(
-              controller: controller,
-            ),
-          )),
-          SizedBox(
-            height: 10,
-          ),
-          Row(
-            mainAxisAlignment: MainAxisAlignment.center,
+          Column(
             children: [
               SizedBox(
-                width: 120,
-                height: 36,
-                child: VButton(
-                  child: Text("截图"),
-                  onTap: () {
-                    rpc.platform.keypadPressF1();
-                  },
-                ),
+                height: 10,
               ),
+              Text(
+                widget.title,
+                style: TextStyle(fontSize: 24),
+              ),
+              Expanded(
+                  child: Container(
+                child: ShellSonopostPlayer(
+                  controller: controller,
+                ),
+              )),
               SizedBox(
-                width: 30,
+                height: 10,
+              ),
+              Row(
+                mainAxisAlignment: MainAxisAlignment.center,
+                children: [
+                  SizedBox(
+                    width: 120,
+                    height: 36,
+                    child: VButton(
+                      child: Text("截图"),
+                      onTap: () {
+                        rpc.platform.keypadPressF1();
+                      },
+                    ),
+                  ),
+                  SizedBox(
+                    width: 30,
+                  ),
+                  SizedBox(
+                    width: 120,
+                    height: 36,
+                    child: VButton(
+                      child: Text(isRecording ? "结束录制" : "开始录制"),
+                      onTap: () {
+                        rpc.platform.keypadPressF2();
+                        setState(() {
+                          isRecording = !isRecording;
+                        });
+                      },
+                    ),
+                  ),
+                ],
               ),
               SizedBox(
-                width: 120,
-                height: 36,
-                child: VButton(
-                  child: Text(isRecording ? "结束录制" : "开始录制"),
-                  onTap: () {
-                    rpc.platform.keypadPressF2();
-                    setState(() {
-                      isRecording = !isRecording;
-                    });
-                  },
-                ),
+                height: 10,
               ),
             ],
           ),
+          Positioned(
+            top: 5,
+            right: 5,
+            child: IconButton(
+              onPressed: () {
+                widget.onClose();
+              },
+              icon: Icon(Icons.close),
+            ),
+          ),
         ],
       ),
     );

+ 2 - 2
pubspec.lock

@@ -407,8 +407,8 @@ packages:
     dependency: "direct main"
     description:
       path: "."
-      ref: "9165199dff"
-      resolved-ref: "9165199dff5dc380bc6179de3e5de8612f318f38"
+      ref: a4f9963351
+      resolved-ref: a4f9963351ec13cad26bc336b3a827462793adeb
       url: "http://git.ius.plus:88/Project-Wing/fis_lib_jsonrpc.git"
     source: git
     version: "0.0.1"

+ 2 - 2
pubspec.yaml

@@ -48,7 +48,7 @@ dependencies:
   fis_jsonrpc:
     git:
       url: http://git.ius.plus:88/Project-Wing/fis_lib_jsonrpc.git
-      ref: 9165199dff
+      ref: a4f9963351
   vnote_device_plugin:
     git:
       url: http://git.ius.plus/Project-Vital/FlutterDevicePlugin.git
@@ -162,7 +162,7 @@ dependency_overrides:
   fis_jsonrpc:
     git:
       url: http://git.ius.plus:88/Project-Wing/fis_lib_jsonrpc.git
-      ref: 9165199dff
+      ref: a4f9963351
     #path: ../fis_lib_jsonrpc
   fis_theme:
     git: