周睿 2 éve
szülő
commit
b5b8bc1a10

+ 15 - 1
lib/service/map_watch.dart

@@ -185,8 +185,22 @@ class UserInfo {
       cpList.first.isStart = true;
       cpList.last.isFinish = true;
     }
+    var index = 0;
     for (var cp in gameInfo.gameSaveInfo.checkedSortedList) {
-      cpMap[cp.controlPointId.toInt()]!.isSuccess = cp.isCheckSuccess;
+      if(cp.isCheckSuccess){
+        for(var i = index; i < cpList.length; i++){
+          final want = cpList[i];
+          if(want.intId == cp.controlPointId){
+            want.isSuccess=true;
+            index++;
+            break;
+          }
+        }
+      }
+
+
+
+      // cpMap[cp.controlPointId.toInt()]!.isSuccess = cp.isCheckSuccess;
     }
 
     for (var cp in cpList) {

+ 2 - 0
lib/view/home/data_detail/data_detail_controller.dart

@@ -5,6 +5,7 @@ import 'package:common_pub/model/history_detail.dart';
 import 'package:application/service/api.dart';
 import 'package:application/service/map_watch.dart';
 import 'package:common_pub/ui/history_detail/trace_bar.dart';
+import 'package:common_pub/ui/map_view/view_map_cp.dart';
 import 'package:common_pub/ui/map_view/view_map_trace.dart';
 import 'package:fixnum/fixnum.dart';
 import 'package:get/get.dart';
@@ -37,6 +38,7 @@ class DataDetailController extends GetxController {
   final viewMapTraceController = ViewMapTraceController();
   StreamSubscription<int?>? _subscriptionTrace;
   final selectedLoading = false.obs;
+  final viewCPController = ViewMapCPController();
 
   @override
   void onInit() {

+ 38 - 4
lib/view/home/field_control/field_control.dart

@@ -69,13 +69,15 @@ class FieldControlPage extends StatelessWidget {
       ViewMapTouch(map.plugMap)
     ]);
 
+
     return Row(
       children: [
         Expanded(
             child: Column(
           children: [
-            Expanded(
-                child: ViewMapStack(plug: map.plugMap, children: children)),
+            _MapView(),
+            // Expanded(
+            //     child: ViewMapStack(plug: map.plugMap, children: children)),
             _MsgView(),
           ],
         )),
@@ -84,7 +86,38 @@ class FieldControlPage extends StatelessWidget {
     );
   }
 }
+class _MapView extends GetView<FieldControlController>{
+  @override
+  Widget build(BuildContext context) {
+    return Expanded(child: ViewMapStack(plug: controller.mapWatch!.plugMap, children: [
+      Obx((){
+        final map = controller.mapWatch!;
+        final children = <Widget>[
+          ViewPlugLoading(map.plugMap),
+          ViewMapImage(map.plugMap),
+        ];
+
+        final focusUser = controller.focusUser;
+        if (focusUser != null) {
+          children.add(ViewMapCP(
+            // key:UniqueKey(),
+            map.plugMap,
+            cpWantAndHistoryList: focusUser.cpList,
+            isHideRouteBeforeStart: false,
+            controller: controller.viewCpController,
+          ));
+        }
+
+        children.addAll([
+          _ViewTrace(map: map, traceDuration: 30.seconds),
+          ViewMapTouch(map.plugMap)
+        ]);
+        return SizedBox.expand(child: Stack(children: children,),);
+      })
+    ], ));
+  }
 
+}
 class _ViewTrace extends GetView<FieldControlController> {
   const _ViewTrace({required this.map, required this.traceDuration});
 
@@ -147,8 +180,9 @@ class _ActiveInfoView extends GetView<FieldControlController> {
   Widget activeView(ActiveInfo info) {
     final children = <Widget>[
       Row(children: [
-        Text('${info.name} (${info.userList.length}人)'),
-        const Spacer(),
+        Expanded(child: Text('${info.name} (${info.userList.length}人)', maxLines: 1,))
+        ,
+        const SizedBox(width: 8,),
         IconButton(
             onPressed: () {
               info.isHide.value = !info.isHide.value;

+ 1 - 1
pubspec.yaml

@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
 # In Windows, build-name is used as the major, minor, and patch parts
 # of the product and file versions while build-number is used as the build suffix.
-version: 1.0.4+1
+version: 1.0.6+1
 
 environment:
   sdk: '>=3.0.6 <4.0.0'

+ 1 - 1
third_party/common_pub

@@ -1 +1 @@
-Subproject commit 1f1aaed8ef70130fee50f9001556b5f813cd6075
+Subproject commit f1bd8a9cb6b440783815157eea4246ef5b93d676