1,操作记录接口新增参数(指纹ID、卡ID、密码ID)
This commit is contained in:
parent
cc6f206651
commit
504f604ad0
@ -133,8 +133,8 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
}
|
}
|
||||||
return _electronicKeyItem('images/controls_user.png',
|
return _electronicKeyItem('images/controls_user.png',
|
||||||
indexEntity.keyName!, useDateStr, keyStatus, isAdminKey, () {
|
indexEntity.keyName!, useDateStr, keyStatus, isAdminKey, () {
|
||||||
// Navigator.pushNamed(context, Routers.authorizedAdminDetailPage);
|
Navigator.pushNamed(context, Routers.electronicKeyDetailPage,
|
||||||
Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
|
arguments: {'itemData': indexEntity});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,7 +96,7 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
const SizedBox(height: 1),
|
const SizedBox(height: 1),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.senderTime!.tr,
|
leftTitel: TranslationLoader.lanKeys!.senderTime!.tr,
|
||||||
rightTitle: itemData.date.toString(),
|
rightTitle: getSenderDate(itemData),
|
||||||
action: () {}),
|
action: () {}),
|
||||||
Container(height: 10.h),
|
Container(height: 10.h),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
@ -115,7 +115,10 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Navigator.pushNamed(context, Routers.keyOperationRecordPage,
|
Navigator.pushNamed(context, Routers.keyOperationRecordPage,
|
||||||
arguments: {});
|
arguments: {
|
||||||
|
'lockId': itemData.lockId.toString(),
|
||||||
|
'keyId': itemData.keyId.toString()
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
Container(height: 40.h),
|
Container(height: 40.h),
|
||||||
SubmitBtn(
|
SubmitBtn(
|
||||||
@ -160,6 +163,14 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
return useDateStr;
|
return useDateStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//发送时间
|
||||||
|
String getSenderDate(ElectronicKeyListItem indexEntity) {
|
||||||
|
String senderDate = '';
|
||||||
|
DateTime dateStr = DateTime.fromMillisecondsSinceEpoch(indexEntity.date!);
|
||||||
|
senderDate = dateStr.toLocal().toString().substring(0, 16);
|
||||||
|
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,
|
||||||
|
|||||||
@ -17,8 +17,31 @@ class KeyOperationRecordPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _KeyOperationRecordPageState extends State<KeyOperationRecordPage> {
|
class _KeyOperationRecordPageState extends State<KeyOperationRecordPage> {
|
||||||
|
String _keyId = '';
|
||||||
|
String _lockId = '';
|
||||||
|
String _keyboardPwdId = ''; //密码ID
|
||||||
|
String _cardId = ''; //卡ID
|
||||||
|
String _fingerprintId = ''; //指纹ID
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
dynamic obj = ModalRoute.of(context)?.settings.arguments;
|
||||||
|
if (obj != null && (obj["keyId"] != null)) {
|
||||||
|
_keyId = obj["keyId"];
|
||||||
|
}
|
||||||
|
if (obj != null && (obj["lockId"] != null)) {
|
||||||
|
_lockId = obj["lockId"];
|
||||||
|
}
|
||||||
|
if (obj != null && (obj["keyboardPwdId"] != null)) {
|
||||||
|
_keyboardPwdId = obj["keyboardPwdId"];
|
||||||
|
}
|
||||||
|
if (obj != null && (obj["cardId"] != null)) {
|
||||||
|
_cardId = obj["cardId"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (obj != null && (obj["fingerprintId"] != null)) {
|
||||||
|
_fingerprintId = obj["fingerprintId"];
|
||||||
|
}
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
@ -55,8 +78,21 @@ class _KeyOperationRecordPageState extends State<KeyOperationRecordPage> {
|
|||||||
|
|
||||||
//请求操作记录列表
|
//请求操作记录列表
|
||||||
Future<List<KeyRecordDataItem>> mockNetworkDataRequest() async {
|
Future<List<KeyRecordDataItem>> mockNetworkDataRequest() async {
|
||||||
KeyOperationRecordEntity entity = await ApiRepository.to
|
KeyOperationRecordEntity entity = await ApiRepository.to.lockRecordList(
|
||||||
.lockRecordList('0', '63', '0', '28', '1', '1', '20', '0', '', '', '');
|
'0',
|
||||||
|
_keyId,
|
||||||
|
'0',
|
||||||
|
_lockId,
|
||||||
|
'1',
|
||||||
|
'1',
|
||||||
|
'20',
|
||||||
|
'0',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
_keyboardPwdId,
|
||||||
|
_cardId,
|
||||||
|
_fingerprintId);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
print("操作记录列表成功:${entity.data?.itemList}");
|
print("操作记录列表成功:${entity.data?.itemList}");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -226,7 +226,11 @@ class _LockDetailPageState extends State<LockDetailPage> {
|
|||||||
}),
|
}),
|
||||||
bottomItem('images/main/icon_main_operatingRecord.png',
|
bottomItem('images/main/icon_main_operatingRecord.png',
|
||||||
TranslationLoader.lanKeys!.operatingRecord!.tr, () {
|
TranslationLoader.lanKeys!.operatingRecord!.tr, () {
|
||||||
Navigator.pushNamed(context, Routers.lockOperatingRecordPage);
|
Navigator.pushNamed(context, Routers.lockOperatingRecordPage,
|
||||||
|
arguments: {
|
||||||
|
"lockMainEntity": widget.lockMainEntity,
|
||||||
|
"keyInfo": widget.keyInfo
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
bottomItem('images/main/icon_main_set.png',
|
bottomItem('images/main/icon_main_set.png',
|
||||||
TranslationLoader.lanKeys!.set!.tr, () {
|
TranslationLoader.lanKeys!.set!.tr, () {
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecordEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecordEntity.dart';
|
||||||
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 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart';
|
||||||
|
|
||||||
import '../../../app_settings/app_colors.dart';
|
import '../../../app_settings/app_colors.dart';
|
||||||
import '../../../tools/jh_pop_menus.dart';
|
import '../../../tools/jh_pop_menus.dart';
|
||||||
@ -19,8 +20,19 @@ class LockOperatingRecordPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
||||||
|
late KeyInfos keyInfo;
|
||||||
|
late LockMainEntity lockMainEntity;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
dynamic obj = ModalRoute.of(context)?.settings.arguments;
|
||||||
|
if (obj != null && (obj["lockMainEntity"] != null)) {
|
||||||
|
lockMainEntity = obj["lockMainEntity"];
|
||||||
|
}
|
||||||
|
if (obj != null && (obj["keyInfo"] != null)) {
|
||||||
|
keyInfo = obj["keyInfo"];
|
||||||
|
}
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(
|
||||||
@ -93,8 +105,21 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> {
|
|||||||
|
|
||||||
//请求操作记录列表
|
//请求操作记录列表
|
||||||
Future<List<KeyRecordDataItem>> mockNetworkDataRequest() async {
|
Future<List<KeyRecordDataItem>> mockNetworkDataRequest() async {
|
||||||
KeyOperationRecordEntity entity = await ApiRepository.to
|
KeyOperationRecordEntity entity = await ApiRepository.to.lockRecordList(
|
||||||
.lockRecordList('0', '63', '0', '28', '1', '1', '20', '0', '', '', '');
|
'0',
|
||||||
|
keyInfo.keyId.toString(),
|
||||||
|
'0',
|
||||||
|
keyInfo.lockId.toString(),
|
||||||
|
'1',
|
||||||
|
'1',
|
||||||
|
'20',
|
||||||
|
'0',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'');
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
print("操作记录列表成功:${entity.data?.itemList}");
|
print("操作记录列表成功:${entity.data?.itemList}");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -99,7 +99,11 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage> {
|
|||||||
rightTitle: "",
|
rightTitle: "",
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Navigator.pushNamed(context, Routers.keyOperationRecordPage);
|
Navigator.pushNamed(context, Routers.keyOperationRecordPage,
|
||||||
|
arguments: {
|
||||||
|
'lockId': itemData.lockId.toString(),
|
||||||
|
'keyId': itemData.keyboardPwdId.toString()
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
Container(height: 40.h),
|
Container(height: 40.h),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|||||||
@ -209,7 +209,10 @@ class ApiProvider extends BaseProvider {
|
|||||||
String startDate,
|
String startDate,
|
||||||
String recordType,
|
String recordType,
|
||||||
String searchStr,
|
String searchStr,
|
||||||
String timezoneRawOffSet) =>
|
String timezoneRawOffSet,
|
||||||
|
String keyboardPwdId,
|
||||||
|
String cardId,
|
||||||
|
String fingerprintId) =>
|
||||||
post(
|
post(
|
||||||
keyOperationRecordURL.toUrl,
|
keyOperationRecordURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -223,7 +226,10 @@ class ApiProvider extends BaseProvider {
|
|||||||
'startDate': startDate,
|
'startDate': startDate,
|
||||||
'recordType': recordType,
|
'recordType': recordType,
|
||||||
'searchStr': searchStr,
|
'searchStr': searchStr,
|
||||||
'timezoneRawOffSet': timezoneRawOffSet
|
'timezoneRawOffSet': timezoneRawOffSet,
|
||||||
|
'keyboardPwdId': keyboardPwdId,
|
||||||
|
'cardId': cardId,
|
||||||
|
'fingerprintId': fingerprintId
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// 绑定蓝牙管理员
|
// 绑定蓝牙管理员
|
||||||
|
|||||||
@ -160,7 +160,10 @@ class ApiRepository {
|
|||||||
String startDate,
|
String startDate,
|
||||||
String recordType,
|
String recordType,
|
||||||
String searchStr,
|
String searchStr,
|
||||||
String timezoneRawOffSet) async {
|
String timezoneRawOffSet,
|
||||||
|
String keyboardPwdId,
|
||||||
|
String cardId,
|
||||||
|
String fingerprintId) async {
|
||||||
final res = await apiProvider.lockRecordList(
|
final res = await apiProvider.lockRecordList(
|
||||||
endDate,
|
endDate,
|
||||||
keyId,
|
keyId,
|
||||||
@ -172,7 +175,10 @@ class ApiRepository {
|
|||||||
startDate,
|
startDate,
|
||||||
recordType,
|
recordType,
|
||||||
searchStr,
|
searchStr,
|
||||||
timezoneRawOffSet);
|
timezoneRawOffSet,
|
||||||
|
keyboardPwdId,
|
||||||
|
cardId,
|
||||||
|
fingerprintId);
|
||||||
return KeyOperationRecordEntity.fromJson(res.body);
|
return KeyOperationRecordEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user