|
@@ -1,9 +1,9 @@
|
|
|
import 'package:fis_common/logger/logger.dart';
|
|
|
-import 'package:fis_jsonrpc/rpc.dart';
|
|
|
import 'package:fis_measure/interfaces/process/items/item.dart';
|
|
|
import 'package:fis_measure/interfaces/process/items/item_metas.dart';
|
|
|
import 'package:fis_measure/interfaces/process/player/play_controller.dart';
|
|
|
import 'package:fis_measure/interfaces/process/workspace/application.dart';
|
|
|
+import 'package:fis_measure/process/items/item_meta_convert.dart';
|
|
|
import 'package:fis_measure/process/workspace/measure_data_controller.dart';
|
|
|
import 'package:fis_measure/process/workspace/measure_handler.dart';
|
|
|
import 'package:fis_measure/view/player/controller.dart';
|
|
@@ -11,7 +11,6 @@ import 'package:fis_ui/index.dart';
|
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:get/get.dart';
|
|
|
import 'package:vid/us/vid_us_image.dart';
|
|
|
-import 'package:vid/us/vid_us_unit.dart';
|
|
|
|
|
|
/// 测量项页面
|
|
|
class LeftSiderSelectMeasure extends FStatefulWidget {
|
|
@@ -83,48 +82,7 @@ class LeftSiderSelectMeasureState extends FState<LeftSiderSelectMeasure> {
|
|
|
List<ItemMeta> itemMetaList = [];
|
|
|
for (var element in measureData.itemMetaList) {
|
|
|
if (measureData.getMeasureApplicationList.contains(element.name)) {
|
|
|
- List<ItemOutputMeta> itemOutputMeta = [];
|
|
|
- String? multiMethod;
|
|
|
- List<OutputItemMetaDTO> availableOutputs =
|
|
|
- element.calculator?.availableOutputs ?? [];
|
|
|
- for (var element in availableOutputs) {
|
|
|
- itemOutputMeta.add(
|
|
|
- ItemOutputMeta(
|
|
|
- element.name ?? '',
|
|
|
- element.description ?? '',
|
|
|
- VidUsUnitMap.getUnit(element.unit),
|
|
|
- ),
|
|
|
- );
|
|
|
- }
|
|
|
- List<ItemMeta> childItemMetas = [];
|
|
|
- if (element.multiMethodItems?.isNotEmpty ?? false) {
|
|
|
- ChildItemMetaDTO? itemMeta = element.multiMethodItems!
|
|
|
- .firstWhereOrNull((element) => element.isWorking == true);
|
|
|
- multiMethod = itemMeta?.name ?? '';
|
|
|
- List<ChildItemMetaDTO> childItems = itemMeta?.childItems ?? [];
|
|
|
-
|
|
|
- /// 组合测量项部分
|
|
|
- for (var element in childItems) {
|
|
|
- childItemMetas.add(
|
|
|
- ItemMeta(
|
|
|
- element.name ?? '',
|
|
|
- measureType: element.measureTypeName!,
|
|
|
- description: element.description ?? '',
|
|
|
- outputs: itemOutputMeta,
|
|
|
- childItems: childItemMetas,
|
|
|
- ),
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
- itemMetaList.add(
|
|
|
- ItemMeta(
|
|
|
- element.name ?? '',
|
|
|
- measureType: element.measureTypeName!,
|
|
|
- description: element.description ?? '',
|
|
|
- outputs: itemOutputMeta,
|
|
|
- childItems: childItemMetas,
|
|
|
- ),
|
|
|
- );
|
|
|
+ itemMetaList.add(element);
|
|
|
}
|
|
|
}
|
|
|
measureData.getItemMetaList = itemMetaList;
|
|
@@ -165,7 +123,10 @@ class LeftSiderSelectMeasureState extends FState<LeftSiderSelectMeasure> {
|
|
|
measureData.getMeasureApplicationList =
|
|
|
folders[0].workingItemNames ?? [];
|
|
|
if (folders[0].availableItems != null) {
|
|
|
- measureData.itemMetaList = folders[0].availableItems!.toList();
|
|
|
+ measureData.itemMetaList =
|
|
|
+ folders[0].availableItems!.map((element) {
|
|
|
+ return ItemMetaConverter(element).output();
|
|
|
+ }).toList();
|
|
|
comboList();
|
|
|
}
|
|
|
print('测量方法集: ${measureData.getMeasureApplicationList.toString()}');
|