统一国际化到常开日期字段

This commit is contained in:
魏少阳 2024-07-26 14:12:26 +08:00
parent 142f641416
commit 7c2b7f1a2f
25 changed files with 214 additions and 236 deletions

View File

@ -61,15 +61,25 @@
"添加门磁": "Add Door Magnetic",
"添加无线键盘": "Add Wireless Keyboard",
"添加手掌": "Add Palm",
"请输入员工账号": "Please enter the employee account",
"批量授权锁": "Batch Authorize Lock",
"授权管理员拥有操作这把锁的重要权限,请确保只发给我你信任的人": "Authorized administrators have important permissions to operate this lock, please make sure to send it to someone you trust",
"功能开启后,你将可以通过网关远程开锁。此功能的开启和关闭只能在锁附近通过手机蓝牙进行。":"After the function is turned on, you will be able to unlock remotely through the gateway. The opening and closing of this function can only be done through the phone Bluetooth near the lock.",
"排列榜": "Leaderboard",
"早到榜": "Early List",
"迟到榜": "Late List",
"当前模式": "Current Mode",
"勤奋榜": "Diligent List",
"延迟时间": "Delay Time",
"经过以上设定的时间,锁会自动关闭。开启或修改设置后,请先开一次锁,使时间生效。": "After the set time above, the lock will automatically close. After opening or modifying the settings, please open the lock once to make the time effective.",
"时间": "Time",
"开始时间": "Start Time",
"结束时间": "End Time",
"工作时间设置": "Working Time Settings",
"常开模式": "Normal Open Mode",
"常开时间": "Normal Open Time",
"常开日期": "Normal Open Date",
"accountNumber": "AccountNumber",
"volumeAuthorizationLock": "Volume Authorization Lock",
"authorizedAdminTip": "The authorized administrator has important access to this lock, so make sure you only send it to people you trust",
"lockOperatingRecordTip": "The historical records can be retained only for a certain period of time. If you want to retain historical records, export them in the upper right corner",
"rankingList": "Ranking List",
"earlyArrivalList": "Early Arrival List",
"lateList": "Late List",
"hardWorkingList": "Hard Working List",
"company": "Company",
"staff": "Staff",
"work": "Work",
@ -141,11 +151,8 @@
"nearbyEquipment": "Nearby Equipment",
"noData": "No Data",
"doorMagneticListTopTip": "You can query the open and close status of a door by using the door status sensor. Add a door magnet to each lock",
"remoteUnlockingPageTip": "When enabled, you will be able to open the lock remotely through the gateway. This function can only be turned on and off near the lock via Bluetooth on the phone.",
"currentMode": "Current Mode",
"delayTime": "Delay Time",
"automaticBlockingTip": "After the time set above, the lock will automatically close. After you enable or modify the Settings, open the lock once for the time to take effect.",
"time": "Time",
"normallyOpen": "Normally Open",
"date": "Date",
"begin": "Begin",

View File

@ -61,15 +61,25 @@
"添加门磁": "添加门磁",
"添加无线键盘": "添加无线键盘",
"添加手掌": "添加手掌",
"请输入员工账号": "请输入员工账号",
"批量授权锁": "批量授权锁",
"授权管理员拥有操作这把锁的重要权限,请确保只发给我你信任的人":"授权管理员拥有操作这把锁的重要权限,请确保只发给我你信任的人",
"功能开启后,你将可以通过网关远程开锁。此功能的开启和关闭只能在锁附近通过手机蓝牙进行。":"功能开启后,你将可以通过网关远程开锁。此功能的开启和关闭只能在锁附近通过手机蓝牙进行。",
"排列榜": "排列榜",
"早到榜": "早到榜",
"迟到榜": "迟到榜",
"当前模式": "当前模式",
"勤奋榜":"勤奋榜",
"延迟时间": "延迟时间",
"经过以上设定的时间,锁会自动关闭。开启或修改设置后,请先开一次锁,使时间生效。": "经过以上设定的时间,锁会自动关闭。开启或修改设置后,请先开一次锁,使时间生效。",
"时间": "时间",
"开始时间": "开始时间",
"结束时间": "结束时间",
"工作时间设置": "工作时间设置",
"常开模式":"常开模式",
"常开时间": "常开时间",
"常开日期": "常开日期",
"accountNumber":"accountNumber",
"volumeAuthorizationLock":"volumeAuthorizationLock",
"authorizedAdminTip":"authorizedAdminTip",
"lockOperatingRecordTip":"lockOperatingRecordTip",
"rankingList":"rankingList",
"earlyArrivalList":"earlyArrivalList",
"lateList":"lateList",
"hardWorkingList":"hardWorkingList",
"company":"company",
"staff":"staff",
"work":"work",
@ -109,7 +119,6 @@
"doorMagnetic":"doorMagnetic",
"remoteUnlocking":"remoteUnlocking",
"automaticBlocking":"automaticBlocking",
"normallyOpenMode":"normallyOpenMode",
"automaticUnLock":"automaticUnLock",
"automaticUnLockTip":"automaticUnLockTip",
"lockSound":"lockSound",
@ -142,12 +151,8 @@
"nearbyEquipment":"nearbyEquipment",
"noData":"noData",
"doorMagneticListTopTip":"doorMagneticListTopTip",
"remoteUnlockingPageTip":"remoteUnlockingPageTip",
"currentMode":"currentMode",
"delayTime":"delayTime",
"automaticBlockingTip":"automaticBlockingTip",
"time":"time",
"normallyOpen":"normallyOpen",
"date":"date",
"begin":"begin",
"end":"end",

