|
@@ -143,13 +143,8 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
@@ -143,13 +143,8 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
143
|
if (j ==
|
143
|
if (j ==
|
|
144
|
_notebookDetailChangeModel.dateList.length - 1) {
|
144
|
_notebookDetailChangeModel.dateList.length - 1) {
|
|
145
|
String selectStr =
|
145
|
String selectStr =
|
|
146
|
- _notebookDetailChangeModel.dateList[2]['title'];
|
|
|
|
147
|
- String timeNow = DateUtil.formatDate(
|
|
|
|
148
|
- DateTime.now(),
|
|
|
|
149
|
- );
|
|
|
|
150
|
- String selectDate =
|
|
|
|
151
|
- timeNow.replaceRange(5, 10, selectStr);
|
|
|
|
152
|
- _calendWidget(DateUtil.getDateTime(selectDate));
|
146
|
+ _notebookDetailChangeModel.dateList[2]['title']+" 00:00:00";
|
|
|
|
147
|
+ _calendWidget(DateUtil.getDateTime(selectStr));
|
|
153
|
}
|
148
|
}
|
|
154
|
}
|
149
|
}
|
|
155
|
}
|
150
|
}
|
|
@@ -310,7 +305,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
@@ -310,7 +305,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
310
|
// _createDateText(day);
|
305
|
// _createDateText(day);
|
|
311
|
dateTime = day;
|
306
|
dateTime = day;
|
|
312
|
int dateTimeMill = day.millisecondsSinceEpoch;
|
307
|
int dateTimeMill = day.millisecondsSinceEpoch;
|
|
313
|
- String dateText = DateUtil.formatDateMs(dateTimeMill, format: 'MM-dd');
|
308
|
+ String dateText = DateUtil.formatDateMs(dateTimeMill, format: 'yyyy-MM-dd');
|
|
314
|
bool isThird = true;
|
309
|
bool isThird = true;
|
|
315
|
for (int i = 0; i < _notebookDetailChangeModel.dateList.length; i++) {
|
310
|
for (int i = 0; i < _notebookDetailChangeModel.dateList.length; i++) {
|
|
316
|
_notebookDetailChangeModel.dateList[i]['select'] = false;
|
311
|
_notebookDetailChangeModel.dateList[i]['select'] = false;
|
|
@@ -354,17 +349,13 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
@@ -354,17 +349,13 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
354
|
InkWell(
|
349
|
InkWell(
|
|
355
|
onTap: () async {
|
350
|
onTap: () async {
|
|
356
|
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
|
351
|
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
357
|
- //当前选中 月 日string
|
|
|
|
358
|
- String mdStr = '';
|
352
|
+ String ymyStr = ""; //年月日
|
|
359
|
//今天 明天 其他天
|
353
|
//今天 明天 其他天
|
|
360
|
for (var item in _notebookDetailChangeModel.dateList) {
|
354
|
for (var item in _notebookDetailChangeModel.dateList) {
|
|
361
|
if (item['select'] == true) {
|
355
|
if (item['select'] == true) {
|
|
362
|
- mdStr = item['title'];
|
356
|
+ ymyStr = item['title'];
|
|
363
|
}
|
357
|
}
|
|
364
|
}
|
358
|
}
|
|
365
|
- String timeNowYear =
|
|
|
|
366
|
- DateUtil.formatDate(DateTime.now(), format: 'yyyy');
|
|
|
|
367
|
- String ymyStr = timeNowYear + '-' + mdStr; //年月日
|
|
|
|
368
|
String timeStr = ymyStr + ' ' + "00:00:00";
|
359
|
String timeStr = ymyStr + ' ' + "00:00:00";
|
|
369
|
int ddate = DateUtil.getDateMsByTimeStr(timeStr); //筛选日期时间戳
|
360
|
int ddate = DateUtil.getDateMsByTimeStr(timeStr); //筛选日期时间戳
|
|
370
|
String ddateSolt = '';
|
361
|
String ddateSolt = '';
|
|
@@ -689,18 +680,9 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
@@ -689,18 +680,9 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
689
|
tempMndList = _notebookDetailChangeModel.dailyMap[key];
|
680
|
tempMndList = _notebookDetailChangeModel.dailyMap[key];
|
|
690
|
}
|
681
|
}
|
|
691
|
}
|
682
|
}
|
|
692
|
- //计算行数
|
|
|
|
693
|
-
|
|
|
|
694
|
- int line = 0;
|
|
|
|
695
|
- int count = tempMndList.length;
|
|
|
|
696
|
- if (count % 3 == 0) {
|
|
|
|
697
|
- line = int.parse('${count / 3}');
|
|
|
|
698
|
- } else {
|
|
|
|
699
|
- line = (count / 3).ceil();
|
|
|
|
700
|
- }
|
|
|
|
701
|
- int height = 85 + 40 + 36 * line + (line - 1) * 15;
|
|
|
|
702
|
final option = await showModalBottomSheet(
|
683
|
final option = await showModalBottomSheet(
|
|
703
|
context: context,
|
684
|
context: context,
|
|
|
|
685
|
+ isScrollControlled: true,
|
|
704
|
backgroundColor: Colors.white,
|
686
|
backgroundColor: Colors.white,
|
|
705
|
builder: (context) {
|
687
|
builder: (context) {
|
|
706
|
return StatefulBuilder(builder: (context, state) {
|
688
|
return StatefulBuilder(builder: (context, state) {
|
|
@@ -709,8 +691,8 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
@@ -709,8 +691,8 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
709
|
decoration: BoxDecoration(
|
691
|
decoration: BoxDecoration(
|
|
710
|
borderRadius:
|
692
|
borderRadius:
|
|
711
|
BorderRadius.circular(ScreenUtil().setWidth(10))),
|
693
|
BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
712
|
- height: ScreenUtil().setWidth(height * 2),
|
|
|
|
713
|
child: Column(
|
694
|
child: Column(
|
|
|
|
695
|
+ mainAxisSize: MainAxisSize.min,
|
|
714
|
children: [
|
696
|
children: [
|
|
715
|
InkWell(
|
697
|
InkWell(
|
|
716
|
onTap: () {
|
698
|
onTap: () {
|
|
@@ -739,10 +721,9 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
@@ -739,10 +721,9 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
739
|
fontWeight: FontWeight.bold,
|
721
|
fontWeight: FontWeight.bold,
|
|
740
|
color: MyColours.color_353535)),
|
722
|
color: MyColours.color_353535)),
|
|
741
|
),
|
723
|
),
|
|
742
|
- VEmptyView(40),
|
|
|
|
743
|
Padding(
|
724
|
Padding(
|
|
744
|
padding: EdgeInsets.symmetric(
|
725
|
padding: EdgeInsets.symmetric(
|
|
745
|
- horizontal: ScreenUtil().setWidth(60)),
|
726
|
+ horizontal: ScreenUtil().setWidth(60),vertical: ScreenUtil().setWidth(40)),
|
|
746
|
child: GridView.builder(
|
727
|
child: GridView.builder(
|
|
747
|
padding:
|
728
|
padding:
|
|
748
|
EdgeInsets.only(top: ScreenUtil().setWidth(20)),
|
729
|
EdgeInsets.only(top: ScreenUtil().setWidth(20)),
|