Merge branch 'master' of https://gitee.com/weishaoyang/star_lock
This commit is contained in:
commit
7f9e8987cb
@ -27,7 +27,7 @@ class AuthorizedAdminSendEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class Data {
|
class Data {
|
||||||
int? receiverUid;
|
String? receiverUid;
|
||||||
ReceiverUser? receiverUser;
|
ReceiverUser? receiverUser;
|
||||||
int? keyId;
|
int? keyId;
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ class Phone {
|
|||||||
class Cloud {
|
class Cloud {
|
||||||
String? username;
|
String? username;
|
||||||
String? password;
|
String? password;
|
||||||
int? cloudUid;
|
String? cloudUid;
|
||||||
int? userId;
|
int? userId;
|
||||||
String? updatedAt;
|
String? updatedAt;
|
||||||
String? createdAt;
|
String? createdAt;
|
||||||
|
|||||||
@ -2,13 +2,18 @@ import 'package:flutter/cupertino.dart';
|
|||||||
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/tools/baseGetXController.dart';
|
||||||
|
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
|
import '../../../../network/api_repository.dart';
|
||||||
import '../../../../tools/commonItem.dart';
|
import '../../../../tools/commonItem.dart';
|
||||||
|
import '../../../../tools/showIosTipView.dart';
|
||||||
import '../../../../tools/submitBtn.dart';
|
import '../../../../tools/submitBtn.dart';
|
||||||
import '../../../../tools/titleAppBar.dart';
|
import '../../../../tools/titleAppBar.dart';
|
||||||
|
import '../../../../tools/toast.dart';
|
||||||
import '../../../../translations/trans_lib.dart';
|
import '../../../../translations/trans_lib.dart';
|
||||||
|
import '../../electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
||||||
|
|
||||||
class AuthorizedAdminDetailPage extends StatefulWidget {
|
class AuthorizedAdminDetailPage extends StatefulWidget {
|
||||||
const AuthorizedAdminDetailPage({Key? key}) : super(key: key);
|
const AuthorizedAdminDetailPage({Key? key}) : super(key: key);
|
||||||
@ -89,7 +94,9 @@ class _AuthorizedAdminDetailPageState extends State<AuthorizedAdminDetailPage> {
|
|||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
onClick: () {}),
|
onClick: () {
|
||||||
|
showIosTipViewDialog(context);
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -228,6 +235,39 @@ class _AuthorizedAdminDetailPageState extends State<AuthorizedAdminDetailPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void showIosTipViewDialog(BuildContext context) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return ShowIosTipView(
|
||||||
|
title: "提示",
|
||||||
|
tipTitle: "确定要删除吗?",
|
||||||
|
sureClick: () {
|
||||||
|
Get.back();
|
||||||
|
// deleteKeyRequest();
|
||||||
|
},
|
||||||
|
cancelClick: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除电子钥匙名称请求
|
||||||
|
Future<void> deleteKeyRequest(String keyId) async {
|
||||||
|
ElectronicKeyListEntity entity =
|
||||||
|
await ApiRepository.to.deleteElectronicKey(keyId);
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
Toast.show(msg: "删除成功");
|
||||||
|
setState(() {
|
||||||
|
Get.back();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,8 @@ import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity
|
|||||||
import 'package:star_lock/network/api_repository.dart';
|
import 'package:star_lock/network/api_repository.dart';
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
|
||||||
|
import '../../../../tools/toast.dart';
|
||||||
|
|
||||||
class AuthorizedAdminListLogic extends BaseGetXController {
|
class AuthorizedAdminListLogic extends BaseGetXController {
|
||||||
final AuthorizedAdminListState state = AuthorizedAdminListState();
|
final AuthorizedAdminListState state = AuthorizedAdminListState();
|
||||||
|
|
||||||
@ -30,6 +32,16 @@ class AuthorizedAdminListLogic extends BaseGetXController {
|
|||||||
return dataList;
|
return dataList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//删除电子钥匙名称请求
|
||||||
|
Future<void> deleteKeyRequest(String keyId) async {
|
||||||
|
ElectronicKeyListEntity entity =
|
||||||
|
await ApiRepository.to.deleteElectronicKey(keyId);
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
Toast.show(msg: "删除成功");
|
||||||
|
mockNetworkDataRequest();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onReady() {
|
void onReady() {
|
||||||
// TODO: implement onReady
|
// TODO: implement onReady
|
||||||
|
|||||||
@ -9,6 +9,8 @@ import 'package:star_lock/tools/storage.dart';
|
|||||||
|
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
|
import '../../../../tools/left_slide_actions.dart';
|
||||||
|
import '../../../../tools/showIosTipView.dart';
|
||||||
import '../../../../tools/submitBtn.dart';
|
import '../../../../tools/submitBtn.dart';
|
||||||
import '../../../../tools/titleAppBar.dart';
|
import '../../../../tools/titleAppBar.dart';
|
||||||
import '../../../../translations/trans_lib.dart';
|
import '../../../../translations/trans_lib.dart';
|
||||||
@ -104,19 +106,75 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
} else {
|
} else {
|
||||||
isAdminKey = false;
|
isAdminKey = false;
|
||||||
}
|
}
|
||||||
return _electronicKeyItem('images/controls_user.png',
|
|
||||||
indexEntity.keyName!, useDateStr, keyStatus, isAdminKey, () {
|
if (index < getItemData.length) {
|
||||||
Navigator.pushNamed(context, Routers.electronicKeyDetailPage,
|
return LeftSlideActions(
|
||||||
arguments: {'itemData': indexEntity}).then((val) {
|
// key: Key(indexEntity.lockId!.toString()),
|
||||||
if (val != null) {
|
actionsWidth: 60,
|
||||||
logic.mockNetworkDataRequest();
|
actions: [
|
||||||
setState(() {});
|
_buildDeleteBtn(indexEntity),
|
||||||
}
|
],
|
||||||
});
|
decoration: const BoxDecoration(
|
||||||
});
|
borderRadius: BorderRadius.all(Radius.circular(1)),
|
||||||
|
),
|
||||||
|
child: _electronicKeyItem('images/controls_user.png',
|
||||||
|
indexEntity.keyName!, useDateStr, keyStatus, isAdminKey, () {
|
||||||
|
Navigator.pushNamed(context, Routers.electronicKeyDetailPage,
|
||||||
|
arguments: {'itemData': indexEntity}).then((val) {
|
||||||
|
if (val != null) {
|
||||||
|
logic.mockNetworkDataRequest();
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return const SizedBox.shrink();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildDeleteBtn(ElectronicKeyListItem passwordKeyListItem) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
// 省略: 弹出是否删除的确认对话框。
|
||||||
|
showIosTipViewDialog(context, passwordKeyListItem);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 60,
|
||||||
|
color: const Color(0xFFF20101),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: const Text(
|
||||||
|
'删除',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
color: Colors.white,
|
||||||
|
height: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void showIosTipViewDialog(BuildContext context, ElectronicKeyListItem passwordKeyListItem) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return ShowIosTipView(
|
||||||
|
title: "提示",
|
||||||
|
tipTitle: "确定要删除吗?",
|
||||||
|
sureClick: () {
|
||||||
|
Get.back();
|
||||||
|
logic.deleteKeyRequest(passwordKeyListItem.keyId.toString());
|
||||||
|
},
|
||||||
|
cancelClick: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//使用期限
|
//使用期限
|
||||||
String getUseDateStr(ElectronicKeyListItem indexEntity) {
|
String getUseDateStr(ElectronicKeyListItem indexEntity) {
|
||||||
String useDateStr = '';
|
String useDateStr = '';
|
||||||
@ -173,12 +231,8 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 90.h,
|
color: Colors.white,
|
||||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
height: 100.h,
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(10.w),
|
|
||||||
),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -197,31 +251,32 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
receiveUser,
|
receiveUser,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 24.sp, color: AppColors.blackColor),
|
fontSize: 24.sp, color: AppColors.blackColor),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(width: 10.w),
|
||||||
width: 8.w,
|
// isAdminKey
|
||||||
),
|
// ? Image.asset(
|
||||||
Container(
|
// 'images/icon_electronicKey_admin.png',
|
||||||
padding: EdgeInsets.only(
|
// width: 24.w,
|
||||||
left: 4.w, right: 4.w, top: 1.w, bottom: 1.w),
|
// height: 20.w,
|
||||||
decoration: BoxDecoration(
|
// )
|
||||||
color: AppColors.toBeReceiveBgColor,
|
// : Container(),
|
||||||
borderRadius: BorderRadius.circular(5.0),
|
Expanded(
|
||||||
),
|
child: SizedBox(
|
||||||
child: Text(
|
width: 20.w,
|
||||||
keyStatus,
|
)),
|
||||||
style: TextStyle(color: Colors.red, fontSize: 16.sp),
|
// Text(
|
||||||
),
|
// keyStatus,
|
||||||
)
|
// style: TextStyle(fontSize: 18.sp, color: Colors.red),
|
||||||
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 5.h),
|
SizedBox(height: 10.h),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@ -243,4 +298,80 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Widget _electronicKeyItem(String avatarURL, String receiveUser,
|
||||||
|
// String useDate, String keyStatus, bool isAdminKey, Function() action) {
|
||||||
|
// return GestureDetector(
|
||||||
|
// onTap: action,
|
||||||
|
// child: Container(
|
||||||
|
// height: 100.h,
|
||||||
|
// // margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||||
|
// // decoration: BoxDecoration(
|
||||||
|
// // color: Colors.white,
|
||||||
|
// // borderRadius: BorderRadius.circular(10.w),
|
||||||
|
// // ),
|
||||||
|
// child: Row(
|
||||||
|
// children: [
|
||||||
|
// SizedBox(
|
||||||
|
// width: 30.w,
|
||||||
|
// ),
|
||||||
|
// Image.asset(
|
||||||
|
// avatarURL,
|
||||||
|
// width: 60.w,
|
||||||
|
// height: 60.w,
|
||||||
|
// ),
|
||||||
|
// SizedBox(
|
||||||
|
// width: 20.w,
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// child: Column(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// children: [
|
||||||
|
// Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
// children: [
|
||||||
|
// Text(
|
||||||
|
// receiveUser,
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 24.sp, color: AppColors.blackColor),
|
||||||
|
// ),
|
||||||
|
// SizedBox(
|
||||||
|
// width: 8.w,
|
||||||
|
// ),
|
||||||
|
// Container(
|
||||||
|
// padding: EdgeInsets.only(
|
||||||
|
// left: 4.w, right: 4.w, top: 1.w, bottom: 1.w),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: AppColors.toBeReceiveBgColor,
|
||||||
|
// borderRadius: BorderRadius.circular(5.0),
|
||||||
|
// ),
|
||||||
|
// child: Text(
|
||||||
|
// keyStatus,
|
||||||
|
// style: TextStyle(color: Colors.red, fontSize: 16.sp),
|
||||||
|
// ),
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// SizedBox(height: 5.h),
|
||||||
|
// Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
// children: [
|
||||||
|
// Text(
|
||||||
|
// useDate,
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 18.sp,
|
||||||
|
// color: AppColors.placeholderTextColor),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// SizedBox(width: 20.h),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// SizedBox(width: 20.h),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,11 +23,13 @@ class CheckingInSetWorkTimeState{
|
|||||||
getKeyInfosData.value = map["getKeyInfosData"];
|
getKeyInfosData.value = map["getKeyInfosData"];
|
||||||
companyId.value = map["companyId"];
|
companyId.value = map["companyId"];
|
||||||
checkingInSetInfo.value = map["checkingInSetInfo"];
|
checkingInSetInfo.value = map["checkingInSetInfo"];
|
||||||
|
if(pushType.value != "0"){
|
||||||
|
beginTime.value = DateTool().dateToHNString(checkingInSetInfo.value.workStartTime.toString());
|
||||||
|
endTime.value = DateTool().dateToHNString(checkingInSetInfo.value.workEndTime.toString());
|
||||||
|
beginTimeTimestamp.value = checkingInSetInfo.value.workStartTime.toString();
|
||||||
|
endTimeTimestamp.value = checkingInSetInfo.value.workEndTime.toString();
|
||||||
|
}
|
||||||
|
|
||||||
beginTime.value = DateTool().dateToHNString(checkingInSetInfo.value.workStartTime.toString());
|
|
||||||
endTime.value = DateTool().dateToHNString(checkingInSetInfo.value.workEndTime.toString());
|
|
||||||
beginTimeTimestamp.value = checkingInSetInfo.value.workStartTime.toString();
|
|
||||||
endTimeTimestamp.value = checkingInSetInfo.value.workEndTime.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -13,6 +13,7 @@ import 'package:star_lock/tools/toast.dart';
|
|||||||
import '../../../../../appRouters.dart';
|
import '../../../../../appRouters.dart';
|
||||||
import '../../../../../app_settings/app_colors.dart';
|
import '../../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../../tools/commonItem.dart';
|
import '../../../../../tools/commonItem.dart';
|
||||||
|
import '../../../../../tools/showIosTipView.dart';
|
||||||
import '../../../../../tools/showTFView.dart';
|
import '../../../../../tools/showTFView.dart';
|
||||||
import '../../../../../tools/submitBtn.dart';
|
import '../../../../../tools/submitBtn.dart';
|
||||||
import '../../../../../tools/titleAppBar.dart';
|
import '../../../../../tools/titleAppBar.dart';
|
||||||
@ -131,7 +132,7 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
onClick: () {
|
onClick: () {
|
||||||
deleteKeyRequest();
|
showIosTipViewDialog(context);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -152,11 +153,11 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) {
|
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) {
|
||||||
//永久
|
//永久
|
||||||
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
||||||
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 永久';
|
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)}\n 永久';
|
||||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) {
|
} else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) {
|
||||||
//单次
|
//单次
|
||||||
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
||||||
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 单次';
|
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)}\n 单次';
|
||||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) {
|
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) {
|
||||||
//循环
|
//循环
|
||||||
useDateStr = '循环';
|
useDateStr = '循环';
|
||||||
@ -173,68 +174,68 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
return senderDate;
|
return senderDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget commonItem(String leftTitle, String rightTitle,
|
// Widget commonItem(String leftTitle, String rightTitle,
|
||||||
{bool isHaveDirection = false,
|
// {bool isHaveDirection = false,
|
||||||
bool isHaveLine = false,
|
// bool isHaveLine = false,
|
||||||
bool isHaveRightWidget = false,
|
// bool isHaveRightWidget = false,
|
||||||
Widget? rightWidget,
|
// Widget? rightWidget,
|
||||||
Function()? action}) {
|
// Function()? action}) {
|
||||||
return GestureDetector(
|
// return GestureDetector(
|
||||||
onTap: action,
|
// onTap: action,
|
||||||
child: Column(
|
// child: Column(
|
||||||
// mainAxisAlignment: MainAxisAlignment.center,
|
// // mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
// children: [
|
||||||
Container(
|
// Container(
|
||||||
// height: 80.h,
|
// // height: 80.h,
|
||||||
color: Colors.white,
|
// color: Colors.white,
|
||||||
padding: EdgeInsets.only(
|
// padding: EdgeInsets.only(
|
||||||
left: 20.w, right: 10.w, top: 20.w, bottom: 20.w),
|
// left: 20.w, right: 10.w, top: 20.w, bottom: 20.w),
|
||||||
child: Row(
|
// child: Row(
|
||||||
children: [
|
// children: [
|
||||||
SizedBox(width: 20.w),
|
// SizedBox(width: 20.w),
|
||||||
Text(
|
// Text(
|
||||||
leftTitle,
|
// leftTitle,
|
||||||
style:
|
// style:
|
||||||
TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),
|
// TextStyle(fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||||
),
|
// ),
|
||||||
SizedBox(width: 20.w),
|
// SizedBox(width: 20.w),
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: Row(
|
// child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
// mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
// children: [
|
||||||
isHaveRightWidget
|
// isHaveRightWidget
|
||||||
? rightWidget!
|
// ? rightWidget!
|
||||||
: Text(
|
// : Text(
|
||||||
rightTitle,
|
// rightTitle,
|
||||||
textAlign: TextAlign.end,
|
// textAlign: TextAlign.end,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
fontSize: 28.sp, fontWeight: FontWeight.w500),
|
// fontSize: 28.sp, fontWeight: FontWeight.w500),
|
||||||
)
|
// )
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
SizedBox(width: 5.w),
|
// SizedBox(width: 5.w),
|
||||||
isHaveDirection
|
// isHaveDirection
|
||||||
? Image.asset(
|
// ? Image.asset(
|
||||||
'images/icon_right.png',
|
// 'images/icon_right.png',
|
||||||
width: 50.w,
|
// width: 50.w,
|
||||||
height: 50.w,
|
// height: 50.w,
|
||||||
)
|
// )
|
||||||
: SizedBox(width: 10.w),
|
// : SizedBox(width: 10.w),
|
||||||
// SizedBox(width:10.w),
|
// // SizedBox(width:10.w),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
isHaveLine
|
// isHaveLine
|
||||||
? Container(
|
// ? Container(
|
||||||
height: 0.5.h,
|
// height: 0.5.h,
|
||||||
color: Colors.grey,
|
// color: Colors.grey,
|
||||||
)
|
// )
|
||||||
: Container()
|
// : Container()
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
CupertinoSwitch _switch(isOn) {
|
CupertinoSwitch _switch(isOn) {
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
@ -299,4 +300,24 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void showIosTipViewDialog(BuildContext context) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return ShowIosTipView(
|
||||||
|
title: "提示",
|
||||||
|
tipTitle: "确定要删除吗?",
|
||||||
|
sureClick: () {
|
||||||
|
Get.back();
|
||||||
|
deleteKeyRequest();
|
||||||
|
},
|
||||||
|
cancelClick: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,6 +42,17 @@ class ElectronicKeyListLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//删除电子钥匙名称请求
|
||||||
|
Future<void> deleteKeyRequest(String keyId) async {
|
||||||
|
ElectronicKeyListEntity entity =
|
||||||
|
await ApiRepository.to.deleteElectronicKey(keyId);
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
print("删除电子钥匙成功");
|
||||||
|
Toast.show(msg: "删除成功");
|
||||||
|
mockNetworkDataRequest();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onReady() {
|
void onReady() {
|
||||||
// TODO: implement onReady
|
// TODO: implement onReady
|
||||||
|
|||||||
@ -11,6 +11,8 @@ import 'package:star_lock/tools/storage.dart';
|
|||||||
import 'package:star_lock/tools/toast.dart';
|
import 'package:star_lock/tools/toast.dart';
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
|
import '../../../../tools/left_slide_actions.dart';
|
||||||
|
import '../../../../tools/showIosTipView.dart';
|
||||||
import '../../../../tools/submitBtn.dart';
|
import '../../../../tools/submitBtn.dart';
|
||||||
import '../../../../tools/titleAppBar.dart';
|
import '../../../../tools/titleAppBar.dart';
|
||||||
import '../../../../translations/trans_lib.dart';
|
import '../../../../translations/trans_lib.dart';
|
||||||
@ -186,16 +188,30 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
} else {
|
} else {
|
||||||
isAdminKey = false;
|
isAdminKey = false;
|
||||||
}
|
}
|
||||||
return _electronicKeyItem('images/controls_user.png',
|
|
||||||
indexEntity.keyName!, useDateStr, keyStatus, isAdminKey, () {
|
if (index < getItemData.length) {
|
||||||
Navigator.pushNamed(context, Routers.electronicKeyDetailPage,
|
return LeftSlideActions(
|
||||||
arguments: {"itemData": indexEntity}).then((val) {
|
key: Key(indexEntity.lockAlias!),
|
||||||
if (val != null) {
|
actionsWidth: 60,
|
||||||
logic.mockNetworkDataRequest();
|
actions: [
|
||||||
setState(() {});
|
_buildDeleteBtn(indexEntity.keyId.toString()),
|
||||||
}
|
],
|
||||||
});
|
decoration: const BoxDecoration(
|
||||||
});
|
borderRadius: BorderRadius.all(Radius.circular(1)),
|
||||||
|
),
|
||||||
|
child: _electronicKeyItem('images/controls_user.png',
|
||||||
|
indexEntity.keyName!, useDateStr, keyStatus, isAdminKey, () {
|
||||||
|
Navigator.pushNamed(context, Routers.electronicKeyDetailPage,
|
||||||
|
arguments: {"itemData": indexEntity}).then((val) {
|
||||||
|
if (val != null) {
|
||||||
|
logic.mockNetworkDataRequest();
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return const SizedBox.shrink();
|
||||||
},
|
},
|
||||||
separatorBuilder: (BuildContext context, int index) {
|
separatorBuilder: (BuildContext context, int index) {
|
||||||
return const Divider(
|
return const Divider(
|
||||||
@ -206,6 +222,48 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildDeleteBtn(String keyId) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
// 省略: 弹出是否删除的确认对话框。
|
||||||
|
showIosTipViewDialog(context, keyId);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 60,
|
||||||
|
color: const Color(0xFFF20101),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: const Text(
|
||||||
|
'删除',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
color: Colors.white,
|
||||||
|
height: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void showIosTipViewDialog(BuildContext context, String keyId) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return ShowIosTipView(
|
||||||
|
title: "提示",
|
||||||
|
tipTitle: "确定要删除吗?",
|
||||||
|
sureClick: () {
|
||||||
|
Get.back();
|
||||||
|
logic.deleteKeyRequest(keyId);
|
||||||
|
},
|
||||||
|
cancelClick: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//使用期限
|
//使用期限
|
||||||
String getUseDateStr(ElectronicKeyListItem indexEntity) {
|
String getUseDateStr(ElectronicKeyListItem indexEntity) {
|
||||||
String useDateStr = '';
|
String useDateStr = '';
|
||||||
|
|||||||
@ -165,7 +165,7 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
|||||||
getFailureDateTime = _failureDateTime.millisecondsSinceEpoch.toString();
|
getFailureDateTime = _failureDateTime.millisecondsSinceEpoch.toString();
|
||||||
}
|
}
|
||||||
var entity =
|
var entity =
|
||||||
await ApiRepository.to.canSendKey(getFailureDateTime, [], _lockIdList);
|
await ApiRepository.to.canSendKey(getFailureDateTime, _lockIdList);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
for (int i = 0; i < _receiverList.length; i++) {
|
for (int i = 0; i < _receiverList.length; i++) {
|
||||||
LockUserData data = _receiverList[i];
|
LockUserData data = _receiverList[i];
|
||||||
@ -270,7 +270,7 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
|||||||
if (value != null) {
|
if (value != null) {
|
||||||
value as Map<String, dynamic>;
|
value as Map<String, dynamic>;
|
||||||
_lockIdList = value['selectLockIdList'];
|
_lockIdList = value['selectLockIdList'];
|
||||||
|
print("_lockIdList:$_lockIdList");
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
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/utils.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/app_settings/app_colors.dart';
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupCell.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupCell.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
|
||||||
@ -21,9 +21,9 @@ class MassSendLockGroupListPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
|
class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
|
||||||
List lockGroupList = [];
|
List lockGroupList = [];
|
||||||
List selectGroupIdList = [];
|
// List selectGroupIdList = [];
|
||||||
List selectLockIdList = [];
|
List selectLockIdList = [];
|
||||||
int clickIndex = -1;
|
// int clickIndex = -1;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -86,8 +86,7 @@ class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
|
|||||||
|
|
||||||
//分组列表请求
|
//分组列表请求
|
||||||
Future<List<GroupListItem>> mockNetworkDataRequest() async {
|
Future<List<GroupListItem>> mockNetworkDataRequest() async {
|
||||||
MassSendLockGroupListEntity entity =
|
MassSendLockGroupListEntity entity = await ApiRepository.to.lockGroupList('1');
|
||||||
await ApiRepository.to.lockGroupList('1');
|
|
||||||
List<GroupListItem> dataList = [];
|
List<GroupListItem> dataList = [];
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
if (entity.data != null) {
|
if (entity.data != null) {
|
||||||
@ -120,19 +119,29 @@ class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
|
|||||||
List lockItemList = itemData.lockList ?? [];
|
List lockItemList = itemData.lockList ?? [];
|
||||||
return ExpandedListTile(
|
return ExpandedListTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
selectGroupIdList.add(index);
|
// selectGroupIdList.add(index);
|
||||||
clickIndex = index;
|
// clickIndex = index;
|
||||||
//是否选中组
|
//是否选中组
|
||||||
if (itemData.isChecked) {
|
if (itemData.isChecked) {
|
||||||
|
var seletList = itemData.lockList;
|
||||||
|
for(LockListItem lockListItem in seletList!){
|
||||||
|
lockListItem.isChecked = true;
|
||||||
|
selectLockIdList.add(lockListItem.lockId);
|
||||||
|
}
|
||||||
// lockItemList[selectIndex] =
|
// lockItemList[selectIndex] =
|
||||||
|
}else{
|
||||||
|
var seletList = itemData.lockList;
|
||||||
|
for(LockListItem lockListItem in seletList!){
|
||||||
|
lockListItem.isChecked = false;
|
||||||
|
selectLockIdList.remove(lockListItem.lockId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
setState(() {});
|
||||||
print('选中了么0');
|
print('选中了么0');
|
||||||
},
|
},
|
||||||
typeImgList: const [],
|
typeImgList: const [],
|
||||||
groupItem: itemData,
|
groupItem: itemData,
|
||||||
child: massSendLockGroupCell(index,
|
child: massSendLockGroupCell(index, currentIndex: index, lockListByGroup: lockItemList, selectLockAction: (selectIndex, selectLockId) {
|
||||||
currentIndex: index, lockListByGroup: lockItemList,
|
|
||||||
selectLockAction: (selectIndex, selectLockId) {
|
|
||||||
LockListItem lockItem = lockItemList[selectIndex];
|
LockListItem lockItem = lockItemList[selectIndex];
|
||||||
setState(() {
|
setState(() {
|
||||||
lockItem.isChecked = !lockItem.isChecked;
|
lockItem.isChecked = !lockItem.isChecked;
|
||||||
@ -143,4 +152,5 @@ class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/ma
|
|||||||
import 'package:star_lock/tools/commonItem.dart';
|
import 'package:star_lock/tools/commonItem.dart';
|
||||||
import 'package:star_lock/translations/trans_lib.dart';
|
import 'package:star_lock/translations/trans_lib.dart';
|
||||||
|
|
||||||
|
import '../../../../../../app_settings/app_colors.dart';
|
||||||
|
|
||||||
class MassSendReceiverCell extends StatelessWidget {
|
class MassSendReceiverCell extends StatelessWidget {
|
||||||
final int currentIndex;
|
final int currentIndex;
|
||||||
LockUserData userData;
|
LockUserData userData;
|
||||||
@ -28,11 +30,11 @@ class MassSendReceiverCell extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 40.w,
|
// width: 40.w,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 10.w,
|
width: 20.w,
|
||||||
),
|
),
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'images/icon_massSend_delete.png',
|
'images/icon_massSend_delete.png',
|
||||||
@ -51,7 +53,7 @@ class MassSendReceiverCell extends StatelessWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(
|
massSendReceiverCellWidget(
|
||||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||||
rightTitle: userData.userid ?? ' ',
|
rightTitle: userData.userid ?? ' ',
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
@ -61,7 +63,13 @@ class MassSendReceiverCell extends StatelessWidget {
|
|||||||
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||||
1,
|
1,
|
||||||
userData)),
|
userData)),
|
||||||
CommonItem(
|
Divider(
|
||||||
|
color: AppColors.greyLineColor,
|
||||||
|
indent: 20.w,
|
||||||
|
endIndent: 20.w,
|
||||||
|
height: 1,
|
||||||
|
),
|
||||||
|
massSendReceiverCellWidget(
|
||||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||||
rightTitle: userData.nickname ?? ' ',
|
rightTitle: userData.nickname ?? ' ',
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
@ -97,6 +105,52 @@ class MassSendReceiverCell extends StatelessWidget {
|
|||||||
return controller;
|
return controller;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget massSendReceiverCellWidget(
|
||||||
|
{
|
||||||
|
String? leftTitel,
|
||||||
|
String? rightTitle,
|
||||||
|
bool? isHaveDirection,
|
||||||
|
bool? isHaveLine,
|
||||||
|
bool? isHaveRightWidget,
|
||||||
|
Widget? rightWidget,
|
||||||
|
Function()? action,
|
||||||
|
double? allHeight,
|
||||||
|
}){
|
||||||
|
return Column(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: 60.h,
|
||||||
|
color: Colors.white,
|
||||||
|
padding: EdgeInsets.only(right: 20.w), // , top: 20.w, bottom: 20.w
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
SizedBox(width: 20.w),
|
||||||
|
Text(leftTitel!, style: TextStyle(fontSize: 22.sp)),
|
||||||
|
Expanded(child: SizedBox(width: 10.w)),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
isHaveRightWidget!
|
||||||
|
? rightWidget!
|
||||||
|
: Text(
|
||||||
|
rightTitle ?? "",
|
||||||
|
textAlign: TextAlign.end,
|
||||||
|
// overflow: TextOverflow.ellipsis,
|
||||||
|
// maxLines: 1,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22.sp,
|
||||||
|
color: AppColors.darkGrayTextColor),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// 接受者信息输入框
|
// 接受者信息输入框
|
||||||
Widget getTFWidget(
|
Widget getTFWidget(
|
||||||
bool isHaveBtn, String tfStr, int lineIndex, LockUserData userData) {
|
bool isHaveBtn, String tfStr, int lineIndex, LockUserData userData) {
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import '../../../../tools/commonItem.dart';
|
|||||||
import '../../../../tools/submitBtn.dart';
|
import '../../../../tools/submitBtn.dart';
|
||||||
import '../../../../tools/titleAppBar.dart';
|
import '../../../../tools/titleAppBar.dart';
|
||||||
import '../../../../translations/trans_lib.dart';
|
import '../../../../translations/trans_lib.dart';
|
||||||
|
import '../../checkingIn/checkingInSet/checkingInSet_entity.dart';
|
||||||
import 'checkInCreatCompany_logic.dart';
|
import 'checkInCreatCompany_logic.dart';
|
||||||
|
|
||||||
class CheckInCreatCompanyPage extends StatefulWidget {
|
class CheckInCreatCompanyPage extends StatefulWidget {
|
||||||
@ -44,7 +45,13 @@ class _CheckInCreatCompanyPageState extends State<CheckInCreatCompanyPage> {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
var data = await Get.toNamed(Routers.checkingInSetWorkTimePage);
|
var data = await Get.toNamed(Routers.checkingInSetWorkTimePage, arguments: {
|
||||||
|
"getKeyInfosData": state.getKeyInfosData.value,
|
||||||
|
"companyId": "1",
|
||||||
|
"pushType": "0",
|
||||||
|
"checkingInSetInfo": CheckingInSetInfo(),
|
||||||
|
});
|
||||||
|
|
||||||
if(data != null) {
|
if(data != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
state.beginTime.value = data["beginTime"];
|
state.beginTime.value = data["beginTime"];
|
||||||
@ -61,7 +68,12 @@ class _CheckInCreatCompanyPageState extends State<CheckInCreatCompanyPage> {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
var data = await Get.toNamed(Routers.checkingInSetWorkdaySet);
|
var data = await Get.toNamed(Routers.checkingInSetWorkdaySet, arguments: {
|
||||||
|
"getKeyInfosData": state.getKeyInfosData.value,
|
||||||
|
"companyId": "0",
|
||||||
|
"pushType": "0",
|
||||||
|
"checkingInSetInfo": CheckingInSetInfo(),
|
||||||
|
});
|
||||||
if(data != null) {
|
if(data != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
state.isCustom.value = data["attendanceType"];
|
state.isCustom.value = data["attendanceType"];
|
||||||
|
|||||||
@ -236,12 +236,15 @@ class LockSetLogic extends BaseGetXController {
|
|||||||
password: state.passwordTF.text,
|
password: state.passwordTF.text,
|
||||||
);
|
);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
// deletLockInfoData();
|
||||||
|
|
||||||
blockDeletNumberCheckPasswordCallback();
|
blockDeletNumberCheckPasswordCallback();
|
||||||
// if(state.currentDeviceUUid.value.isEmpty){
|
// if(state.currentDeviceUUid.value.isEmpty){
|
||||||
// Toast.show(msg: "未扫描到当前设备,请确保您在设备旁边、设备已开启、设备未被其他人连接");
|
// Toast.show(msg: "未扫描到当前设备,请确保您在设备旁边、设备已开启、设备未被其他人连接");
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
// if(state.currentDeviceUUid.value[31] == "1"){
|
// if(state.currentDeviceUUid.value[31] == "1"){
|
||||||
|
|
||||||
// 已配对
|
// 已配对
|
||||||
if(state.getKeyInfosData.value.isLockOwner == 1){
|
if(state.getKeyInfosData.value.isLockOwner == 1){
|
||||||
// 调用删除锁协议
|
// 调用删除锁协议
|
||||||
@ -250,6 +253,7 @@ class LockSetLogic extends BaseGetXController {
|
|||||||
// 调用删除钥匙协议
|
// 调用删除钥匙协议
|
||||||
deletUserAction();
|
deletUserAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
// }else if(state.currentDeviceUUid.value[31] == "0"){
|
// }else if(state.currentDeviceUUid.value[31] == "0"){
|
||||||
// // 未配对
|
// // 未配对
|
||||||
// if(state.getKeyInfosData.value.isLockOwner == 1){
|
// if(state.getKeyInfosData.value.isLockOwner == 1){
|
||||||
|
|||||||
@ -414,17 +414,17 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
})),
|
})),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
// Visibility(
|
||||||
visible: true,
|
// visible: true,
|
||||||
child: CommonItem(
|
// child: CommonItem(
|
||||||
leftTitel: TranslationLoader
|
// leftTitel: TranslationLoader
|
||||||
.lanKeys!.importOtherLockData!.tr,
|
// .lanKeys!.importOtherLockData!.tr,
|
||||||
rightTitle: "",
|
// rightTitle: "",
|
||||||
isHaveLine: true,
|
// isHaveLine: true,
|
||||||
isHaveDirection: true,
|
// isHaveDirection: true,
|
||||||
action: () {
|
// action: () {
|
||||||
Get.toNamed(Routers.importOtherLockDataPage);
|
// Get.toNamed(Routers.importOtherLockDataPage);
|
||||||
})),
|
// })),
|
||||||
// ),
|
// ),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
Visibility(
|
Visibility(
|
||||||
|
|||||||
@ -357,7 +357,7 @@ class LockDetailLogic extends BaseGetXController{
|
|||||||
}else{
|
}else{
|
||||||
getTokenList = [0,0,0,0];
|
getTokenList = [0,0,0,0];
|
||||||
}
|
}
|
||||||
print("openDoorTokenPubToken:$getTokenList");
|
print("openDoorTokenPubToken:$getTokenList getPrivateKeyList:$getPrivateKeyList");
|
||||||
|
|
||||||
print("millisecondsSinceEpoch/1000:${DateTime.now().millisecondsSinceEpoch~/1000}");
|
print("millisecondsSinceEpoch/1000:${DateTime.now().millisecondsSinceEpoch~/1000}");
|
||||||
IoSenderManage.senderOpenLock(
|
IoSenderManage.senderOpenLock(
|
||||||
@ -440,7 +440,7 @@ class LockDetailLogic extends BaseGetXController{
|
|||||||
BlueManage().connectDeviceMacAddress = v[knownDeviceIndex].id;
|
BlueManage().connectDeviceMacAddress = v[knownDeviceIndex].id;
|
||||||
connectBlue(v[knownDeviceIndex].id, state.keyInfos.value.bluetooth!.bluetoothDeviceName!);
|
connectBlue(v[knownDeviceIndex].id, state.keyInfos.value.bluetooth!.bluetoothDeviceName!);
|
||||||
eventBus.fire(ScanAllDeviceFindCurrentDeviceConnectedEvent(v[knownDeviceIndex].serviceUuids[0].toString()));
|
eventBus.fire(ScanAllDeviceFindCurrentDeviceConnectedEvent(v[knownDeviceIndex].serviceUuids[0].toString()));
|
||||||
BlueManage().stopScan();
|
// BlueManage().stopScan();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,33 +93,61 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(height: 50.h),
|
SizedBox(height: 50.h),
|
||||||
|
// Stack(
|
||||||
|
// alignment: Alignment.center,
|
||||||
|
// children: [
|
||||||
|
// Align(
|
||||||
|
// alignment: Alignment.center,
|
||||||
|
// child: Text(
|
||||||
|
// widget.keyInfo!.lockAlias!,
|
||||||
|
// style:
|
||||||
|
// TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w400),
|
||||||
|
// )),
|
||||||
|
// Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
// children: [
|
||||||
|
// Text(
|
||||||
|
// "100%",
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 18.sp, color: AppColors.darkGrayTextColor),
|
||||||
|
// ),
|
||||||
|
// SizedBox(width: 2.w),
|
||||||
|
// Image.asset(
|
||||||
|
// 'images/main/icon_main_cell.png',
|
||||||
|
// width: 30.w,
|
||||||
|
// height: 24.w,
|
||||||
|
// ),
|
||||||
|
// SizedBox(width: 30.w),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
Stack(
|
Stack(
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Container(
|
||||||
alignment: Alignment.center,
|
width: 1.sw - 120.w*2,
|
||||||
child: Text(
|
child: Center(child: Text(widget.keyInfo!.lockAlias!, style:TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w400),))
|
||||||
widget.keyInfo!.lockAlias!,
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w400),
|
|
||||||
)),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"100%",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 18.sp, color: AppColors.darkGrayTextColor),
|
|
||||||
),
|
|
||||||
SizedBox(width: 2.w),
|
|
||||||
Image.asset(
|
|
||||||
'images/main/icon_main_cell.png',
|
|
||||||
width: 30.w,
|
|
||||||
height: 24.w,
|
|
||||||
),
|
|
||||||
SizedBox(width: 30.w),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
|
Positioned(
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"100%",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18.sp, color: AppColors.darkGrayTextColor),
|
||||||
|
),
|
||||||
|
SizedBox(width: 2.w),
|
||||||
|
Image.asset(
|
||||||
|
'images/main/icon_main_cell.png',
|
||||||
|
width: 30.w,
|
||||||
|
height: 24.w,
|
||||||
|
),
|
||||||
|
SizedBox(width: 30.w),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 30.h),
|
SizedBox(height: 30.h),
|
||||||
|
|||||||
@ -129,10 +129,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
|||||||
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(operateDate!);
|
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(operateDate!);
|
||||||
String operateDateStr = '${dateStr.toLocal().toString().substring(0, 16)} ';
|
String operateDateStr = '${dateStr.toLocal().toString().substring(0, 16)} ';
|
||||||
|
|
||||||
// return _operatingRecordItem('images/controls_user.png', dataItem.username ?? "未知", '$operateDateStr用${dataItem.recordTypeName}', () {
|
return _operatingRecordItem(getTypeIcon(dataItem.recordType!), dataItem.recordTypeName!, operateDateStr, () {
|
||||||
//
|
|
||||||
// });
|
|
||||||
return _operatingRecordItem('images/controls_user.png', dataItem.recordTypeName!, operateDateStr, () {
|
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -161,8 +158,32 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _operatingRecordItem(String userAvatarStr, String userNameStr,
|
String getTypeIcon(int type) {
|
||||||
String unlockDescStr, Function() action) {
|
String title = 'images/controls_user.png';
|
||||||
|
switch (type) {
|
||||||
|
case 1:
|
||||||
|
// 蓝牙开锁
|
||||||
|
title = 'images/controls_user.png';
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
// 密码开锁
|
||||||
|
title = 'images/icon_password.png';
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
// ic卡
|
||||||
|
title = 'images/icon_card.png';
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
// 指纹开锁
|
||||||
|
title = 'images/icon_fingerprint.png';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _operatingRecordItem(String userAvatarStr, String userNameStr, String unlockDescStr, Function() action) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import '../../../../appRouters.dart';
|
|||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../tools/commonItem.dart';
|
import '../../../../tools/commonItem.dart';
|
||||||
import '../../../../tools/dateTool.dart';
|
import '../../../../tools/dateTool.dart';
|
||||||
|
import '../../../../tools/showIosTipView.dart';
|
||||||
import '../../../../tools/showTFView.dart';
|
import '../../../../tools/showTFView.dart';
|
||||||
import '../../../../tools/submitBtn.dart';
|
import '../../../../tools/submitBtn.dart';
|
||||||
import '../../../../tools/titleAppBar.dart';
|
import '../../../../tools/titleAppBar.dart';
|
||||||
@ -200,21 +201,7 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
|
|||||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
onClick: () {
|
onClick: () {
|
||||||
switch (state.type.value) {
|
showIosTipViewDialog(context);
|
||||||
case 0:
|
|
||||||
// 卡
|
|
||||||
logic.deletICCardData();
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
// 指纹
|
|
||||||
logic.deletFingerprintsData();
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -393,4 +380,38 @@ class _OtherTypeKeyDetailPageState extends State<OtherTypeKeyDetailPage> {
|
|||||||
},);
|
},);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void showIosTipViewDialog(BuildContext context) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return ShowIosTipView(
|
||||||
|
title: "提示",
|
||||||
|
tipTitle: "确定要删除吗?",
|
||||||
|
sureClick: () {
|
||||||
|
Get.back();
|
||||||
|
switch (state.type.value) {
|
||||||
|
case 0:
|
||||||
|
// 卡
|
||||||
|
logic.deletICCardData();
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// 指纹
|
||||||
|
logic.deletFingerprintsData();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancelClick: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,12 +30,14 @@ class OtherTypeKeyListLogic extends BaseGetXController{
|
|||||||
void _initReplySubscription() {
|
void _initReplySubscription() {
|
||||||
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((reply) {
|
_replySubscription = EventBusManager().eventBus!.on<Reply>().listen((reply) {
|
||||||
// 添加指纹开始(重置锁里面所有指纹)
|
// 添加指纹开始(重置锁里面所有指纹)
|
||||||
if((reply is SenderAddFingerprintReply) && (state.isDeletFingerprintData.value == true)) {
|
print("111111111111111 isDeletFingerprintData:${state.isDeletFingerprintData} isDeletICCardData:${state.isDeletICCardData}");
|
||||||
|
if((reply is SenderAddFingerprintReply) && (state.isDeletFingerprintData == true)) {
|
||||||
|
print("111111111111111");
|
||||||
_replyAddFingerprintBegin(reply);
|
_replyAddFingerprintBegin(reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加卡片开始(重置锁里面所有卡)
|
// 添加卡片开始(重置锁里面所有卡)
|
||||||
if((reply is SenderAddICCardReply) && (state.isDeletICCardData.value == true)) {
|
if((reply is SenderAddICCardReply) && (state.isDeletICCardData == true)) {
|
||||||
_replyAddICCardBegin(reply);
|
_replyAddICCardBegin(reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +64,7 @@ class OtherTypeKeyListLogic extends BaseGetXController{
|
|||||||
case 0x00:
|
case 0x00:
|
||||||
//成功
|
//成功
|
||||||
print("${reply.commandType!.typeValue} 数据解析成功");
|
print("${reply.commandType!.typeValue} 数据解析成功");
|
||||||
state.isDeletFingerprintData.value = false;
|
state.isDeletICCardData = false;
|
||||||
deletICCardData();
|
deletICCardData();
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
@ -118,7 +120,7 @@ class OtherTypeKeyListLogic extends BaseGetXController{
|
|||||||
case 0x00:
|
case 0x00:
|
||||||
//成功
|
//成功
|
||||||
print("${reply.commandType!.typeValue} 数据解析成功");
|
print("${reply.commandType!.typeValue} 数据解析成功");
|
||||||
state.isDeletFingerprintData.value = false;
|
state.isDeletFingerprintData = false;
|
||||||
deletAllFingerprintsData();
|
deletAllFingerprintsData();
|
||||||
break;
|
break;
|
||||||
case 0x06:
|
case 0x06:
|
||||||
@ -387,7 +389,7 @@ class OtherTypeKeyListLogic extends BaseGetXController{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 重置所有指纹
|
// 重置所有指纹
|
||||||
Future<void> senderAddFingerprint() async {
|
Future<void> senderAddFingerprint(String keyId, String userID, int cardNo) async {
|
||||||
BlueManage().judgeReconnect(BlueManage().connectDeviceMacAddress, BlueManage().connectDeviceName, (DeviceConnectionState deviceConnectionState) async {
|
BlueManage().judgeReconnect(BlueManage().connectDeviceMacAddress, BlueManage().connectDeviceName, (DeviceConnectionState deviceConnectionState) async {
|
||||||
if (deviceConnectionState == DeviceConnectionState.connected){
|
if (deviceConnectionState == DeviceConnectionState.connected){
|
||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
@ -400,9 +402,12 @@ class OtherTypeKeyListLogic extends BaseGetXController{
|
|||||||
List<int> getTokenList = changeStringListToIntList(token!);
|
List<int> getTokenList = changeStringListToIntList(token!);
|
||||||
|
|
||||||
IoSenderManage.senderAddFingerprintCommand(
|
IoSenderManage.senderAddFingerprintCommand(
|
||||||
keyID:"1",
|
// keyID:"1",
|
||||||
userID:"DeleteAll!@#",
|
// userID:"DeleteAll!@#",
|
||||||
fingerNo:255,
|
// fingerNo:255,
|
||||||
|
keyID:keyId,
|
||||||
|
userID:userID,
|
||||||
|
fingerNo:cardNo,
|
||||||
useCountLimit:0,
|
useCountLimit:0,
|
||||||
startTime:0x11223344,
|
startTime:0x11223344,
|
||||||
endTime:0x11223344,
|
endTime:0x11223344,
|
||||||
@ -415,8 +420,8 @@ class OtherTypeKeyListLogic extends BaseGetXController{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重置所有卡片
|
// 删除卡片
|
||||||
Future<void> senderAddICCard() async {
|
Future<void> senderAddICCard(String keyId, String userID, int cardNo) async {
|
||||||
BlueManage().judgeReconnect(BlueManage().connectDeviceMacAddress, BlueManage().connectDeviceName, (DeviceConnectionState state) async {
|
BlueManage().judgeReconnect(BlueManage().connectDeviceMacAddress, BlueManage().connectDeviceName, (DeviceConnectionState state) async {
|
||||||
if (state == DeviceConnectionState.connected){
|
if (state == DeviceConnectionState.connected){
|
||||||
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||||
@ -430,9 +435,12 @@ class OtherTypeKeyListLogic extends BaseGetXController{
|
|||||||
print("openDoorTokenPubToken:$getTokenList");
|
print("openDoorTokenPubToken:$getTokenList");
|
||||||
|
|
||||||
IoSenderManage.senderAddICCardCommand(
|
IoSenderManage.senderAddICCardCommand(
|
||||||
keyID:"1",
|
// keyID:"1",
|
||||||
userID:"DeleteAll!@#",
|
// userID:"DeleteAll!@#",
|
||||||
cardNo:255,
|
// cardNo:255,
|
||||||
|
keyID:keyId,
|
||||||
|
userID:userID,
|
||||||
|
cardNo:cardNo,
|
||||||
useCountLimit:0,
|
useCountLimit:0,
|
||||||
startTime:0x11223344,
|
startTime:0x11223344,
|
||||||
endTime:0x11223344,
|
endTime:0x11223344,
|
||||||
@ -468,7 +476,7 @@ class OtherTypeKeyListLogic extends BaseGetXController{
|
|||||||
);
|
);
|
||||||
if(entity.errorCode!.codeIsSuccessful){
|
if(entity.errorCode!.codeIsSuccessful){
|
||||||
Toast.show(msg: "重置成功");
|
Toast.show(msg: "重置成功");
|
||||||
state.isDeletFingerprintData.value = false;
|
state.isDeletFingerprintData = false;
|
||||||
getFingerprintsListData();
|
getFingerprintsListData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -531,6 +539,7 @@ class OtherTypeKeyListLogic extends BaseGetXController{
|
|||||||
|
|
||||||
// 获取是否是演示模式 演示模式不获取接口
|
// 获取是否是演示模式 演示模式不获取接口
|
||||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
|
// print("aaaaaaa:$isDemoMode");
|
||||||
if(isDemoMode == false){
|
if(isDemoMode == false){
|
||||||
_initReplySubscription();
|
_initReplySubscription();
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,9 @@ import 'package:get/get.dart';
|
|||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../tools/dateTool.dart';
|
import '../../../../tools/dateTool.dart';
|
||||||
|
import '../../../../tools/left_slide_actions.dart';
|
||||||
import '../../../../tools/noData.dart';
|
import '../../../../tools/noData.dart';
|
||||||
|
import '../../../../tools/showIosTipView.dart';
|
||||||
import '../../../../tools/storage.dart';
|
import '../../../../tools/storage.dart';
|
||||||
import '../../../../tools/submitBtn.dart';
|
import '../../../../tools/submitBtn.dart';
|
||||||
import '../../../../tools/titleAppBar.dart';
|
import '../../../../tools/titleAppBar.dart';
|
||||||
@ -191,6 +193,29 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
|||||||
switch (state.fromType.value) {
|
switch (state.fromType.value) {
|
||||||
case 0:
|
case 0:
|
||||||
// 卡
|
// 卡
|
||||||
|
if (index < state.fingerprintItemListData.value.length) {
|
||||||
|
return LeftSlideActions(
|
||||||
|
key: Key(fingerprintItemData.cardName!),
|
||||||
|
actionsWidth: 60,
|
||||||
|
actions: [
|
||||||
|
_buildDeleteBtn(fingerprintItemData.cardId.toString()),
|
||||||
|
],
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(1)),
|
||||||
|
),
|
||||||
|
child: _keyItem('images/icon_card.png', fingerprintItemData.cardName!, fingerprintItemData.cardType! == 1 ? "永久" : "${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())}", () async {
|
||||||
|
var data = await Get.toNamed(Routers.otherTypeKeyDetailPage, arguments: {
|
||||||
|
"fingerprintItemData": fingerprintItemData,
|
||||||
|
"type": type,
|
||||||
|
});
|
||||||
|
if(data != null) {
|
||||||
|
logic.getICCardListData();
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return const SizedBox.shrink();
|
||||||
|
|
||||||
return _keyItem('images/icon_card.png', fingerprintItemData.cardName!, fingerprintItemData.cardType! == 1 ? "永久" : "${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())}", () async {
|
return _keyItem('images/icon_card.png', fingerprintItemData.cardName!, fingerprintItemData.cardType! == 1 ? "永久" : "${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())}", () async {
|
||||||
var data = await Get.toNamed(Routers.otherTypeKeyDetailPage, arguments: {
|
var data = await Get.toNamed(Routers.otherTypeKeyDetailPage, arguments: {
|
||||||
"fingerprintItemData": fingerprintItemData,
|
"fingerprintItemData": fingerprintItemData,
|
||||||
@ -203,6 +228,29 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
|||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
// 指纹
|
// 指纹
|
||||||
|
if (index < state.fingerprintItemListData.value.length) {
|
||||||
|
return LeftSlideActions(
|
||||||
|
key: Key(fingerprintItemData.fingerprintName!),
|
||||||
|
actionsWidth: 60,
|
||||||
|
actions: [
|
||||||
|
_buildDeleteBtn(fingerprintItemData.fingerprintId.toString()),
|
||||||
|
],
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(1)),
|
||||||
|
),
|
||||||
|
child: _keyItem('images/icon_fingerprint.png', fingerprintItemData.fingerprintName!, fingerprintItemData.fingerprintType! == 1 ? "永久" : "${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())}", () async {
|
||||||
|
var data = await Get.toNamed(Routers.otherTypeKeyDetailPage, arguments: {
|
||||||
|
"fingerprintItemData": fingerprintItemData,
|
||||||
|
"type": type,
|
||||||
|
});
|
||||||
|
if(data != null) {
|
||||||
|
logic.getFingerprintsListData();
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return const SizedBox.shrink();
|
||||||
|
|
||||||
return _keyItem('images/icon_fingerprint.png', fingerprintItemData.fingerprintName!, fingerprintItemData.fingerprintType! == 1 ? "永久" : "${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())}", () async {
|
return _keyItem('images/icon_fingerprint.png', fingerprintItemData.fingerprintName!, fingerprintItemData.fingerprintType! == 1 ? "永久" : "${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())}", () async {
|
||||||
var data = await Get.toNamed(Routers.otherTypeKeyDetailPage, arguments: {
|
var data = await Get.toNamed(Routers.otherTypeKeyDetailPage, arguments: {
|
||||||
"fingerprintItemData": fingerprintItemData,
|
"fingerprintItemData": fingerprintItemData,
|
||||||
@ -230,16 +278,77 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
|||||||
) :const NoData());
|
) :const NoData());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildDeleteBtn(String idStr) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
// 省略: 弹出是否删除的确认对话框。
|
||||||
|
showIosTipViewDialog(context, idStr);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 60,
|
||||||
|
color: const Color(0xFFF20101),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: const Text(
|
||||||
|
'删除',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
color: Colors.white,
|
||||||
|
height: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void showIosTipViewDialog(BuildContext context, String keyId) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return ShowIosTipView(
|
||||||
|
title: "提示",
|
||||||
|
tipTitle: "确定要删除吗?",
|
||||||
|
sureClick: () async {
|
||||||
|
Get.back();
|
||||||
|
String? idStr = await Storage.getUid();
|
||||||
|
switch (state.fromType.value) {
|
||||||
|
case 0:
|
||||||
|
// 卡
|
||||||
|
state.isDeletICCardData = true;
|
||||||
|
logic.senderAddICCard(keyId, idStr ?? "", 0);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
// 指纹
|
||||||
|
state.isDeletFingerprintData = true;
|
||||||
|
logic.senderAddFingerprint(keyId, idStr ?? "", 0);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
// 遥控
|
||||||
|
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancelClick: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget _keyItem(String lockTypeIcon, String lockTypeTitle, String showTime, Function() action) {
|
Widget _keyItem(String lockTypeIcon, String lockTypeTitle, String showTime, Function() action) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 90.h,
|
height: 90.h,
|
||||||
// margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
// margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||||
decoration: BoxDecoration(
|
color: Colors.white,
|
||||||
color: Colors.white,
|
// decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(10.w),
|
// color: Colors.white,
|
||||||
),
|
// // borderRadius: BorderRadius.circular(10.w),
|
||||||
|
// ),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 30.w),
|
SizedBox(width: 30.w),
|
||||||
@ -298,14 +407,14 @@ class _OtherTypeKeyListPageState extends State<OtherTypeKeyListPage> {
|
|||||||
switch (state.fromType.value) {
|
switch (state.fromType.value) {
|
||||||
case 0:
|
case 0:
|
||||||
// 卡
|
// 卡
|
||||||
state.isDeletICCardData.value = true;
|
state.isDeletICCardData = true;
|
||||||
logic.senderAddICCard();
|
logic.senderAddICCard("1", "DeleteAll!@#", 255);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
// 指纹
|
// 指纹
|
||||||
// logic.deletAllFingerprintsData();
|
// logic.deletAllFingerprintsData();
|
||||||
state.isDeletFingerprintData.value = true;
|
state.isDeletFingerprintData = true;
|
||||||
logic.senderAddFingerprint();
|
logic.senderAddFingerprint("1", "DeleteAll!@#", 255);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// 遥控
|
// 遥控
|
||||||
|
|||||||
@ -8,8 +8,8 @@ class OtherTypeKeyListState{
|
|||||||
final lockId = 0.obs;
|
final lockId = 0.obs;
|
||||||
final fromType = 0.obs;
|
final fromType = 0.obs;
|
||||||
|
|
||||||
var isDeletFingerprintData = false.obs;
|
var isDeletFingerprintData = false;
|
||||||
var isDeletICCardData = false.obs;
|
var isDeletICCardData = false;
|
||||||
|
|
||||||
final fingerprintItemListData = <FingerprintItemData>[].obs;
|
final fingerprintItemListData = <FingerprintItemData>[].obs;
|
||||||
final TextEditingController searchController = TextEditingController();
|
final TextEditingController searchController = TextEditingController();
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import 'package:star_lock/tools/toast.dart';
|
|||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../tools/commonItem.dart';
|
import '../../../../tools/commonItem.dart';
|
||||||
|
import '../../../../tools/showIosTipView.dart';
|
||||||
import '../../../../tools/submitBtn.dart';
|
import '../../../../tools/submitBtn.dart';
|
||||||
import '../../../../tools/titleAppBar.dart';
|
import '../../../../tools/titleAppBar.dart';
|
||||||
import '../../../../translations/trans_lib.dart';
|
import '../../../../translations/trans_lib.dart';
|
||||||
@ -191,7 +192,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
|||||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
onClick: () {
|
onClick: () {
|
||||||
deletePwdRequest();
|
showIosTipViewDialog(context);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -447,4 +448,23 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
|||||||
return await methodChannel.invokeMethod(method, arguments);
|
return await methodChannel.invokeMethod(method, arguments);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void showIosTipViewDialog(BuildContext context) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return ShowIosTipView(
|
||||||
|
title: "提示",
|
||||||
|
tipTitle: "确定要删除吗?",
|
||||||
|
sureClick: () {
|
||||||
|
Get.back();
|
||||||
|
deletePwdRequest();
|
||||||
|
},
|
||||||
|
cancelClick: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,8 @@ import 'package:star_lock/network/api_repository.dart';
|
|||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
import 'package:star_lock/tools/toast.dart';
|
import 'package:star_lock/tools/toast.dart';
|
||||||
|
|
||||||
|
import '../passwordKey_perpetual/passwordKeyEntity.dart';
|
||||||
|
|
||||||
class PasswordKeyListLogic extends BaseGetXController {
|
class PasswordKeyListLogic extends BaseGetXController {
|
||||||
final PasswordKeyListState state = PasswordKeyListState();
|
final PasswordKeyListState state = PasswordKeyListState();
|
||||||
|
|
||||||
@ -32,6 +34,16 @@ class PasswordKeyListLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//删除密码请求 deleteType:1-蓝牙 2-网关
|
||||||
|
Future<void> deletePwdRequest(String lockId, String keyboardPwdId, int deleteType) async {
|
||||||
|
PasswordKeyEntity entity = await ApiRepository.to.deleteKeyboardPwd(
|
||||||
|
lockId, keyboardPwdId, deleteType);
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
Toast.show(msg: "删除成功");
|
||||||
|
mockNetworkDataRequest();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onReady() {
|
void onReady() {
|
||||||
// TODO: implement onReady
|
// TODO: implement onReady
|
||||||
|
|||||||
@ -10,6 +10,8 @@ import 'package:star_lock/tools/storage.dart';
|
|||||||
import 'package:star_lock/tools/toast.dart';
|
import 'package:star_lock/tools/toast.dart';
|
||||||
import '../../../../appRouters.dart';
|
import '../../../../appRouters.dart';
|
||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
|
import '../../../../tools/left_slide_actions.dart';
|
||||||
|
import '../../../../tools/showIosTipView.dart';
|
||||||
import '../../../../tools/submitBtn.dart';
|
import '../../../../tools/submitBtn.dart';
|
||||||
import '../../../../tools/titleAppBar.dart';
|
import '../../../../tools/titleAppBar.dart';
|
||||||
import '../../../../translations/trans_lib.dart';
|
import '../../../../translations/trans_lib.dart';
|
||||||
@ -167,22 +169,34 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
|||||||
return ListView.separated(
|
return ListView.separated(
|
||||||
itemCount: getItemData.length,
|
itemCount: getItemData.length,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (c, index) {
|
||||||
PasswordKeyListItem indexEntity = getItemData[index];
|
PasswordKeyListItem passwordKeyListItem = getItemData[index];
|
||||||
String useDateStr = ''; //使用期限
|
String useDateStr = ''; //使用期限
|
||||||
|
|
||||||
//使用期限
|
//使用期限
|
||||||
useDateStr = getUseDateStr(indexEntity);
|
useDateStr = getUseDateStr(passwordKeyListItem);
|
||||||
|
|
||||||
return _electronicKeyItem('images/controls_user.png',
|
if (index < getItemData.length) {
|
||||||
indexEntity.keyboardPwdName!, useDateStr, () {
|
return LeftSlideActions(
|
||||||
Navigator.pushNamed(context, Routers.passwordKeyDetailPage,
|
key: Key(passwordKeyListItem.keyboardPwdName!),
|
||||||
arguments: {"itemData": indexEntity}).then((val) {
|
actionsWidth: 60,
|
||||||
if (val != null) {
|
actions: [
|
||||||
logic.mockNetworkDataRequest();
|
_buildDeleteBtn(passwordKeyListItem),
|
||||||
}
|
],
|
||||||
});
|
decoration: const BoxDecoration(
|
||||||
;
|
borderRadius: BorderRadius.all(Radius.circular(1)),
|
||||||
});
|
),
|
||||||
|
child: _electronicKeyItem('images/icon_password.png',
|
||||||
|
passwordKeyListItem.keyboardPwdName!, useDateStr, () {
|
||||||
|
Navigator.pushNamed(context, Routers.passwordKeyDetailPage,
|
||||||
|
arguments: {"itemData": passwordKeyListItem}).then((val) {
|
||||||
|
if (val != null) {
|
||||||
|
logic.mockNetworkDataRequest();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return const SizedBox.shrink();
|
||||||
},
|
},
|
||||||
separatorBuilder: (BuildContext context, int index) {
|
separatorBuilder: (BuildContext context, int index) {
|
||||||
return const Divider(
|
return const Divider(
|
||||||
@ -193,6 +207,48 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildDeleteBtn(PasswordKeyListItem passwordKeyListItem) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
// 省略: 弹出是否删除的确认对话框。
|
||||||
|
showIosTipViewDialog(context, passwordKeyListItem);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 60,
|
||||||
|
color: const Color(0xFFF20101),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: const Text(
|
||||||
|
'删除',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
color: Colors.white,
|
||||||
|
height: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void showIosTipViewDialog(BuildContext context, PasswordKeyListItem passwordKeyListItem) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return ShowIosTipView(
|
||||||
|
title: "提示",
|
||||||
|
tipTitle: "确定要删除吗?",
|
||||||
|
sureClick: () {
|
||||||
|
Get.back();
|
||||||
|
logic.deletePwdRequest(passwordKeyListItem.lockId.toString(), passwordKeyListItem.keyboardPwdId.toString(), 1);
|
||||||
|
},
|
||||||
|
cancelClick: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//使用期限
|
//使用期限
|
||||||
/**
|
/**
|
||||||
单次 1 只能在开始时间后6小时内使用一次
|
单次 1 只能在开始时间后6小时内使用一次
|
||||||
|
|||||||
@ -188,7 +188,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
|||||||
children: [
|
children: [
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
// margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: titleStr,
|
leftTitel: titleStr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
@ -203,7 +203,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage> {
|
|||||||
// 限时顶部选择日期
|
// 限时顶部选择日期
|
||||||
Widget keyTimeLimitWidget() {
|
Widget keyTimeLimitWidget() {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
// margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
CommonItem(
|
CommonItem(
|
||||||
|
|||||||
@ -221,7 +221,7 @@ class KeyInfos {
|
|||||||
int? resetButton;
|
int? resetButton;
|
||||||
int? endDate;
|
int? endDate;
|
||||||
int? keyRight;
|
int? keyRight;
|
||||||
int? electricQuantity;
|
// int? electricQuantity;
|
||||||
int? lockSound;
|
int? lockSound;
|
||||||
int? volume;
|
int? volume;
|
||||||
int? specialValue;
|
int? specialValue;
|
||||||
@ -277,7 +277,7 @@ class KeyInfos {
|
|||||||
this.resetButton,
|
this.resetButton,
|
||||||
this.endDate,
|
this.endDate,
|
||||||
this.keyRight,
|
this.keyRight,
|
||||||
this.electricQuantity,
|
// this.electricQuantity,
|
||||||
this.lockSound,
|
this.lockSound,
|
||||||
this.volume,
|
this.volume,
|
||||||
this.specialValue,
|
this.specialValue,
|
||||||
@ -334,7 +334,7 @@ class KeyInfos {
|
|||||||
resetButton = json['resetButton'];
|
resetButton = json['resetButton'];
|
||||||
endDate = json['endDate'];
|
endDate = json['endDate'];
|
||||||
keyRight = json['keyRight'];
|
keyRight = json['keyRight'];
|
||||||
electricQuantity = json['electricQuantity'];
|
// electricQuantity = json['electricQuantity'];
|
||||||
lockSound = json['lockSound'];
|
lockSound = json['lockSound'];
|
||||||
volume = json['volume'];
|
volume = json['volume'];
|
||||||
specialValue = json['specialValue'];
|
specialValue = json['specialValue'];
|
||||||
@ -397,7 +397,7 @@ class KeyInfos {
|
|||||||
data['resetButton'] = resetButton;
|
data['resetButton'] = resetButton;
|
||||||
data['endDate'] = endDate;
|
data['endDate'] = endDate;
|
||||||
data['keyRight'] = keyRight;
|
data['keyRight'] = keyRight;
|
||||||
data['electricQuantity'] = electricQuantity;
|
// data['electricQuantity'] = electricQuantity;
|
||||||
data['lockSound'] = lockSound;
|
data['lockSound'] = lockSound;
|
||||||
data['volume'] = volume;
|
data['volume'] = volume;
|
||||||
data['specialValue'] = specialValue;
|
data['specialValue'] = specialValue;
|
||||||
|
|||||||
@ -45,7 +45,7 @@ class _LockListPageState extends State<LockListPage> {
|
|||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 122.h,
|
// height: 122.h,
|
||||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -101,6 +101,9 @@ class _LockListPageState extends State<LockListPage> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20.h,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -98,61 +98,68 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget unHaveData() {
|
Widget unHaveData() {
|
||||||
return Column(
|
return ListView(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 330.w,
|
height: 160.h,
|
||||||
// height: 330.w,
|
),
|
||||||
// margin: EdgeInsets.only(top: 180.h),
|
Row(
|
||||||
// decoration: BoxDecoration(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
// border: Border.all(width: 4.w, color: AppColors.mainColor),
|
children: [
|
||||||
// borderRadius: BorderRadius.circular(110.w),
|
SizedBox(
|
||||||
// ),
|
width: 330.w,
|
||||||
child: InkWell(
|
// height: 330.w,
|
||||||
child: Padding(
|
// margin: EdgeInsets.only(top: 180.h),
|
||||||
padding: const EdgeInsets.all(30.0),
|
// decoration: BoxDecoration(
|
||||||
child: Image.asset(
|
// border: Border.all(width: 4.w, color: AppColors.mainColor),
|
||||||
'images/main/icon_main_unHaveLockData.png',
|
// borderRadius: BorderRadius.circular(110.w),
|
||||||
width: 260.w,
|
// ),
|
||||||
height: 260.w,
|
child: InkWell(
|
||||||
),
|
child: Padding(
|
||||||
),
|
padding: const EdgeInsets.all(30.0),
|
||||||
onTap: () {
|
child: Image.asset(
|
||||||
//实现回调函数
|
'images/main/icon_main_unHaveLockData.png',
|
||||||
Navigator.pushNamed(
|
width: 260.w,
|
||||||
context, Routers.seletLockTypePage,
|
height: 260.w,
|
||||||
// arguments: {
|
),
|
||||||
// "url": ConstConfig.privacAgreementUrl,
|
),
|
||||||
// "title": '隐私政策'
|
onTap: () {
|
||||||
// }
|
//实现回调函数
|
||||||
);
|
Navigator.pushNamed(
|
||||||
},
|
context, Routers.seletLockTypePage,
|
||||||
|
// arguments: {
|
||||||
|
// "url": ConstConfig.privacAgreementUrl,
|
||||||
|
// "title": '隐私政策'
|
||||||
|
// }
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
// padding: EdgeInsets.all(30.w),
|
||||||
|
child: Text(
|
||||||
|
TranslationLoader
|
||||||
|
.lanKeys!.whenAddingLockThePhoneMustBeNextToTheLock!.tr,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 26.sp,
|
||||||
|
// fontWeight: FontWeight.w800,
|
||||||
|
color: Colors.black),
|
||||||
)),
|
)),
|
||||||
|
SizedBox(
|
||||||
|
height: 160.h,
|
||||||
|
),
|
||||||
|
SubmitBtn(
|
||||||
|
btnName: '演示模式',
|
||||||
|
onClick: () {
|
||||||
|
Get.toNamed(Routers.demoModeLockDetailPage);
|
||||||
|
},
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(30.w),
|
|
||||||
child: Text(
|
|
||||||
TranslationLoader
|
|
||||||
.lanKeys!.whenAddingLockThePhoneMustBeNextToTheLock!.tr,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 26.sp,
|
|
||||||
// fontWeight: FontWeight.w800,
|
|
||||||
color: Colors.black),
|
|
||||||
)),
|
|
||||||
SizedBox(
|
|
||||||
height: 160.h,
|
|
||||||
),
|
|
||||||
SubmitBtn(
|
|
||||||
btnName: '演示模式',
|
|
||||||
onClick: () {
|
|
||||||
Get.toNamed(Routers.demoModeLockDetailPage);
|
|
||||||
},
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import 'package:get/get.dart';
|
|||||||
|
|
||||||
import '../../app_settings/app_colors.dart';
|
import '../../app_settings/app_colors.dart';
|
||||||
import '../../tools/commonItem.dart';
|
import '../../tools/commonItem.dart';
|
||||||
|
import '../../tools/eventBusEventManage.dart';
|
||||||
import '../../tools/titleAppBar.dart';
|
import '../../tools/titleAppBar.dart';
|
||||||
import '../../translations/app_dept.dart';
|
import '../../translations/app_dept.dart';
|
||||||
import '../../translations/trans_lib.dart';
|
import '../../translations/trans_lib.dart';
|
||||||
@ -32,7 +33,8 @@ class _MineMultiLanguagePageState extends State<MineMultiLanguagePage> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: _children(),
|
children: _children(),
|
||||||
));
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _children() {
|
List<Widget> _children() {
|
||||||
@ -71,6 +73,7 @@ class _MineMultiLanguagePageState extends State<MineMultiLanguagePage> {
|
|||||||
: Container()),
|
: Container()),
|
||||||
action: () {
|
action: () {
|
||||||
logic.changeLanguage(e);
|
logic.changeLanguage(e);
|
||||||
|
eventBus.fire(ChangeLanguageBlockLastLanguageEvent(lanType.lanTitle));
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,12 +13,13 @@ class MineMultiLanguageState {
|
|||||||
|
|
||||||
var currentLanguageType = ExtensionLanguageType.fromLanguageCode(Get.locale!.languageCode).obs;
|
var currentLanguageType = ExtensionLanguageType.fromLanguageCode(Get.locale!.languageCode).obs;
|
||||||
|
|
||||||
AppLanuageConfigState() {
|
MineMultiLanguageState() {
|
||||||
resetLan();
|
resetLan();
|
||||||
}
|
}
|
||||||
|
|
||||||
void resetLan() {
|
void resetLan() {
|
||||||
currentLanguageType.value = ExtensionLanguageType.fromLanguageCode(Get.locale!.languageCode);
|
currentLanguageType.value = ExtensionLanguageType.fromLanguageCode(Get.locale!.languageCode);
|
||||||
|
print("currentLanguageType.value:${currentLanguageType.value}");
|
||||||
// StoreService.to.saveLanguageCode(Get.locale!.languageCode);
|
// StoreService.to.saveLanguageCode(Get.locale!.languageCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
|
||||||
|
|
||||||
|
import '../../../network/api_repository.dart';
|
||||||
|
import '../../../tools/baseGetXController.dart';
|
||||||
|
import '../../../tools/toast.dart';
|
||||||
|
import 'appUnlockNeedMobileNetworkingLock_state.dart';
|
||||||
|
import 'selectLockListEntity.dart';
|
||||||
|
|
||||||
|
class AppUnlockNeedMobileNetworkingLockLogic extends BaseGetXController{
|
||||||
|
final AppUnlockNeedMobileNetworkingLockState state = AppUnlockNeedMobileNetworkingLockState();
|
||||||
|
|
||||||
|
//请求锁列表
|
||||||
|
Future<List<LockItemData>> mockNetworkDataRequest() async {
|
||||||
|
SelectLockListEntity entity = await ApiRepository.to.selectLockList();
|
||||||
|
List<LockItemData> dataList = [];
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
dataList = entity.data!.list!;
|
||||||
|
state.lockItemList.value = dataList;
|
||||||
|
}
|
||||||
|
return dataList;
|
||||||
|
}
|
||||||
|
|
||||||
|
//APP开锁时需手机联网的锁
|
||||||
|
Future<void> setAppUnlockMustOnlineRequest() async {
|
||||||
|
SelectLockListEntity entity =
|
||||||
|
await ApiRepository.to.setAppUnlockMustOnline(state.selectLockIdList);
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
Toast.show(msg: '操作成功');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onReady() {
|
||||||
|
// TODO: implement onReady
|
||||||
|
super.onReady();
|
||||||
|
print("onReady()");
|
||||||
|
|
||||||
|
mockNetworkDataRequest();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onInit() {
|
||||||
|
// TODO: implement onInit
|
||||||
|
super.onInit();
|
||||||
|
print("lockDetail_onInit()");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onClose() {
|
||||||
|
// TODO: implement onClose
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -2,8 +2,6 @@ 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/mine/mineSet/appUnlockNeedMobileNetworkingLock/selectLockListEntity.dart';
|
import 'package:star_lock/mine/mineSet/appUnlockNeedMobileNetworkingLock/selectLockListEntity.dart';
|
||||||
import 'package:star_lock/network/api_repository.dart';
|
|
||||||
import 'package:star_lock/tools/baseGetXController.dart';
|
|
||||||
import 'package:star_lock/tools/toast.dart';
|
import 'package:star_lock/tools/toast.dart';
|
||||||
|
|
||||||
import '../../../app_settings/app_colors.dart';
|
import '../../../app_settings/app_colors.dart';
|
||||||
@ -11,6 +9,7 @@ import '../../../tools/commonItem.dart';
|
|||||||
import '../../../tools/submitBtn.dart';
|
import '../../../tools/submitBtn.dart';
|
||||||
import '../../../tools/titleAppBar.dart';
|
import '../../../tools/titleAppBar.dart';
|
||||||
import '../../../translations/trans_lib.dart';
|
import '../../../translations/trans_lib.dart';
|
||||||
|
import 'appUnlockNeedMobileNetworkingLock_logic.dart';
|
||||||
|
|
||||||
class APPUnlockNeedMobileNetworkingLockPage extends StatefulWidget {
|
class APPUnlockNeedMobileNetworkingLockPage extends StatefulWidget {
|
||||||
const APPUnlockNeedMobileNetworkingLockPage({Key? key}) : super(key: key);
|
const APPUnlockNeedMobileNetworkingLockPage({Key? key}) : super(key: key);
|
||||||
@ -20,16 +19,14 @@ class APPUnlockNeedMobileNetworkingLockPage extends StatefulWidget {
|
|||||||
_APPUnlockNeedMobileNetworkingLockPageState();
|
_APPUnlockNeedMobileNetworkingLockPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _APPUnlockNeedMobileNetworkingLockPageState
|
class _APPUnlockNeedMobileNetworkingLockPageState extends State<APPUnlockNeedMobileNetworkingLockPage> {
|
||||||
extends State<APPUnlockNeedMobileNetworkingLockPage> {
|
final logic = Get.put(AppUnlockNeedMobileNetworkingLockLogic());
|
||||||
List<LockItemData> lockItemList = [];
|
final state = Get.find<AppUnlockNeedMobileNetworkingLockLogic>().state;
|
||||||
List selectLockIdList = [];
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
mockNetworkDataRequest();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -73,32 +70,48 @@ class _APPUnlockNeedMobileNetworkingLockPageState
|
|||||||
isHaveLine: false,
|
isHaveLine: false,
|
||||||
isHaveRightWidget: true,
|
isHaveRightWidget: true,
|
||||||
rightWidget: GestureDetector(
|
rightWidget: GestureDetector(
|
||||||
onTap: () {},
|
onTap: () {
|
||||||
child: Row(
|
state.isCheckAll.value = !state.isCheckAll.value;
|
||||||
children: [
|
for(LockItemData lockItemData in state.lockItemList.value){
|
||||||
Image.asset(
|
if(state.isCheckAll.value == true){
|
||||||
'images/icon_round_unSelet.png',
|
lockItemData.isCheck = true;
|
||||||
width: 26.w,
|
state.selectLockIdList.add(lockItemData.lockId);
|
||||||
height: 26.w,
|
}else{
|
||||||
),
|
lockItemData.isCheck = false;
|
||||||
],
|
state.selectLockIdList = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
child: Obx(() => Row(
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
state.isCheckAll.value ? 'images/icon_round_selet.png' : 'images/icon_round_unSelet.png',
|
||||||
|
width: 30.w,
|
||||||
|
height: 30.w,
|
||||||
|
),
|
||||||
|
]),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
SizedBox(height: 15.h),
|
SizedBox(height: 15.h),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ListView.builder(
|
child: Obx(() => ListView.builder(
|
||||||
itemCount: lockItemList.length,
|
itemCount: state.lockItemList.value.length,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (c, index) {
|
||||||
LockItemData itemData = lockItemList[index];
|
LockItemData itemData = state.lockItemList.value[index];
|
||||||
// itemData.isCheck = false;
|
if(state.isCheckAll.value == true){
|
||||||
|
itemData.isCheck = true;
|
||||||
|
}else{
|
||||||
|
itemData.isCheck = false;
|
||||||
|
}
|
||||||
return _gatewatListItem(itemData);
|
return _gatewatListItem(itemData);
|
||||||
}),
|
})),
|
||||||
),
|
),
|
||||||
SubmitBtn(
|
SubmitBtn(
|
||||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||||
onClick: () {
|
onClick: () {
|
||||||
if (selectLockIdList.isNotEmpty) {
|
if (state.selectLockIdList.isNotEmpty) {
|
||||||
setAppUnlockMustOnlineRequest();
|
logic.setAppUnlockMustOnlineRequest();
|
||||||
} else {
|
} else {
|
||||||
Toast.show(msg: '请选择需设置的锁');
|
Toast.show(msg: '请选择需设置的锁');
|
||||||
}
|
}
|
||||||
@ -116,9 +129,9 @@ class _APPUnlockNeedMobileNetworkingLockPageState
|
|||||||
setState(() {
|
setState(() {
|
||||||
itemData.isCheck = !itemData.isCheck;
|
itemData.isCheck = !itemData.isCheck;
|
||||||
if (itemData.isCheck == true) {
|
if (itemData.isCheck == true) {
|
||||||
selectLockIdList.add(itemData.lockId);
|
state.selectLockIdList.add(itemData.lockId);
|
||||||
} else {
|
} else {
|
||||||
selectLockIdList.remove(itemData.lockId);
|
state.selectLockIdList.remove(itemData.lockId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -155,26 +168,4 @@ class _APPUnlockNeedMobileNetworkingLockPageState
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//请求锁列表
|
|
||||||
Future<List<LockItemData>> mockNetworkDataRequest() async {
|
|
||||||
SelectLockListEntity entity = await ApiRepository.to.selectLockList();
|
|
||||||
List<LockItemData> dataList = [];
|
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
|
||||||
dataList = entity.data!.list!;
|
|
||||||
setState(() {
|
|
||||||
lockItemList = dataList;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return dataList;
|
|
||||||
}
|
|
||||||
|
|
||||||
//APP开锁时需手机联网的锁
|
|
||||||
Future<void> setAppUnlockMustOnlineRequest() async {
|
|
||||||
SelectLockListEntity entity =
|
|
||||||
await ApiRepository.to.setAppUnlockMustOnline(selectLockIdList);
|
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
|
||||||
Toast.show(msg: '操作成功');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import 'selectLockListEntity.dart';
|
||||||
|
|
||||||
|
class AppUnlockNeedMobileNetworkingLockState {
|
||||||
|
var lockItemList = <LockItemData>[].obs;
|
||||||
|
var selectLockIdList = [];
|
||||||
|
var isCheckAll = false.obs;
|
||||||
|
}
|
||||||
@ -145,11 +145,11 @@ class _AdministratorDetailsPageState extends State<AdministratorDetailsPage> {
|
|||||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) {
|
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLong) {
|
||||||
//永久
|
//永久
|
||||||
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
||||||
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 永久';
|
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)}\n永久';
|
||||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) {
|
} else if (indexEntity.keyType == XSConstantMacro.keyTypeOnce) {
|
||||||
//单次
|
//单次
|
||||||
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
||||||
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} 单次';
|
useDateStr = '${dateStr.toLocal().toString().substring(0, 16)} \n单次';
|
||||||
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) {
|
} else if (indexEntity.keyType == XSConstantMacro.keyTypeLoop) {
|
||||||
//循环
|
//循环
|
||||||
useDateStr = '循环';
|
useDateStr = '循环';
|
||||||
|
|||||||
@ -11,6 +11,9 @@ import '../../../../appRouters.dart';
|
|||||||
import '../../../../app_settings/app_colors.dart';
|
import '../../../../app_settings/app_colors.dart';
|
||||||
import '../../../../tools/titleAppBar.dart';
|
import '../../../../tools/titleAppBar.dart';
|
||||||
import '../../../../translations/trans_lib.dart';
|
import '../../../../translations/trans_lib.dart';
|
||||||
|
import '../../../tools/left_slide_actions.dart';
|
||||||
|
import '../../../tools/showIosTipView.dart';
|
||||||
|
import '../../../tools/toast.dart';
|
||||||
|
|
||||||
class AuthorizedAdministratorListPage extends StatefulWidget {
|
class AuthorizedAdministratorListPage extends StatefulWidget {
|
||||||
const AuthorizedAdministratorListPage({Key? key}) : super(key: key);
|
const AuthorizedAdministratorListPage({Key? key}) : super(key: key);
|
||||||
@ -92,11 +95,22 @@ class _AuthorizedAdministratorListPageState
|
|||||||
print("授权管理员列表成功:${entity.data?.itemList}");
|
print("授权管理员列表成功:${entity.data?.itemList}");
|
||||||
if (entity.data != null) {
|
if (entity.data != null) {
|
||||||
dataList = entity.data!.itemList!;
|
dataList = entity.data!.itemList!;
|
||||||
|
// setState(() {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return dataList;
|
return dataList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//删除授权管理员请求 是否删除授权管理员发送的钥匙。 1是,0否
|
||||||
|
Future<void> deleteAdministratorRequest(String uid) async {
|
||||||
|
AuthorizedAdminListEntity entity = await ApiRepository.to
|
||||||
|
.deleteAuthorizedAdmin(uid, '0');
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
Toast.show(msg: "删除成功");
|
||||||
|
mockNetworkDataRequest();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Widget _searchWidget() {
|
Widget _searchWidget() {
|
||||||
return Container(
|
return Container(
|
||||||
height: 60.h,
|
height: 60.h,
|
||||||
@ -139,6 +153,20 @@ class _AuthorizedAdministratorListPageState
|
|||||||
itemCount: itemList.length,
|
itemCount: itemList.length,
|
||||||
itemBuilder: (c, index) {
|
itemBuilder: (c, index) {
|
||||||
AuthorizedAdminListItem itemData = itemList[index];
|
AuthorizedAdminListItem itemData = itemList[index];
|
||||||
|
if (index < itemList.length) {
|
||||||
|
return LeftSlideActions(
|
||||||
|
key: Key(itemData.name!),
|
||||||
|
actionsWidth: 60,
|
||||||
|
actions: [
|
||||||
|
_buildDeleteBtn(itemData.uid.toString()),
|
||||||
|
],
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(1)),
|
||||||
|
),
|
||||||
|
child: _electronicKeyItem(itemData),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return const SizedBox.shrink();
|
||||||
return _electronicKeyItem(itemData);
|
return _electronicKeyItem(itemData);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -155,10 +183,10 @@ class _AuthorizedAdministratorListPageState
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 100.h,
|
height: 100.h,
|
||||||
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
// margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.circular(10.w),
|
// borderRadius: BorderRadius.circular(10.w),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
@ -238,4 +266,46 @@ class _AuthorizedAdministratorListPageState
|
|||||||
|
|
||||||
return useDateStr;
|
return useDateStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void showIosTipViewDialog(BuildContext context, String keyId) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return ShowIosTipView(
|
||||||
|
title: "提示",
|
||||||
|
tipTitle: "确定要删除吗?",
|
||||||
|
sureClick: () {
|
||||||
|
Get.back();
|
||||||
|
deleteAdministratorRequest(keyId);
|
||||||
|
},
|
||||||
|
cancelClick: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildDeleteBtn(String keyId) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
// 省略: 弹出是否删除的确认对话框。
|
||||||
|
showIosTipViewDialog(context, keyId);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 60,
|
||||||
|
color: const Color(0xFFF20101),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: const Text(
|
||||||
|
'删除',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
color: Colors.white,
|
||||||
|
height: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import 'package:star_lock/mine/mineSet/mineSet/mineSet_state.dart';
|
|||||||
import 'package:star_lock/tools/storage.dart';
|
import 'package:star_lock/tools/storage.dart';
|
||||||
import '../../../../network/api_repository.dart';
|
import '../../../../network/api_repository.dart';
|
||||||
import '../../../../tools/baseGetXController.dart';
|
import '../../../../tools/baseGetXController.dart';
|
||||||
|
import '../../../tools/eventBusEventManage.dart';
|
||||||
|
|
||||||
class MineSetLogic extends BaseGetXController {
|
class MineSetLogic extends BaseGetXController {
|
||||||
final MineSetState state = MineSetState();
|
final MineSetState state = MineSetState();
|
||||||
@ -67,10 +68,22 @@ class MineSetLogic extends BaseGetXController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 下级界面修改成功后传递数据
|
||||||
|
StreamSubscription? _getNumberEvent;
|
||||||
|
void _initLoadDataAction() {
|
||||||
|
// 蓝牙协议通知传输跟蓝牙之外的数据传输类不一样 eventBus
|
||||||
|
_getNumberEvent =
|
||||||
|
eventBus.on<ChangeLanguageBlockLastLanguageEvent>().listen((event) {
|
||||||
|
state.currentLanguage.value = event.languageTitle;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onReady() {
|
void onReady() {
|
||||||
// TODO: implement onReady
|
// TODO: implement onReady
|
||||||
super.onReady();
|
super.onReady();
|
||||||
|
|
||||||
|
_initLoadDataAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -82,5 +95,8 @@ class MineSetLogic extends BaseGetXController {
|
|||||||
@override
|
@override
|
||||||
void onClose() {
|
void onClose() {
|
||||||
// TODO: implement onClose
|
// TODO: implement onClose
|
||||||
|
super.onClose();
|
||||||
|
|
||||||
|
_getNumberEvent!.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -82,7 +82,7 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Navigator.pushNamed(context, Routers.lockUserManageLisPage);
|
Get.toNamed(Routers.lockUserManageLisPage);
|
||||||
}),
|
}),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
|
leftTitel: TranslationLoader.lanKeys!.authorizedAdmin!.tr,
|
||||||
@ -90,8 +90,7 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Navigator.pushNamed(
|
Get.toNamed(Routers.authorizedAdministratorListPage);
|
||||||
context, Routers.authorizedAdministratorListPage);
|
|
||||||
}),
|
}),
|
||||||
//by DaisyWu 新增--批量授权
|
//by DaisyWu 新增--批量授权
|
||||||
CommonItem(
|
CommonItem(
|
||||||
@ -100,7 +99,7 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Navigator.pushNamed(context, Routers.authorityManagementPage);
|
Get.toNamed(Routers.authorityManagementPage);
|
||||||
// Toast.show(msg: "功能暂未开放");
|
// Toast.show(msg: "功能暂未开放");
|
||||||
}),
|
}),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
@ -109,7 +108,7 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Navigator.pushNamed(context, Routers.lockGroupListPage);
|
Get.toNamed(Routers.lockGroupListPage);
|
||||||
}),
|
}),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.transferSmartLock!.tr,
|
leftTitel: TranslationLoader.lanKeys!.transferSmartLock!.tr,
|
||||||
@ -117,26 +116,31 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Navigator.pushNamed(context, Routers.transferSmartLockPage);
|
Get.toNamed(Routers.transferSmartLockPage);
|
||||||
}),
|
}),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.transferGateway!.tr,
|
leftTitel: TranslationLoader.lanKeys!.transferGateway!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Navigator.pushNamed(context, Routers.selectGetewayListPage);
|
Get.toNamed(Routers.selectGetewayListPage);
|
||||||
}),
|
}),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.h,
|
height: 10.h,
|
||||||
),
|
),
|
||||||
CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.multiLanguage!.tr,
|
leftTitel: TranslationLoader.lanKeys!.multiLanguage!.tr,
|
||||||
rightTitle: "简体中文",
|
rightTitle: state.currentLanguage.value,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () async {
|
||||||
Navigator.pushNamed(context, Routers.mineMultiLanguagePage);
|
// Get.toNamed(Routers.mineMultiLanguagePage);
|
||||||
}),
|
var result = await Get.toNamed(Routers.mineMultiLanguagePage);
|
||||||
|
if (result != null) {
|
||||||
|
result as Map<String, dynamic>;
|
||||||
|
state.currentLanguage.value = result['currentLanguage'];
|
||||||
|
}
|
||||||
|
})),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.lockScreen!.tr,
|
leftTitel: TranslationLoader.lanKeys!.lockScreen!.tr,
|
||||||
rightTitle: (state.lockScreen.value == 1
|
rightTitle: (state.lockScreen.value == 1
|
||||||
@ -170,6 +174,7 @@ class _MineSetPageState extends State<MineSetPage> {
|
|||||||
leftTitel: TranslationLoader
|
leftTitel: TranslationLoader
|
||||||
.lanKeys!.appUnlockRequiresMobilePhoneAccessToTheLock!.tr,
|
.lanKeys!.appUnlockRequiresMobilePhoneAccessToTheLock!.tr,
|
||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
|
// allHeight: 100.h,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
|
|||||||
@ -11,4 +11,6 @@ class MineSetState {
|
|||||||
|
|
||||||
var lockScreen = 2.obs; //锁屏
|
var lockScreen = 2.obs; //锁屏
|
||||||
var hideExpiredAccessFlag = 2.obs; //隐藏无效开锁
|
var hideExpiredAccessFlag = 2.obs; //隐藏无效开锁
|
||||||
|
var currentLanguage = "".obs; //隐藏无效开锁
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1089,12 +1089,11 @@ class ApiProvider extends BaseProvider {
|
|||||||
post(userSettingsInfoURL.toUrl, jsonEncode({}));
|
post(userSettingsInfoURL.toUrl, jsonEncode({}));
|
||||||
|
|
||||||
Future<Response> canSendKey(
|
Future<Response> canSendKey(
|
||||||
String endDate, List keyGroupIdList, List lockIdList) =>
|
String endDate, List lockIdList) =>
|
||||||
post(
|
post(
|
||||||
canSendKeyURL.toUrl,
|
canSendKeyURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
'endDate': endDate,
|
'endDate': endDate,
|
||||||
'keyGroupIdList': keyGroupIdList,
|
|
||||||
'lockIdList': lockIdList
|
'lockIdList': lockIdList
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
@ -641,9 +641,9 @@ class ApiRepository {
|
|||||||
|
|
||||||
//群发电子钥匙检查
|
//群发电子钥匙检查
|
||||||
Future<KeyDetailEntity> canSendKey(
|
Future<KeyDetailEntity> canSendKey(
|
||||||
String endDate, List keyGroupIdList, List lockIdList) async {
|
String endDate, List lockIdList) async {
|
||||||
final res =
|
final res =
|
||||||
await apiProvider.canSendKey(endDate, keyGroupIdList, lockIdList);
|
await apiProvider.canSendKey(endDate, lockIdList);
|
||||||
return KeyDetailEntity.fromJson(res.body);
|
return KeyDetailEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -41,10 +41,11 @@ class CommonItem extends StatelessWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 20.w),
|
SizedBox(width: 20.w),
|
||||||
Text(leftTitel!, style: TextStyle(fontSize: 22.sp)),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 6.w,
|
width: isHaveRightWidget! ? 100.w : 300.w,
|
||||||
|
child: Text(leftTitel!, style: TextStyle(fontSize: 22.sp))
|
||||||
),
|
),
|
||||||
|
SizedBox(width: 6.w),
|
||||||
isTipsImg == true
|
isTipsImg == true
|
||||||
? Image.asset(
|
? Image.asset(
|
||||||
'images/icon_tips_Q.png',
|
'images/icon_tips_Q.png',
|
||||||
@ -52,7 +53,7 @@ class CommonItem extends StatelessWidget {
|
|||||||
height: 20.w,
|
height: 20.w,
|
||||||
)
|
)
|
||||||
: Container(),
|
: Container(),
|
||||||
Expanded(child: SizedBox(width: 20.w)),
|
Expanded(child: SizedBox(width: 10.w)),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -32,9 +32,14 @@ class ChickInAddStaffCardAndFingerprintBlockNumberEvent{
|
|||||||
ChickInAddStaffCardAndFingerprintBlockNumberEvent(this.number);
|
ChickInAddStaffCardAndFingerprintBlockNumberEvent(this.number);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Uuid删除当前锁时 有可能锁被初始化了 但后台没被初始化 当打开APP的时候扫描如果未被连接就传uuid过去 判断直接删除数据
|
/// Uuid删除当前锁时 有可能锁被初始化了 但后台没被初始化 当打开APP的时候扫描如果未被连接就传uuid过去 判断直接删除数据
|
||||||
class ScanAllDeviceFindCurrentDeviceConnectedEvent{
|
class ScanAllDeviceFindCurrentDeviceConnectedEvent{
|
||||||
String uuid;
|
String uuid;
|
||||||
ScanAllDeviceFindCurrentDeviceConnectedEvent(this.uuid);
|
ScanAllDeviceFindCurrentDeviceConnectedEvent(this.uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 多语言 切换之后传值到上一级界面
|
||||||
|
class ChangeLanguageBlockLastLanguageEvent{
|
||||||
|
String languageTitle;
|
||||||
|
ChangeLanguageBlockLastLanguageEvent(this.languageTitle);
|
||||||
|
}
|
||||||
125
star_lock/lib/tools/left_slide_actions.dart
Normal file
125
star_lock/lib/tools/left_slide_actions.dart
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
typedef _BaseFunction<T> = void Function(T o);
|
||||||
|
|
||||||
|
/// 来源: https://blog.csdn.net/zhuowalun8427/article/details/121285947 。
|
||||||
|
class LeftSlideActions extends StatefulWidget {
|
||||||
|
final double actionsWidth;
|
||||||
|
final List<Widget> actions;
|
||||||
|
final Widget child;
|
||||||
|
final Decoration? decoration;
|
||||||
|
final VoidCallback? actionsWillShow;
|
||||||
|
final _BaseFunction<VoidCallback>? exportHideActions;
|
||||||
|
|
||||||
|
const LeftSlideActions({
|
||||||
|
Key? key,
|
||||||
|
required this.actionsWidth,
|
||||||
|
required this.actions,
|
||||||
|
required this.child,
|
||||||
|
this.decoration,
|
||||||
|
this.actionsWillShow,
|
||||||
|
this.exportHideActions,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_LeftSlideActionsState createState() => _LeftSlideActionsState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LeftSlideActionsState extends State<LeftSlideActions>
|
||||||
|
with TickerProviderStateMixin {
|
||||||
|
double _translateX = 0;
|
||||||
|
late AnimationController _controller;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_controller.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_controller = AnimationController(
|
||||||
|
lowerBound: -widget.actionsWidth,
|
||||||
|
upperBound: 0,
|
||||||
|
vsync: this,
|
||||||
|
duration: const Duration(milliseconds: 300),
|
||||||
|
)..addListener(() {
|
||||||
|
_translateX = _controller.value;
|
||||||
|
setState(() {});
|
||||||
|
});
|
||||||
|
if (widget.exportHideActions != null) {
|
||||||
|
widget.exportHideActions!(_hide);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
decoration: widget.decoration,
|
||||||
|
clipBehavior: Clip.hardEdge,
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Positioned.fill(
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: widget.actions,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onHorizontalDragUpdate: (v) {
|
||||||
|
_onHorizontalDragUpdate(v);
|
||||||
|
},
|
||||||
|
onHorizontalDragEnd: (v) {
|
||||||
|
_onHorizontalDragEnd(v);
|
||||||
|
},
|
||||||
|
child: Transform.translate(
|
||||||
|
offset: Offset(_translateX, 0),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(flex: 1, child: widget.child),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onHorizontalDragUpdate(DragUpdateDetails details) {
|
||||||
|
_translateX =
|
||||||
|
(_translateX + details.delta.dx).clamp(-widget.actionsWidth, 0.0);
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onHorizontalDragEnd(DragEndDetails details) {
|
||||||
|
_controller.value = _translateX;
|
||||||
|
if (details.velocity.pixelsPerSecond.dx > 200) {
|
||||||
|
_hide();
|
||||||
|
} else if (details.velocity.pixelsPerSecond.dx < -200) {
|
||||||
|
_show();
|
||||||
|
} else {
|
||||||
|
if (_translateX.abs() > widget.actionsWidth / 2) {
|
||||||
|
_show();
|
||||||
|
} else {
|
||||||
|
_hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _show() {
|
||||||
|
if (widget.actionsWillShow != null) {
|
||||||
|
widget.actionsWillShow!();
|
||||||
|
}
|
||||||
|
if (_translateX != -widget.actionsWidth) {
|
||||||
|
_controller.animateTo(-widget.actionsWidth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _hide() {
|
||||||
|
if (_translateX != 0) {
|
||||||
|
_controller.animateTo(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -21,54 +21,78 @@ class ShowIosTipView extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
return CupertinoAlertDialog(
|
||||||
|
title: Text(title!),
|
||||||
|
content: Text(tipTitle!),
|
||||||
|
actions: [
|
||||||
|
CupertinoDialogAction(
|
||||||
|
child: Text(TranslationLoader.lanKeys!.cancel!.tr),
|
||||||
|
onPressed: () {
|
||||||
|
if (cancelClick != null) {
|
||||||
|
cancelClick!();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
CupertinoDialogAction(
|
||||||
|
child: Text(TranslationLoader.lanKeys!.sure!.tr),
|
||||||
|
onPressed: () {
|
||||||
|
if (sureClick != null) {
|
||||||
|
sureClick!();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
return Card(
|
return Card(
|
||||||
color: const Color(0x00FFFFFF),
|
color: const Color(0x00FFFFFF),
|
||||||
child: Builder(
|
child: Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return Theme(
|
|
||||||
data: ThemeData.light(),
|
// return Theme(
|
||||||
child: CupertinoAlertDialog(
|
// data: ThemeData.light(),
|
||||||
title: Text(title!),
|
// child: CupertinoAlertDialog(
|
||||||
content: Column(
|
// title: Text(title!),
|
||||||
children: <Widget>[
|
// content: Column(
|
||||||
const SizedBox(
|
// children: <Widget>[
|
||||||
height: 10,
|
// const SizedBox(
|
||||||
),
|
// height: 10,
|
||||||
Column(
|
// ),
|
||||||
children: [
|
// Column(
|
||||||
Text(tipTitle!, style: TextStyle(fontSize: 24.sp))
|
// children: [
|
||||||
],
|
// Text(tipTitle!, style: TextStyle(fontSize: 24.sp))
|
||||||
)
|
// ],
|
||||||
],
|
// )
|
||||||
),
|
// ],
|
||||||
actions: <Widget>[
|
// ),
|
||||||
CupertinoDialogAction(
|
// actions: <Widget>[
|
||||||
child: Text(
|
// CupertinoDialogAction(
|
||||||
TranslationLoader.lanKeys!.cancel!.tr,
|
// child: Text(
|
||||||
style: const TextStyle(color: Colors.black),
|
// TranslationLoader.lanKeys!.cancel!.tr,
|
||||||
),
|
// style: const TextStyle(color: Colors.black),
|
||||||
onPressed: () {
|
// ),
|
||||||
// Navigator.pop(context);
|
// onPressed: () {
|
||||||
// print("取消");
|
// // Navigator.pop(context);
|
||||||
if (cancelClick != null) {
|
// // print("取消");
|
||||||
cancelClick!();
|
// if (cancelClick != null) {
|
||||||
}
|
// cancelClick!();
|
||||||
},
|
// }
|
||||||
),
|
// },
|
||||||
CupertinoDialogAction(
|
// ),
|
||||||
child: Text(TranslationLoader.lanKeys!.sure!.tr,
|
// CupertinoDialogAction(
|
||||||
style: const TextStyle(color: Colors.black)),
|
// child: Text(TranslationLoader.lanKeys!.sure!.tr,
|
||||||
onPressed: () {
|
// style: const TextStyle(color: Colors.black)),
|
||||||
if (sureClick != null) {
|
// onPressed: () {
|
||||||
sureClick!();
|
// if (sureClick != null) {
|
||||||
}
|
// sureClick!();
|
||||||
// Navigator.pop(context);
|
// }
|
||||||
// print("确定");
|
// // Navigator.pop(context);
|
||||||
},
|
// // print("确定");
|
||||||
),
|
// },
|
||||||
],
|
// ),
|
||||||
),
|
// ],
|
||||||
);
|
// ),
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user