Parcourir la source

1、fixed:0016574: 【新建档案】偶现一次,从健康检测页面切换到新建档案页面,点击证件号无响应,无法弹出输入窗口,切换菜单后恢复正常

guanxinyi il y a 1 an
Parent
commit
ce8b4ad5da
2 fichiers modifiés avec 10 ajouts et 9 suppressions
  1. 4 7
      lib/pages/redirect/redirect.dart
  2. 6 2
      lib/routes/routes.dart

+ 4 - 7
lib/pages/redirect/redirect.dart

@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
 import 'package:get/get.dart';
 import 'package:vitalapp/routes/nav_ids.dart';
 import 'package:vitalapp/routes/routes.dart';
+import 'package:vitalapp/store/store.dart';
 
 class RedirectPage extends StatefulWidget {
   static bool _isBusy = false;
@@ -66,13 +67,9 @@ class _RedirectPageState extends State<RedirectPage> {
   @override
   Widget build(BuildContext context) {
     if (isLoading) {
-      return const Center(
-        child: SizedBox(
-          width: 50,
-          height: 50,
-          child: CircularProgressIndicator(),
-        ),
-      );
+      Store.app.setBusy("加载中...");
+    } else {
+      Store.app.busy = false;
     }
 
     return const SizedBox();

+ 6 - 2
lib/routes/routes.dart

@@ -163,7 +163,9 @@ class Routes {
       binding: BindingsBuilder(
         () {
           Get.lazyPut(() => CrowdLabelsController());
-          Get.lazyPut(() => CreatePatientController());
+          if (!Get.isRegistered<CreatePatientController>()) {
+            Get.lazyPut(() => CreatePatientController());
+          }
           Get.lazyPut(() => PatientListController());
           Get.lazyPut(() => PatientDetailController());
         },
@@ -177,7 +179,9 @@ class Routes {
       binding: BindingsBuilder(
         () {
           Get.lazyPut(() => CrowdLabelsController());
-          Get.lazyPut(() => CreatePatientController());
+          if (!Get.isRegistered<CreatePatientController>()) {
+            Get.lazyPut(() => CreatePatientController());
+          }
           Get.lazyPut(() => PatientListController());
           Get.lazyPut(() => PatientDetailController());
         },