操作记录新增清空记录权限(仅锁的拥有者可清空)

This commit is contained in:
Daisy 2024-05-16 16:45:00 +08:00
parent de060cdae8
commit df3e763fd3
2 changed files with 18 additions and 13 deletions

View File

@ -143,7 +143,7 @@ class DoorLockLogLogic extends BaseGetXController {
DoorLockLogEntity entity = await ApiRepository.to.lockEventList(
lockId: state.keyInfos.value.lockId!,
lockEventType: state.dropdownValue.value,
pageNo: pageNo, //
pageNo: pageNo,
pageSize: int.parse(pageSize),
startDate: state.startDate.value,
endDate: state.endDate.value);

View File

@ -7,6 +7,7 @@ import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_entity.dart';
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_logic.dart';
import 'package:star_lock/tools/EasyRefreshTool.dart';
import 'package:star_lock/tools/advancedCalendar/src/widget.dart';
import 'package:star_lock/tools/commonDataManage.dart';
import 'package:star_lock/tools/menuItem/xsDropDownWidget.dart';
import 'package:star_lock/tools/noData.dart';
import 'package:star_lock/tools/showCupertinoAlertView.dart';
@ -37,7 +38,11 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
TextButton(
Visibility(
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1
? true
: false,
child: TextButton(
onPressed: () {
ShowCupertinoAlertView().showClearOperationRecordAlert(
clearClick: () {
@ -47,7 +52,7 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
child: Text(
'清空记录'.tr,
style: TextStyle(color: Colors.white, fontSize: 24.sp),
)),
))),
],
),
body: Column(