Przeglądaj źródła

个人中心部分ui修改以及签名设置

finlay 1 rok temu
rodzic
commit
7e13adf504

+ 9 - 3
lib/pages/check/widgets/configurable_card.dart

@@ -3,7 +3,6 @@ import 'dart:convert';
 import 'package:fis_jsonrpc/rpc.dart';
 import 'package:flutter/material.dart';
 import 'package:get/get.dart';
-import 'package:vnoteapp/architecture/utils/prompt_box.dart';
 import 'package:vnoteapp/components/button.dart';
 import 'package:vnoteapp/components/dialog_input.dart';
 import 'package:vnoteapp/components/dialog_number.dart';
@@ -374,7 +373,14 @@ class _ConfigurableFormState extends State<ConfigurableCard> {
           MaterialColor currentColors = Colors.grey;
           e.value.children?.forEach((element) {
             if (formValue.containsKey(element.key)) {
-              currentColors = Colors.green;
+              if (!(widget.cardKey == 'LNRZYYJKGLFWJL' &&
+                  element.parentKey == 'Ping_Score')) {
+                currentColors = Colors.green;
+              } else if (element.key == 'qusition1') {
+                {
+                  currentColors = Colors.green;
+                }
+              }
             }
           });
           return TitleClipRect(
@@ -682,7 +688,7 @@ class _ConfigurableFormState extends State<ConfigurableCard> {
           }
         } else {
           score += formValue[element.key!] != null
-              ? (5 - int.parse(formValue[element.key!]!))
+              ? (6 - int.parse(formValue[element.key!]!))
               : 0;
         }
         index++;

+ 53 - 49
lib/pages/check/widgets/exam_configurable/exam_radio.dart

@@ -18,65 +18,69 @@ class ExamRadio extends StatelessWidget {
 
   @override
   Widget build(BuildContext context) {
-    return ExamCard(
-      titleText: ExamTitle(
-        label: currentFormObject.label,
-        titleType: '(单选)',
-      ),
-      title: currentFormObject.label ?? '',
-      content: Container(
-        padding: const EdgeInsets.symmetric(
-          horizontal: 5,
+    if (currentFormObject.showLimit ?? true) {
+      return ExamCard(
+        titleText: ExamTitle(
+          label: currentFormObject.label,
+          titleType: '(单选)',
         ),
-        alignment: currentFormObject.span == 24
-            ? Alignment.centerLeft
-            : Alignment.center,
-        width: double.infinity,
-        child: Wrap(
-          children: options
-              .map(
-                (e) => Container(
-                  padding: const EdgeInsets.all(7),
-                  child: InkWell(
-                    onTap: () => selectRaidoChange(e),
-                    borderRadius: BorderRadius.circular(50),
-                    child: Ink(
-                      decoration: BoxDecoration(
-                        border: Border.all(
+        title: currentFormObject.label ?? '',
+        content: Container(
+          padding: const EdgeInsets.symmetric(
+            horizontal: 5,
+          ),
+          alignment: currentFormObject.span == 24
+              ? Alignment.centerLeft
+              : Alignment.center,
+          width: double.infinity,
+          child: Wrap(
+            children: options
+                .map(
+                  (e) => Container(
+                    padding: const EdgeInsets.all(7),
+                    child: InkWell(
+                      onTap: () => selectRaidoChange(e),
+                      borderRadius: BorderRadius.circular(50),
+                      child: Ink(
+                        decoration: BoxDecoration(
+                          border: Border.all(
+                            color: currentSelected == e.value
+                                ? Colors.blue
+                                : Colors.black26,
+                          ),
+                          borderRadius: const BorderRadius.all(
+                            Radius.circular(50),
+                          ),
                           color: currentSelected == e.value
                               ? Colors.blue
-                              : Colors.black26,
+                              : Colors.transparent,
                         ),
-                        borderRadius: const BorderRadius.all(
-                          Radius.circular(50),
-                        ),
-                        color: currentSelected == e.value
-                            ? Colors.blue
-                            : Colors.transparent,
-                      ),
-                      child: Container(
-                        padding: const EdgeInsets.all(15),
-                        alignment: Alignment.center,
-                        width: 250,
-                        child: FittedBox(
-                          child: Text(
-                            e.label ?? '',
-                            style: TextStyle(
-                              fontSize: 20,
-                              color: currentSelected == e.value
-                                  ? Colors.white
-                                  : Colors.black54,
+                        child: Container(
+                          padding: const EdgeInsets.all(15),
+                          alignment: Alignment.center,
+                          width: 250,
+                          child: FittedBox(
+                            child: Text(
+                              e.label ?? '',
+                              style: TextStyle(
+                                fontSize: 20,
+                                color: currentSelected == e.value
+                                    ? Colors.white
+                                    : Colors.black54,
+                              ),
                             ),
                           ),
                         ),
                       ),
                     ),
                   ),
-                ),
-              )
-              .toList(),
+                )
+                .toList(),
+          ),
         ),
-      ),
-    );
+      );
+    } else {
+      return Container();
+    }
   }
 }

+ 33 - 31
lib/pages/home/personal_center/widgets/avatar.dart

@@ -13,35 +13,37 @@ class AvatarPage extends GetView<PersonalCenterController> {
   Widget build(BuildContext context) {
     return Padding(
       padding: const EdgeInsets.fromLTRB(0, 50, 10, 40),
-      child: Column(
+      child: Stack(
+        alignment: Alignment.center,
         children: [
-          GestureDetector(
-            child: Obx(
-              () => _buildHeadImageToken(controller.state.headImageToken),
-            ),
-          ),
-          const SizedBox(
-            height: 20,
+          Column(
+            children: [
+              GestureDetector(
+                child: Obx(
+                  () => _buildHeadImageToken(controller.state.headImageToken),
+                ),
+              ),
+              // VButton(
+              //   onTap: () {},
+              //   child: const Text(
+              //     '保存头像',
+              //     style: TextStyle(fontSize: 18),
+              //   ),
+              // )
+            ],
           ),
-          VButton(
-            onTap: () {
-              _openGallery();
-            },
-            child: const Text(
-              '选择头像',
-              style: TextStyle(fontSize: 18),
+          Positioned(
+            bottom: 78,
+            child: VButton(
+              onTap: () {
+                _openGallery();
+              },
+              child: const Text(
+                '选择头像',
+                style: TextStyle(fontSize: 18),
+              ),
             ),
           ),
-          const SizedBox(
-            height: 10,
-          ),
-          // VButton(
-          //   onTap: () {},
-          //   child: const Text(
-          //     '保存头像',
-          //     style: TextStyle(fontSize: 18),
-          //   ),
-          // )
         ],
       ),
     );
@@ -57,21 +59,21 @@ class AvatarPage extends GetView<PersonalCenterController> {
   Widget _buildHeadImageToken(String? headImageToken) {
     if (headImageToken?.isNotEmpty ?? false) {
       return ClipRRect(
-        borderRadius: BorderRadius.circular(200 / 2),
+        borderRadius: BorderRadius.circular(200),
         child: Image.network(
           headImageToken!,
-          width: 200,
-          height: 200,
+          width: 400,
+          height: 400,
           fit: BoxFit.cover,
         ),
       );
     }
     return ClipRRect(
-      borderRadius: BorderRadius.circular(200 / 2),
+      borderRadius: BorderRadius.circular(200),
       child: Image.asset(
         'assets/images/avatar.png',
-        width: 200,
-        height: 200,
+        width: 400,
+        height: 400,
         fit: BoxFit.cover,
       ),
     );

+ 2 - 2
lib/pages/home/personal_center/widgets/info.dart

@@ -54,8 +54,8 @@ class InfoPage extends GetView<PersonalCenterController> {
             ),
             Obx(
               () => VListFormCell(
-                label: "团队名称",
-                content: controller.state.teamName,
+                label: "用户角色",
+                content: controller.state.roleName,
               ),
             ),
             Obx(

+ 0 - 1
lib/pages/medical/records/view.dart

@@ -2,7 +2,6 @@ import 'package:fis_jsonrpc/services/diagnosis.m.dart';
 import 'package:flutter/material.dart';
 import 'package:get/get.dart';
 import 'package:intl/intl.dart';
-import 'package:vnoteapp/components/alert_dialog.dart';
 import 'package:vnoteapp/components/appbar.dart';
 import 'package:vnoteapp/components/dialog_table.dart';
 import 'package:vnoteapp/consts/styles.dart';

+ 0 - 19
lib/pages/settings/center/view.dart

@@ -3,8 +3,6 @@ import 'package:get/get.dart';
 import 'package:vnoteapp/components/alert_dialog.dart';
 import 'package:vnoteapp/components/side_nav/defines.dart';
 import 'package:vnoteapp/components/side_nav/side_nav.dart';
-import 'package:vnoteapp/pages/doctor/signature_setting/controller.dart';
-import 'package:vnoteapp/pages/doctor/signature_setting/view.dart';
 import 'package:vnoteapp/pages/settings/about/view.dart';
 import 'package:vnoteapp/pages/settings/devices/controller.dart';
 import 'package:vnoteapp/pages/settings/devices/view.dart';
@@ -27,28 +25,11 @@ class SettingCenterPage extends GetView<SettingCenterController> {
   List<VSideNavMenuItem> _buildItems() {
     final items = <VSideNavMenuItem>[];
     items.add(_buildDevicesSettingItem());
-    items.add(_buildSignatureItem());
     items.add(_buildAboutItem());
     items.add(_buildLogOutItem());
     return items;
   }
 
-  VSideNavMenuItem _buildSignatureItem() {
-    return VSideNavMenuItem(
-      title: "签名设置",
-      icon: Icon(Icons.edit_document, color: Colors.grey.shade700),
-      route: VRouteSetting(
-        "/signature",
-        () => const DoctorSignatureSettingPage(),
-        binding: BindingsBuilder(
-          () {
-            Get.lazyPut(() => DoctorSignatureSettingController());
-          },
-        ),
-      ),
-    );
-  }
-
   VSideNavMenuItem _buildDevicesSettingItem() {
     return VSideNavMenuItem(
       title: "设备管理",