View File

@ -61,15 +61,25 @@
"添加门磁": "添加门磁",
"添加无线键盘": "添加无线键盘",
"添加手掌": "添加手掌",
"请输入员工账号": "请输入员工账号",
"批量授权锁": "批量授权锁",
"授权管理员拥有操作这把锁的重要权限,请确保只发给我你信任的人": "授权管理员拥有操作这把锁的重要权限,请确保只发给我你信任的人",
"功能开启后,你将可以通过网关远程开锁。此功能的开启和关闭只能在锁附近通过手机蓝牙进行。": "功能开启后,你将可以通过网关远程开锁。此功能的开启和关闭只能在锁附近通过手机蓝牙进行。",
"排列榜": "排列榜",
"早到榜": "早到榜",
"迟到榜": "迟到榜",
"当前模式": "当前模式",
"勤奋榜": "勤奋榜",
"延迟时间": "延迟时间",
"经过以上设定的时间,锁会自动关闭。开启或修改设置后,请先开一次锁,使时间生效。": "经过以上设定的时间,锁会自动关闭。开启或修改设置后,请先开一次锁,使时间生效。",
"时间": "时间",
"开始时间": "开始时间",
"结束时间": "结束时间",
"工作时间设置": "工作时间设置",
"常开模式": "常开模式",
"常开时间": "常开时间",
"常开日期": "常开日期",
"accountNumber": "账号",
"volumeAuthorizationLock": "批量授权锁",
"authorizedAdminTip": "授权管理员拥有操作这把锁的重要权限,请确保只发给我你信任的人",
"lockOperatingRecordTip": "只能保留一定时间内的记录,如果您需要保留历史记录,可以在右上角导出",
"rankingList": "排列榜",
"earlyArrivalList": "早到榜",
"lateList": "迟到榜",
"hardWorkingList": "勤奋榜",
"company": "公司",
"staff": "员工",
"work": "工作",
@ -108,7 +118,6 @@
"doorMagnetic": "门磁",
"remoteUnlocking": "远程开锁",
"automaticBlocking": "自动闭锁",
"normallyOpenMode": "常开模式",
"automaticUnLock": "自动开锁",
"automaticUnLockTip": "开启后锁将在常开模式开始时自动打开",
"lockSound": "锁声音",
@ -141,12 +150,6 @@
"nearbyEquipment": "附近的设备",
"noData": "暂无数据",
"doorMagneticListTopTip": "通过门磁可查询门的开、关状态。每把锁咳添加一个门磁",
"remoteUnlockingPageTip": "功能开启后,你将可以通过网关远程开锁。此功能的开启和关闭只能在锁附近通过手机蓝牙进行。",
"currentMode": "当前模式",
"delayTime": "延迟时间",
"automaticBlockingTip": "经过以上设定的时间,锁会自动关闭。开启或修改设置后,请先开一次锁,使时间生效。",
"time": "时间",
"normallyOpen": "常开",
"date": "日期",
"begin": "开始",
"end": "结束",

View File

@ -83,8 +83,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
keyInfoWidget(),
keyTimeWidget(),
keyOnlyManageWidget(),
keyBottomWidget(
TranslationLoader.lanKeys!.authorizedAdminTip!.tr)
keyBottomWidget('授权管理员拥有操作这把锁的重要权限,请确保只发给我你信任的人'.tr)
],
),
);
@ -96,8 +95,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
children: <Widget>[
keyInfoWidget(),
keyOnlyManageWidget(),
keyBottomWidget(
TranslationLoader.lanKeys!.authorizedAdminTip!.tr)
keyBottomWidget('授权管理员拥有操作这把锁的重要权限,请确保只发给我你信任的人'.tr)
],
),
);
@ -259,9 +257,8 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
}
},
child: Text(
TranslationLoader.lanKeys!.volumeAuthorizationLock!.tr,
style:
TextStyle(color: AppColors.mainColor, fontSize: 24.sp),
'批量授权锁'.tr,
style: TextStyle(color: AppColors.mainColor, fontSize: 24.sp),
)),
],
),

View File

