周睿 преди 1 година
родител
ревизия
a10917b386

+ 42 - 0
app_business/lib/generated/base.pb.dart

@@ -5161,6 +5161,9 @@ class ToActionBasicInfo extends $pb.GeneratedMessage {
     $core.int? actId,
     $core.String? actName,
     $core.int? totalControlNum,
+    $core.int? state,
+    $core.String? matchBt,
+    $core.String? matchEt,
   }) {
     final $result = create();
     if (actId != null) {
@@ -5172,6 +5175,15 @@ class ToActionBasicInfo extends $pb.GeneratedMessage {
     if (totalControlNum != null) {
       $result.totalControlNum = totalControlNum;
     }
+    if (state != null) {
+      $result.state = state;
+    }
+    if (matchBt != null) {
+      $result.matchBt = matchBt;
+    }
+    if (matchEt != null) {
+      $result.matchEt = matchEt;
+    }
     return $result;
   }
   ToActionBasicInfo._() : super();
@@ -5182,6 +5194,9 @@ class ToActionBasicInfo extends $pb.GeneratedMessage {
     ..a<$core.int>(1, _omitFieldNames ? '' : 'actId', $pb.PbFieldType.O3, protoName: 'actId')
     ..aOS(2, _omitFieldNames ? '' : 'actName', protoName: 'actName')
     ..a<$core.int>(3, _omitFieldNames ? '' : 'totalControlNum', $pb.PbFieldType.O3, protoName: 'totalControlNum')
+    ..a<$core.int>(4, _omitFieldNames ? '' : 'state', $pb.PbFieldType.O3)
+    ..aOS(5, _omitFieldNames ? '' : 'MatchBt', protoName: 'MatchBt')
+    ..aOS(6, _omitFieldNames ? '' : 'MatchEt', protoName: 'MatchEt')
     ..hasRequiredFields = false
   ;
 
@@ -5232,6 +5247,33 @@ class ToActionBasicInfo extends $pb.GeneratedMessage {
   $core.bool hasTotalControlNum() => $_has(2);
   @$pb.TagNumber(3)
   void clearTotalControlNum() => clearField(3);
+
+  @$pb.TagNumber(4)
+  $core.int get state => $_getIZ(3);
+  @$pb.TagNumber(4)
+  set state($core.int v) { $_setSignedInt32(3, v); }
+  @$pb.TagNumber(4)
+  $core.bool hasState() => $_has(3);
+  @$pb.TagNumber(4)
+  void clearState() => clearField(4);
+
+  @$pb.TagNumber(5)
+  $core.String get matchBt => $_getSZ(4);
+  @$pb.TagNumber(5)
+  set matchBt($core.String v) { $_setString(4, v); }
+  @$pb.TagNumber(5)
+  $core.bool hasMatchBt() => $_has(4);
+  @$pb.TagNumber(5)
+  void clearMatchBt() => clearField(5);
+
+  @$pb.TagNumber(6)
+  $core.String get matchEt => $_getSZ(5);
+  @$pb.TagNumber(6)
+  set matchEt($core.String v) { $_setString(5, v); }
+  @$pb.TagNumber(6)
+  $core.bool hasMatchEt() => $_has(5);
+  @$pb.TagNumber(6)
+  void clearMatchEt() => clearField(6);
 }
 
 class ToOrienteerInGameInfo extends $pb.GeneratedMessage {

+ 6 - 1
app_business/lib/generated/base.pbjson.dart

@@ -1235,13 +1235,18 @@ const ToActionBasicInfo$json = {
     {'1': 'actId', '3': 1, '4': 1, '5': 5, '10': 'actId'},
     {'1': 'actName', '3': 2, '4': 1, '5': 9, '10': 'actName'},
     {'1': 'totalControlNum', '3': 3, '4': 1, '5': 5, '10': 'totalControlNum'},
+    {'1': 'state', '3': 4, '4': 1, '5': 5, '10': 'state'},
+    {'1': 'MatchBt', '3': 5, '4': 1, '5': 9, '10': 'MatchBt'},
+    {'1': 'MatchEt', '3': 6, '4': 1, '5': 9, '10': 'MatchEt'},
   ],
 };
 
 /// Descriptor for `ToActionBasicInfo`. Decode as a `google.protobuf.DescriptorProto`.
 final $typed_data.Uint8List toActionBasicInfoDescriptor = $convert.base64Decode(
     'ChFUb0FjdGlvbkJhc2ljSW5mbxIUCgVhY3RJZBgBIAEoBVIFYWN0SWQSGAoHYWN0TmFtZRgCIA'
-    'EoCVIHYWN0TmFtZRIoCg90b3RhbENvbnRyb2xOdW0YAyABKAVSD3RvdGFsQ29udHJvbE51bQ==');
+    'EoCVIHYWN0TmFtZRIoCg90b3RhbENvbnRyb2xOdW0YAyABKAVSD3RvdGFsQ29udHJvbE51bRIU'
+    'CgVzdGF0ZRgEIAEoBVIFc3RhdGUSGAoHTWF0Y2hCdBgFIAEoCVIHTWF0Y2hCdBIYCgdNYXRjaE'
+    'V0GAYgASgJUgdNYXRjaEV0');
 
 @$core.Deprecated('Use toOrienteerInGameInfoDescriptor instead')
 const ToOrienteerInGameInfo$json = {

+ 106 - 0
app_business/lib/generated/track_offical.pb.dart

@@ -18,6 +18,70 @@ import 'base.pb.dart' as $0;
 import 'base.pbenum.dart' as $0;
 import 'google/protobuf/timestamp.pb.dart' as $2;
 
+class ToCooperationQueryReply extends $pb.GeneratedMessage {
+  factory ToCooperationQueryReply({
+    $core.String? name,
+    $core.int? leftMatchNum,
+  }) {
+    final $result = create();
+    if (name != null) {
+      $result.name = name;
+    }
+    if (leftMatchNum != null) {
+      $result.leftMatchNum = leftMatchNum;
+    }
+    return $result;
+  }
+  ToCooperationQueryReply._() : super();
+  factory ToCooperationQueryReply.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+  factory ToCooperationQueryReply.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ToCooperationQueryReply', package: const $pb.PackageName(_omitMessageNames ? '' : 'to.v1'), createEmptyInstance: create)
+    ..aOS(1, _omitFieldNames ? '' : 'name')
+    ..a<$core.int>(2, _omitFieldNames ? '' : 'leftMatchNum', $pb.PbFieldType.O3, protoName: 'leftMatchNum')
+    ..hasRequiredFields = false
+  ;
+
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
+  'Will be removed in next major version')
+  ToCooperationQueryReply clone() => ToCooperationQueryReply()..mergeFromMessage(this);
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+  'Will be removed in next major version')
+  ToCooperationQueryReply copyWith(void Function(ToCooperationQueryReply) updates) => super.copyWith((message) => updates(message as ToCooperationQueryReply)) as ToCooperationQueryReply;
+
+  $pb.BuilderInfo get info_ => _i;
+
+  @$core.pragma('dart2js:noInline')
+  static ToCooperationQueryReply create() => ToCooperationQueryReply._();
+  ToCooperationQueryReply createEmptyInstance() => create();
+  static $pb.PbList<ToCooperationQueryReply> createRepeated() => $pb.PbList<ToCooperationQueryReply>();
+  @$core.pragma('dart2js:noInline')
+  static ToCooperationQueryReply getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ToCooperationQueryReply>(create);
+  static ToCooperationQueryReply? _defaultInstance;
+
+  @$pb.TagNumber(1)
+  $core.String get name => $_getSZ(0);
+  @$pb.TagNumber(1)
+  set name($core.String v) { $_setString(0, v); }
+  @$pb.TagNumber(1)
+  $core.bool hasName() => $_has(0);
+  @$pb.TagNumber(1)
+  void clearName() => clearField(1);
+
+  @$pb.TagNumber(2)
+  $core.int get leftMatchNum => $_getIZ(1);
+  @$pb.TagNumber(2)
+  set leftMatchNum($core.int v) { $_setSignedInt32(1, v); }
+  @$pb.TagNumber(2)
+  $core.bool hasLeftMatchNum() => $_has(1);
+  @$pb.TagNumber(2)
+  void clearLeftMatchNum() => clearField(2);
+}
+
 class ToCourseChackMatchRequest extends $pb.GeneratedMessage {
   factory ToCourseChackMatchRequest({
     $core.int? id,
@@ -412,6 +476,9 @@ class MatchRegusterInfo extends $pb.GeneratedMessage {
     $core.bool? isAllowEdit,
     $core.bool? isAllowDel,
     $core.Iterable<ToChackInsInfo>? userList,
+    $core.int? state,
+    $core.String? matchBt,
+    $core.String? matchEt,
   }) {
     final $result = create();
     if (id != null) {
@@ -435,6 +502,15 @@ class MatchRegusterInfo extends $pb.GeneratedMessage {
     if (userList != null) {
       $result.userList.addAll(userList);
     }
+    if (state != null) {
+      $result.state = state;
+    }
+    if (matchBt != null) {
+      $result.matchBt = matchBt;
+    }
+    if (matchEt != null) {
+      $result.matchEt = matchEt;
+    }
     return $result;
   }
   MatchRegusterInfo._() : super();
@@ -449,6 +525,9 @@ class MatchRegusterInfo extends $pb.GeneratedMessage {
     ..aOB(5, _omitFieldNames ? '' : 'isAllowEdit', protoName: 'isAllowEdit')
     ..aOB(6, _omitFieldNames ? '' : 'isAllowDel', protoName: 'isAllowDel')
     ..pc<ToChackInsInfo>(7, _omitFieldNames ? '' : 'userList', $pb.PbFieldType.PM, protoName: 'userList', subBuilder: ToChackInsInfo.create)
+    ..a<$core.int>(8, _omitFieldNames ? '' : 'state', $pb.PbFieldType.O3)
+    ..aOS(9, _omitFieldNames ? '' : 'MatchBt', protoName: 'MatchBt')
+    ..aOS(10, _omitFieldNames ? '' : 'MatchEt', protoName: 'MatchEt')
     ..hasRequiredFields = false
   ;
 
@@ -529,6 +608,33 @@ class MatchRegusterInfo extends $pb.GeneratedMessage {
 
   @$pb.TagNumber(7)
   $core.List<ToChackInsInfo> get userList => $_getList(6);
+
+  @$pb.TagNumber(8)
+  $core.int get state => $_getIZ(7);
+  @$pb.TagNumber(8)
+  set state($core.int v) { $_setSignedInt32(7, v); }
+  @$pb.TagNumber(8)
+  $core.bool hasState() => $_has(7);
+  @$pb.TagNumber(8)
+  void clearState() => clearField(8);
+
+  @$pb.TagNumber(9)
+  $core.String get matchBt => $_getSZ(8);
+  @$pb.TagNumber(9)
+  set matchBt($core.String v) { $_setString(8, v); }
+  @$pb.TagNumber(9)
+  $core.bool hasMatchBt() => $_has(8);
+  @$pb.TagNumber(9)
+  void clearMatchBt() => clearField(9);
+
+  @$pb.TagNumber(10)
+  $core.String get matchEt => $_getSZ(9);
+  @$pb.TagNumber(10)
+  set matchEt($core.String v) { $_setString(9, v); }
+  @$pb.TagNumber(10)
+  $core.bool hasMatchEt() => $_has(9);
+  @$pb.TagNumber(10)
+  void clearMatchEt() => clearField(10);
 }
 
 ///

+ 40 - 0
app_business/lib/generated/track_offical.pbgrpc.dart

@@ -138,6 +138,14 @@ class ApiToClient extends $grpc.Client {
       '/to.v1.ApiTo/AllMatchChackInsForceResume',
       ($0.IdArrRequest value) => value.writeToBuffer(),
       ($core.List<$core.int> value) => $0.DefaultReply.fromBuffer(value));
+  static final _$allMatchChackInsDel = $grpc.ClientMethod<$0.IdArrRequest, $0.DefaultReply>(
+      '/to.v1.ApiTo/AllMatchChackInsDel',
+      ($0.IdArrRequest value) => value.writeToBuffer(),
+      ($core.List<$core.int> value) => $0.DefaultReply.fromBuffer(value));
+  static final _$toCooperationQuery = $grpc.ClientMethod<$0.DefaultRequest, $1.ToCooperationQueryReply>(
+      '/to.v1.ApiTo/ToCooperationQuery',
+      ($0.DefaultRequest value) => value.writeToBuffer(),
+      ($core.List<$core.int> value) => $1.ToCooperationQueryReply.fromBuffer(value));
 
   ApiToClient($grpc.ClientChannel channel,
       {$grpc.CallOptions? options,
@@ -260,6 +268,14 @@ class ApiToClient extends $grpc.Client {
   $grpc.ResponseFuture<$0.DefaultReply> allMatchChackInsForceResume($0.IdArrRequest request, {$grpc.CallOptions? options}) {
     return $createUnaryCall(_$allMatchChackInsForceResume, request, options: options);
   }
+
+  $grpc.ResponseFuture<$0.DefaultReply> allMatchChackInsDel($0.IdArrRequest request, {$grpc.CallOptions? options}) {
+    return $createUnaryCall(_$allMatchChackInsDel, request, options: options);
+  }
+
+  $grpc.ResponseFuture<$1.ToCooperationQueryReply> toCooperationQuery($0.DefaultRequest request, {$grpc.CallOptions? options}) {
+    return $createUnaryCall(_$toCooperationQuery, request, options: options);
+  }
 }
 
 @$pb.GrpcServiceName('to.v1.ApiTo')
@@ -470,6 +486,20 @@ abstract class ApiToServiceBase extends $grpc.Service {
         false,
         ($core.List<$core.int> value) => $0.IdArrRequest.fromBuffer(value),
         ($0.DefaultReply value) => value.writeToBuffer()));
+    $addMethod($grpc.ServiceMethod<$0.IdArrRequest, $0.DefaultReply>(
+        'AllMatchChackInsDel',
+        allMatchChackInsDel_Pre,
+        false,
+        false,
+        ($core.List<$core.int> value) => $0.IdArrRequest.fromBuffer(value),
+        ($0.DefaultReply value) => value.writeToBuffer()));
+    $addMethod($grpc.ServiceMethod<$0.DefaultRequest, $1.ToCooperationQueryReply>(
+        'ToCooperationQuery',
+        toCooperationQuery_Pre,
+        false,
+        false,
+        ($core.List<$core.int> value) => $0.DefaultRequest.fromBuffer(value),
+        ($1.ToCooperationQueryReply value) => value.writeToBuffer()));
   }
 
   $async.Future<$0.DefaultReply> toSendCodeToPhoneV2_Pre($grpc.ServiceCall call, $async.Future<$0.ToSendCodeToPhoneRequestV2> request) async {
@@ -588,6 +618,14 @@ abstract class ApiToServiceBase extends $grpc.Service {
     return allMatchChackInsForceResume(call, await request);
   }
 
+  $async.Future<$0.DefaultReply> allMatchChackInsDel_Pre($grpc.ServiceCall call, $async.Future<$0.IdArrRequest> request) async {
+    return allMatchChackInsDel(call, await request);
+  }
+
+  $async.Future<$1.ToCooperationQueryReply> toCooperationQuery_Pre($grpc.ServiceCall call, $async.Future<$0.DefaultRequest> request) async {
+    return toCooperationQuery(call, await request);
+  }
+
   $async.Future<$0.DefaultReply> toSendCodeToPhoneV2($grpc.ServiceCall call, $0.ToSendCodeToPhoneRequestV2 request);
   $async.Future<$0.GetSmsSendLeftTimeReply> toGetSmsSendLeftTimeV2($grpc.ServiceCall call, $0.GetSmsSendLeftTimeRequest request);
   $async.Future<$0.SignInReply> toSignInV2($grpc.ServiceCall call, $0.ToSignInRequestV2 request);
@@ -617,4 +655,6 @@ abstract class ApiToServiceBase extends $grpc.Service {
   $async.Future<$0.DefaultReply> allCourseChackMatch($grpc.ServiceCall call, $0.IdArrRequest request);
   $async.Future<$0.DefaultReply> allMatchChackInsStart($grpc.ServiceCall call, $0.IdArrRequest request);
   $async.Future<$0.DefaultReply> allMatchChackInsForceResume($grpc.ServiceCall call, $0.IdArrRequest request);
+  $async.Future<$0.DefaultReply> allMatchChackInsDel($grpc.ServiceCall call, $0.IdArrRequest request);
+  $async.Future<$1.ToCooperationQueryReply> toCooperationQuery($grpc.ServiceCall call, $0.DefaultRequest request);
 }

+ 19 - 1
app_business/lib/generated/track_offical.pbjson.dart

@@ -13,6 +13,20 @@ import 'dart:convert' as $convert;
 import 'dart:core' as $core;
 import 'dart:typed_data' as $typed_data;
 
+@$core.Deprecated('Use toCooperationQueryReplyDescriptor instead')
+const ToCooperationQueryReply$json = {
+  '1': 'ToCooperationQueryReply',
+  '2': [
+    {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'},
+    {'1': 'leftMatchNum', '3': 2, '4': 1, '5': 5, '10': 'leftMatchNum'},
+  ],
+};
+
+/// Descriptor for `ToCooperationQueryReply`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List toCooperationQueryReplyDescriptor = $convert.base64Decode(
+    'ChdUb0Nvb3BlcmF0aW9uUXVlcnlSZXBseRISCgRuYW1lGAEgASgJUgRuYW1lEiIKDGxlZnRNYX'
+    'RjaE51bRgCIAEoBVIMbGVmdE1hdGNoTnVt');
+
 @$core.Deprecated('Use toCourseChackMatchRequestDescriptor instead')
 const ToCourseChackMatchRequest$json = {
   '1': 'ToCourseChackMatchRequest',
@@ -112,6 +126,9 @@ const MatchRegusterInfo$json = {
     {'1': 'isAllowEdit', '3': 5, '4': 1, '5': 8, '10': 'isAllowEdit'},
     {'1': 'isAllowDel', '3': 6, '4': 1, '5': 8, '10': 'isAllowDel'},
     {'1': 'userList', '3': 7, '4': 3, '5': 11, '6': '.to.v1.ToChackInsInfo', '10': 'userList'},
+    {'1': 'state', '3': 8, '4': 1, '5': 5, '10': 'state'},
+    {'1': 'MatchBt', '3': 9, '4': 1, '5': 9, '10': 'MatchBt'},
+    {'1': 'MatchEt', '3': 10, '4': 1, '5': 9, '10': 'MatchEt'},
   ],
 };
 
@@ -121,7 +138,8 @@ final $typed_data.Uint8List matchRegusterInfoDescriptor = $convert.base64Decode(
     'IiCgx0b3RhbFVzZXJOdW0YAyABKAVSDHRvdGFsVXNlck51bRIWCgZxckNvZGUYBCABKAlSBnFy'
     'Q29kZRIgCgtpc0FsbG93RWRpdBgFIAEoCFILaXNBbGxvd0VkaXQSHgoKaXNBbGxvd0RlbBgGIA'
     'EoCFIKaXNBbGxvd0RlbBIxCgh1c2VyTGlzdBgHIAMoCzIVLnRvLnYxLlRvQ2hhY2tJbnNJbmZv'
-    'Ugh1c2VyTGlzdA==');
+    'Ugh1c2VyTGlzdBIUCgVzdGF0ZRgIIAEoBVIFc3RhdGUSGAoHTWF0Y2hCdBgJIAEoCVIHTWF0Y2'
+    'hCdBIYCgdNYXRjaEV0GAogASgJUgdNYXRjaEV0');
 
 @$core.Deprecated('Use toChackInsInfoDescriptor instead')
 const ToChackInsInfo$json = {

+ 9 - 1
app_business/lib/service/map_watch.dart

@@ -1,5 +1,6 @@
 import 'package:app_business/service/api.dart';
 import 'package:track_common/model.dart';
+import 'package:track_common/model/event_state.dart';
 import 'package:track_common/service/map_watch.dart';
 
 import '../generated/base.pb.dart' as pb;
@@ -64,7 +65,14 @@ class MapWatchImpl extends MapWatch {
     final r = await _api.stub.toActionBasicQuery(IdRequest()..id = Int64(id));
     final event = EventInfoExt()
       ..name = r.actName
-      ..cpAllCount = r.totalControlNum;
+      ..cpAllCount = r.totalControlNum
+      ..startAt = r.matchBt
+      ..endAt = r.matchEt
+      ..state = switch (r.state) {
+        0 => EventState.idle,
+        1 => EventState.start,
+        _ => EventState.finish,
+      };
 
     return event;
   }

+ 11 - 0
app_business/lib/view/home/event_manage/event_manage.dart

@@ -335,6 +335,17 @@ class EventTitle extends GetView<EventManagerController> {
       AppTitleList(
         title: data.name,
         tail: Text('${data.userList.length}'),
+        subtitle: Text.rich(TextSpan(
+            text: '比赛时间:${data.startAt} - ${data.endAt}  ',
+            style: const TextStyle(
+                fontSize: 9.9,
+                fontWeight: FontWeight.w500,
+                color: Color(0xff818181)),
+            children: [
+              TextSpan(
+                  text: data.state.toString(),
+                  style: TextStyle(color: data.state.toColor()))
+            ])),
         isSelected: selected,
         onTap: onTap,
       )

+ 11 - 0
app_business/lib/view/home/event_manage/event_manage_controller.dart

@@ -2,6 +2,7 @@ import 'dart:collection';
 
 import 'package:app_business/generated/base.pbenum.dart';
 import 'package:app_business/service/api.dart';
+import 'package:track_common/model/event_state.dart';
 import 'package:track_common/service/map_watch.dart';
 import 'package:track_common/track_common.dart';
 import 'package:track_common/widget.dart';
@@ -12,7 +13,10 @@ class EventInManage {
   String qrCode = '';
   var isAllowEdit = true;
   var isAllowDel = true;
+  var state = EventState.idle;
   var userList = <UserInManage>[];
+  var startAt = '';
+  var endAt = '';
 }
 
 enum UserState { idle, hasRoute, isStart, isFinish }
@@ -95,6 +99,13 @@ class EventManagerController extends GetxController {
             ..qrCode = e.qrCode
             ..isAllowEdit = e.isAllowEdit
             ..isAllowDel = e.isAllowDel
+            ..startAt = e.matchBt
+            ..endAt = e.matchEt
+            ..state = switch (e.state) {
+              0 => EventState.idle,
+              1 => EventState.start,
+              _ => EventState.finish,
+            }
             ..userList = e.userList
                 .map((u) => UserInManage()
                   ..id = u.oId

+ 23 - 11
app_business/lib/view/home/field_control.dart

@@ -1,4 +1,5 @@
 import 'package:app_business/service/api.dart';
+import 'package:grpc/grpc.dart';
 import 'package:track_common/service/map_watch.dart';
 import 'package:track_common/track_common.dart';
 import 'package:track_common/view/home/field_control/field_control.dart';
@@ -9,7 +10,7 @@ class FieldControlPageImpl extends FieldControlPage {
   const FieldControlPageImpl({super.key});
 
   @override
-  Widget get rightColumn {
+  Widget rightColumn(BuildContext context) {
     return Obx(() {
       final mapWatch = controller.mapWatch;
       debug('${identityHashCode(controller)}');
@@ -20,11 +21,12 @@ class FieldControlPageImpl extends FieldControlPage {
           color: Colors.white,
           child: Column(
             children: [
-              SizedBox(
+              Container(
+                  padding: const EdgeInsets.only(bottom: 8),
                   width: double.infinity,
                   child: DarkButton(
                       onPressed: mapWatch != null
-                          ? () => _onTapRegister(mapWatch)
+                          ? () => _onTapRegister(context, mapWatch)
                           : null,
                       child: const Text('注册比赛'))),
               const Expanded(child: EventInfoView())
@@ -33,18 +35,28 @@ class FieldControlPageImpl extends FieldControlPage {
     });
   }
 
-  Future<void> _onTapRegister(MapWatch mapWatch) async {
+  Future<void> _onTapRegister(BuildContext context, MapWatch mapWatch) async {
     final r = await Get.dialog(const RegisterDialog(), arguments: mapWatch.id)
         as RegisterInfo?;
 
     if (r != null) {
-      Get.find<ApiService>().stub.toMatchRegusterAdd(ToMatchRegusterAddRequest()
-        ..actId = r.id
-        ..regName = r.name
-        ..startAt = r.startAt.toPb()
-        ..stopAt = r.stopAt.toPb()
-        ..isQueryPwd = r.passwordQuery != null
-        ..queryPasswd = r.passwordQuery ?? '');
+      Get.find<ApiService>()
+          .stub
+          .toMatchRegusterAdd(ToMatchRegusterAddRequest()
+            ..actId = r.id
+            ..regName = r.name
+            ..startAt = r.startAt.toPb()
+            ..stopAt = r.stopAt.toPb()
+            ..isQueryPwd = r.passwordQuery != null
+            ..queryPasswd = r.passwordQuery ?? '')
+          .then((p0) {}, onError: (e) {
+        if (e is GrpcError) {
+          if (context.mounted) {
+            ScaffoldMessenger.of(context)
+                .showSnackBar(SnackBar(content: Text('注册失败:{${e.message}')));
+          }
+        }
+      });
     }
   }
 }

+ 23 - 0
libs/track_common/lib/model/event_state.dart

@@ -0,0 +1,23 @@
+import 'package:flutter/material.dart';
+
+enum EventState {
+  idle,
+  start,
+  finish;
+
+  String toString() {
+    return switch (this) {
+      EventState.idle => '未开始',
+      EventState.start => '进行中',
+      EventState.finish => '已结束',
+    };
+  }
+
+  Color toColor() {
+    return switch (this) {
+      EventState.idle => Colors.blue,
+      EventState.start => Colors.green,
+      EventState.finish => Colors.orange,
+    };
+  }
+}

+ 4 - 0
libs/track_common/lib/service/map_watch.dart

@@ -3,6 +3,7 @@ import 'package:common_pub/service/controller.dart';
 import 'package:common_pub/ui/map_view/map_view.dart';
 import 'package:common_pub/ui/map_view/view_map_trace.dart';
 import 'package:track_common/model.dart';
+import 'package:track_common/model/event_state.dart';
 
 class Flag {
   Flag(this.value);
@@ -48,6 +49,9 @@ class EventInfo {
 class EventInfoExt {
   var name = '';
   var cpAllCount = 0;
+  String startAt = '';
+  String endAt = '';
+  EventState state = EventState.idle;
 }
 
 class PlayerOnMap {

+ 86 - 23
libs/track_common/lib/view/home/field_control/field_control.dart

@@ -74,12 +74,12 @@ abstract class FieldControlPage extends GetView<FieldControlController> {
             _MsgView(),
           ],
         )),
-        rightColumn
+        rightColumn(context)
       ],
     );
   }
 
-  Widget get rightColumn;
+  Widget rightColumn(BuildContext context);
 }
 
 class _MapView extends GetView<FieldControlController> {
@@ -186,25 +186,7 @@ class EventInfoView extends GetView<FieldControlController> {
   }
 
   Widget activeView(EventOnMap info) {
-    final children = <Widget>[
-      Row(children: [
-        Expanded(
-            child: Text(
-          '${info.name} (${info.userList.length}人)',
-          maxLines: 1,
-        )),
-        const SizedBox(
-          width: 8,
-        ),
-        IconButton(
-            onPressed: () {
-              info.isHide.value = !info.isHide.value;
-            },
-            icon: info.isHide.value
-                ? const Icon(Icons.arrow_drop_down)
-                : const Icon(Icons.arrow_drop_up))
-      ]),
-    ];
+    final children = <Widget>[];
 
     if (!info.isHide.value) {
       children.addAll([
@@ -233,9 +215,90 @@ class EventInfoView extends GetView<FieldControlController> {
       decoration: BoxDecoration(
           color: const Color(0xffe0e0e0),
           borderRadius: BorderRadius.circular(5)),
-      padding: const EdgeInsets.all(9),
       child: Column(
-        children: children,
+        mainAxisSize: MainAxisSize.min,
+        children: [
+          Container(
+              decoration: BoxDecoration(
+                  color: Colors.white,
+                  borderRadius: BorderRadius.circular(5),
+                  boxShadow: [
+                    BoxShadow(color: const Color(0x4d000000), blurRadius: 6)
+                  ]),
+              padding: EdgeInsets.only(left: 21, top: 10, bottom: 7, right: 6),
+              child: Row(
+                children: [
+                  Expanded(
+                      child: Column(
+                    crossAxisAlignment: CrossAxisAlignment.start,
+                    mainAxisSize: MainAxisSize.min,
+                    children: [
+                      Text.rich(
+                        TextSpan(
+                            text: '${info.name} ',
+                            style: TextStyle(
+                                fontWeight: FontWeight.w700,
+                                fontSize: 14.22,
+                                color: Color(0xff333333)),
+                            children: [
+                              TextSpan(
+                                  text: '(${info.userList.length}人)',
+                                  style: TextStyle(
+                                      fontSize: 11.4,
+                                      fontWeight: FontWeight.w500))
+                            ]),
+                        maxLines: 1,
+                      ),
+                      const SizedBox(height: 6),
+                      Text.rich(TextSpan(
+                          text:
+                              '比赛时间:${info.ext.startAt} - ${info.ext.endAt}  ',
+                          style: TextStyle(
+                              fontSize: 9.96,
+                              color: Color(0xff818181),
+                              fontWeight: FontWeight.w500),
+                          children: [
+                            TextSpan(
+                                text: info.ext.state.toString(),
+                                style:
+                                    TextStyle(color: info.ext.state.toColor()))
+                          ]))
+                    ],
+                  )),
+                  IconButton(
+                      onPressed: () {
+                        info.isHide.value = !info.isHide.value;
+                      },
+                      icon: info.isHide.value
+                          ? const Icon(Icons.arrow_drop_down)
+                          : const Icon(Icons.arrow_drop_up))
+                ],
+              )),
+
+          Padding(
+            padding: EdgeInsets.symmetric(
+                horizontal: 6.3, vertical: info.isHide.value ? 0 : 6.3),
+            child: Column(
+              mainAxisSize: MainAxisSize.min,
+              children: children,
+            ),
+          )
+          //     Row (
+          //       children: [
+          //          Expanded(child:  Column(
+          //
+          //             children: [
+          //
+
+          //           const SizedBox(
+          //             width: 8,
+          //           ),
+
+          //         ],
+
+          //       ],
+          //     )),
+        ],
       ),
     );
   }

+ 18 - 8
libs/track_common/lib/widget/app_title_list.dart

@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
 
 class AppTitleList extends StatelessWidget {
   final String title;
+  final Widget? subtitle;
   final Widget tail;
   final bool isSelected;
   final VoidCallback? onTap;
@@ -11,17 +12,26 @@ class AppTitleList extends StatelessWidget {
       required this.title,
       required this.tail,
       required this.isSelected,
+      this.subtitle,
       this.onTap});
 
   @override
   Widget build(BuildContext context) {
+    final titleWidget = Text(
+      title,
+      style: const TextStyle(
+          fontSize: 14.22,
+          fontWeight: FontWeight.w700,
+          color: Color(0xff333333)),
+    );
+
     return GestureDetector(
         onTap: onTap,
         child: Container(
           decoration: const BoxDecoration(color: Colors.white, boxShadow: [
             BoxShadow(color: Color(0x4d000000), blurRadius: 3.5)
           ]),
-          height: 41.96,
+          height: 55.5,
           width: double.infinity,
           margin: const EdgeInsets.only(top: 7),
           padding: const EdgeInsets.only(right: 11),
@@ -35,13 +45,13 @@ class AppTitleList extends StatelessWidget {
                     isSelected ? const Color(0xffff870d) : Colors.transparent,
               ),
               Expanded(
-                  child: Text(
-                title,
-                style: const TextStyle(
-                    fontSize: 14.22,
-                    fontWeight: FontWeight.w700,
-                    color: Color(0xff333333)),
-              )),
+                  child: subtitle != null
+                      ? Column(
+                          mainAxisSize: MainAxisSize.min,
+                          crossAxisAlignment: CrossAxisAlignment.start,
+                          children: [titleWidget, subtitle!!],
+                        )
+                      : titleWidget),
               const SizedBox(width: 8),
               tail
             ],

+ 1 - 1
protos/app_api

@@ -1 +1 @@
-Subproject commit 829752d471dc1fd10a59110483db3932f3ff8b81
+Subproject commit a140647de14d3b06bc26b37419cc230f009fbcef