fix:修复限时密码的起始时间问题,修复设置页面上传数据后没有刷新
This commit is contained in:
parent
4cf9c99e5d
commit
60fd4f635d
@ -4,7 +4,7 @@
|
|||||||
class IoModelVendor {
|
class IoModelVendor {
|
||||||
|
|
||||||
static String vendor_XHJ = 'XHJ';
|
static String vendor_XHJ = 'XHJ';
|
||||||
static String model_XHJ_SYD = 'SYD-BLE-01';
|
static String model_XHJ_SYD = 'SYD8811-751';
|
||||||
static String model_XHJ_JL = 'JL-BLE-01';
|
static String model_XHJ_JL = 'JL-BLE-01';
|
||||||
|
|
||||||
static String vendor_XL = 'XL';
|
static String vendor_XL = 'XL';
|
||||||
|
|||||||
@ -649,7 +649,10 @@ class LockSetLogic extends BaseGetXController {
|
|||||||
recordType: recordType,
|
recordType: recordType,
|
||||||
records: records,
|
records: records,
|
||||||
isUnShowLoading: true);
|
isUnShowLoading: true);
|
||||||
if (entity.errorCode!.codeIsSuccessful) {}
|
if (entity.errorCode!.codeIsSuccessful) {
|
||||||
|
await getLockSettingInfoData();
|
||||||
|
update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@ -28,7 +28,9 @@ class LockSetPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
||||||
final LockSetLogic logic = Get.put(LockSetLogic());
|
final LockSetLogic logic = Get.put(LockSetLogic());
|
||||||
final LockSetState state = Get.find<LockSetLogic>().state;
|
final LockSetState state = Get
|
||||||
|
.find<LockSetLogic>()
|
||||||
|
.state;
|
||||||
|
|
||||||
Future<void> getHttpData() async {
|
Future<void> getHttpData() async {
|
||||||
logic.getLockSettingInfoData().then((LockSetInfoEntity value) {
|
logic.getLockSettingInfoData().then((LockSetInfoEntity value) {
|
||||||
@ -49,26 +51,29 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return GetBuilder<LockSetLogic>(builder: (LockSetLogic logic) {
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
return Scaffold(
|
||||||
appBar: TitleAppBar(
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
barTitle: TranslationLoader.lanKeys!.set!.tr,
|
appBar: TitleAppBar(
|
||||||
haveBack: true,
|
barTitle: TranslationLoader.lanKeys!.set!.tr,
|
||||||
backgroundColor: AppColors.mainColor),
|
haveBack: true,
|
||||||
body: EasyRefreshTool(
|
backgroundColor: AppColors.mainColor),
|
||||||
onRefresh: () {
|
body: EasyRefreshTool(
|
||||||
getHttpData();
|
onRefresh: () {
|
||||||
},
|
getHttpData();
|
||||||
child: Column(
|
},
|
||||||
children: <Widget>[
|
child: Column(
|
||||||
Expanded(
|
children: <Widget>[
|
||||||
child: Obx(() => ListView(
|
Expanded(
|
||||||
children: getListWidget(),
|
child: Obx(() =>
|
||||||
)),
|
ListView(
|
||||||
),
|
children: getListWidget(),
|
||||||
],
|
)),
|
||||||
),
|
),
|
||||||
));
|
],
|
||||||
|
),
|
||||||
|
));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据权限显示不同的列表
|
// 根据权限显示不同的列表
|
||||||
@ -93,45 +98,53 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.basicInformationPage,
|
Get.toNamed(Routers.basicInformationPage,
|
||||||
arguments: <String, LockSetInfoData>{'lockSetInfoData': state.lockSetInfoData.value});
|
arguments: <String, LockSetInfoData>{
|
||||||
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
// 自动闭锁
|
// 自动闭锁
|
||||||
Obx(() => Visibility(
|
Obx(() =>
|
||||||
visible: state.lockFeature.value.autoLock == 1,
|
Visibility(
|
||||||
child: CommonItem(
|
visible: state.lockFeature.value.autoLock == 1,
|
||||||
leftTitel: TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
child: CommonItem(
|
||||||
rightTitle: (state.lockSettingInfo.value.autoLock ?? 0) > 0
|
leftTitel: TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
||||||
? '${state.lockSetInfoData.value.lockSettingInfo!.autoLockSecond ?? 0}s'
|
rightTitle: (state.lockSettingInfo.value.autoLock ?? 0) > 0
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
? '${state.lockSetInfoData.value.lockSettingInfo!
|
||||||
isHaveLine: true,
|
.autoLockSecond ?? 0}s'
|
||||||
isHaveDirection: true,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
// isHaveRightWidget: true,
|
isHaveLine: true,
|
||||||
// rightWidget: rightText((state.lockSetInfoData.value.lockSetting!.autoLock ?? 0) > 0
|
isHaveDirection: true,
|
||||||
// ? "${state.lockSetInfoData.value.lockSetting!.autoLockSecond ?? 0}s"
|
// isHaveRightWidget: true,
|
||||||
// : TranslationLoader.lanKeys!.closed!.tr),
|
// rightWidget: rightText((state.lockSetInfoData.value.lockSetting!.autoLock ?? 0) > 0
|
||||||
action: () {
|
// ? "${state.lockSetInfoData.value.lockSetting!.autoLockSecond ?? 0}s"
|
||||||
Get.toNamed(Routers.automaticBlockingPage, arguments: <String, LockSetInfoData>{
|
// : TranslationLoader.lanKeys!.closed!.tr),
|
||||||
'lockSetInfoData': state.lockSetInfoData.value,
|
action: () {
|
||||||
// 'lockBasicInfo': state.lockBasicInfo.value
|
Get.toNamed(Routers.automaticBlockingPage,
|
||||||
});
|
arguments: <String, LockSetInfoData>{
|
||||||
}))),
|
'lockSetInfoData': state.lockSetInfoData.value,
|
||||||
|
// 'lockBasicInfo': state.lockBasicInfo.value
|
||||||
|
});
|
||||||
|
}))),
|
||||||
// 常开模式
|
// 常开模式
|
||||||
Obx(() => Visibility(
|
Obx(() =>
|
||||||
visible: state.lockFeature.value.passageMode == 1,
|
Visibility(
|
||||||
child: CommonItem(
|
visible: state.lockFeature.value.passageMode == 1,
|
||||||
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
child: CommonItem(
|
||||||
rightTitle: (state.lockSettingInfo.value.passageMode ?? 0) == 1
|
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
rightTitle: (state.lockSettingInfo.value.passageMode ?? 0) ==
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
1
|
||||||
isHaveLine: true,
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
isHaveDirection: true,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
action: () {
|
isHaveLine: true,
|
||||||
Get.toNamed(Routers.normallyOpenModePage, arguments: <String, Object>{
|
isHaveDirection: true,
|
||||||
'lockSetInfoData': state.lockSetInfoData.value,
|
action: () {
|
||||||
'lockBasicInfo': state.lockBasicInfo.value
|
Get.toNamed(Routers.normallyOpenModePage,
|
||||||
});
|
arguments: <String, Object>{
|
||||||
}))),
|
'lockSetInfoData': state.lockSetInfoData.value,
|
||||||
|
'lockBasicInfo': state.lockBasicInfo.value
|
||||||
|
});
|
||||||
|
}))),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: true,
|
visible: true,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
@ -140,7 +153,8 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.lockTimePage, arguments: <String, LockSetInfoData>{
|
Get.toNamed(
|
||||||
|
Routers.lockTimePage, arguments: <String, LockSetInfoData>{
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
@ -174,7 +188,9 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.basicInformationPage,
|
Get.toNamed(Routers.basicInformationPage,
|
||||||
arguments: <String, LockSetInfoData>{'lockSetInfoData': state.lockSetInfoData.value});
|
arguments: <String, LockSetInfoData>{
|
||||||
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
//by DaisyWu 田总:移至锁详情配件区
|
//by DaisyWu 田总:移至锁详情配件区
|
||||||
@ -226,24 +242,27 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
// })),
|
// })),
|
||||||
// SizedBox(height: 10.h),
|
// SizedBox(height: 10.h),
|
||||||
// 自动闭锁
|
// 自动闭锁
|
||||||
Obx(() => Visibility(
|
Obx(() =>
|
||||||
visible: state.lockFeature.value.autoLock == 1,
|
Visibility(
|
||||||
child: CommonItem(
|
visible: state.lockFeature.value.autoLock == 1,
|
||||||
leftTitel: TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
child: CommonItem(
|
||||||
rightTitle: state.lockSettingInfo.value.autoLock! > 0
|
leftTitel: TranslationLoader.lanKeys!.automaticBlocking!.tr,
|
||||||
? '${state.lockSetInfoData.value.lockSettingInfo!.autoLockSecond}s'
|
rightTitle: state.lockSettingInfo.value.autoLock! > 0
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
? '${state.lockSetInfoData.value.lockSettingInfo!
|
||||||
isHaveLine: true,
|
.autoLockSecond}s'
|
||||||
isHaveDirection: true,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
// isHaveRightWidget: true,
|
isHaveLine: true,
|
||||||
// rightWidget: rightText((state.lockSetInfoData.value.lockSetting!.autoLock ?? 0) > 0
|
isHaveDirection: true,
|
||||||
// ? "${state.lockSetInfoData.value.lockSetting!.autoLockSecond ?? 0}s"
|
// isHaveRightWidget: true,
|
||||||
// : TranslationLoader.lanKeys!.closed!.tr),
|
// rightWidget: rightText((state.lockSetInfoData.value.lockSetting!.autoLock ?? 0) > 0
|
||||||
action: () {
|
// ? "${state.lockSetInfoData.value.lockSetting!.autoLockSecond ?? 0}s"
|
||||||
Get.toNamed(Routers.automaticBlockingPage, arguments: <String, LockSetInfoData>{
|
// : TranslationLoader.lanKeys!.closed!.tr),
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
action: () {
|
||||||
});
|
Get.toNamed(Routers.automaticBlockingPage,
|
||||||
}))),
|
arguments: <String, LockSetInfoData>{
|
||||||
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
|
}))),
|
||||||
// 锁声音
|
// 锁声音
|
||||||
Obx(() {
|
Obx(() {
|
||||||
String titleStr = '';
|
String titleStr = '';
|
||||||
@ -276,73 +295,87 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.lockSoundSetPage, arguments: <String, LockSetInfoData>{
|
Get.toNamed(Routers.lockSoundSetPage,
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
arguments: <String, LockSetInfoData>{
|
||||||
});
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
}));
|
}));
|
||||||
}),
|
}),
|
||||||
// 防撬报警
|
// 防撬报警
|
||||||
Obx(() => Visibility(
|
Obx(() =>
|
||||||
visible: state.lockFeature.value.antiPrySwitch == 1,
|
Visibility(
|
||||||
child: CommonItem(
|
visible: state.lockFeature.value.antiPrySwitch == 1,
|
||||||
leftTitel: TranslationLoader.lanKeys!.burglarAlarm!.tr,
|
child: CommonItem(
|
||||||
rightTitle: (state.lockSettingInfo.value.antiPrySwitch ?? 0) == 1
|
leftTitel: TranslationLoader.lanKeys!.burglarAlarm!.tr,
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
rightTitle: (state.lockSettingInfo.value.antiPrySwitch ??
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
0) == 1
|
||||||
isHaveLine: true,
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
isHaveDirection: true,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
action: () {
|
isHaveLine: true,
|
||||||
Get.toNamed(Routers.burglarAlarmPage, arguments: <String, LockSetInfoData>{
|
isHaveDirection: true,
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
action: () {
|
||||||
});
|
Get.toNamed(Routers.burglarAlarmPage,
|
||||||
}))),
|
arguments: <String, LockSetInfoData>{
|
||||||
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
|
}))),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
// 常开模式
|
// 常开模式
|
||||||
Obx(() => Visibility(
|
Obx(() =>
|
||||||
visible: state.lockFeature.value.passageMode == 1,
|
Visibility(
|
||||||
// visible: true,
|
visible: state.lockFeature.value.passageMode == 1,
|
||||||
child: CommonItem(
|
// visible: true,
|
||||||
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
child: CommonItem(
|
||||||
rightTitle: (state.lockSettingInfo.value.passageMode ?? 0) == 1
|
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
rightTitle: (state.lockSettingInfo.value.passageMode ?? 0) ==
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
1
|
||||||
isHaveLine: true,
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
isHaveDirection: true,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
action: () {
|
isHaveLine: true,
|
||||||
Get.toNamed(Routers.normallyOpenModePage, arguments: <String, LockSetInfoData>{
|
isHaveDirection: true,
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
action: () {
|
||||||
});
|
Get.toNamed(Routers.normallyOpenModePage,
|
||||||
}))),
|
arguments: <String, LockSetInfoData>{
|
||||||
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
|
}))),
|
||||||
// 远程开锁
|
// 远程开锁
|
||||||
Obx(() => Visibility(
|
Obx(() =>
|
||||||
visible: state.lockFeature.value.remoteUnlock == 1,
|
Visibility(
|
||||||
child: CommonItem(
|
visible: state.lockFeature.value.remoteUnlock == 1,
|
||||||
leftTitel: TranslationLoader.lanKeys!.remoteUnlocking!.tr,
|
child: CommonItem(
|
||||||
rightTitle: (state.lockSettingInfo.value.remoteUnlock ?? 0) == 1
|
leftTitel: TranslationLoader.lanKeys!.remoteUnlocking!.tr,
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
rightTitle: (state.lockSettingInfo.value.remoteUnlock ?? 0) ==
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
1
|
||||||
isHaveLine: true,
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
isHaveDirection: true,
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
action: () {
|
isHaveLine: true,
|
||||||
Get.toNamed(Routers.remoteUnlockingPage, arguments: <String, LockSetInfoData>{
|
isHaveDirection: true,
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
action: () {
|
||||||
});
|
Get.toNamed(Routers.remoteUnlockingPage,
|
||||||
}))),
|
arguments: <String, LockSetInfoData>{
|
||||||
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
|
}))),
|
||||||
// 重置键
|
// 重置键
|
||||||
Obx(() => Visibility(
|
Obx(() =>
|
||||||
visible: state.lockBasicInfo.value.isLockOwner == 1 && state.lockFeature.value.resetSwitch == 1,
|
Visibility(
|
||||||
child: CommonItem(
|
visible: state.lockBasicInfo.value.isLockOwner == 1 &&
|
||||||
leftTitel: TranslationLoader.lanKeys!.resetButton!.tr,
|
state.lockFeature.value.resetSwitch == 1,
|
||||||
rightTitle: (state.lockSettingInfo.value.resetSwitch ?? 0) == 1
|
child: CommonItem(
|
||||||
? TranslationLoader.lanKeys!.opened!.tr
|
leftTitel: TranslationLoader.lanKeys!.resetButton!.tr,
|
||||||
: TranslationLoader.lanKeys!.closed!.tr,
|
rightTitle: (state.lockSettingInfo.value.resetSwitch ?? 0) ==
|
||||||
isHaveLine: true,
|
1
|
||||||
isHaveDirection: true,
|
? TranslationLoader.lanKeys!.opened!.tr
|
||||||
action: () {
|
: TranslationLoader.lanKeys!.closed!.tr,
|
||||||
Get.toNamed(Routers.resetButtonPage, arguments: <String, LockSetInfoData>{
|
isHaveLine: true,
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
isHaveDirection: true,
|
||||||
});
|
action: () {
|
||||||
}))),
|
Get.toNamed(Routers.resetButtonPage,
|
||||||
|
arguments: <String, LockSetInfoData>{
|
||||||
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
|
}))),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
//---田总新增展示
|
//---田总新增展示
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
@ -355,9 +388,10 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.faceUnlockPage, arguments: <String, LockSetInfoData>{
|
Get.toNamed(Routers.faceUnlockPage,
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
arguments: <String, LockSetInfoData>{
|
||||||
});
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
})),
|
})),
|
||||||
// ),
|
// ),
|
||||||
// 消息提醒
|
// 消息提醒
|
||||||
@ -370,21 +404,25 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.msgNotificationPage,
|
Get.toNamed(Routers.msgNotificationPage,
|
||||||
arguments: <String, int?>{'lockId': state.lockSetInfoData.value.lockId});
|
arguments: <String, int?>{
|
||||||
|
'lockId': state.lockSetInfoData.value.lockId
|
||||||
|
});
|
||||||
})),
|
})),
|
||||||
//猫眼设置
|
//猫眼设置
|
||||||
Obx(() => Visibility(
|
Obx(() =>
|
||||||
visible: state.lockFeature.value.isSupportCatEye == 1,
|
Visibility(
|
||||||
child: CommonItem(
|
visible: state.lockFeature.value.isSupportCatEye == 1,
|
||||||
leftTitel: TranslationLoader.lanKeys!.catEyeSet!.tr,
|
child: CommonItem(
|
||||||
rightTitle: '',
|
leftTitel: TranslationLoader.lanKeys!.catEyeSet!.tr,
|
||||||
isHaveLine: true,
|
rightTitle: '',
|
||||||
isHaveDirection: true,
|
isHaveLine: true,
|
||||||
action: () {
|
isHaveDirection: true,
|
||||||
Get.toNamed(Routers.catEyeSetPage, arguments: <String, LockSetInfoData>{
|
action: () {
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
Get.toNamed(Routers.catEyeSetPage,
|
||||||
});
|
arguments: <String, LockSetInfoData>{
|
||||||
}))),
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
|
}))),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
//自动亮屏已包括至面容开锁模块
|
//自动亮屏已包括至面容开锁模块
|
||||||
// Visibility(
|
// Visibility(
|
||||||
@ -420,9 +458,10 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.openDoorDirectionPage, arguments: <String, LockSetInfoData>{
|
Get.toNamed(Routers.openDoorDirectionPage,
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
arguments: <String, LockSetInfoData>{
|
||||||
});
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
})),
|
})),
|
||||||
// 电机功率设置
|
// 电机功率设置
|
||||||
Visibility(
|
Visibility(
|
||||||
@ -472,58 +511,66 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
// }),
|
// }),
|
||||||
// 考勤
|
// 考勤
|
||||||
Obx(
|
Obx(
|
||||||
() => Visibility(
|
() =>
|
||||||
visible: state.lockBasicInfo.value.isLockOwner == 1 && state.lockFeature.value.attendance == 1,
|
Visibility(
|
||||||
child: CommonItem(
|
visible: state.lockBasicInfo.value.isLockOwner == 1 &&
|
||||||
leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr,
|
state.lockFeature.value.attendance == 1,
|
||||||
rightTitle: '',
|
child: CommonItem(
|
||||||
isHaveLine: true,
|
leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr,
|
||||||
isHaveRightWidget: true,
|
rightTitle: '',
|
||||||
rightWidget: _openCheckInSwitch())),
|
isHaveLine: true,
|
||||||
|
isHaveRightWidget: true,
|
||||||
|
rightWidget: _openCheckInSwitch())),
|
||||||
),
|
),
|
||||||
// 开锁提醒
|
// 开锁提醒
|
||||||
Obx(
|
Obx(
|
||||||
() => Visibility(
|
() =>
|
||||||
visible: state.lockBasicInfo.value.isLockOwner == 1 && state.lockFeature.value.unlockReminder == 1,
|
Visibility(
|
||||||
child: CommonItem(
|
visible: state.lockBasicInfo.value.isLockOwner == 1 &&
|
||||||
leftTitel: TranslationLoader.lanKeys!.unlockReminder!.tr,
|
state.lockFeature.value.unlockReminder == 1,
|
||||||
rightTitle: '',
|
child: CommonItem(
|
||||||
isHaveLine: true,
|
leftTitel: TranslationLoader.lanKeys!.unlockReminder!.tr,
|
||||||
isHaveRightWidget: true,
|
rightTitle: '',
|
||||||
rightWidget: _lockRemindSwitch())),
|
isHaveLine: true,
|
||||||
|
isHaveRightWidget: true,
|
||||||
|
rightWidget: _lockRemindSwitch())),
|
||||||
),
|
),
|
||||||
// APP开锁时是否需联网
|
// APP开锁时是否需联网
|
||||||
Obx(
|
Obx(
|
||||||
() => Visibility(
|
() =>
|
||||||
visible: state.lockBasicInfo.value.isLockOwner == 1 && state.lockFeature.value.appUnlockOnline == 1,
|
Visibility(
|
||||||
child: CommonItem(
|
visible: state.lockBasicInfo.value.isLockOwner == 1 &&
|
||||||
leftTitel: TranslationLoader
|
state.lockFeature.value.appUnlockOnline == 1,
|
||||||
.lanKeys!.whetherInternetRequiredWhenUnlocking!.tr,
|
child: CommonItem(
|
||||||
rightTitle: '',
|
leftTitel: TranslationLoader
|
||||||
isHaveLine: false,
|
.lanKeys!.whetherInternetRequiredWhenUnlocking!.tr,
|
||||||
isHaveRightWidget: true,
|
rightTitle: '',
|
||||||
rightWidget: _openLockNeedOnlineSwitch()),
|
isHaveLine: false,
|
||||||
),
|
isHaveRightWidget: true,
|
||||||
|
rightWidget: _openLockNeedOnlineSwitch()),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
// wifi配网
|
// wifi配网
|
||||||
Obx(
|
Obx(
|
||||||
() => Visibility(
|
() =>
|
||||||
visible: state.lockFeature.value.wifi == 1,
|
Visibility(
|
||||||
child: CommonItem(
|
visible: state.lockFeature.value.wifi == 1,
|
||||||
leftTitel:
|
child: CommonItem(
|
||||||
|
leftTitel:
|
||||||
TranslationLoader.lanKeys!.wifiDistributionNetwork!.tr,
|
TranslationLoader.lanKeys!.wifiDistributionNetwork!.tr,
|
||||||
rightTitle: '',
|
rightTitle: '',
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.wifiListPage, arguments: <String, LockSetInfoData>{
|
Get.toNamed(Routers.wifiListPage,
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
arguments: <String, LockSetInfoData>{
|
||||||
});
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
// Get.toNamed(Routers.configuringWifiPage, arguments: {
|
});
|
||||||
// 'lockSetInfoData': state.lockSetInfoData.value
|
// Get.toNamed(Routers.configuringWifiPage, arguments: {
|
||||||
// });
|
// 'lockSetInfoData': state.lockSetInfoData.value
|
||||||
})),
|
// });
|
||||||
|
})),
|
||||||
),
|
),
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
// 锁时间
|
// 锁时间
|
||||||
@ -535,7 +582,8 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.lockTimePage, arguments: <String, LockSetInfoData>{
|
Get.toNamed(
|
||||||
|
Routers.lockTimePage, arguments: <String, LockSetInfoData>{
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
});
|
});
|
||||||
})),
|
})),
|
||||||
@ -628,13 +676,17 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
|
|||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: state.isAttendance.value == 1,
|
value: state.isAttendance.value == 1,
|
||||||
onChanged: (bool value) {
|
onChanged: (bool value) {
|
||||||
logic.openCheckingInData((CheckingInInfoDataEntity checkingInInfoDataEntity) {
|
logic.openCheckingInData((
|
||||||
|
CheckingInInfoDataEntity checkingInInfoDataEntity) {
|
||||||
if (checkingInInfoDataEntity.data!.companyId == 0) {
|
if (checkingInInfoDataEntity.data!.companyId == 0) {
|
||||||
// logic.showCupertinoAlertDialog(context);
|
// logic.showCupertinoAlertDialog(context);
|
||||||
ShowTipView().showIosTipWithContentDialog('创建公司后,考勤功能才能使用'.tr, () {
|
ShowTipView().showIosTipWithContentDialog(
|
||||||
|
'创建公司后,考勤功能才能使用'.tr, () {
|
||||||
// 删除锁
|
// 删除锁
|
||||||
Get.toNamed(Routers.checkInCreatCompanyPage,
|
Get.toNamed(Routers.checkInCreatCompanyPage,
|
||||||
arguments: <String, LockSetInfoData>{'lockSetInfoData': state.lockSetInfoData.value});
|
arguments: <String, LockSetInfoData>{
|
||||||
|
'lockSetInfoData': state.lockSetInfoData.value
|
||||||
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
logic.setLockSetGeneralSetting();
|
logic.setLockSetGeneralSetting();
|
||||||
|
|||||||
@ -27,7 +27,7 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
|
|||||||
//获取密码请求
|
//获取密码请求
|
||||||
Future<void> getKeyboardPwdRequest() async {
|
Future<void> getKeyboardPwdRequest() async {
|
||||||
int startDate = DateTool().dateToTimestamp(state.beginTime.value, 1);
|
int startDate = DateTool().dateToTimestamp(state.beginTime.value, 1);
|
||||||
final int endDate = DateTool().dateToTimestamp(state.endTime.value, 1);
|
int endDate = DateTool().dateToTimestamp(state.endTime.value, 1);
|
||||||
final int lockId = state.keyInfo.value.lockId!;
|
final int lockId = state.keyInfo.value.lockId!;
|
||||||
String getKeyType = '0';
|
String getKeyType = '0';
|
||||||
|
|
||||||
@ -55,6 +55,10 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
|
|||||||
showToast('失效时间要大于当前时间'.tr);
|
showToast('失效时间要大于当前时间'.tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
//endDate 设置当天凌晨 0 点
|
||||||
|
final DateTime now = DateTime.now();
|
||||||
|
startDate =
|
||||||
|
DateTime(now.year, now.month, now.day).millisecondsSinceEpoch;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 芯连需要生效时间
|
// 芯连需要生效时间
|
||||||
@ -221,6 +225,7 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
|
|||||||
// late DateTime getStartDateTime;
|
// late DateTime getStartDateTime;
|
||||||
// 监听设备返回的数据
|
// 监听设备返回的数据
|
||||||
late StreamSubscription<Reply> _replySubscription;
|
late StreamSubscription<Reply> _replySubscription;
|
||||||
|
|
||||||
void _initReplySubscription() {
|
void _initReplySubscription() {
|
||||||
_replySubscription =
|
_replySubscription =
|
||||||
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async {
|
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async {
|
||||||
@ -436,7 +441,8 @@ class PasswordKeyPerpetualLogic extends BaseGetXController {
|
|||||||
case 3:
|
case 3:
|
||||||
//自定义
|
//自定义
|
||||||
if (state.isPermanent.value == false) {
|
if (state.isPermanent.value == false) {
|
||||||
useDateStr = '类型:自定义-限时\n有效期:${state.customBeginTime.value} -- ${state.customEndTime.value}';
|
useDateStr =
|
||||||
|
'类型:自定义-限时\n有效期:${state.customBeginTime.value} -- ${state.customEndTime.value}';
|
||||||
} else {
|
} else {
|
||||||
useDateStr = '类型:自定义-永久';
|
useDateStr = '类型:自定义-永久';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -225,7 +225,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
|||||||
return Column(
|
return Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: CommonDataManage().currentKeyInfo.vendor == 'XHJ',
|
visible: CommonDataManage().currentKeyInfo.vendor != 'XHJ',
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||||
rightTitle: state.beginTime.value,
|
rightTitle: state.beginTime.value,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user