@ -85,7 +85,7 @@ class _VolumeAuthorizationLockPageState
return Column(
children: <Widget>[
CommonItem(
leftTitel: TranslationLoader.lanKeys!.accountNumber!.tr,
leftTitel: '账号'.tr,
rightTitle: '',
isHaveLine: true,
isHaveRightWidget: true,

View File

@ -112,7 +112,7 @@ class _OtherTypeKeyChangeValidityDatePageState extends State<OtherTypeKeyChangeV
isHaveDirection: true,
isHaveLine: true,
action: () {
PDuration selectDate =
final PDuration selectDate =
PDuration.parse(DateTime.tryParse(state.starDate.value));
Pickers.showDatePicker(context,
selectDate: selectDate,
@ -125,7 +125,7 @@ class _OtherTypeKeyChangeValidityDatePageState extends State<OtherTypeKeyChangeV
rightTitle: state.endDate.value,
isHaveDirection: true,
action: () {
PDuration selectDate =
final PDuration selectDate =
PDuration.parse(DateTime.tryParse(state.endDate.value));
Pickers.showDatePicker(context,
selectDate: selectDate,
@ -244,13 +244,12 @@ class _OtherTypeKeyChangeValidityDatePageState extends State<OtherTypeKeyChangeV
child: Column(
children: <Widget>[
Obx(() => CommonItem(
leftTitel:
"${TranslationLoader.lanKeys!.begin!.tr}${TranslationLoader.lanKeys!.time!.tr}",
leftTitel: '开始时间'.tr,
rightTitle: state.starTime.value,
isHaveDirection: true,
isHaveLine: true,
action: () {
PDuration selectDate = PDuration.parse(DateTool().dateToDateTime(state.starTime.value, 0));
final PDuration selectDate = PDuration.parse(DateTool().dateToDateTime(state.starTime.value, 0));
Pickers.showDatePicker(context,
selectDate: selectDate,
mode: DateMode.HM, onConfirm: (PDuration p) {
@ -261,12 +260,11 @@ class _OtherTypeKeyChangeValidityDatePageState extends State<OtherTypeKeyChangeV
});
})),
Obx(() => CommonItem(
leftTitel:
"${TranslationLoader.lanKeys!.end!.tr}${TranslationLoader.lanKeys!.time!.tr}",
leftTitel: '结束时间'.tr,
rightTitle: state.endTime.value,
isHaveDirection: true,
action: () {
PDuration selectDate = PDuration.parse(DateTool().dateToDateTime(state.endTime.value, 0));
final PDuration selectDate = PDuration.parse(DateTool().dateToDateTime(state.endTime.value, 0));
Pickers.showDatePicker(context,
selectDate: selectDate,
mode: DateMode.HM, onConfirm: (PDuration p) {

View File

@ -525,16 +525,16 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
void showListType() {
final List<String> list = <String>[
TranslationLoader.lanKeys!.earlyArrivalList!.tr,
TranslationLoader.lanKeys!.lateList!.tr,
TranslationLoader.lanKeys!.hardWorkingList!.tr
'早到榜'.tr,
'迟到榜'.tr,
'勤奋榜'.tr
];
ShowBottomSheetTool().showSingleRowPicker(
//
context,
//
normalIndex: 0,
title: TranslationLoader.lanKeys!.rankingList!.tr,
title: '排列榜'.tr,
cancelTitle: '取消'.tr,
sureTitle: '确定'.tr,
//

View File

@ -16,7 +16,7 @@ class CheckingInListState{// 未打车
final RxString companyId = ''.obs;
final RxString listType = '1'.obs;// 1 2 3
final RxString listTypeStr = TranslationLoader.lanKeys!.earlyArrivalList!.tr.obs;// 1 2 3
final RxString listTypeStr = '早到榜'.tr.obs;// 1 2 3
final RxBool isDay = true.obs;//
final RxInt checkListDateTimestamp = DateTime.now().millisecondsSinceEpoch.obs;//
final RxString checkListDate = formatDate(DateTime.now(), <String>[mm,'-',dd]).obs;//

View File

@ -59,8 +59,7 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
});
})),
Obx(() => CommonItem(
leftTitel:
'${TranslationLoader.lanKeys!.work!.tr}${TranslationLoader.lanKeys!.time!.tr}',
leftTitel: '工作时间'.tr,
rightTitle: (state.beginTime.value.isNotEmpty) ? '${state.beginTime.value} - ${state.endTime.value}' : '',
isHaveLine: true,
isHaveDirection: true,

View File

@ -31,8 +31,7 @@ class _CheckingInSetWorkTimePageState extends State<CheckingInSetWorkTimePage> {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle:
'${TranslationLoader.lanKeys!.work!.tr} ${TranslationLoader.lanKeys!.time!.tr} ${TranslationLoader.lanKeys!.set!.tr}',
barTitle: '工作时间设置'.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: buildMainUI(),

View File

@ -106,12 +106,12 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
child: Column(
children: <Widget>[
CommonItem(
leftTitel: TranslationLoader.lanKeys!.accountNumber!.tr,
leftTitel: '账号'.tr,
rightTitle: '',
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: getTFWidget(
"${'请输入'.tr}${"员工".tr}${TranslationLoader.lanKeys!.accountNumber!.tr}",
'请输入员工账号'.tr,
state.staffAccountController)),
CommonItem(
leftTitel:
@ -447,7 +447,7 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
String title = '';
switch (int.parse(state.selectPrintingMethodType.value)) {
case 1:
title = TranslationLoader.lanKeys!.accountNumber!.tr;
title = '账号'.tr;
break;
case 2:
title = '密码'.tr;

View File

@ -69,7 +69,7 @@ class _ElectronicKeyPeriodValidityPageState
isHaveDirection: true,
isHaveLine: true,
action: () {
PDuration selectDate =
final PDuration selectDate =
PDuration.parse(DateTime.tryParse(state.endTime.value));
Pickers.showDatePicker(context,
selectDate: selectDate,
@ -83,7 +83,7 @@ class _ElectronicKeyPeriodValidityPageState
rightTitle: state.endDate.value,
isHaveDirection: true,
action: () {
PDuration selectDate =
final PDuration selectDate =
PDuration.parse(DateTime.tryParse(state.endDate.value));
Pickers.showDatePicker(context,
selectDate: selectDate,
@ -202,13 +202,12 @@ class _ElectronicKeyPeriodValidityPageState
child: Column(
children: <Widget>[
Obx(() => CommonItem(
leftTitel:
"${TranslationLoader.lanKeys!.begin!.tr}${TranslationLoader.lanKeys!.time!.tr}",
leftTitel: '开始时间'.tr,
rightTitle: state.starTime.value,
isHaveDirection: true,
isHaveLine: true,
action: () {
PDuration selectDate = PDuration.parse(DateTool().dateToDateTime(state.starTime.value, 0));
final PDuration selectDate = PDuration.parse(DateTool().dateToDateTime(state.starTime.value, 0));
Pickers.showDatePicker(context,
selectDate: selectDate,
mode: DateMode.HM, onConfirm: (PDuration p) {
@ -219,12 +218,11 @@ class _ElectronicKeyPeriodValidityPageState
});
})),
Obx(() => CommonItem(
leftTitel:
"${TranslationLoader.lanKeys!.end!.tr}${TranslationLoader.lanKeys!.time!.tr}",
leftTitel: '结束时间'.tr,
rightTitle: state.endTime.value,
isHaveDirection: true,
action: () {
PDuration selectDate = PDuration.parse(DateTool().dateToDateTime(state.endTime.value, 0));
final PDuration selectDate = PDuration.parse(DateTool().dateToDateTime(state.endTime.value, 0));
Pickers.showDatePicker(context,
selectDate: selectDate,
mode: DateMode.HM, onConfirm: (PDuration p) {

View File

@ -86,29 +86,6 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> with
},
child: Column(
children: [
// (CommonDataManage().currentKeyInfo.isLockOwner == 1 ||
// CommonDataManage().currentKeyInfo.keyRight == 1)
// ? Column(
// children: [
// Container(
// padding: EdgeInsets.only(left:20.h, right: 20.h, top: 20.h),
// child: Text(
// TranslationLoader.lanKeys!.lockOperatingRecordTip!.tr,
// textAlign: TextAlign.start,
// style: TextStyle(fontSize: 20.sp),
// ),
// ),
// KeySearchWidget(
// editingController: state.searchController,
// onSubmittedAction: () {
// logic.pageNo = 1;
// getHttpData();
// },
// ),
// ],
// )
// : Container(),
// SizedBox(height: 10.h),
Expanded(child: _buildMainUI()),
],
),

View File

@ -77,7 +77,7 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage>
),
Builder(builder: (BuildContext context) {
return Obx(() => CommonItem(
leftTitel: TranslationLoader.lanKeys!.delayTime!.tr,
leftTitel: '延迟时间'.tr,
rightTitle: state.isCustomLockTime.value == true
? '自定义'.tr
: (state.autoLockTime.value.isNotEmpty &&
@ -103,7 +103,7 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage>
context,
//
normalIndex: 0,
title: TranslationLoader.lanKeys!.time!.tr,
title: '时间'.tr,
cancelTitle:'取消'.tr,
sureTitle: '确定'.tr,
//
@ -134,7 +134,7 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage>
Row(
children: <Widget>[
Text(
TranslationLoader.lanKeys!.time!.tr,
'时间'.tr,
style: TextStyle(fontSize: 24.sp),
),
],
@ -178,9 +178,8 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage>
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Expanded(
child: Text(
TranslationLoader.lanKeys!.automaticBlockingTip!.tr,
Expanded(child: Text(
'经过以上设定的时间,锁会自动关闭。开启或修改设置后,请先开一次锁,使时间生效。'.tr,
style: TextStyle(fontSize: 20.sp),
)),
],

View File

@ -52,7 +52,7 @@ class _BurglarAlarmPageState extends State<BurglarAlarmPage> with RouteAware{
children: [
Expanded(
child: Text(
"${TranslationLoader.lanKeys!.currentMode!.tr} : ${state.burglarAlarmEnable.value == 1 ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr}",
"${"当前模式".tr} : ${state.burglarAlarmEnable.value == 1 ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr}",
style:
TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w600),
)),

View File

@ -131,7 +131,7 @@ class _LockSetPageState extends State<LockSetPage>
Obx(() => Visibility(
visible: state.lockFeature.value.passageMode == 1,
child: CommonItem(
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
leftTitel: '常开模式'.tr,
rightTitle: (state.lockSettingInfo.value.passageMode ?? 0) == 1
? TranslationLoader.lanKeys!.opened!.tr
: TranslationLoader.lanKeys!.closed!.tr,
@ -324,7 +324,7 @@ class _LockSetPageState extends State<LockSetPage>
visible: state.lockFeature.value.passageMode == 1,
// visible: true,
child: CommonItem(
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
leftTitel: '常开模式'.tr,
rightTitle: (state.lockSettingInfo.value.passageMode ?? 0) == 1
? TranslationLoader.lanKeys!.opened!.tr
: TranslationLoader.lanKeys!.closed!.tr,

View File

@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/main/lockDetail/lockSet/normallyOpenMode/normallyOpenMode_state.dart';
import 'package:star_lock/tools/pickers/pickers.dart';
import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart';
@ -23,23 +24,22 @@ class NormallyOpenModePage extends StatefulWidget {
State<NormallyOpenModePage> createState() => _NormallyOpenModePageState();
}
class _NormallyOpenModePageState extends State<NormallyOpenModePage>
with RouteAware {
final logic = Get.put(NormallyOpenModeLogic());
final state = Get.find<NormallyOpenModeLogic>().state;
class _NormallyOpenModePageState extends State<NormallyOpenModePage> with RouteAware {
final NormallyOpenModeLogic logic = Get.put(NormallyOpenModeLogic());
final NormallyOpenModeState state = Get.find<NormallyOpenModeLogic>().state;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
barTitle: '常开模式'.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: Obx(() => ListView(
children: [
children: <Widget>[
CommonItem(
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
leftTitel: '常开模式'.tr,
rightTitle: '',
isHaveLine: false,
isHaveRightWidget: true,
@ -56,7 +56,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
color: Colors.white,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
children: <Widget>[
Expanded(
child: Text(
TranslationLoader.lanKeys!.normallyOpenModeTip!.tr,
@ -73,7 +73,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
child: Container(
color: Colors.white,
child: Column(
children: [
children: <Widget>[
// CommonItem(
// leftTitel: TranslationLoader.lanKeys!.automaticUnLock!.tr,
// rightTitle: "",
@ -134,15 +134,14 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
children: <Widget>[
Container(
height: 60.h,
// color: Colors.red,
padding: EdgeInsets.only(left: 30.w, top: 15.h),
child: Text(
"${TranslationLoader.lanKeys!.normallyOpen!.tr}${TranslationLoader.lanKeys!.date!.tr}",
style:
TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600))),
'常开日期'.tr,
style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w600))),
Container(
height: 100.h,
padding: EdgeInsets.only(left: 10.w, right: 10.w, bottom: 10.h),
@ -151,7 +150,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
crossAxisCount: 7, childAspectRatio: 1.0),
itemCount: 7,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
itemBuilder: (BuildContext context, int index) {
index += 1;
return btnItem(index);
})),
@ -228,14 +227,13 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
Widget bottomWidget() {
return Column(
children: [
children: <Widget>[
Container(
color: AppColors.mainBackgroundColor,
height: 10.h,
),
Obx(() => CommonItem(
leftTitel:
"${TranslationLoader.lanKeys!.normallyOpen!.tr}${TranslationLoader.lanKeys!.time!.tr}",
leftTitel: '常开时间'.tr,
rightTitle: '',
isHaveLine: true,
isHaveRightWidget: true,
@ -254,7 +252,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
setState(() {});
},
child: Row(
children: [
children: <Widget>[
Text(
TranslationLoader.lanKeys!.allDay!.tr,
style: TextStyle(fontSize: 22.sp),
@ -277,10 +275,10 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
child: Container(
color: Colors.white,
child: Column(
children: [
children: <Widget>[
Obx(() => CommonItem(
leftTitel:
"${TranslationLoader.lanKeys!.begin!.tr}${TranslationLoader.lanKeys!.time!.tr}",
'开始时间'.tr,
rightTitle: state.beginTime.value,
isHaveDirection: true,
isHaveLine: true,
@ -292,7 +290,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
DateTime.tryParse(state.beginTime.value));
Pickers.showDatePicker(context,
selectDate: selectDate,
mode: DateMode.HM, onConfirm: (p) {
mode: DateMode.HM, onConfirm: (PDuration p) {
setState(() {
state.beginTimeMinute.value =
p.hour! * 60 + p.minute!;
@ -301,8 +299,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
});
})),
Obx(() => CommonItem(
leftTitel:
"${TranslationLoader.lanKeys!.end!.tr}${TranslationLoader.lanKeys!.time!.tr}",
leftTitel: '结束时间'.tr,
rightTitle: state.endTime.value,
isHaveDirection: true,
action: () {
@ -313,7 +310,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
DateTime.tryParse(state.endTime.value));
Pickers.showDatePicker(context,
selectDate: selectDate,
mode: DateMode.HM, onConfirm: (p) {
mode: DateMode.HM, onConfirm: (PDuration p) {
setState(() {
state.endTimeMinute.value =
p.hour! * 60 + p.minute!;
@ -337,7 +334,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
value: state.isOpenNormallyOpenMode.value,
onChanged: state.isJustForShow.value == true
? null
: (value) {
: (bool value) {
setState(() {
state.isOpenNormallyOpenMode.value = value;
});

View File

@ -4,6 +4,7 @@ import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/main/lockDetail/lockSet/remoteUnlocking/remoteUnlocking_logic.dart';
import 'package:star_lock/main/lockDetail/lockSet/remoteUnlocking/remoteUnlocking_state.dart';
import '../../../../app_settings/app_colors.dart';
import '../../../../blue/blue_manage.dart';
@ -19,10 +20,9 @@ class RemoteUnlockingPage extends StatefulWidget {
State<RemoteUnlockingPage> createState() => _RemoteUnlockingPageState();
}
class _RemoteUnlockingPageState extends State<RemoteUnlockingPage>
with RouteAware {
final logic = Get.put(RemoteUnlockingLogic());
final state = Get.find<RemoteUnlockingLogic>().state;
class _RemoteUnlockingPageState extends State<RemoteUnlockingPage> with RouteAware {
final RemoteUnlockingLogic logic = Get.put(RemoteUnlockingLogic());
final RemoteUnlockingState state = Get.find<RemoteUnlockingLogic>().state;
@override
Widget build(BuildContext context) {
@ -35,13 +35,13 @@ class _RemoteUnlockingPageState extends State<RemoteUnlockingPage>
body: Container(
padding: EdgeInsets.all(30.w),
child: Column(
children: [
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
children: <Widget>[
Expanded(
child: Text(
TranslationLoader.lanKeys!.remoteUnlockingPageTip!.tr,
'功能开启后,你将可以通过网关远程开锁。此功能的开启和关闭只能在锁附近通过手机蓝牙进行。'.tr,
style: TextStyle(
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
)),
@ -53,10 +53,10 @@ class _RemoteUnlockingPageState extends State<RemoteUnlockingPage>
Obx(() {
return Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
children: <Widget>[
Expanded(
child: Text(
"${TranslationLoader.lanKeys!.currentMode!.tr} : ${state.remoteEnable.value == 1 ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr}",
"${"当前模式".tr} : ${state.remoteEnable.value == 1 ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr}",
style: TextStyle(
fontWeight: FontWeight.w600, fontSize: 22.sp),
)),

View File

@ -2,9 +2,10 @@ import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../../../flavors.dart';
import 'package:star_lock/main/lockDetail/lockSet/resetButton/resetButton_state.dart';
import '../../../../app_settings/app_colors.dart';
import '../../../../flavors.dart';
import '../../../../tools/appRouteObserver.dart';
import '../../../../tools/showTipView.dart';
import '../../../../tools/submitBtn.dart';
@ -20,8 +21,8 @@ class ResetButtonPage extends StatefulWidget {
}
class _ResetButtonPageState extends State<ResetButtonPage> with RouteAware {
final logic = Get.put(ResetButtonLogic());
final state = Get.find<ResetButtonLogic>().state;
final ResetButtonLogic logic = Get.put(ResetButtonLogic());
final ResetButtonState state = Get.find<ResetButtonLogic>().state;
@override
Widget build(BuildContext context) {
@ -34,15 +35,15 @@ class _ResetButtonPageState extends State<ResetButtonPage> with RouteAware {
body: Container(
padding: EdgeInsets.all(30.w),
child: Column(
children: [
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
children: <Widget>[
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
children: <Widget>[
if (F.isSKY)
Text(
TranslationLoader.lanKeys!.resetButtonTip1!.tr,
@ -69,10 +70,10 @@ class _ResetButtonPageState extends State<ResetButtonPage> with RouteAware {
),
Obx(() => Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
children: <Widget>[
Expanded(
child: Text(
"${TranslationLoader.lanKeys!.currentMode!.tr} : ${state.resetButtonEnable.value == 1 ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr}",
"${"当前模式".tr} : ${state.resetButtonEnable.value == 1 ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr}",
style: TextStyle(
fontWeight: FontWeight.w600, fontSize: 20.sp),
)),
@ -93,9 +94,7 @@ class _ResetButtonPageState extends State<ResetButtonPage> with RouteAware {
// showDeletAlertTipDialog(context);
ShowTipView().showIosTipWithContentDialog(
'确定要${state.resetButtonEnable.value == 1 ? TranslationLoader.lanKeys!.close!.tr : TranslationLoader.lanKeys!.open!.tr}重置键?',
() {
logic.sendBurglarAlarm();
});
logic.sendBurglarAlarm);
})),
],
),
@ -104,7 +103,6 @@ class _ResetButtonPageState extends State<ResetButtonPage> with RouteAware {
@override
void didChangeDependencies() {
// TODO: implement didChangeDependencies
super.didChangeDependencies();
///
@ -113,7 +111,6 @@ class _ResetButtonPageState extends State<ResetButtonPage> with RouteAware {
@override
void dispose() {
// TODO: implement dispose
///
AppRouteObserver().routeObserver.unsubscribe(this);
super.dispose();
@ -131,7 +128,9 @@ class _ResetButtonPageState extends State<ResetButtonPage> with RouteAware {
void didPop() {
super.didPop();
logic.cancelBlueConnetctToastTimer();
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
if (EasyLoading.isShow) {
EasyLoading.dismiss(animation: true);
}
state.ifCurrentScreen.value = false;
state.sureBtnState.value = 0;
}
@ -148,7 +147,9 @@ class _ResetButtonPageState extends State<ResetButtonPage> with RouteAware {
void didPushNext() {
super.didPushNext();
logic.cancelBlueConnetctToastTimer();
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
if (EasyLoading.isShow) {
EasyLoading.dismiss(animation: true);
}
state.ifCurrentScreen.value = false;
state.sureBtnState.value = 0;
}

View File

@ -20,7 +20,6 @@ class DemoModeLockSetPage extends StatefulWidget {
class _DemoModeLockSetPageState extends State<DemoModeLockSetPage> {
@override
void initState() {
// TODO: implement initState
super.initState();
}
@ -131,8 +130,7 @@ class _DemoModeLockSetPageState extends State<DemoModeLockSetPage> {
SizedBox(height: 10.h),
//
CommonItem(
leftTitel:
TranslationLoader.lanKeys!.normallyOpenMode!.tr,
leftTitel:'常开模式'.tr,
rightTitle: TranslationLoader.lanKeys!.closed!.tr,
isHaveLine: true,
isHaveDirection: true,

View File

@ -177,7 +177,7 @@ class _AddAuthorizedAdministratorPageState
return Column(
children: [
CommonItem(
leftTitel: TranslationLoader.lanKeys!.accountNumber!.tr,
leftTitel: '账号'.tr,
rightTitle: '',
isHaveLine: true,
isHaveRightWidget: true,
@ -402,7 +402,7 @@ class _AddAuthorizedAdministratorPageState
context, Routers.volumeAuthorizationLockManagePage);
},
child: Text(
TranslationLoader.lanKeys!.volumeAuthorizationLock!.tr,
'批量授权锁'.tr,
style: TextStyle(
color: AppColors.mainColor,
fontWeight: FontWeight.w500),

View File

@ -1,3 +1,4 @@
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -34,9 +35,9 @@ class _HideInvalidUnlockPermissionsPageState
@override
Widget build(BuildContext context) {
if (_isFirst) {
dynamic obj = ModalRoute.of(context)?.settings.arguments;
if (obj != null && (obj["isOn"] != null)) {
int getValue = obj["isOn"];
final dynamic obj = ModalRoute.of(context)?.settings.arguments;
if (obj != null && (obj['isOn'] != null)) {
final int getValue = obj['isOn'];
if (getValue == 1) {
_isOn = true;
} else {
@ -76,7 +77,7 @@ class _HideInvalidUnlockPermissionsPageState
children: [
Expanded(
child: Text(
"${TranslationLoader.lanKeys!.currentMode!.tr} : ${_isOn == true ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr}",
'${"当前模式".tr} : ${_isOn == true ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr}',
style:
TextStyle(fontWeight: FontWeight.w600, fontSize: 22.sp),
)),
@ -107,10 +108,10 @@ class _HideInvalidUnlockPermissionsPageState
/// 1: 2:
Future<void> changeSettingsRequest() async {
ExpireLockListEntity entity =
final ExpireLockListEntity entity =
await ApiRepository.to.changeSettings(_isOn == true ? '1' : '2', '2');
if (entity.errorCode!.codeIsSuccessful) {
EasyLoading.showToast("操作成功",duration: 2000.milliseconds);
EasyLoading.showToast('操作成功',duration: 2000.milliseconds);
}
}
}

View File

@ -32,9 +32,9 @@ class _LockScreenPageState extends State<LockScreenPage> {
@override
Widget build(BuildContext context) {
if (_isFirst) {
dynamic obj = ModalRoute.of(context)?.settings.arguments;
if (obj != null && (obj["isOn"] != null)) {
int getValue = obj["isOn"];
final dynamic obj = ModalRoute.of(context)?.settings.arguments;
if (obj != null && (obj['isOn'] != null)) {
final int getValue = obj['isOn'];
if (getValue == 1) {
_isOn = true;
} else {
@ -80,7 +80,7 @@ class _LockScreenPageState extends State<LockScreenPage> {
children: [
Expanded(
child: Text(
"${TranslationLoader.lanKeys!.currentMode!.tr} : ${_isOn == true ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr}",
'${"当前模式".tr} : ${_isOn == true ? TranslationLoader.lanKeys!.opened!.tr : TranslationLoader.lanKeys!.closed!.tr}',
style:
TextStyle(fontWeight: FontWeight.w600, fontSize: 22.sp),
)),
@ -107,7 +107,7 @@ class _LockScreenPageState extends State<LockScreenPage> {
/// 1: 2:
Future<void> changeSettingsRequest() async {
ExpireLockListEntity entity =
final ExpireLockListEntity entity =
await ApiRepository.to.changeSettings(_isOn == true ? '1' : '2', '1');
if (entity.errorCode!.codeIsSuccessful) {
EasyLoading.showToast('操作成功',duration: 2000.milliseconds);

View File

@ -244,8 +244,7 @@ class _ExpireKeyChangeValidityDatePageState extends State<ExpireKeyChangeValidit
child: Column(
children: <Widget>[
Obx(() => CommonItem(
leftTitel:
"${TranslationLoader.lanKeys!.begin!.tr}${TranslationLoader.lanKeys!.time!.tr}",
leftTitel: '开始时间'.tr,
rightTitle: state.starTime.value,
isHaveDirection: true,
isHaveLine: true,
@ -261,8 +260,7 @@ class _ExpireKeyChangeValidityDatePageState extends State<ExpireKeyChangeValidit
});
})),
Obx(() => CommonItem(
leftTitel:
"${TranslationLoader.lanKeys!.end!.tr}${TranslationLoader.lanKeys!.time!.tr}",
leftTitel:'结束时间'.tr,
rightTitle: state.endTime.value,
isHaveDirection: true,
action: () {

View File

@ -80,20 +80,20 @@ class LanKeyEntity {
// this.cancel,
// this.add,
this.accountNumber,
this.volumeAuthorizationLock,
this.authorizedAdminTip,
this.lockOperatingRecordTip,
this.rankingList,
this.earlyArrivalList,
this.lateList,
this.hardWorkingList,
// this.accountNumber,
// this.volumeAuthorizationLock,
// this.authorizedAdminTip,
// this.lockOperatingRecordTip,
// this.rankingList,
// this.earlyArrivalList,
// this.lateList,
// this.hardWorkingList,
this.basicInformation,
this.wirelessKeyboard,
this.doorMagnetic,
this.remoteUnlocking,
this.automaticBlocking,
this.normallyOpenMode,
// this.normallyOpenMode,
this.automaticUnLock,
this.automaticUnLockTip,
this.lockSound,
@ -126,12 +126,12 @@ class LanKeyEntity {
this.nearbyEquipment,
this.noData,
this.doorMagneticListTopTip,
this.remoteUnlockingPageTip,
this.currentMode,
this.delayTime,
this.automaticBlockingTip,
this.time,
this.normallyOpen,
// this.remoteUnlockingPageTip,
// this.currentMode,
// this.delayTime,
// this.automaticBlockingTip,
// this.time,
// this.normallyOpen,
this.date,
this.begin,
this.end,
@ -540,16 +540,16 @@ class LanKeyEntity {
// sure = json['sure'];
// cancel = json['cancel'];
// add = json['add'];
accountNumber = json['accountNumber'];
volumeAuthorizationLock = json['volumeAuthorizationLock'];
authorizedAdminTip = json['authorizedAdminTip'];
lockOperatingRecordTip = json['lockOperatingRecordTip'];
remoteUnlockingPageTip = json['remoteUnlockingPageTip'];
currentMode = json['currentMode'];
delayTime = json['delayTime'];
automaticBlockingTip = json['automaticBlockingTip'];
time = json['time'];
normallyOpen = json['normallyOpen'];
// accountNumber = json['accountNumber'];
// volumeAuthorizationLock = json['volumeAuthorizationLock'];
// authorizedAdminTip = json['authorizedAdminTip'];
// lockOperatingRecordTip = json['lockOperatingRecordTip'];
// remoteUnlockingPageTip = json['remoteUnlockingPageTip'];
// currentMode = json['currentMode'];
// delayTime = json['delayTime'];
// automaticBlockingTip = json['automaticBlockingTip'];
// time = json['time'];
// normallyOpen = json['normallyOpen'];
date = json['date'];
begin = json['begin'];
end = json['end'];
@ -584,7 +584,7 @@ class LanKeyEntity {
doorMagnetic = json['doorMagnetic'];
remoteUnlocking = json['remoteUnlocking'];
automaticBlocking = json['automaticBlocking'];
normallyOpenMode = json['normallyOpenMode'];
// normallyOpenMode = json['normallyOpenMode'];
automaticUnLock = json['automaticUnLock'];
automaticUnLockTip = json['automaticUnLockTip'];
lockSound = json['lockSound'];
@ -619,10 +619,10 @@ class LanKeyEntity {
nearbyEquipment = json['nearbyEquipment'];
noData = json['noData'];
doorMagneticListTopTip = json['doorMagneticListTopTip'];
rankingList = json['rankingList'];
earlyArrivalList = json['earlyArrivalList'];
lateList = json['lateList'];
hardWorkingList = json['hardWorkingList'];
// rankingList = json['rankingList'];
// earlyArrivalList = json['earlyArrivalList'];
// lateList = json['lateList'];
// hardWorkingList = json['hardWorkingList'];
company = json['company'];
staff = json['staff'];
work = json['work'];
@ -1049,16 +1049,16 @@ class LanKeyEntity {
// String? sure;
// String? cancel;
// String? add;
String? accountNumber;
String? volumeAuthorizationLock;
String? authorizedAdminTip;
String? lockOperatingRecordTip;
String? remoteUnlockingPageTip;
String? currentMode;
String? delayTime;
String? automaticBlockingTip;
String? time;
String? normallyOpen;
// String? accountNumber;
// String? volumeAuthorizationLock;
// String? authorizedAdminTip;
// String? lockOperatingRecordTip;
// String? remoteUnlockingPageTip;
// String? currentMode;
// String? delayTime;
// String? automaticBlockingTip;
// String? time;
// String? normallyOpen;
String? date;
String? begin;
String? end;
@ -1087,10 +1087,10 @@ class LanKeyEntity {
String? upgrade;
String? leisure;
String? checkedIn;
String? rankingList;
String? earlyArrivalList;
String? lateList;
String? hardWorkingList;
// String? rankingList;
// String? earlyArrivalList;
// String? lateList;
// String? hardWorkingList;
String? company;
String? staff;
String? work;
@ -1129,7 +1129,7 @@ class LanKeyEntity {
String? doorMagnetic;
String? remoteUnlocking;
String? automaticBlocking;
String? normallyOpenMode;
// String? normallyOpenMode;
String? automaticUnLock;
String? automaticUnLockTip;
String? lockSound;
@ -1547,16 +1547,17 @@ class LanKeyEntity {
// map['sure'] = sure;
// map['cancel'] = cancel;
// map['add'] = add;
map['accountNumber'] = accountNumber;
map['volumeAuthorizationLock'] = volumeAuthorizationLock;
map['authorizedAdminTip'] = authorizedAdminTip;
map['lockOperatingRecordTip'] = lockOperatingRecordTip;
map['remoteUnlockingPageTip'] = remoteUnlockingPageTip;
map['currentMode'] = currentMode;
map['delayTime'] = delayTime;
map['automaticBlockingTip'] = automaticBlockingTip;
map['time'] = time;
map['normallyOpen'] = normallyOpen;
// map['accountNumber'] = accountNumber;
// map['volumeAuthorizationLock'] = volumeAuthorizationLock;
// map['authorizedAdminTip'] = authorizedAdminTip;
// map['lockOperatingRecordTip'] = lockOperatingRecordTip;
// map['remoteUnlockingPageTip'] = remoteUnlockingPageTip;
// map['currentMode'] = currentMode;
// map['delayTime'] = delayTime;
// map['automaticBlockingTip'] = automaticBlockingTip;
// map['time'] = time;
// map['normallyOpen'] = normallyOpen;
map['date'] = date;
map['begin'] = begin;
map['end'] = end;
@ -1585,17 +1586,17 @@ class LanKeyEntity {
map['upgrade'] = upgrade;
map['leisure'] = leisure;
map['checkedIn'] = checkedIn;
map['rankingList'] = rankingList;
map['earlyArrivalList'] = earlyArrivalList;
map['lateList'] = lateList;
map['hardWorkingList'] = hardWorkingList;
// map['rankingList'] = rankingList;
// map['earlyArrivalList'] = earlyArrivalList;
// map['lateList'] = lateList;
// map['hardWorkingList'] = hardWorkingList;
map['basicInformation'] = basicInformation;
map['wirelessKeyboard'] = wirelessKeyboard;
map['doorMagnetic'] = doorMagnetic;
map['remoteUnlocking'] = remoteUnlocking;
map['automaticBlocking'] = automaticBlocking;
map['normallyOpenMode'] = normallyOpenMode;
// map['normallyOpenMode'] = normallyOpenMode;
map['automaticUnLock'] = automaticUnLock;
map['automaticUnLockTip'] = automaticUnLockTip;
map['lockSound'] = lockSound;