Browse Source

0017748: 【新建档案】个人信息列表中的 健康史中的过敏史“药物过敏史”和“暴露史”,家族病史、遗传病史,选中无的情况下,无法切换其他选项

finlay 1 năm trước cách đây
mục cha
commit
ff1f72ebd6
1 tập tin đã thay đổi với 19 bổ sung15 xóa
  1. 19 15
      lib/components/dialog_check.dart

+ 19 - 15
lib/components/dialog_check.dart

@@ -116,21 +116,25 @@ class _VDialogCheckState<T, TValue> extends State<VDialogCheck<T, TValue>> {
               child: InkWell(
               child: InkWell(
             onTap: () {
             onTap: () {
               final val = widget.valueGetter(data);
               final val = widget.valueGetter(data);
-              if (!(widget.MutexValue != null &&
-                      initialValue.contains(widget.MutexValue)) ||
-                  val == widget.MutexValue) {
-                setState(() {
-                  if (val == widget.MutexValue &&
-                      !initialValue.contains(widget.MutexValue)) {
-                    initialValue.clear();
-                  }
-                  if (initialValue.contains(val)) {
-                    initialValue.remove(val);
-                  } else {
-                    initialValue.add(val);
-                  }
-                });
-              }
+              // if (!(widget.MutexValue != null &&
+              //         initialValue.contains(widget.MutexValue)) ||
+              //     val == widget.MutexValue) {
+              setState(() {
+                if ((val == widget.MutexValue &&
+                    !initialValue.contains(widget.MutexValue))) {
+                  initialValue.clear();
+                }
+                if (val != widget.MutexValue &&
+                    initialValue.contains(widget.MutexValue)) {
+                  initialValue.remove(widget.MutexValue);
+                }
+                if (initialValue.contains(val)) {
+                  initialValue.remove(val);
+                } else {
+                  initialValue.add(val);
+                }
+              });
+              // }
             },
             },
             child: widgetItem,
             child: widgetItem,
           )),
           )),