|
@@ -261,11 +261,18 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
@@ -261,11 +261,18 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
261
|
in tableManagerModel.tableOuterList[i].list) {
|
261
|
in tableManagerModel.tableOuterList[i].list) {
|
|
262
|
item.selected = false;
|
262
|
item.selected = false;
|
|
263
|
}
|
263
|
}
|
|
|
|
264
|
+ tableManagerModel.tableOuterList[i].selectTables = [];
|
|
264
|
//单选
|
265
|
//单选
|
|
265
|
setState(() {
|
266
|
setState(() {
|
|
266
|
table.selected = true;
|
267
|
table.selected = true;
|
|
267
|
});
|
268
|
});
|
|
268
|
}
|
269
|
}
|
|
|
|
270
|
+ if (table.selected) {
|
|
|
|
271
|
+ tableManagerModel.tableOuterList[i].selectTables.add(table);
|
|
|
|
272
|
+ } else {
|
|
|
|
273
|
+ tableManagerModel.tableOuterList[i].selectTables
|
|
|
|
274
|
+ .removeWhere((t) => t.id == table.id);
|
|
|
|
275
|
+ }
|
|
269
|
});
|
276
|
});
|
|
270
|
},
|
277
|
},
|
|
271
|
);
|
278
|
);
|
|
@@ -650,27 +657,45 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
@@ -650,27 +657,45 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
650
|
: Row(children: [
|
657
|
: Row(children: [
|
|
651
|
InkWell(
|
658
|
InkWell(
|
|
652
|
onTap: () {
|
659
|
onTap: () {
|
|
653
|
- for (t.Table item
|
|
|
|
654
|
- in tableManagerModel
|
660
|
+ tableManagerModel
|
|
655
|
.tableOuterList[
|
661
|
.tableOuterList[
|
|
656
|
tableManagerModel
|
662
|
tableManagerModel
|
|
657
|
.selectNumber]
|
663
|
.selectNumber]
|
|
658
|
- .list) {
|
|
|
|
659
|
- item.selected =
|
|
|
|
660
|
- false;
|
|
|
|
661
|
- }
|
|
|
|
662
|
- setState(() {
|
|
|
|
663
|
- tableManagerModel
|
|
|
|
664
|
- .tableOuterList[
|
|
|
|
665
|
- tableManagerModel
|
|
|
|
666
|
- .selectNumber]
|
|
|
|
667
|
- .isSelect =
|
|
|
|
668
|
- !tableManagerModel
|
664
|
+ .isSelect =
|
|
|
|
665
|
+ !tableManagerModel
|
|
|
|
666
|
+ .tableOuterList[
|
|
|
|
667
|
+ tableManagerModel
|
|
|
|
668
|
+ .selectNumber]
|
|
|
|
669
|
+ .isSelect;
|
|
|
|
670
|
+
|
|
|
|
671
|
+ if (!tableManagerModel
|
|
|
|
672
|
+ .tableOuterList[
|
|
|
|
673
|
+ tableManagerModel
|
|
|
|
674
|
+ .selectNumber]
|
|
|
|
675
|
+ .isSelect &&
|
|
|
|
676
|
+ tableManagerModel
|
|
|
|
677
|
+ .tableOuterList[
|
|
|
|
678
|
+ tableManagerModel
|
|
|
|
679
|
+ .selectNumber]
|
|
|
|
680
|
+ .selectTables
|
|
|
|
681
|
+ .length >
|
|
|
|
682
|
+ 1) {
|
|
|
|
683
|
+ for (t.Table item
|
|
|
|
684
|
+ in tableManagerModel
|
|
669
|
.tableOuterList[
|
685
|
.tableOuterList[
|
|
670
|
tableManagerModel
|
686
|
tableManagerModel
|
|
671
|
.selectNumber]
|
687
|
.selectNumber]
|
|
672
|
- .isSelect;
|
|
|
|
673
|
- });
|
688
|
+ .list) {
|
|
|
|
689
|
+ item.selected =
|
|
|
|
690
|
+ false;
|
|
|
|
691
|
+ }
|
|
|
|
692
|
+ tableManagerModel
|
|
|
|
693
|
+ .tableOuterList[
|
|
|
|
694
|
+ tableManagerModel
|
|
|
|
695
|
+ .selectNumber]
|
|
|
|
696
|
+ .selectTables = [];
|
|
|
|
697
|
+ }
|
|
|
|
698
|
+ setState(() {});
|
|
674
|
},
|
699
|
},
|
|
675
|
child: Row(
|
700
|
child: Row(
|
|
676
|
children: [
|
701
|
children: [
|
|
@@ -709,6 +734,11 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
@@ -709,6 +734,11 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
709
|
? InkWell(
|
734
|
? InkWell(
|
|
710
|
onTap: () {
|
735
|
onTap: () {
|
|
711
|
tableManagerModel
|
736
|
tableManagerModel
|
|
|
|
737
|
+ .tableOuterList[
|
|
|
|
738
|
+ tableManagerModel
|
|
|
|
739
|
+ .selectNumber]
|
|
|
|
740
|
+ .selectTables = [];
|
|
|
|
741
|
+ tableManagerModel
|
|
712
|
.tableOuterList[
|
742
|
.tableOuterList[
|
|
713
|
tableManagerModel
|
743
|
tableManagerModel
|
|
714
|
.selectNumber]
|
744
|
.selectNumber]
|
|
@@ -730,6 +760,13 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
@@ -730,6 +760,13 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { |
|
730
|
.list) {
|
760
|
.list) {
|
|
731
|
item.selected =
|
761
|
item.selected =
|
|
732
|
true;
|
762
|
true;
|
|
|
|
763
|
+ tableManagerModel
|
|
|
|
764
|
+ .tableOuterList[
|
|
|
|
765
|
+ tableManagerModel
|
|
|
|
766
|
+ .selectNumber]
|
|
|
|
767
|
+ .selectTables
|
|
|
|
768
|
+ .add(
|
|
|
|
769
|
+ item);
|
|
733
|
}
|
770
|
}
|
|
734
|
} else {
|
771
|
} else {
|
|
735
|
for (t.Table item
|
772
|
for (t.Table item
|