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