Преглед изворни кода

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

# Conflicts:
#	pubspec.lock
loki.wu пре 11 месеци
родитељ
комит
fbf4bfe725

+ 30 - 41
lib/pages/consultation_record_view/controller.dart

@@ -924,25 +924,20 @@ class ConsultationRecordViewController extends GetxController
       if (canScanning) {
         var recordInfo = await scanningImageManager
             .getVitalRecordByPhysicalExamNumberAsync(medicalNumber);
-        bool startResult =
-            await scanningImageManager.startScan(recordInfo.recordCode ?? '');
-        if (startResult) {
-          Get.dialog(
-            VAlertDialog(
+        scanningImageManager.startScan(recordInfo.recordCode ?? '');
+        Get.dialog(
+          Dialog(
+            child: CapturePage(
               title: "图像采集-居民[${queryData.name}]",
-              width: 500,
-              content: CapturePage(),
-              showCancel: false,
-              confirmLabel: "完成",
-              onConfirm: () {
+              onClose: () {
                 Get.back();
                 scanningImageManager.endScan(recordInfo.recordCode ?? '');
               },
             ),
-          );
-        } else {
-          PromptBox.toast("开启采图失败");
-        }
+          ),
+        );
+      } else {
+        PromptBox.toast("开启采图失败");
       }
     } else {
       PromptBox.toast("体检号不存在");
@@ -951,34 +946,28 @@ class ConsultationRecordViewController extends GetxController
 
   /// 获取设备列表
   Future<void> getPersonDeviceDropdownPageAsync() async {
-    try {
-      if (organizationLocatedList.isEmpty) {
-        personDeviceList = [];
-        personDeviceCount = 0;
-        isSelectAllDevice = false;
-      } else {
-        // var result = await userInfoManager.getPersonDeviceDropdownPage(
-        //   index: 1,
-        //   pageSize: 50,
-
-        //   restrictOrgCodes: selectedOrganizationLocated,
-        //   isIncloudReferral: true,
-        // );
-        // personDeviceList = result.pageData
-        //         ?.map((e) =>
-        //             FMutiSelectModel(code: e.key ?? '', name: e.value ?? ''))
-        //         .toList() ??
-        //     [];
-        // personDeviceCount = result.dataCount;
-      }
+    // var result = await userInfoManager.getPersonDeviceDropdownPage(
+    //   index: 1,
+    //   pageSize: 50,
 
-      deviceFilterController.text =
-          personDeviceList.map((e) => e.name).join('、');
-    } catch (e) {
-      printError(
-          info: "getPersonDeviceDropdownPageAsync exception:" + e.toString());
-      logger.e("getPersonDeviceDropdownPageAsync exception:", e);
-    }
+    //   restrictOrgCodes: selectedOrganizationLocated,
+    //   isIncloudReferral: true,
+    // );
+    // personDeviceList = result.pageData
+    //         ?.map((e) =>
+    //             FMutiSelectModel(code: e.key ?? '', name: e.value ?? ''))
+    //         .toList() ??
+    //     [];
+    // personDeviceCount = result.dataCount;
+    // }
+
+    //   deviceFilterController.text =
+    //       personDeviceList.map((e) => e.name).join('、');
+    // } catch (e) {
+    //   printError(
+    //       info: "getPersonDeviceDropdownPageAsync exception:" + e.toString());
+    //   logger.e("getPersonDeviceDropdownPageAsync exception:", e);
+    // }
   }
 
   // 移动端查看检查详情

+ 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),
+            ),
+          ),
         ],
       ),
     );

+ 1 - 1
pubspec.lock

@@ -407,7 +407,7 @@ packages:
     dependency: "direct main"
     description:
       path: "."
-      ref: a4f9963
+      ref: a4f9963351
       resolved-ref: a4f9963351ec13cad26bc336b3a827462793adeb
       url: "http://git.ius.plus:88/Project-Wing/fis_lib_jsonrpc.git"
     source: git

+ 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: a4f9963
+      ref: a4f9963351
     #path: ../fis_lib_jsonrpc
   fis_theme:
     git: