星锁项目需要国际化字段已经全部寻找完毕 共1024个
This commit is contained in:
parent
5afd588b5c
commit
75c38697b5
@ -968,5 +968,75 @@
|
||||
"快进至": "Fast forward to",
|
||||
"快退至": "Rewind to",
|
||||
"暂无视频信息": "No video information",
|
||||
"加载出错": "Loading error"
|
||||
"加载出错": "Loading error",
|
||||
"距离一个成年人手臂长度": "An adult arm's length away",
|
||||
"(约0.6米)。": "(about 0.6 meters).",
|
||||
"保持脸部无遮挡,露出五官。": "Keep your face unobstructed and show your facial features.",
|
||||
"准备好了,开始添加": "Ready, start adding",
|
||||
"正在录入中...": "Recording...",
|
||||
"添加人脸失败": "Failed to add face",
|
||||
"重置后,该锁的人脸都将被删除哦,确认要重置吗?": "After resetting, the faces of the lock will be deleted. Are you sure you want to reset?",
|
||||
"人脸号": "Face number",
|
||||
"虹膜详情": "Iris details",
|
||||
"虹膜号": "Iris number",
|
||||
"选择设备类型": "Select device type",
|
||||
"照明灯具": "Lighting fixtures",
|
||||
"电动窗帘": "Electric curtains",
|
||||
"门窗传感器": "Door and window sensor",
|
||||
"传感器": "Sensor",
|
||||
"清除数据成功": "Data cleared successfully",
|
||||
"1.锁没有联网,密码、IC卡、指纹等开门记录无法实时上传,可以点击右上角按钮,然后读取记录。": "1. If the lock is not connected to the Internet, the door opening records of passwords, IC cards, fingerprints, etc. cannot be uploaded in real time. You can click the button in the upper right corner and then read the records.",
|
||||
"2.如果您需要保留历史记录,可以点击右上角按钮,然后导出记录": "2. If you need to keep the history, you can click the button in the upper right corner and then export the records",
|
||||
"看不到操作记录,可能原因有": "If you can't see the operation record, the possible reasons are",
|
||||
"操作记录详情": "Operation record details",
|
||||
"操作时间": "Operation time",
|
||||
"此模块功能需要锁联网后设置方可生效": "This module function needs to be set after the lock is connected to the Internet to take effect",
|
||||
"用户已存在": "User already exists",
|
||||
"钥匙数量已到上限": "The number of keys has reached the upper limit",
|
||||
"附近没有可用网关": "There is no available gateway nearby",
|
||||
"正在创建安全连接...": "Creating a secure connection...",
|
||||
"监视状态下不能发送录音": "Cannot send recordings in monitoring mode",
|
||||
"挂断": "Hang up",
|
||||
"监视中暂不能开锁": "Unlocking is not available during monitoring",
|
||||
"长按说话": "Press and hold to speak",
|
||||
"松开发送": "Release to send",
|
||||
"请输入6位数字开锁密码": "Please enter a 6-digit unlock password",
|
||||
"请输入开锁密码": "Please enter the unlock password",
|
||||
"接收者在有效期内可以不限次数使用": "The recipient can use it an unlimited number of times within the validity period",
|
||||
"接收者可以使用此App开关锁": "The recipient can use this App to unlock",
|
||||
"单次钥匙有效期为1小时,只能使用一次": "The validity period of a single key is 1 hour, and it can only be used once",
|
||||
"接收者可以在有效期内的固定时间段里,不限次数使用": "The recipient can use it an unlimited number of times within a fixed time period during the validity period",
|
||||
"获取模板失败": "Failed to get the template",
|
||||
"微信通知": "WeChat notification",
|
||||
"系统短信": "System SMS",
|
||||
"系统邮件": "System email",
|
||||
"模板": "Template",
|
||||
"新建模版": "New template",
|
||||
"您好,您的密码是": "Hello, your password is",
|
||||
"密码名字": "Password name",
|
||||
"请输入6-9位密码": "Please enter a 6-9 digit password",
|
||||
"设置密码": "Set password",
|
||||
"操作成功,密码为": "Operation successful, password is",
|
||||
"类型:自定义-永久": "Type: Custom-Permanent",
|
||||
"实时播放": "Real-time playback",
|
||||
"点击对讲": "Click to intercom",
|
||||
"长按开锁": "Long press to unlock",
|
||||
"接听失败": "Failed to answer",
|
||||
"请在锁设置中开启远程开锁": "Please enable remote unlocking in the lock settings",
|
||||
"接听": "Answer",
|
||||
"截图已保存到相册": "Screenshot saved to album",
|
||||
"添加遥控": "Add remote control",
|
||||
"已连接到锁,请按遥控": "Connected to the lock, please press the remote control",
|
||||
"遥控号": "Remote control number",
|
||||
"遥控详情": "Remote control details",
|
||||
"照明": "Lighting",
|
||||
"退出演示模式": "Exit demo mode",
|
||||
"提示:当前界面为展示界面,添加设备后才能继续使用": "Tip: The current interface is a display interface. After adding the device, you can continue to use it",
|
||||
"门已上锁": "The door is locked",
|
||||
"您已在其他设备登录": "You are logged in on another device",
|
||||
"开门成功": "Open the door successfully",
|
||||
"开门失败": "Failed to open the door",
|
||||
"呼叫提醒": "Call reminder",
|
||||
"收到来自": "Received from",
|
||||
"锁的呼叫": "Lock call"
|
||||
}
|
||||
|
||||
@ -1000,5 +1000,75 @@
|
||||
"快进至": "快进至",
|
||||
"快退至": "快退至",
|
||||
"暂无视频信息": "暂无视频信息",
|
||||
"加载出错": "加载出错"
|
||||
"加载出错": "加载出错",
|
||||
"距离一个成年人手臂长度": "距离一个成年人手臂长度",
|
||||
"(约0.6米)。": "(约0.6米)。",
|
||||
"保持脸部无遮挡,露出五官。": "保持脸部无遮挡,露出五官。",
|
||||
"准备好了,开始添加": "准备好了,开始添加",
|
||||
"正在录入中...": "正在录入中...",
|
||||
"添加人脸失败": "添加人脸失败",
|
||||
"重置后,该锁的人脸都将被删除哦,确认要重置吗?": "重置后,该锁的人脸都将被删除哦,确认要重置吗?",
|
||||
"人脸号": "人脸号",
|
||||
"虹膜详情": "虹膜详情",
|
||||
"虹膜号": "虹膜号",
|
||||
"选择设备类型": "选择设备类型",
|
||||
"照明灯具": "照明灯具",
|
||||
"电动窗帘": "电动窗帘",
|
||||
"门窗传感器": "门窗传感器",
|
||||
"传感器": "传感器",
|
||||
"清除数据成功": "清除数据成功",
|
||||
"1.锁没有联网,密码、IC卡、指纹等开门记录无法实时上传,可以点击右上角按钮,然后读取记录。": "1.锁没有联网,密码、IC卡、指纹等开门记录无法实时上传,可以点击右上角按钮,然后读取记录。",
|
||||
"2.如果您需要保留历史记录,可以点击右上角按钮,然后导出记录": "2.如果您需要保留历史记录,可以点击右上角按钮,然后导出记录",
|
||||
"看不到操作记录,可能原因有": "看不到操作记录,可能原因有",
|
||||
"操作记录详情": "操作记录详情",
|
||||
"操作时间": "操作时间",
|
||||
"此模块功能需要锁联网后设置方可生效": "此模块功能需要锁联网后设置方可生效",
|
||||
"用户已存在": "用户已存在",
|
||||
"钥匙数量已到上限": "钥匙数量已到上限",
|
||||
"附近没有可用网关": "附近没有可用网关",
|
||||
"正在创建安全连接...": "正在创建安全连接...",
|
||||
"监视状态下不能发送录音": "监视状态下不能发送录音",
|
||||
"挂断": "挂断",
|
||||
"监视中暂不能开锁": "监视中暂不能开锁",
|
||||
"长按说话": "长按说话",
|
||||
"松开发送": "松开发送",
|
||||
"请输入6位数字开锁密码": "请输入6位数字开锁密码",
|
||||
"请输入开锁密码": "请输入开锁密码",
|
||||
"接收者在有效期内可以不限次数使用": "接收者在有效期内可以不限次数使用",
|
||||
"接收者可以使用此App开关锁": "接收者可以使用此App开关锁",
|
||||
"单次钥匙有效期为1小时,只能使用一次": "单次钥匙有效期为1小时,只能使用一次",
|
||||
"接收者可以在有效期内的固定时间段里,不限次数使用": "接收者可以在有效期内的固定时间段里,不限次数使用",
|
||||
"获取模板失败": "获取模板失败",
|
||||
"微信通知": "微信通知",
|
||||
"系统短信": "系统短信",
|
||||
"系统邮件": "系统邮件",
|
||||
"模板": "模板",
|
||||
"新建模版": "新建模版",
|
||||
"您好,您的密码是": "您好,您的密码是",
|
||||
"密码名字": "密码名字",
|
||||
"请输入6-9位密码": "请输入6-9位密码",
|
||||
"设置密码": "设置密码",
|
||||
"操作成功,密码为": "操作成功,密码为",
|
||||
"类型:自定义-永久": "类型:自定义-永久",
|
||||
"实时播放": "实时播放",
|
||||
"点击对讲": "点击对讲",
|
||||
"长按开锁": "长按开锁",
|
||||
"接听失败": "接听失败",
|
||||
"请在锁设置中开启远程开锁": "请在锁设置中开启远程开锁",
|
||||
"接听": "接听",
|
||||
"截图已保存到相册": "截图已保存到相册",
|
||||
"添加遥控": "添加遥控",
|
||||
"已连接到锁,请按遥控": "已连接到锁,请按遥控",
|
||||
"遥控号": "遥控号",
|
||||
"遥控详情": "遥控详情",
|
||||
"照明": "照明",
|
||||
"退出演示模式": "退出演示模式",
|
||||
"提示:当前界面为展示界面,添加设备后才能继续使用": "提示:当前界面为展示界面,添加设备后才能继续使用",
|
||||
"门已上锁": "门已上锁",
|
||||
"您已在其他设备登录": "您已在其他设备登录",
|
||||
"开门成功": "开门成功",
|
||||
"开门失败": "开门失败",
|
||||
"呼叫提醒": "呼叫提醒",
|
||||
"收到来自": "收到来自",
|
||||
"锁的呼叫": "锁的呼叫"
|
||||
}
|
||||
|
||||
@ -966,5 +966,75 @@
|
||||
"快进至": "快进至",
|
||||
"快退至": "快退至",
|
||||
"暂无视频信息": "暂无视频信息",
|
||||
"加载出错": "加载出错"
|
||||
"加载出错": "加载出错",
|
||||
"距离一个成年人手臂长度": "距离一个成年人手臂长度",
|
||||
"(约0.6米)。": "(约0.6米)。",
|
||||
"保持脸部无遮挡,露出五官。": "保持脸部无遮挡,露出五官。",
|
||||
"准备好了,开始添加": "准备好了,开始添加",
|
||||
"正在录入中...": "正在录入中...",
|
||||
"添加人脸失败": "添加人脸失败",
|
||||
"重置后,该锁的人脸都将被删除哦,确认要重置吗?": "重置后,该锁的人脸都将被删除哦,确认要重置吗?",
|
||||
"人脸号": "人脸号",
|
||||
"虹膜详情": "虹膜详情",
|
||||
"虹膜号": "虹膜号",
|
||||
"选择设备类型": "选择设备类型",
|
||||
"照明灯具": "照明灯具",
|
||||
"电动窗帘": "电动窗帘",
|
||||
"门窗传感器": "门窗传感器",
|
||||
"传感器": "传感器",
|
||||
"清除数据成功": "清除数据成功",
|
||||
"1.锁没有联网,密码、IC卡、指纹等开门记录无法实时上传,可以点击右上角按钮,然后读取记录。": "1.锁没有联网,密码、IC卡、指纹等开门记录无法实时上传,可以点击右上角按钮,然后读取记录。",
|
||||
"2.如果您需要保留历史记录,可以点击右上角按钮,然后导出记录": "2.如果您需要保留历史记录,可以点击右上角按钮,然后导出记录",
|
||||
"看不到操作记录,可能原因有": "看不到操作记录,可能原因有",
|
||||
"操作记录详情": "操作记录详情",
|
||||
"操作时间": "操作时间",
|
||||
"此模块功能需要锁联网后设置方可生效": "此模块功能需要锁联网后设置方可生效",
|
||||
"用户已存在": "用户已存在",
|
||||
"钥匙数量已到上限": "钥匙数量已到上限",
|
||||
"附近没有可用网关": "附近没有可用网关",
|
||||
"正在创建安全连接...": "正在创建安全连接...",
|
||||
"监视状态下不能发送录音": "监视状态下不能发送录音",
|
||||
"挂断": "挂断",
|
||||
"监视中暂不能开锁": "监视中暂不能开锁",
|
||||
"长按说话": "长按说话",
|
||||
"松开发送": "松开发送",
|
||||
"请输入6位数字开锁密码": "请输入6位数字开锁密码",
|
||||
"请输入开锁密码": "请输入开锁密码",
|
||||
"接收者在有效期内可以不限次数使用": "接收者在有效期内可以不限次数使用",
|
||||
"接收者可以使用此App开关锁": "接收者可以使用此App开关锁",
|
||||
"单次钥匙有效期为1小时,只能使用一次": "单次钥匙有效期为1小时,只能使用一次",
|
||||
"接收者可以在有效期内的固定时间段里,不限次数使用": "接收者可以在有效期内的固定时间段里,不限次数使用",
|
||||
"获取模板失败": "获取模板失败",
|
||||
"微信通知": "微信通知",
|
||||
"系统短信": "系统短信",
|
||||
"系统邮件": "系统邮件",
|
||||
"模板": "模板",
|
||||
"新建模版": "新建模版",
|
||||
"您好,您的密码是": "您好,您的密码是",
|
||||
"密码名字": "密码名字",
|
||||
"请输入6-9位密码": "请输入6-9位密码",
|
||||
"设置密码": "设置密码",
|
||||
"操作成功,密码为": "操作成功,密码为",
|
||||
"类型:自定义-永久": "类型:自定义-永久",
|
||||
"实时播放": "实时播放",
|
||||
"点击对讲": "点击对讲",
|
||||
"长按开锁": "长按开锁",
|
||||
"接听失败": "接听失败",
|
||||
"请在锁设置中开启远程开锁": "请在锁设置中开启远程开锁",
|
||||
"接听": "接听",
|
||||
"截图已保存到相册": "截图已保存到相册",
|
||||
"添加遥控": "添加遥控",
|
||||
"已连接到锁,请按遥控": "已连接到锁,请按遥控",
|
||||
"遥控号": "遥控号",
|
||||
"遥控详情": "遥控详情",
|
||||
"照明": "照明",
|
||||
"退出演示模式": "退出演示模式",
|
||||
"提示:当前界面为展示界面,添加设备后才能继续使用": "提示:当前界面为展示界面,添加设备后才能继续使用",
|
||||
"门已上锁": "门已上锁",
|
||||
"您已在其他设备登录": "您已在其他设备登录",
|
||||
"开门成功": "开门成功",
|
||||
"开门失败": "开门失败",
|
||||
"呼叫提醒": "呼叫提醒",
|
||||
"收到来自": "收到来自",
|
||||
"锁的呼叫": "锁的呼叫"
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -11,7 +12,6 @@ import '../../app_settings/app_colors.dart';
|
||||
import '../../tools/submitBtn.dart';
|
||||
import '../../tools/tf_loginInput.dart';
|
||||
import '../../tools/titleAppBar.dart';
|
||||
import '../../translations/trans_lib.dart';
|
||||
|
||||
class StarLockForgetPasswordPage extends StatefulWidget {
|
||||
const StarLockForgetPasswordPage({Key? key}) : super(key: key);
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -6,11 +7,9 @@ import 'package:star_lock/appRouters.dart';
|
||||
import 'package:star_lock/app_settings/app_colors.dart';
|
||||
import 'package:star_lock/login/forgetPassword/starLock_forgetPassword_logic.dart';
|
||||
import 'package:star_lock/login/forgetPassword/starLock_forgetPassword_state.dart';
|
||||
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||
import 'package:star_lock/tools/submitBtn.dart';
|
||||
import 'package:star_lock/tools/tf_loginInput.dart';
|
||||
import 'package:star_lock/tools/titleAppBar.dart';
|
||||
import 'package:star_lock/translations/trans_lib.dart';
|
||||
|
||||
class StarLockForgetPasswordXHJPage extends StatefulWidget {
|
||||
const StarLockForgetPasswordXHJPage({Key? key}) : super(key: key);
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -9,7 +8,6 @@ import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||
import 'package:star_lock/mine/mine/starLockMine_state.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import 'package:star_lock/tools/push/xs_jPhush.dart';
|
||||
|
||||
import '../../main/lockMian/lockMain/lockMain_logic.dart';
|
||||
import '../../mine/mine/starLockMine_logic.dart';
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -15,7 +16,6 @@ import '../../tools/commonItem.dart';
|
||||
import '../../tools/submitBtn.dart';
|
||||
import '../../tools/tf_loginInput.dart';
|
||||
import '../../tools/titleAppBar.dart';
|
||||
import '../../translations/trans_lib.dart';
|
||||
import 'starLock_login_logic.dart';
|
||||
|
||||
class StarLockLoginPage extends StatefulWidget {
|
||||
|
||||
@ -2,15 +2,20 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class StarLockLoginState {
|
||||
var passwordShow = true.obs;
|
||||
var agree = false.obs;
|
||||
|
||||
var countryCode = '86'.obs;
|
||||
var countryName = '中国'.obs;
|
||||
StarLockLoginState() {
|
||||
// emailOrPhone.value = StoreService.to.getLastUserAccount() as String;
|
||||
emailOrPhoneController.text = emailOrPhone.value;
|
||||
}
|
||||
RxBool passwordShow = true.obs;
|
||||
RxBool agree = false.obs;
|
||||
|
||||
var emailOrPhone = ''.obs;
|
||||
var pwd = ''.obs;
|
||||
var canNext = false.obs;
|
||||
RxString countryCode = '86'.obs;
|
||||
RxString countryName = '中国'.obs;
|
||||
|
||||
RxString emailOrPhone = ''.obs;
|
||||
RxString pwd = ''.obs;
|
||||
RxBool canNext = false.obs;
|
||||
bool get isEmailOrPhone => emailOrPhone.value.isNotEmpty;
|
||||
bool get pwdIsOK => pwd.value.isNotEmpty;
|
||||
|
||||
@ -21,11 +26,6 @@ class StarLockLoginState {
|
||||
FocusNode pwdFocusNode = FocusNode();
|
||||
RxMap<String, dynamic> deviceInfoMap = <String, dynamic>{}.obs;
|
||||
|
||||
StarLockLoginState() {
|
||||
// emailOrPhone.value = StoreService.to.getLastUserAccount() as String;
|
||||
emailOrPhoneController.text = emailOrPhone.value;
|
||||
}
|
||||
|
||||
void onClose() {
|
||||
// emailOrPhoneController.dispose();
|
||||
// pwdController.dispose();
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -13,7 +14,6 @@ import '../../app_settings/app_colors.dart';
|
||||
import '../../common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import '../../tools/submitBtn.dart';
|
||||
import '../../tools/tf_loginInput.dart';
|
||||
import '../../translations/trans_lib.dart';
|
||||
import 'starLock_login_logic.dart';
|
||||
|
||||
class StarLockLoginXHJPage extends StatefulWidget {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@ -150,8 +150,7 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
||||
state.countryName.value = result['countryName'];
|
||||
logic.checkIpAction();
|
||||
}
|
||||
AppLog.log(
|
||||
'路由返回值: $result, countryCode:${logic.state.countryCode}');
|
||||
// AppLog.log('路由返回值: $result, countryCode:${logic.state.countryCode}');
|
||||
},
|
||||
child: Obx(() => SizedBox(
|
||||
height: 70.h,
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -10,7 +11,6 @@ import '../../common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import '../../tools/submitBtn.dart';
|
||||
import '../../tools/tf_loginInput.dart';
|
||||
import '../../tools/titleAppBar.dart';
|
||||
import '../../translations/trans_lib.dart';
|
||||
import 'starLock_register_logic.dart';
|
||||
|
||||
class StarLockRegisterXHJPage extends StatefulWidget {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:azlistview/azlistview.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -10,7 +11,6 @@ import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import '../../app_settings/app_colors.dart';
|
||||
import '../../tools/keySearchWidget.dart';
|
||||
import '../../tools/titleAppBar.dart';
|
||||
import '../../translations/trans_lib.dart';
|
||||
import 'common/index.dart';
|
||||
|
||||
class SelectCountryRegionPage extends StatefulWidget {
|
||||
@ -40,7 +40,7 @@ class _SelectCountryRegionPageState extends State<SelectCountryRegionPage> {
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
countriesList.addAll(entity.dataList!);
|
||||
for(final CountryRegionModel model in countriesList){
|
||||
if(model.name! == '中国'){
|
||||
if(model.name! == '中国'.tr){
|
||||
topCountriesList.add(model);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -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/accessoriesList/accessoriesList_logic.dart';
|
||||
import 'package:star_lock/main/lockDetail/accessoriesList/accessoriesList_state.dart';
|
||||
|
||||
import '../../../app_settings/app_colors.dart';
|
||||
import '../../../baseWidget.dart';
|
||||
@ -16,31 +17,31 @@ class AccessoriesListPage extends StatefulWidget {
|
||||
|
||||
class _AccessoriesListPageState extends State<AccessoriesListPage>
|
||||
with BaseWidget {
|
||||
final logic = Get.put(AccessoriesListLogic());
|
||||
final state = Get.find<AccessoriesListLogic>().state;
|
||||
final AccessoriesListLogic logic = Get.put(AccessoriesListLogic());
|
||||
final AccessoriesListState state = Get.find<AccessoriesListLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: '选择设备类型',
|
||||
barTitle: '选择设备类型'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: ListView(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
_accessoriesItem(
|
||||
'images/main/icon_main_attachment_lighting.png', "照明灯具", true),
|
||||
'images/main/icon_main_attachment_lighting.png', '照明灯具'.tr, true),
|
||||
_accessoriesItem(
|
||||
'images/main/icon_main_attachment_doorOpener.png', "开门器", false),
|
||||
'images/main/icon_main_attachment_doorOpener.png', '开门器'.tr, false),
|
||||
_accessoriesItem(
|
||||
'images/main/icon_main_attachment_ElectricCurtain.png',
|
||||
"电动窗帘",
|
||||
'电动窗帘'.tr,
|
||||
true),
|
||||
_accessoriesItem('images/main/icon_main_attachment_doorSensor.png',
|
||||
"门窗传感器", false),
|
||||
'门窗传感器'.tr, false),
|
||||
_accessoriesItem(
|
||||
'images/main/icon_main_attachment_sensor.png', "传感器", true),
|
||||
'images/main/icon_main_attachment_sensor.png', '传感器'.tr, true),
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -50,7 +51,7 @@ class _AccessoriesListPageState extends State<AccessoriesListPage>
|
||||
Widget _accessoriesItem(String iconStr, String gatewayType, bool isWhite) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
logic.showToast("该功能暂未开放");
|
||||
logic.showToast('功能暂未开放'.tr);
|
||||
},
|
||||
child: Container(
|
||||
color: isWhite == true ? Colors.white : AppColors.mainBackgroundColor,
|
||||
@ -59,7 +60,7 @@ class _AccessoriesListPageState extends State<AccessoriesListPage>
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
width: 30.w,
|
||||
),
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class AccessoriesListState {
|
||||
var getLockType = 1.obs; //0-所有锁;1-门锁;2-NFC无源锁;3-挂锁;4-保险箱锁;5-车位锁;6-智能门禁;7-网关
|
||||
var lockTypeImg = 'images/lockType/addLock_touchScreen.png'.obs; //不同类型锁图片更换
|
||||
RxInt getLockType = 1.obs; //0-所有锁;1-门锁;2-NFC无源锁;3-挂锁;4-保险箱锁;5-车位锁;6-智能门禁;7-网关
|
||||
RxString lockTypeImg = 'images/lockType/addLock_touchScreen.png'.obs; //不同类型锁图片更换
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
@ -117,7 +118,7 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
||||
//发送授权管理员列表请求
|
||||
Future<void> sendElectronicKeyRequest() async {
|
||||
if (state.emailOrPhoneController.text.isEmpty) {
|
||||
showToast('请输入接收者账号');
|
||||
showToast('请输入接收者账号'.tr);
|
||||
return;
|
||||
}
|
||||
// if (state.keyNameController.text.isEmpty) {
|
||||
@ -141,16 +142,16 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
||||
endTime = '0';
|
||||
|
||||
if (startDate.isEmpty) {
|
||||
showToast('请选择开始时间');
|
||||
showToast('请选择开始时间'.tr);
|
||||
return;
|
||||
}
|
||||
if (endDate.isEmpty) {
|
||||
showToast('请选择结束时间');
|
||||
showToast('请选择结束时间'.tr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (int.parse(startDate) >= int.parse(endDate)) {
|
||||
showToast('失效时间要大于生效时间');
|
||||
showToast('失效时间要大于生效时间'.tr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -274,7 +275,7 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
||||
roomStatus: 1,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast('标记成功');
|
||||
showToast('标记成功'.tr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -316,10 +317,10 @@ class AuthorizedAdminLogic extends BaseGetXController {
|
||||
final String template = item.template ?? '';
|
||||
NativeInteractionTool().loadNativeShare(shareText: template);
|
||||
} else {
|
||||
showToast('获取模板失败 0x02');
|
||||
showToast('获取模板失败'.tr);
|
||||
}
|
||||
} else {
|
||||
showToast('获取模板失败 0x01');
|
||||
showToast('获取模板失败'.tr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -20,7 +21,6 @@ import '../../../../tools/NativeInteractionTool.dart';
|
||||
import '../../../../tools/commonItem.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import 'authorizedAdmin_logic.dart';
|
||||
|
||||
class AuthorizedAdminPage extends StatefulWidget {
|
||||
@ -197,7 +197,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
isHaveRightWidget: true,
|
||||
isTipsImg: true,
|
||||
tipsImgAction: () {
|
||||
ShowTipView().showSureAlertDialog('授权管理员只能查看和管理自己下发的钥匙、密码等权限');
|
||||
ShowTipView().showSureAlertDialog('授权管理员只能查看和管理自己下发的钥匙、密码等权限'.tr);
|
||||
},
|
||||
rightWidget: SizedBox(
|
||||
width: 60.w,
|
||||
@ -238,7 +238,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
//发送钥匙请求
|
||||
logic.sendElectronicKeyRequest();
|
||||
} else {
|
||||
logic.showToast('演示模式');
|
||||
logic.showToast('演示模式'.tr);
|
||||
}
|
||||
}),
|
||||
Container(
|
||||
@ -253,7 +253,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
if (isDemoMode == false) {
|
||||
Get.toNamed(Routers.volumeAuthorizationLockManagePage);
|
||||
} else {
|
||||
logic.showToast('演示模式');
|
||||
logic.showToast('演示模式'.tr);
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
@ -328,7 +328,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'发送成功',
|
||||
'发送成功'.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 26.sp,
|
||||
color: Colors.black,
|
||||
@ -353,7 +353,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
),
|
||||
OutLineBtn(
|
||||
btnName:
|
||||
state.emailOrPhoneController.text.contains('@') ? '邮件通知' : '短信通知',
|
||||
state.emailOrPhoneController.text.contains('@') ? '邮件通知'.tr : '短信通知'.tr,
|
||||
onClick: () {
|
||||
Get.toNamed(Routers.sendEmailNotificationPage,
|
||||
arguments: <String, Object?>{
|
||||
@ -369,7 +369,7 @@ class _AuthorizedAdminPageState extends State<AuthorizedAdminPage>
|
||||
height: 10.h,
|
||||
),
|
||||
OutLineBtn(
|
||||
btnName: '微信通知',
|
||||
btnName: '微信通知'.tr,
|
||||
onClick: () {
|
||||
logic.sendMsg(
|
||||
isPhone: state.emailOrPhoneController.text.contains('@'));
|
||||
|
||||
@ -26,13 +26,13 @@ class AuthorizedAdminState {
|
||||
.obs; //默认为当前时间 结束时间
|
||||
|
||||
RxBool isSendSuccess = false.obs;
|
||||
RxString countryName = '中国'.obs;
|
||||
RxString countryName = '中国'.tr.obs;
|
||||
RxString countryCode = '86'.obs;
|
||||
RxList weekdaysList = [].obs;
|
||||
RxInt createUser = 0.obs; //用户未注册时传1 已注册传0
|
||||
|
||||
RxInt seletType = 0.obs;
|
||||
String pwdShareStr = '您好,您的授权管理员生成成功';
|
||||
String pwdShareStr = '您好,您的授权管理员生成成功'.tr;
|
||||
|
||||
RxString addUserId = ''.obs;
|
||||
RxBool isRequireAuth = false.obs; //是否需要实名认证的必填项
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/authorizedAdmin/authorizedAdminList/authorizedAdminList_state.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyEntity.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
||||
@ -44,7 +45,7 @@ class AuthorizedAdminListLogic extends BaseGetXController {
|
||||
final ElectronicKeyListEntity entity = await ApiRepository.to.deleteElectronicKey(
|
||||
keyId: keyId, includeUnderlings: includeUnderlings);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast('删除成功');
|
||||
showToast('删除成功'.tr);
|
||||
pageNo = 1;
|
||||
mockNetworkDataRequest();
|
||||
}
|
||||
|
||||
@ -129,14 +129,14 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
|
||||
onPressed: (BuildContext context) {
|
||||
ShowTipView()
|
||||
.showDeleteAdministratorIsHaveAllDataDialog(
|
||||
'同时删除其发送的所有钥匙,钥匙删除后不能恢复', (bool isAllData) {
|
||||
'同时删除其发送的所有钥匙,钥匙删除后不能恢复'.tr, (bool isAllData) {
|
||||
logic.deleteKeyRequest(indexEntity.keyId.toString(),
|
||||
isAllData ? 1 : 0);
|
||||
});
|
||||
},
|
||||
backgroundColor: Colors.red,
|
||||
foregroundColor: Colors.white,
|
||||
label: '删除',
|
||||
label: '删除'.tr,
|
||||
padding: EdgeInsets.only(left: 5.w, right: 5.w),
|
||||
),
|
||||
],
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/authorizedAdmin/volumeAuthorizationLock/volumeAuthorizationLockManage/volumeAuthorizationLockManage_tabbar.dart';
|
||||
|
||||
import '../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class VolumeAuthorizationLockManagePage extends StatefulWidget {
|
||||
const VolumeAuthorizationLockManagePage({Key? key}) : super(key: key);
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../tools/CustomUnderlineTabIndicator.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
import '../volumeAuthorizationLock_page.dart';
|
||||
|
||||
class VolumeAuthorizationLockManageTabbar extends StatefulWidget {
|
||||
|
||||
@ -13,7 +13,7 @@ class VolumeAuthorizationLockLogic extends BaseGetXController {
|
||||
//发送批量授权管理员
|
||||
Future<void> addAuthorizedAdminRequest() async {
|
||||
if (state.keyNameController.text.isEmpty) {
|
||||
showToast('请输入接收者姓名');
|
||||
showToast('请输入接收者姓名'.tr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -15,7 +16,6 @@ import 'package:star_lock/tools/showTipView.dart';
|
||||
import '../../../../appRouters.dart';
|
||||
import '../../../../tools/commonItem.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import 'volumeAuthorizationLock_logic.dart';
|
||||
|
||||
class VolumeAuthorizationLockPage extends StatefulWidget {
|
||||
@ -203,12 +203,12 @@ class _VolumeAuthorizationLockPageState
|
||||
}),
|
||||
Container(height: 10.h),
|
||||
CommonItem(
|
||||
leftTitel: '仅管理自己创建的用户',
|
||||
leftTitel: '仅管理自己创建的用户'.tr,
|
||||
rightTitle: '',
|
||||
isHaveRightWidget: true,
|
||||
isTipsImg: true,
|
||||
tipsImgAction: () {
|
||||
ShowTipView().showSureAlertDialog('授权管理员只能查看和管理自己下发的钥匙、密码等权限');
|
||||
ShowTipView().showSureAlertDialog('授权管理员只能查看和管理自己下发的钥匙、密码等权限'.tr);
|
||||
},
|
||||
rightWidget: SizedBox(
|
||||
width: 60.w,
|
||||
@ -335,7 +335,7 @@ class _VolumeAuthorizationLockPageState
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'发送成功',
|
||||
'发送成功'.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 26.sp,
|
||||
color: Colors.black,
|
||||
|
||||
@ -18,7 +18,7 @@ class VolumeAuthorizationLockState {
|
||||
RxString selectFailureDate = ''.obs; //失效时间
|
||||
Rx<DateTime> effectiveDateTime = DateTime.now().obs;
|
||||
Rx<DateTime> failureDateTime = DateTime.now().obs;
|
||||
RxString countryName = '中国'.obs;
|
||||
RxString countryName = '中国'.tr.obs;
|
||||
RxString countryCode = '86'.obs;
|
||||
RxString selectWidgetType = '0'.obs;
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
|
||||
import 'package:star_lock/main/lockDetail/checkingIn/checkingInDetail/checkingInDetail_entity.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
|
||||
import '../../../../network/api_repository.dart';
|
||||
@ -10,7 +11,7 @@ class CheckingInDetailLogic extends BaseGetXController{
|
||||
|
||||
// 获取考勤详情
|
||||
Future<void> getCheckInDetailData(BlockLoadSuccssCallback loadSuccssCallback) async{
|
||||
var entity = await ApiRepository.to.getCheckInDetailData(
|
||||
final CheckingInDetailEntity entity = await ApiRepository.to.getCheckInDetailData(
|
||||
companyId: state.companyId.value,
|
||||
attendanceDate:state.checkDate.value.toString(),
|
||||
staffId: state.staffId.value.toString(),
|
||||
|
||||
@ -15,7 +15,7 @@ class CheckingInAddHolidaysLogic extends BaseGetXController{
|
||||
return;
|
||||
}
|
||||
|
||||
LoginEntity entity = await ApiRepository.to.addHolidaysData(
|
||||
final LoginEntity entity = await ApiRepository.to.addHolidaysData(
|
||||
companyId: state.companyId.value,
|
||||
fillClassDate: state.makeUpWorkDate.value.isNotEmpty ? DateTime.parse(state.makeUpWorkDate.value).millisecondsSinceEpoch.toString() : '',
|
||||
vacationEndDate: DateTime.parse(state.endDate.value).millisecondsSinceEpoch.toString(),
|
||||
@ -23,8 +23,9 @@ class CheckingInAddHolidaysLogic extends BaseGetXController{
|
||||
vacationStartDate: DateTime.parse(state.beginDate.value).millisecondsSinceEpoch.toString()
|
||||
);
|
||||
if(entity.errorCode!.codeIsSuccessful){
|
||||
showToast('添加成功');
|
||||
Get.back(result: 'addScuess');
|
||||
showToast('添加成功'.tr, something: (){
|
||||
Get.back(result: 'addScuess');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:date_format/date_format.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -10,7 +11,6 @@ import '../../../../../tools/commonItem.dart';
|
||||
import '../../../../../tools/showCalendar.dart';
|
||||
import '../../../../../tools/submitBtn.dart';
|
||||
import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
import 'checkingInAddHolidays_logic.dart';
|
||||
|
||||
class CheckingInAddHolidaysPage extends StatefulWidget {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import '../../../../../network/api_repository.dart';
|
||||
import 'checkingInDeletHolidays_state.dart';
|
||||
@ -9,11 +10,11 @@ class CheckingInDeletHolidaysLogic extends BaseGetXController{
|
||||
|
||||
// 删除假期
|
||||
Future<void> deletStaffLoadData() async{
|
||||
var entity = await ApiRepository.to.deletHolidaysData(
|
||||
final LoginEntity entity = await ApiRepository.to.deletHolidaysData(
|
||||
vacationId: state.listItem.value.vacationId.toString()
|
||||
);
|
||||
if(entity.errorCode!.codeIsSuccessful){
|
||||
showToast('删除成功');
|
||||
showToast('删除成功'.tr);
|
||||
Get.back(result: 'deletScuess');
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,6 @@ import '../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../tools/commonItem.dart';
|
||||
import '../../../../../tools/dateTool.dart';
|
||||
import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
import 'checkingInDeletHolidays_logic.dart';
|
||||
|
||||
class CheckingInDeletHolidaysPage extends StatefulWidget {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
|
||||
|
||||
import 'package:star_lock/main/lockDetail/checkingIn/checkingInHolidays/checkingInSetHolidays/checkingInSetHolidays_entity.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
|
||||
import '../../../../../network/api_repository.dart';
|
||||
@ -10,7 +11,7 @@ class CheckingInSetHolidaysLogic extends BaseGetXController{
|
||||
|
||||
// 获取员工列表
|
||||
Future<void> editStaffLoadData() async{
|
||||
var entity = await ApiRepository.to.holidaysListData(
|
||||
final CheckingInSetHolidaysInfoDataEntity entity = await ApiRepository.to.holidaysListData(
|
||||
companyId: state.companyId.value,
|
||||
vacationYear: state.selectYear.value.toString(),
|
||||
);
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -13,7 +14,6 @@ import '../../../../../appRouters.dart';
|
||||
import '../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../tools/dateTool.dart';
|
||||
import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
import 'checkingInSetHolidays_entity.dart';
|
||||
import 'checkingInSetHolidays_logic.dart';
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ class _CheckingInListSeletMonthPageState extends State<CheckingInListSeletMonthP
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
AppLog.log('selectYear:${widget.selectYear} selectMonth:${widget.selectMonth}');
|
||||
// AppLog.log('selectYear:${widget.selectYear} selectMonth:${widget.selectMonth}');
|
||||
return Dialog(
|
||||
// insetPadding: EdgeInsets.all(10), //距离
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10.w))), //形状
|
||||
@ -93,7 +93,7 @@ class _CheckingInListSeletMonthPageState extends State<CheckingInListSeletMonthP
|
||||
// color: Colors.blue,
|
||||
borderRadius: BorderRadius.circular(40.w),
|
||||
),
|
||||
child: Text('${index + 1}月', style: TextStyle(fontSize: 24.sp, color: isFutureMonth(widget.selectYear, index + 1) ? Colors.grey : (index+1 == widget.selectMonth ? Colors.white : Colors.black)),
|
||||
child: Text('${index + 1}' + '月'.tr, style: TextStyle(fontSize: 24.sp, color: isFutureMonth(widget.selectYear, index + 1) ? Colors.grey : (index+1 == widget.selectMonth ? Colors.white : Colors.black)),
|
||||
),
|
||||
));
|
||||
},
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:date_format/date_format.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -6,7 +7,6 @@ import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/checkingIn/checkingInList/checkingInListMonth_entity.dart';
|
||||
import 'package:star_lock/main/lockDetail/checkingIn/checkingInList/checkingInList_state.dart';
|
||||
import 'package:star_lock/main/lockMian/entity/lockListInfo_entity.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
|
||||
import '../../../../appRouters.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
@ -15,7 +15,6 @@ import '../../../../tools/showBottomSheetTool.dart';
|
||||
import '../../../../tools/showCalendar.dart';
|
||||
import '../../../../tools/storage.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import 'checkingInListDay_entity.dart';
|
||||
import 'checkingInListSeletMonth_page.dart';
|
||||
import 'checkingInList_logic.dart';
|
||||
@ -172,7 +171,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
|
||||
});
|
||||
} else {
|
||||
// Get.toNamed(Routers.selectLockTypePage);
|
||||
logic.showToast('演示模式');
|
||||
logic.showToast('演示模式'.tr);
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
@ -237,7 +236,7 @@ class _CheckingInListPageState extends State<CheckingInListPage> {
|
||||
});
|
||||
} else {
|
||||
// Get.toNamed(Routers.selectLockTypePage);
|
||||
logic.showToast('演示模式');
|
||||
logic.showToast('演示模式'.tr);
|
||||
}
|
||||
},
|
||||
child: Row(
|
||||
|
||||
@ -66,7 +66,7 @@ class CheckingInSetLogic extends BaseGetXController {
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.companyName.value = state.changeNameController.text;
|
||||
showToast('修改成功');
|
||||
showToast('修改成功'.tr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -12,7 +13,6 @@ import '../../../../tools/showTFView.dart';
|
||||
import '../../../../tools/showTipView.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import 'checkingInSet_logic.dart';
|
||||
|
||||
class CheckingInSetPage extends StatefulWidget {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
|
||||
import '../../../../network/api_repository.dart';
|
||||
@ -10,7 +11,7 @@ class CheckingInSetWorkTimeLogic extends BaseGetXController{
|
||||
|
||||
// 编辑考勤设置信息
|
||||
Future<void> editCheckInSetInfoData() async{
|
||||
var entity = await ApiRepository.to.editCheckInSetInfoData(
|
||||
final LoginEntity entity = await ApiRepository.to.editCheckInSetInfoData(
|
||||
attendanceType: state.checkingInSetInfo.value.attendanceType.toString(),
|
||||
companyId: state.checkingInSetInfo.value.companyId.toString(),
|
||||
type: '2',
|
||||
@ -20,7 +21,7 @@ class CheckingInSetWorkTimeLogic extends BaseGetXController{
|
||||
workDay:state.checkingInSetInfo.value.workDay!,
|
||||
);
|
||||
if(entity.errorCode!.codeIsSuccessful){
|
||||
showToast('修改成功', something: (){
|
||||
showToast('修改成功'.tr, something: (){
|
||||
Get.back(result: 'scuess');
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -11,7 +12,6 @@ import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../tools/commonItem.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import 'checkingInSetWorkTime_logic.dart';
|
||||
|
||||
class CheckingInSetWorkTimePage extends StatefulWidget {
|
||||
@ -85,18 +85,18 @@ class _CheckingInSetWorkTimePageState extends State<CheckingInSetWorkTimePage> {
|
||||
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
||||
onClick: () {
|
||||
if (state.beginTimeTimestamp.value.isEmpty) {
|
||||
logic.showToast('请选择开始时间');
|
||||
logic.showToast('请选择开始时间'.tr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (state.endTimeTimestamp.value.isEmpty) {
|
||||
logic.showToast('请选择结束时间');
|
||||
logic.showToast('请选择结束时间'.tr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (int.parse(state.beginTimeTimestamp.value) >=
|
||||
int.parse(state.endTimeTimestamp.value)) {
|
||||
logic.showToast('结束时间必须要比开始时间晚,请重新选择');
|
||||
logic.showToast('结束时间不能小于开始时间哦'.tr);
|
||||
return;
|
||||
}
|
||||
if (state.pushType.value == '2') {
|
||||
|
||||
@ -21,7 +21,7 @@ class CheckingInSetWorkdaySetLogic extends BaseGetXController{
|
||||
workDay:state.weekDays.value,
|
||||
);
|
||||
if(entity.errorCode!.codeIsSuccessful){
|
||||
showToast('修改成功', something: (){
|
||||
showToast('修改成功'.tr, something: (){
|
||||
eventBus.fire(RefreshCheckInSetDataEvent());
|
||||
Get.back(result: <String, Object>{
|
||||
'attendanceType':state.isCustom.value,
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -7,7 +8,6 @@ import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../tools/commonItem.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import 'checkingInSetWorkdaySet_logic.dart';
|
||||
|
||||
class CheckingInSetWorkdaySet extends StatefulWidget {
|
||||
|
||||
@ -170,8 +170,7 @@ class _CheckingInAddStaffPageState extends State<CheckingInAddStaffPage> {
|
||||
final dynamic data = await Get.toNamed(
|
||||
Routers.addCardPage,
|
||||
arguments: <String, Object?>{
|
||||
'lockId':
|
||||
state.getKeyInfosData.value.lockId,
|
||||
'lockId': state.getKeyInfosData.value.lockId,
|
||||
'fromType': 2, // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
'fromTypeTwoStaffName':
|
||||
state.staffNameController.text
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -12,7 +13,6 @@ import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
||||
import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart';
|
||||
import 'package:star_lock/tools/submitBtn.dart';
|
||||
import 'package:star_lock/tools/titleAppBar.dart';
|
||||
import 'package:star_lock/translations/trans_lib.dart';
|
||||
|
||||
class BatchExportLogPage extends StatefulWidget {
|
||||
const BatchExportLogPage({Key? key}) : super(key: key);
|
||||
|
||||
@ -25,7 +25,7 @@ class _DoorLockLogDetailPageState extends State<DoorLockLogDetailPage> {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: '操作记录详情',
|
||||
barTitle: '操作记录详情'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
),
|
||||
@ -36,7 +36,7 @@ class _DoorLockLogDetailPageState extends State<DoorLockLogDetailPage> {
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(20.w),
|
||||
child: Text('操作时间:${DateTool().dateIntToYMDHNString(state.timelineDataItem.value.operateDate)}', style: TextStyle(fontSize: 23.sp)),
|
||||
child: Text('操作时间'.tr +':${DateTool().dateIntToYMDHNString(state.timelineDataItem.value.operateDate)}', style: TextStyle(fontSize: 23.sp)),
|
||||
),
|
||||
Container(
|
||||
width: 1.sw,
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:star_lock/app_settings/app_settings.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_entity.dart';
|
||||
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_state.dart';
|
||||
@ -195,7 +196,7 @@ class DoorLockLogLogic extends BaseGetXController {
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.operateDate = entity.data!.operateDate! ~/ 1000;
|
||||
state.currentDate = entity.data!.currentDate! ~/ 1000;
|
||||
AppLog.log('entity.data!.currentDate!:${entity.data!.currentDate!} currentDate:${state.currentDate}');
|
||||
// AppLog.log('entity.data!.currentDate!:${entity.data!.currentDate!} currentDate:${state.currentDate}');
|
||||
senderReferEventRecordTime();
|
||||
}
|
||||
}
|
||||
@ -220,7 +221,7 @@ class DoorLockLogLogic extends BaseGetXController {
|
||||
.clearOperationRecord(
|
||||
CommonDataManage().currentKeyInfo.lockId.toString());
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast('清除数据成功', something: () {
|
||||
showToast('清除数据成功'.tr, something: () {
|
||||
pageNo = 1;
|
||||
mockNetworkDataRequest(isRefresh: true);
|
||||
});
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -19,7 +20,6 @@ import 'package:timelines/timelines.dart';
|
||||
import '../../../app_settings/app_colors.dart';
|
||||
import '../../../tools/appRouteObserver.dart';
|
||||
import '../../../tools/titleAppBar.dart';
|
||||
import '../../../translations/trans_lib.dart';
|
||||
|
||||
class DoorLockLogPage extends StatefulWidget {
|
||||
const DoorLockLogPage({Key? key}) : super(key: key);
|
||||
@ -53,8 +53,8 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
|
||||
),
|
||||
onTap: () {
|
||||
ShowTipView().showSureAlertDialog(
|
||||
'1.锁没有联网,密码、IC卡、指纹等开门记录无法实时上传,可以点击右上角按钮,然后读取记录。\n2.如果您需要保留历史记录,可以点击右上角按钮,然后导出记录',
|
||||
tipTitle: '看不到操作记录,可能原因有',
|
||||
'1.锁没有联网,密码、IC卡、指纹等开门记录无法实时上传,可以点击右上角按钮,然后读取记录。'.tr +'\n' + '2.如果您需要保留历史记录,可以点击右上角按钮,然后导出记录'.tr,
|
||||
tipTitle: '看不到操作记录,可能原因有'.tr,
|
||||
sureStr: '我知道了'.tr);
|
||||
},
|
||||
)),
|
||||
@ -66,13 +66,13 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
|
||||
color: Colors.black,
|
||||
itemBuilder: (BuildContext context) {
|
||||
return <PopupMenuEntry<String>>[
|
||||
_buildCustomPopupMenuItem('读取记录'),
|
||||
_buildCustomPopupMenuItem('读取记录'.tr),
|
||||
if (CommonDataManage().currentKeyInfo.isLockOwner == 1)
|
||||
const PopupMenuDivider(),
|
||||
if (CommonDataManage().currentKeyInfo.isLockOwner == 1)
|
||||
_buildCustomPopupMenuItem('清空记录'),
|
||||
_buildCustomPopupMenuItem('清空记录'.tr),
|
||||
const PopupMenuDivider(),
|
||||
_buildCustomPopupMenuItem('导出记录'),
|
||||
_buildCustomPopupMenuItem('导出记录'.tr),
|
||||
];
|
||||
},
|
||||
icon: Image.asset(
|
||||
@ -121,36 +121,57 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
|
||||
}
|
||||
|
||||
void _onMenuItemSelected(String value) {
|
||||
switch (value) {
|
||||
case '读取记录':
|
||||
{
|
||||
logic.mockNetworkDataRequest(isRefresh: true);
|
||||
}
|
||||
break;
|
||||
case '清空记录':
|
||||
{
|
||||
ShowCupertinoAlertView().showClearOperationRecordAlert(
|
||||
clearClick: () {
|
||||
if(value == '读取记录'.tr){
|
||||
logic.mockNetworkDataRequest(isRefresh: true);
|
||||
}else if(value == '清空记录'.tr){
|
||||
ShowCupertinoAlertView().showClearOperationRecordAlert(
|
||||
clearClick: () {
|
||||
logic.clearOperationRecordRequest();
|
||||
});
|
||||
}
|
||||
break;
|
||||
case '导出记录':
|
||||
{
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return ExportRecordDialog(
|
||||
onExport: (String filePath) {
|
||||
Get.toNamed(Routers.exportSuccessPage,
|
||||
arguments: <String, String>{'filePath': filePath});
|
||||
},
|
||||
);
|
||||
}else if(value == '导出记录'.tr){
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return ExportRecordDialog(
|
||||
onExport: (String filePath) {
|
||||
Get.toNamed(Routers.exportSuccessPage,
|
||||
arguments: <String, String>{'filePath': filePath});
|
||||
},
|
||||
);
|
||||
}
|
||||
break;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// switch (value) {
|
||||
// case "读取记录".tr:
|
||||
// {
|
||||
// logic.mockNetworkDataRequest(isRefresh: true);
|
||||
// }
|
||||
// break;
|
||||
// case '清空记录'.tr:
|
||||
// {
|
||||
// ShowCupertinoAlertView().showClearOperationRecordAlert(
|
||||
// clearClick: () {
|
||||
// logic.clearOperationRecordRequest();
|
||||
// });
|
||||
// }
|
||||
// break;
|
||||
// case '导出记录':
|
||||
// {
|
||||
// showDialog(
|
||||
// context: context,
|
||||
// builder: (BuildContext context) {
|
||||
// return ExportRecordDialog(
|
||||
// onExport: (String filePath) {
|
||||
// Get.toNamed(Routers.exportSuccessPage,
|
||||
// arguments: <String, String>{'filePath': filePath});
|
||||
// },
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
|
||||
//顶部日历小部件
|
||||
@ -338,7 +359,6 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
// TODO: implement didChangeDependencies
|
||||
super.didChangeDependencies();
|
||||
|
||||
/// 路由订阅
|
||||
@ -347,7 +367,6 @@ class _DoorLockLogPageState extends State<DoorLockLogPage> with RouteAware {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
/// 取消路由订阅
|
||||
AppRouteObserver().routeObserver.unsubscribe(this);
|
||||
super.dispose();
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_entity.dart';
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/app_settings/app_colors.dart';
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/appRouters.dart';
|
||||
@ -425,21 +426,4 @@ class ElectronicKeyDetailLogic extends BaseGetXController {
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
super.onReady();
|
||||
}
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
// TODO: implement onInit
|
||||
super.onInit();
|
||||
}
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
// TODO: implement onClose
|
||||
super.onClose();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,50 +2,40 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity/ElectronicKeyListEntity.dart';
|
||||
|
||||
class ElectronicKeyDetailState {
|
||||
final itemData = ElectronicKeyListItem().obs;
|
||||
// final keyInfo = LockListInfoItemEntity().obs;
|
||||
|
||||
final keyName = "".obs;
|
||||
final TextEditingController changeNameController = TextEditingController();
|
||||
final TextEditingController changeRealNameController =
|
||||
TextEditingController();
|
||||
final TextEditingController changeIDCardController = TextEditingController();
|
||||
|
||||
var starDate = "".obs; // 开始时间
|
||||
var endDate = "".obs; // 结束时间
|
||||
var starTime = "".obs; // 生效时间
|
||||
var endTime = "".obs; // 失效时间
|
||||
final keyType = 0.obs; // 永久:1;限时2,单次3,循环:4
|
||||
var weekDay = [].obs; // 有效日
|
||||
|
||||
var onlyManageYouCreatesUser = false.obs; // 0:可以管理所有用户 1:只能管理自己创建的用户
|
||||
var isRemoteUnlock = false.obs; //是否允许远程开锁 0:不允许 1:允许
|
||||
var isRealNameAuth = false.obs; //是否实名认证 0:不需要 1:需要
|
||||
var getRealName = ''.obs; //真实姓名
|
||||
var getIDCardNumber = ''.obs; //身份证号
|
||||
var isRequireAuth = false.obs; //是否必须输入身份信息
|
||||
class ElectronicKeyDetailState { //是否必须输入身份信息
|
||||
|
||||
ElectronicKeyDetailState() {
|
||||
Map map = Get.arguments;
|
||||
itemData.value = map["itemData"];
|
||||
itemData.value = map['itemData'];
|
||||
// if(map["keyInfo"]!=null){
|
||||
// keyInfo.value = map["keyInfo"];
|
||||
// }
|
||||
changeNameController.text = itemData.value.keyName!;
|
||||
keyName.value = itemData.value.keyName!;
|
||||
if (itemData.value.userIdCard != null) {
|
||||
getRealName.value = itemData.value.userIdCard!.realName ?? "";
|
||||
getRealName.value = itemData.value.userIdCard!.realName ?? '';
|
||||
changeRealNameController.text = getRealName.value;
|
||||
getIDCardNumber.value = itemData.value.userIdCard!.idCardNumber ?? "";
|
||||
getIDCardNumber.value = itemData.value.userIdCard!.idCardNumber ?? '';
|
||||
changeIDCardController.text = getIDCardNumber.value;
|
||||
}
|
||||
|
||||
isRemoteUnlock.value = itemData.value.remoteEnable! == 1 ? true : false;
|
||||
isRealNameAuth.value =
|
||||
itemData.value.faceAuthentication == 1 ? true : false;
|
||||
onlyManageYouCreatesUser.value =
|
||||
itemData.value.isOnlyManageSelf! == 0 ? false : true;
|
||||
if (itemData.value.remoteEnable! == 1) {
|
||||
isRemoteUnlock.value = true;
|
||||
} else {
|
||||
isRemoteUnlock.value = false;
|
||||
}
|
||||
|
||||
if (itemData.value.faceAuthentication == 1) {
|
||||
isRealNameAuth.value = true;
|
||||
} else {
|
||||
isRealNameAuth.value = false;
|
||||
}
|
||||
|
||||
if (itemData.value.isOnlyManageSelf! == 0) {
|
||||
onlyManageYouCreatesUser.value = false;
|
||||
} else {
|
||||
onlyManageYouCreatesUser.value = true;
|
||||
}
|
||||
|
||||
starDate.value = itemData.value.startDate!.toString();
|
||||
endDate.value = itemData.value.endDate!.toString();
|
||||
@ -54,4 +44,26 @@ class ElectronicKeyDetailState {
|
||||
weekDay.value = itemData.value.weekDays!;
|
||||
keyType.value = itemData.value.keyType!;
|
||||
}
|
||||
final Rx<ElectronicKeyListItem> itemData = ElectronicKeyListItem().obs;
|
||||
// final keyInfo = LockListInfoItemEntity().obs;
|
||||
|
||||
final RxString keyName = ''.obs;
|
||||
final TextEditingController changeNameController = TextEditingController();
|
||||
final TextEditingController changeRealNameController =
|
||||
TextEditingController();
|
||||
final TextEditingController changeIDCardController = TextEditingController();
|
||||
|
||||
RxString starDate = ''.obs; // 开始时间
|
||||
RxString endDate = ''.obs; // 结束时间
|
||||
RxString starTime = ''.obs; // 生效时间
|
||||
RxString endTime = ''.obs; // 失效时间
|
||||
final RxInt keyType = 0.obs; // 永久:1;限时2,单次3,循环:4
|
||||
RxList weekDay = [].obs; // 有效日
|
||||
|
||||
RxBool onlyManageYouCreatesUser = false.obs; // 0:可以管理所有用户 1:只能管理自己创建的用户
|
||||
RxBool isRemoteUnlock = false.obs; //是否允许远程开锁 0:不允许 1:允许
|
||||
RxBool isRealNameAuth = false.obs; //是否实名认证 0:不需要 1:需要
|
||||
RxString getRealName = ''.obs; //真实姓名
|
||||
RxString getIDCardNumber = ''.obs; //身份证号
|
||||
RxBool isRequireAuth = false.obs;
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/electronicKeyDetailChangeDate/electronicKeyDetailChangeDate_state.dart';
|
||||
import 'package:star_lock/network/api_repository.dart';
|
||||
@ -14,18 +15,18 @@ class ElectronicKeyDetailChangeDateLogic extends BaseGetXController {
|
||||
//编辑电子钥匙有效期请求
|
||||
Future<void> updateKeyDateRequest() async {
|
||||
|
||||
var beginTimeTimestamp = DateTool().dateToTimestamp(state.beginTime.value, 1);
|
||||
var endTimeTimestamp = DateTool().dateToTimestamp(state.endTime.value, 1);
|
||||
final int beginTimeTimestamp = DateTool().dateToTimestamp(state.beginTime.value, 1);
|
||||
final int endTimeTimestamp = DateTool().dateToTimestamp(state.endTime.value, 1);
|
||||
if (beginTimeTimestamp > endTimeTimestamp || beginTimeTimestamp == endTimeTimestamp) {
|
||||
showToast("失效时间需大于生效时间".tr);
|
||||
showToast('失效时间需大于生效时间'.tr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (endTimeTimestamp < DateTime.now().millisecondsSinceEpoch) {
|
||||
showToast("生效时间需大于当前时间".tr);
|
||||
showToast('生效时间需大于当前时间'.tr);
|
||||
return;
|
||||
}
|
||||
KeyOperationRecordEntity entity = await ApiRepository.to.updateKeyDate(
|
||||
final KeyOperationRecordEntity entity = await ApiRepository.to.updateKeyDate(
|
||||
keyId:state.keyId.value.toString(),
|
||||
lockId:state.lockId.value.toString(),
|
||||
endDate:endTimeTimestamp.toString(),
|
||||
@ -38,12 +39,12 @@ class ElectronicKeyDetailChangeDateLogic extends BaseGetXController {
|
||||
remoteEnable: state.remoteEnable!.value
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast("修改成功".tr, something: () {
|
||||
showToast('修改成功'.tr, something: () {
|
||||
eventBus.fire(ElectronicKeyListRefreshUI());
|
||||
eventBus.fire(AuthorizedAdminPageRefreshUI());
|
||||
Get.back(result: {
|
||||
"beginTimeTimestamp": beginTimeTimestamp,
|
||||
"endTimeTimestamp": endTimeTimestamp,
|
||||
'beginTimeTimestamp': beginTimeTimestamp,
|
||||
'endTimeTimestamp': endTimeTimestamp,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -11,7 +12,6 @@ import '../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../tools/commonItem.dart';
|
||||
import '../../../../../tools/dateTool.dart';
|
||||
import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class ElectronicKeyDetailChangeDate extends StatefulWidget {
|
||||
const ElectronicKeyDetailChangeDate({Key? key}) : super(key: key);
|
||||
|
||||
@ -6,25 +6,13 @@ import 'package:star_lock/mine/mineSet/lockUserManage/expireLockList/expireElect
|
||||
import '../../../../../tools/dateTool.dart';
|
||||
|
||||
class ElectronicKeyDetailChangeDateState {
|
||||
final itemData = ElectronicKeyListItem().obs;
|
||||
final expireLockItem = ExpireLockItem().obs;
|
||||
|
||||
var beginTime = "".obs;// 开始时间
|
||||
var endTime = "".obs;// 结束时间
|
||||
|
||||
var pushType = 0.obs;// 0电子钥匙 1授权管理员
|
||||
|
||||
var keyId = 0.obs;
|
||||
var lockId = 0.obs;
|
||||
var isOnlyManageSelf = 0.obs;
|
||||
var remoteEnable = 0.obs;
|
||||
|
||||
ElectronicKeyDetailChangeDateState() {
|
||||
Map map = Get.arguments;
|
||||
if ((map["itemData"] != null)) {
|
||||
itemData.value = map["itemData"];
|
||||
if(map["pushType"] != null){
|
||||
pushType.value = map["pushType"];
|
||||
if (map['itemData'] != null) {
|
||||
itemData.value = map['itemData'];
|
||||
if(map['pushType'] != null){
|
||||
pushType.value = map['pushType'];
|
||||
}
|
||||
|
||||
keyId.value = itemData.value.keyId!;
|
||||
@ -41,8 +29,8 @@ class ElectronicKeyDetailChangeDateState {
|
||||
}
|
||||
}
|
||||
|
||||
if ((map["expireLockItem"] != null)) {
|
||||
expireLockItem.value = map["expireLockItem"];
|
||||
if (map['expireLockItem'] != null) {
|
||||
expireLockItem.value = map['expireLockItem'];
|
||||
|
||||
keyId.value = expireLockItem.value.keyId!;
|
||||
lockId.value = expireLockItem.value.lockId!;
|
||||
@ -59,4 +47,16 @@ class ElectronicKeyDetailChangeDateState {
|
||||
}
|
||||
|
||||
}
|
||||
final Rx<ElectronicKeyListItem> itemData = ElectronicKeyListItem().obs;
|
||||
final Rx<ExpireLockItem> expireLockItem = ExpireLockItem().obs;
|
||||
|
||||
RxString beginTime = ''.obs;// 开始时间
|
||||
RxString endTime = ''.obs;// 结束时间
|
||||
|
||||
RxInt pushType = 0.obs;// 0电子钥匙 1授权管理员
|
||||
|
||||
RxInt keyId = 0.obs;
|
||||
RxInt lockId = 0.obs;
|
||||
RxInt isOnlyManageSelf = 0.obs;
|
||||
RxInt remoteEnable = 0.obs;
|
||||
}
|
||||
|
||||
@ -1,8 +1,4 @@
|
||||
class KeyPeriodValidityModel {
|
||||
late String validityText; //有效期时间
|
||||
late int validityIndex; //有效期的index
|
||||
late bool isValidity; //是否选中为有效
|
||||
late int validityValue; //有效期值
|
||||
class KeyPeriodValidityModel { //有效期值
|
||||
|
||||
KeyPeriodValidityModel(this.validityText, this.validityIndex, this.isValidity,
|
||||
this.validityValue);
|
||||
@ -13,6 +9,10 @@ class KeyPeriodValidityModel {
|
||||
isValidity = json['isValidity'];
|
||||
validityValue = json['validityValue'];
|
||||
}
|
||||
late String validityText; //有效期时间
|
||||
late int validityIndex; //有效期的index
|
||||
late bool isValidity; //是否选中为有效
|
||||
late int validityValue;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
|
||||
@ -13,21 +14,21 @@ class ElectronicKeyPeriodValidityLogic extends BaseGetXController {
|
||||
//编辑电子钥匙有效期请求
|
||||
Future<void> updateKeyDateRequest() async {
|
||||
|
||||
var starDateTimestamp = DateTool().dateToTimestamp(state.starDate.value, 1);
|
||||
var endDateTimestamp = DateTool().dateToTimestamp(state.endDate.value, 1);
|
||||
var starTimeTimestamp = DateTool().dateToTimestamp(state.starTime.value, 0);
|
||||
var endTimeTimestamp = DateTool().dateToTimestamp(state.endTime.value, 0);
|
||||
final int starDateTimestamp = DateTool().dateToTimestamp(state.starDate.value, 1);
|
||||
final int endDateTimestamp = DateTool().dateToTimestamp(state.endDate.value, 1);
|
||||
final int starTimeTimestamp = DateTool().dateToTimestamp(state.starTime.value, 0);
|
||||
final int endTimeTimestamp = DateTool().dateToTimestamp(state.endTime.value, 0);
|
||||
|
||||
if (starDateTimestamp >= endDateTimestamp) {
|
||||
showToast("失效日期要大于生效日期".tr);
|
||||
showToast('失效日期要大于生效日期'.tr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (starTimeTimestamp >= endTimeTimestamp) {
|
||||
showToast("失效时间要大于生效时间".tr);
|
||||
showToast('失效时间要大于生效时间'.tr);
|
||||
return;
|
||||
}
|
||||
KeyOperationRecordEntity entity = await ApiRepository.to.updateKeyDate(
|
||||
final KeyOperationRecordEntity entity = await ApiRepository.to.updateKeyDate(
|
||||
keyId:state.keyId.value.toString(),
|
||||
lockId:state.lockId.value.toString(),
|
||||
endDate:endDateTimestamp.toString(),
|
||||
@ -39,15 +40,15 @@ class ElectronicKeyPeriodValidityLogic extends BaseGetXController {
|
||||
isOnlyManageSelf: state.isOnlyManageSelf.value!,
|
||||
remoteEnable: state.remoteEnable.value!);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast("修改成功".tr, something: () {
|
||||
showToast('修改成功'.tr, something: () {
|
||||
eventBus.fire(ElectronicKeyListRefreshUI());
|
||||
eventBus.fire(AuthorizedAdminPageRefreshUI());
|
||||
Get.back(result: {
|
||||
"starDate":starDateTimestamp.toString(),
|
||||
"endDate":endDateTimestamp.toString(),
|
||||
"starTime":starTimeTimestamp.toString(),
|
||||
"endTime":endTimeTimestamp.toString(),
|
||||
"validityValue":state.weekDay.value,
|
||||
Get.back(result: <String, Object>{
|
||||
'starDate':starDateTimestamp.toString(),
|
||||
'endDate':endDateTimestamp.toString(),
|
||||
'starTime':starTimeTimestamp.toString(),
|
||||
'endTime':endTimeTimestamp.toString(),
|
||||
'validityValue':state.weekDay.value,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -11,7 +12,6 @@ import '../../../../../tools/commonItem.dart';
|
||||
import '../../../../../tools/dateTool.dart';
|
||||
import '../../../../../tools/submitBtn.dart';
|
||||
import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
import 'electronicKeyPeriodValidity_logic.dart';
|
||||
|
||||
class ElectronicKeyPeriodValidityPage extends StatefulWidget {
|
||||
|
||||
@ -6,30 +6,13 @@ import 'package:star_lock/mine/mineSet/lockUserManage/expireLockList/expireElect
|
||||
import '../../../../../tools/dateTool.dart';
|
||||
|
||||
class ElectronicKeyPeriodValidityState {
|
||||
TextEditingController searchController = TextEditingController(); //邮箱/手机号输入框
|
||||
final itemData = ElectronicKeyListItem().obs;
|
||||
final expireLockItem = ExpireLockItem().obs;
|
||||
|
||||
var starDate = "".obs;// 开始时间
|
||||
var endDate = "".obs;// 结束时间
|
||||
var starTime = "".obs;// 生效时间
|
||||
var endTime = "".obs;// 失效时间
|
||||
|
||||
var pushType = 0.obs;// 0电子钥匙 1授权管理员
|
||||
var weekDay = [].obs;
|
||||
|
||||
var keyId = 0.obs;
|
||||
var lockId = 0.obs;
|
||||
var isOnlyManageSelf = 0.obs;
|
||||
var remoteEnable = 0.obs;
|
||||
var keyType = 0.obs;
|
||||
ElectronicKeyPeriodValidityState() {
|
||||
Map map = Get.arguments;
|
||||
if ((map["itemData"] != null)) {
|
||||
itemData.value = map["itemData"];
|
||||
if (map['itemData'] != null) {
|
||||
itemData.value = map['itemData'];
|
||||
|
||||
if(map["pushType"] != null){
|
||||
pushType.value = map["pushType"];
|
||||
if(map['pushType'] != null){
|
||||
pushType.value = map['pushType'];
|
||||
}
|
||||
|
||||
keyId.value = itemData.value.keyId!;
|
||||
@ -45,8 +28,8 @@ class ElectronicKeyPeriodValidityState {
|
||||
weekDay.value = itemData.value.weekDays!;
|
||||
}
|
||||
|
||||
if ((map["expireLockItem"] != null)) {
|
||||
expireLockItem.value = map["expireLockItem"];
|
||||
if (map['expireLockItem'] != null) {
|
||||
expireLockItem.value = map['expireLockItem'];
|
||||
|
||||
keyId.value = expireLockItem.value.keyId!;
|
||||
lockId.value = expireLockItem.value.lockId!;
|
||||
@ -62,4 +45,21 @@ class ElectronicKeyPeriodValidityState {
|
||||
}
|
||||
|
||||
}
|
||||
TextEditingController searchController = TextEditingController(); //邮箱/手机号输入框
|
||||
final Rx<ElectronicKeyListItem> itemData = ElectronicKeyListItem().obs;
|
||||
final Rx<ExpireLockItem> expireLockItem = ExpireLockItem().obs;
|
||||
|
||||
RxString starDate = ''.obs;// 开始时间
|
||||
RxString endDate = ''.obs;// 结束时间
|
||||
RxString starTime = ''.obs;// 生效时间
|
||||
RxString endTime = ''.obs;// 失效时间
|
||||
|
||||
RxInt pushType = 0.obs;// 0电子钥匙 1授权管理员
|
||||
RxList weekDay = [].obs;
|
||||
|
||||
RxInt keyId = 0.obs;
|
||||
RxInt lockId = 0.obs;
|
||||
RxInt isOnlyManageSelf = 0.obs;
|
||||
RxInt remoteEnable = 0.obs;
|
||||
RxInt keyType = 0.obs;
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||
@ -18,7 +19,6 @@ import '../../../../tools/keySearchWidget.dart';
|
||||
import '../../../../tools/showTipView.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class ElectronicKeyListPage extends StatefulWidget {
|
||||
const ElectronicKeyListPage({Key? key}) : super(key: key);
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -8,7 +9,6 @@ import 'package:star_lock/main/lockDetail/electronicKey/sendElectronicKey/sendEl
|
||||
|
||||
import '../../../../../tools/CustomUnderlineTabIndicator.dart';
|
||||
import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class SendElectronicKeyPage extends StatefulWidget {
|
||||
const SendElectronicKeyPage({Key? key}) : super(key: key);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class SendElectronicKeyState {
|
||||
late TabController tabController;
|
||||
@ -7,10 +8,9 @@ class SendElectronicKeyState {
|
||||
final FlutterContactPicker contactPicker = FlutterContactPicker();
|
||||
late Contact contact;
|
||||
|
||||
final timeLimitTips = '接收者在有效期内可以不限次数使用'; //限时
|
||||
final permanentTips = '接收者可以使用此App开关锁'; //永久
|
||||
final onceLimitTips = '单次钥匙有效期为1小时,只能使用一次'; //单次
|
||||
final cycleLimitTips = '接收者可以在有效期内的固定时间段里,不限次数使用'; //循环
|
||||
final String timeLimitTips = '接收者在有效期内可以不限次数使用'.tr; //限时
|
||||
final String permanentTips = '接收者可以使用此App开关锁'.tr; //永久
|
||||
final String onceLimitTips = '单次钥匙有效期为1小时,只能使用一次'.tr; //单次
|
||||
final String cycleLimitTips = '接收者可以在有效期内的固定时间段里,不限次数使用'.tr; //循环
|
||||
|
||||
SendElectronicKeyState() {}
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ class SendElectronicKeyViewLogic extends BaseGetXController {
|
||||
|
||||
List<dynamic> get weekDayStr {
|
||||
return state.weekdaysList
|
||||
.map((e) => TimeUtils.translateWeekday(e))
|
||||
.map((int e) => TimeUtils.translateWeekday(e))
|
||||
.toList();
|
||||
}
|
||||
|
||||
@ -47,10 +47,10 @@ class SendElectronicKeyViewLogic extends BaseGetXController {
|
||||
return;
|
||||
}
|
||||
|
||||
var startDate = '0';
|
||||
var endDate = '0';
|
||||
var startTime = '0';
|
||||
var endTime = '0';
|
||||
String startDate = '0';
|
||||
String endDate = '0';
|
||||
String startTime = '0';
|
||||
String endTime = '0';
|
||||
int typeValue;
|
||||
switch (type) {
|
||||
case '0':
|
||||
@ -267,10 +267,10 @@ class SendElectronicKeyViewLogic extends BaseGetXController {
|
||||
final String template = item.template ?? '';
|
||||
NativeInteractionTool().loadNativeShare(shareText: template);
|
||||
} else {
|
||||
showToast('获取模板失败 0x02');
|
||||
showToast('获取模板失败'.tr);
|
||||
}
|
||||
} else {
|
||||
showToast('获取模板失败 0x01');
|
||||
showToast('获取模板失败'.tr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -287,7 +287,7 @@ class SendElectronicKeyViewLogic extends BaseGetXController {
|
||||
state.cycleEndTime = ''; // 循环结束时间
|
||||
state.effectiveDateTime = ''; // 生效时间
|
||||
state.failureDateTime = ''; // 失效时间
|
||||
state.weekdaysList = [];
|
||||
state.weekdaysList = <int>[];
|
||||
state.createUser.value = 0;
|
||||
update();
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -19,7 +20,6 @@ import 'package:star_lock/tools/pickers/time_picker/model/date_mode.dart';
|
||||
import 'package:star_lock/tools/pickers/time_picker/model/pduration.dart';
|
||||
import 'package:star_lock/tools/showTipView.dart';
|
||||
import 'package:star_lock/tools/submitBtn.dart';
|
||||
import 'package:star_lock/translations/trans_lib.dart';
|
||||
|
||||
class SendElectronicKeyView extends StatefulWidget {
|
||||
|
||||
@ -418,7 +418,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
),
|
||||
if (logic.emailOrPhone != null)
|
||||
OutLineBtn(
|
||||
btnName: logic.state.userNameType.value == 1 ? '短信通知' : '邮件通知',
|
||||
btnName: logic.state.userNameType.value == 1 ? '短信通知'.tr : '邮件通知'.tr,
|
||||
onClick: () {
|
||||
Get.toNamed(Routers.sendEmailNotificationPage,
|
||||
arguments: <String, Object?>{
|
||||
@ -434,7 +434,7 @@ class _SendElectronicKeyViewState extends State<SendElectronicKeyView>
|
||||
),
|
||||
if (logic.emailOrPhone != null)
|
||||
OutLineBtn(
|
||||
btnName: '微信通知',
|
||||
btnName: '微信通知'.tr,
|
||||
onClick: () {
|
||||
logic.sendMsg(isPhone: logic.emailOrPhone!.contains('@'));
|
||||
},
|
||||
|
||||
@ -40,7 +40,7 @@ class SendEmailNotificationLogic extends BaseGetXController {
|
||||
Future<void> keyNoticeSubmitRequest() async {
|
||||
if (state.receiverController.text.isEmpty &&
|
||||
state.getReceiver.value.isEmpty) {
|
||||
showToast('请输入接收者');
|
||||
showToast('请输入接收者'.tr);
|
||||
return;
|
||||
}
|
||||
final SendEmailNotificationEntity entity;
|
||||
@ -70,7 +70,7 @@ class SendEmailNotificationLogic extends BaseGetXController {
|
||||
);
|
||||
}
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast('发送成功');
|
||||
showToast('发送成功'.tr);
|
||||
Get.back();
|
||||
}
|
||||
}
|
||||
@ -79,7 +79,7 @@ class SendEmailNotificationLogic extends BaseGetXController {
|
||||
Future<void> sendPersonalSMSOrEmail() async {
|
||||
if (state.receiverController.text.isEmpty &&
|
||||
state.getReceiver.value.isEmpty) {
|
||||
showToast('请输入接收者');
|
||||
showToast('请输入接收者账号'.tr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
@ -43,7 +44,7 @@ class _SendEmailNotificationPageState extends State<SendEmailNotificationPage> {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: state.channelType.value == 1 ? '短信通知' : '邮件通知',
|
||||
barTitle: state.channelType.value == 1 ? '短信通知'.tr : '邮件通知'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: SingleChildScrollView(
|
||||
@ -61,7 +62,7 @@ class _SendEmailNotificationPageState extends State<SendEmailNotificationPage> {
|
||||
isHaveRightWidget: true,
|
||||
rightWidget: _buildReceiverItemWidget())),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: '类型',
|
||||
leftTitel: '类型'.tr,
|
||||
rightTitle: state.getNotifyTypeText.value,
|
||||
isHaveDirection: true,
|
||||
action: () {
|
||||
@ -75,7 +76,7 @@ class _SendEmailNotificationPageState extends State<SendEmailNotificationPage> {
|
||||
)),
|
||||
Container(height: 10.h),
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: '模板',
|
||||
leftTitel: '模板'.tr,
|
||||
rightTitle: state.currentNotifyItem.value.name ?? '',
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
@ -193,7 +194,7 @@ class _SendEmailNotificationPageState extends State<SendEmailNotificationPage> {
|
||||
width: 6.w,
|
||||
),
|
||||
Text(
|
||||
'新建模版',
|
||||
'新建模版'.tr,
|
||||
style: TextStyle(
|
||||
color: AppColors.mainColor,
|
||||
fontSize: 24.sp,
|
||||
|
||||
@ -43,15 +43,15 @@ class SendEmailNotificationState {
|
||||
Future<void> updateNotifyTypeText() async {
|
||||
if (channelType.value == 1) {
|
||||
if (notifyTypeSelect.value == 1) {
|
||||
getNotifyTypeText.value = '系统短信';
|
||||
getNotifyTypeText.value = '系统短信'.tr;
|
||||
} else {
|
||||
getNotifyTypeText.value = '个人短信';
|
||||
getNotifyTypeText.value = '个人短信'.tr;
|
||||
}
|
||||
} else {
|
||||
if (notifyTypeSelect.value == 1) {
|
||||
getNotifyTypeText.value = '系统邮件';
|
||||
getNotifyTypeText.value = '系统邮件'.tr;
|
||||
} else {
|
||||
getNotifyTypeText.value = '个人邮件';
|
||||
getNotifyTypeText.value = '个人邮件'.tr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ class AddFaceLogic extends BaseGetXController {
|
||||
|
||||
// 最大图片数
|
||||
state.maxRegCount.value = reply.data[11];
|
||||
AppLog.log('人脸开始state.maxRegCount.value:${state.maxRegCount.value}');
|
||||
// AppLog.log('人脸开始state.maxRegCount.value:${state.maxRegCount.value}');
|
||||
break;
|
||||
case 0x06:
|
||||
//无权限
|
||||
@ -92,7 +92,7 @@ class AddFaceLogic extends BaseGetXController {
|
||||
default:
|
||||
//失败
|
||||
state.ifAddState.value = false;
|
||||
showToast('添加人脸失败', something: (){
|
||||
showToast('添加人脸失败'.tr, something: (){
|
||||
Get.back();
|
||||
});
|
||||
break;
|
||||
@ -138,7 +138,7 @@ class AddFaceLogic extends BaseGetXController {
|
||||
// 添加人脸中
|
||||
// 当前注册数
|
||||
state.regIndex.value = reply.data[6];
|
||||
AppLog.log('注册人脸过程state.regIndex.value:${state.regIndex.value}');
|
||||
// AppLog.log('注册人脸过程state.regIndex.value:${state.regIndex.value}');
|
||||
break;
|
||||
}
|
||||
|
||||
@ -296,7 +296,7 @@ class AddFaceLogic extends BaseGetXController {
|
||||
faceUserNo: state.faceNumber.value,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast('添加成功');
|
||||
showToast('添加成功'.tr);
|
||||
if (state.fromType.value == 2) {
|
||||
// 回调人脸号
|
||||
eventBus.fire(ChickInAddStaffCardAndFingerprintBlockNumberEvent(
|
||||
@ -318,7 +318,7 @@ class AddFaceLogic extends BaseGetXController {
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
//开始添加后发送指令
|
||||
//开始添加后发送指令
|
||||
// senderAddFace();
|
||||
}
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ class _AddFacePageState extends State<AddFacePage> with RouteAware {
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Text(
|
||||
'请单人正对门锁,距离一个成年人手臂长度\n(约0.6米)。\n保持脸部无遮挡,露出五官。',
|
||||
'请单人正对门锁,距离一个成年人手臂长度'.tr + '\n' + '(约0.6米)。'.tr + '\n' + '保持脸部无遮挡,露出五官。'.tr,
|
||||
textAlign: TextAlign.left,
|
||||
maxLines: null,
|
||||
style:
|
||||
@ -71,7 +71,7 @@ class _AddFacePageState extends State<AddFacePage> with RouteAware {
|
||||
? Container(
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: SubmitBtn(
|
||||
btnName: '准备好了,开始添加',
|
||||
btnName: '准备好了,开始添加'.tr,
|
||||
borderRadius: 20.w,
|
||||
onClick: () {
|
||||
state.isClickAddFace.value = true;
|
||||
@ -84,7 +84,7 @@ class _AddFacePageState extends State<AddFacePage> with RouteAware {
|
||||
Column(
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'正在录入中...',
|
||||
'正在录入中...'.tr,
|
||||
style: TextStyle(
|
||||
color: AppColors.darkGrayTextColor,
|
||||
fontSize: 22.sp),
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
@ -163,7 +164,7 @@ class FaceDetailLogic extends BaseGetXController {
|
||||
lockId: state.faceItemData.value.lockId!,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast('删除成功', something: () {
|
||||
showToast('删除成功'.tr, something: () {
|
||||
Get.back(result: 'addScuess');
|
||||
});
|
||||
}
|
||||
@ -178,7 +179,7 @@ class FaceDetailLogic extends BaseGetXController {
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.faceItemData.value.faceName = state.changeNameController.text;
|
||||
showToast('修改成功', something: () {
|
||||
showToast('修改成功'.tr, something: () {
|
||||
Get.back(result: 'addScuess');
|
||||
});
|
||||
} else {
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -15,7 +16,6 @@ import '../../../../tools/dateTool.dart';
|
||||
import '../../../../tools/showTipView.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import '../../../lockMian/lockMain/lockMain_logic.dart';
|
||||
|
||||
class FaceDetailPage extends StatefulWidget {
|
||||
@ -41,7 +41,7 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
body: ListView(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: '人脸号',
|
||||
leftTitel: '人脸号'.tr,
|
||||
rightTitle: state.typeNumber.value,
|
||||
isHaveDirection: false,
|
||||
isHaveLine: true)),
|
||||
@ -135,7 +135,7 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
Obx(() => Visibility(
|
||||
visible: state.keyType.value == 4,
|
||||
child: Obx(() => CommonItem(
|
||||
leftTitel: '有效时间',
|
||||
leftTitel: '有效时间'.tr,
|
||||
rightTitle:
|
||||
'${DateTool().dateToHNString(state.startTime.value)}-${DateTool().dateToHNString(state.endTime.value)}',
|
||||
isHaveDirection: true,
|
||||
|
||||
@ -2,32 +2,11 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart';
|
||||
|
||||
class FaceDetailState {
|
||||
final faceItemData = FingerprintItemData().obs;
|
||||
|
||||
final TextEditingController changeNameController = TextEditingController();
|
||||
|
||||
final typeNumber = "".obs; // 人脸号
|
||||
final typeName = "".obs; // 人脸名字
|
||||
var startDate = "".obs; // 开始时间
|
||||
var endDate = "".obs; // 结束时间
|
||||
var startTime = "".obs; // 生效时间
|
||||
var endTime = "".obs; // 失效时间
|
||||
final keyType = 0.obs; // 永久:1;限时2,单次3,循环:4
|
||||
var weekDay = [].obs; // 有效日
|
||||
var adder = "".obs; // 添加者
|
||||
var addTime = 0.obs; // 添加时间
|
||||
var keyId = 0.obs;
|
||||
|
||||
var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
var sureBtnState = 0.obs; // 0普通状态(可用) 1连接中(不可用)
|
||||
var isDeletFace = true.obs; // 是否删除卡
|
||||
var isStressFace = false.obs; // 是否胁迫
|
||||
var isAdministrator = false.obs; // 是否为管理员
|
||||
class FaceDetailState { // 是否为管理员
|
||||
|
||||
FaceDetailState() {
|
||||
Map map = Get.arguments;
|
||||
faceItemData.value = map["faceItemData"];
|
||||
faceItemData.value = map['faceItemData'];
|
||||
keyId.value = faceItemData.value.faceId!;
|
||||
typeNumber.value = faceItemData.value.faceNumber!;
|
||||
typeName.value = faceItemData.value.faceName!;
|
||||
@ -40,7 +19,36 @@ class FaceDetailState {
|
||||
adder.value = faceItemData.value.senderUsername!;
|
||||
addTime.value = faceItemData.value.createDate!;
|
||||
weekDay.value = faceItemData.value.weekDay!;
|
||||
isStressFace.value = faceItemData.value.isCoerced! == 2 ? true : false;
|
||||
isAdministrator.value = faceItemData.value.faceRight! == 1 ? true : false;
|
||||
if (faceItemData.value.isCoerced! == 2) {
|
||||
isStressFace.value = true;
|
||||
} else {
|
||||
isStressFace.value = false;
|
||||
}
|
||||
if (faceItemData.value.faceRight! == 1) {
|
||||
isAdministrator.value = true;
|
||||
} else {
|
||||
isAdministrator.value = false;
|
||||
}
|
||||
}
|
||||
final Rx<FingerprintItemData> faceItemData = FingerprintItemData().obs;
|
||||
|
||||
final TextEditingController changeNameController = TextEditingController();
|
||||
|
||||
final RxString typeNumber = ''.obs; // 人脸号
|
||||
final RxString typeName = ''.obs; // 人脸名字
|
||||
RxString startDate = ''.obs; // 开始时间
|
||||
RxString endDate = ''.obs; // 结束时间
|
||||
RxString startTime = ''.obs; // 生效时间
|
||||
RxString endTime = ''.obs; // 失效时间
|
||||
final RxInt keyType = 0.obs; // 永久:1;限时2,单次3,循环:4
|
||||
RxList weekDay = [].obs; // 有效日
|
||||
RxString adder = ''.obs; // 添加者
|
||||
RxInt addTime = 0.obs; // 添加时间
|
||||
RxInt keyId = 0.obs;
|
||||
|
||||
RxBool ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
RxInt sureBtnState = 0.obs; // 0普通状态(可用) 1连接中(不可用)
|
||||
RxBool isDeletFace = true.obs; // 是否删除卡
|
||||
RxBool isStressFace = false.obs; // 是否胁迫
|
||||
RxBool isAdministrator = false.obs;
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -16,7 +17,6 @@ import '../../../../tools/noData.dart';
|
||||
import '../../../../tools/storage.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
import '../../../lockMian/lockMain/lockMain_logic.dart';
|
||||
import 'faceList_logic.dart';
|
||||
|
||||
@ -75,7 +75,7 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
|
||||
// showDeletAlertDialog(context);
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
'重置后,该锁的人脸都将被删除哦,确认要重置吗?', () async {
|
||||
'重置后,该锁的人脸都将被删除哦,确认要重置吗?'.tr, () async {
|
||||
state.isDeletAll = true;
|
||||
state.deletKeyID = '1';
|
||||
state.deletFaceNo = 0;
|
||||
@ -84,7 +84,7 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
});
|
||||
} else {
|
||||
// Get.toNamed(Routers.selectLockTypePage);
|
||||
logic.showToast('演示模式');
|
||||
logic.showToast('演示模式'.tr);
|
||||
}
|
||||
},
|
||||
),
|
||||
@ -196,9 +196,9 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
width: 60,
|
||||
color: const Color(0xFFF20101),
|
||||
alignment: Alignment.center,
|
||||
child: const Text(
|
||||
'删除',
|
||||
style: TextStyle(
|
||||
child: Text(
|
||||
'删除'.tr,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.white,
|
||||
|
||||
@ -7,7 +7,6 @@ class AddIrisLogic extends BaseGetXController {
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
super.onReady();
|
||||
|
||||
// _initReplySubscription();
|
||||
@ -15,7 +14,6 @@ class AddIrisLogic extends BaseGetXController {
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
// TODO: implement onInit
|
||||
super.onInit();
|
||||
//开始添加后发送指令
|
||||
// senderAddFace();
|
||||
@ -23,7 +21,6 @@ class AddIrisLogic extends BaseGetXController {
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
// TODO: implement onClose
|
||||
super.onClose();
|
||||
|
||||
// _replySubscription.cancel();
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@ -7,7 +8,6 @@ import 'package:star_lock/main/lockDetail/iris/addIris/addIris_state.dart';
|
||||
import '../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../tools/submitBtn.dart';
|
||||
import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class AddIrisPage extends StatefulWidget {
|
||||
const AddIrisPage({Key? key}) : super(key: key);
|
||||
@ -51,7 +51,8 @@ class _AddIrisPageState extends State<AddIrisPage> {
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Text(
|
||||
'请单人正对门锁,距离一个成年人手臂长度\n(约0.6米)。\n保持脸部无遮挡,露出五官。',
|
||||
// 虹膜提示需要国际化
|
||||
'',
|
||||
textAlign: TextAlign.left,
|
||||
maxLines: null,
|
||||
style:
|
||||
@ -69,7 +70,7 @@ class _AddIrisPageState extends State<AddIrisPage> {
|
||||
? Container(
|
||||
padding: EdgeInsets.only(left: 20.w, right: 20.w),
|
||||
child: SubmitBtn(
|
||||
btnName: '准备好了,开始添加',
|
||||
btnName: '准备好了,开始添加'.tr,
|
||||
borderRadius: 20.w,
|
||||
onClick: () {
|
||||
state.isClickAddFace.value = true;
|
||||
@ -79,7 +80,7 @@ class _AddIrisPageState extends State<AddIrisPage> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'正在录入中...',
|
||||
'正在录入中...'.tr,
|
||||
style: TextStyle(
|
||||
color: AppColors.darkGrayTextColor,
|
||||
fontSize: 22.sp),
|
||||
|
||||
@ -1,37 +1,37 @@
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class AddIrisState {
|
||||
var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
|
||||
var ifConnectScuess = false.obs;
|
||||
var maxRegCount = 0.obs; // 最大注册次数
|
||||
var regIndex = 0.obs; // 当前注册次数
|
||||
|
||||
var faceNumber = "".obs;
|
||||
|
||||
final lockId = 0.obs;
|
||||
final endDate = 0.obs;
|
||||
final addType = "".obs;
|
||||
final faceName = "".obs;
|
||||
final faceType = 0.obs;
|
||||
final startDate = 0.obs;
|
||||
final cyclicConfig = [].obs;
|
||||
final fromType = 1.obs;
|
||||
final featureData = ''.obs;
|
||||
final isClickAddFace = false.obs;
|
||||
final isAdministrator = false.obs;
|
||||
|
||||
AddIrisState() {
|
||||
Map map = Get.arguments;
|
||||
lockId.value = map["lockId"];
|
||||
endDate.value = map["endDate"];
|
||||
addType.value = map["addType"];
|
||||
faceName.value = map["faceName"];
|
||||
faceType.value = map["faceType"];
|
||||
startDate.value = map["startDate"];
|
||||
lockId.value = map["lockId"];
|
||||
cyclicConfig.value = map["cyclicConfig"];
|
||||
fromType.value = map["fromType"];
|
||||
isAdministrator.value = map["isAdministrator"];
|
||||
lockId.value = map['lockId'];
|
||||
endDate.value = map['endDate'];
|
||||
addType.value = map['addType'];
|
||||
faceName.value = map['faceName'];
|
||||
faceType.value = map['faceType'];
|
||||
startDate.value = map['startDate'];
|
||||
lockId.value = map['lockId'];
|
||||
cyclicConfig.value = map['cyclicConfig'];
|
||||
fromType.value = map['fromType'];
|
||||
isAdministrator.value = map['isAdministrator'];
|
||||
}
|
||||
RxBool ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
|
||||
RxBool ifConnectScuess = false.obs;
|
||||
RxInt maxRegCount = 0.obs; // 最大注册次数
|
||||
RxInt regIndex = 0.obs; // 当前注册次数
|
||||
|
||||
RxString faceNumber = ''.obs;
|
||||
|
||||
final RxInt lockId = 0.obs;
|
||||
final RxInt endDate = 0.obs;
|
||||
final RxString addType = ''.obs;
|
||||
final RxString faceName = ''.obs;
|
||||
final RxInt faceType = 0.obs;
|
||||
final RxInt startDate = 0.obs;
|
||||
final RxList cyclicConfig = [].obs;
|
||||
final RxInt fromType = 1.obs;
|
||||
final RxString featureData = ''.obs;
|
||||
final RxBool isClickAddFace = false.obs;
|
||||
final RxBool isAdministrator = false.obs;
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ import 'package:star_lock/main/lockDetail/iris/addIrisType/addIrisTypeManage/add
|
||||
|
||||
import '../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../tools/titleAppBar.dart';
|
||||
import '../../../../../translations/trans_lib.dart';
|
||||
|
||||
class AddIrisTypeManagePage extends StatefulWidget {
|
||||
const AddIrisTypeManagePage({Key? key}) : super(key: key);
|
||||
@ -28,7 +27,7 @@ class _AddIrisTypeManagePageState extends State<AddIrisTypeManagePage> {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: "${"添加".tr}${'虹膜'.tr}",
|
||||
barTitle: '${'添加'.tr}${'虹膜'.tr}',
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor),
|
||||
body: Column(
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||
import 'package:star_lock/main/lockDetail/iris/addIrisType/addIrisType_state.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
@ -15,31 +16,31 @@ class AddIrisTypeLogic extends BaseGetXController {
|
||||
|
||||
// 添加虹膜
|
||||
void addIrisData() async {
|
||||
var irisType = 0; // 永久:1;限时2,单次3,循环:4
|
||||
var startDate = "";
|
||||
var endDate = "";
|
||||
var startTime = "";
|
||||
var endTime = "";
|
||||
if (state.selectType.value == "0") {
|
||||
int irisType = 0; // 永久:1;限时2,单次3,循环:4
|
||||
String startDate = '';
|
||||
String endDate = '';
|
||||
// String startTime = '';
|
||||
// String endTime = '';
|
||||
if (state.selectType.value == '0') {
|
||||
irisType = 1;
|
||||
startDate = "0";
|
||||
endDate = "0";
|
||||
startTime = "0";
|
||||
endTime = "0";
|
||||
} else if (state.selectType.value == "1") {
|
||||
startDate = '0';
|
||||
endDate = '0';
|
||||
// startTime = '0';
|
||||
// endTime = '0';
|
||||
} else if (state.selectType.value == '1') {
|
||||
irisType = 2;
|
||||
startDate =
|
||||
DateTool().dateToTimestamp(state.beginTime.value, 1).toString();
|
||||
endDate = DateTool().dateToTimestamp(state.endTime.value, 1).toString();
|
||||
startTime = "0";
|
||||
endTime = "0";
|
||||
// startTime = '0';
|
||||
// endTime = '0';
|
||||
|
||||
if (startDate.isEmpty) {
|
||||
showToast("请选择开始时间".tr);
|
||||
showToast('请选择开始时间'.tr);
|
||||
return;
|
||||
}
|
||||
if (endDate.isEmpty) {
|
||||
showToast("请选择结束时间".tr);
|
||||
showToast('请选择结束时间'.tr);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -49,42 +50,42 @@ class AddIrisTypeLogic extends BaseGetXController {
|
||||
// }
|
||||
|
||||
if (int.parse(startDate) >= int.parse(endDate)) {
|
||||
showToast("失效时间要大于生效时间".tr);
|
||||
showToast('失效时间要大于生效时间'.tr);
|
||||
return;
|
||||
}
|
||||
} else if (state.selectType.value == "2") {
|
||||
} else if (state.selectType.value == '2') {
|
||||
if (state.beginTime.value.isEmpty) {
|
||||
showToast("请选择有效期".tr);
|
||||
showToast('请选择有效期'.tr);
|
||||
return;
|
||||
}
|
||||
startDate =
|
||||
DateTool().dateToTimestamp(state.beginTime.value, 1).toString();
|
||||
endDate = DateTool().dateToTimestamp(state.endTime.value, 1).toString();
|
||||
startTime = DateTool()
|
||||
.dateToTimestamp(state.effectiveDateTime.value, 0)
|
||||
.toString();
|
||||
endTime =
|
||||
DateTool().dateToTimestamp(state.failureDateTime.value, 0).toString();
|
||||
// startTime = DateTool()
|
||||
// .dateToTimestamp(state.effectiveDateTime.value, 0)
|
||||
// .toString();
|
||||
// endTime =
|
||||
// DateTool().dateToTimestamp(state.failureDateTime.value, 0).toString();
|
||||
irisType = 4;
|
||||
}
|
||||
// 虹膜
|
||||
Get.toNamed(Routers.addIrisPage, arguments: {
|
||||
"lockId": state.lockId.value,
|
||||
"endDate": int.parse(endDate),
|
||||
"addType": "1",
|
||||
"faceName": state.nameController.text,
|
||||
"faceNumber": "123456",
|
||||
"faceType": irisType,
|
||||
"startDate": int.parse(startDate),
|
||||
"cyclicConfig": state.weekdaysList.value,
|
||||
"fromType": state.fromType.value,
|
||||
"isAdministrator": state.isAdministrator.value,
|
||||
Get.toNamed(Routers.addIrisPage, arguments: <String, Object>{
|
||||
'lockId': state.lockId.value,
|
||||
'endDate': int.parse(endDate),
|
||||
'addType': '1',
|
||||
'faceName': state.nameController.text,
|
||||
'faceNumber': '123456',
|
||||
'faceType': irisType,
|
||||
'startDate': int.parse(startDate),
|
||||
'cyclicConfig': state.weekdaysList.value,
|
||||
'fromType': state.fromType.value,
|
||||
'isAdministrator': state.isAdministrator.value,
|
||||
});
|
||||
}
|
||||
|
||||
// 校验指纹名字是否重复
|
||||
void checkIrisNameDuplicated(String irisName) async {
|
||||
var entity = await ApiRepository.to.checkFaceNameDuplicatedData(
|
||||
Future<void> checkIrisNameDuplicated(String irisName) async {
|
||||
final LoginEntity entity = await ApiRepository.to.checkFaceNameDuplicatedData(
|
||||
lockId: state.lockId.value.toString(),
|
||||
faceName: irisName,
|
||||
);
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -16,7 +17,6 @@ import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../tools/commonItem.dart';
|
||||
import '../../../../tools/storage.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class AddIrisTypePage extends StatefulWidget { // 从添加员工进入 传入员工名字
|
||||
const AddIrisTypePage(
|
||||
@ -267,7 +267,7 @@ class _AddIrisTypePageState extends State<AddIrisTypePage> {
|
||||
logic.checkIrisNameDuplicated(state.nameController.text);
|
||||
} else {
|
||||
// Get.toNamed(Routers.selectLockTypePage);
|
||||
logic.showToast('演示模式');
|
||||
logic.showToast('演示模式'.tr);
|
||||
}
|
||||
}),
|
||||
],
|
||||
|
||||
@ -2,20 +2,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class AddIrisTypeState {
|
||||
final lockId = 0.obs;
|
||||
final selectType = "0".obs; // 0永久 1显示 2循环
|
||||
final fromType = 1.obs; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
var fromTypeTwoStaffName = "".obs; // 考勤添加人脸员工名字
|
||||
final isStressFingerprint = false.obs;
|
||||
final isAdministrator = false.obs; // 是否为管理员
|
||||
|
||||
var beginTime = "".obs; // 开始时间
|
||||
var endTime = "".obs; // 结束时间
|
||||
var effectiveDateTime = "".obs; // 生效时间
|
||||
var failureDateTime = "".obs; // 失效时间
|
||||
var weekdaysList = [].obs;
|
||||
|
||||
final TextEditingController nameController = TextEditingController();
|
||||
AddIrisTypeState() {
|
||||
// Map map = Get.arguments;
|
||||
// lockId.value = map["lockId"];
|
||||
@ -25,4 +11,18 @@ class AddIrisTypeState {
|
||||
// // nameController.text = fromTypeTwoStaffName.value;
|
||||
// }
|
||||
}
|
||||
final RxInt lockId = 0.obs;
|
||||
final RxString selectType = '0'.obs; // 0永久 1显示 2循环
|
||||
final RxInt fromType = 1.obs; // // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
RxString fromTypeTwoStaffName = ''.obs; // 考勤添加人脸员工名字
|
||||
final RxBool isStressFingerprint = false.obs;
|
||||
final RxBool isAdministrator = false.obs; // 是否为管理员
|
||||
|
||||
RxString beginTime = ''.obs; // 开始时间
|
||||
RxString endTime = ''.obs; // 结束时间
|
||||
RxString effectiveDateTime = ''.obs; // 生效时间
|
||||
RxString failureDateTime = ''.obs; // 失效时间
|
||||
RxList weekdaysList = [].obs;
|
||||
|
||||
final TextEditingController nameController = TextEditingController();
|
||||
}
|
||||
|
||||
@ -1,19 +1,18 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/blue/io_type.dart';
|
||||
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||
import 'package:star_lock/main/lockDetail/iris/irisDetail/irisDetail_state.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import 'package:star_lock/tools/eventBusEventManage.dart';
|
||||
import 'package:star_lock/tools/pickers/time_picker/time_utils.dart';
|
||||
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
// import '../../../../blue/io_protocol/io_addICCard.dart';
|
||||
import '../../../../blue/io_reply.dart';
|
||||
import '../../../../blue/io_tool/io_tool.dart';
|
||||
import '../../../../blue/io_tool/manager_event_bus.dart';
|
||||
import '../../../../blue/sender_manage.dart';
|
||||
import '../../../../network/api_repository.dart';
|
||||
import '../../../../tools/dateTool.dart';
|
||||
import '../../../../tools/storage.dart';
|
||||
@ -29,7 +28,7 @@ class IrisDetailLogic extends BaseGetXController {
|
||||
late StreamSubscription<Reply> _replySubscription;
|
||||
void _initReplySubscription() {
|
||||
_replySubscription =
|
||||
EventBusManager().eventBus!.on<Reply>().listen((reply) async {
|
||||
EventBusManager().eventBus!.on<Reply>().listen((Reply reply) async {
|
||||
// 添加卡片开始(重置锁里面所有卡)
|
||||
// if ((reply is SenderAddICCardReply)) {
|
||||
// _replyAddICCardBegin(reply);
|
||||
@ -39,7 +38,7 @@ class IrisDetailLogic extends BaseGetXController {
|
||||
|
||||
// 添加卡片开始(此处用作删除卡片)
|
||||
Future<void> _replyAddICCardBegin(Reply reply) async {
|
||||
int status = reply.data[2];
|
||||
final int status = reply.data[2];
|
||||
|
||||
switch (status) {
|
||||
case 0x00:
|
||||
@ -50,19 +49,19 @@ class IrisDetailLogic extends BaseGetXController {
|
||||
break;
|
||||
case 0x06:
|
||||
//无权限
|
||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||
|
||||
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
|
||||
final List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||
|
||||
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||
// List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
||||
|
||||
var token = await Storage.getStringList(saveBlueToken);
|
||||
List<int> getTokenList = changeStringListToIntList(token!);
|
||||
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
||||
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||
|
||||
String? userID = await Storage.getUid();
|
||||
final String? userID = await Storage.getUid();
|
||||
// IoSenderManage.senderAddICCardCommand(
|
||||
// keyID: state.keyId.value.toString(),
|
||||
// userID: userID,
|
||||
@ -101,16 +100,16 @@ class IrisDetailLogic extends BaseGetXController {
|
||||
// var publicKey = await Storage.getStringList(saveBluePublicKey);
|
||||
// List<int> publicKeyDataList = changeStringListToIntList(publicKey!);
|
||||
|
||||
var signKey = await Storage.getStringList(saveBlueSignKey);
|
||||
List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||
final List<String>? signKey = await Storage.getStringList(saveBlueSignKey);
|
||||
final List<int> signKeyDataList = changeStringListToIntList(signKey!);
|
||||
|
||||
var privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||
List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||
final List<String>? privateKey = await Storage.getStringList(saveBluePrivateKey);
|
||||
final List<int> getPrivateKeyList = changeStringListToIntList(privateKey!);
|
||||
|
||||
var token = await Storage.getStringList(saveBlueToken);
|
||||
List<int> getTokenList = changeStringListToIntList(token!);
|
||||
final List<String>? token = await Storage.getStringList(saveBlueToken);
|
||||
final List<int> getTokenList = changeStringListToIntList(token!);
|
||||
|
||||
String? userID = await Storage.getUid();
|
||||
final String? userID = await Storage.getUid();
|
||||
// IoSenderManage.senderAddICCardCommand(
|
||||
// keyID: state.keyId.value.toString(),
|
||||
// userID: userID,
|
||||
@ -137,22 +136,22 @@ class IrisDetailLogic extends BaseGetXController {
|
||||
|
||||
// 编辑iC卡
|
||||
void editICCardData() async {
|
||||
var entity = await ApiRepository.to.editICCardData(
|
||||
final LoginEntity entity = await ApiRepository.to.editICCardData(
|
||||
cardId: state.keyId.value.toString(),
|
||||
lockId: state.fingerprintItemData.value.lockId.toString(),
|
||||
weekDay: state.weekDay.value,
|
||||
startDate: state.starDate.value * 1000,
|
||||
endDate: state.endDate.value * 1000,
|
||||
isCoerced: state.isStressFingerprint.value ? "2" : "1",
|
||||
isCoerced: state.isStressFingerprint.value ? '2' : '1',
|
||||
cardName: state.changeNameController.text,
|
||||
changeType: "1",
|
||||
changeType: '1',
|
||||
startTime: int.parse(state.starTime.value),
|
||||
endTime: int.parse(state.endTime.value),
|
||||
cardType: state.keyType.value,
|
||||
cardRight: 0,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast("修改成功", something: () {
|
||||
showToast('修改成功'.tr, something: () {
|
||||
eventBus.fire(OtherTypeRefreshListEvent());
|
||||
});
|
||||
}
|
||||
@ -160,14 +159,14 @@ class IrisDetailLogic extends BaseGetXController {
|
||||
|
||||
// 删除IC卡
|
||||
void deletICCardData() async {
|
||||
var entity = await ApiRepository.to.deletIcCardData(
|
||||
final LoginEntity entity = await ApiRepository.to.deletIcCardData(
|
||||
cardId: state.fingerprintItemData.value.cardId.toString(),
|
||||
lockId: state.fingerprintItemData.value.lockId.toString(),
|
||||
type: "0",
|
||||
deleteType: "1");
|
||||
type: '0',
|
||||
deleteType: '1');
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast("删除成功", something: () {
|
||||
Get.back(result: "addScuess");
|
||||
showToast('删除成功'.tr, something: () {
|
||||
Get.back(result: 'addScuess');
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -175,20 +174,19 @@ class IrisDetailLogic extends BaseGetXController {
|
||||
String getKeyTypeShowDateTime() {
|
||||
String useDateStr = '';
|
||||
if (state.keyType.value == 1) {
|
||||
useDateStr = "永久";
|
||||
useDateStr = '永久'.tr;
|
||||
} else if (state.keyType.value == 2) {
|
||||
useDateStr =
|
||||
"${DateTool().dateToYMDHNString(state.starDate.value)}\n${DateTool().dateToYMDHNString(state.endDate.value)}";
|
||||
'${DateTool().dateToYMDHNString(state.starDate.value)}\n${DateTool().dateToYMDHNString(state.endDate.value)}';
|
||||
} else if (state.keyType.value == 4) {
|
||||
useDateStr =
|
||||
"${DateTool().dateToYMDString(state.starDate.value)}\n${DateTool().dateToYMDString(state.endDate.value)}";
|
||||
'${DateTool().dateToYMDString(state.starDate.value)}\n${DateTool().dateToYMDString(state.endDate.value)}';
|
||||
}
|
||||
return useDateStr;
|
||||
}
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
super.onReady();
|
||||
|
||||
_initReplySubscription();
|
||||
@ -196,13 +194,11 @@ class IrisDetailLogic extends BaseGetXController {
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
// TODO: implement onInit
|
||||
super.onInit();
|
||||
}
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
// TODO: implement onClose
|
||||
super.onClose();
|
||||
|
||||
_replySubscription.cancel();
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
@ -8,7 +9,6 @@ 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';
|
||||
@ -17,7 +17,6 @@ import '../../../../tools/showTFView.dart';
|
||||
import '../../../../tools/storage.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class CardDetailPage extends StatefulWidget {
|
||||
const CardDetailPage({Key? key}) : super(key: key);
|
||||
@ -35,15 +34,14 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.mainBackgroundColor,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: '虹膜详情',
|
||||
barTitle: '虹膜详情'.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
),
|
||||
body: ListView(
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel:
|
||||
'虹膜',
|
||||
leftTitel: '虹膜号'.tr,
|
||||
rightTitle: state.typeNumber.value,
|
||||
isHaveDirection: false,
|
||||
isHaveLine: true)),
|
||||
@ -131,7 +129,7 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
Obx(() => Visibility(
|
||||
visible: state.keyType.value == 4 ? true : false,
|
||||
child: Obx(() => CommonItem(
|
||||
leftTitel: '有效时间',
|
||||
leftTitel: '有效时间'.tr,
|
||||
rightTitle:
|
||||
'${DateTool().dateToHNString(state.starTime.value)}-${DateTool().dateToHNString(state.endTime.value)}',
|
||||
isHaveDirection: true,
|
||||
|
||||
@ -4,30 +4,10 @@ import 'package:get/get.dart';
|
||||
import '../../fingerprint/fingerprintList/fingerprintListData_entity.dart';
|
||||
|
||||
class IrisDetailState {
|
||||
final fingerprintItemData = FingerprintItemData().obs;
|
||||
|
||||
final TextEditingController changeNameController = TextEditingController();
|
||||
|
||||
var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
var sureBtnState = 0.obs; // 0普通状态(可用) 1连接中(不可用)
|
||||
|
||||
final typeNumber = "".obs; // 指纹号
|
||||
final typeName = "".obs; // 指纹名字
|
||||
var starDate = "".obs; // 开始时间
|
||||
var endDate = "".obs; // 结束时间
|
||||
var starTime = "".obs; // 生效时间
|
||||
var endTime = "".obs; // 失效时间
|
||||
final keyType = 0.obs; // 永久:1;限时2,单次3,循环:4
|
||||
var weekDay = [].obs; // 有效日
|
||||
var adder = "".obs; // 添加者
|
||||
var addTime = 0.obs; // 添加时间
|
||||
var keyId = 0.obs; // 卡id
|
||||
|
||||
final isStressFingerprint = false.obs;
|
||||
IrisDetailState() {
|
||||
Map map = Get.arguments;
|
||||
if ((map["fingerprintItemData"] != null)) {
|
||||
fingerprintItemData.value = map["fingerprintItemData"];
|
||||
if (map['fingerprintItemData'] != null) {
|
||||
fingerprintItemData.value = map['fingerprintItemData'];
|
||||
keyId.value = fingerprintItemData.value.cardId!;
|
||||
typeNumber.value = fingerprintItemData.value.cardNumber!;
|
||||
typeName.value = fingerprintItemData.value.cardName!;
|
||||
@ -39,9 +19,32 @@ class IrisDetailState {
|
||||
keyType.value = fingerprintItemData.value.cardType!;
|
||||
adder.value = fingerprintItemData.value.senderUsername!;
|
||||
addTime.value = fingerprintItemData.value.createDate!;
|
||||
isStressFingerprint.value =
|
||||
fingerprintItemData.value.isCoerced! == 2 ? true : false;
|
||||
if (fingerprintItemData.value.isCoerced! == 2) {
|
||||
isStressFingerprint.value = true;
|
||||
} else {
|
||||
isStressFingerprint.value = false;
|
||||
}
|
||||
weekDay.value = fingerprintItemData.value.weekDay!;
|
||||
}
|
||||
}
|
||||
final Rx<FingerprintItemData> fingerprintItemData = FingerprintItemData().obs;
|
||||
|
||||
final TextEditingController changeNameController = TextEditingController();
|
||||
|
||||
RxBool ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
RxInt sureBtnState = 0.obs; // 0普通状态(可用) 1连接中(不可用)
|
||||
|
||||
final RxString typeNumber = ''.obs; // 指纹号
|
||||
final RxString typeName = ''.obs; // 指纹名字
|
||||
RxString starDate = ''.obs; // 开始时间
|
||||
RxString endDate = ''.obs; // 结束时间
|
||||
RxString starTime = ''.obs; // 生效时间
|
||||
RxString endTime = ''.obs; // 失效时间
|
||||
final RxInt keyType = 0.obs; // 永久:1;限时2,单次3,循环:4
|
||||
RxList weekDay = [].obs; // 有效日
|
||||
RxString adder = ''.obs; // 添加者
|
||||
RxInt addTime = 0.obs; // 添加时间
|
||||
RxInt keyId = 0.obs; // 卡id
|
||||
|
||||
final RxBool isStressFingerprint = false.obs;
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_addFace.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_queryingFaceStatus.dart';
|
||||
import 'package:star_lock/blue/io_type.dart';
|
||||
import 'package:star_lock/main/lockDetail/iris/irisList/irisList_state.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
@ -11,7 +11,6 @@ import '../../../../blue/io_protocol/io_checkingUserInfoCount.dart';
|
||||
import '../../../../blue/io_reply.dart';
|
||||
import '../../../../blue/io_tool/io_tool.dart';
|
||||
import '../../../../blue/io_tool/manager_event_bus.dart';
|
||||
import '../../../../blue/sender_manage.dart';
|
||||
import '../../../../network/api_repository.dart';
|
||||
import '../../../../tools/eventBusEventManage.dart';
|
||||
import '../../../../tools/storage.dart';
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -16,7 +17,6 @@ import '../../../../tools/showIosTipView.dart';
|
||||
import '../../../../tools/storage.dart';
|
||||
import '../../../../tools/submitBtn.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import '../../../../translations/trans_lib.dart';
|
||||
|
||||
class IrisListPage extends StatefulWidget {
|
||||
const IrisListPage({Key? key}) : super(key: key);
|
||||
@ -51,10 +51,10 @@ class _IrisListPageState extends State<IrisListPage> {
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
showDeletAlertDialog(context);
|
||||
// showDeletAlertDialog(context);
|
||||
} else {
|
||||
// Get.toNamed(Routers.selectLockTypePage);
|
||||
logic.showToast('演示模式');
|
||||
logic.showToast('演示模式'.tr);
|
||||
}
|
||||
},
|
||||
),
|
||||
@ -122,7 +122,7 @@ class _IrisListPageState extends State<IrisListPage> {
|
||||
(getFaceItemData.faceType! != 1)
|
||||
? (getFaceItemData.endDate! <
|
||||
DateTime.now().millisecondsSinceEpoch
|
||||
? '已失效'
|
||||
? '已失效'.tr
|
||||
: '')
|
||||
: '',
|
||||
getFaceItemData.validTimeStr!,
|
||||
@ -165,9 +165,9 @@ class _IrisListPageState extends State<IrisListPage> {
|
||||
width: 60,
|
||||
color: const Color(0xFFF20101),
|
||||
alignment: Alignment.center,
|
||||
child: const Text(
|
||||
'删除',
|
||||
style: TextStyle(
|
||||
child: Text(
|
||||
'删除'.tr,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.white,
|
||||
@ -254,35 +254,35 @@ class _IrisListPageState extends State<IrisListPage> {
|
||||
);
|
||||
}
|
||||
|
||||
void showDeletAlertDialog(BuildContext context) {
|
||||
showCupertinoDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return CupertinoAlertDialog(
|
||||
title: const Text('提示'),
|
||||
content: const Text('重置后,该锁的人脸都将被删除哦,确认要重置吗?'),
|
||||
actions: <Widget>[
|
||||
CupertinoDialogAction(
|
||||
child: Text('取消'.tr),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
CupertinoDialogAction(
|
||||
child: Text('确定'.tr),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
state.isDeletFaceData = true;
|
||||
state.isDeletAll = true;
|
||||
state.deletKeyID = '1';
|
||||
state.deletUserID = 'DeleteAll!@#';
|
||||
state.deletFaceNo = 255;
|
||||
// logic.senderAddFace();
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
// void showDeletAlertDialog(BuildContext context) {
|
||||
// showCupertinoDialog(
|
||||
// context: context,
|
||||
// builder: (BuildContext context) {
|
||||
// return CupertinoAlertDialog(
|
||||
// title: const Text('提示'),
|
||||
// content: const Text('重置后,该锁的人脸都将被删除哦,确认要重置吗?'),
|
||||
// actions: <Widget>[
|
||||
// CupertinoDialogAction(
|
||||
// child: Text('取消'.tr),
|
||||
// onPressed: () {
|
||||
// Navigator.pop(context);
|
||||
// },
|
||||
// ),
|
||||
// CupertinoDialogAction(
|
||||
// child: Text('确定'.tr),
|
||||
// onPressed: () {
|
||||
// Navigator.pop(context);
|
||||
// state.isDeletFaceData = true;
|
||||
// state.isDeletAll = true;
|
||||
// state.deletKeyID = '1';
|
||||
// state.deletUserID = 'DeleteAll!@#';
|
||||
// state.deletFaceNo = 255;
|
||||
// // logic.senderAddFace();
|
||||
// },
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
}
|
||||
|
||||
@ -4,21 +4,21 @@ import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprin
|
||||
|
||||
class IrisListState {
|
||||
final TextEditingController searchController = TextEditingController();
|
||||
final lockId = 0.obs;
|
||||
final RxInt lockId = 0.obs;
|
||||
|
||||
// 因为删除跟添加人脸用的同一个协议 所以这里用做判断
|
||||
var isDeletFaceData = false;
|
||||
var isDeletAll = false;
|
||||
var deletKeyID = "";
|
||||
var deletUserID = "DeleteAll!@#";
|
||||
var deletFaceNo = 0;
|
||||
bool isDeletFaceData = false;
|
||||
bool isDeletAll = false;
|
||||
String deletKeyID = '';
|
||||
String deletUserID = 'DeleteAll!@#';
|
||||
int deletFaceNo = 0;
|
||||
|
||||
final faceItemListData = <FingerprintItemData>[].obs;
|
||||
final RxList<FingerprintItemData> faceItemListData = <FingerprintItemData>[].obs;
|
||||
|
||||
var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
RxBool ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
|
||||
IrisListState() {
|
||||
Map map = Get.arguments;
|
||||
lockId.value = map["lockId"];
|
||||
lockId.value = map['lockId'];
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/scheduler.dart';
|
||||
@ -17,7 +18,6 @@ import 'package:star_lock/widget/permission/permission_dialog.dart';
|
||||
import '../../../app_settings/app_settings.dart';
|
||||
import '../../../blue/blue_manage.dart';
|
||||
import '../../../blue/io_protocol/io_openLock.dart';
|
||||
import '../../../blue/io_protocol/io_referEventRecordTime.dart';
|
||||
import '../../../blue/io_reply.dart';
|
||||
import '../../../blue/io_tool/io_tool.dart';
|
||||
import '../../../blue/io_tool/manager_event_bus.dart';
|
||||
@ -27,9 +27,7 @@ import '../../../tools/baseGetXController.dart';
|
||||
import '../../../tools/commonDataManage.dart';
|
||||
import '../../../tools/eventBusEventManage.dart';
|
||||
import '../../../tools/storage.dart';
|
||||
import '../../../translations/trans_lib.dart';
|
||||
import '../lockOperatingRecord/keyOperationRecord_entity.dart';
|
||||
import '../lockOperatingRecord/lockOperatingRecordGetLastRecordTime_entity.dart';
|
||||
import '../lockSet/basicInformation/uploadElectricQuantity/uploadElectricQuantity_entity.dart';
|
||||
import 'lockDetail_state.dart';
|
||||
import 'lockNetToken_entity.dart';
|
||||
@ -152,27 +150,27 @@ class LockDetailLogic extends BaseGetXController {
|
||||
break;
|
||||
case 0x0a:
|
||||
// 钥匙不存在
|
||||
showToast('钥匙不存在');
|
||||
showToast('钥匙不存在'.tr);
|
||||
openDoorError();
|
||||
break;
|
||||
case 0x0c:
|
||||
// 钥匙数量已到上限
|
||||
showToast('钥匙数量已到上限');
|
||||
showToast('钥匙数量已到上限'.tr);
|
||||
openDoorError();
|
||||
break;
|
||||
case 0x0e:
|
||||
// 钥匙已存在
|
||||
showToast('钥匙已存在');
|
||||
showToast('钥匙已存在'.tr);
|
||||
openDoorError();
|
||||
break;
|
||||
case 0x0f:
|
||||
// 用户已存在
|
||||
showToast('用户已存在');
|
||||
showToast('用户已存在'.tr);
|
||||
openDoorError();
|
||||
break;
|
||||
default:
|
||||
//失败
|
||||
AppLog.log('开锁失败');
|
||||
// AppLog.log('开锁失败');
|
||||
openDoorError();
|
||||
break;
|
||||
}
|
||||
@ -438,7 +436,7 @@ class LockDetailLogic extends BaseGetXController {
|
||||
.getLockNetToken(lockId: state.keyInfos.value.lockId.toString());
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
state.lockNetToken = entity.data!.token!.toString();
|
||||
AppLog.log('从服务器获取联网token:${state.lockNetToken}');
|
||||
// AppLog.log('从服务器获取联网token:${state.lockNetToken}');
|
||||
openDoorAction();
|
||||
} else {
|
||||
showToast('网络访问失败,请检查网络是否正常'.tr, something: () {
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../app_settings/app_colors.dart';
|
||||
import '../../../flavors.dart';
|
||||
import '../../../tools/titleAppBar.dart';
|
||||
import '../../../translations/trans_lib.dart';
|
||||
import '../../lockMian/entity/lockListInfo_entity.dart';
|
||||
import 'lockDetail_page.dart';
|
||||
|
||||
@ -26,10 +26,10 @@ class _LockDetailMainPageState extends State<LockDetailMainPage> {
|
||||
final bool isOnlyOneData;
|
||||
LockListInfoItemEntity keyInfos = LockListInfoItemEntity();
|
||||
dynamic obj = ModalRoute.of(context)?.settings.arguments;
|
||||
if (obj != null && (obj["keyInfo"] != null)) {
|
||||
keyInfos = obj["keyInfo"];
|
||||
if (obj != null && (obj['keyInfo'] != null)) {
|
||||
keyInfos = obj['keyInfo'];
|
||||
}
|
||||
isOnlyOneData = obj["isOnlyOneData"];
|
||||
isOnlyOneData = obj['isOnlyOneData'];
|
||||
|
||||
return F.sw(
|
||||
skyCall: () => Scaffold(
|
||||
@ -47,7 +47,7 @@ class _LockDetailMainPageState extends State<LockDetailMainPage> {
|
||||
backgroundColor: Colors.white,
|
||||
appBar: TitleAppBar(
|
||||
barTitle: F.sw(
|
||||
xhjCall: () => '星星锁', skyCall: () => keyInfos.lockAlias),
|
||||
xhjCall: () => '星星锁'.tr, skyCall: () => keyInfos.lockAlias),
|
||||
haveBack: true,
|
||||
backgroundColor: Colors.white,
|
||||
titleColor: AppColors.blackColor,
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
@ -21,7 +22,6 @@ import '../../../common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import '../../../tools/appRouteObserver.dart';
|
||||
import '../../../tools/dateTool.dart';
|
||||
import '../../../tools/eventBusEventManage.dart';
|
||||
import '../../../translations/trans_lib.dart';
|
||||
import '../../lockMian/entity/lockListInfo_entity.dart';
|
||||
import 'lockDetail_logic.dart';
|
||||
|
||||
@ -704,7 +704,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
ShowCupertinoAlertView().isToRemoteUnLockAlert(
|
||||
remoteUnlockAction: () {
|
||||
if (state.keyInfos.value.hasGateway != 1) {
|
||||
logic.showToast('附近没有可用网关');
|
||||
logic.showToast('附近没有可用网关'.tr);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -1420,16 +1420,16 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
state.iSOpenLock.value = true;
|
||||
state.openLockBtnState.value = 1;
|
||||
state.animationController!.forward();
|
||||
AppLog.log('点击开锁');
|
||||
// AppLog.log('点击开锁');
|
||||
if (isOpenLockNeedOnline) {
|
||||
// 不需要联网
|
||||
state.openDoorModel = 0;
|
||||
AppLog.log('点击开锁 state.openDoorModel = 0 不需要联网');
|
||||
// AppLog.log('点击开锁 state.openDoorModel = 0 不需要联网');
|
||||
logic.openDoorAction();
|
||||
} else {
|
||||
// 需要联网
|
||||
state.openDoorModel = 2;
|
||||
AppLog.log('点击开锁 state.openDoorModel = 2 需要联网');
|
||||
// AppLog.log('点击开锁 state.openDoorModel = 2 需要联网');
|
||||
logic.getLockNetToken();
|
||||
}
|
||||
}
|
||||
@ -1445,12 +1445,12 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
AppLog.log('长按闭锁');
|
||||
if (state.isOpenLockNeedOnline.value == 0) {
|
||||
// 不需要联网
|
||||
AppLog.log('长按闭锁 state.openDoorModel = 32 不需要联网');
|
||||
// AppLog.log('长按闭锁 state.openDoorModel = 32 不需要联网');
|
||||
state.openDoorModel = 32;
|
||||
logic.openDoorAction();
|
||||
} else {
|
||||
// 需要联网
|
||||
AppLog.log('长按闭锁 state.openDoorModel = 34 需要联网');
|
||||
// AppLog.log('长按闭锁 state.openDoorModel = 34 需要联网');
|
||||
state.openDoorModel = 34;
|
||||
logic.getLockNetToken();
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../app_settings/app_settings.dart';
|
||||
import '../../../blue/blue_manage.dart';
|
||||
@ -59,12 +61,12 @@ class LockOperatingRecordLogic extends BaseGetXController {
|
||||
|
||||
final int userNo = (indexList[1] * 256) + indexList[2];
|
||||
indexMap['user'] = userNo.toString();
|
||||
AppLog.log('userNouserNouserNouserNo:$userNo');
|
||||
// AppLog.log('userNouserNouserNouserNo:$userNo');
|
||||
|
||||
final List<int> passwordData = indexList.sublist(7, 17);
|
||||
final String password = utf8String(passwordData);
|
||||
indexMap['password'] = password.toString();
|
||||
AppLog.log('passwordpasswordpassword:$password');
|
||||
// AppLog.log('passwordpasswordpassword:$password');
|
||||
|
||||
indexMap['success'] = '1';
|
||||
|
||||
@ -194,7 +196,7 @@ class LockOperatingRecordLogic extends BaseGetXController {
|
||||
Future<void> clearOperationRecordRequest() async {
|
||||
final KeyOperationRecordEntity entity = await ApiRepository.to.clearOperationRecord(CommonDataManage().currentKeyInfo.lockId.toString());
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
showToast('清除数据成功', something: (){
|
||||
showToast('清除数据成功'.tr, something: (){
|
||||
pageNo = 1;
|
||||
mockNetworkDataRequest();
|
||||
});
|
||||
|
||||
@ -1,18 +1,17 @@
|
||||
|
||||
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/lockOperatingRecord/lockOperatingRecord_state.dart';
|
||||
|
||||
import '../../../app_settings/app_colors.dart';
|
||||
import '../../../tools/EasyRefreshTool.dart';
|
||||
import '../../../tools/appRouteObserver.dart';
|
||||
import '../../../tools/commonDataManage.dart';
|
||||
import '../../../tools/custom_bottom_sheet.dart';
|
||||
import '../../../tools/keySearchWidget.dart';
|
||||
import '../../../tools/noData.dart';
|
||||
import '../../../tools/storage.dart';
|
||||
import '../../../tools/titleAppBar.dart';
|
||||
import '../../../translations/trans_lib.dart';
|
||||
import 'keyOperationRecord_entity.dart';
|
||||
import 'lockOperatingRecord_logic.dart';
|
||||
|
||||
@ -20,16 +19,15 @@ class LockOperatingRecordPage extends StatefulWidget {
|
||||
const LockOperatingRecordPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<LockOperatingRecordPage> createState() =>
|
||||
_LockOperatingRecordPageState();
|
||||
State<LockOperatingRecordPage> createState() => _LockOperatingRecordPageState();
|
||||
}
|
||||
|
||||
class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> with RouteAware{
|
||||
final logic = Get.put(LockOperatingRecordLogic());
|
||||
final state = Get.find<LockOperatingRecordLogic>().state;
|
||||
final LockOperatingRecordLogic logic = Get.put(LockOperatingRecordLogic());
|
||||
final LockOperatingRecordState state = Get.find<LockOperatingRecordLogic>().state;
|
||||
|
||||
Future<void> getHttpData() async {
|
||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
logic.mockNetworkDataRequest().then((KeyOperationRecordEntity value){
|
||||
if (mounted) {
|
||||
@ -85,7 +83,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> with
|
||||
getHttpData();
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Expanded(child: _buildMainUI()),
|
||||
],
|
||||
),
|
||||
@ -97,13 +95,13 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> with
|
||||
return Obx(() => state.lockOperatingRecordListData.value.isNotEmpty
|
||||
? ListView.separated(
|
||||
itemCount: state.lockOperatingRecordListData.length,
|
||||
itemBuilder: (c, index) {
|
||||
KeyRecordDataItem dataItem =
|
||||
itemBuilder: (BuildContext c, int index) {
|
||||
final KeyRecordDataItem dataItem =
|
||||
state.lockOperatingRecordListData[index];
|
||||
int? operateDate = dataItem.operateDate;
|
||||
DateTime dateStr =
|
||||
final int? operateDate = dataItem.operateDate;
|
||||
final DateTime dateStr =
|
||||
DateTime.fromMillisecondsSinceEpoch(operateDate!);
|
||||
String operateDateStr =
|
||||
final String operateDateStr =
|
||||
'${dateStr.toLocal().toString().substring(0, 16)} ';
|
||||
// return _operatingRecordItem(getTypeIcon(dataItem.recordType!),
|
||||
// dataItem.recordTypeName!, operateDateStr, () {});
|
||||
@ -158,7 +156,7 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> with
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Icon(Icons.access_time, size: 35.w),
|
||||
SizedBox(width: 10.w,),
|
||||
Text(
|
||||
@ -173,11 +171,10 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> with
|
||||
child:Container(
|
||||
margin: EdgeInsets.only(bottom: 3.w),
|
||||
child: Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Flexible(
|
||||
child: Text(
|
||||
userNameStr,
|
||||
// "发的发生大发手动阀手动阀三大发啥打法是打发三大发啥打法是打发",
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
@ -250,34 +247,33 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> with
|
||||
// );
|
||||
// }
|
||||
|
||||
Future _openModalBottomSheet() async {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadiusDirectional.circular(10)),
|
||||
builder: (BuildContext context) {
|
||||
return AlertBottomWidget(
|
||||
topTitle: '',
|
||||
// items: const ['读取记录', '清空记录', '导出记录'],
|
||||
items: const ['清空记录'],
|
||||
chooseCallback: (value) {
|
||||
int getSelectIndex = value;
|
||||
// if (getSelectIndex == 0) {
|
||||
// logic.mockNetworkDataRequest();
|
||||
// } else if (getSelectIndex == 1) {
|
||||
// logic.clearOperationRecordRequest();
|
||||
// }
|
||||
if (getSelectIndex == 0) {
|
||||
logic.clearOperationRecordRequest();
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
// Future _openModalBottomSheet() async {
|
||||
// showModalBottomSheet(
|
||||
// context: context,
|
||||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadiusDirectional.circular(10)),
|
||||
// builder: (BuildContext context) {
|
||||
// return AlertBottomWidget(
|
||||
// topTitle: '',
|
||||
// // items: const ['读取记录', '清空记录', '导出记录'],
|
||||
// items: ['清空记录'.tr],
|
||||
// chooseCallback: (int value) {
|
||||
// final int getSelectIndex = value;
|
||||
// // if (getSelectIndex == 0) {
|
||||
// // logic.mockNetworkDataRequest();
|
||||
// // } else if (getSelectIndex == 1) {
|
||||
// // logic.clearOperationRecordRequest();
|
||||
// // }
|
||||
// if (getSelectIndex == 0) {
|
||||
// logic.clearOperationRecordRequest();
|
||||
// }
|
||||
// },
|
||||
// );
|
||||
// });
|
||||
// }
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
// TODO: implement didChangeDependencies
|
||||
super.didChangeDependencies();
|
||||
|
||||
/// 路由订阅
|
||||
@ -286,7 +282,6 @@ class _LockOperatingRecordPageState extends State<LockOperatingRecordPage> with
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
/// 取消路由订阅
|
||||
AppRouteObserver().routeObserver.unsubscribe(this);
|
||||
super.dispose();
|
||||
|
||||
@ -157,15 +157,15 @@ class AddFamilyLogic extends BaseGetXController {
|
||||
final int keyType = state.familyData.value.settingValue!.openDoorType!;
|
||||
switch (keyType) {
|
||||
case 1:
|
||||
return '电子钥匙';
|
||||
return '电子钥匙'.tr;
|
||||
case 2:
|
||||
return '密码';
|
||||
return '密码'.tr;
|
||||
case 3:
|
||||
return '指纹';
|
||||
return '指纹'.tr;
|
||||
case 4:
|
||||
return '卡';
|
||||
return '卡'.tr;
|
||||
case 5:
|
||||
return '人脸';
|
||||
return '人脸'.tr;
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@ -11,7 +12,6 @@ import 'package:star_lock/tools/showCupertinoAlertView.dart';
|
||||
import 'package:star_lock/tools/showTFView.dart';
|
||||
import 'package:star_lock/tools/storage.dart';
|
||||
import 'package:star_lock/tools/submitBtn.dart';
|
||||
import 'package:star_lock/translations/trans_lib.dart';
|
||||
|
||||
import '../../../../../app_settings/app_colors.dart';
|
||||
import '../../../../../tools/titleAppBar.dart';
|
||||
|
||||
@ -1,8 +1,4 @@
|
||||
class LockUserEntity {
|
||||
int? errorCode;
|
||||
String? description;
|
||||
String? errorMsg;
|
||||
List<LockUserData>? data;
|
||||
|
||||
LockUserEntity({this.errorCode, this.description, this.errorMsg, this.data});
|
||||
|
||||
@ -17,6 +13,10 @@ class LockUserEntity {
|
||||
});
|
||||
}
|
||||
}
|
||||
int? errorCode;
|
||||
String? description;
|
||||
String? errorMsg;
|
||||
List<LockUserData>? data;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
@ -31,9 +31,6 @@ class LockUserEntity {
|
||||
}
|
||||
|
||||
class LockUserData {
|
||||
int? openLockType;
|
||||
String? openLockTypeName;
|
||||
List<LockUserListKeys>? lockUserList;
|
||||
|
||||
LockUserData({this.openLockType, this.openLockTypeName, this.lockUserList});
|
||||
|
||||
@ -47,6 +44,9 @@ class LockUserData {
|
||||
});
|
||||
}
|
||||
}
|
||||
int? openLockType;
|
||||
String? openLockTypeName;
|
||||
List<LockUserListKeys>? lockUserList;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
@ -59,64 +59,7 @@ class LockUserData {
|
||||
}
|
||||
}
|
||||
|
||||
class LockUserListKeys {
|
||||
int? id;
|
||||
String? clientId;
|
||||
int? lockOwnerId;
|
||||
int? apiUserId;
|
||||
int? lockId;
|
||||
// int? senderUserId;
|
||||
// int? receiverUsernameType;
|
||||
String? keyName;
|
||||
int? keyType;
|
||||
int? startDate;
|
||||
int? endDate;
|
||||
List? weekDays;
|
||||
String? remarks;
|
||||
int? remoteEnable;
|
||||
int? isCameraEnable;
|
||||
int? faceAuthentication;
|
||||
int? lastFaceValidateTime;
|
||||
int? keyRight;
|
||||
int? remoteUnlockSwitch;
|
||||
int? userType;
|
||||
int? keyStatus;
|
||||
int? groupId;
|
||||
int? lockUserNo;
|
||||
int? businessId;
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
int? isOnlyManageSelf;
|
||||
UserInfo? userInfo;
|
||||
UserInfo? userSender;
|
||||
int? keyboardPwdType;
|
||||
int? fingerprintType;
|
||||
int? cardType;
|
||||
int? faceType;
|
||||
int? keyboardPwdStatus;
|
||||
String? keyboardPwdName;
|
||||
String? fingerprintName;
|
||||
String? cardName;
|
||||
String? faceName;
|
||||
String? keyboardPwd;
|
||||
String? keyboardPwdHash;
|
||||
int? addType;
|
||||
int? pwdRight;
|
||||
int? isCustom;
|
||||
int? isCoerced;
|
||||
int? hoursStart;
|
||||
int? hoursEnd;
|
||||
int? pwdUserNo;
|
||||
String? senderUsername;
|
||||
int? keyboardPwdId;
|
||||
int? sendDate;
|
||||
int? currentKeyType; //当前钥匙类型 1:电子钥匙 2:密码钥匙 3:指纹钥匙 4:卡钥匙 5:人脸钥匙
|
||||
String? currentKeyTypeStr; //当前钥匙类型名称
|
||||
String? currentTypeImg; //当前钥匙类型图片
|
||||
String? currentKeyName; //当前钥匙名称
|
||||
bool? isCurrentSelect; //当前是否选中
|
||||
int? currentDateType; //钥匙日期类型 1:永久 2:限期 3:单次 4:循环
|
||||
int? currentOpenDoorID; //当前开门ID
|
||||
class LockUserListKeys { //当前开门ID
|
||||
|
||||
LockUserListKeys(
|
||||
{this.id,
|
||||
@ -242,6 +185,63 @@ class LockUserListKeys {
|
||||
isCurrentSelect = json['isCurrentSelect'];
|
||||
currentDateType = json['currentDateType'];
|
||||
}
|
||||
int? id;
|
||||
String? clientId;
|
||||
int? lockOwnerId;
|
||||
int? apiUserId;
|
||||
int? lockId;
|
||||
// int? senderUserId;
|
||||
// int? receiverUsernameType;
|
||||
String? keyName;
|
||||
int? keyType;
|
||||
int? startDate;
|
||||
int? endDate;
|
||||
List? weekDays;
|
||||
String? remarks;
|
||||
int? remoteEnable;
|
||||
int? isCameraEnable;
|
||||
int? faceAuthentication;
|
||||
int? lastFaceValidateTime;
|
||||
int? keyRight;
|
||||
int? remoteUnlockSwitch;
|
||||
int? userType;
|
||||
int? keyStatus;
|
||||
int? groupId;
|
||||
int? lockUserNo;
|
||||
int? businessId;
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
int? isOnlyManageSelf;
|
||||
UserInfo? userInfo;
|
||||
UserInfo? userSender;
|
||||
int? keyboardPwdType;
|
||||
int? fingerprintType;
|
||||
int? cardType;
|
||||
int? faceType;
|
||||
int? keyboardPwdStatus;
|
||||
String? keyboardPwdName;
|
||||
String? fingerprintName;
|
||||
String? cardName;
|
||||
String? faceName;
|
||||
String? keyboardPwd;
|
||||
String? keyboardPwdHash;
|
||||
int? addType;
|
||||
int? pwdRight;
|
||||
int? isCustom;
|
||||
int? isCoerced;
|
||||
int? hoursStart;
|
||||
int? hoursEnd;
|
||||
int? pwdUserNo;
|
||||
String? senderUsername;
|
||||
int? keyboardPwdId;
|
||||
int? sendDate;
|
||||
int? currentKeyType; //当前钥匙类型 1:电子钥匙 2:密码钥匙 3:指纹钥匙 4:卡钥匙 5:人脸钥匙
|
||||
String? currentKeyTypeStr; //当前钥匙类型名称
|
||||
String? currentTypeImg; //当前钥匙类型图片
|
||||
String? currentKeyName; //当前钥匙名称
|
||||
bool? isCurrentSelect; //当前是否选中
|
||||
int? currentDateType; //钥匙日期类型 1:永久 2:限期 3:单次 4:循环
|
||||
int? currentOpenDoorID;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
@ -314,15 +314,6 @@ class LockUserListKeys {
|
||||
}
|
||||
|
||||
class UserInfo {
|
||||
int? id;
|
||||
String? clientId;
|
||||
String? username;
|
||||
String? accountName;
|
||||
String? businessQueryStr;
|
||||
String? password;
|
||||
int? date;
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
|
||||
UserInfo(
|
||||
{this.id,
|
||||
@ -346,6 +337,15 @@ class UserInfo {
|
||||
createdAt = json['created_at'];
|
||||
updatedAt = json['updated_at'];
|
||||
}
|
||||
int? id;
|
||||
String? clientId;
|
||||
String? username;
|
||||
String? accountName;
|
||||
String? businessQueryStr;
|
||||
String? password;
|
||||
int? date;
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/lockUser/lockUser_entity.dart';
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/lockUser/lockUser_state.dart';
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_entity.dart';
|
||||
import 'package:star_lock/network/api_repository.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
@ -160,62 +160,62 @@ class LockUserLogic extends BaseGetXController {
|
||||
case 3:
|
||||
//限期 3 在开始和结束时间内有效,必需在开始时间24小时内使用一次,否则将失效
|
||||
useDateStr =
|
||||
'${startDateStr.toLocal().toString().substring(0, 16)} - ${endDateStr.toLocal().toString().substring(0, 16)} ${"限时".tr} ${itemData.isCustom! == 1 ? "自定义".tr : ""}';
|
||||
'${startDateStr.toLocal().toString().substring(0, 16)} - ${endDateStr.toLocal().toString().substring(0, 16)} ${'限时'.tr} ${itemData.isCustom! == 1 ? "自定义".tr : ""}';
|
||||
break;
|
||||
case 4:
|
||||
//删除 4 在锁上使用后会删除之前在锁上使用过的密码
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"清空码".tr}';
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${'清空码'.tr}';
|
||||
break;
|
||||
case 5:
|
||||
//周未循环 5 在周未开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周末".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${'周末'.tr}$starHour:00-$endHour:00 ${'循环'.tr}';
|
||||
break;
|
||||
case 6:
|
||||
//每日循环 6 每天开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"每日".tr}$starHour:00-$endHour:00 ${"循环"}';
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${'每日'.tr}$starHour:00-$endHour:00 ${'循环'.tr}';
|
||||
break;
|
||||
case 7:
|
||||
//工作日循环 7 工作日开始和结束时间指定的时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"工作日".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${'工作日'.tr}$starHour:00-$endHour:00 ${'循环'.tr}';
|
||||
break;
|
||||
case 8:
|
||||
//周一循环 8 每周一开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周一".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${'周一'.tr}$starHour:00-$endHour:00 ${'循环'.tr}';
|
||||
break;
|
||||
case 9:
|
||||
//周二循环 9 每周二开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周二".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${'周二'.tr}$starHour:00-$endHour:00 ${'循环'.tr}';
|
||||
break;
|
||||
case 10:
|
||||
//周三循环 10 每周三开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周三".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${'周三'.tr}$starHour:00-$endHour:00 ${'循环'.tr}';
|
||||
break;
|
||||
case 11:
|
||||
//周四循环 11 每周四开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周四".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${'周四'.tr}$starHour:00-$endHour:00 ${'循环'.tr}';
|
||||
break;
|
||||
case 12:
|
||||
//周五循环 12 每周五开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周五".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${'周五'.tr}$starHour:00-$endHour:00 ${'循环'.tr}';
|
||||
break;
|
||||
case 13:
|
||||
//周六循环 13 每周六开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周六".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${'周六'.tr}$starHour:00-$endHour:00 ${'循环'.tr}';
|
||||
break;
|
||||
case 14:
|
||||
//周天循环 14 每周日开始和结束时间指定时间段内有效
|
||||
useDateStr =
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${"周日".tr}$starHour:00-$endHour:00 ${"循环".tr}';
|
||||
'${endDateStr.toLocal().toString().substring(0, 16)} ${'周日'.tr}$starHour:00-$endHour:00 ${'循环'.tr}';
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_state.dart';
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/msgNotification/msgNotification/msgNotification_entity.dart';
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/msgNotification/openDoorNotify/openDoorNotify_entity.dart';
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/notificationMode/notificationMode_data.dart';
|
||||
import 'package:star_lock/network/api_repository.dart';
|
||||
@ -10,7 +11,7 @@ class CoerceFingerprintLogic extends BaseGetXController {
|
||||
|
||||
//添加胁迫开门通知
|
||||
void addLockNoticeSetting() async {
|
||||
var entity = await ApiRepository.to.addLockNoticeSetting(
|
||||
final MsgNotificationEntity entity = await ApiRepository.to.addLockNoticeSetting(
|
||||
lockId: state.getLockId.value,
|
||||
noticeType: 20,
|
||||
settingValue: {
|
||||
@ -30,8 +31,8 @@ class CoerceFingerprintLogic extends BaseGetXController {
|
||||
}
|
||||
|
||||
//删除开门通知
|
||||
void deleteLockNoticeSetting() async {
|
||||
var entity = await ApiRepository.to.deleteLockNoticeSettingAccount(
|
||||
Future<void> deleteLockNoticeSetting() async {
|
||||
final entity = await ApiRepository.to.deleteLockNoticeSettingAccount(
|
||||
lockNoticeSettingAccountId: state.familyData.value.id!,
|
||||
);
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
@ -42,14 +43,14 @@ class CoerceFingerprintLogic extends BaseGetXController {
|
||||
|
||||
//获取到家人信息的请求数组
|
||||
List getEmailAndSMSAccountList(bool isEmail) {
|
||||
List list = [];
|
||||
final List list = [];
|
||||
List accountList = [];
|
||||
isEmail
|
||||
? accountList = state.emailReceiverList.value
|
||||
: accountList = state.phoneReceiverList.value;
|
||||
for (int i = 0; i < accountList.length; i++) {
|
||||
MsgNoticeModeData item = accountList[i];
|
||||
Map map = {};
|
||||
final MsgNoticeModeData item = accountList[i];
|
||||
final Map map = {};
|
||||
map['countryCode'] = isEmail ? 0 : item.countryCode;
|
||||
map['account'] = isEmail ? item.receiveEmail : item.receivePhone;
|
||||
list.add(map);
|
||||
@ -61,9 +62,9 @@ class CoerceFingerprintLogic extends BaseGetXController {
|
||||
String emailListStr = '';
|
||||
if (val['emailReceiverList'] != null) {
|
||||
state.emailReceiverList.value = val['emailReceiverList'];
|
||||
List emailReceiverList = state.emailReceiverList.value;
|
||||
final List emailReceiverList = state.emailReceiverList.value;
|
||||
for (int i = 0; i < emailReceiverList.length; i++) {
|
||||
MsgNoticeModeData item = emailReceiverList[i];
|
||||
final MsgNoticeModeData item = emailReceiverList[i];
|
||||
emailListStr += item.receiveEmail;
|
||||
// 检查是否为最后一个元素
|
||||
if (i < emailReceiverList.length - 1) {
|
||||
@ -79,9 +80,9 @@ class CoerceFingerprintLogic extends BaseGetXController {
|
||||
|
||||
if (val['phoneReceiverList'] != null) {
|
||||
state.phoneReceiverList.value = val['phoneReceiverList'];
|
||||
List phoneReceiverList = state.phoneReceiverList.value;
|
||||
final List phoneReceiverList = state.phoneReceiverList.value;
|
||||
for (int i = 0; i < phoneReceiverList.length; i++) {
|
||||
MsgNoticeModeData item = phoneReceiverList[i];
|
||||
final MsgNoticeModeData item = phoneReceiverList[i];
|
||||
phoneListStr += item.receivePhone;
|
||||
// 检查是否为最后一个元素
|
||||
if (i < phoneReceiverList.length - 1) {
|
||||
@ -105,8 +106,8 @@ class CoerceFingerprintLogic extends BaseGetXController {
|
||||
|
||||
//根据列表返回值得到邮箱、手机列表
|
||||
Map<String, List<MsgNoticeModeData>> getAccountsMap() {
|
||||
List<MsgNoticeModeData> mailAccounts = [];
|
||||
List<MsgNoticeModeData> smsAccounts = [];
|
||||
final List<MsgNoticeModeData> mailAccounts = [];
|
||||
final List<MsgNoticeModeData> smsAccounts = [];
|
||||
|
||||
if (state.familyData.value.settingValue != null) {
|
||||
for (NoticeWay item
|
||||
@ -114,7 +115,7 @@ class CoerceFingerprintLogic extends BaseGetXController {
|
||||
if (item.type == 'mail' && item.accounts != null) {
|
||||
for (Accounts account in item.accounts!) {
|
||||
if (account.account != null) {
|
||||
MsgNoticeModeData msgNoticeModeData = MsgNoticeModeData();
|
||||
final MsgNoticeModeData msgNoticeModeData = MsgNoticeModeData();
|
||||
msgNoticeModeData.receiveEmail = account.account!;
|
||||
mailAccounts.add(msgNoticeModeData);
|
||||
}
|
||||
@ -122,7 +123,7 @@ class CoerceFingerprintLogic extends BaseGetXController {
|
||||
} else if (item.type == 'sms' && item.accounts != null) {
|
||||
for (Accounts account in item.accounts!) {
|
||||
if (account.account != null && account.countryCode != null) {
|
||||
MsgNoticeModeData msgNoticeModeData = MsgNoticeModeData();
|
||||
final MsgNoticeModeData msgNoticeModeData = MsgNoticeModeData();
|
||||
msgNoticeModeData.receivePhone = account.account!;
|
||||
msgNoticeModeData.countryCode = account.countryCode!;
|
||||
smsAccounts.add(msgNoticeModeData);
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/appRouters.dart';
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_logic.dart';
|
||||
import 'package:star_lock/tools/showCupertinoAlertView.dart';
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/msgNotification/coerceOpenDoor/coerceFingerprint/coerceFingerprint_state.dart';
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/msgNotification/openDoorNotify/openDoorNotify_entity.dart';
|
||||
import 'package:star_lock/tools/commonItem.dart';
|
||||
import 'package:star_lock/tools/showCupertinoAlertView.dart';
|
||||
import 'package:star_lock/tools/storage.dart';
|
||||
import 'package:star_lock/tools/submitBtn.dart';
|
||||
|
||||
@ -19,8 +22,8 @@ class CoerceFingerprintPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _CoerceFingerprintPageState extends State<CoerceFingerprintPage> {
|
||||
final logic = Get.put(CoerceFingerprintLogic());
|
||||
final state = Get.find<CoerceFingerprintLogic>().state;
|
||||
final CoerceFingerprintLogic logic = Get.put(CoerceFingerprintLogic());
|
||||
final CoerceFingerprintState state = Get.find<CoerceFingerprintLogic>().state;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -33,7 +36,7 @@ class _CoerceFingerprintPageState extends State<CoerceFingerprintPage> {
|
||||
body: Container(
|
||||
padding: EdgeInsets.all(30.w),
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Obx(() => CommonItem(
|
||||
leftTitel: '胁迫指纹'.tr,
|
||||
rightTitle: state.isDetail.value == true
|
||||
@ -44,7 +47,7 @@ class _CoerceFingerprintPageState extends State<CoerceFingerprintPage> {
|
||||
action: () {
|
||||
//锁用户
|
||||
Get.toNamed(Routers.coerceFingerprintListPage,
|
||||
arguments: {'lockId': state.getLockId.value})
|
||||
arguments: <String, int>{'lockId': state.getLockId.value})
|
||||
?.then((val) {
|
||||
if (val != null) {
|
||||
state.fingerprintData.value = val;
|
||||
@ -59,11 +62,11 @@ class _CoerceFingerprintPageState extends State<CoerceFingerprintPage> {
|
||||
color: Colors.white,
|
||||
margin: EdgeInsets.only(bottom: 10.h),
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(Routers.notificationModePage,
|
||||
arguments: {'familyData': state.familyData.value})
|
||||
arguments: <String, DataList>{'familyData': state.familyData.value})
|
||||
?.then((val) {
|
||||
if (val != null) {
|
||||
state.emailListStr.value = logic.getEmailListStr(val);
|
||||
@ -75,10 +78,10 @@ class _CoerceFingerprintPageState extends State<CoerceFingerprintPage> {
|
||||
color: Colors.white,
|
||||
margin: EdgeInsets.only(bottom: 10.h),
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
CommonItem(
|
||||
leftTitel: '提醒方式'.tr,
|
||||
rightTitle: "",
|
||||
rightTitle: '',
|
||||
isHaveLine: false,
|
||||
isHaveRightWidget: false,
|
||||
isHaveDirection: true,
|
||||
@ -110,7 +113,7 @@ class _CoerceFingerprintPageState extends State<CoerceFingerprintPage> {
|
||||
: logic.checkBtnDisable(),
|
||||
isDelete: state.isDetail.value,
|
||||
onClick: () async {
|
||||
var isVip = await Storage.getBool(saveIsVip);
|
||||
bool? isVip = await Storage.getBool(saveIsVip);
|
||||
if (isVip == true) {
|
||||
if (state.isDetail.value) {
|
||||
logic.deleteLockNoticeSetting();
|
||||
@ -141,7 +144,7 @@ class _CoerceFingerprintPageState extends State<CoerceFingerprintPage> {
|
||||
borderRadius: BorderRadius.circular(6.0.w),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Text(
|
||||
notifyTitle,
|
||||
style: TextStyle(color: Colors.black, fontSize: 20.sp),
|
||||
|
||||
@ -3,17 +3,6 @@ import 'package:star_lock/main/lockDetail/messageWarn/msgNotification/coerceOpen
|
||||
import 'package:star_lock/main/lockDetail/messageWarn/msgNotification/openDoorNotify/openDoorNotify_entity.dart';
|
||||
|
||||
class CoerceFingerprintState {
|
||||
var pageNum = 1.obs; //请求页码
|
||||
final pageSize = 20.obs; //请求每页数据条数
|
||||
final itemDataList = [].obs;
|
||||
var getLockId = 0.obs;
|
||||
var fingerprintData = CoerceFingerprintItemData().obs;
|
||||
var emailReceiverList = [].obs;
|
||||
var phoneReceiverList = [].obs;
|
||||
var emailListStr = ''.obs;
|
||||
var phontListStr = ''.obs;
|
||||
var isDetail = false.obs;
|
||||
var familyData = DataList().obs;
|
||||
|
||||
CoerceFingerprintState() {
|
||||
Map map = Get.arguments;
|
||||
@ -29,4 +18,15 @@ class CoerceFingerprintState {
|
||||
familyData.value = map['itemData'];
|
||||
}
|
||||
}
|
||||
RxInt pageNum = 1.obs; //请求页码
|
||||
final RxInt pageSize = 20.obs; //请求每页数据条数
|
||||
final RxList itemDataList = [].obs;
|
||||
RxInt getLockId = 0.obs;
|
||||
Rx<CoerceFingerprintItemData> fingerprintData = CoerceFingerprintItemData().obs;
|
||||
RxList emailReceiverList = [].obs;
|
||||
RxList phoneReceiverList = [].obs;
|
||||
RxString emailListStr = ''.obs;
|
||||
RxString phontListStr = ''.obs;
|
||||
RxBool isDetail = false.obs;
|
||||
Rx<DataList> familyData = DataList().obs;
|
||||
}
|
||||
|
||||
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