Browse Source

Merge branch 'master' of http://git.ius.plus/melon.yin/fis_lib_measure

melon.yin 2 years ago
parent
commit
00e5e1cddc

+ 8 - 0
lib/interfaces/process/items/terms.dart

@@ -6,11 +6,19 @@ class MeasureUnsupportedTerms {
     AntPelvic_Rest,
     AntPelvic_Valsalva,
     HR,
+    HC_AC,
+    FL_AC,
+    FL_HC,
+    TCD_AC,
   ];
   static const PSAD = "PSAD";
   static const AntPelvic_Rest = "Ant. Pelvic(Rest)";
   static const AntPelvic_Valsalva = "Ant. Pelvic(Valsalva)";
   static const HR = "HR";
+  static const HC_AC = "HC/AC";
+  static const FL_AC = "FL/AC";
+  static const FL_HC = "FL/HC";
+  static const TCD_AC = "TCD/AC";
 }
 
 class MeasureTerms {

+ 1 - 116
lib/view/measure/measure_config/widgets/measurement_tool_selection.dart

@@ -122,15 +122,6 @@ class _SelectModulePageState extends FState<SelectModulePage> {
     );
   }
 
-  // FContainer(
-  // onPressed: () {
-  //   removeChooseMeasure(
-  //     e.name ?? '',
-  //   );
-  // },
-  // style: const ButtonStyle(),
-  // child:
-
   /// 选中的测量项
   FWidget _buildSlected(ItemMetaDTO e) {
     return FGestureDetector(
@@ -231,113 +222,7 @@ class _SelectModulePageState extends FState<SelectModulePage> {
             } else {
               return _buildNoSlected(e);
             }
-          }
-              // ?
-              //  : FContainer(
-              //     width: 180,
-              //     height: 60,
-              //     child: FCenter(
-              //       child: FColumn(
-              //         mainAxisAlignment: MainAxisAlignment.center,
-              //         children: [
-              //           FText(
-              //             getValues(
-              //               e.name ?? '',
-              //             ),
-              //             style: const TextStyle(
-              //               color: Colors.black,
-              //             ),
-              //           ),
-              //           FText(
-              //             e.name ?? '',
-              //             style: const TextStyle(
-              //               color: Colors.black,
-              //             ),
-              //           ),
-              //         ],
-              //       ),
-              //     ),
-              //   ),
-              ).toList()
-
-          // List<FWidget>.generate(
-          //   e.itemMeta.length,
-          //   (index) {
-          //     return widget.chooseMeasureList.contains(
-          //       e.itemMeta[index].name,
-          //     )
-          //         ? FElevatedButton(
-          //             onPressed: () {
-          //               removeChooseMeasure(
-          //                 e.itemMeta[index].name ?? '',
-          //               );
-          //             },
-          //             style: const ButtonStyle(),
-          //             child: FContainer(
-          //               width: 180,
-          //               height: 60,
-          //               child: FCenter(
-          //                 child: FColumn(
-          //                   mainAxisAlignment: MainAxisAlignment.center,
-          //                   children: [
-          //                     FText(
-          //                       getValues(
-          //                         e.itemMeta[index].name ?? '',
-          //                       ),
-          //                       style: const TextStyle(
-          //                         color: Colors.white,
-          //                       ),
-          //                     ),
-          //                     FText(
-          //                       e.itemMeta[index].name ?? '',
-          //                       style: const TextStyle(
-          //                         color: Colors.white,
-          //                       ),
-          //                     ),
-          //                   ],
-          //                 ),
-          //               ),
-          //             ),
-          //           )
-          //         : FElevatedButton(
-          //             onPressed: () {
-          //               addChooseMeasure(
-          //                 e.itemMeta[index].name ?? '',
-          //               );
-          //             },
-          //             style: ButtonStyle(
-          //               backgroundColor: MaterialStateProperty.all(
-          //                 Colors.white,
-          //               ),
-          //             ),
-          //             child: FContainer(
-          //               width: 180,
-          //               height: 60,
-          //               child: FCenter(
-          //                 child: FColumn(
-          //                   mainAxisAlignment: MainAxisAlignment.center,
-          //                   children: [
-          //                     FText(
-          //                       getValues(
-          //                         e.itemMeta[index].name ?? '',
-          //                       ),
-          //                       style: const TextStyle(
-          //                         color: Colors.black,
-          //                       ),
-          //                     ),
-          //                     FText(
-          //                       e.itemMeta[index].name ?? '',
-          //                       style: const TextStyle(
-          //                         color: Colors.black,
-          //                       ),
-          //                     ),
-          //                   ],
-          //                 ),
-          //               ),
-          //             ),
-          //           );
-          //   },
-          ),
+          }).toList()),
     );
   }
 }

