下载云存视频列表页面修改
This commit is contained in:
parent
a37cbf31f5
commit
0fd3a610fb
@ -200,7 +200,7 @@ class DoorLockLogLogic extends BaseGetXController {
|
|||||||
|
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
state.lockLogItemList.value = entity.data!.itemList!;
|
state.lockLogItemList.value = entity.data!.itemList!;
|
||||||
} else {}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 刷新门锁日志列表
|
/// 刷新门锁日志列表
|
||||||
|
|||||||
@ -10,7 +10,6 @@ import 'package:star_lock/tools/noData.dart';
|
|||||||
import 'package:timelines/timelines.dart';
|
import 'package:timelines/timelines.dart';
|
||||||
|
|
||||||
import '../../../app_settings/app_colors.dart';
|
import '../../../app_settings/app_colors.dart';
|
||||||
import '../../../tools/storage.dart';
|
|
||||||
import '../../../tools/titleAppBar.dart';
|
import '../../../tools/titleAppBar.dart';
|
||||||
import '../../../translations/trans_lib.dart';
|
import '../../../translations/trans_lib.dart';
|
||||||
|
|
||||||
|
|||||||
@ -36,25 +36,30 @@ class _EditVideoLogPageState extends State<EditVideoLogPage> {
|
|||||||
),
|
),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
state.isSelectAll.value = !state.isSelectAll.value;
|
state.isSelectAll.value = !state.isSelectAll.value;
|
||||||
if (state.selectVideoLogList.value.isEmpty) {
|
|
||||||
|
if (state.selectVideoLogList.isEmpty) {
|
||||||
state.isSelectAll.value = true;
|
state.isSelectAll.value = true;
|
||||||
}
|
}
|
||||||
|
if (state.selectVideoLogList.length ==
|
||||||
|
state.videoLogList.length) {
|
||||||
|
state.isSelectAll.value = false;
|
||||||
|
}
|
||||||
if (state.isSelectAll.value == true) {
|
if (state.isSelectAll.value == true) {
|
||||||
state.selectVideoLogList.value.clear();
|
state.selectVideoLogList.clear();
|
||||||
state.videoLogList.forEach((element) {
|
for (var element in state.videoLogList) {
|
||||||
element.recordList!.forEach((element) {
|
element.recordList!.forEach((element) {
|
||||||
element.isSelect = true;
|
element.isSelect = true;
|
||||||
state.selectVideoLogList.add(element);
|
state.selectVideoLogList.add(element);
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
} else {
|
} else {
|
||||||
state.selectVideoLogList.value.clear();
|
state.selectVideoLogList.clear();
|
||||||
state.videoLogList.forEach((element) {
|
for (var element in state.videoLogList) {
|
||||||
element.recordList!.forEach((element) {
|
element.recordList!.forEach((element) {
|
||||||
element.isSelect = false;
|
element.isSelect = false;
|
||||||
state.selectVideoLogList.remove(element);
|
state.selectVideoLogList.remove(element);
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -2,9 +2,9 @@ import 'package:get/get.dart';
|
|||||||
import 'package:star_lock/main/lockDetail/videoLog/videoLog/videoLog_entity.dart';
|
import 'package:star_lock/main/lockDetail/videoLog/videoLog/videoLog_entity.dart';
|
||||||
|
|
||||||
class EditVideoLogState {
|
class EditVideoLogState {
|
||||||
var selectVideoLogList = <RecordListData>[].obs;
|
var selectVideoLogList = <RecordListData>[].obs; //选中的视频列表
|
||||||
var isSelectAll = false.obs;
|
var isSelectAll = false.obs;
|
||||||
var videoLogList = [].obs;
|
var videoLogList = [].obs; //全部的视频列表
|
||||||
var getLockId = 0.obs;
|
var getLockId = 0.obs;
|
||||||
|
|
||||||
EditVideoLogState() {
|
EditVideoLogState() {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/app_settings/app_settings.dart';
|
||||||
import 'package:star_lock/main/lockDetail/videoLog/videoLog/videoLog_entity.dart';
|
import 'package:star_lock/main/lockDetail/videoLog/videoLog/videoLog_entity.dart';
|
||||||
import 'package:star_lock/tools/dateTool.dart';
|
import 'package:star_lock/tools/dateTool.dart';
|
||||||
|
|
||||||
@ -82,17 +83,34 @@ class _VideoLogDownLoadPageState extends State<VideoLogDownLoadPage> {
|
|||||||
.image),
|
.image),
|
||||||
),
|
),
|
||||||
SizedBox(width: 15.w),
|
SizedBox(width: 15.w),
|
||||||
Text(DateTool().dateToYMDHNString(recordData.operateDate.toString()),
|
Column(
|
||||||
style: TextStyle(fontSize: 20.sp)),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
DateTool()
|
||||||
|
.dateToYMDHNString(recordData.operateDate.toString()),
|
||||||
|
style: TextStyle(fontSize: 20.sp)),
|
||||||
|
],
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 20.w,
|
width: 20.w,
|
||||||
)),
|
)),
|
||||||
TextButton(
|
GestureDetector(
|
||||||
onPressed: () {},
|
onTap: () {},
|
||||||
child: Text('下载'.tr,
|
child: Container(
|
||||||
style:
|
width: 120.w,
|
||||||
TextStyle(fontSize: 22.sp, color: AppColors.mainColor)))
|
height: 50.h,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(color: AppColors.mainColor),
|
||||||
|
borderRadius: BorderRadius.circular(8.w)),
|
||||||
|
child: Center(
|
||||||
|
child: Text('下载'.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20.sp, color: AppColors.mainColor)),
|
||||||
|
)),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user