|
@@ -1,4 +1,5 @@
|
|
|
import 'package:fis_i18n/i18n.dart';
|
|
|
+import 'package:fis_measure/interfaces/enums/annotation.dart';
|
|
|
import 'package:fis_measure/interfaces/process/player/play_controller.dart';
|
|
|
import 'package:fis_measure/interfaces/process/workspace/application.dart';
|
|
|
import 'package:fis_measure/interfaces/process/workspace/exam_info.dart';
|
|
@@ -7,6 +8,7 @@ import 'package:fis_measure/process/workspace/measure_data_controller.dart';
|
|
|
import 'package:fis_measure/process/workspace/measure_handler.dart';
|
|
|
import 'package:fis_measure/view/measure/measure_config/measure_configuation_page.dart';
|
|
|
import 'package:fis_measure/view/measure/measure_config/widgets/measure_configuration_style.dart';
|
|
|
+import 'package:fis_measure/view/measure/measure_view_controller.dart';
|
|
|
import 'package:fis_measure/view/player/controller.dart';
|
|
|
import 'package:fis_theme/theme.dart';
|
|
|
import 'package:fis_ui/index.dart';
|
|
@@ -20,9 +22,9 @@ class MeasureSelectModel {
|
|
|
final String code;
|
|
|
}
|
|
|
|
|
|
-enum TagEnum {
|
|
|
- MeasureTool,
|
|
|
- NodesTool,
|
|
|
+enum TabEnum {
|
|
|
+ tabMeasureTool,
|
|
|
+ tabNodesTool,
|
|
|
}
|
|
|
|
|
|
/// 工具箱 样式配置之类
|
|
@@ -147,28 +149,44 @@ class _LeftSiderTabBarState extends State<_LeftSiderTabBar>
|
|
|
application = Get.find<IApplication>();
|
|
|
if (application.isSingleFrame) {
|
|
|
if (application.visuals.length > 1) {
|
|
|
+ //多幅vid
|
|
|
tabs = [i18nBook.measure.annotationTool.t]
|
|
|
.map((e) => Center(child: Tab(text: e)))
|
|
|
.toList();
|
|
|
- measureHandler.changedTab = TagEnum.NodesTool;
|
|
|
+ changeTabTo(TabEnum.tabNodesTool);
|
|
|
} else {
|
|
|
tabs = [
|
|
|
i18nBook.measure.measureTool.t,
|
|
|
i18nBook.measure.annotationTool.t
|
|
|
].map((e) => Center(child: Tab(text: e))).toList();
|
|
|
- measureHandler.changedTab = TagEnum.MeasureTool;
|
|
|
+ changeTabTo(TabEnum.tabNodesTool);
|
|
|
}
|
|
|
} else {
|
|
|
tabs = [
|
|
|
i18nBook.measure.measureTool.t,
|
|
|
i18nBook.measure.annotationTool.t
|
|
|
].map((e) => Center(child: Tab(text: e))).toList();
|
|
|
- measureHandler.changedTab = TagEnum.MeasureTool;
|
|
|
+ changeTabTo(TabEnum.tabNodesTool);
|
|
|
}
|
|
|
setState(() {});
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ void changeTabTo(e) {
|
|
|
+ if (measureHandler.changedTab == e) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ measureHandler.changedTab = e;
|
|
|
+ if (e == TabEnum.tabMeasureTool) {
|
|
|
+ final measureMetaController = Get.find<MeasureMetaController>();
|
|
|
+ measureMetaController.setAvailableModes(measureData.currentMode);
|
|
|
+ measureMetaController.updateItemList();
|
|
|
+ } else {
|
|
|
+ final application = Get.find<IApplication>();
|
|
|
+ application.switchAnnotation(AnnotationType.label, "test");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
void onImageLoaded(Object sender, ExamImageInfo? e) {
|
|
|
if (!mounted) return;
|
|
|
initTab();
|
|
@@ -196,8 +214,10 @@ class _LeftSiderTabBarState extends State<_LeftSiderTabBar>
|
|
|
unselectedLabelColor: Colors.white,
|
|
|
onTap: (int index) {
|
|
|
try {
|
|
|
- measureHandler.changedTab = TagEnum.values[index];
|
|
|
- } catch (e) {}
|
|
|
+ changeTabTo(TabEnum.values[index]);
|
|
|
+ } catch (e) {
|
|
|
+ debugPrint(e.toString());
|
|
|
+ }
|
|
|
},
|
|
|
tabs: tabs,
|
|
|
controller: tabController,
|
|
@@ -205,27 +225,27 @@ class _LeftSiderTabBarState extends State<_LeftSiderTabBar>
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-class _LeftPulldown extends StatelessWidget implements FWidget {
|
|
|
- @override
|
|
|
- FWidget build(BuildContext context) {
|
|
|
- return FContainer(
|
|
|
- margin: const EdgeInsets.symmetric(vertical: 4),
|
|
|
- child: FSelect<MeasureSelectModel, String>(
|
|
|
- source: [
|
|
|
- MeasureSelectModel(
|
|
|
- name: 'General',
|
|
|
- code: 'General',
|
|
|
- )
|
|
|
- ],
|
|
|
- hintText: i18nBook.measure.selectMeasureItem.t,
|
|
|
- value: 'General',
|
|
|
- clearable: false,
|
|
|
- height: 36,
|
|
|
- width: 400,
|
|
|
- optionLabelExtractor: (data) => data.name,
|
|
|
- optionValueExtractor: (data) => data.code,
|
|
|
- onSelectChanged: (value, index) {},
|
|
|
- ),
|
|
|
- );
|
|
|
- }
|
|
|
-}
|
|
|
+// class _LeftPulldown extends StatelessWidget implements FWidget {
|
|
|
+// @override
|
|
|
+// FWidget build(BuildContext context) {
|
|
|
+// return FContainer(
|
|
|
+// margin: const EdgeInsets.symmetric(vertical: 4),
|
|
|
+// child: FSelect<MeasureSelectModel, String>(
|
|
|
+// source: [
|
|
|
+// MeasureSelectModel(
|
|
|
+// name: 'General',
|
|
|
+// code: 'General',
|
|
|
+// )
|
|
|
+// ],
|
|
|
+// hintText: i18nBook.measure.selectMeasureItem.t,
|
|
|
+// value: 'General',
|
|
|
+// clearable: false,
|
|
|
+// height: 36,
|
|
|
+// width: 400,
|
|
|
+// optionLabelExtractor: (data) => data.name,
|
|
|
+// optionValueExtractor: (data) => data.code,
|
|
|
+// onSelectChanged: (value, index) {},
|
|
|
+// ),
|
|
|
+// );
|
|
|
+// }
|
|
|
+// }
|