Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
38a193a5a7
BIN
star_lock/images/main/icon_lockDetail_rectangle.png
Normal file
BIN
star_lock/images/main/icon_lockDetail_rectangle.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
star_lock/images/main/icon_main_attachment_ElectricCurtain.png
Normal file
BIN
star_lock/images/main/icon_main_attachment_ElectricCurtain.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
BIN
star_lock/images/main/icon_main_attachment_doorOpener.png
Normal file
BIN
star_lock/images/main/icon_main_attachment_doorOpener.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
BIN
star_lock/images/main/icon_main_attachment_doorSensor.png
Normal file
BIN
star_lock/images/main/icon_main_attachment_doorSensor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
BIN
star_lock/images/main/icon_main_attachment_lighting.png
Normal file
BIN
star_lock/images/main/icon_main_attachment_lighting.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
star_lock/images/main/icon_main_attachment_sensor.png
Normal file
BIN
star_lock/images/main/icon_main_attachment_sensor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
@ -1,6 +1,7 @@
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/common/safetyVerification/safetyVerification_binding.dart';
|
import 'package:star_lock/common/safetyVerification/safetyVerification_binding.dart';
|
||||||
import 'package:star_lock/login/register/starLock_register_binding.dart';
|
import 'package:star_lock/login/register/starLock_register_binding.dart';
|
||||||
|
import 'package:star_lock/main/accessoriesList/accessoriesList_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_page.dart';
|
import 'package:star_lock/main/lockDetail/doorLockLog/doorLockLog_page.dart';
|
||||||
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecord/keyOperationRecord_page.dart';
|
import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyDetail/keyOperationRecord/keyOperationRecord_page.dart';
|
||||||
|
|
||||||
@ -186,7 +187,7 @@ abstract class Routers {
|
|||||||
static const starLockMain = '/StarLockMain'; // 首页
|
static const starLockMain = '/StarLockMain'; // 首页
|
||||||
static const starLockMinePage = '/StarLockMinePage'; // 我的
|
static const starLockMinePage = '/StarLockMinePage'; // 我的
|
||||||
static const selectLockTypePage = '/SelectLockTypePage'; // 选择锁类型
|
static const selectLockTypePage = '/SelectLockTypePage'; // 选择锁类型
|
||||||
static const LockMallPage = '/LockMallPage'; // 商城页面
|
static const lockMallPage = '/LockMallPage'; // 商城页面
|
||||||
static const addLockPage = '/AddLockPage'; // 选择锁类型
|
static const addLockPage = '/AddLockPage'; // 选择锁类型
|
||||||
static const nearbyLockPage = '/NearbyLockPage'; // 附近的锁
|
static const nearbyLockPage = '/NearbyLockPage'; // 附近的锁
|
||||||
static const lockAddressPage = '/LockAddressPage'; // 锁地址
|
static const lockAddressPage = '/LockAddressPage'; // 锁地址
|
||||||
@ -424,6 +425,8 @@ abstract class Routers {
|
|||||||
static const catEyeCustomModePage = '/catEyeCustomModePage'; //猫眼自定义模式
|
static const catEyeCustomModePage = '/catEyeCustomModePage'; //猫眼自定义模式
|
||||||
static const videoSlotPage = '/videoSlotPage'; //录像时段
|
static const videoSlotPage = '/videoSlotPage'; //录像时段
|
||||||
static const liveVideoPage = '/liveVideoPage'; //实时画面
|
static const liveVideoPage = '/liveVideoPage'; //实时画面
|
||||||
|
|
||||||
|
static const accessoriesListPage = '/accessoriesListPage'; //配件列表
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class AppRouters {
|
abstract class AppRouters {
|
||||||
@ -445,7 +448,7 @@ abstract class AppRouters {
|
|||||||
page: () => const SelectLockTypePage(),
|
page: () => const SelectLockTypePage(),
|
||||||
),
|
),
|
||||||
GetPage(
|
GetPage(
|
||||||
name: Routers.LockMallPage,
|
name: Routers.lockMallPage,
|
||||||
page: () => const LockMallPage(),
|
page: () => const LockMallPage(),
|
||||||
),
|
),
|
||||||
GetPage(
|
GetPage(
|
||||||
@ -1024,5 +1027,8 @@ abstract class AppRouters {
|
|||||||
GetPage(
|
GetPage(
|
||||||
name: Routers.messageDetailPage,
|
name: Routers.messageDetailPage,
|
||||||
page: (() => const MessageDetailPage())),
|
page: (() => const MessageDetailPage())),
|
||||||
|
GetPage(
|
||||||
|
name: Routers.accessoriesListPage,
|
||||||
|
page: (() => const AccessoriesListPage()))
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,18 +49,26 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
|||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.all(10.w),
|
padding: EdgeInsets.all(10.w),
|
||||||
child: Center(child: Image.asset('images/icon_main_1024.png', width: 110.w, height: 110.w))),
|
child: Center(
|
||||||
|
child: Image.asset('images/icon_main_1024.png',
|
||||||
|
width: 110.w, height: 110.w))),
|
||||||
SizedBox(height: 50.w),
|
SizedBox(height: 50.w),
|
||||||
LoginInput(
|
LoginInput(
|
||||||
controller: state.emailOrPhoneController,
|
controller: state.emailOrPhoneController,
|
||||||
onchangeAction: (v){
|
onchangeAction: (v) {
|
||||||
logic.checkNext(state.emailOrPhoneController);
|
logic.checkNext(state.emailOrPhoneController);
|
||||||
},
|
},
|
||||||
leftWidget: Padding(
|
leftWidget: Padding(
|
||||||
padding: EdgeInsets.only(top: 30.w, bottom: 20.w, right: 20.w, left: 5.w),
|
padding: EdgeInsets.only(
|
||||||
child: Image.asset('images/icon_login_account.png', width: 36.w, height: 36.w,),
|
top: 30.w, bottom: 20.w, right: 20.w, left: 5.w),
|
||||||
|
child: Image.asset(
|
||||||
|
'images/icon_login_account.png',
|
||||||
|
width: 36.w,
|
||||||
|
height: 36.w,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
hintText:
|
||||||
|
TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
// FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
// FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||||
@ -69,15 +77,21 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
|||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
LoginInput(
|
LoginInput(
|
||||||
controller: state.pwdController,
|
controller: state.pwdController,
|
||||||
onchangeAction: (v){
|
onchangeAction: (v) {
|
||||||
logic.checkNext(state.pwdController);
|
logic.checkNext(state.pwdController);
|
||||||
},
|
},
|
||||||
isPwd: true,
|
isPwd: true,
|
||||||
leftWidget: Padding(
|
leftWidget: Padding(
|
||||||
padding: EdgeInsets.only(top: 30.w, bottom: 20.w, right: 20.w, left: 5.w),
|
padding: EdgeInsets.only(
|
||||||
child: Image.asset('images/icon_login_password.png', width: 36.w, height: 36.w,),
|
top: 30.w, bottom: 20.w, right: 20.w, left: 5.w),
|
||||||
|
child: Image.asset(
|
||||||
|
'images/icon_login_password.png',
|
||||||
|
width: 36.w,
|
||||||
|
height: 36.w,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}",
|
hintText:
|
||||||
|
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}",
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
LengthLimitingTextInputFormatter(20),
|
LengthLimitingTextInputFormatter(20),
|
||||||
]),
|
]),
|
||||||
@ -86,41 +100,55 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Obx(() => GestureDetector(
|
Obx(() => GestureDetector(
|
||||||
onTap: (){
|
onTap: () {
|
||||||
state.agree.value = !state.agree.value;
|
state.agree.value = !state.agree.value;
|
||||||
logic.changeAgreeState();
|
logic.changeAgreeState();
|
||||||
},
|
},
|
||||||
child: Image.asset(state.agree.value ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w,)
|
child: Image.asset(
|
||||||
)),
|
state.agree.value
|
||||||
SizedBox(width: 15.w,),
|
? 'images/icon_round_select.png'
|
||||||
|
: 'images/icon_round_unSelect.png',
|
||||||
|
width: 30.w,
|
||||||
|
height: 30.w,
|
||||||
|
))),
|
||||||
|
SizedBox(
|
||||||
|
width: 15.w,
|
||||||
|
),
|
||||||
Flexible(
|
Flexible(
|
||||||
child: RichText(
|
child: RichText(
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
text: TranslationLoader.lanKeys!.readAndAgree!.tr,
|
text: TranslationLoader.lanKeys!.readAndAgree!.tr,
|
||||||
style: TextStyle(color: const Color(0xff333333), fontSize: 20.sp),
|
style: TextStyle(
|
||||||
|
color: const Color(0xff333333), fontSize: 20.sp),
|
||||||
children: [
|
children: [
|
||||||
WidgetSpan(
|
WidgetSpan(
|
||||||
alignment: PlaceholderAlignment.middle,
|
alignment: PlaceholderAlignment.middle,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
child: Text('《${TranslationLoader.lanKeys!.userAgreement!.tr}》', style: TextStyle(color: AppColors.mainColor, fontSize: 20.sp)),
|
child: Text(
|
||||||
|
'《${TranslationLoader.lanKeys!.userAgreement!.tr}》',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.mainColor,
|
||||||
|
fontSize: 20.sp)),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routers.webviewShowPage,
|
Get.toNamed(Routers.webviewShowPage, arguments: {
|
||||||
arguments: {
|
"url": XSConstantMacro.userAgreementURL,
|
||||||
"url": XSConstantMacro.userAgreementURL,
|
"title": '用户协议'
|
||||||
"title": '用户协议'
|
});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
WidgetSpan(
|
WidgetSpan(
|
||||||
alignment: PlaceholderAlignment.middle,
|
alignment: PlaceholderAlignment.middle,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
child: Text('《${TranslationLoader.lanKeys!.privacyPolicy!.tr}》', style: TextStyle( color: AppColors.mainColor, fontSize: 20.sp)),
|
child: Text(
|
||||||
|
'《${TranslationLoader.lanKeys!.privacyPolicy!.tr}》',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.mainColor,
|
||||||
|
fontSize: 20.sp)),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routers.webviewShowPage,
|
Get.toNamed(Routers.webviewShowPage, arguments: {
|
||||||
arguments: {
|
"url": XSConstantMacro.privacyPolicyURL,
|
||||||
"url": XSConstantMacro.privacyPolicyURL,
|
"title": '隐私政策'
|
||||||
"title": '隐私政策'
|
});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
@ -135,10 +163,11 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
|||||||
borderRadius: 20.w,
|
borderRadius: 20.w,
|
||||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
isDisabled: state.canNext.value,
|
isDisabled: state.canNext.value,
|
||||||
onClick: state.canNext.value ? (){
|
onClick: state.canNext.value
|
||||||
logic.login();
|
? () {
|
||||||
}: null)
|
logic.login();
|
||||||
),
|
}
|
||||||
|
: null)),
|
||||||
SizedBox(height: 50.w),
|
SizedBox(height: 50.w),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -149,11 +178,34 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
|||||||
height: 50.h,
|
height: 50.h,
|
||||||
// color: Colors.red,
|
// color: Colors.red,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text('${TranslationLoader.lanKeys!.forgetPassword!.tr}?', style: TextStyle(fontSize: 22.sp, color: AppColors.mainColor)),
|
child: Text(
|
||||||
|
'${TranslationLoader.lanKeys!.forgetPassword!.tr}?',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22.sp, color: AppColors.mainColor)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.pushNamed(context, Routers.starLockForgetPasswordPage);
|
Navigator.pushNamed(
|
||||||
|
context, Routers.starLockForgetPasswordPage);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: SizedBox(
|
||||||
|
width: 10.sp,
|
||||||
|
)),
|
||||||
|
GestureDetector(
|
||||||
|
child: SizedBox(
|
||||||
|
// width: 150.w,
|
||||||
|
height: 50.h,
|
||||||
|
// color: Colors.red,
|
||||||
|
child: Center(
|
||||||
|
child: Text('演示模式',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22.sp, color: AppColors.mainColor)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(Routers.demoModeLockDetailPage);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@ -0,0 +1,23 @@
|
|||||||
|
import 'package:star_lock/main/accessoriesList/accessoriesList_state.dart';
|
||||||
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
|
||||||
|
class AccessoriesListLogic extends BaseGetXController {
|
||||||
|
final AccessoriesListState state = AccessoriesListState();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onReady() {
|
||||||
|
// TODO: implement onReady
|
||||||
|
super.onReady();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onInit() {
|
||||||
|
// TODO: implement onInit
|
||||||
|
super.onInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onClose() {
|
||||||
|
// TODO: implement onClose
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,76 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/main/accessoriesList/accessoriesList_logic.dart';
|
||||||
|
|
||||||
|
import '../../../app_settings/app_colors.dart';
|
||||||
|
import '../../../baseWidget.dart';
|
||||||
|
import '../../../tools/titleAppBar.dart';
|
||||||
|
|
||||||
|
class AccessoriesListPage extends StatefulWidget {
|
||||||
|
const AccessoriesListPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<AccessoriesListPage> createState() => _AccessoriesListPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AccessoriesListPageState extends State<AccessoriesListPage>
|
||||||
|
with BaseWidget {
|
||||||
|
final logic = Get.put(AccessoriesListLogic());
|
||||||
|
final state = Get.find<AccessoriesListLogic>().state;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
appBar: TitleAppBar(
|
||||||
|
barTitle: '选择设备类型',
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor),
|
||||||
|
body: ListView(
|
||||||
|
children: [
|
||||||
|
_accessoriesItem(
|
||||||
|
'images/main/icon_main_attachment_lighting.png', "照明灯具", true),
|
||||||
|
_accessoriesItem(
|
||||||
|
'images/main/icon_main_attachment_doorOpener.png', "开门器", false),
|
||||||
|
_accessoriesItem(
|
||||||
|
'images/main/icon_main_attachment_ElectricCurtain.png',
|
||||||
|
"电动窗帘",
|
||||||
|
true),
|
||||||
|
_accessoriesItem('images/main/icon_main_attachment_doorSensor.png',
|
||||||
|
"门窗传感器", false),
|
||||||
|
_accessoriesItem(
|
||||||
|
'images/main/icon_main_attachment_sensor.png', "传感器", true),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//配件列表
|
||||||
|
Widget _accessoriesItem(String iconStr, String gatewayType, bool isWhite) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
logic.showToast("该功能暂未开放");
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
color: isWhite == true ? Colors.white : AppColors.mainBackgroundColor,
|
||||||
|
width: 1.sw,
|
||||||
|
height: 140.h,
|
||||||
|
padding: EdgeInsets.all(30.w),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
iconStr,
|
||||||
|
),
|
||||||
|
SizedBox(width: 20.w),
|
||||||
|
Text(
|
||||||
|
gatewayType,
|
||||||
|
style: TextStyle(fontSize: 22.sp),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +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; //不同类型锁图片更换
|
||||||
|
}
|
||||||
@ -70,18 +70,18 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
Obx(() => getPeriodValidityWidget()),
|
Obx(() => getPeriodValidityWidget()),
|
||||||
Container(height: 10.h),
|
Container(height: 10.h),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: "接受账号",
|
leftTitel: "接收者",
|
||||||
rightTitle: state.itemData.value.username,
|
rightTitle: state.itemData.value.username ?? "",
|
||||||
action: () {}),
|
action: () {}),
|
||||||
const SizedBox(height: 1),
|
const SizedBox(height: 1),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.sender!.tr,
|
leftTitel: TranslationLoader.lanKeys!.sender!.tr,
|
||||||
rightTitle: state.itemData.value.senderUsername,
|
rightTitle: state.itemData.value.senderUsername ?? "",
|
||||||
action: () {}),
|
action: () {}),
|
||||||
const SizedBox(height: 1),
|
const SizedBox(height: 1),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
leftTitel: TranslationLoader.lanKeys!.senderTime!.tr,
|
leftTitel: TranslationLoader.lanKeys!.senderTime!.tr,
|
||||||
rightTitle: getSenderDate(state.itemData.value),
|
rightTitle: getSenderDate(state.itemData.value) ?? "",
|
||||||
action: () {}),
|
action: () {}),
|
||||||
Container(height: 10.h),
|
Container(height: 10.h),
|
||||||
CommonItem(
|
CommonItem(
|
||||||
@ -157,12 +157,15 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
rightTitle: '${state.beginTime.value}\n${state.endTime.value}',
|
rightTitle: '${state.beginTime.value}\n${state.endTime.value}',
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () async {
|
action: () async {
|
||||||
var data = await Get.toNamed(Routers.electronicKeyDetailChangeDate, arguments: {"itemData": state.itemData.value});
|
var data = await Get.toNamed(Routers.electronicKeyDetailChangeDate,
|
||||||
if(data != null) {
|
arguments: {"itemData": state.itemData.value});
|
||||||
|
if (data != null) {
|
||||||
state.beginTimeTimestamp.value = data["beginTimeTimestamp"];
|
state.beginTimeTimestamp.value = data["beginTimeTimestamp"];
|
||||||
state.endTimeTimestamp.value = data["endTimeTimestamp"];
|
state.endTimeTimestamp.value = data["endTimeTimestamp"];
|
||||||
state.beginTime.value = DateTool().dateToYMDHNString(state.beginTimeTimestamp.value.toString());
|
state.beginTime.value = DateTool()
|
||||||
state.endTime.value = DateTool().dateToYMDHNString(state.endTimeTimestamp.value.toString());
|
.dateToYMDHNString(state.beginTimeTimestamp.value.toString());
|
||||||
|
state.endTime.value = DateTool()
|
||||||
|
.dateToYMDHNString(state.endTimeTimestamp.value.toString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -379,28 +379,30 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
List<Widget> getAttachmentWidget() {
|
List<Widget> getAttachmentWidget() {
|
||||||
var showWidgetArr = <Widget>[];
|
var showWidgetArr = <Widget>[];
|
||||||
// 无线键盘
|
// 无线键盘
|
||||||
if (state.isAttendance.value == 1) {
|
// if (state.isAttendance.value == 1) {
|
||||||
showWidgetArr.add(bottomItem(
|
// showWidgetArr.add(bottomItem(
|
||||||
'images/main/icon_lockDetail_WirelessKeyboard.png',
|
// 'images/main/icon_lockDetail_WirelessKeyboard.png',
|
||||||
'无线键盘',
|
// '无线键盘',
|
||||||
state.bottomBtnisUneable.value,
|
// state.bottomBtnisUneable.value,
|
||||||
() {}));
|
// () {}));
|
||||||
}
|
// }
|
||||||
// 照明
|
// // 照明
|
||||||
showWidgetArr.add(bottomItem('images/main/icon_lockDetail_illuminator.png',
|
// showWidgetArr.add(bottomItem('images/main/icon_lockDetail_illuminator.png',
|
||||||
'照明', state.bottomBtnisUneable.value, () {}));
|
// '照明', state.bottomBtnisUneable.value, () {}));
|
||||||
|
|
||||||
// 照明
|
// // 照明
|
||||||
showWidgetArr.add(bottomItem('images/main/icon_lockDetail_illuminator.png',
|
// showWidgetArr.add(bottomItem('images/main/icon_lockDetail_illuminator.png',
|
||||||
'门磁', state.bottomBtnisUneable.value, () {}));
|
// '门磁', state.bottomBtnisUneable.value, () {}));
|
||||||
|
|
||||||
// 门磁
|
// // 门磁
|
||||||
showWidgetArr.add(bottomItem('images/main/icon_lockDetail_illuminator.png',
|
// showWidgetArr.add(bottomItem('images/main/icon_lockDetail_illuminator.png',
|
||||||
'开门器', state.bottomBtnisUneable.value, () {}));
|
// '开门器', state.bottomBtnisUneable.value, () {}));
|
||||||
|
|
||||||
// 新增配件
|
// 新增配件
|
||||||
showWidgetArr.add(bottomItem('images/main/icon_main_addLock.png', '新增配件',
|
showWidgetArr.add(bottomItem('images/main/icon_main_addLock.png', '新增配件',
|
||||||
state.bottomBtnisUneable.value, () {}));
|
state.bottomBtnisUneable.value, () {
|
||||||
|
Navigator.pushNamed(context, Routers.accessoriesListPage);
|
||||||
|
}));
|
||||||
|
|
||||||
return showWidgetArr;
|
return showWidgetArr;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,31 +79,30 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
|||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
Obx(
|
Obx(
|
||||||
() =>
|
() => state.listData.value.isEmpty || state.listData.value.isEmpty
|
||||||
state.listData.value.isEmpty || state.listData.value.length == 0
|
? Image.asset(
|
||||||
? Image.asset(
|
'images/main/monitorBg.png',
|
||||||
'images/main/monitorBg.png',
|
width: ScreenUtil().screenWidth,
|
||||||
width: ScreenUtil().screenWidth,
|
height: ScreenUtil().screenHeight,
|
||||||
height: ScreenUtil().screenHeight,
|
fit: BoxFit.cover,
|
||||||
fit: BoxFit.cover,
|
)
|
||||||
)
|
: Builder(
|
||||||
: Builder(
|
builder: (BuildContext context) {
|
||||||
builder: (BuildContext context) {
|
try {
|
||||||
try {
|
return Image.memory(
|
||||||
return Image.memory(
|
state.listData.value,
|
||||||
state.listData.value,
|
gaplessPlayback: true,
|
||||||
gaplessPlayback: true,
|
width: 1.sw,
|
||||||
width: 1.sw,
|
height: 1.sh,
|
||||||
height: 1.sh,
|
fit: BoxFit.cover,
|
||||||
fit: BoxFit.cover,
|
);
|
||||||
);
|
} catch (e, stackTrace) {
|
||||||
} catch (e, stackTrace) {
|
print('Error loading image: $e');
|
||||||
print('Error loading image: $e');
|
print('Stack trace: $stackTrace');
|
||||||
print('Stack trace: $stackTrace');
|
return Container();
|
||||||
return Container();
|
}
|
||||||
}
|
},
|
||||||
},
|
),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Obx(() => state.listData.value.isEmpty
|
Obx(() => state.listData.value.isEmpty
|
||||||
? Positioned(
|
? Positioned(
|
||||||
@ -161,7 +160,7 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
|||||||
"images/main/icon_lockDetail_monitoringOpenVoice.png"))),
|
"images/main/icon_lockDetail_monitoringOpenVoice.png"))),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 60.w),
|
SizedBox(width: 30.w),
|
||||||
// 截图
|
// 截图
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -178,7 +177,7 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
|||||||
"images/main/icon_lockDetail_monitoringScreenshot.png")),
|
"images/main/icon_lockDetail_monitoringScreenshot.png")),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 60.w),
|
SizedBox(width: 30.w),
|
||||||
// 录制
|
// 录制
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -191,10 +190,34 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
|||||||
child: Image(
|
child: Image(
|
||||||
width: 40.w,
|
width: 40.w,
|
||||||
height: 40.w,
|
height: 40.w,
|
||||||
|
fit: BoxFit.fill,
|
||||||
image: const AssetImage(
|
image: const AssetImage(
|
||||||
"images/main/icon_lockDetail_monitoringScreenRecording.png")),
|
"images/main/icon_lockDetail_monitoringScreenRecording.png")),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SizedBox(width: 30.w),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
logic.showToast('该功能暂未开放');
|
||||||
|
},
|
||||||
|
child: Image(
|
||||||
|
width: 28.w,
|
||||||
|
height: 28.w,
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
image:
|
||||||
|
const AssetImage("images/main/icon_lockDetail_rectangle.png"))
|
||||||
|
// child: Container(
|
||||||
|
// width: 50.w,
|
||||||
|
// height: 50.w,
|
||||||
|
// padding: EdgeInsets.all(5.w),
|
||||||
|
// child: Image(
|
||||||
|
// width: 40.w,
|
||||||
|
// height: 40.w,
|
||||||
|
// fit: BoxFit.fill,
|
||||||
|
// image: const AssetImage(
|
||||||
|
// "images/main/icon_lockDetail_rectangle.png")),
|
||||||
|
// ),
|
||||||
|
)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,6 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,17 +34,21 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
haveBack: true,
|
haveBack: true,
|
||||||
backgroundColor: AppColors.mainColor,
|
backgroundColor: AppColors.mainColor,
|
||||||
),
|
),
|
||||||
body: Container(
|
body: ListView(
|
||||||
width: 1.sw,
|
children: [
|
||||||
height: 1.sh - ScreenUtil().statusBarHeight * 2,
|
Container(
|
||||||
color: Colors.white,
|
width: 1.sw,
|
||||||
child: Column(
|
height: 1.sh - ScreenUtil().statusBarHeight,
|
||||||
children: [
|
color: Colors.white,
|
||||||
topTip(),
|
child: Column(
|
||||||
topWidget(),
|
children: [
|
||||||
Expanded(child: bottomWidget())
|
topTip(),
|
||||||
],
|
topWidget(),
|
||||||
),
|
Expanded(child: bottomWidget())
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,6 +75,7 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
Widget topWidget() {
|
Widget topWidget() {
|
||||||
// KeyInfos keyInfo = widget.lockMainEntity.data!.keyInfos![0];
|
// KeyInfos keyInfo = widget.lockMainEntity.data!.keyInfos![0];
|
||||||
return Column(
|
return Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(height: 30.h),
|
SizedBox(height: 30.h),
|
||||||
Stack(
|
Stack(
|
||||||
@ -229,7 +233,8 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
showWidgetArr.add(bottomItem('images/main/icon_main_clockingIn.png',
|
showWidgetArr.add(bottomItem('images/main/icon_main_clockingIn.png',
|
||||||
TranslationLoader.lanKeys!.checkingIn!.tr, () {
|
TranslationLoader.lanKeys!.checkingIn!.tr, () {
|
||||||
// gotoLogin();
|
// gotoLogin();
|
||||||
Get.toNamed(Routers.checkingInListPage, arguments: LockListInfoItemEntity());
|
Get.toNamed(Routers.checkingInListPage,
|
||||||
|
arguments: LockListInfoItemEntity());
|
||||||
}));
|
}));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@ -239,9 +244,8 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
TranslationLoader.lanKeys!.electronicKey!.tr, () {
|
TranslationLoader.lanKeys!.electronicKey!.tr, () {
|
||||||
// gotoLogin();
|
// gotoLogin();
|
||||||
|
|
||||||
Get.toNamed(Routers.electronicKeyListPage, arguments: {
|
Get.toNamed(Routers.electronicKeyListPage,
|
||||||
"keyInfo": LockListInfoItemEntity()
|
arguments: {"keyInfo": LockListInfoItemEntity()});
|
||||||
});
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// 密码
|
// 密码
|
||||||
@ -249,9 +253,8 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
TranslationLoader.lanKeys!.password!.tr, () {
|
TranslationLoader.lanKeys!.password!.tr, () {
|
||||||
// gotoLogin();
|
// gotoLogin();
|
||||||
|
|
||||||
Get.toNamed(Routers.passwordKeyListPage, arguments: {
|
Get.toNamed(Routers.passwordKeyListPage,
|
||||||
"keyInfo": LockListInfoItemEntity()
|
arguments: {"keyInfo": LockListInfoItemEntity()});
|
||||||
});
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// ic卡
|
// ic卡
|
||||||
@ -259,8 +262,7 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
TranslationLoader.lanKeys!.card!.tr, () {
|
TranslationLoader.lanKeys!.card!.tr, () {
|
||||||
// gotoLogin();
|
// gotoLogin();
|
||||||
|
|
||||||
Get.toNamed(Routers.cardListPage,
|
Get.toNamed(Routers.cardListPage, arguments: {"lockId": 0});
|
||||||
arguments: {"lockId": 0});
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// 指纹
|
// 指纹
|
||||||
@ -313,9 +315,8 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
TranslationLoader.lanKeys!.authorizedAdmin!.tr, () {
|
TranslationLoader.lanKeys!.authorizedAdmin!.tr, () {
|
||||||
// gotoLogin();
|
// gotoLogin();
|
||||||
|
|
||||||
Get.toNamed(Routers.authorizedAdminListPage, arguments: {
|
Get.toNamed(Routers.authorizedAdminListPage,
|
||||||
"keyInfo": LockListInfoItemEntity()
|
arguments: {"keyInfo": LockListInfoItemEntity()});
|
||||||
});
|
|
||||||
}),
|
}),
|
||||||
// 操作记录
|
// 操作记录
|
||||||
bottomItem('images/main/icon_main_operatingRecord.png',
|
bottomItem('images/main/icon_main_operatingRecord.png',
|
||||||
@ -330,7 +331,8 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
Get.toNamed(Routers.videoLogPage);
|
Get.toNamed(Routers.videoLogPage);
|
||||||
}),
|
}),
|
||||||
// 消息提醒
|
// 消息提醒
|
||||||
bottomItem('images/main/icon_lockDetail_messageReminding.png', "消息提醒", () {
|
bottomItem('images/main/icon_lockDetail_messageReminding.png', "消息提醒",
|
||||||
|
() {
|
||||||
Get.toNamed(Routers.msgNotificationPage);
|
Get.toNamed(Routers.msgNotificationPage);
|
||||||
}),
|
}),
|
||||||
// 设置
|
// 设置
|
||||||
@ -376,5 +378,4 @@ class _DemoModeLockDetailPageState extends State<DemoModeLockDetailPage> {
|
|||||||
// Get.toNamed(Routers.selectLockTypePage);
|
// Get.toNamed(Routers.selectLockTypePage);
|
||||||
logic.showToast("演示模式");
|
logic.showToast("演示模式");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,8 @@ class SelectLockTypePage extends StatefulWidget {
|
|||||||
State<SelectLockTypePage> createState() => _SelectLockTypePageState();
|
State<SelectLockTypePage> createState() => _SelectLockTypePageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget {
|
class _SelectLockTypePageState extends State<SelectLockTypePage>
|
||||||
|
with BaseWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@ -80,6 +81,11 @@ class _SelectLockTypePageState extends State<SelectLockTypePage> with BaseWidget
|
|||||||
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
||||||
getNearByLimits();
|
getNearByLimits();
|
||||||
}),
|
}),
|
||||||
|
lockTypeItem(
|
||||||
|
'images/lockType/lockType_gatewayLock.png', '网络摄像头', () {
|
||||||
|
// Navigator.pushNamed(context, Routers.gatewayListPage);
|
||||||
|
getNearByLimits();
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -152,7 +152,7 @@ class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
|||||||
mineItem('images/mine/icon_mine_main_shoppingcart.png', "配件商城".tr,
|
mineItem('images/mine/icon_mine_main_shoppingcart.png', "配件商城".tr,
|
||||||
() {
|
() {
|
||||||
Get.back();
|
Get.back();
|
||||||
Get.toNamed(Routers.LockMallPage);
|
Get.toNamed(Routers.lockMallPage);
|
||||||
}),
|
}),
|
||||||
mineItem('images/mine/icon_mine_main_about.png',
|
mineItem('images/mine/icon_mine_main_about.png',
|
||||||
TranslationLoader.lanKeys!.about!.tr, () {
|
TranslationLoader.lanKeys!.about!.tr, () {
|
||||||
|
|||||||
@ -53,7 +53,7 @@ class UdpHelp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void closeUDP() {
|
void closeUDP() {
|
||||||
if(udpHeartTimer != null){
|
if (udpHeartTimer != null) {
|
||||||
udpHeartTimer!.cancel();
|
udpHeartTimer!.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,8 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:audioplayers/audioplayers.dart';
|
import 'package:audioplayers/audioplayers.dart';
|
||||||
import 'package:fast_gbk/fast_gbk.dart';
|
import 'package:fast_gbk/fast_gbk.dart';
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:star_lock/tools/eventBusEventManage.dart';
|
|
||||||
|
|
||||||
import '../../appRouters.dart';
|
import '../../appRouters.dart';
|
||||||
import '../../main/lockDetail/monitoring/monitoring/lockMonitoring_page.dart';
|
|
||||||
import '../../tools/storage.dart';
|
import '../../tools/storage.dart';
|
||||||
import 'udp_manage.dart';
|
import 'udp_manage.dart';
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user