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