国际化统一到cancel
This commit is contained in:
parent
f5b79303a8
commit
0de849f4cf
126
lan/lan_en.json
126
lan/lan_en.json
@ -11,72 +11,53 @@
|
||||
"指纹号": "Fingerprint Number",
|
||||
"遥控": "Remote Control",
|
||||
"添加人脸": "添加人脸",
|
||||
"门锁日志": "Door lock log",
|
||||
"密码号": "Password Number",
|
||||
"添加者": "Adder",
|
||||
"添加时间": "Add Time",
|
||||
"重置": "Reset",
|
||||
"请输入手机号或者邮箱": "Please enter the number or email",
|
||||
"工作时间": "Working Time",
|
||||
"工作日设置": "Workday Settings",
|
||||
"星期一": "Monday",
|
||||
"星期二": "Tuesday",
|
||||
"星期三": "Wednesday",
|
||||
"星期四": "Thursday",
|
||||
"星期五": "Friday",
|
||||
"星期六": "Saturday",
|
||||
"星期日": "Sunday",
|
||||
|
||||
"简写周一": "M",
|
||||
"简写周二": "T",
|
||||
"简写周三": "W",
|
||||
"简写周四": "T",
|
||||
"简写周五": "F",
|
||||
"简写周六": "S",
|
||||
"简写周日": "S",
|
||||
|
||||
"周一": "Mon",
|
||||
"周二": "Tue",
|
||||
"周三": "Wed",
|
||||
"周四": "Thu",
|
||||
"周五": "Fri",
|
||||
"周六": "Sat",
|
||||
"周日": "Sun",
|
||||
|
||||
"群发钥匙": "Send Group Key",
|
||||
"锁": "Lock",
|
||||
"请添加": "Please Add",
|
||||
"允许远程开锁": "Remote Unlocking Allowed",
|
||||
"请输入验证码": "Please enter the verification code",
|
||||
"获取密码": "Get Password",
|
||||
"请给密码命名": "Please Name Your Password",
|
||||
"密码有限期为6个小时,只能使用一次": "The password is valid for 6 hours and can only be used once",
|
||||
"手动输入6-9位数字作为密码。可在锁旁边通过手机蓝牙添加,也可以通过网关远程添加": "Manually enter 6-9 digits as the password. Can be added by phone Bluetooth next to the lock, or remotely added through the gateway",
|
||||
"获取": "Get",
|
||||
"添加": "Add",
|
||||
"删除公司": "Delete Company",
|
||||
"密码详情": "Password Detail",
|
||||
"修改密码": "Modify Password",
|
||||
|
||||
"doorLockLog": "Door lock log",
|
||||
"number": "Number",
|
||||
"additive": "Additive",
|
||||
"addTime": "Add Time",
|
||||
"reset": "Reset",
|
||||
"sendKey": "SendKey",
|
||||
"timeLimit": "TimeLimit",
|
||||
"permanent": "Permanent",
|
||||
"once": "Once",
|
||||
"circulation": "Circulation",
|
||||
"receiver": "Receiver",
|
||||
"pleaseEnterNumberOrEmail": "Please enter the number or email",
|
||||
"name": "Name",
|
||||
"enterYourName": "Please Enter Your Name",
|
||||
"effectiveTime": "Effective Time",
|
||||
"failureTime": "Failure Time",
|
||||
"effectiveDate": "Effective Date",
|
||||
"failureDate": "Failure Date",
|
||||
"monday": "Monday",
|
||||
"tuesday": "Tuesday",
|
||||
"wednesday": "Wednesday",
|
||||
"thursday": "Thursday",
|
||||
"friday": "Friday",
|
||||
"saturday": "Saturday",
|
||||
"sunday": "Sunday",
|
||||
"mondayShort": "M",
|
||||
"tuesdayShort": "T",
|
||||
"wednesdayShort": "W",
|
||||
"thursdayShort": "T",
|
||||
"fridayShort": "F",
|
||||
"saturdayShort": "S",
|
||||
"sundayShort": "S",
|
||||
"realNameAuthentication": "RealNameAuthentication",
|
||||
"sendKeyBottomTip": "The recipient can use it unlimited times during the validity period",
|
||||
"send": "Send",
|
||||
"periodValidity": "PeriodValidity",
|
||||
"sendGroupKey": "Send Group Key",
|
||||
"lock": "Lock",
|
||||
"pleaseAdd": "Please Add",
|
||||
"pleaseSelect": "Please Select",
|
||||
"remoteUnlockingAllowed": "Remote Unlocking Allowed",
|
||||
"pleaseEnter": "Please Enter",
|
||||
"getPassword": "Get Password",
|
||||
"custom": "Custom",
|
||||
"clearAll": "ClearAll",
|
||||
"recursiveDevice": "Recursive Device",
|
||||
"pleaseNameYourPassword": "Please Name Your Password",
|
||||
"pleaseEnterDigitsNumber": "pleaseEnter6",
|
||||
"getPasswordTip1": "The password must be used at least once in the last 24 hours, otherwise it is invalid\n",
|
||||
"getPasswordTip2": "The password can be used for an unlimited number of times in the next period. The password must be used at least once within 24 hours after it takes effect, otherwise it will be invalid\n",
|
||||
"getPasswordTip3": "The password is valid for 6 hours and can only be used once\n",
|
||||
"getPasswordTip4": "It can be added next to the lock via Bluetooth on the phone or remotely via the gateway\n",
|
||||
"getPasswordTip5": "The password must be used at least once within the first 24 hours, otherwise it will be invalid\n",
|
||||
"getPasswordTip6": "The password is valid for 24 hours. Entering it on the lock invalidates all previously used passwords\n",
|
||||
"getTip": "Get",
|
||||
"addTip": "Add",
|
||||
"sender": "Sender",
|
||||
"senderTime": "Sender Time",
|
||||
"keyDetail": "Key Detail",
|
||||
"detail": "Detail",
|
||||
"delete": "Delete",
|
||||
"passwordDetail": "Password Detail",
|
||||
"share": "Share",
|
||||
"amend": "Amend",
|
||||
"sure": "Sure",
|
||||
"cancel": "Cancel",
|
||||
"add": "Add",
|
||||
"accountNumber": "AccountNumber",
|
||||
@ -517,13 +498,7 @@
|
||||
"工作日": "Workday",
|
||||
"每日": "Daily",
|
||||
"周末": "Weekend",
|
||||
"周一": "Monday",
|
||||
"周二": "Tuesday",
|
||||
"周三": "Wednesday",
|
||||
"周四": "Thursday",
|
||||
"周五": "Friday",
|
||||
"周六": "Saturday",
|
||||
"周日": "Sunday",
|
||||
|
||||
"确定要删除吗?": "Are you sure you want to delete?",
|
||||
"该锁的密码都将被删除": "The password of the lock will be deleted",
|
||||
"已过期": "Expired",
|
||||
@ -859,13 +834,6 @@
|
||||
"请选择有效日": "Please select the effective day",
|
||||
"公司名字长度不能小于 6 ": "The length of the company name cannot be less than 6",
|
||||
"已是最新版本": "It is the latest version",
|
||||
"一": "Mon",
|
||||
"二": "Tue",
|
||||
"三": "Wed",
|
||||
"四": "Thu",
|
||||
"五": "Fri",
|
||||
"六": "Sat",
|
||||
"日": "Sun",
|
||||
|
||||
"新建短信模版":"New SMS template",
|
||||
"新建邮件模版":"New email template",
|
||||
|
||||
@ -11,74 +11,53 @@
|
||||
"指纹号": "指纹号",
|
||||
"遥控": "遥控",
|
||||
"添加人脸": "添加人脸",
|
||||
"门锁日志":"门锁日志",
|
||||
"密码号": "密码号",
|
||||
"添加者":"添加者",
|
||||
"添加时间":"添加时间",
|
||||
"重置":"重置",
|
||||
"请输入手机号或者邮箱":"请输入手机号或者邮箱",
|
||||
"工作时间": "工作时间",
|
||||
"工作日设置": "工作日设置",
|
||||
"星期一": "星期一",
|
||||
"星期二": "星期二",
|
||||
"星期三": "星期三",
|
||||
"星期四": "星期四",
|
||||
"星期五": "星期五",
|
||||
"星期六": "星期六",
|
||||
"星期日": "星期日",
|
||||
|
||||
"doorLockLog":"doorLockLog",
|
||||
"number":"number",
|
||||
"additive":"additive",
|
||||
"addTime":"addTime",
|
||||
"简写周一": "简写周一",
|
||||
"简写周二": "简写周二",
|
||||
"简写周三": "简写周三",
|
||||
"简写周四": "简写周四",
|
||||
"简写周五": "简写周五",
|
||||
"简写周六": "简写周六",
|
||||
"简写周日": "简写周日",
|
||||
|
||||
"reset":"reset",
|
||||
"sendKey":"sendKey",
|
||||
"timeLimit":"timeLimit",
|
||||
"permanent":"permanent",
|
||||
"once":"once",
|
||||
"circulation":"circulation",
|
||||
"receiver":"receiver",
|
||||
"pleaseEnterNumberOrEmail":"pleaseEnterNumberOrEmail",
|
||||
"name":"name",
|
||||
"enterYourName":"enterYourName",
|
||||
"effectiveTime":"effectiveTime",
|
||||
"failureTime":"failureTime",
|
||||
"effectiveDate":"effectiveDate",
|
||||
"failureDate":"failureDate",
|
||||
"monday":"monday",
|
||||
"tuesday":"tuesday",
|
||||
"wednesday":"wednesday",
|
||||
"thursday":"thursday",
|
||||
"friday":"friday",
|
||||
"saturday":"saturday",
|
||||
"sunday":"sunday",
|
||||
"mondayShort":"mondayShort",
|
||||
"tuesdayShort":"tuesdayShort",
|
||||
"wednesdayShort":"wednesdayShort",
|
||||
"thursdayShort":"thursdayShort",
|
||||
"fridayShort":"fridayShort",
|
||||
"saturdayShort":"saturdayShort",
|
||||
"sundayShort":"sundayShort",
|
||||
"周一": "周一",
|
||||
"周二": "周二",
|
||||
"周三": "周三",
|
||||
"周四": "周四",
|
||||
"周五": "周五",
|
||||
"周六": "周六",
|
||||
"周日": "周日",
|
||||
|
||||
"群发钥匙":"群发钥匙",
|
||||
"锁": "锁",
|
||||
"请添加":"请添加",
|
||||
"允许远程开锁":"允许远程开锁",
|
||||
"请输入验证码": "请输入验证码",
|
||||
"获取密码": "获取密码",
|
||||
"请给密码命名":"请给密码命名",
|
||||
"密码有限期为6个小时,只能使用一次":"密码有限期为6个小时,只能使用一次",
|
||||
"手动输入6-9位数字作为密码。可在锁旁边通过手机蓝牙添加,也可以通过网关远程添加":"手动输入6-9位数字作为密码。可在锁旁边通过手机蓝牙添加,也可以通过网关远程添加",
|
||||
"获取": "获取",
|
||||
"添加":"添加",
|
||||
"删除公司": "删除公司",
|
||||
"密码详情": "密码详情",
|
||||
"修改密码": "修改密码",
|
||||
|
||||
"realNameAuthentication":"realNameAuthentication",
|
||||
"sendKeyBottomTip":"sendKeyBottomTip",
|
||||
"send":"send",
|
||||
"periodValidity":"periodValidity",
|
||||
"sendGroupKey":"sendGroupKey",
|
||||
"lock":"lock",
|
||||
"pleaseAdd":"pleaseAdd",
|
||||
"pleaseSelect":"pleaseSelect",
|
||||
"remoteUnlockingAllowed":"remoteUnlockingAllowed",
|
||||
"pleaseEnter":"pleaseEnter",
|
||||
"getPassword":"getPassword",
|
||||
"custom":"custom",
|
||||
"clearAll":"clearAll",
|
||||
"recursiveDevice":"recursiveDevice",
|
||||
"pleaseNameYourPassword":"pleaseNameYourPassword",
|
||||
"pleaseEnterDigitsNumber":"pleaseEnter6",
|
||||
"getPasswordTip1":"getPasswordTip1",
|
||||
"getPasswordTip2":"getPasswordTip2",
|
||||
"getPasswordTip3":"getPasswordTip3",
|
||||
"getPasswordTip4":"getPasswordTip4",
|
||||
"getPasswordTip5":"getPasswordTip5",
|
||||
"getPasswordTip6":"getPasswordTip6",
|
||||
"getTip":"getTip",
|
||||
"addTip":"addTip",
|
||||
"sender":"sender",
|
||||
"senderTime":"senderTime",
|
||||
"keyDetail":"keyDetail",
|
||||
"detail":"detail",
|
||||
"delete":"delete",
|
||||
"passwordDetail":"passwordDetail",
|
||||
"share":"share",
|
||||
"amend":"amend",
|
||||
"sure":"sure",
|
||||
"cancel":"cancel",
|
||||
"add":"add",
|
||||
"accountNumber":"accountNumber",
|
||||
@ -542,13 +521,6 @@
|
||||
"工作日": "工作日",
|
||||
"每日": "每日",
|
||||
"周末": "周末",
|
||||
"周一": "周一",
|
||||
"周二": "周二",
|
||||
"周三": "周三",
|
||||
"周四": "周四",
|
||||
"周五": "周五",
|
||||
"周六": "周六",
|
||||
"周日": "周日",
|
||||
"确定要删除吗?": "确定要删除吗?",
|
||||
"该锁的密码都将被删除": "该锁的密码都将被删除",
|
||||
"已过期": "已过期",
|
||||
|
||||
126
lan/lan_zh.json
126
lan/lan_zh.json
@ -11,72 +11,53 @@
|
||||
"指纹号": "指纹号",
|
||||
"遥控": "遥控",
|
||||
"添加人脸": "添加人脸",
|
||||
"门锁日志": "门锁日志",
|
||||
"密码号": "密码号",
|
||||
"添加者": "添加者",
|
||||
"添加时间": "添加时间",
|
||||
"重置": "重置",
|
||||
"请输入手机号或者邮箱": "请输入手机号或者邮箱",
|
||||
"工作时间": "工作时间",
|
||||
"工作日设置": "工作日设置",
|
||||
"星期一": "星期一",
|
||||
"星期二": "星期二",
|
||||
"星期三": "星期三",
|
||||
"星期四": "星期四",
|
||||
"星期五": "星期五",
|
||||
"星期六": "星期六",
|
||||
"星期日": "星期日",
|
||||
|
||||
"简写周一": "一",
|
||||
"简写周二": "二",
|
||||
"简写周三": "三",
|
||||
"简写周四": "四",
|
||||
"简写周五": "五",
|
||||
"简写周六": "六",
|
||||
"简写周日": "日",
|
||||
|
||||
"周一": "周一",
|
||||
"周二": "周二",
|
||||
"周三": "周三",
|
||||
"周四": "周四",
|
||||
"周五": "周五",
|
||||
"周六": "周六",
|
||||
"周日": "周日",
|
||||
|
||||
"群发钥匙": "群发钥匙",
|
||||
"锁": "锁",
|
||||
"请添加": "请添加",
|
||||
"允许远程开锁": "允许远程开锁",
|
||||
"请输入验证码": "请输入验证码",
|
||||
"获取密码": "获取密码",
|
||||
"请给密码命名": "请给密码命名",
|
||||
"密码有限期为6个小时,只能使用一次": "密码有限期为6个小时,只能使用一次",
|
||||
"手动输入6-9位数字作为密码。可在锁旁边通过手机蓝牙添加,也可以通过网关远程添加": "手动输入6-9位数字作为密码。可在锁旁边通过手机蓝牙添加,也可以通过网关远程添加",
|
||||
"获取": "获取",
|
||||
"添加": "添加",
|
||||
"删除公司": "删除公司",
|
||||
"密码详情": "密码详情",
|
||||
"修改密码": "修改密码",
|
||||
|
||||
"doorLockLog": "门锁日志",
|
||||
"number": "号",
|
||||
"additive": "添加者",
|
||||
"addTime": "添加时间",
|
||||
"reset": "重置",
|
||||
"sendKey": "发送钥匙",
|
||||
"timeLimit": "限时",
|
||||
"permanent": "永久",
|
||||
"once": "单次",
|
||||
"circulation": "循环",
|
||||
"receiver": "接收者",
|
||||
"pleaseEnterNumberOrEmail": "请输入手机号或者邮箱",
|
||||
"name": "姓名",
|
||||
"enterYourName": "请输入姓名",
|
||||
"effectiveTime": "生效时间",
|
||||
"failureTime": "失效时间",
|
||||
"effectiveDate": "生效日期",
|
||||
"failureDate": "失效日期",
|
||||
"monday": "星期一",
|
||||
"tuesday": "星期二",
|
||||
"wednesday": "星期三",
|
||||
"thursday": "星期四",
|
||||
"friday": "星期五",
|
||||
"saturday": "星期六",
|
||||
"sunday": "星期日",
|
||||
"mondayShort": "一",
|
||||
"tuesdayShort": "二",
|
||||
"wednesdayShort": "三",
|
||||
"thursdayShort": "四",
|
||||
"fridayShort": "五",
|
||||
"saturdayShort": "六",
|
||||
"sundayShort": "日",
|
||||
"realNameAuthentication": "实名认证",
|
||||
"sendKeyBottomTip": "接收者在有效期内可以不限次数使用",
|
||||
"send": "发送",
|
||||
"periodValidity": "有效期",
|
||||
"sendGroupKey": "群发钥匙",
|
||||
"lock": "锁",
|
||||
"pleaseAdd": "请添加",
|
||||
"pleaseSelect": "请选择",
|
||||
"remoteUnlockingAllowed": "允许远程开锁",
|
||||
"pleaseEnter": "请输入",
|
||||
"getPassword": "获取密码",
|
||||
"custom": "自定义",
|
||||
"clearAll": "清空",
|
||||
"recursiveDevice": "循环方式",
|
||||
"pleaseNameYourPassword": "请给密码命名",
|
||||
"pleaseEnterDigitsNumber": "请输入6-9位数字",
|
||||
"getPasswordTip1": "密码在24小时内至少要使用过一次,否则将无效",
|
||||
"getPasswordTip2": "限时密码可以在有效期内不限次数使用 \n密码在生效后的24小时内至少要使用过一次,否则将失效",
|
||||
"getPasswordTip3": "密码有限期为6个小时,只能使用一次",
|
||||
"getPasswordTip4": "手动输入6-9位数字作为密码。可在锁旁边通过手机蓝牙添加,也可以通过网关远程添加",
|
||||
"getPasswordTip5": "限时密码可以再有下期内不限次数使用 \n密码在生效后的24小时内至少要使用过一次,否则将失效",
|
||||
"getPasswordTip6": "密码有效期为24小时,在锁上输入后,将使之前使用过的密码都失效",
|
||||
"getTip": "获取",
|
||||
"addTip": "添加",
|
||||
"sender": "发送人",
|
||||
"senderTime": "发送时间",
|
||||
"keyDetail": "钥匙详情",
|
||||
"detail": "详情",
|
||||
"delete": "删除",
|
||||
"passwordDetail": "密码详情",
|
||||
"share": "分享",
|
||||
"amend": "修改",
|
||||
"sure": "确定",
|
||||
"cancel": "取消",
|
||||
"add": "添加",
|
||||
"accountNumber": "账号",
|
||||
@ -515,13 +496,6 @@
|
||||
"工作日": "工作日",
|
||||
"每日": "每日",
|
||||
"周末": "周末",
|
||||
"周一": "周一",
|
||||
"周二": "周二",
|
||||
"周三": "周三",
|
||||
"周四": "周四",
|
||||
"周五": "周五",
|
||||
"周六": "周六",
|
||||
"周日": "周日",
|
||||
"确定要删除吗?": "确定要删除吗?",
|
||||
"该锁的密码都将被删除": "该锁的密码都将被删除",
|
||||
"已过期": "已过期",
|
||||
@ -857,13 +831,7 @@
|
||||
"请选择有效日": "请选择有效日",
|
||||
"公司名字长度不能小于 6 ": "公司名字长度不能小于 6 ",
|
||||
"已是最新版本": "已是最新版本",
|
||||
"一": "一",
|
||||
"二": "二",
|
||||
"三": "三",
|
||||
"四": "四",
|
||||
"五": "五",
|
||||
"六": "六",
|
||||
"日": "日",
|
||||
|
||||
"无考勤记录": "无考勤记录",
|
||||
"大家干劲十足": "大家干劲十足",
|
||||
"工作时长未出炉": "工作时长未出炉",
|
||||
|
||||
@ -105,8 +105,7 @@ class _StarLockForgetPasswordPageState
|
||||
height: 36.w,
|
||||
),
|
||||
),
|
||||
hintText:
|
||||
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||
hintText:'请输入手机号或者邮箱'.tr,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(30),
|
||||
@ -177,7 +176,7 @@ class _StarLockForgetPasswordPageState
|
||||
height: 30.w,
|
||||
),
|
||||
),
|
||||
hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}",
|
||||
hintText: '请输入验证码'.tr,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
|
||||
@ -88,7 +88,7 @@ class _StarLockForgetPasswordPageState
|
||||
leftWidget: Padding(
|
||||
padding: EdgeInsets.only(top: 30.w, bottom: 20.w, left: 5.w),
|
||||
),
|
||||
label: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||
label: '请输入手机号或者邮箱'.tr,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(30),
|
||||
@ -137,7 +137,7 @@ class _StarLockForgetPasswordPageState
|
||||
},
|
||||
leftWidget: SizedBox(),
|
||||
hintText:
|
||||
'${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}',
|
||||
'请输入验证码'.tr,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
|
||||
@ -120,8 +120,7 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
||||
height: 36.w,
|
||||
),
|
||||
),
|
||||
hintText:
|
||||
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||
hintText:'请输入手机号或者邮箱'.tr,
|
||||
// keyboardType: TextInputType.number,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
// FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||
|
||||
@ -126,8 +126,7 @@ class _StarLockLoginPageState extends State<StarLockLoginXHJPage> {
|
||||
icon: const Icon(Icons.close),
|
||||
onPressed: () {},
|
||||
),
|
||||
label: TranslationLoader
|
||||
.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||
label: '请输入手机号或者邮箱'.tr,
|
||||
// keyboardType: TextInputType.number,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(30),
|
||||
|
||||
@ -216,7 +216,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
||||
),
|
||||
),
|
||||
hintText:
|
||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${state.isIphoneType.value ? "手机号".tr : TranslationLoader.lanKeys!.email!.tr}",
|
||||
"${"请输入".tr}${state.isIphoneType.value ? "手机号".tr : TranslationLoader.lanKeys!.email!.tr}",
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
// FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||
@ -285,7 +285,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
||||
),
|
||||
),
|
||||
hintText:
|
||||
'${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}',
|
||||
'请输入验证码'.tr,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
|
||||
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/login/register/starLock_register_state.dart';
|
||||
|
||||
import '../../appRouters.dart';
|
||||
import '../../app_settings/app_colors.dart';
|
||||
@ -21,8 +22,8 @@ class StarLockRegisterXHJPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
final logic = Get.put(StarLockRegisterLogic());
|
||||
final state = Get.find<StarLockRegisterLogic>().state;
|
||||
final StarLockRegisterLogic logic = Get.put(StarLockRegisterLogic());
|
||||
final StarLockRegisterState state = Get.find<StarLockRegisterLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -37,7 +38,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
backgroundColor: Colors.white),
|
||||
body: ListView(
|
||||
padding: EdgeInsets.only(left: 40.w, right: 40.w),
|
||||
children: [
|
||||
children: <Widget>[
|
||||
topSelectCountryAndRegionWidget(),
|
||||
middleTFWidget(),
|
||||
_buildBottomAgreement(),
|
||||
@ -69,7 +70,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
|
||||
Widget topSelectCountryAndRegionWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Container(
|
||||
height: 80.h,
|
||||
child: DefaultTabController(
|
||||
@ -78,12 +79,12 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
onTap: (int index) {
|
||||
state.isIphoneType.value = index == 0;
|
||||
},
|
||||
overlayColor: MaterialStateProperty.resolveWith((states) {
|
||||
overlayColor: MaterialStateProperty.resolveWith((Set<MaterialState> states) {
|
||||
return Colors.transparent;
|
||||
}),
|
||||
dividerHeight: 0,
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
tabs: [
|
||||
tabs: <Widget>[
|
||||
Text(TranslationLoader.lanKeys!.iphone!.tr),
|
||||
Text(TranslationLoader.lanKeys!.email!.tr)
|
||||
],
|
||||
@ -113,7 +114,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
color: Colors.white,
|
||||
height: 70.h,
|
||||
child: Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
SizedBox(width: 5.w),
|
||||
Text(TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
||||
style: TextStyle(
|
||||
@ -136,7 +137,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
|
||||
Widget middleTFWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Obx(() => LoginInput(
|
||||
controller: state.phoneOrEmailController,
|
||||
onchangeAction: (v) {
|
||||
@ -144,9 +145,9 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
},
|
||||
leftWidget: SizedBox(),
|
||||
label:
|
||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${state.isIphoneType.value ? "手机号".tr : TranslationLoader.lanKeys!.email!.tr}",
|
||||
"${'请输入'.tr}${state.isIphoneType.value ? "手机号".tr : TranslationLoader.lanKeys!.email!.tr}",
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(30),
|
||||
])),
|
||||
LoginInput(
|
||||
@ -157,7 +158,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
isPwd: true,
|
||||
leftWidget: SizedBox(),
|
||||
label: '请输入密码'.tr,
|
||||
inputFormatters: [
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
Text(
|
||||
@ -173,11 +174,11 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
isPwd: true,
|
||||
leftWidget: SizedBox(),
|
||||
label: '确认密码'.tr,
|
||||
inputFormatters: [
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: LoginInput(
|
||||
controller: state.codeController,
|
||||
@ -185,8 +186,8 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
logic.checkNext(state.codeController);
|
||||
},
|
||||
leftWidget: SizedBox(),
|
||||
label: "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}",
|
||||
inputFormatters: [
|
||||
label: '请输入验证码'.tr,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
),
|
||||
@ -201,7 +202,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
}
|
||||
final result = await Get.toNamed(
|
||||
Routers.safetyVerificationPage,
|
||||
arguments: {
|
||||
arguments: <String, Object>{
|
||||
'countryCode': state.countryCode,
|
||||
'account': state.phoneOrEmailStr.value
|
||||
});
|
||||
@ -243,7 +244,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
padding: EdgeInsets.symmetric(vertical: 16.h),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Obx(() => Image.asset(
|
||||
state.agree.value
|
||||
? 'images/icon_round_select.png'
|
||||
@ -260,7 +261,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
text: TranslationLoader.lanKeys!.readAndAgree!.tr,
|
||||
style:
|
||||
TextStyle(color: const Color(0xff333333), fontSize: 20.sp),
|
||||
children: [
|
||||
children: <InlineSpan>[
|
||||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
child: GestureDetector(
|
||||
@ -269,7 +270,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor, fontSize: 20.sp)),
|
||||
onTap: () {
|
||||
Get.toNamed(Routers.webviewShowPage, arguments: {
|
||||
Get.toNamed(Routers.webviewShowPage, arguments: <String, String>{
|
||||
'url': XSConstantMacro.userAgreementURL,
|
||||
'title': '用户协议'.tr
|
||||
});
|
||||
@ -283,7 +284,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterXHJPage> {
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor, fontSize: 20.sp)),
|
||||
onTap: () {
|
||||
Get.toNamed(Routers.webviewShowPage, arguments: {
|
||||
Get.toNamed(Routers.webviewShowPage, arguments: <String, String>{
|
||||
'url': XSConstantMacro.privacyPolicyURL,
|
||||
'title': '隐私政策'.tr
|
||||
});
|
||||
|
||||
@ -110,12 +110,11 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||
leftTitel: '接收者'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(true,
|
||||
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, 1)),
|
||||
rightWidget: getTFWidget(true, '请输入手机号或者邮箱'.tr, 1)),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
||||
rightTitle: '',
|
||||
@ -140,11 +139,11 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
},
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
leftTitel: '姓名'.tr,
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
false, TranslationLoader.lanKeys!.enterYourName!.tr, 2)),
|
||||
false, '请输入姓名'.tr, 2)),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
);
|
||||
@ -155,7 +154,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.beginDate.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -171,7 +170,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
});
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.endDate.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -234,7 +233,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
height: 20.h,
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.send!.tr,
|
||||
btnName: '发送'.tr,
|
||||
onClick: () async {
|
||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
@ -276,7 +275,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr,
|
||||
leftTitel: '实名认证'.tr,
|
||||
rightTitle: '',
|
||||
isTipsImg: true,
|
||||
isHaveLine: logic.state.isRequireAuth.value == true,
|
||||
@ -696,8 +695,8 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
}
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: '0'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: '1'),
|
||||
ItemView(title: '限时'.tr, type: '0'),
|
||||
ItemView(title: '永久'.tr, type: '1'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -8,10 +8,10 @@ import '../../../../../translations/trans_lib.dart';
|
||||
import '../volumeAuthorizationLock_page.dart';
|
||||
|
||||
class VolumeAuthorizationLockManageTabbar extends StatefulWidget {
|
||||
var initialIndex = 1;
|
||||
|
||||
VolumeAuthorizationLockManageTabbar({Key? key, required this.initialIndex})
|
||||
VolumeAuthorizationLockManageTabbar({required this.initialIndex, Key? key})
|
||||
: super(key: key);
|
||||
int initialIndex = 1;
|
||||
|
||||
@override
|
||||
State<VolumeAuthorizationLockManageTabbar> createState() =>
|
||||
@ -24,13 +24,12 @@ class _VolumeAuthorizationLockManageTabbarState
|
||||
late TabController _tabController;
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "1"),
|
||||
ItemView(title: '永久'.tr, type: '0'),
|
||||
ItemView(title: '限时'.tr, type: '1'),
|
||||
];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
_tabController = TabController(
|
||||
vsync: this,
|
||||
@ -42,7 +41,7 @@ class _VolumeAuthorizationLockManageTabbarState
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
_tabBar(),
|
||||
_pageWidget(),
|
||||
],
|
||||
@ -52,7 +51,7 @@ class _VolumeAuthorizationLockManageTabbarState
|
||||
TabBar _tabBar() {
|
||||
return TabBar(
|
||||
controller: _tabController,
|
||||
tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
|
||||
tabs: _itemTabs.map(_tab).toList(),
|
||||
isScrollable: true,
|
||||
indicatorColor: Colors.red,
|
||||
unselectedLabelColor: Colors.black,
|
||||
|
||||
@ -91,7 +91,7 @@ class _VolumeAuthorizationLockPageState
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
true,
|
||||
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||
'请输入手机号或者邮箱'.tr,
|
||||
state.emailOrPhoneController)),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
||||
@ -117,12 +117,12 @@ class _VolumeAuthorizationLockPageState
|
||||
},
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
leftTitel: '姓名'.tr,
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
false,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'请输入'.tr,
|
||||
state.keyNameController)),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
@ -134,7 +134,7 @@ class _VolumeAuthorizationLockPageState
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.selectEffectiveDate.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -153,7 +153,7 @@ class _VolumeAuthorizationLockPageState
|
||||
});
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.selectFailureDate.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -180,9 +180,9 @@ class _VolumeAuthorizationLockPageState
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.lock!.tr,
|
||||
leftTitel: '锁'.tr,
|
||||
rightTitle: state.lockIdList.isEmpty
|
||||
? TranslationLoader.lanKeys!.pleaseSelect!.tr
|
||||
? '请选择'.tr
|
||||
: state.lockIdList.length.toString(),
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
@ -223,7 +223,7 @@ class _VolumeAuthorizationLockPageState
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
btnName: '确定'.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
|
||||
@ -80,8 +80,8 @@ class _AddCardPageState extends State<AddCardPage>
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyBottomWidget()
|
||||
],
|
||||
@ -95,8 +95,8 @@ class _AddCardPageState extends State<AddCardPage>
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyTimeLimitWidget(),
|
||||
// SizedBox(height: 10.h),
|
||||
@ -112,8 +112,8 @@ class _AddCardPageState extends State<AddCardPage>
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyCyclicDate(),
|
||||
SizedBox(height: 10.h),
|
||||
@ -147,7 +147,7 @@ class _AddCardPageState extends State<AddCardPage>
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.timeLimitBeginTime.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -161,7 +161,7 @@ class _AddCardPageState extends State<AddCardPage>
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.timeLimitEndTime.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -183,7 +183,7 @@ class _AddCardPageState extends State<AddCardPage>
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
leftTitel: '有效期'.tr,
|
||||
rightTitle:
|
||||
'${state.cycleBeginTime.value}\n${state.cycleEndTime.value}',
|
||||
isHaveDirection: true,
|
||||
@ -385,15 +385,14 @@ class _AddCardPageState extends State<AddCardPage>
|
||||
}
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'),
|
||||
ItemView(
|
||||
title: TranslationLoader.lanKeys!.circulation!.tr, selectType: '2'),
|
||||
ItemView(title: '永久'.tr, selectType: '0'),
|
||||
ItemView(title: '限时'.tr, selectType: '1'),
|
||||
ItemView(title: '循环'.tr, selectType: '2'),
|
||||
];
|
||||
|
||||
final List<ItemView> _fromCheckInTypeItemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'),
|
||||
ItemView(title: '永久'.tr, selectType: '0'),
|
||||
ItemView(title: '限时'.tr, selectType: '1'),
|
||||
];
|
||||
|
||||
TabBar _tabBar() {
|
||||
|
||||
@ -46,12 +46,10 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
rightTitle: state.typeNumber.value,
|
||||
isHaveDirection: false,
|
||||
isHaveLine: true)),
|
||||
Obx(() => lockDataListItem(
|
||||
TranslationLoader.lanKeys!.name!.tr, state.typeName.value,
|
||||
() {
|
||||
Obx(() => lockDataListItem('姓名'.tr, state.typeName.value, () {
|
||||
ShowTipView().showTFViewAlertDialog(
|
||||
state.changeNameController,
|
||||
'${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}',
|
||||
'请输入姓名'.tr,
|
||||
'', () {
|
||||
if (state.changeNameController.text.isEmpty) {
|
||||
logic.showToast('请输入姓名'.tr);
|
||||
@ -70,7 +68,7 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
state.keyType.value == 2 ||
|
||||
state.keyType.value == 1,
|
||||
child: CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
leftTitel: '有效期'.tr,
|
||||
allHeight: 70.h,
|
||||
rightTitle: logic.getKeyTypeShowDateTime(),
|
||||
isHaveDirection: true,
|
||||
@ -164,12 +162,12 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
})))),
|
||||
Container(height: 10.h),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.additive!.tr,
|
||||
leftTitel: '添加者'.tr,
|
||||
isHaveLine: true,
|
||||
rightTitle: state.adder.value,
|
||||
)),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.addTime!.tr,
|
||||
leftTitel: '添加时间'.tr,
|
||||
rightTitle: DateTool()
|
||||
.dateToYMDHNString(state.addTime.value.toString()),
|
||||
)),
|
||||
@ -206,7 +204,7 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
// addControlsBtn(type),
|
||||
SizedBox(height: 30.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
btnName: '删除'.tr,
|
||||
isDelete: true,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(
|
||||
|
||||
@ -62,8 +62,7 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: <Widget>[
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.reset!.tr,
|
||||
child: Text('重置'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () async {
|
||||
|
||||
@ -33,14 +33,13 @@ class _OtherTypeKeyChangeDatePageState extends State<OtherTypeKeyChangeDatePage>
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle:
|
||||
"${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.periodValidity!.tr}",
|
||||
barTitle: '修改有效期'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: <Widget>[
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.sure!.tr,
|
||||
'确定'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () {
|
||||
@ -93,7 +92,7 @@ class _OtherTypeKeyChangeDatePageState extends State<OtherTypeKeyChangeDatePage>
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.beginTime.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -108,7 +107,7 @@ class _OtherTypeKeyChangeDatePageState extends State<OtherTypeKeyChangeDatePage>
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.endTime.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
|
||||
@ -177,25 +177,25 @@ class _OtherTypeKeyChangeValidityDatePageState extends State<OtherTypeKeyChangeV
|
||||
String dateStr;
|
||||
switch (index) {
|
||||
case 1:
|
||||
dateStr = TranslationLoader.lanKeys!.mondayShort!.tr;
|
||||
dateStr = '简写周一'.tr;
|
||||
break;
|
||||
case 2:
|
||||
dateStr = TranslationLoader.lanKeys!.tuesdayShort!.tr;
|
||||
dateStr = '简写周二'.tr;
|
||||
break;
|
||||
case 3:
|
||||
dateStr = TranslationLoader.lanKeys!.wednesdayShort!.tr;
|
||||
dateStr = '简写周三'.tr;
|
||||
break;
|
||||
case 4:
|
||||
dateStr = TranslationLoader.lanKeys!.thursdayShort!.tr;
|
||||
dateStr = '简写周四'.tr;
|
||||
break;
|
||||
case 5:
|
||||
dateStr = TranslationLoader.lanKeys!.fridayShort!.tr;
|
||||
dateStr = '简写周五'.tr;
|
||||
break;
|
||||
case 6:
|
||||
dateStr = TranslationLoader.lanKeys!.saturdayShort!.tr;
|
||||
dateStr = '简写周六'.tr;
|
||||
break;
|
||||
case 7:
|
||||
dateStr = TranslationLoader.lanKeys!.sundayShort!.tr;
|
||||
dateStr = '简写周日'.tr;
|
||||
break;
|
||||
default:
|
||||
dateStr = '';
|
||||
|
||||
@ -133,13 +133,13 @@ class _CheckingInDetailPageState extends State<CheckingInDetailPage> {
|
||||
//中部周
|
||||
Widget _weekHeader() {
|
||||
final List<String> array = <String>[
|
||||
TranslationLoader.lanKeys!.mondayShort!.tr,
|
||||
TranslationLoader.lanKeys!.tuesdayShort!.tr,
|
||||
TranslationLoader.lanKeys!.wednesdayShort!.tr,
|
||||
TranslationLoader.lanKeys!.thursdayShort!.tr,
|
||||
TranslationLoader.lanKeys!.fridayShort!.tr,
|
||||
TranslationLoader.lanKeys!.saturdayShort!.tr,
|
||||
TranslationLoader.lanKeys!.sundayShort!.tr
|
||||
'简写周一'.tr,
|
||||
'简写周二'.tr,
|
||||
'简写周三'.tr,
|
||||
'简写周四'.tr,
|
||||
'简写周五'.tr,
|
||||
'简写周六'.tr,
|
||||
'简写周日'.tr
|
||||
];
|
||||
return SizedBox(
|
||||
height: 50.h,
|
||||
|
||||
@ -38,7 +38,7 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
leftTitel: '姓名'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
@ -112,7 +112,7 @@ class _CheckingInAddHolidaysPageState extends State<CheckingInAddHolidaysPage> {
|
||||
height: 50.w,
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
btnName: '确定'.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
|
||||
@ -33,7 +33,7 @@ class _CheckingInDeletHolidaysPageState extends State<CheckingInDeletHolidaysPag
|
||||
actionsList: <Widget>[
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.delete!.tr,
|
||||
'删除'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: logic.deletStaffLoadData,
|
||||
@ -54,7 +54,7 @@ class _CheckingInDeletHolidaysPageState extends State<CheckingInDeletHolidaysPag
|
||||
body: Obx(() => Column(
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
leftTitel: '姓名'.tr,
|
||||
rightTitle: state.listItem.value.vacationName,
|
||||
isHaveLine: true),
|
||||
CommonItem(
|
||||
|
||||
@ -237,7 +237,7 @@ class _CheckingInSetHolidaysPageState extends State<CheckingInSetHolidaysPage> {
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
padding: const EdgeInsets.only(left: 22, right: 12),
|
||||
child: Text(TranslationLoader.lanKeys!.sure!.tr,
|
||||
child: Text('确定'.tr,
|
||||
style: const TextStyle(color: Colors.black, fontSize: 16.0)),
|
||||
),
|
||||
),
|
||||
|
||||
@ -536,7 +536,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
|
||||
normalIndex: 0,
|
||||
title: TranslationLoader.lanKeys!.rankingList!.tr,
|
||||
cancelTitle: TranslationLoader.lanKeys!.cancel!.tr,
|
||||
sureTitle: TranslationLoader.lanKeys!.sure!.tr,
|
||||
sureTitle: '确定'.tr,
|
||||
//要显示的列表
|
||||
//可自定义数据适配器
|
||||
//adapter: PickerAdapter(),
|
||||
|
||||
@ -112,8 +112,7 @@ class _CheckingInSetPageState extends State<CheckingInSetPage> {
|
||||
Visibility(
|
||||
visible: state.getKeyInfosData.value.isLockOwner == 1,
|
||||
child: SubmitBtn(
|
||||
btnName:
|
||||
'${TranslationLoader.lanKeys!.delete!.tr} ${TranslationLoader.lanKeys!.company!.tr}',
|
||||
btnName: '删除公司'.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
isDelete: true,
|
||||
|
||||
@ -79,7 +79,7 @@ class _CheckingInSetWorkTimePageState extends State<CheckingInSetWorkTimePage> {
|
||||
height: 30.h,
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
btnName: '确定'.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
|
||||
|
||||
@ -39,7 +39,7 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
|
||||
SizedBox(height: 50.h,),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, onClick: () {
|
||||
child: SubmitBtn(btnName: '确定'.tr, onClick: () {
|
||||
if(state.pushType.value == '2'){
|
||||
logic.editCheckInSetInfoData();
|
||||
}else{
|
||||
@ -78,7 +78,7 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Center(child: Text(TranslationLoader.lanKeys!.custom!.tr, style: TextStyle(fontSize: 26.sp, color: Colors.white))),
|
||||
Center(child: Text('自定义'.tr, style: TextStyle(fontSize: 26.sp, color: Colors.white))),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -177,25 +177,25 @@ class _CheckingInSetWorkdaySetState extends State<CheckingInSetWorkdaySet> {
|
||||
String dateStr;
|
||||
switch (index) {
|
||||
case 1:
|
||||
dateStr = TranslationLoader.lanKeys!.monday!.tr;
|
||||
dateStr = '星期一'.tr;
|
||||
break;
|
||||
case 2:
|
||||
dateStr = TranslationLoader.lanKeys!.tuesday!.tr;
|
||||
dateStr = '星期二'.tr;
|
||||
break;
|
||||
case 3:
|
||||
dateStr = TranslationLoader.lanKeys!.wednesday!.tr;
|
||||
dateStr = '星期三'.tr;
|
||||
break;
|
||||
case 4:
|
||||
dateStr = TranslationLoader.lanKeys!.thursday!.tr;
|
||||
dateStr = '星期四'.tr;
|
||||
break;
|
||||
case 5:
|
||||
dateStr = TranslationLoader.lanKeys!.friday!.tr;
|
||||
dateStr = '星期五'.tr;
|
||||
break;
|
||||
case 6:
|
||||
dateStr = TranslationLoader.lanKeys!.saturday!.tr;
|
||||
dateStr = '星期六'.tr;
|
||||
break;
|
||||
case 7:
|
||||
dateStr = TranslationLoader.lanKeys!.sunday!.tr;
|
||||
dateStr = '星期日'.tr;
|
||||
break;
|
||||
default:
|
||||
dateStr = '';
|
||||
|
||||
@ -41,12 +41,12 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
|
||||
children: <Widget>[
|
||||
// 姓名
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
leftTitel: '姓名'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
'${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.name!.tr}',
|
||||
'请输入姓名'.tr,
|
||||
state.staffNameController)),
|
||||
// 选择打卡方式
|
||||
Obx(() => CommonItem(
|
||||
@ -111,7 +111,7 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${"员工".tr}${TranslationLoader.lanKeys!.accountNumber!.tr}",
|
||||
"${'请输入'.tr}${"员工".tr}${TranslationLoader.lanKeys!.accountNumber!.tr}",
|
||||
state.staffAccountController)),
|
||||
CommonItem(
|
||||
leftTitel:
|
||||
@ -277,7 +277,7 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
|
||||
}),
|
||||
SizedBox(height: 50.w),
|
||||
Obx(() => SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
btnName: '确定'.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
@ -366,7 +366,7 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
|
||||
normalIndex: 0,
|
||||
title: title,
|
||||
cancelTitle: TranslationLoader.lanKeys!.cancel!.tr,
|
||||
sureTitle: TranslationLoader.lanKeys!.sure!.tr,
|
||||
sureTitle: '确定'.tr,
|
||||
//要显示的列表
|
||||
//可自定义数据适配器
|
||||
//adapter: PickerAdapter(),
|
||||
@ -472,7 +472,7 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
|
||||
title = TranslationLoader.lanKeys!.getKey!.tr;
|
||||
break;
|
||||
case 2:
|
||||
title = TranslationLoader.lanKeys!.getPassword!.tr;
|
||||
title = '获取密码'.tr;
|
||||
break;
|
||||
case 3:
|
||||
title = TranslationLoader.lanKeys!.getCard!.tr;
|
||||
|
||||
@ -49,7 +49,7 @@ class _CheckingInStaffDetailPageState extends State<CheckingInStaffDetailPage> {
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
leftTitel: '姓名'.tr,
|
||||
rightTitle: state.staffListItemData.value.staffName,
|
||||
isHaveLine: true)),
|
||||
Obx(() => CommonItem(
|
||||
|
||||
@ -40,9 +40,9 @@ class _BatchExportLogPageState extends State<BatchExportLogPage>
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.lock!.tr,
|
||||
leftTitel: '锁'.tr,
|
||||
rightTitle: state.lockIdList.isEmpty
|
||||
? TranslationLoader.lanKeys!.pleaseSelect!.tr
|
||||
? '请选择'.tr
|
||||
: state.lockIdList.length.toString(),
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
@ -87,7 +87,7 @@ class _BatchExportLogPageState extends State<BatchExportLogPage>
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.beginTime.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -101,7 +101,7 @@ class _BatchExportLogPageState extends State<BatchExportLogPage>
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.endTime.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
|
||||
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_logic.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_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';
|
||||
@ -20,29 +21,25 @@ class ElectronicKeyDetailChangeDate extends StatefulWidget {
|
||||
_ElectronicKeyDetailChangeDateState();
|
||||
}
|
||||
|
||||
class _ElectronicKeyDetailChangeDateState
|
||||
extends State<ElectronicKeyDetailChangeDate> {
|
||||
final logic = Get.put(ElectronicKeyDetailChangeDateLogic());
|
||||
final state = Get.find<ElectronicKeyDetailChangeDateLogic>().state;
|
||||
class _ElectronicKeyDetailChangeDateState extends State<ElectronicKeyDetailChangeDate> {
|
||||
final ElectronicKeyDetailChangeDateLogic logic = Get.put(ElectronicKeyDetailChangeDateLogic());
|
||||
final ElectronicKeyDetailChangeDateState state = Get.find<ElectronicKeyDetailChangeDateLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle:
|
||||
"${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.periodValidity!.tr}",
|
||||
barTitle: '修改有效期'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
actionsList: <Widget>[
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.sure!.tr,
|
||||
'确定'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () {
|
||||
logic.updateKeyDateRequest();
|
||||
},
|
||||
onPressed: logic.updateKeyDateRequest,
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -52,9 +49,9 @@ class _ElectronicKeyDetailChangeDateState
|
||||
|
||||
Widget buildMainUI() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.beginTime.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -62,21 +59,21 @@ class _ElectronicKeyDetailChangeDateState
|
||||
PDuration selectDate =
|
||||
PDuration.parse(DateTime.tryParse(state.beginTime.value));
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) {
|
||||
setState(() {
|
||||
state.beginTime.value = DateTool().getYMDHNDateString(p, 1);
|
||||
});
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.endTime.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
PDuration selectDate =
|
||||
PDuration.parse(DateTime.tryParse(state.endTime.value));
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) {
|
||||
setState(() {
|
||||
state.endTime.value = DateTool().getYMDHNDateString(p, 1);
|
||||
});
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyPeriodValidity/electronicKeyPeriodValidity_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,19 +24,19 @@ class ElectronicKeyPeriodValidityPage extends StatefulWidget {
|
||||
|
||||
class _ElectronicKeyPeriodValidityPageState
|
||||
extends State<ElectronicKeyPeriodValidityPage> {
|
||||
final logic = Get.put(ElectronicKeyPeriodValidityLogic());
|
||||
final state = Get.find<ElectronicKeyPeriodValidityLogic>().state;
|
||||
final ElectronicKeyPeriodValidityLogic logic = Get.put(ElectronicKeyPeriodValidityLogic());
|
||||
final ElectronicKeyPeriodValidityState state = Get.find<ElectronicKeyPeriodValidityLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: "修改有效期".tr,
|
||||
barTitle: '修改有效期'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
topWidget(),
|
||||
SizedBox(height: 10.h),
|
||||
middleWidget(),
|
||||
@ -57,13 +58,13 @@ class _ElectronicKeyPeriodValidityPageState
|
||||
|
||||
Widget topWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Container(
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: "生效日期".tr,
|
||||
leftTitel: '生效日期'.tr,
|
||||
rightTitle: state.starDate.value,
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
@ -72,13 +73,13 @@ class _ElectronicKeyPeriodValidityPageState
|
||||
PDuration.parse(DateTime.tryParse(state.endTime.value));
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate,
|
||||
mode: DateMode.YMD, onConfirm: (p) {
|
||||
mode: DateMode.YMD, onConfirm: (PDuration p) {
|
||||
state.starDate.value =
|
||||
DateTool().getYMDHNDateString(p, 2);
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: "失效日期".tr,
|
||||
leftTitel: '失效日期'.tr,
|
||||
rightTitle: state.endDate.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -86,7 +87,7 @@ class _ElectronicKeyPeriodValidityPageState
|
||||
PDuration.parse(DateTime.tryParse(state.endDate.value));
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate,
|
||||
mode: DateMode.YMD, onConfirm: (p) {
|
||||
mode: DateMode.YMD, onConfirm: (PDuration p) {
|
||||
state.endDate.value = DateTool().getYMDHNDateString(p, 2);
|
||||
});
|
||||
})),
|
||||
@ -105,7 +106,7 @@ class _ElectronicKeyPeriodValidityPageState
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Container(
|
||||
height: 60.h,
|
||||
// color: Colors.red,
|
||||
@ -121,7 +122,7 @@ class _ElectronicKeyPeriodValidityPageState
|
||||
crossAxisCount: 7, childAspectRatio: 1.0),
|
||||
itemCount: 7,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (context, index) {
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
index += 1;
|
||||
return btnItem(index);
|
||||
})),
|
||||
@ -134,28 +135,28 @@ class _ElectronicKeyPeriodValidityPageState
|
||||
String dateStr;
|
||||
switch (index) {
|
||||
case 1:
|
||||
dateStr = TranslationLoader.lanKeys!.mondayShort!.tr;
|
||||
dateStr = '简写周一'.tr;
|
||||
break;
|
||||
case 2:
|
||||
dateStr = TranslationLoader.lanKeys!.tuesdayShort!.tr;
|
||||
dateStr = '简写周二'.tr;
|
||||
break;
|
||||
case 3:
|
||||
dateStr = TranslationLoader.lanKeys!.wednesdayShort!.tr;
|
||||
dateStr = '简写周三'.tr;
|
||||
break;
|
||||
case 4:
|
||||
dateStr = TranslationLoader.lanKeys!.thursdayShort!.tr;
|
||||
dateStr = '简写周四'.tr;
|
||||
break;
|
||||
case 5:
|
||||
dateStr = TranslationLoader.lanKeys!.fridayShort!.tr;
|
||||
dateStr = '简写周五'.tr;
|
||||
break;
|
||||
case 6:
|
||||
dateStr = TranslationLoader.lanKeys!.saturdayShort!.tr;
|
||||
dateStr = '简写周六'.tr;
|
||||
break;
|
||||
case 7:
|
||||
dateStr = TranslationLoader.lanKeys!.sundayShort!.tr;
|
||||
dateStr = '简写周日'.tr;
|
||||
break;
|
||||
default:
|
||||
dateStr = "";
|
||||
dateStr = '';
|
||||
break;
|
||||
}
|
||||
return GestureDetector(
|
||||
@ -195,11 +196,11 @@ class _ElectronicKeyPeriodValidityPageState
|
||||
|
||||
Widget bottomWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Container(
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel:
|
||||
"${TranslationLoader.lanKeys!.begin!.tr}${TranslationLoader.lanKeys!.time!.tr}",
|
||||
@ -210,7 +211,7 @@ class _ElectronicKeyPeriodValidityPageState
|
||||
PDuration selectDate = PDuration.parse(DateTool().dateToDateTime(state.starTime.value, 0));
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate,
|
||||
mode: DateMode.HM, onConfirm: (p) {
|
||||
mode: DateMode.HM, onConfirm: (PDuration p) {
|
||||
setState(() {
|
||||
state.starTime.value =
|
||||
DateTool().getYMDHNDateString(p, 3);
|
||||
@ -226,7 +227,7 @@ class _ElectronicKeyPeriodValidityPageState
|
||||
PDuration selectDate = PDuration.parse(DateTool().dateToDateTime(state.endTime.value, 0));
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate,
|
||||
mode: DateMode.HM, onConfirm: (p) {
|
||||
mode: DateMode.HM, onConfirm: (PDuration p) {
|
||||
setState(() {
|
||||
state.endTime.value =
|
||||
DateTool().getYMDHNDateString(p, 3);
|
||||
|
||||
@ -60,7 +60,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
||||
actionsList: <Widget>[
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.reset!.tr,
|
||||
'重置'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () async {
|
||||
@ -108,7 +108,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
||||
height: 20.h,
|
||||
),
|
||||
AddBottomWhiteBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sendKey!.tr,
|
||||
btnName: '发送钥匙'.tr,
|
||||
onClick: () {
|
||||
Navigator.pushNamed(context, Routers.sendElectronicKeyPage)
|
||||
.then((Object? val) {
|
||||
|
||||
@ -154,9 +154,9 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||
leftTitel: '接收者'.tr,
|
||||
rightTitle: state.receiverList.value.isEmpty
|
||||
? TranslationLoader.lanKeys!.pleaseAdd!.tr
|
||||
? '请添加'.tr
|
||||
: state.receiverList.value.length.toString(),
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -197,9 +197,9 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
},
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.lock!.tr,
|
||||
leftTitel: '锁'.tr,
|
||||
rightTitle: state.lockIdList.isEmpty
|
||||
? TranslationLoader.lanKeys!.pleaseSelect!.tr
|
||||
? '请选择'.tr
|
||||
: state.lockIdList.length.toString(),
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
@ -228,7 +228,7 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.beginTime.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -241,7 +241,7 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.endTime.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -260,7 +260,7 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr,
|
||||
leftTitel: '允许远程开锁'.tr,
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: SizedBox(width: 60.w, height: 50.h, child: _switch()),
|
||||
@ -275,7 +275,7 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
leftTitel: '有效期'.tr,
|
||||
rightTitle: '${state.beginTime.value}\n${state.endTime.value}',
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
@ -356,7 +356,7 @@ class _MassSendElectronicKeyPageState extends State<MassSendElectronicKeyPage> {
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.send!.tr,
|
||||
btnName: '发送'.tr,
|
||||
onClick: () {
|
||||
logic.massKeyChecksRequest();
|
||||
}),
|
||||
|
||||
@ -22,7 +22,7 @@ class _MassSendElectronicKeyManagePageState
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.sendGroupKey!.tr,
|
||||
barTitle: '群发钥匙'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
|
||||
@ -4,14 +4,13 @@ import 'package:get/get.dart';
|
||||
|
||||
import '../../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../../tools/CustomUnderlineTabIndicator.dart';
|
||||
import '../../../../../../translations/trans_lib.dart';
|
||||
import '../massSendElectronicKey_page.dart';
|
||||
|
||||
class MassSendElectronicKeyManageTabbar extends StatefulWidget {
|
||||
var initialIndex = 1;
|
||||
|
||||
MassSendElectronicKeyManageTabbar({Key? key, required this.initialIndex})
|
||||
MassSendElectronicKeyManageTabbar({required this.initialIndex, Key? key})
|
||||
: super(key: key);
|
||||
int initialIndex = 1;
|
||||
|
||||
@override
|
||||
State<MassSendElectronicKeyManageTabbar> createState() =>
|
||||
@ -24,14 +23,13 @@ class _MassSendElectronicKeyManageTabbarState
|
||||
late TabController _tabController;
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: "2"),
|
||||
ItemView(title: '限时'.tr, type: '0'),
|
||||
ItemView(title: '永久'.tr, type: '1'),
|
||||
ItemView(title: '循环'.tr, type: '2'),
|
||||
];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
_tabController = TabController(
|
||||
vsync: this,
|
||||
@ -43,7 +41,7 @@ class _MassSendElectronicKeyManageTabbarState
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
_tabBar(),
|
||||
_pageWidget(),
|
||||
],
|
||||
@ -53,7 +51,7 @@ class _MassSendElectronicKeyManageTabbarState
|
||||
TabBar _tabBar() {
|
||||
return TabBar(
|
||||
controller: _tabController,
|
||||
tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
|
||||
tabs: _itemTabs.map(_tab).toList(),
|
||||
isScrollable: true,
|
||||
indicatorColor: Colors.red,
|
||||
unselectedLabelColor: Colors.black,
|
||||
|
||||
@ -38,7 +38,7 @@ class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
|
||||
appBar: AppBar(
|
||||
backgroundColor: AppColors.mainColor,
|
||||
title: Text(
|
||||
TranslationLoader.lanKeys!.lock!.tr,
|
||||
'锁'.tr,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 28.sp,
|
||||
|
||||
@ -88,10 +88,9 @@ class _MassSendReceiverCellState extends State<MassSendReceiverCell> {
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
_buildCellWidget(
|
||||
leftTitle: TranslationLoader.lanKeys!.receiver!.tr,
|
||||
leftTitle: '接收者'.tr,
|
||||
isInputField: true,
|
||||
inputHint: TranslationLoader
|
||||
.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||
inputHint: '请输入手机号或者邮箱'.tr,
|
||||
controller: _receiverController,
|
||||
isContactPickerEnabled: true,
|
||||
onSubmitted: (String text) {
|
||||
@ -111,9 +110,9 @@ class _MassSendReceiverCellState extends State<MassSendReceiverCell> {
|
||||
height: 1,
|
||||
),
|
||||
_buildCellWidget(
|
||||
leftTitle: TranslationLoader.lanKeys!.name!.tr,
|
||||
leftTitle: '姓名'.tr,
|
||||
isInputField: true,
|
||||
inputHint: TranslationLoader.lanKeys!.enterYourName!.tr,
|
||||
inputHint: '请输入姓名'.tr,
|
||||
controller: _nickNameController,
|
||||
isContactPickerEnabled: false,
|
||||
onSubmitted: (String text) {
|
||||
|
||||
@ -40,7 +40,7 @@ class _MassSendReceiverPageState extends State<MassSendReceiverPage> {
|
||||
appBar: AppBar(
|
||||
backgroundColor: AppColors.mainColor,
|
||||
title: Text(
|
||||
TranslationLoader.lanKeys!.receiver!.tr,
|
||||
'接收者'.tr,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 28.sp,
|
||||
|
||||
@ -34,7 +34,7 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage>
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.sendKey!.tr,
|
||||
barTitle: '发送钥匙'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
@ -98,10 +98,10 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage>
|
||||
}
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: '0'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: '1'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.once!.tr, type: '2'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: '3'),
|
||||
ItemView(title: '限时'.tr, type: '0'),
|
||||
ItemView(title: '永久'.tr, type: '1'),
|
||||
ItemView(title: '单次'.tr, type: '2'),
|
||||
ItemView(title: '循环'.tr, type: '3'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/appRouters.dart';
|
||||
import 'package:star_lock/app_settings/app_colors.dart';
|
||||
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendElectronicKey/view/sendElectronicKeyView_logic.dart';
|
||||
import 'package:star_lock/network/api_repository.dart';
|
||||
@ -22,9 +22,9 @@ import 'package:star_lock/tools/submitBtn.dart';
|
||||
import 'package:star_lock/translations/trans_lib.dart';
|
||||
|
||||
class SendElectronicKeyView extends StatefulWidget {
|
||||
String type;
|
||||
|
||||
SendElectronicKeyView({required this.type, Key? key}) : super(key: key);
|
||||
String type;
|
||||
|
||||
@override
|
||||
State<SendElectronicKeyView> createState() => _SendElectronicKeyViewState();
|
||||
@ -47,7 +47,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
// 限时
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
keyInfoWidget(logic),
|
||||
keyTimeWidget(logic),
|
||||
remoteUnlockingWidget(logic),
|
||||
@ -60,7 +60,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
// 永久
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
keyInfoWidget(logic),
|
||||
remoteUnlockingWidget(logic),
|
||||
keyRealNameWidget(logic),
|
||||
@ -72,7 +72,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
// 单次
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
keyInfoWidget(logic),
|
||||
remoteUnlockingWidget(logic),
|
||||
keyRealNameWidget(logic),
|
||||
@ -84,7 +84,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
// 循环
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
keyInfoWidget(logic),
|
||||
keyPeriodValidityWidget(logic),
|
||||
remoteUnlockingWidget(logic),
|
||||
@ -103,16 +103,16 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
// 顶部钥匙信息widget
|
||||
Widget keyInfoWidget(SendElectronicKeyViewLogic logic) {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
// Container(height: 10.h),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.receiver!.tr,
|
||||
leftTitel: '接收者'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
true,
|
||||
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||
'请输入手机号或者邮箱'.tr,
|
||||
1,
|
||||
logic)),
|
||||
CommonItem(
|
||||
@ -128,7 +128,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
||||
),
|
||||
action: () async {
|
||||
final result = await Navigator.pushNamed(
|
||||
final Object? result = await Navigator.pushNamed(
|
||||
context, Routers.selectCountryRegionPage);
|
||||
if (result != null) {
|
||||
result as Map<String, dynamic>;
|
||||
@ -139,11 +139,11 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
},
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
leftTitel: '姓名'.tr,
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
false, TranslationLoader.lanKeys!.enterYourName!.tr, 2, logic,
|
||||
false, '请输入姓名'.tr, 2, logic,
|
||||
maxSize: 50)),
|
||||
Container(height: 10.h),
|
||||
],
|
||||
@ -153,9 +153,9 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
// 生效失效时间
|
||||
Widget keyTimeWidget(SendElectronicKeyViewLogic logic) {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: logic.state.timeLimitBeginTime,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -163,21 +163,21 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
final PDuration selectDate = PDuration.parse(
|
||||
DateTime.parse(logic.state.timeLimitBeginTime));
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) {
|
||||
logic.state.timeLimitBeginTime =
|
||||
DateTool().getYMDHNDateString(p, 1);
|
||||
logic.update();
|
||||
});
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: logic.state.timeLimitEndTime,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
final PDuration selectDate = PDuration.parse(
|
||||
DateTime.tryParse(logic.state.timeLimitEndTime));
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) {
|
||||
logic.state.timeLimitEndTime =
|
||||
DateTool().getYMDHNDateString(p, 1);
|
||||
logic.update();
|
||||
@ -191,9 +191,9 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
// 实名认证
|
||||
Widget keyRealNameWidget(SendElectronicKeyViewLogic logic) {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.realNameAuthentication!.tr,
|
||||
leftTitel: '实名认证'.tr,
|
||||
rightTitle: '',
|
||||
isTipsImg: true,
|
||||
isHaveLine: logic.state.isRequireAuth.value,
|
||||
@ -229,16 +229,16 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
// 循环有效期
|
||||
Widget keyPeriodValidityWidget(SendElectronicKeyViewLogic logic) {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
leftTitel: '有效期'.tr,
|
||||
rightTitle:
|
||||
'${logic.state.cycleBeginTime}\n${logic.state.cycleEndTime}',
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () async {
|
||||
final result =
|
||||
await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: {
|
||||
await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: <String, Object>{
|
||||
'validityValue': logic.state.weekdaysList,
|
||||
'starDate': logic.state.cycleBeginTime,
|
||||
'endDate': logic.state.cycleEndTime,
|
||||
@ -291,7 +291,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
action: () async {
|
||||
final result = await Get.toNamed(
|
||||
Routers.seletKeyCyclicDatePage,
|
||||
arguments: {
|
||||
arguments: <String, Object>{
|
||||
'validityValue': logic.state.weekdaysList,
|
||||
'starDate': logic.state.cycleBeginTime,
|
||||
'endDate': logic.state.cycleEndTime,
|
||||
@ -314,11 +314,11 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
Widget keyBottomWidget(
|
||||
String sendElectronicKeyTips, SendElectronicKeyViewLogic logic) {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.all(20.w),
|
||||
child: Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Text(
|
||||
sendElectronicKeyTips,
|
||||
@ -344,7 +344,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
padding: EdgeInsets.only(right: 30.w),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
// 获取是否是演示模式 演示模式不获取接口
|
||||
@ -356,7 +356,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.sendGroupKey!.tr,
|
||||
'群发钥匙'.tr,
|
||||
style:
|
||||
TextStyle(color: AppColors.mainColor, fontSize: 22.sp),
|
||||
)),
|
||||
@ -376,7 +376,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
width: 1.sw,
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
),
|
||||
@ -390,7 +390,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'发送成功'.tr,
|
||||
style: TextStyle(
|
||||
@ -462,7 +462,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
height: 65.h,
|
||||
width: 320.w,
|
||||
child: Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: logic.getCurrentController(lineIndex),
|
||||
@ -546,7 +546,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.remoteUnlockingAllowed!.tr,
|
||||
leftTitel: '允许远程开锁'.tr,
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: SizedBox(
|
||||
@ -568,7 +568,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
value: isRemote
|
||||
? logic.state.isRemoteUnlock.value
|
||||
: logic.state.isAuthentication.value,
|
||||
onChanged: (value) {
|
||||
onChanged: (bool value) {
|
||||
if (isRemote) {
|
||||
logic.state.isRemoteUnlock.value = !logic.state.isRemoteUnlock.value;
|
||||
} else {
|
||||
@ -646,7 +646,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
}
|
||||
|
||||
List<Widget> initBottomSheetList() {
|
||||
final List<Widget> widgetList = [];
|
||||
final List<Widget> widgetList = <Widget>[];
|
||||
widgetList.add(buildCenter3('images/icon_wechat.png', '微信好友'.tr, 0));
|
||||
widgetList.add(buildCenter3('images/icon_message.png', '短信'.tr, 1));
|
||||
widgetList.add(buildCenter3('images/icon_email.png', '邮件'.tr, 2));
|
||||
@ -664,7 +664,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
EdgeInsets.only(top: 20.w, bottom: 20.w, left: 10.w, right: 10.w),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Image.asset(
|
||||
imageName,
|
||||
width: 50.w,
|
||||
|
||||
@ -79,8 +79,8 @@ class _AddFaceTypePageState extends State<AddFaceTypePage> with SingleTickerProv
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyBottomWidget()
|
||||
],
|
||||
@ -94,8 +94,8 @@ class _AddFaceTypePageState extends State<AddFaceTypePage> with SingleTickerProv
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyTimeLimitWidget(),
|
||||
keyBottomWidget()
|
||||
@ -110,8 +110,8 @@ class _AddFaceTypePageState extends State<AddFaceTypePage> with SingleTickerProv
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyCyclicDate(),
|
||||
SizedBox(height: 10.h),
|
||||
@ -146,7 +146,7 @@ class _AddFaceTypePageState extends State<AddFaceTypePage> with SingleTickerProv
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.timeLimitBeginTime.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -160,7 +160,7 @@ class _AddFaceTypePageState extends State<AddFaceTypePage> with SingleTickerProv
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.timeLimitEndTime.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -182,7 +182,7 @@ class _AddFaceTypePageState extends State<AddFaceTypePage> with SingleTickerProv
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
leftTitel: '有效期'.tr,
|
||||
rightTitle:
|
||||
'${state.cycleBeginTime.value}\n${state.cycleEndTime.value}',
|
||||
isHaveDirection: true,
|
||||
@ -355,15 +355,14 @@ class _AddFaceTypePageState extends State<AddFaceTypePage> with SingleTickerProv
|
||||
}
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'),
|
||||
ItemView(
|
||||
title: TranslationLoader.lanKeys!.circulation!.tr, selectType: '2'),
|
||||
ItemView(title: '永久'.tr, selectType: '0'),
|
||||
ItemView(title: '限时'.tr, selectType: '1'),
|
||||
ItemView(title: '循环'.tr, selectType: '2'),
|
||||
];
|
||||
|
||||
final List<ItemView> _fromCheckInTypeItemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'),
|
||||
ItemView(title: '永久'.tr, selectType: '0'),
|
||||
ItemView(title: '限时'.tr, selectType: '1'),
|
||||
];
|
||||
|
||||
TabBar _tabBar() {
|
||||
|
||||
@ -45,13 +45,11 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
rightTitle: state.typeNumber.value,
|
||||
isHaveDirection: false,
|
||||
isHaveLine: true)),
|
||||
Obx(() => lockDataListItem(
|
||||
TranslationLoader.lanKeys!.name!.tr, state.typeName.value,
|
||||
() {
|
||||
Obx(() => lockDataListItem('姓名'.tr, state.typeName.value, () {
|
||||
// showCupertinoAlertDialog(context);
|
||||
ShowTipView().showTFViewAlertDialog(
|
||||
state.changeNameController,
|
||||
'${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}',
|
||||
'修改姓名'.tr,
|
||||
'', () {
|
||||
if (state.changeNameController.text.isEmpty) {
|
||||
logic.showToast('请输入姓名'.tr);
|
||||
@ -69,7 +67,7 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
state.keyType.value == 2 ||
|
||||
state.keyType.value == 1,
|
||||
child: CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
leftTitel: '有效期'.tr,
|
||||
allHeight: 70.h,
|
||||
// rightTitle:"2023.09.19 11:27\n2023.09.25 11:27",
|
||||
rightTitle: logic.getKeyTypeShowDateTime(),
|
||||
@ -160,11 +158,11 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
})))),
|
||||
Container(height: 10.h),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.additive!.tr,
|
||||
leftTitel: '添加者'.tr,
|
||||
rightTitle: state.adder.value,
|
||||
)),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.addTime!.tr,
|
||||
leftTitel: '添加时间'.tr,
|
||||
rightTitle: DateTool()
|
||||
.dateToYMDHNString(state.addTime.value.toString()),
|
||||
)),
|
||||
@ -200,7 +198,7 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
// addControlsBtn(type),
|
||||
SizedBox(height: 30.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
btnName: '删除'.tr,
|
||||
isDelete: true,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(
|
||||
|
||||
@ -61,7 +61,7 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
actionsList: <Widget>[
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.reset!.tr,
|
||||
'重置'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () async {
|
||||
|
||||
@ -77,8 +77,8 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyBottomWidget()
|
||||
],
|
||||
@ -92,8 +92,8 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyTimeLimitWidget(),
|
||||
keyBottomWidget()
|
||||
@ -108,8 +108,8 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyCyclicDate(),
|
||||
SizedBox(height: 10.h),
|
||||
@ -143,7 +143,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.timeLimitBeginTime.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -156,7 +156,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.timeLimitEndTime.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -177,7 +177,7 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
leftTitel: '有效期'.tr,
|
||||
rightTitle:'${state.cycleBeginTime.value}\n${state.cycleEndTime.value}',
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
@ -440,14 +440,14 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage> with Si
|
||||
}
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, selectType: '2'),
|
||||
ItemView(title: '永久'.tr, selectType: '0'),
|
||||
ItemView(title: '限时'.tr, selectType: '1'),
|
||||
ItemView(title: '循环'.tr, selectType: '2'),
|
||||
];
|
||||
|
||||
final List<ItemView> _fromCheckInTypeItemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'),
|
||||
ItemView(title: '永久'.tr, selectType: '0'),
|
||||
ItemView(title: '限时'.tr, selectType: '1'),
|
||||
];
|
||||
|
||||
TabBar _tabBar() {
|
||||
|
||||
@ -46,12 +46,10 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage>
|
||||
rightTitle: state.typeNumber.value,
|
||||
isHaveDirection: false,
|
||||
isHaveLine: true)),
|
||||
Obx(() => lockDataListItem(
|
||||
TranslationLoader.lanKeys!.name!.tr, state.typeName.value,
|
||||
() {
|
||||
Obx(() => lockDataListItem('姓名'.tr, state.typeName.value, () {
|
||||
ShowTipView().showTFViewAlertDialog(
|
||||
state.changeNameController,
|
||||
'${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}',
|
||||
'修改姓名'.tr,
|
||||
'', () {
|
||||
if (state.changeNameController.text.isEmpty) {
|
||||
logic.showToast('请输入姓名'.tr);
|
||||
@ -70,7 +68,7 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage>
|
||||
state.keyType.value == 2 ||
|
||||
state.keyType.value == 1,
|
||||
child: CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
leftTitel: '有效期'.tr,
|
||||
allHeight: 70.h,
|
||||
// rightTitle:"2023.09.19 11:27\n2023.09.25 11:27",
|
||||
rightTitle: logic.getKeyTypeShowDateTime(),
|
||||
@ -165,12 +163,12 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage>
|
||||
})))),
|
||||
Container(height: 10.h),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.additive!.tr,
|
||||
leftTitel: '添加者'.tr,
|
||||
rightTitle: state.adder.value,
|
||||
isHaveLine: true,
|
||||
action: () {})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.addTime!.tr,
|
||||
leftTitel: '添加时间'.tr,
|
||||
rightTitle: DateTool()
|
||||
.dateToYMDHNString(state.addTime.value.toString()),
|
||||
)),
|
||||
@ -210,7 +208,7 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage>
|
||||
// addControlsBtn(type),
|
||||
SizedBox(height: 30.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
btnName: '删除'.tr,
|
||||
isDelete: true,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(
|
||||
|
||||
@ -64,7 +64,7 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
||||
actionsList: <Widget>[
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.reset!.tr,
|
||||
'重置'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () async {
|
||||
|
||||
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/iris/addIris/addIris_logic.dart';
|
||||
import 'package:star_lock/main/lockDetail/iris/addIris/addIris_state.dart';
|
||||
|
||||
import '../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../tools/submitBtn.dart';
|
||||
@ -16,19 +17,19 @@ class AddIrisPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _AddIrisPageState extends State<AddIrisPage> {
|
||||
final logic = Get.put(AddIrisLogic());
|
||||
final state = Get.find<AddIrisLogic>().state;
|
||||
final AddIrisLogic logic = Get.put(AddIrisLogic());
|
||||
final AddIrisState state = Get.find<AddIrisLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}${'虹膜'.tr}",
|
||||
barTitle: "${'添加'.tr}${'虹膜'.tr}",
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
height: 50.h,
|
||||
),
|
||||
@ -47,10 +48,10 @@ class _AddIrisPageState extends State<AddIrisPage> {
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Text(
|
||||
"请单人正对门锁,距离一个成年人手臂长度\n(约0.6米)。\n保持脸部无遮挡,露出五官。",
|
||||
'请单人正对门锁,距离一个成年人手臂长度\n(约0.6米)。\n保持脸部无遮挡,露出五官。',
|
||||
textAlign: TextAlign.left,
|
||||
maxLines: null,
|
||||
style:
|
||||
@ -68,7 +69,7 @@ class _AddIrisPageState extends State<AddIrisPage> {
|
||||
? Container(
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: SubmitBtn(
|
||||
btnName: "准备好了,开始添加",
|
||||
btnName: '准备好了,开始添加',
|
||||
borderRadius: 20.w,
|
||||
onClick: () {
|
||||
state.isClickAddFace.value = true;
|
||||
@ -76,7 +77,7 @@ class _AddIrisPageState extends State<AddIrisPage> {
|
||||
)
|
||||
: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'正在录入中...',
|
||||
style: TextStyle(
|
||||
|
||||
@ -14,25 +14,25 @@ class AddIrisTypeManagePage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _AddIrisTypeManagePageState extends State<AddIrisTypeManagePage> {
|
||||
var index = 0;
|
||||
int index = 0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Map map = Get.arguments;
|
||||
var lockId = map["lockId"];
|
||||
var fromType = map["fromType"]; // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
var fromTypeTwoStaffName = "";
|
||||
final Map map = Get.arguments;
|
||||
final lockId = map['lockId'];
|
||||
final fromType = map['fromType']; // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
String fromTypeTwoStaffName = '';
|
||||
if (fromType == 2) {
|
||||
fromTypeTwoStaffName = map["fromTypeTwoStaffName"]; // 从添加员工进入 传入员工名字
|
||||
fromTypeTwoStaffName = map['fromTypeTwoStaffName']; // 从添加员工进入 传入员工名字
|
||||
}
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}${'虹膜'.tr}",
|
||||
barTitle: "${"添加".tr}${'虹膜'.tr}",
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
AddIrisTypeManageTabbar(
|
||||
lockId: lockId,
|
||||
fromType: fromType,
|
||||
|
||||
@ -7,18 +7,14 @@ import '../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../tools/CustomUnderlineTabIndicator.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class AddIrisTypeManageTabbar extends StatefulWidget {
|
||||
var initialIndex = 1;
|
||||
var lockId = 0;
|
||||
var fromType = 1; // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
var fromTypeTwoStaffName = ""; // 从添加员工进入 传入员工名字
|
||||
class AddIrisTypeManageTabbar extends StatefulWidget { // 从添加员工进入 传入员工名字
|
||||
AddIrisTypeManageTabbar(
|
||||
{Key? key,
|
||||
required this.lockId,
|
||||
required this.fromType,
|
||||
required this.fromTypeTwoStaffName,
|
||||
required this.initialIndex})
|
||||
{required this.lockId, required this.fromType, required this.fromTypeTwoStaffName, required this.initialIndex, Key? key})
|
||||
: super(key: key);
|
||||
int initialIndex = 1;
|
||||
int lockId = 0;
|
||||
int fromType = 1; // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
String fromTypeTwoStaffName = '';
|
||||
|
||||
@override
|
||||
State<AddIrisTypeManageTabbar> createState() =>
|
||||
@ -30,20 +26,18 @@ class _AddIrisTypeManageTabbarState extends State<AddIrisTypeManageTabbar>
|
||||
late TabController _tabController;
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: "1"),
|
||||
ItemView(
|
||||
title: TranslationLoader.lanKeys!.circulation!.tr, selectType: "2"),
|
||||
ItemView(title: '永久'.tr, selectType: '0'),
|
||||
ItemView(title: '限时'.tr, selectType: '1'),
|
||||
ItemView(title: '循环'.tr, selectType: '2'),
|
||||
];
|
||||
|
||||
final List<ItemView> _fromCheckInTypeItemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: "1"),
|
||||
ItemView(title: '永久'.tr, selectType: '0'),
|
||||
ItemView(title: '限时'.tr, selectType: '1'),
|
||||
];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
_tabController = TabController(
|
||||
vsync: this,
|
||||
@ -61,7 +55,7 @@ class _AddIrisTypeManageTabbarState extends State<AddIrisTypeManageTabbar>
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
_tabBar(),
|
||||
_pageWidget(),
|
||||
],
|
||||
@ -72,9 +66,9 @@ class _AddIrisTypeManageTabbarState extends State<AddIrisTypeManageTabbar>
|
||||
return TabBar(
|
||||
controller: _tabController,
|
||||
tabs: widget.fromType == 1
|
||||
? _itemTabs.map((ItemView item) => _tab(item)).toList()
|
||||
? _itemTabs.map(_tab).toList()
|
||||
: _fromCheckInTypeItemTabs
|
||||
.map((ItemView item) => _tab(item))
|
||||
.map(_tab)
|
||||
.toList(),
|
||||
isScrollable: true,
|
||||
indicatorColor: Colors.red,
|
||||
|
||||
@ -4,6 +4,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/iris/addIrisType/addIrisType_logic.dart';
|
||||
import 'package:star_lock/main/lockDetail/iris/addIrisType/addIrisType_state.dart';
|
||||
import 'package:star_lock/tools/commonDataManage.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
import 'package:star_lock/tools/pickers/pickers.dart';
|
||||
@ -17,27 +18,22 @@ import '../../../../tools/storage.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class AddIrisTypePage extends StatefulWidget {
|
||||
class AddIrisTypePage extends StatefulWidget { // 从添加员工进入 传入员工名字
|
||||
const AddIrisTypePage(
|
||||
{required this.selectType, required this.lockId, required this.fromType, required this.fromTypeTwoStaffName, Key? key})
|
||||
: super(key: key);
|
||||
final String selectType; // 永久限时循环下标
|
||||
final int lockId;
|
||||
final int fromType; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
final String fromTypeTwoStaffName; // 从添加员工进入 传入员工名字
|
||||
|
||||
const AddIrisTypePage(
|
||||
{Key? key,
|
||||
required this.selectType,
|
||||
required this.lockId,
|
||||
required this.fromType,
|
||||
required this.fromTypeTwoStaffName})
|
||||
: super(key: key);
|
||||
final String fromTypeTwoStaffName;
|
||||
|
||||
@override
|
||||
State<AddIrisTypePage> createState() => _AddIrisTypePageState();
|
||||
}
|
||||
|
||||
class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
||||
final logic = Get.put(AddIrisTypeLogic());
|
||||
final state = Get.find<AddIrisTypeLogic>().state;
|
||||
final AddIrisTypeLogic logic = Get.put(AddIrisTypeLogic());
|
||||
final AddIrisTypeState state = Get.find<AddIrisTypeLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -53,7 +49,6 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
@ -75,10 +70,10 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
||||
{
|
||||
// 永久
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyBottomWidget()
|
||||
],
|
||||
@ -88,10 +83,10 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
||||
{
|
||||
// 限时
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyTimeLimitWidget(),
|
||||
keyBottomWidget()
|
||||
@ -102,10 +97,10 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
||||
{
|
||||
// 循环
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyCyclicDate(),
|
||||
SizedBox(height: 10.h),
|
||||
@ -122,7 +117,7 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
||||
Widget perpetualKeyWidget(
|
||||
String titleStr, String rightTitle, TextEditingController controller) {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Container(height: 10.h),
|
||||
CommonItem(
|
||||
leftTitel: titleStr,
|
||||
@ -137,29 +132,29 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
||||
// 限时顶部选择日期
|
||||
Widget keyTimeLimitWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.beginTime.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
PDuration selectDate =
|
||||
final PDuration selectDate =
|
||||
PDuration.parse(DateTime.tryParse(state.beginTime.value));
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) {
|
||||
state.beginTime.value = DateTool().getYMDHNDateString(p, 1);
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.endTime.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
PDuration selectDate =
|
||||
final PDuration selectDate =
|
||||
PDuration.parse(DateTime.tryParse(state.endTime.value));
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) {
|
||||
state.endTime.value = DateTool().getYMDHNDateString(p, 1);
|
||||
});
|
||||
})),
|
||||
@ -171,15 +166,15 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
||||
// 循环顶部选择日期
|
||||
Widget keyCyclicDate() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
leftTitel: '有效期'.tr,
|
||||
rightTitle: '${state.beginTime.value}\n${state.endTime.value}',
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () async {
|
||||
var result =
|
||||
await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: {
|
||||
final result =
|
||||
await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: <String, Object>{
|
||||
'validityValue': state.weekdaysList.value,
|
||||
'starDate': state.beginTime.value,
|
||||
'endDate': state.endTime.value,
|
||||
@ -195,15 +190,15 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
||||
}
|
||||
})),
|
||||
Obx(() => Visibility(
|
||||
visible: state.weekdaysList.isNotEmpty ? true : false,
|
||||
visible: state.weekdaysList.isNotEmpty,
|
||||
child: CommonItem(
|
||||
leftTitel: '有效日'.tr,
|
||||
rightTitle: logic.weekDayStr.join(',').toString(),
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () async {
|
||||
var result = await Get.toNamed(Routers.seletKeyCyclicDatePage,
|
||||
arguments: {
|
||||
final result = await Get.toNamed(Routers.seletKeyCyclicDatePage,
|
||||
arguments: <String, Object>{
|
||||
'validityValue': state.weekdaysList.value,
|
||||
'starDate': state.beginTime.value,
|
||||
'endDate': state.endTime.value,
|
||||
@ -226,8 +221,8 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
||||
'${state.effectiveDateTime.value}-${state.failureDateTime.value}',
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
var result = await Get.toNamed(Routers.seletKeyCyclicDatePage,
|
||||
arguments: {
|
||||
final result = await Get.toNamed(Routers.seletKeyCyclicDatePage,
|
||||
arguments: <String, Object>{
|
||||
'validityValue': state.weekdaysList.value,
|
||||
'starDate': state.beginTime.value,
|
||||
'endDate': state.endTime.value,
|
||||
@ -249,11 +244,9 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
||||
|
||||
Widget keyBottomWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Obx(() => Visibility(
|
||||
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1
|
||||
? true
|
||||
: false,
|
||||
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1,
|
||||
child: CommonItem(
|
||||
leftTitel: '是否为管理员'.tr,
|
||||
rightTitle: '',
|
||||
@ -265,7 +258,7 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||
onClick: () async {
|
||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
if (state.nameController.text.isEmpty) {
|
||||
logic.showToast('请输入姓名');
|
||||
@ -291,7 +284,7 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
@ -341,7 +334,7 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: state.isAdministrator.value,
|
||||
onChanged: (value) {
|
||||
onChanged: (bool value) {
|
||||
state.isAdministrator.value = value;
|
||||
},
|
||||
);
|
||||
|
||||
@ -48,7 +48,7 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
isHaveDirection: false,
|
||||
isHaveLine: true)),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
leftTitel: '姓名'.tr,
|
||||
rightTitle: state.typeName.value,
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
@ -56,13 +56,11 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
showCupertinoAlertDialog(context);
|
||||
})),
|
||||
Obx(() => Visibility(
|
||||
visible: (state.keyType.value == 4 ||
|
||||
visible: state.keyType.value == 4 ||
|
||||
state.keyType.value == 2 ||
|
||||
state.keyType.value == 1)
|
||||
? true
|
||||
: false,
|
||||
state.keyType.value == 1,
|
||||
child: CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
leftTitel: '有效期'.tr,
|
||||
allHeight: 70.h,
|
||||
// rightTitle:"2023.09.19 11:27\n2023.09.25 11:27",
|
||||
rightTitle: logic.getKeyTypeShowDateTime(),
|
||||
@ -106,7 +104,7 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
}
|
||||
}))),
|
||||
Obx(() => Visibility(
|
||||
visible: state.keyType.value == 4 ? true : false,
|
||||
visible: state.keyType.value == 4,
|
||||
child: Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveDay!.tr,
|
||||
rightTitle: logic.weekDayStr.join(','),
|
||||
@ -157,11 +155,11 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
})))),
|
||||
Container(height: 10.h),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.additive!.tr,
|
||||
leftTitel: '添加者'.tr,
|
||||
rightTitle: state.adder.value,
|
||||
)),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.addTime!.tr,
|
||||
leftTitel: '添加时间'.tr,
|
||||
rightTitle: DateTool()
|
||||
.dateToYMDHNString(state.addTime.value.toString()),
|
||||
)),
|
||||
@ -188,7 +186,7 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
// addControlsBtn(type),
|
||||
SizedBox(height: 30.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
btnName: '删除'.tr,
|
||||
isDelete: true,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(
|
||||
@ -313,8 +311,7 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return ShowTFView(
|
||||
title:
|
||||
"${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}",
|
||||
title: '修改姓名'.tr,
|
||||
tipTitle: '',
|
||||
controller: state.changeNameController,
|
||||
sureClick: () {
|
||||
@ -354,7 +351,6 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
// TODO: implement didChangeDependencies
|
||||
super.didChangeDependencies();
|
||||
|
||||
/// 路由订阅
|
||||
@ -363,7 +359,6 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
/// 取消路由订阅
|
||||
AppRouteObserver().routeObserver.unsubscribe(this);
|
||||
super.dispose();
|
||||
@ -381,7 +376,9 @@ class _CardDetailPageState extends State<CardDetailPage> 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;
|
||||
}
|
||||
@ -398,7 +395,9 @@ class _CardDetailPageState extends State<CardDetailPage> 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;
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ class _IrisListPageState extends State<IrisListPage> {
|
||||
actionsList: [
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.reset!.tr,
|
||||
'重置'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () async {
|
||||
@ -268,7 +268,7 @@ class _IrisListPageState extends State<IrisListPage> {
|
||||
},
|
||||
),
|
||||
CupertinoDialogAction(
|
||||
child: Text(TranslationLoader.lanKeys!.sure!.tr),
|
||||
child: Text('确定'.tr),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
state.isDeletFaceData = true;
|
||||
|
||||
@ -96,7 +96,7 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage>
|
||||
'15S',
|
||||
'30S',
|
||||
'60S',
|
||||
TranslationLoader.lanKeys!.custom!.tr
|
||||
'自定义'.tr
|
||||
];
|
||||
ShowBottomSheetTool().showSingleRowPicker(
|
||||
//上下文
|
||||
@ -106,7 +106,7 @@ class _AutomaticBlockingPageState extends State<AutomaticBlockingPage>
|
||||
title: TranslationLoader.lanKeys!.time!.tr,
|
||||
cancelTitle:
|
||||
TranslationLoader.lanKeys!.cancel!.tr,
|
||||
sureTitle: TranslationLoader.lanKeys!.sure!.tr,
|
||||
sureTitle: '确定'.tr,
|
||||
//要显示的列表
|
||||
data: list,
|
||||
//选择事件的回调
|
||||
|
||||
@ -78,7 +78,7 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
leftTitel: '有效期'.tr,
|
||||
rightTitle: logic.getUseKeyTypeStr(
|
||||
state.lockBasicInfo.value.startDate,
|
||||
state.lockBasicInfo.value.endDate,
|
||||
|
||||
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/lockSet/checkInCreatCompany/checkInCreatCompany_state.dart';
|
||||
|
||||
import '../../../../appRouters.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
@ -21,64 +22,63 @@ class CheckInCreatCompanyPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _CheckInCreatCompanyPageState extends State<CheckInCreatCompanyPage> {
|
||||
final logic = Get.put(CheckInCreatCompanyLogic());
|
||||
final state = Get.find<CheckInCreatCompanyLogic>().state;
|
||||
final CheckInCreatCompanyLogic logic = Get.put(CheckInCreatCompanyLogic());
|
||||
final CheckInCreatCompanyState state = Get.find<CheckInCreatCompanyLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: "创建公司",
|
||||
barTitle: '创建公司',
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: "${TranslationLoader.lanKeys!.company!.tr}${TranslationLoader.lanKeys!.name!.tr}",
|
||||
rightTitle: "",
|
||||
leftTitel: '公司名称'.tr,
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(false, TranslationLoader.lanKeys!.enterYourName!.tr, 2)),
|
||||
rightWidget: getTFWidget(false, '请输入姓名'.tr, 2)),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel:
|
||||
"${TranslationLoader.lanKeys!.work!.tr}${TranslationLoader.lanKeys!.time!.tr}",
|
||||
rightTitle: (state.beginTime.value.isNotEmpty) ? "${state.beginTime.value} - ${state.endTime.value}" : "",
|
||||
'工作时间'.tr,
|
||||
rightTitle: (state.beginTime.value.isNotEmpty) ? '${state.beginTime.value} - ${state.endTime.value}' : '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
var data = await Get.toNamed(Routers.checkingInSetWorkTimePage, arguments: {
|
||||
var data = await Get.toNamed(Routers.checkingInSetWorkTimePage, arguments: <String, Object>{
|
||||
// "getKeyInfosData": state.lockSetInfoData.value,
|
||||
"companyId": "1",
|
||||
"pushType": "0",
|
||||
"checkingInSetInfo": CheckingInSetInfo(),
|
||||
'companyId': '1',
|
||||
'pushType': '0',
|
||||
'checkingInSetInfo': CheckingInSetInfo(),
|
||||
});
|
||||
|
||||
if(data != null) {
|
||||
state.beginTime.value = data["beginTime"];
|
||||
state.endTime.value = data["endTime"];
|
||||
state.beginTimeTimestamp.value = data["beginTimeTimestamp"];
|
||||
state.endTimeTimestamp.value = data["endTimeTimestamp"];
|
||||
state.beginTime.value = data['beginTime'];
|
||||
state.endTime.value = data['endTime'];
|
||||
state.beginTimeTimestamp.value = data['beginTimeTimestamp'];
|
||||
state.endTimeTimestamp.value = data['endTimeTimestamp'];
|
||||
logic.ifCanNext();
|
||||
}
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel:
|
||||
"${TranslationLoader.lanKeys!.workday!.tr}${TranslationLoader.lanKeys!.set!.tr}",
|
||||
leftTitel: '工作日设置'.tr,
|
||||
rightTitle: state.weekDaysStr.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
var data = await Get.toNamed(Routers.checkingInSetWorkdaySet, arguments: {
|
||||
"getKeyInfosData": state.lockSetInfoData.value,
|
||||
"companyId": "0",
|
||||
"pushType": "0",
|
||||
"checkingInSetInfo": CheckingInSetInfo(),
|
||||
var data = await Get.toNamed(Routers.checkingInSetWorkdaySet, arguments: <String, Object>{
|
||||
'getKeyInfosData': state.lockSetInfoData.value,
|
||||
'companyId': '0',
|
||||
'pushType': '0',
|
||||
'checkingInSetInfo': CheckingInSetInfo(),
|
||||
});
|
||||
if(data != null) {
|
||||
state.isCustom.value = data["attendanceType"];
|
||||
state.weekDays.value = data["weekDays"];
|
||||
state.weekDaysStr.value = state.weekDays.value.join(",");
|
||||
state.isCustom.value = data['attendanceType'];
|
||||
state.weekDays.value = data['weekDays'];
|
||||
state.weekDaysStr.value = state.weekDays.value.join(',');
|
||||
logic.ifCanNext();
|
||||
}
|
||||
})),
|
||||
@ -86,16 +86,14 @@ class _CheckInCreatCompanyPageState extends State<CheckInCreatCompanyPage> {
|
||||
height: 30.h,
|
||||
),
|
||||
Obx(() => SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
btnName: '确定'.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
isDelete: false,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 20.w),
|
||||
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
||||
isDisabled: state.canNext.value,
|
||||
onClick: state.canNext.value ? (){
|
||||
logic.setCheckInCreateCompany();
|
||||
}: null)),
|
||||
onClick: state.canNext.value ? logic.setCheckInCreateCompany: null)),
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -106,7 +104,7 @@ class _CheckInCreatCompanyPageState extends State<CheckInCreatCompanyPage> {
|
||||
// height: 50.h,
|
||||
width: 320.w,
|
||||
child: Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller:state.companyNameController,
|
||||
@ -119,7 +117,7 @@ class _CheckInCreatCompanyPageState extends State<CheckInCreatCompanyPage> {
|
||||
style: TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor),
|
||||
autofocus: false,
|
||||
textAlign: TextAlign.end,
|
||||
onChanged: (value) {
|
||||
onChanged: (String value) {
|
||||
logic.ifCanNext();
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
@ -133,15 +131,6 @@ class _CheckInCreatCompanyPageState extends State<CheckInCreatCompanyPage> {
|
||||
border: const OutlineInputBorder(borderSide: BorderSide(width: 0, color: Colors.transparent)),
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 0),
|
||||
),
|
||||
|
||||
// decoration: InputDecoration(
|
||||
// //输入里面输入文字内边距设置
|
||||
// contentPadding: const EdgeInsets.only(top: 12.0, bottom: 8.0),
|
||||
// hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
// hintStyle: TextStyle(fontSize: 22.sp),
|
||||
// //不需要输入框下划线
|
||||
// border: InputBorder.none,
|
||||
// ),
|
||||
),
|
||||
)
|
||||
],
|
||||
|
||||
@ -39,7 +39,7 @@ class _ConfiguringWifiPageState extends State<ConfiguringWifiPage> with RouteAwa
|
||||
Container(width: 1.sw, height: 1.h,color: AppColors.mainBackgroundColor),
|
||||
configuringWifiTFWidget(TranslationLoader.lanKeys!.wifiPassward!.tr, TranslationLoader.lanKeys!.pleaseEnterWifiPwd!.tr, state.wifiPWDController),
|
||||
SizedBox(height: 50.h,),
|
||||
SubmitBtn(btnName: TranslationLoader.lanKeys!.sure!.tr, onClick: () {
|
||||
SubmitBtn(btnName: '确定'.tr, onClick: () {
|
||||
logic.senderConfiguringWifiAction();
|
||||
}),
|
||||
],
|
||||
|
||||
@ -56,7 +56,7 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr, onClick: () {}),
|
||||
btnName: '确定'.tr, onClick: () {}),
|
||||
),
|
||||
SizedBox(
|
||||
height: 40.h,
|
||||
@ -82,7 +82,7 @@ class _ImportOtherLockDataPageState extends State<ImportOtherLockDataPage> {
|
||||
//输入里面输入文字内边距设置
|
||||
contentPadding: const EdgeInsets.only(
|
||||
top: 12.0, left: -19.0, right: -15.0, bottom: 8.0),
|
||||
hintText: TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
hintText: '请输入'.tr,
|
||||
hintStyle: TextStyle(fontSize: 22.sp, height: 3.0),
|
||||
//不需要输入框下划线
|
||||
border: InputBorder.none,
|
||||
|
||||
@ -161,7 +161,7 @@ class _LockSetPageState extends State<LockSetPage>
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 30.h),
|
||||
child: SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
btnName: '删除'.tr,
|
||||
isDelete: true,
|
||||
onClick: () async {
|
||||
// logic.deletUserAction();
|
||||
@ -634,7 +634,7 @@ class _LockSetPageState extends State<LockSetPage>
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 30.h),
|
||||
child: SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
btnName: '删除'.tr,
|
||||
isDelete: true,
|
||||
onClick: () {
|
||||
// logic.deletUserAction();
|
||||
|
||||
@ -76,7 +76,7 @@ class _MarkedHouseStatePageState extends State<MarkedHouseStatePage> {
|
||||
height: 60.h,
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
btnName: '确定'.tr,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||
|
||||
@ -40,7 +40,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
|
||||
children: [
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.normallyOpenMode!.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveLine: false,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: SizedBox(
|
||||
@ -164,28 +164,28 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
|
||||
String dateStr;
|
||||
switch (index) {
|
||||
case 1:
|
||||
dateStr = TranslationLoader.lanKeys!.mondayShort!.tr;
|
||||
dateStr = '简写周一'.tr;
|
||||
break;
|
||||
case 2:
|
||||
dateStr = TranslationLoader.lanKeys!.tuesdayShort!.tr;
|
||||
dateStr = '简写周二'.tr;
|
||||
break;
|
||||
case 3:
|
||||
dateStr = TranslationLoader.lanKeys!.wednesdayShort!.tr;
|
||||
dateStr = '简写周三'.tr;
|
||||
break;
|
||||
case 4:
|
||||
dateStr = TranslationLoader.lanKeys!.thursdayShort!.tr;
|
||||
dateStr = '简写周四'.tr;
|
||||
break;
|
||||
case 5:
|
||||
dateStr = TranslationLoader.lanKeys!.fridayShort!.tr;
|
||||
dateStr = '简写周五'.tr;
|
||||
break;
|
||||
case 6:
|
||||
dateStr = TranslationLoader.lanKeys!.saturdayShort!.tr;
|
||||
dateStr = '简写周六'.tr;
|
||||
break;
|
||||
case 7:
|
||||
dateStr = TranslationLoader.lanKeys!.sundayShort!.tr;
|
||||
dateStr = '简写周日'.tr;
|
||||
break;
|
||||
default:
|
||||
dateStr = "";
|
||||
dateStr = '';
|
||||
break;
|
||||
}
|
||||
return GestureDetector(
|
||||
@ -236,7 +236,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
|
||||
Obx(() => CommonItem(
|
||||
leftTitel:
|
||||
"${TranslationLoader.lanKeys!.normallyOpen!.tr}${TranslationLoader.lanKeys!.time!.tr}",
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: GestureDetector(
|
||||
@ -296,7 +296,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
|
||||
setState(() {
|
||||
state.beginTimeMinute.value =
|
||||
p.hour! * 60 + p.minute!;
|
||||
state.beginTime.value = "${p.hour}:${p.minute!}";
|
||||
state.beginTime.value = '${p.hour}:${p.minute!}';
|
||||
});
|
||||
});
|
||||
})),
|
||||
@ -317,7 +317,7 @@ class _NormallyOpenModePageState extends State<NormallyOpenModePage>
|
||||
setState(() {
|
||||
state.endTimeMinute.value =
|
||||
p.hour! * 60 + p.minute!;
|
||||
state.endTime.value = "${p.hour}:${p.minute!}";
|
||||
state.endTime.value = '${p.hour}:${p.minute!}';
|
||||
});
|
||||
});
|
||||
})),
|
||||
|
||||
@ -60,7 +60,7 @@ class _UnlockQRCodePageState extends State<UnlockQRCodePage> {
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.share!.tr,
|
||||
btnName: '分享'.tr,
|
||||
onClick: () {}),
|
||||
),
|
||||
SizedBox(
|
||||
|
||||
@ -32,7 +32,7 @@ class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
|
||||
actionsList: [
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.reset!.tr,
|
||||
'重置'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () async {
|
||||
@ -157,7 +157,7 @@ class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
|
||||
},
|
||||
),
|
||||
CupertinoDialogAction(
|
||||
child: Text(TranslationLoader.lanKeys!.reset!.tr),
|
||||
child: Text('重置'.tr),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
|
||||
@ -180,8 +180,7 @@ class _AddFamilyPageState extends State<AddFamilyPage> {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return ShowTFView(
|
||||
title:
|
||||
'${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}',
|
||||
title: '修改名字'.tr,
|
||||
tipTitle: '请输入'.tr,
|
||||
controller: state.changeNameController,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -7,7 +8,6 @@ import 'package:star_lock/main/lockDetail/messageWarn/notificationMode/notificat
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/notificationMode/notificationMode_logic.dart';
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/notificationMode/notificationMode_state.dart';
|
||||
import 'package:star_lock/tools/commonItem.dart';
|
||||
import 'package:star_lock/tools/regularExpression.dart';
|
||||
import 'package:star_lock/tools/submitBtn.dart';
|
||||
import 'package:star_lock/translations/trans_lib.dart';
|
||||
|
||||
@ -161,7 +161,7 @@ class _NotificationModePageState extends State<NotificationModePage> {
|
||||
width: 20.w,
|
||||
),
|
||||
Text(
|
||||
TranslationLoader.lanKeys!.receiver!.tr,
|
||||
'接收者'.tr,
|
||||
style: TextStyle(fontSize: 22.sp),
|
||||
),
|
||||
Expanded(child: SizedBox(width: 10.w)),
|
||||
|
||||
@ -2,11 +2,11 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/palm/addPalm/addPalm_logic.dart';
|
||||
import 'package:star_lock/main/lockDetail/palm/addPalm/addPalm_state.dart';
|
||||
|
||||
import '../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../tools/submitBtn.dart';
|
||||
import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class AddPalmPage extends StatefulWidget {
|
||||
const AddPalmPage({Key? key}) : super(key: key);
|
||||
@ -16,19 +16,19 @@ class AddPalmPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _AddPalmPageState extends State<AddPalmPage> {
|
||||
final logic = Get.put(AddPalmLogic());
|
||||
final state = Get.find<AddPalmLogic>().state;
|
||||
final AddPalmLogic logic = Get.put(AddPalmLogic());
|
||||
final AddPalmState state = Get.find<AddPalmLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}手掌",
|
||||
barTitle: '添加手掌',
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
height: 50.h,
|
||||
),
|
||||
@ -47,10 +47,10 @@ class _AddPalmPageState extends State<AddPalmPage> {
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Text(
|
||||
"请自然张开手掌,掌心正对摄像头,距离约一个成年\n人手掌宽度(约10厘米)。",
|
||||
'请自然张开手掌,掌心正对摄像头,距离约一个成年\n人手掌宽度(约10厘米)。',
|
||||
textAlign: TextAlign.left,
|
||||
maxLines: null,
|
||||
style:
|
||||
@ -68,7 +68,7 @@ class _AddPalmPageState extends State<AddPalmPage> {
|
||||
? Container(
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: SubmitBtn(
|
||||
btnName: "准备好了,开始添加",
|
||||
btnName: '准备好了,开始添加',
|
||||
borderRadius: 20.w,
|
||||
onClick: () {
|
||||
state.isClickAddFace.value = true;
|
||||
@ -76,7 +76,7 @@ class _AddPalmPageState extends State<AddPalmPage> {
|
||||
)
|
||||
: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'正在录入中...',
|
||||
style: TextStyle(
|
||||
|
||||
@ -14,25 +14,25 @@ class AddPalmTypeManagePage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _AddPalmTypeManagePageState extends State<AddPalmTypeManagePage> {
|
||||
var index = 0;
|
||||
int index = 0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Map map = Get.arguments;
|
||||
var lockId = map["lockId"];
|
||||
var fromType = map["fromType"]; // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
var fromTypeTwoStaffName = "";
|
||||
final Map map = Get.arguments;
|
||||
final lockId = map['lockId'];
|
||||
final fromType = map['fromType']; // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
String fromTypeTwoStaffName = '';
|
||||
if (fromType == 2) {
|
||||
fromTypeTwoStaffName = map["fromTypeTwoStaffName"]; // 从添加员工进入 传入员工名字
|
||||
fromTypeTwoStaffName = map['fromTypeTwoStaffName']; // 从添加员工进入 传入员工名字
|
||||
}
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: "${TranslationLoader.lanKeys!.addTip!.tr}手掌",
|
||||
barTitle: '添加手掌',
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
AddPalmTypeManageTabbar(
|
||||
lockId: lockId,
|
||||
fromType: fromType,
|
||||
|
||||
@ -7,18 +7,14 @@ import '../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../tools/CustomUnderlineTabIndicator.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class AddPalmTypeManageTabbar extends StatefulWidget {
|
||||
var initialIndex = 1;
|
||||
var lockId = 0;
|
||||
var fromType = 1; // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
var fromTypeTwoStaffName = ""; // 从添加员工进入 传入员工名字
|
||||
class AddPalmTypeManageTabbar extends StatefulWidget { // 从添加员工进入 传入员工名字
|
||||
AddPalmTypeManageTabbar(
|
||||
{Key? key,
|
||||
required this.lockId,
|
||||
required this.fromType,
|
||||
required this.fromTypeTwoStaffName,
|
||||
required this.initialIndex})
|
||||
{required this.lockId, required this.fromType, required this.fromTypeTwoStaffName, required this.initialIndex, Key? key})
|
||||
: super(key: key);
|
||||
int initialIndex = 1;
|
||||
int lockId = 0;
|
||||
int fromType = 1; // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
String fromTypeTwoStaffName = '';
|
||||
|
||||
@override
|
||||
State<AddPalmTypeManageTabbar> createState() =>
|
||||
@ -30,20 +26,18 @@ class _AddPalmTypeManageTabbarState extends State<AddPalmTypeManageTabbar>
|
||||
late TabController _tabController;
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: "1"),
|
||||
ItemView(
|
||||
title: TranslationLoader.lanKeys!.circulation!.tr, selectType: "2"),
|
||||
ItemView(title: '永久'.tr, selectType: '0'),
|
||||
ItemView(title: '限时'.tr, selectType: '1'),
|
||||
ItemView(title: '循环'.tr, selectType: '2'),
|
||||
];
|
||||
|
||||
final List<ItemView> _fromCheckInTypeItemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: "1"),
|
||||
ItemView(title: '永久'.tr, selectType: '0'),
|
||||
ItemView(title: '限时'.tr, selectType: '1'),
|
||||
];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
_tabController = TabController(
|
||||
vsync: this,
|
||||
@ -61,7 +55,7 @@ class _AddPalmTypeManageTabbarState extends State<AddPalmTypeManageTabbar>
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
_tabBar(),
|
||||
_pageWidget(),
|
||||
],
|
||||
@ -72,9 +66,9 @@ class _AddPalmTypeManageTabbarState extends State<AddPalmTypeManageTabbar>
|
||||
return TabBar(
|
||||
controller: _tabController,
|
||||
tabs: widget.fromType == 1
|
||||
? _itemTabs.map((ItemView item) => _tab(item)).toList()
|
||||
? _itemTabs.map(_tab).toList()
|
||||
: _fromCheckInTypeItemTabs
|
||||
.map((ItemView item) => _tab(item))
|
||||
.map(_tab)
|
||||
.toList(),
|
||||
isScrollable: true,
|
||||
indicatorColor: Colors.red,
|
||||
|
||||
@ -4,6 +4,7 @@ import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/palm/addPalmType/addPalmType_logic.dart';
|
||||
import 'package:star_lock/main/lockDetail/palm/addPalmType/addPalmType_state.dart';
|
||||
import 'package:star_lock/tools/commonDataManage.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
import 'package:star_lock/tools/pickers/pickers.dart';
|
||||
@ -17,27 +18,23 @@ import '../../../../tools/storage.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class AddPalmTypePage extends StatefulWidget {
|
||||
class AddPalmTypePage extends StatefulWidget { // 从添加员工进入 传入员工名字
|
||||
|
||||
const AddPalmTypePage(
|
||||
{required this.selectType, required this.lockId, required this.fromType, required this.fromTypeTwoStaffName, Key? key})
|
||||
: super(key: key);
|
||||
final String selectType; // 永久限时循环下标
|
||||
final int lockId;
|
||||
final int fromType; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
final String fromTypeTwoStaffName; // 从添加员工进入 传入员工名字
|
||||
|
||||
const AddPalmTypePage(
|
||||
{Key? key,
|
||||
required this.selectType,
|
||||
required this.lockId,
|
||||
required this.fromType,
|
||||
required this.fromTypeTwoStaffName})
|
||||
: super(key: key);
|
||||
final String fromTypeTwoStaffName;
|
||||
|
||||
@override
|
||||
State<AddPalmTypePage> createState() => _AddPalmTypePageState();
|
||||
}
|
||||
|
||||
class _AddPalmTypePageState extends State<AddPalmTypePage> {
|
||||
final logic = Get.put(AddPalmTypeLogic());
|
||||
final state = Get.find<AddPalmTypeLogic>().state;
|
||||
final AddPalmTypeLogic logic = Get.put(AddPalmTypeLogic());
|
||||
final AddPalmTypeState state = Get.find<AddPalmTypeLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -75,10 +72,10 @@ class _AddPalmTypePageState extends State<AddPalmTypePage> {
|
||||
{
|
||||
// 永久
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyBottomWidget()
|
||||
],
|
||||
@ -88,10 +85,10 @@ class _AddPalmTypePageState extends State<AddPalmTypePage> {
|
||||
{
|
||||
// 限时
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyTimeLimitWidget(),
|
||||
keyBottomWidget()
|
||||
@ -102,10 +99,10 @@ class _AddPalmTypePageState extends State<AddPalmTypePage> {
|
||||
{
|
||||
// 循环
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyCyclicDate(),
|
||||
SizedBox(height: 10.h),
|
||||
@ -122,7 +119,7 @@ class _AddPalmTypePageState extends State<AddPalmTypePage> {
|
||||
Widget perpetualKeyWidget(
|
||||
String titleStr, String rightTitle, TextEditingController controller) {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Container(height: 10.h),
|
||||
CommonItem(
|
||||
leftTitel: titleStr,
|
||||
@ -137,29 +134,29 @@ class _AddPalmTypePageState extends State<AddPalmTypePage> {
|
||||
// 限时顶部选择日期
|
||||
Widget keyTimeLimitWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.beginTime.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
PDuration selectDate =
|
||||
final PDuration selectDate =
|
||||
PDuration.parse(DateTime.tryParse(state.beginTime.value));
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) {
|
||||
state.beginTime.value = DateTool().getYMDHNDateString(p, 1);
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.endTime.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
PDuration selectDate =
|
||||
final PDuration selectDate =
|
||||
PDuration.parse(DateTime.tryParse(state.endTime.value));
|
||||
Pickers.showDatePicker(context,
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||
selectDate: selectDate, mode: DateMode.YMDHM, onConfirm: (PDuration p) {
|
||||
state.endTime.value = DateTool().getYMDHNDateString(p, 1);
|
||||
});
|
||||
})),
|
||||
@ -171,15 +168,15 @@ class _AddPalmTypePageState extends State<AddPalmTypePage> {
|
||||
// 循环顶部选择日期
|
||||
Widget keyCyclicDate() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
leftTitel: '有效期'.tr,
|
||||
rightTitle: '${state.beginTime.value}\n${state.endTime.value}',
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () async {
|
||||
var result =
|
||||
await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: {
|
||||
final result =
|
||||
await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: <String, Object>{
|
||||
'validityValue': state.weekdaysList.value,
|
||||
'starDate': state.beginTime.value,
|
||||
'endDate': state.endTime.value,
|
||||
@ -202,8 +199,8 @@ class _AddPalmTypePageState extends State<AddPalmTypePage> {
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () async {
|
||||
var result = await Get.toNamed(Routers.seletKeyCyclicDatePage,
|
||||
arguments: {
|
||||
final result = await Get.toNamed(Routers.seletKeyCyclicDatePage,
|
||||
arguments: <String, Object>{
|
||||
'validityValue': state.weekdaysList.value,
|
||||
'starDate': state.beginTime.value,
|
||||
'endDate': state.endTime.value,
|
||||
@ -226,8 +223,8 @@ class _AddPalmTypePageState extends State<AddPalmTypePage> {
|
||||
'${state.effectiveDateTime.value}-${state.failureDateTime.value}',
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
var result = await Get.toNamed(Routers.seletKeyCyclicDatePage,
|
||||
arguments: {
|
||||
final result = await Get.toNamed(Routers.seletKeyCyclicDatePage,
|
||||
arguments: <String, Object>{
|
||||
'validityValue': state.weekdaysList.value,
|
||||
'starDate': state.beginTime.value,
|
||||
'endDate': state.endTime.value,
|
||||
@ -249,11 +246,9 @@ class _AddPalmTypePageState extends State<AddPalmTypePage> {
|
||||
|
||||
Widget keyBottomWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Obx(() => Visibility(
|
||||
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1
|
||||
? true
|
||||
: false,
|
||||
visible: CommonDataManage().currentKeyInfo.isLockOwner == 1,
|
||||
child: CommonItem(
|
||||
leftTitel: '是否为管理员'.tr,
|
||||
rightTitle: '',
|
||||
@ -265,7 +260,7 @@ class _AddPalmTypePageState extends State<AddPalmTypePage> {
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.next!.tr,
|
||||
onClick: () async {
|
||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
if (state.nameController.text.isEmpty) {
|
||||
logic.showToast('请输入姓名');
|
||||
@ -291,7 +286,7 @@ class _AddPalmTypePageState extends State<AddPalmTypePage> {
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: TextField(
|
||||
//输入框一行
|
||||
@ -341,7 +336,7 @@ class _AddPalmTypePageState extends State<AddPalmTypePage> {
|
||||
trackColor: CupertinoColors.systemGrey5,
|
||||
thumbColor: CupertinoColors.white,
|
||||
value: state.isAdministrator.value,
|
||||
onChanged: (value) {
|
||||
onChanged: (bool value) {
|
||||
state.isAdministrator.value = value;
|
||||
},
|
||||
);
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
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/iris/irisDetail/irisDetail_logic.dart';
|
||||
import 'package:star_lock/main/lockDetail/iris/irisDetail/irisDetail_state.dart';
|
||||
|
||||
import '../../../../appRouters.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
import '../../../../tools/appRouteObserver.dart';
|
||||
import '../../../../tools/commonItem.dart';
|
||||
import '../../../../tools/dateTool.dart';
|
||||
import '../../../../tools/showIosTipView.dart';
|
||||
import '../../../../tools/showTFView.dart';
|
||||
import '../../../../tools/storage.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
@ -26,8 +26,8 @@ class PalmDetailPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
final logic = Get.put(IrisDetailLogic());
|
||||
final state = Get.find<IrisDetailLogic>().state;
|
||||
final IrisDetailLogic logic = Get.put(IrisDetailLogic());
|
||||
final IrisDetailState state = Get.find<IrisDetailLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -39,14 +39,14 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
backgroundColor: AppColors.mainColor,
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: '手掌号',
|
||||
rightTitle: state.typeNumber.value,
|
||||
isHaveDirection: false,
|
||||
isHaveLine: true)),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
leftTitel: '姓名'.tr,
|
||||
rightTitle: state.typeName.value,
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
@ -54,13 +54,11 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
showCupertinoAlertDialog(context);
|
||||
})),
|
||||
Obx(() => Visibility(
|
||||
visible: (state.keyType.value == 4 ||
|
||||
visible: state.keyType.value == 4 ||
|
||||
state.keyType.value == 2 ||
|
||||
state.keyType.value == 1)
|
||||
? true
|
||||
: false,
|
||||
state.keyType.value == 1,
|
||||
child: CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
leftTitel: '有效期'.tr,
|
||||
allHeight: 70.h,
|
||||
// rightTitle:"2023.09.19 11:27\n2023.09.25 11:27",
|
||||
rightTitle: logic.getKeyTypeShowDateTime(),
|
||||
@ -69,9 +67,9 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
action: () async {
|
||||
if (state.keyType.value == 2 || state.keyType.value == 1) {
|
||||
// 限时
|
||||
var data = await Get.toNamed(
|
||||
final data = await Get.toNamed(
|
||||
Routers.otherTypeKeyChangeDatePage,
|
||||
arguments: {
|
||||
arguments: <String, Object>{
|
||||
'pushType': 0,
|
||||
'fingerprintItemData':
|
||||
state.fingerprintItemData.value,
|
||||
@ -85,9 +83,9 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
}
|
||||
} else if (state.keyType.value == 4) {
|
||||
// 循环
|
||||
var data = await Get.toNamed(
|
||||
final data = await Get.toNamed(
|
||||
Routers.otherTypeKeyChangeValidityDatePage,
|
||||
arguments: {
|
||||
arguments: <String, Object>{
|
||||
'pushType': 0,
|
||||
'fingerprintItemData':
|
||||
state.fingerprintItemData.value,
|
||||
@ -111,9 +109,9 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () async {
|
||||
var data = await Get.toNamed(
|
||||
final data = await Get.toNamed(
|
||||
Routers.otherTypeKeyChangeValidityDatePage,
|
||||
arguments: {
|
||||
arguments: <String, Object>{
|
||||
'pushType': 0,
|
||||
'fingerprintItemData':
|
||||
state.fingerprintItemData.value,
|
||||
@ -129,16 +127,16 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
}
|
||||
})))),
|
||||
Obx(() => Visibility(
|
||||
visible: state.keyType.value == 4 ? true : false,
|
||||
visible: state.keyType.value == 4,
|
||||
child: Obx(() => CommonItem(
|
||||
leftTitel: '有效时间',
|
||||
rightTitle:
|
||||
'${DateTool().dateToHNString(state.starTime.value)}-${DateTool().dateToHNString(state.endTime.value)}',
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
var data = await Get.toNamed(
|
||||
final data = await Get.toNamed(
|
||||
Routers.otherTypeKeyChangeValidityDatePage,
|
||||
arguments: {
|
||||
arguments: <String, Object>{
|
||||
'pushType': 0,
|
||||
'fingerprintItemData':
|
||||
state.fingerprintItemData.value,
|
||||
@ -155,11 +153,11 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
})))),
|
||||
Container(height: 10.h),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.additive!.tr,
|
||||
leftTitel: '添加者'.tr,
|
||||
rightTitle: state.adder.value,
|
||||
)),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.addTime!.tr,
|
||||
leftTitel: '添加时间'.tr,
|
||||
rightTitle: DateTool()
|
||||
.dateToYMDHNString(state.addTime.value.toString()),
|
||||
)),
|
||||
@ -178,7 +176,7 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
// addControlsBtn(type),
|
||||
SizedBox(height: 30.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
btnName: '删除'.tr,
|
||||
isDelete: true,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(
|
||||
@ -197,8 +195,7 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return ShowTFView(
|
||||
title:
|
||||
"${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}",
|
||||
title: '修改姓名'.tr,
|
||||
tipTitle: '',
|
||||
controller: state.changeNameController,
|
||||
sureClick: () {
|
||||
@ -226,7 +223,7 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
tipTitle: '确定要删除吗?',
|
||||
sureClick: () async {
|
||||
Get.back();
|
||||
String? idStr = await Storage.getUid();
|
||||
// String? idStr = await Storage.getUid();
|
||||
logic.senderAddICCard();
|
||||
},
|
||||
cancelClick: () {
|
||||
@ -238,7 +235,6 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
// TODO: implement didChangeDependencies
|
||||
super.didChangeDependencies();
|
||||
|
||||
/// 路由订阅
|
||||
@ -247,7 +243,6 @@ class _PalmDetailPageState extends State<PalmDetailPage> with RouteAware {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
/// 取消路由订阅
|
||||
AppRouteObserver().routeObserver.unsubscribe(this);
|
||||
super.dispose();
|
||||
@ -265,7 +260,9 @@ class _PalmDetailPageState extends State<PalmDetailPage> 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;
|
||||
}
|
||||
@ -282,7 +279,9 @@ class _PalmDetailPageState extends State<PalmDetailPage> 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;
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ class _PalmListPageState extends State<PalmListPage> {
|
||||
actionsList: [
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.reset!.tr,
|
||||
'重置'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () async {
|
||||
@ -268,7 +268,7 @@ class _PalmListPageState extends State<PalmListPage> {
|
||||
},
|
||||
),
|
||||
CupertinoDialogAction(
|
||||
child: Text(TranslationLoader.lanKeys!.sure!.tr),
|
||||
child: Text('确定'.tr),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
state.isDeletFaceData = true;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -6,7 +7,6 @@ import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_logic.dart';
|
||||
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_state.dart';
|
||||
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyList/passwordKeyListEntity.dart';
|
||||
import 'package:star_lock/tools/commonDataManage.dart';
|
||||
import 'package:star_lock/tools/showTFView.dart';
|
||||
import 'package:star_lock/tools/showTipView.dart';
|
||||
|
||||
@ -37,7 +37,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.passwordDetail!.tr,
|
||||
barTitle: '密码详情'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: <Widget>[
|
||||
@ -57,8 +57,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
||||
Obx(() => Visibility(
|
||||
visible: state.itemData.value.isCustom! == 1,
|
||||
child: CommonItem(
|
||||
leftTitel:
|
||||
"${"密码".tr}${TranslationLoader.lanKeys!.number!.tr}",
|
||||
leftTitel: '密码号'.tr,
|
||||
rightTitle: state.itemData.value.pwdUserNo.toString(),
|
||||
isHaveDirection: false,
|
||||
isHaveLine: true),
|
||||
@ -85,7 +84,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
||||
// showCupertinoAlertDialog(
|
||||
// context, state.inputNameController);
|
||||
// })),
|
||||
Obx(() => lockDataListItem(TranslationLoader.lanKeys!.name!.tr,
|
||||
Obx(() => lockDataListItem('姓名'.tr,
|
||||
state.keyboardPwdName.value, () {
|
||||
showCupertinoAlertDialog(
|
||||
context, state.inputNameController);
|
||||
@ -125,12 +124,12 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
||||
// )),
|
||||
Container(height: 10.h),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.sender!.tr,
|
||||
leftTitel: '发送人'.tr,
|
||||
rightTitle: state.itemData.value.senderUsername,
|
||||
isHaveLine: true,
|
||||
action: () {}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.senderTime!.tr,
|
||||
leftTitel: '发送时间'.tr,
|
||||
rightTitle: getSenderDate(state.itemData.value),
|
||||
action: () {}),
|
||||
Container(height: 10.h),
|
||||
@ -174,7 +173,7 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
||||
height: 30.h,
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
btnName: '删除'.tr,
|
||||
isDelete: true,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(
|
||||
@ -288,8 +287,8 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
||||
state.ifCurrentScreen.value = true;
|
||||
return ShowTFView(
|
||||
title: inputController == state.inputNameController
|
||||
? '${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}'
|
||||
: '${TranslationLoader.lanKeys!.amend!.tr}${'密码'.tr}',
|
||||
? '修改姓名'.tr
|
||||
: '修改密码'.tr,
|
||||
tipTitle: inputController.text.isNotEmpty
|
||||
? inputController.text
|
||||
: '请输入6-9位密码',
|
||||
@ -459,7 +458,6 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
// TODO: implement didChangeDependencies
|
||||
super.didChangeDependencies();
|
||||
|
||||
/// 路由订阅
|
||||
@ -468,7 +466,6 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
/// 取消路由订阅
|
||||
AppRouteObserver().routeObserver.unsubscribe(this);
|
||||
super.dispose();
|
||||
|
||||
@ -32,13 +32,13 @@ class _PasswordKeyDetailChangeDatePage extends State<PasswordKeyDetailChangeDate
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: '${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.periodValidity!.tr}',
|
||||
barTitle: '修改有效期'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: <Widget>[
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.sure!.tr,
|
||||
'确定'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () {
|
||||
@ -111,7 +111,7 @@ class _PasswordKeyDetailChangeDatePage extends State<PasswordKeyDetailChangeDate
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.selectEffectiveDate.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -123,7 +123,7 @@ class _PasswordKeyDetailChangeDatePage extends State<PasswordKeyDetailChangeDate
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.selectFailureDate.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
|
||||
@ -61,7 +61,7 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
||||
actionsList: <Widget>[
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.reset!.tr,
|
||||
'重置'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () async {
|
||||
@ -111,7 +111,7 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
||||
height: 20.h,
|
||||
),
|
||||
AddBottomWhiteBtn(
|
||||
btnName: TranslationLoader.lanKeys!.getPassword!.tr,
|
||||
btnName: '获取密码'.tr,
|
||||
onClick: () {
|
||||
Navigator.pushNamed(
|
||||
context, Routers.passwordKeyPerpetualPage,
|
||||
|
||||
@ -64,7 +64,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: TranslationLoader.lanKeys!.getPassword!.tr,
|
||||
barTitle: '获取密码'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
@ -90,8 +90,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
false,
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr,
|
||||
'姓名'.tr,
|
||||
'请给密码命名'.tr,
|
||||
state.nameController),
|
||||
keyBottomWidget(
|
||||
'密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。'
|
||||
@ -109,8 +109,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
keyTimeLimitWidget(),
|
||||
perpetualKeyWidget(
|
||||
false,
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr,
|
||||
'姓名'.tr,
|
||||
'请给密码命名'.tr,
|
||||
state.nameController),
|
||||
keyBottomWidget(
|
||||
'密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。'
|
||||
@ -127,11 +127,11 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
false,
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr,
|
||||
'姓名'.tr,
|
||||
'请给密码命名'.tr,
|
||||
state.nameController),
|
||||
keyBottomWidget(
|
||||
TranslationLoader.lanKeys!.getPasswordTip3!.tr)
|
||||
'密码有限期为6个小时,只能使用一次'.tr)
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -149,8 +149,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
Container(),
|
||||
perpetualKeyWidget(
|
||||
false,
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr,
|
||||
'姓名'.tr,
|
||||
'请给密码命名'.tr,
|
||||
state.nameController),
|
||||
perpetualKeyWidget(
|
||||
false,
|
||||
@ -159,7 +159,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
state.pwdController),
|
||||
keyIfAdministratorWidget(),
|
||||
keyBottomWidget(
|
||||
TranslationLoader.lanKeys!.getPasswordTip4!.tr)
|
||||
'手动输入6-9位数字作为密码。可在锁旁边通过手机蓝牙添加,也可以通过网关远程添加'.tr)
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -173,8 +173,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
keyCirculationWidget(),
|
||||
perpetualKeyWidget(
|
||||
true,
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr,
|
||||
'姓名'.tr,
|
||||
'请给密码命名'.tr,
|
||||
state.nameController),
|
||||
keyBottomWidget(
|
||||
'密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。密码激活后,有效期内不限次数使用。'
|
||||
@ -191,8 +191,8 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
false,
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseNameYourPassword!.tr,
|
||||
'姓名'.tr,
|
||||
'请给密码命名'.tr,
|
||||
state.nameController),
|
||||
keyBottomWidget('清空密码底部提示'.tr)
|
||||
],
|
||||
@ -228,7 +228,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
Visibility(
|
||||
visible: CommonDataManage().currentKeyInfo.vendor != 'XHJ',
|
||||
child: CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.beginTime.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -249,7 +249,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
}),
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.endTime.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -282,7 +282,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.customBeginTime.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -299,7 +299,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
});
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.customEndTime.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -324,7 +324,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.permanent!.tr,
|
||||
leftTitel: '永久'.tr,
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: SizedBox(width: 60.w, height: 50.h, child: _switch())),
|
||||
@ -403,7 +403,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
}),
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.loopEffectiveDate.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -419,7 +419,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
}, hourShow24: true);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.loopFailureDate.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -475,7 +475,7 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
SubmitBtn(
|
||||
btnName: state.widgetType.value == 3
|
||||
? '设置密码'
|
||||
: TranslationLoader.lanKeys!.getPassword!.tr,
|
||||
: '获取密码'.tr,
|
||||
onClick: () async {
|
||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
@ -768,12 +768,12 @@ class _PasswordKeyPerpetualPageState extends State<PasswordKeyPerpetualPage>
|
||||
}
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: '0'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: '1'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.once!.tr, type: '2'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.custom!.tr, type: '3'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.circulation!.tr, type: '4'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.clearAll!.tr, type: '5'),
|
||||
ItemView(title: '永久'.tr, type: '0'),
|
||||
ItemView(title: '限时'.tr, type: '1'),
|
||||
ItemView(title: '单次'.tr, type: '2'),
|
||||
ItemView(title: '自定义'.tr, type: '3'),
|
||||
ItemView(title: '循环'.tr, type: '4'),
|
||||
ItemView(title: '清空'.tr, type: '5'),
|
||||
];
|
||||
|
||||
List<Widget> initBottomSheetList() {
|
||||
|
||||
@ -11,7 +11,6 @@ import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart';
|
||||
import '../../../../appRouters.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../tools/CustomUnderlineTabIndicator.dart';
|
||||
import '../../../../tools/commonDataManage.dart';
|
||||
import '../../../../tools/commonItem.dart';
|
||||
import '../../../../tools/dateTool.dart';
|
||||
import '../../../../tools/storage.dart';
|
||||
@ -78,8 +77,8 @@ class _AddRemoteControlTypePageState extends State<AddRemoteControlTypePage> wit
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyBottomWidget()
|
||||
],
|
||||
@ -93,8 +92,8 @@ class _AddRemoteControlTypePageState extends State<AddRemoteControlTypePage> wit
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyTimeLimitWidget(),
|
||||
// SizedBox(height: 10.h),
|
||||
@ -110,8 +109,8 @@ class _AddRemoteControlTypePageState extends State<AddRemoteControlTypePage> wit
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
perpetualKeyWidget(
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'姓名'.tr,
|
||||
'请输入'.tr,
|
||||
state.nameController),
|
||||
keyCyclicDate(),
|
||||
SizedBox(height: 10.h),
|
||||
@ -145,7 +144,7 @@ class _AddRemoteControlTypePageState extends State<AddRemoteControlTypePage> wit
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.timeLimitBeginTime.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -159,7 +158,7 @@ class _AddRemoteControlTypePageState extends State<AddRemoteControlTypePage> wit
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.timeLimitEndTime.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -181,14 +180,13 @@ class _AddRemoteControlTypePageState extends State<AddRemoteControlTypePage> wit
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
leftTitel: '有效期'.tr,
|
||||
rightTitle:
|
||||
'${state.cycleBeginTime.value}\n${state.cycleEndTime.value}',
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () async {
|
||||
final result =
|
||||
await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: <String, Object>{
|
||||
final result = await Get.toNamed(Routers.seletKeyCyclicDatePage, arguments: <String, Object>{
|
||||
'validityValue': state.weekdaysList.value,
|
||||
'starDate': state.cycleBeginTime.value,
|
||||
'endDate': state.cycleEndTime.value,
|
||||
@ -383,10 +381,9 @@ class _AddRemoteControlTypePageState extends State<AddRemoteControlTypePage> wit
|
||||
}
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, selectType: '0'),
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, selectType: '1'),
|
||||
ItemView(
|
||||
title: TranslationLoader.lanKeys!.circulation!.tr, selectType: '2'),
|
||||
ItemView(title: '永久'.tr, selectType: '0'),
|
||||
ItemView(title: '限时'.tr, selectType: '1'),
|
||||
ItemView(title: '循环'.tr, selectType: '2'),
|
||||
];
|
||||
|
||||
|
||||
|
||||
@ -45,13 +45,8 @@ class _RemoteControlDetailPageState extends State<RemoteControlDetailPage> with
|
||||
rightTitle: state.typeNumber.value,
|
||||
isHaveDirection: false,
|
||||
isHaveLine: true)),
|
||||
Obx(() => lockDataListItem(
|
||||
TranslationLoader.lanKeys!.name!.tr, state.typeName.value,
|
||||
() {
|
||||
ShowTipView().showTFViewAlertDialog(
|
||||
state.changeNameController,
|
||||
'${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.name!.tr}',
|
||||
'', () {
|
||||
Obx(() => lockDataListItem('姓名'.tr, state.typeName.value, () {
|
||||
ShowTipView().showTFViewAlertDialog(state.changeNameController, '修改姓名'.tr, '', () {
|
||||
if (state.changeNameController.text.isEmpty) {
|
||||
logic.showToast('请输入姓名'.tr);
|
||||
return;
|
||||
@ -69,7 +64,7 @@ class _RemoteControlDetailPageState extends State<RemoteControlDetailPage> with
|
||||
state.keyType.value == 2 ||
|
||||
state.keyType.value == 1,
|
||||
child: CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.periodValidity!.tr,
|
||||
leftTitel:'有效期'.tr,
|
||||
allHeight: 70.h,
|
||||
rightTitle: logic.getKeyTypeShowDateTime(),
|
||||
isHaveDirection: true,
|
||||
@ -77,7 +72,7 @@ class _RemoteControlDetailPageState extends State<RemoteControlDetailPage> with
|
||||
action: () async {
|
||||
if (state.keyType.value == 2 || state.keyType.value == 1) {
|
||||
// 限时
|
||||
var data = await Get.toNamed(
|
||||
final data = await Get.toNamed(
|
||||
Routers.otherTypeKeyChangeDatePage,
|
||||
arguments: <String, Object>{
|
||||
'pushType': 2,
|
||||
@ -163,12 +158,12 @@ class _RemoteControlDetailPageState extends State<RemoteControlDetailPage> with
|
||||
})))),
|
||||
Container(height: 10.h),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.additive!.tr,
|
||||
leftTitel: '添加者'.tr,
|
||||
isHaveLine: true,
|
||||
rightTitle: state.adder.value,
|
||||
)),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.addTime!.tr,
|
||||
leftTitel: '添加时间'.tr,
|
||||
rightTitle: DateTool()
|
||||
.dateToYMDHNString(state.addTime.value.toString()),
|
||||
)),
|
||||
@ -205,7 +200,7 @@ class _RemoteControlDetailPageState extends State<RemoteControlDetailPage> with
|
||||
// addControlsBtn(type),
|
||||
SizedBox(height: 30.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
btnName: '删除'.tr,
|
||||
isDelete: true,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(
|
||||
|
||||
@ -62,7 +62,7 @@ class _RemoteControlListPageState extends State<RemoteControlListPage> with Rout
|
||||
actionsList: <Widget>[
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.reset!.tr,
|
||||
'重置'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () async {
|
||||
|
||||
@ -308,7 +308,7 @@ class LockListLogic extends BaseGetXController {
|
||||
content: Text(content),
|
||||
actions: <Widget>[
|
||||
CupertinoDialogAction(
|
||||
child: Text(TranslationLoader.lanKeys!.sure!.tr),
|
||||
child: Text('确定'.tr),
|
||||
onPressed: Get.back,
|
||||
),
|
||||
],
|
||||
|
||||
@ -113,7 +113,7 @@ class _SaveLockPageState extends State<SaveLockPage> with RouteAware {
|
||||
height: 120.h,
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
btnName: '确定'.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(
|
||||
left: 50.w,
|
||||
|
||||
@ -125,8 +125,7 @@ class _GatewayConfigurationWifiPageState
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
_gatewayNamePassward,
|
||||
TranslationLoader
|
||||
.lanKeys!.pleaseEnter!.tr)),
|
||||
'请输入'.tr,)),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader
|
||||
.lanKeys!.alternativeDNS!.tr,
|
||||
@ -135,8 +134,7 @@ class _GatewayConfigurationWifiPageState
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
_gatewayNamePassward,
|
||||
TranslationLoader
|
||||
.lanKeys!.pleaseEnter!.tr)),
|
||||
'请输入'.tr,)),
|
||||
],
|
||||
)),
|
||||
],
|
||||
@ -147,7 +145,7 @@ class _GatewayConfigurationWifiPageState
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
btnName: '确定'.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(
|
||||
left: 30.w, right: 30.w, top: 20.w, bottom: 20.w),
|
||||
|
||||
@ -32,7 +32,7 @@ class _GatewayDetailPageState extends State<GatewayDetailPage> {
|
||||
children: [
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.designation!.tr,
|
||||
rightTitle: "星锁网关",
|
||||
rightTitle: '星锁网关',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -40,17 +40,17 @@ class _GatewayDetailPageState extends State<GatewayDetailPage> {
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.state!.tr,
|
||||
rightTitle: "在线",
|
||||
rightTitle: '在线',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: false),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.wifiName!.tr,
|
||||
rightTitle: "XinHongJia",
|
||||
rightTitle: 'XinHongJia',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: false),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.networkMAC!.tr,
|
||||
rightTitle: "39:23:df:34:12",
|
||||
rightTitle: '39:23:df:34:12',
|
||||
isHaveLine: false,
|
||||
isHaveDirection: false),
|
||||
SizedBox(
|
||||
@ -58,7 +58,7 @@ class _GatewayDetailPageState extends State<GatewayDetailPage> {
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.nearbyLock!.tr,
|
||||
rightTitle: "2",
|
||||
rightTitle: '2',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -66,7 +66,7 @@ class _GatewayDetailPageState extends State<GatewayDetailPage> {
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.gatewayUpgrade!.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveLine: false,
|
||||
isHaveDirection: true,
|
||||
action: () {}),
|
||||
@ -74,7 +74,7 @@ class _GatewayDetailPageState extends State<GatewayDetailPage> {
|
||||
height: 80.h,
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
btnName: '删除'.tr,
|
||||
isDelete: true,
|
||||
borderRadius: 20.w,
|
||||
fontSize: 32.sp,
|
||||
@ -92,9 +92,8 @@ class _GatewayDetailPageState extends State<GatewayDetailPage> {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return ShowTFView(
|
||||
title:
|
||||
"${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}",
|
||||
tipTitle: "请输入",
|
||||
title: '修改姓名'.tr,
|
||||
tipTitle: '请输入',
|
||||
controller: _changeGatewayNameController);
|
||||
});
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ class _SafeVerifyPageState extends State<SafeVerifyPage> {
|
||||
decoration: InputDecoration(
|
||||
contentPadding:
|
||||
const EdgeInsets.only(left: 5, top: -8, bottom: 6),
|
||||
hintText: '${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}',
|
||||
hintText: '请输入验证码'.tr,
|
||||
hintStyle: TextStyle(fontSize: 22.sp, height: 1.0),
|
||||
//不需要输入框下划线
|
||||
border: const OutlineInputBorder(),
|
||||
|
||||
@ -59,12 +59,9 @@ class _MineUnbindPhoneOrEmailState extends State<MineUnbindPhoneOrEmailPage> {
|
||||
onChangeAction: () {
|
||||
logic.checkNext(state.codeController);
|
||||
},
|
||||
label:
|
||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}",
|
||||
label: '请输入验证码'.tr,
|
||||
rightSlot: GestureDetector(
|
||||
onTap: state.canResend.value ?() {
|
||||
logic.sendValidationCode();
|
||||
} : null,
|
||||
onTap: state.canResend.value ?logic.sendValidationCode : null,
|
||||
child: Container(
|
||||
width: 180.w,
|
||||
height: 90.h,
|
||||
|
||||
@ -57,7 +57,7 @@ class _MinePersonInfoEditAccountNextPageState
|
||||
left: 30.w, right: 30.w, top: 10.h, bottom: 10.h),
|
||||
child: TFInputHaveBorder(
|
||||
controller: state.accountController,
|
||||
label: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||
label: '请输入手机号或者邮箱'.tr,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
@ -66,7 +66,7 @@ class _MinePersonInfoEditAccountNextPageState
|
||||
child: TFInputHaveBorder(
|
||||
controller: state.codeController,
|
||||
label:
|
||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}",
|
||||
'请输入验证码'.tr,
|
||||
rightSlot: GestureDetector(
|
||||
child: Container(
|
||||
width: 180.w,
|
||||
@ -79,7 +79,7 @@ class _MinePersonInfoEditAccountNextPageState
|
||||
// ),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'${TranslationLoader.lanKeys!.getTip!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}',
|
||||
'${"获取".tr}${TranslationLoader.lanKeys!.verificationCode!.tr}',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
@ -92,7 +92,7 @@ class _MinePersonInfoEditAccountNextPageState
|
||||
),
|
||||
SizedBox(height: 50.w),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
btnName: '确定'.tr,
|
||||
fontSize: 28.sp,
|
||||
borderRadius: 20.w,
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
|
||||
@ -107,7 +107,7 @@ class _MinePersonInfoEditIphonePageState
|
||||
isPwd: true,
|
||||
leftWidget: const SizedBox(),
|
||||
hintText:
|
||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}",
|
||||
'请输入验证码'.tr,
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
@ -126,7 +126,7 @@ class _MinePersonInfoEditIphonePageState
|
||||
child: Center(
|
||||
child: Text(
|
||||
_seconds == 60
|
||||
? '${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}'
|
||||
? '${"获取".tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}'
|
||||
: (_seconds < 10)
|
||||
? '0$_seconds s'
|
||||
: '$_seconds s',
|
||||
@ -149,7 +149,7 @@ class _MinePersonInfoEditIphonePageState
|
||||
),
|
||||
SizedBox(height: 50.w),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
btnName: '确定'.tr,
|
||||
fontSize: 28.sp,
|
||||
borderRadius: 20.w,
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
|
||||
@ -90,7 +90,7 @@ class _MinePersonInfoEditNamePageState
|
||||
isPwd: false,
|
||||
leftWidget: SizedBox(width: 15.w),
|
||||
hintText:
|
||||
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.nickName!.tr}",
|
||||
"${'请输入'.tr}${TranslationLoader.lanKeys!.nickName!.tr}",
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
|
||||
@ -94,8 +94,8 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
|
||||
},
|
||||
leftWidget: const SizedBox(),
|
||||
hintText: state.channel.value == '1'
|
||||
? '${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.mobileNumber!.tr}'
|
||||
: '${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.email!.tr}',
|
||||
? '${'请输入'.tr}${TranslationLoader.lanKeys!.mobileNumber!.tr}'
|
||||
: '${'请输入'.tr}${TranslationLoader.lanKeys!.email!.tr}',
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
@ -111,7 +111,7 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
|
||||
logic.checkNext(state.codeController);
|
||||
},
|
||||
hintText:
|
||||
'${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}',
|
||||
'${'请输入'.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}',
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(20),
|
||||
]),
|
||||
@ -150,7 +150,7 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
|
||||
SizedBox(height: 50.w),
|
||||
Obx(() {
|
||||
return SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
btnName: '确定'.tr,
|
||||
fontSize: 30.sp,
|
||||
borderRadius: 20.w,
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
|
||||
@ -86,7 +86,7 @@ class _MinePersonInfoSetSafetyProblemPageState
|
||||
Obx(() => Container(
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
btnName: '确定'.tr,
|
||||
isDisabled: state.canSub.value,
|
||||
onClick: () {
|
||||
if (state.isUpdateAnswer.value) {
|
||||
|
||||
@ -57,7 +57,7 @@ class _MinePersonInfoViewSafetyProblemPageState
|
||||
});
|
||||
},
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.amend!.tr,
|
||||
'修改'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
))
|
||||
],
|
||||
@ -89,7 +89,7 @@ class _MinePersonInfoViewSafetyProblemPageState
|
||||
children: [
|
||||
CommonItem(
|
||||
leftTitel: problemTitle,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true),
|
||||
Container(
|
||||
|
||||
@ -129,7 +129,7 @@ class _APPUnlockNeedMobileNetworkingLockPageState extends State<APPUnlockNeedMob
|
||||
}),
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
btnName: '确定'.tr,
|
||||
onClick: () {
|
||||
// if (state.selectLockIdList.isNotEmpty) {
|
||||
logic.setAppUnlockMustOnlineRequest();
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -24,7 +25,7 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
|
||||
TabController? _tabController;
|
||||
final FlutterContactPicker _contactPicker = FlutterContactPicker();
|
||||
late Contact _contact;
|
||||
final _templateNameTf = TextEditingController();
|
||||
final TextEditingController _templateNameTf = TextEditingController();
|
||||
bool isNameSelect = false;
|
||||
bool isDeviceSelect = false;
|
||||
int selectDeviceIndex = 0;
|
||||
@ -32,7 +33,7 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
|
||||
List dataList = [];
|
||||
|
||||
List tabs = [
|
||||
TranslationLoader.lanKeys!.name!.tr,
|
||||
'姓名'.tr,
|
||||
TranslationLoader.lanKeys!.device!.tr
|
||||
];
|
||||
|
||||
@ -85,33 +86,33 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
|
||||
)),
|
||||
),
|
||||
),
|
||||
body: TabBarView(controller: _tabController, children: [
|
||||
dataList.isEmpty ? NoData() : _permissionNameList(),
|
||||
dataList.isEmpty ? NoData() : _permissionDeviceList()
|
||||
body: TabBarView(controller: _tabController, children: <Widget>[
|
||||
if (dataList.isEmpty) NoData() else _permissionNameList(),
|
||||
if (dataList.isEmpty) NoData() else _permissionDeviceList()
|
||||
])));
|
||||
}
|
||||
|
||||
//姓名列表
|
||||
Widget _permissionNameList() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
Expanded(
|
||||
child: ListView.separated(
|
||||
itemBuilder: (context, index) {
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
if (index == 0) {
|
||||
return _buildNameExpandedList(context, index, "张三");
|
||||
return _buildNameExpandedList(context, index, '张三');
|
||||
} else if (index == 1) {
|
||||
return _buildNameExpandedList(context, index, "李四");
|
||||
return _buildNameExpandedList(context, index, '李四');
|
||||
} else if (index == 2) {
|
||||
return _buildNameExpandedList(context, index, "王二");
|
||||
return _buildNameExpandedList(context, index, '王二');
|
||||
} else {
|
||||
return _buildNameExpandedList(context, index, "麻子");
|
||||
return _buildNameExpandedList(context, index, '麻子');
|
||||
}
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
separatorBuilder: (BuildContext context, int index) {
|
||||
return const Divider(
|
||||
height: 1,
|
||||
color: AppColors.greyLineColor,
|
||||
@ -132,24 +133,24 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
|
||||
//设备列表
|
||||
Widget _permissionDeviceList() {
|
||||
return Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
height: 10.h,
|
||||
),
|
||||
Expanded(
|
||||
child: ListView.separated(
|
||||
itemBuilder: (context, index) {
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
if (index == 0) {
|
||||
return _buildDeviceExpandedList(context, index, "大门锁");
|
||||
return _buildDeviceExpandedList(context, index, '大门锁');
|
||||
} else if (index == 1) {
|
||||
return _buildDeviceExpandedList(context, index, "办公室锁");
|
||||
return _buildDeviceExpandedList(context, index, '办公室锁');
|
||||
} else if (index == 2) {
|
||||
return _buildDeviceExpandedList(context, index, "会议室锁");
|
||||
return _buildDeviceExpandedList(context, index, '会议室锁');
|
||||
} else {
|
||||
return _buildDeviceExpandedList(context, index, "宴会厅锁");
|
||||
return _buildDeviceExpandedList(context, index, '宴会厅锁');
|
||||
}
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
separatorBuilder: (BuildContext context, int index) {
|
||||
return const Divider(
|
||||
height: 1,
|
||||
color: AppColors.greyLineColor,
|
||||
@ -181,7 +182,7 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemCount: 10,
|
||||
itemBuilder: (_, index) {
|
||||
itemBuilder: (_, int index) {
|
||||
if (index == 0) {
|
||||
return _buildNameWidget(
|
||||
context, index, 'images/icon_password.png', '张三');
|
||||
@ -222,19 +223,19 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemCount: 5,
|
||||
itemBuilder: (_, index) {
|
||||
itemBuilder: (_, int index) {
|
||||
if (index == 0) {
|
||||
return _buildDeviceWidget(
|
||||
context, index, 'images/icon_lock.png', "大门锁");
|
||||
context, index, 'images/icon_lock.png', '大门锁');
|
||||
} else if (index == 1) {
|
||||
return _buildDeviceWidget(
|
||||
context, index, 'images/icon_lock.png', "办公室锁");
|
||||
context, index, 'images/icon_lock.png', '办公室锁');
|
||||
} else if (index == 2) {
|
||||
return _buildDeviceWidget(
|
||||
context, index, 'images/icon_lock.png', "会议室锁");
|
||||
context, index, 'images/icon_lock.png', '会议室锁');
|
||||
} else {
|
||||
return _buildDeviceWidget(
|
||||
context, index, 'images/icon_lock.png', "宴会厅锁");
|
||||
context, index, 'images/icon_lock.png', '宴会厅锁');
|
||||
}
|
||||
},
|
||||
separatorBuilder: (BuildContext context, int index) {
|
||||
@ -255,7 +256,7 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
|
||||
color: Colors.white,
|
||||
width: ScreenUtil().screenWidth,
|
||||
child: Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
@ -297,7 +298,7 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
|
||||
color: Colors.white,
|
||||
width: ScreenUtil().screenWidth,
|
||||
child: Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
|
||||
@ -9,9 +9,8 @@ import '../../../../../translations/trans_lib.dart';
|
||||
import '../addAuthorizedAdministrator_page.dart';
|
||||
|
||||
class AddAuthorizedAdministratorManageTabbar extends StatefulWidget {
|
||||
var initialIndex = 1;
|
||||
|
||||
AddAuthorizedAdministratorManageTabbar({Key? key, required this.initialIndex}) : super(key: key);
|
||||
AddAuthorizedAdministratorManageTabbar({required this.initialIndex, Key? key}) : super(key: key);
|
||||
int initialIndex = 1;
|
||||
|
||||
@override
|
||||
State<AddAuthorizedAdministratorManageTabbar> createState() => _AddAuthorizedAdministratorManageTabbarState();
|
||||
@ -21,13 +20,12 @@ class _AddAuthorizedAdministratorManageTabbarState extends State<AddAuthorizedAd
|
||||
late TabController _tabController;
|
||||
|
||||
final List<ItemView> _itemTabs = <ItemView>[
|
||||
ItemView(title: TranslationLoader.lanKeys!.timeLimit!.tr, type: "0"),
|
||||
ItemView(title: TranslationLoader.lanKeys!.permanent!.tr, type: "1"),
|
||||
ItemView(title: '限时'.tr, type: '0'),
|
||||
ItemView(title: '永久'.tr, type: '1'),
|
||||
];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
_tabController = TabController(
|
||||
vsync: this,
|
||||
@ -45,7 +43,7 @@ class _AddAuthorizedAdministratorManageTabbarState extends State<AddAuthorizedAd
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
_tabBar(),
|
||||
_pageWidget(),
|
||||
],
|
||||
@ -55,8 +53,8 @@ class _AddAuthorizedAdministratorManageTabbarState extends State<AddAuthorizedAd
|
||||
TabBar _tabBar() {
|
||||
return TabBar(
|
||||
controller: _tabController,
|
||||
tabs: _itemTabs.map((ItemView item) => _tab(item)).toList(),
|
||||
onTap: (index){
|
||||
tabs: _itemTabs.map(_tab).toList(),
|
||||
onTap: (int index){
|
||||
FocusScope.of(context).requestFocus(FocusNode());
|
||||
},
|
||||
isScrollable: true,
|
||||
|
||||
@ -100,7 +100,7 @@ class AddAuthorizedAdministratorLogic extends BaseGetXController {
|
||||
onPressed: Get.back,
|
||||
),
|
||||
CupertinoDialogAction(
|
||||
child: Text(TranslationLoader.lanKeys!.sure!.tr),
|
||||
child: Text('确定'.tr),
|
||||
onPressed: () async {
|
||||
//选择国家代码
|
||||
Get.back();
|
||||
|
||||
@ -64,9 +64,9 @@ class _AddAuthorizedAdministratorPageState
|
||||
height: 10.h,
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.lock!.tr,
|
||||
leftTitel: '锁'.tr,
|
||||
rightTitle: state.lockIdList.value.isEmpty
|
||||
? TranslationLoader.lanKeys!.pleaseSelect!.tr
|
||||
? '请选择'.tr
|
||||
: state.lockIdList.value.length.toString(),
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
@ -124,9 +124,9 @@ class _AddAuthorizedAdministratorPageState
|
||||
keyTimeWidget(),
|
||||
SizedBox(height: 10.h),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.lock!.tr,
|
||||
leftTitel: '锁'.tr,
|
||||
rightTitle: state.lockIdList.value.isEmpty
|
||||
? TranslationLoader.lanKeys!.pleaseSelect!.tr
|
||||
? '请选择'.tr
|
||||
: state.lockIdList.value.length.toString(),
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
@ -183,7 +183,7 @@ class _AddAuthorizedAdministratorPageState
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
true,
|
||||
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||
'请输入手机号或者邮箱'.tr,
|
||||
state.emailOrPhoneController)),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.countryAndRegion!.tr,
|
||||
@ -209,12 +209,12 @@ class _AddAuthorizedAdministratorPageState
|
||||
},
|
||||
),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
leftTitel: '姓名'.tr,
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: getTFWidget(
|
||||
false,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr,
|
||||
'请输入'.tr,
|
||||
state.keyNameController)),
|
||||
],
|
||||
);
|
||||
@ -334,7 +334,7 @@ class _AddAuthorizedAdministratorPageState
|
||||
return Column(
|
||||
children: [
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.beginDate.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -349,7 +349,7 @@ class _AddAuthorizedAdministratorPageState
|
||||
});
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.endDate.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -383,7 +383,7 @@ class _AddAuthorizedAdministratorPageState
|
||||
),
|
||||
),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sender!.tr,
|
||||
btnName: '发送人'.tr,
|
||||
borderRadius: 20.w,
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
@ -428,7 +428,7 @@ class _AddAuthorizedAdministratorPageState
|
||||
|
||||
Widget _buildSureBtn() {
|
||||
return SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
btnName: '确定'.tr,
|
||||
onClick: () {
|
||||
logic.addAuthorizedAdminRequest();
|
||||
},
|
||||
|
||||
@ -32,14 +32,13 @@ class _AdminDetailChangeDatePageState extends State<AdminDetailChangeDatePage> {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle:
|
||||
'${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.periodValidity!.tr}',
|
||||
barTitle: '修改有效期'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.sure!.tr,
|
||||
'确定'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: logic.updateAdministratorRequest,
|
||||
@ -54,7 +53,7 @@ class _AdminDetailChangeDatePageState extends State<AdminDetailChangeDatePage> {
|
||||
return Column(
|
||||
children: [
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.beginTime.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -69,7 +68,7 @@ class _AdminDetailChangeDatePageState extends State<AdminDetailChangeDatePage> {
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.endTime.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -55,7 +56,7 @@ class _AdministratorDetailsPageState extends State<AdministratorDetailsPage> {
|
||||
body: Obx(() => Column(
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.name!.tr,
|
||||
leftTitel: '姓名'.tr,
|
||||
rightTitle: state.nameStr.value,
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
@ -63,7 +64,7 @@ class _AdministratorDetailsPageState extends State<AdministratorDetailsPage> {
|
||||
showCupertinoAlertDialog(context);
|
||||
}),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
allHeight: 90.h,
|
||||
rightTitle: logic.getUseDateStr(),
|
||||
isHaveDirection: true,
|
||||
@ -84,7 +85,7 @@ class _AdministratorDetailsPageState extends State<AdministratorDetailsPage> {
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.lock!.tr,
|
||||
leftTitel: '锁'.tr,
|
||||
rightTitle: state.itemData.value.lockNum.toString(),
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -109,7 +110,7 @@ class _AdministratorDetailsPageState extends State<AdministratorDetailsPage> {
|
||||
child: _onlyManageYouCreatesUserSwitch())),
|
||||
Container(height: 40.h),
|
||||
SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.delete!.tr,
|
||||
btnName: '删除'.tr,
|
||||
borderRadius: 20.w,
|
||||
isDelete: true,
|
||||
margin: EdgeInsets.only(
|
||||
@ -210,7 +211,7 @@ class _AdministratorDetailsPageState extends State<AdministratorDetailsPage> {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return ShowTFView(
|
||||
title: '${TranslationLoader.lanKeys!.amend!.tr} ${TranslationLoader.lanKeys!.name!.tr}',
|
||||
title: '修改姓名'.tr,
|
||||
tipTitle: '请输入'.tr,
|
||||
controller: state.changeNameController,
|
||||
sureClick: () {
|
||||
|
||||
@ -37,7 +37,7 @@ class _GroupEditLockPageState extends State<GroupEditLockPage> {
|
||||
appBar: TitleAppBar(
|
||||
barTitle: state.type == 0
|
||||
? TranslationLoader.lanKeys!.add!.tr
|
||||
: TranslationLoader.lanKeys!.delete!.tr,
|
||||
: '删除'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
@ -61,7 +61,7 @@ class _GroupEditLockPageState extends State<GroupEditLockPage> {
|
||||
Obx(() => Visibility(
|
||||
visible: state.isVip.value,
|
||||
child: SubmitBtn(
|
||||
btnName: TranslationLoader.lanKeys!.sure!.tr,
|
||||
btnName: '确定'.tr,
|
||||
onClick: () async {
|
||||
final List idList = [];
|
||||
for (int i = 0; i < state.lockList.length; i++) {
|
||||
|
||||
@ -139,7 +139,7 @@ class _LockItemListPageState extends State<LockItemListPage> {
|
||||
builder: (BuildContext context) {
|
||||
return AlertBottomWidget(
|
||||
topTitle: '',
|
||||
items: [TranslationLoader.lanKeys!.add!.tr, TranslationLoader.lanKeys!.delete!.tr],
|
||||
items: [TranslationLoader.lanKeys!.add!.tr, '删除'.tr],
|
||||
chooseCallback: (value) {
|
||||
int getSelectIndex = value;
|
||||
if (getSelectIndex == 0) {
|
||||
|
||||
@ -48,7 +48,7 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
|
||||
ShowTipView().showTFViewAlertDialog(
|
||||
state.changeNameController,
|
||||
TranslationLoader.lanKeys!.createNewGroup!.tr,
|
||||
TranslationLoader.lanKeys!.pleaseEnter!.tr, () {
|
||||
'请输入'.tr, () {
|
||||
//发送编辑钥匙名称请求
|
||||
if (state.changeNameController.text.isNotEmpty) {
|
||||
Navigator.of(context).pop();
|
||||
@ -157,7 +157,7 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
|
||||
color: const Color(0xFFF20101),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.delete!.tr,
|
||||
'删除'.tr,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
@ -177,7 +177,7 @@ class _LockGroupListPageState extends State<LockGroupListPage> {
|
||||
// showCupertinoAlertDialog(context, false, groupListItem.keyGroupId!);
|
||||
|
||||
ShowTipView().showTFViewAlertDialog(state.changeNameController,
|
||||
'修改名称'.tr, TranslationLoader.lanKeys!.pleaseEnter!.tr, () {
|
||||
'修改名称'.tr, '请输入'.tr, () {
|
||||
if (state.changeNameController.text.isNotEmpty) {
|
||||
Get.back();
|
||||
logic.editLockGroupRequest(groupListItem.keyGroupId!);
|
||||
|
||||
@ -32,14 +32,13 @@ class _ExpireKeyChangeDatePageState extends State<ExpireKeyChangeDatePage> with
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle:
|
||||
'${TranslationLoader.lanKeys!.amend!.tr}${TranslationLoader.lanKeys!.periodValidity!.tr}',
|
||||
barTitle: '修改有效期'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: <Widget>[
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.sure!.tr,
|
||||
'确定'.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () {
|
||||
@ -92,7 +91,7 @@ class _ExpireKeyChangeDatePageState extends State<ExpireKeyChangeDatePage> with
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.effectiveTime!.tr,
|
||||
leftTitel: '生效时间'.tr,
|
||||
rightTitle: state.beginTime.value,
|
||||
isHaveLine: true,
|
||||
isHaveDirection: true,
|
||||
@ -107,7 +106,7 @@ class _ExpireKeyChangeDatePageState extends State<ExpireKeyChangeDatePage> with
|
||||
});
|
||||
})),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: TranslationLoader.lanKeys!.failureTime!.tr,
|
||||
leftTitel: '失效时间'.tr,
|
||||
rightTitle: state.endTime.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
|
||||
@ -177,25 +177,25 @@ class _ExpireKeyChangeValidityDatePageState extends State<ExpireKeyChangeValidit
|
||||
String dateStr;
|
||||
switch (index) {
|
||||
case 1:
|
||||
dateStr = TranslationLoader.lanKeys!.mondayShort!.tr;
|
||||
dateStr = '简写周一'.tr;
|
||||
break;
|
||||
case 2:
|
||||
dateStr = TranslationLoader.lanKeys!.tuesdayShort!.tr;
|
||||
dateStr = '简写周二'.tr;
|
||||
break;
|
||||
case 3:
|
||||
dateStr = TranslationLoader.lanKeys!.wednesdayShort!.tr;
|
||||
dateStr = '简写周三'.tr;
|
||||
break;
|
||||
case 4:
|
||||
dateStr = TranslationLoader.lanKeys!.thursdayShort!.tr;
|
||||
dateStr = '简写周四'.tr;
|
||||
break;
|
||||
case 5:
|
||||
dateStr = TranslationLoader.lanKeys!.fridayShort!.tr;
|
||||
dateStr = '简写周五'.tr;
|
||||
break;
|
||||
case 6:
|
||||
dateStr = TranslationLoader.lanKeys!.saturdayShort!.tr;
|
||||
dateStr = '简写周六'.tr;
|
||||
break;
|
||||
case 7:
|
||||
dateStr = TranslationLoader.lanKeys!.sundayShort!.tr;
|
||||
dateStr = '简写周日'.tr;
|
||||
break;
|
||||
default:
|
||||
dateStr = '';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user