+ 1 - 6
lib/view/measure/measure_search_input.dart

@@ -63,18 +63,13 @@ class _LeftSelectInputState extends FState<LeftSelectInput> {
               color: Colors.transparent,
               child: FIconButton(
                 onPressed: () async {
-                  List<CommentItemDTO> measureCommentItemList =
-                      measureData.measureCommentItemResult;
                   if (commentItem.isEmpty) {
                     PromptBox.toast(i18nBook.measure.pleaseAddCcomment.t);
                   } else {
-                    measureCommentItemList.add(
-                      CommentItemDTO(text: commentItem),
-                    );
                     var result = await measureData.saveUserDefinedCommentsAsync(
                       application.applicationName,
                       application.categoryName,
-                      measureCommentItemList,
+                      [CommentItemDTO(text: commentItem)],
                     );
                     if (result ?? false) {
                       measureHandler.changedTab = TagEnum.MeasureTool;

+ 1 - 14
lib/view/measure/measure_tool.dart

@@ -37,7 +37,7 @@ class LeftSiderSelectMeasureState extends FState<LeftSiderSelectMeasure> {
   // final topMeasureItem = Get.put<ITopMeasureItem>();
 
   /// 当前选中的测量项目
-  String activeName = '';
+  late String activeName = measureData.getItemMetaList[0].name;
 
   /// 当前组合测量项
   ItemMeta? comboItemMeta;
@@ -83,19 +83,6 @@ class LeftSiderSelectMeasureState extends FState<LeftSiderSelectMeasure> {
     }
   }
 
-  /// 获取组合测量项
-  void comboList() {
-    /// 格式化数据
-    List<ItemMeta> itemMetaList = [];
-    for (var element in measureData.itemMetaList) {
-      if (measureData.getMeasureApplicationList.contains(element.name)) {
-        itemMetaList.add(element);
-      }
-    }
-    measureData.getItemMetaList = itemMetaList;
-    measureData.getTopItemMetaList = measureData.getItemMetaList;
-  }
-
   /// 获取当前图像的测量项,从第一帧取
   void currentFrameHandler(Object sender, VidUsImage e) async {
     List<String> getModes = [];

+ 7 - 0
lib/view/measure/measure_view.dart

@@ -338,6 +338,9 @@ class _MeasureLeftBoardState extends State<_MeasureLeftBoard> {
   /// 数据
   late final measureData = Get.find<MeasureDataController>();
 
+  /// 测量项控制器
+  final measureMetaController = Get.find<MeasureMetaController>();
+
   bool get exist3DData => measure3DViewController.exist3DData;
   bool get isShell => measure3DViewController.isShell;
 
@@ -354,6 +357,10 @@ class _MeasureLeftBoardState extends State<_MeasureLeftBoard> {
     Object sender,
     TagEnum? e,
   ) {
+    if (e == TagEnum.MeasureTool) {
+      measureMetaController.setAvailableModes(measureData.currentMode);
+      measureMetaController.changeItem(measureData.getItemMetaList[0]);
+    }
     setState(() {});
   }
 

+ 1 - 1
pubspec.yaml

@@ -96,7 +96,7 @@ dependency_overrides:
   fis_jsonrpc:
     git:
       url: http://git.ius.plus:88/Project-Wing/fis_lib_jsonrpc.git
-      ref: 06b2cae
+      ref: c8c5122
   fis_lib_business_components:
     git:
       url: http://git.ius.plus/bakamaka.guan/fis_lib_business_components.git