1,电子钥匙、密码模块支持搜索功能
This commit is contained in:
parent
860300e16a
commit
5b8524bfaa
@ -17,7 +17,8 @@ class AuthorizedAdminListLogic extends BaseGetXController {
|
|||||||
state.pageNum.toString(),
|
state.pageNum.toString(),
|
||||||
state.pageSize.toString(),
|
state.pageSize.toString(),
|
||||||
'0',
|
'0',
|
||||||
'0');
|
'0',
|
||||||
|
state.searchStr.value);
|
||||||
List<ElectronicKeyListItem> dataList = [];
|
List<ElectronicKeyListItem> dataList = [];
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
print("电子钥匙列表成功:${entity.data?.itemList}");
|
print("电子钥匙列表成功:${entity.data?.itemList}");
|
||||||
|
|||||||
@ -25,9 +25,6 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
final logic = Get.put(AuthorizedAdminListLogic());
|
final logic = Get.put(AuthorizedAdminListLogic());
|
||||||
final state = Get.find<AuthorizedAdminListLogic>().state;
|
final state = Get.find<AuthorizedAdminListLogic>().state;
|
||||||
|
|
||||||
// late KeyInfos keyInfo;
|
|
||||||
// late LockMainEntity lockMainEntity;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
@ -45,14 +42,6 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
|
|
||||||
@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(
|
||||||
@ -88,82 +77,9 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
|||||||
height: 64.h,
|
height: 64.h,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
));
|
||||||
/*
|
|
||||||
FutureBuilder<List<ElectronicKeyListItem>>(
|
|
||||||
future: mockNetworkDataRequest(),
|
|
||||||
builder: (BuildContext context,
|
|
||||||
AsyncSnapshot<List<ElectronicKeyListItem>> snapshot) {
|
|
||||||
//请求结束
|
|
||||||
if (snapshot.connectionState == ConnectionState.done) {
|
|
||||||
if (snapshot.hasError) {
|
|
||||||
//请求失败
|
|
||||||
return const Text('请求失败');
|
|
||||||
} else {
|
|
||||||
//请求成功
|
|
||||||
final List<ElectronicKeyListItem> itemData = snapshot.data!;
|
|
||||||
|
|
||||||
return Column(
|
|
||||||
children: [
|
|
||||||
Expanded(child: _buildMainUI(itemData)),
|
|
||||||
SizedBox(
|
|
||||||
height: 20.h,
|
|
||||||
),
|
|
||||||
AddBottomWhiteBtn(
|
|
||||||
btnName:
|
|
||||||
TranslationLoader.lanKeys!.addAuthorizedAdmin!.tr,
|
|
||||||
onClick: () {
|
|
||||||
Navigator.pushNamed(
|
|
||||||
context, Routers.authorizedAdminManagePage,
|
|
||||||
arguments: {
|
|
||||||
"lockMainEntity": lockMainEntity,
|
|
||||||
"keyInfo": keyInfo
|
|
||||||
}).then((val) {
|
|
||||||
if (val != null) {
|
|
||||||
mockNetworkDataRequest();
|
|
||||||
setState(() {});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 64.h,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//请求未结束 显示loading
|
|
||||||
return Container();
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
*/
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// //请求授权管理员列表 跟电子钥匙列表的接口一样,但必须在参数中加keyRight=1为授权管理员
|
|
||||||
// Future<List<ElectronicKeyListItem>> mockNetworkDataRequest() async {
|
|
||||||
// ElectronicKeyListEntity entity = await ApiRepository.to.electronicKeyList(
|
|
||||||
// '0',
|
|
||||||
// keyInfo.keyId.toString(),
|
|
||||||
// '',
|
|
||||||
// keyInfo.lockId.toString(),
|
|
||||||
// '',
|
|
||||||
// '1',
|
|
||||||
// '20',
|
|
||||||
// '0',
|
|
||||||
// '1');
|
|
||||||
// if (entity.errorCode!.codeIsSuccessful) {
|
|
||||||
// print("电子钥匙列表成功:${entity.data?.itemList}");
|
|
||||||
// }
|
|
||||||
// if (entity.data != null) {
|
|
||||||
// return entity.data!.itemList;
|
|
||||||
// } else {
|
|
||||||
// List<ElectronicKeyListItem> dataList = [];
|
|
||||||
// return dataList;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
Widget _buildMainUI(itemData) {
|
Widget _buildMainUI(itemData) {
|
||||||
List<ElectronicKeyListItem> getItemData = itemData;
|
List<ElectronicKeyListItem> getItemData = itemData;
|
||||||
return getItemData.isEmpty
|
return getItemData.isEmpty
|
||||||
|
|||||||
@ -8,6 +8,7 @@ class AuthorizedAdminListState {
|
|||||||
var pageNum = 1.obs; //请求页码
|
var pageNum = 1.obs; //请求页码
|
||||||
final pageSize = 20.obs; //请求每页数据条数
|
final pageSize = 20.obs; //请求每页数据条数
|
||||||
final itemDataList = <ElectronicKeyListItem>[].obs;
|
final itemDataList = <ElectronicKeyListItem>[].obs;
|
||||||
|
final searchStr = ''.obs;
|
||||||
|
|
||||||
AuthorizedAdminListState() {
|
AuthorizedAdminListState() {
|
||||||
Map map = Get.arguments;
|
Map map = Get.arguments;
|
||||||
|
|||||||
@ -18,7 +18,8 @@ class ElectronicKeyListLogic extends BaseGetXController {
|
|||||||
state.pageNum.toString(),
|
state.pageNum.toString(),
|
||||||
state.pageSize.toString(),
|
state.pageSize.toString(),
|
||||||
'0',
|
'0',
|
||||||
'0');
|
'0',
|
||||||
|
state.searchController.text);
|
||||||
List<ElectronicKeyListItem> dataList = [];
|
List<ElectronicKeyListItem> dataList = [];
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
print("电子钥匙列表成功:${entity.data?.itemList}");
|
print("电子钥匙列表成功:${entity.data?.itemList}");
|
||||||
|
|||||||
@ -25,7 +25,6 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
final logic = Get.put(ElectronicKeyListLogic());
|
final logic = Get.put(ElectronicKeyListLogic());
|
||||||
final state = Get.find<ElectronicKeyListLogic>().state;
|
final state = Get.find<ElectronicKeyListLogic>().state;
|
||||||
late RefreshController _refreshController;
|
late RefreshController _refreshController;
|
||||||
// late List<ElectronicKeyListItem> itemDataList = [];
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -92,73 +91,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
height: 64.h,
|
height: 64.h,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
));
|
||||||
/*
|
|
||||||
FutureBuilder<List<ElectronicKeyListItem>>(
|
|
||||||
future: logic.mockNetworkDataRequest(),
|
|
||||||
builder: (BuildContext context,
|
|
||||||
AsyncSnapshot<List<ElectronicKeyListItem>> snapshot) {
|
|
||||||
//请求结束
|
|
||||||
if (snapshot.connectionState == ConnectionState.done) {
|
|
||||||
if (snapshot.hasError) {
|
|
||||||
//请求失败
|
|
||||||
return const Text('请求失败');
|
|
||||||
} else {
|
|
||||||
//请求成功
|
|
||||||
itemDataList = snapshot.data!;
|
|
||||||
|
|
||||||
return Column(
|
|
||||||
children: [
|
|
||||||
_searchWidget(),
|
|
||||||
SizedBox(
|
|
||||||
height: 20.h,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: itemDataList.isEmpty
|
|
||||||
? const NoData()
|
|
||||||
: SmartRefresher(
|
|
||||||
controller: _refreshController,
|
|
||||||
onRefresh: _refresh,
|
|
||||||
onLoading: _loadMore,
|
|
||||||
header: ClassicHeader(
|
|
||||||
height: 45.h,
|
|
||||||
releaseText: '松开手刷新',
|
|
||||||
refreshingText: '刷新中',
|
|
||||||
completeText: '刷新完成',
|
|
||||||
failedText: '刷新失败',
|
|
||||||
idleText: '下拉刷新',
|
|
||||||
),
|
|
||||||
child: _buildMainUI(itemDataList),
|
|
||||||
)),
|
|
||||||
AddBottomWhiteBtn(
|
|
||||||
btnName: TranslationLoader.lanKeys!.sendKey!.tr,
|
|
||||||
onClick: () {
|
|
||||||
Navigator.pushNamed(
|
|
||||||
context, Routers.sendElectronicKeyManagePage,
|
|
||||||
arguments: {
|
|
||||||
"lockMainEntity": state.lockMainEntity.value,
|
|
||||||
"keyInfo": state.keyInfo.value
|
|
||||||
}).then((val) {
|
|
||||||
if (val != null) {
|
|
||||||
logic.mockNetworkDataRequest();
|
|
||||||
setState(() {});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 64.h,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//请求未结束 显示loading
|
|
||||||
return Container();
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
*/
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///加载更多函数
|
///加载更多函数
|
||||||
@ -196,7 +129,10 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
// controller: _controller,
|
// controller: _controller,
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
|
controller: state.searchController,
|
||||||
|
onSubmitted: (value) {
|
||||||
|
logic.mockNetworkDataRequest();
|
||||||
|
},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
//输入里面输入文字内边距设置
|
//输入里面输入文字内边距设置
|
||||||
contentPadding: const EdgeInsets.only(
|
contentPadding: const EdgeInsets.only(
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
||||||
import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart';
|
import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart';
|
||||||
|
|
||||||
class ElectronicKeyListState {
|
class ElectronicKeyListState {
|
||||||
|
TextEditingController searchController = TextEditingController(); //邮箱/手机号输入框
|
||||||
final keyInfo = KeyInfos().obs;
|
final keyInfo = KeyInfos().obs;
|
||||||
final lockMainEntity = LockMainEntity().obs;
|
final lockMainEntity = LockMainEntity().obs;
|
||||||
var pageNum = 1.obs; //请求页码
|
var pageNum = 1.obs; //请求页码
|
||||||
|
|||||||
@ -8,22 +8,17 @@ class PasswordKeyListLogic extends BaseGetXController {
|
|||||||
final PasswordKeyListState state = PasswordKeyListState();
|
final PasswordKeyListState state = PasswordKeyListState();
|
||||||
|
|
||||||
//请求密码钥匙列表
|
//请求密码钥匙列表
|
||||||
Future<List<PasswordKeyListItem>> mockNetworkDataRequest() async {
|
void mockNetworkDataRequest() async {
|
||||||
PasswordKeyListEntity entity = await ApiRepository.to.passwordKeyList(
|
PasswordKeyListEntity entity = await ApiRepository.to.passwordKeyList(
|
||||||
'0',
|
'0',
|
||||||
state.keyInfo.value.lockId.toString(),
|
state.keyInfo.value.lockId.toString(),
|
||||||
'0',
|
'0',
|
||||||
state.pageNum.toString(),
|
state.pageNum.toString(),
|
||||||
state.pageSize.toString());
|
state.pageSize.toString(),
|
||||||
List<PasswordKeyListItem> dataList = [];
|
state.searchController.text);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
print("密码钥匙列表成功:${entity.data?.itemList}");
|
state.itemDataList.value = entity.data!.itemList!;
|
||||||
if (entity.data != null) {
|
|
||||||
dataList = entity.data!.itemList!;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
state.itemDataList.value = dataList;
|
|
||||||
return dataList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//密码钥匙重置请求
|
//密码钥匙重置请求
|
||||||
|
|||||||
@ -23,7 +23,6 @@ class PasswordKeyListPage extends StatefulWidget {
|
|||||||
class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
||||||
final logic = Get.put(PasswordKeyListLogic());
|
final logic = Get.put(PasswordKeyListLogic());
|
||||||
final state = Get.find<PasswordKeyListLogic>().state;
|
final state = Get.find<PasswordKeyListLogic>().state;
|
||||||
// late List<PasswordKeyListItem> _itemDataList = [];
|
|
||||||
|
|
||||||
late RefreshController _refreshController;
|
late RefreshController _refreshController;
|
||||||
|
|
||||||
@ -92,102 +91,32 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
|||||||
height: 42.h,
|
height: 42.h,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
));
|
||||||
/*
|
|
||||||
FutureBuilder<List<PasswordKeyListItem>>(
|
|
||||||
future: logic.mockNetworkDataRequest(),
|
|
||||||
builder: (BuildContext context,
|
|
||||||
AsyncSnapshot<List<PasswordKeyListItem>> snapshot) {
|
|
||||||
//请求结束
|
|
||||||
if (snapshot.connectionState == ConnectionState.done) {
|
|
||||||
if (snapshot.hasError) {
|
|
||||||
//请求失败
|
|
||||||
return const Text('请求失败');
|
|
||||||
} else {
|
|
||||||
//请求成功
|
|
||||||
_itemDataList = snapshot.data!;
|
|
||||||
|
|
||||||
return Column(
|
|
||||||
children: [
|
|
||||||
_searchWidget(),
|
|
||||||
SizedBox(
|
|
||||||
height: 20.h,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: _itemDataList.isEmpty
|
|
||||||
? const NoData()
|
|
||||||
: SmartRefresher(
|
|
||||||
controller: _refreshController,
|
|
||||||
onRefresh: _refresh,
|
|
||||||
onLoading: _loadMore,
|
|
||||||
enablePullUp: true,
|
|
||||||
enablePullDown: true,
|
|
||||||
header: ClassicHeader(
|
|
||||||
height: 45.h,
|
|
||||||
releaseText: '松开手刷新',
|
|
||||||
refreshingText: '刷新中',
|
|
||||||
completeText: '刷新完成',
|
|
||||||
failedText: '刷新失败',
|
|
||||||
idleText: '下拉刷新',
|
|
||||||
),
|
|
||||||
child: _buildMainUI(_itemDataList),
|
|
||||||
)),
|
|
||||||
SizedBox(
|
|
||||||
height: 20.h,
|
|
||||||
),
|
|
||||||
AddBottomWhiteBtn(
|
|
||||||
btnName: TranslationLoader.lanKeys!.getPassword!.tr,
|
|
||||||
onClick: () {
|
|
||||||
Navigator.pushNamed(
|
|
||||||
context, Routers.passwordKeyManagePage,
|
|
||||||
arguments: {
|
|
||||||
"lockMainEntity": state.lockMainEntity.value,
|
|
||||||
"keyInfo": state.keyInfo.value
|
|
||||||
}).then((val) {
|
|
||||||
if (val != null) {
|
|
||||||
logic.mockNetworkDataRequest();
|
|
||||||
setState(() {});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
SizedBox(
|
|
||||||
height: 42.h,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//请求未结束 显示loading
|
|
||||||
return Container();
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
*/
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///加载更多函数
|
// ///加载更多函数
|
||||||
Future<void> _loadMore() async {
|
// Future<void> _loadMore() async {
|
||||||
if (state.pageNum.value == 1) {
|
// if (state.pageNum.value == 1) {
|
||||||
if (state.itemDataList.length < 10) {
|
// if (state.itemDataList.length < 10) {
|
||||||
_refreshController.loadComplete();
|
// _refreshController.loadComplete();
|
||||||
} else {
|
// } else {
|
||||||
state.pageNum.value++;
|
// state.pageNum.value++;
|
||||||
await logic.mockNetworkDataRequest();
|
// await logic.mockNetworkDataRequest();
|
||||||
_refreshController.loadComplete();
|
// _refreshController.loadComplete();
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
state.pageNum.value++;
|
// state.pageNum.value++;
|
||||||
await logic.mockNetworkDataRequest();
|
// await logic.mockNetworkDataRequest();
|
||||||
_refreshController.loadComplete();
|
// _refreshController.loadComplete();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
///刷新函数
|
// ///刷新函数
|
||||||
Future<void> _refresh() async {
|
// Future<void> _refresh() async {
|
||||||
state.pageNum.value = 1;
|
// state.pageNum.value = 1;
|
||||||
await logic.mockNetworkDataRequest();
|
// await logic.mockNetworkDataRequest();
|
||||||
_refreshController.refreshCompleted();
|
// _refreshController.refreshCompleted();
|
||||||
}
|
// }
|
||||||
|
|
||||||
Widget _searchWidget() {
|
Widget _searchWidget() {
|
||||||
return Container(
|
return Container(
|
||||||
@ -200,7 +129,10 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage> {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
// controller: _controller,
|
// controller: _controller,
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
|
controller: state.searchController,
|
||||||
|
onSubmitted: (value) {
|
||||||
|
logic.mockNetworkDataRequest();
|
||||||
|
},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
//输入里面输入文字内边距设置
|
//输入里面输入文字内边距设置
|
||||||
contentPadding: const EdgeInsets.only(
|
contentPadding: const EdgeInsets.only(
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyListEntity.dart';
|
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyListEntity.dart';
|
||||||
import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart';
|
import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart';
|
||||||
@ -8,6 +9,7 @@ class PasswordKeyListState {
|
|||||||
var pageNum = 1.obs; //请求页码
|
var pageNum = 1.obs; //请求页码
|
||||||
final pageSize = 20.obs; //请求每页数据条数
|
final pageSize = 20.obs; //请求每页数据条数
|
||||||
final itemDataList = <PasswordKeyListItem>[].obs;
|
final itemDataList = <PasswordKeyListItem>[].obs;
|
||||||
|
final TextEditingController searchController = TextEditingController();
|
||||||
|
|
||||||
PasswordKeyListState() {
|
PasswordKeyListState() {
|
||||||
Map map = Get.arguments;
|
Map map = Get.arguments;
|
||||||
|
|||||||
@ -102,7 +102,8 @@ class ApiProvider extends BaseProvider {
|
|||||||
String pageNo,
|
String pageNo,
|
||||||
String pageSize,
|
String pageSize,
|
||||||
String startDate,
|
String startDate,
|
||||||
String keyRight) =>
|
String keyRight,
|
||||||
|
String searchStr) =>
|
||||||
post(
|
post(
|
||||||
electronicKeyListURL.toUrl,
|
electronicKeyListURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -114,7 +115,8 @@ class ApiProvider extends BaseProvider {
|
|||||||
'pageNo': pageNo,
|
'pageNo': pageNo,
|
||||||
'pageSize': pageSize,
|
'pageSize': pageSize,
|
||||||
'startDate': startDate,
|
'startDate': startDate,
|
||||||
'keyRight': keyRight
|
'keyRight': keyRight,
|
||||||
|
'searchStr': searchStr
|
||||||
}));
|
}));
|
||||||
|
|
||||||
Future<Response> sendElectronicKey(
|
Future<Response> sendElectronicKey(
|
||||||
@ -323,12 +325,12 @@ class ApiProvider extends BaseProvider {
|
|||||||
post(getWifiServiceIpURL.toUrl, jsonEncode({}));
|
post(getWifiServiceIpURL.toUrl, jsonEncode({}));
|
||||||
|
|
||||||
Future<Response> passwordKeyList(
|
Future<Response> passwordKeyList(
|
||||||
String keyStatus,
|
String keyStatus,
|
||||||
String lockId,
|
String lockId,
|
||||||
String operatorUid,
|
String operatorUid,
|
||||||
String pageNo,
|
String pageNo,
|
||||||
String pageSize,
|
String pageSize,
|
||||||
) =>
|
String searchStr) =>
|
||||||
post(
|
post(
|
||||||
passwordKeyListURL.toUrl,
|
passwordKeyListURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -336,7 +338,8 @@ class ApiProvider extends BaseProvider {
|
|||||||
'lockId': lockId,
|
'lockId': lockId,
|
||||||
'operatorUid': operatorUid,
|
'operatorUid': operatorUid,
|
||||||
'pageNo': pageNo,
|
'pageNo': pageNo,
|
||||||
'pageSize': pageSize
|
'pageSize': pageSize,
|
||||||
|
'searchStr': searchStr
|
||||||
}));
|
}));
|
||||||
|
|
||||||
Future<Response> resetPasswordKey(String lockId, String operatorUid) => post(
|
Future<Response> resetPasswordKey(String lockId, String operatorUid) => post(
|
||||||
@ -960,7 +963,7 @@ class ApiProvider extends BaseProvider {
|
|||||||
|
|
||||||
// 更新ICCard序号
|
// 更新ICCard序号
|
||||||
Future<Response> updateIdCardUserNoLoadData(
|
Future<Response> updateIdCardUserNoLoadData(
|
||||||
String lockId, String cardId, String cardUserNo) =>
|
String lockId, String cardId, String cardUserNo) =>
|
||||||
post(
|
post(
|
||||||
updateICCardUserNoURL.toUrl,
|
updateICCardUserNoURL.toUrl,
|
||||||
jsonEncode(
|
jsonEncode(
|
||||||
|
|||||||
@ -128,9 +128,10 @@ class ApiRepository {
|
|||||||
String pageNo,
|
String pageNo,
|
||||||
String pageSize,
|
String pageSize,
|
||||||
String startDate,
|
String startDate,
|
||||||
String keyRight) async {
|
String keyRight,
|
||||||
|
String searchStr) async {
|
||||||
final res = await apiProvider.electronicKeyList(endDate, keyId, keyStatus,
|
final res = await apiProvider.electronicKeyList(endDate, keyId, keyStatus,
|
||||||
lockId, operatorUid, pageNo, pageSize, startDate, keyRight);
|
lockId, operatorUid, pageNo, pageSize, startDate, keyRight, searchStr);
|
||||||
return ElectronicKeyListEntity.fromJson(res.body);
|
return ElectronicKeyListEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,14 +302,14 @@ class ApiRepository {
|
|||||||
|
|
||||||
//密码列表
|
//密码列表
|
||||||
Future<PasswordKeyListEntity> passwordKeyList(
|
Future<PasswordKeyListEntity> passwordKeyList(
|
||||||
String keyStatus,
|
String keyStatus,
|
||||||
String lockId,
|
String lockId,
|
||||||
String operatorUid,
|
String operatorUid,
|
||||||
String pageNo,
|
String pageNo,
|
||||||
String pageSize,
|
String pageSize,
|
||||||
) async {
|
String searchStr) async {
|
||||||
final res = await apiProvider.passwordKeyList(
|
final res = await apiProvider.passwordKeyList(
|
||||||
keyStatus, lockId, operatorUid, pageNo, pageSize);
|
keyStatus, lockId, operatorUid, pageNo, pageSize, searchStr);
|
||||||
return PasswordKeyListEntity.fromJson(res.body);
|
return PasswordKeyListEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user