|
|
@@ -199,6 +199,7 @@ class EventManage extends GetView<EventManagerController> {
|
|
|
snStr = one.bandSN;
|
|
|
}
|
|
|
|
|
|
+ final enable = controller.selected?.state == EventState.start;
|
|
|
return LineChartElem([
|
|
|
_CheckBox(one),
|
|
|
Text('${i + 1}'),
|
|
|
@@ -209,7 +210,7 @@ class EventManage extends GetView<EventManagerController> {
|
|
|
one.state == UserState.idle
|
|
|
? button(
|
|
|
color: Colors.blue,
|
|
|
- onPressed: () => routeSelect(one),
|
|
|
+ onPressed: enable ? () => routeSelect(one) : null,
|
|
|
text: '分发')
|
|
|
: Row(mainAxisSize: MainAxisSize.min, children: [
|
|
|
Expanded(
|
|
|
@@ -222,17 +223,21 @@ class EventManage extends GetView<EventManagerController> {
|
|
|
width: 32,
|
|
|
child: one.state == UserState.hasRoute
|
|
|
? GestureDetector(
|
|
|
- onTap: () => routeSelect(one),
|
|
|
+ onTap: enable ? () => routeSelect(one) : null,
|
|
|
child: const Icon(Icons.mode_edit_outline))
|
|
|
: const SizedBox())
|
|
|
]),
|
|
|
one.state == UserState.hasRoute
|
|
|
? button(
|
|
|
color: Colors.green,
|
|
|
- onPressed: () => controller.userStart(one),
|
|
|
+ onPressed: enable ? () => controller.userStart(one) : null,
|
|
|
text: '开始')
|
|
|
: Text(stateStr, style: TextStyle(color: stateColor)),
|
|
|
- button(text: optStr, color: optColor, isOutline: true, onPressed: opt)
|
|
|
+ button(
|
|
|
+ text: optStr,
|
|
|
+ color: optColor,
|
|
|
+ isOutline: true,
|
|
|
+ onPressed: enable ? opt : null)
|
|
|
]);
|
|
|
});
|
|
|
}
|