1,部分图片更新

2,部分空界面添加
3,部分界面更新
4,修改部分暂未开放提示为二级界面
This commit is contained in:
Daisy 2023-10-17 15:48:32 +08:00
parent 04b7a0e9f5
commit 7ef7b7fcc4
56 changed files with 794 additions and 432 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -212,7 +212,7 @@
"pushNotification":"消息推送",
"lockUserManagement":"锁用户管理",
"ownedKey":"拥有的钥匙",
"authorityManagement":"限管理",
"authorityManagement":"批量授权",
"associatedDevice":"关联设备",
"associatedName":"关联姓名",
"device":"设备",

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

@ -1,122 +1,121 @@
{
"images" : [
{
"size" : "20x20",
"filename" : "icon-20@2x.png",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
"scale" : "2x",
"size" : "20x20"
},
{
"size" : "20x20",
"filename" : "icon-20@3x.png",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
"scale" : "3x",
"size" : "20x20"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
"scale" : "1x",
"size" : "29x29"
},
{
"size" : "29x29",
"filename" : "icon-29@2x.png",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
"scale" : "2x",
"size" : "29x29"
},
{
"size" : "29x29",
"filename" : "icon-29@3x.png",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
"scale" : "3x",
"size" : "29x29"
},
{
"size" : "40x40",
"filename" : "icon-40@2x.png",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
"scale" : "2x",
"size" : "40x40"
},
{
"size" : "40x40",
"filename" : "icon-40@3x.png",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
"scale" : "3x",
"size" : "40x40"
},
{
"size" : "60x60",
"filename" : "icon-60@2x.png",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
"scale" : "2x",
"size" : "60x60"
},
{
"size" : "60x60",
"filename" : "icon-60@3x.png",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
"scale" : "3x",
"size" : "60x60"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
"scale" : "2x",
"size" : "76x76"
},
{
"filename" : "Icon-App-83.5x83.5@2x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

@ -7,7 +7,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Star Lock</string>
<string>星锁</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
@ -15,7 +15,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>star_lock</string>
<string>星锁</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
@ -57,11 +57,11 @@
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UISceneConfigurations</key>
<dict />
</dict>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UISceneConfigurations</key>
<dict/>
</dict>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>

View File

@ -12,7 +12,7 @@ import 'package:star_lock/mine/about/webviewShow_page.dart';
import 'package:star_lock/mine/mine/safeVerify/safeVerify_page.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_page.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoViewSafetyProblem/minePersonInfoViewSafetyProblem_page.dart';
import 'package:star_lock/mine/mineSet/authorizedAdministrator/addAuthorizedAdministrator_page.dart';
import 'package:star_lock/mine/mineSet/addAuthorizedAdministrator/addAuthorizedAdministrator_page.dart';
import 'package:star_lock/mine/mineSet/authorizedAdministrator/administratorDetails/adminDetailChangeDate_page.dart';
import 'package:star_lock/mine/mineSet/authorizedAdministrator/administratorDetails/administratorDetails_page.dart';
import 'package:star_lock/mine/mineSet/lockGroup/lockGroupList_page.dart';
@ -318,7 +318,7 @@ abstract class Routers {
static const getDeviceListPage = '/getDeviceListPage'; //
static const getNameListPage = '/getNameListPage'; //
static const authorityManagementPage = '/authorityManagementPage'; //
static const authorityManagementPage = '/authorityManagementPage'; //
static const massSendLockGroupPage = '/massSendLockGroupPage'; //
static const massSendReceiverPage = '/massSendReceiverPage'; //
static const lockUserListPage = '/lockUserListPage'; //

View File

@ -5,6 +5,7 @@ import 'package:star_lock/main/lockDetail/electronicKey/electronicKeyList/entity
import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart';
import 'package:star_lock/network/api_repository.dart';
import 'package:star_lock/tools/baseGetXController.dart';
import 'package:star_lock/tools/noData.dart';
import '../../../../appRouters.dart';
import '../../../../app_settings/app_colors.dart';
@ -116,32 +117,34 @@ class _AuthorizedAdminListPageState extends State<AuthorizedAdminListPage> {
Widget _buildMainUI(itemData) {
List<ElectronicKeyListItem> getItemData = itemData;
return ListView.builder(
itemCount: getItemData.length,
itemBuilder: (c, index) {
ElectronicKeyListItem indexEntity = getItemData[index];
String useDateStr = ''; //使
String keyStatus = ''; //
return getItemData.isEmpty
? const NoData()
: ListView.builder(
itemCount: getItemData.length,
itemBuilder: (c, index) {
ElectronicKeyListItem indexEntity = getItemData[index];
String useDateStr = ''; //使
String keyStatus = ''; //
//使
useDateStr = getUseDateStr(indexEntity);
//使
useDateStr = getUseDateStr(indexEntity);
//
keyStatus = getKeyStatus(indexEntity.keyStatus);
//
keyStatus = getKeyStatus(indexEntity.keyStatus);
//
bool isAdminKey = false;
if (indexEntity.keyRight == 1) {
isAdminKey = true;
} else {
isAdminKey = false;
}
return _electronicKeyItem('images/controls_user.png',
indexEntity.keyName!, useDateStr, keyStatus, isAdminKey, () {
Navigator.pushNamed(context, Routers.electronicKeyDetailPage,
arguments: {'itemData': indexEntity});
});
});
//
bool isAdminKey = false;
if (indexEntity.keyRight == 1) {
isAdminKey = true;
} else {
isAdminKey = false;
}
return _electronicKeyItem('images/controls_user.png',
indexEntity.keyName!, useDateStr, keyStatus, isAdminKey, () {
Navigator.pushNamed(context, Routers.electronicKeyDetailPage,
arguments: {'itemData': indexEntity});
});
});
}
//使

View File

@ -26,6 +26,7 @@ class VolumeAuthorizationLockPage extends StatefulWidget {
_VolumeAuthorizationLockPageState();
}
//
class _VolumeAuthorizationLockPageState
extends State<VolumeAuthorizationLockPage> {
final FlutterContactPicker _contactPicker = FlutterContactPicker();

View File

@ -5,6 +5,7 @@ import 'package:star_lock/app_settings/app_colors.dart';
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserListEntity.dart';
import 'package:star_lock/network/api_repository.dart';
import 'package:star_lock/tools/baseGetXController.dart';
import 'package:star_lock/tools/noData.dart';
import 'package:star_lock/tools/submitBtn.dart';
import 'package:star_lock/translations/trans_lib.dart';
@ -56,16 +57,19 @@ class _LockUserListPageState extends State<LockUserListPage> {
height: 20.h,
),
Expanded(
child: ListView.separated(
itemBuilder: (context, index) {
LockUserData indexEntity = dataList[index];
return _electronicKeyItem(indexEntity);
},
itemCount: dataList.length,
separatorBuilder: (context, index) {
return const Divider(height: 1, color: AppColors.greyLineColor);
},
)),
child: dataList.isEmpty
? const NoData()
: ListView.separated(
itemBuilder: (context, index) {
LockUserData indexEntity = dataList[index];
return _electronicKeyItem(indexEntity);
},
itemCount: dataList.length,
separatorBuilder: (context, index) {
return const Divider(
height: 1, color: AppColors.greyLineColor);
},
)),
Container(
height: 120.h,
padding: EdgeInsets.only(left: 20.w, right: 20.w, top: 0.h),

View File

@ -122,6 +122,11 @@ class _MassSendLockGroupListPageState extends State<MassSendLockGroupListPage> {
onTap: () {
selectGroupIdList.add(index);
clickIndex = index;
//
if (itemData.isChecked) {
// lockItemList[selectIndex] =
}
print('选中了么0');
},
typeImgList: const [],
groupItem: itemData,

View File

@ -201,7 +201,9 @@ class _SendElectronicKeyPageState extends State<SendElectronicKeyPage> {
isHaveRightWidget: true,
rightWidget: SizedBox(
width: 60.w, height: 50.h, child: _remoteSwitch(false)),
action: () {}),
action: () {
// Toast.show(msg: '此功能暂未开放');
}),
],
);
}

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/tools/noData.dart';
import '../../../../../app_settings/app_colors.dart';
import '../../../../../tools/titleAppBar.dart';
@ -14,6 +15,7 @@ class NearbyDoorMagneticPage extends StatefulWidget {
}
class _NearbyDoorMagneticPageState extends State<NearbyDoorMagneticPage> {
List dataList = [];
@override
Widget build(BuildContext context) {
return Scaffold(
@ -22,13 +24,16 @@ class _NearbyDoorMagneticPageState extends State<NearbyDoorMagneticPage> {
barTitle: TranslationLoader.lanKeys!.nearbyEquipment!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: ListView.builder(
itemCount: 20,
itemBuilder: (c, index) {
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", () {
// Navigator.pushNamed(context, Routers.saveLockPage);
});
}),
body: dataList.isEmpty
? const NoData()
: ListView.builder(
itemCount: dataList.length,
itemBuilder: (c, index) {
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240",
() {
// Navigator.pushNamed(context, Routers.saveLockPage);
});
}),
);
}

View File

@ -65,42 +65,65 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
'keyInfo': state.getKeyInfosData.value
});
}),
SizedBox(height: 10.h,),
SizedBox(
height: 10.h,
),
//
Visibility(
visible: true,
child:CommonItem(
leftTitel: TranslationLoader.lanKeys!.doorMagnetic!.tr,
child: CommonItem(
leftTitel:
TranslationLoader.lanKeys!.doorMagnetic!.tr,
rightTitle: "",
isHaveLine: true,
isHaveDirection: true,
action: () {
// Get.toNamed(Routers.doorMagneticPage);
Toast.show(msg: "功能暂未开放");
})
),
Get.toNamed(Routers.doorMagneticPage);
// Toast.show(msg: "功能暂未开放");
})),
// 线
Visibility(
visible: true,
child: CommonItem(
leftTitel:
TranslationLoader.lanKeys!.wirelessKeyboard!.tr,
TranslationLoader.lanKeys!.wirelessKeyboard!.tr,
rightTitle: "",
isHaveLine: true,
isHaveDirection: true,
action: () {
Get.toNamed(Routers.wirelessKeyboardPage);
// Toast.show(msg: "功能暂未开放");
})),
Visibility(
visible: true,
child: CommonItem(
leftTitel: '照明',
rightTitle: "",
isHaveLine: true,
isHaveDirection: true,
action: () {
Toast.show(msg: "功能暂未开放");
})),
Visibility(
visible: true,
child: CommonItem(
leftTitel: '开门器',
rightTitle: "",
isHaveLine: false,
isHaveDirection: true,
action: () {
// Get.toNamed(Routers.wirelessKeyboardPage);
Toast.show(msg: "功能暂未开放");
})
),
})),
SizedBox(height: 10.h),
//
Obx(() => Visibility(
visible: true,
child: CommonItem(
leftTitel:
TranslationLoader.lanKeys!.automaticBlocking!.tr,
rightTitle: state.getKeyInfosData.value.autoLockTime! > -1
TranslationLoader.lanKeys!.automaticBlocking!.tr,
rightTitle: state
.getKeyInfosData.value.autoLockTime! >
-1
? "${state.getKeyInfosData.value.autoLockTime!.toString()}s"
: TranslationLoader.lanKeys!.closed!.tr,
isHaveLine: true,
@ -108,8 +131,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
action: () {
Get.toNamed(Routers.automaticBlockingPage,
arguments: state.getKeyInfosData.value);
}))
),
}))),
//
Obx(() {
var titleStr = "";
@ -144,144 +166,144 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
action: () {
Get.toNamed(Routers.lockSoundSetPage,
arguments: state.getKeyInfosData.value);
})
);
}));
}),
//
Obx(() => Visibility(
visible: true,
child: CommonItem(
leftTitel: TranslationLoader.lanKeys!.burglarAlarm!.tr,
rightTitle: state.getKeyInfosData.value.tamperAlert == 1
? TranslationLoader.lanKeys!.opened!.tr
: TranslationLoader.lanKeys!.closed!.tr,
isHaveLine: true,
isHaveDirection: true,
action: () {
Get.toNamed(Routers.burglarAlarmPage,
arguments: state.getKeyInfosData.value);
}))),
leftTitel:
TranslationLoader.lanKeys!.burglarAlarm!.tr,
rightTitle:
state.getKeyInfosData.value.tamperAlert == 1
? TranslationLoader.lanKeys!.opened!.tr
: TranslationLoader.lanKeys!.closed!.tr,
isHaveLine: true,
isHaveDirection: true,
action: () {
Get.toNamed(Routers.burglarAlarmPage,
arguments: state.getKeyInfosData.value);
}))),
SizedBox(height: 10.h),
//
Obx(() => Visibility(
visible: true,
visible: true,
child: CommonItem(
leftTitel:
TranslationLoader.lanKeys!.normallyOpenMode!.tr,
rightTitle: state.getKeyInfosData.value.passageMode == 1
? TranslationLoader.lanKeys!.opened!.tr
: TranslationLoader.lanKeys!.closed!.tr,
isHaveLine: true,
isHaveDirection: true,
action: () {
Get.toNamed(Routers.normallyOpenModePage,
arguments: state.getKeyInfosData.value);
}))
),
leftTitel:
TranslationLoader.lanKeys!.normallyOpenMode!.tr,
rightTitle:
state.getKeyInfosData.value.passageMode == 1
? TranslationLoader.lanKeys!.opened!.tr
: TranslationLoader.lanKeys!.closed!.tr,
isHaveLine: true,
isHaveDirection: true,
action: () {
Get.toNamed(Routers.normallyOpenModePage,
arguments: state.getKeyInfosData.value);
}))),
//
Obx(() => Visibility(
visible:true,
visible: true,
child: CommonItem(
leftTitel: TranslationLoader.lanKeys!.remoteUnlocking!.tr,
rightTitle: state.getKeyInfosData.value.remoteEnable == 1
? TranslationLoader.lanKeys!.opened!.tr
: TranslationLoader.lanKeys!.closed!.tr,
isHaveLine: true,
isHaveDirection: true,
action: () {
Get.toNamed(Routers.remoteUnlockingPage,
arguments: state.getKeyInfosData.value);
}))
),
leftTitel:
TranslationLoader.lanKeys!.remoteUnlocking!.tr,
rightTitle:
state.getKeyInfosData.value.remoteEnable == 1
? TranslationLoader.lanKeys!.opened!.tr
: TranslationLoader.lanKeys!.closed!.tr,
isHaveLine: true,
isHaveDirection: true,
action: () {
Get.toNamed(Routers.remoteUnlockingPage,
arguments: state.getKeyInfosData.value);
}))),
//
Obx(() => Visibility(
visible: true,
child: CommonItem(
leftTitel: TranslationLoader.lanKeys!.resetButton!.tr,
rightTitle: state.getKeyInfosData.value.resetButton == 1
? TranslationLoader.lanKeys!.opened!.tr
: TranslationLoader.lanKeys!.closed!.tr,
isHaveLine: true,
isHaveDirection: true,
action: () {
Get.toNamed(Routers.resetButtonPage,
arguments: state.getKeyInfosData.value);
}))
),
leftTitel: TranslationLoader.lanKeys!.resetButton!.tr,
rightTitle:
state.getKeyInfosData.value.resetButton == 1
? TranslationLoader.lanKeys!.opened!.tr
: TranslationLoader.lanKeys!.closed!.tr,
isHaveLine: true,
isHaveDirection: true,
action: () {
Get.toNamed(Routers.resetButtonPage,
arguments: state.getKeyInfosData.value);
}))),
SizedBox(height: 10.h),
//---
// Obx(() =>
Visibility(
Visibility(
visible: true,
child: CommonItem(
leftTitel: '面容开锁',
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget:
SizedBox(width: 60.w, child: _otherUnHaveDoneSwitch()))),
leftTitel: '面容开锁',
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget: SizedBox(
width: 60.w, child: _otherUnHaveDoneSwitch()))),
// ),
// Obx(() =>
Visibility(
visible: true,
child: CommonItem(
leftTitel: '感应距离',
rightTitle: "",
isHaveLine: true,
isHaveDirection: true,
action: () {
Toast.show(msg: "功能暂未开放");
}
)),
Visibility(
visible: true,
child: CommonItem(
leftTitel: '感应距离',
rightTitle: "",
isHaveLine: true,
isHaveDirection: true,
action: () {
Toast.show(msg: "功能暂未开放");
})),
// ),
// Obx(() =>
Visibility(
Visibility(
visible: true,
child: CommonItem(
leftTitel: '自动亮屏',
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget:
SizedBox(width: 60.w, child: _otherUnHaveDoneSwitch()))),
rightWidget: SizedBox(
width: 60.w, child: _otherUnHaveDoneSwitch()))),
// ),
// Obx(() =>
Visibility(
Visibility(
visible: true,
child: CommonItem(
leftTitel: '逗留警告',
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget:
SizedBox(width: 60.w, child: _otherUnHaveDoneSwitch()))),
rightWidget: SizedBox(
width: 60.w, child: _otherUnHaveDoneSwitch()))),
// ),
// Obx(() =>
Visibility(
Visibility(
visible: true,
child: CommonItem(
leftTitel: '异常警告',
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget:
SizedBox(width: 60.w, child: _otherUnHaveDoneSwitch()))),
rightWidget: SizedBox(
width: 60.w, child: _otherUnHaveDoneSwitch()))),
// ),
// Obx(() =>
Visibility(
Visibility(
visible: true,
child: CommonItem(
leftTitel: '开门方向设置',
rightTitle: "",
isHaveDirection: true,
isHaveLine: true,
leftTitel: '开门方向设置',
rightTitle: "",
isHaveDirection: true,
isHaveLine: true,
action: () {
Toast.show(msg: "功能暂未开放");
}
)),
})),
// ),
// Obx(() =>
Visibility(
Visibility(
visible: true,
child: CommonItem(
leftTitel: '电机功率设置',
@ -290,8 +312,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
isHaveDirection: true,
action: () {
Toast.show(msg: "功能暂未开放");
}
)),
})),
// ),
SizedBox(height: 10.h),
//-----
@ -306,42 +327,41 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
visible: true,
child: CommonItem(
leftTitel:
TranslationLoader.lanKeys!.markedHouseState!.tr,
TranslationLoader.lanKeys!.markedHouseState!.tr,
rightTitle: title,
isHaveLine: true,
isHaveDirection: true,
action: () {
Get.toNamed(Routers.markedHouseStatePage,
arguments: state.getKeyInfosData.value);
})
);
}));
}),
// Obx(() =>
Visibility(
Visibility(
visible: true,
child: CommonItem(
leftTitel: TranslationLoader.lanKeys!.checkingIn!.tr,
rightTitle: "",
isHaveLine: true,
isHaveRightWidget: true,
rightWidget:
SizedBox(width: 60.w, child: _openCheckInSwitch())
)),
rightWidget: SizedBox(
width: 60.w, child: _openCheckInSwitch()))),
// ),
// Obx(() =>
Visibility(
Visibility(
visible: true,
child: CommonItem(
leftTitel: TranslationLoader.lanKeys!.unlockReminder!.tr,
leftTitel:
TranslationLoader.lanKeys!.unlockReminder!.tr,
rightTitle: "",
isHaveLine: false,
isHaveRightWidget: true,
rightWidget:
SizedBox(width: 60.w, child: _lockRemindSwitch()))),
rightWidget: SizedBox(
width: 60.w, child: _lockRemindSwitch()))),
// ),
SizedBox(height: 10.h),
// Obx(() =>
Visibility(
Visibility(
visible: true,
child: CommonItem(
leftTitel: TranslationLoader
@ -354,20 +374,20 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
})),
// ),
// Obx(() =>
Visibility(
Visibility(
visible: true,
child: CommonItem(
leftTitel: TranslationLoader.lanKeys!.lockTime!.tr,
rightTitle: "",
isHaveLine: true,
isHaveDirection: true,
action: () {
Get.toNamed(Routers.lockTimePage,
arguments: state.getKeyInfosData.value);
})),
leftTitel: TranslationLoader.lanKeys!.lockTime!.tr,
rightTitle: "",
isHaveLine: true,
isHaveDirection: true,
action: () {
Get.toNamed(Routers.lockTimePage,
arguments: state.getKeyInfosData.value);
})),
// ),
// Obx(() =>
Visibility(
Visibility(
visible: true,
child: CommonItem(
leftTitel: TranslationLoader.lanKeys!.diagnose!.tr,
@ -380,7 +400,7 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
})),
// ),
// Obx(() =>
Visibility(
Visibility(
visible: true,
child: CommonItem(
leftTitel: TranslationLoader.lanKeys!.uploadData!.tr,
@ -392,11 +412,11 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
})),
// ),
// Obx(() =>
Visibility(
Visibility(
visible: true,
child: CommonItem(
leftTitel:
TranslationLoader.lanKeys!.importOtherLockData!.tr,
leftTitel: TranslationLoader
.lanKeys!.importOtherLockData!.tr,
rightTitle: "",
isHaveLine: true,
isHaveDirection: true,
@ -405,10 +425,11 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
})),
// ),
// Obx(() =>
Visibility(
Visibility(
visible: true,
child: CommonItem(
leftTitel: TranslationLoader.lanKeys!.lockEscalation!.tr,
leftTitel:
TranslationLoader.lanKeys!.lockEscalation!.tr,
rightTitle: "",
isHaveLine: false,
isHaveDirection: true,
@ -418,7 +439,8 @@ class _LockSetPageState extends State<LockSetPage> with RouteAware {
// ),
SizedBox(height: 30.h),
Container(
padding: EdgeInsets.only(left: 20.w, right: 20.w, bottom: 30.h),
padding:
EdgeInsets.only(left: 20.w, right: 20.w, bottom: 30.h),
child: SubmitBtn(
btnName: TranslationLoader.lanKeys!.delete!.tr,
isDelete: true,

View File

@ -78,15 +78,15 @@ class _AddWirelessKeyboardPageState extends State<AddWirelessKeyboardPage> {
SizedBox(
height: 20.h,
),
Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w),
child: SubmitBtn(
btnName: TranslationLoader.lanKeys!.theScreenNeverFlickered!.tr,
onClick: () {
Navigator.pushNamed(
context, Routers.addWirelessKeyboardScreenNotLightOnPage);
}),
),
// Container(
// margin: EdgeInsets.only(left: 20.w, right: 20.w),
// child: SubmitBtn(
// btnName: TranslationLoader.lanKeys!.theScreenNeverFlickered!.tr,
// onClick: () {
// Navigator.pushNamed(
// context, Routers.addWirelessKeyboardScreenNotLightOnPage);
// }),
// ),
],
),
);

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/tools/noData.dart';
import '../../../../../app_settings/app_colors.dart';
import '../../../../../tools/titleAppBar.dart';
@ -15,6 +16,7 @@ class SeletWirelessKeyboardPage extends StatefulWidget {
}
class _SeletWirelessKeyboardPageState extends State<SeletWirelessKeyboardPage> {
List dataList = [];
@override
Widget build(BuildContext context) {
return Scaffold(
@ -24,13 +26,16 @@ class _SeletWirelessKeyboardPageState extends State<SeletWirelessKeyboardPage> {
"${TranslationLoader.lanKeys!.selet!.tr}${TranslationLoader.lanKeys!.wirelessKeyboard!.tr}",
haveBack: true,
backgroundColor: AppColors.mainColor),
body: ListView.builder(
itemCount: 20,
itemBuilder: (c, index) {
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240", () {
// Navigator.pushNamed(context, Routers.saveLockPage);
});
}),
body: dataList.isEmpty
? const NoData()
: ListView.builder(
itemCount: 20,
itemBuilder: (c, index) {
return nearbyLockItem('images/icon_lock.png', "MCBN01-ea9240",
() {
// Navigator.pushNamed(context, Routers.saveLockPage);
});
}),
);
}

View File

@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/tools/noData.dart';
import '../../../../../appRouters.dart';
import '../../../../../app_settings/app_colors.dart';
@ -17,6 +18,7 @@ class WirelessKeyboardPage extends StatefulWidget {
}
class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
List dataList = [];
@override
Widget build(BuildContext context) {
return Scaffold(
@ -55,14 +57,16 @@ class _WirelessKeyboardPageState extends State<WirelessKeyboardPage> {
}
Widget _buildMainUI() {
return ListView.builder(
itemCount: 10,
itemBuilder: (c, index) {
return _electronicKeyItem('images/icon_password.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
});
});
return dataList.isEmpty
? const NoData()
: ListView.builder(
itemCount: 10,
itemBuilder: (c, index) {
return _electronicKeyItem('images/icon_password.png', "张三",
"2023.6.21 11.15", "2023.6.21 11.15", () {
// Navigator.pushNamed(context, Routers.electronicKeyDetailPage);
});
});
}
Widget _electronicKeyItem(String lockTypeIcon, String lockTypeTitle,

View File

@ -86,7 +86,7 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
// KeyInfos keyInfo = widget.lockMainEntity.data!.keyInfos![0];
return Column(
children: [
SizedBox(height: 30.h),
SizedBox(height: 50.h),
Stack(
alignment: Alignment.centerRight,
children: [
@ -120,7 +120,7 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
Container(
// width: 1.sw,
color: Colors.white,
height: 280.w,
height: 330.w,
child: Stack(
children: [
Center(
@ -131,8 +131,11 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
// logic.editLockUserAction();
// logic.factoryDataResetAction();
},
child: Image.asset('images/main/icon_main_openLockBtn.png',
width: 268.w, height: 268.w),
child: Image.asset(
'images/main/icon_main_openLockBtn.png',
width: 330.w,
height: 330.w,
),
)),
// Visibility(
// visible:
@ -150,21 +153,21 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
SizedBox(
height: 30.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'门已上锁',
style: TextStyle(
fontSize: 26.sp,
color: Colors.black,
fontWeight: FontWeight.w500),
),
],
),
SizedBox(
height: 6.h,
),
// Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Text(
// '门已上锁',
// style: TextStyle(
// fontSize: 26.sp,
// color: Colors.black,
// fontWeight: FontWeight.w500),
// ),
// ],
// ),
// SizedBox(
// height: 6.h,
// ),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@ -187,14 +190,15 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
'images/icon_electronicKey_admin.png',
width: 24.w,
height: 20.w,
color: AppColors.mainColor, //
),
SizedBox(
width: 6.w,
),
Text(
'超级管理员',
style:
TextStyle(fontSize: 20.sp, color: AppColors.btnDisableColor),
style: TextStyle(
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
),
SizedBox(
width: 80.w,
@ -265,10 +269,10 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
bottomItem('images/main/icon_main_electronicKey.png',
TranslationLoader.lanKeys!.electronicKey!.tr, () {
Get.toNamed(Routers.electronicKeyListPage, arguments: {
"lockMainEntity": widget.lockMainEntity,
"keyInfo": widget.keyInfo
});
}),
"lockMainEntity": widget.lockMainEntity,
"keyInfo": widget.keyInfo
});
}),
//
bottomItem('images/main/icon_main_password.png',
@ -280,28 +284,24 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
}),
// ic卡
bottomItem('images/main/icon_main_icCard.png', TranslationLoader.lanKeys!.card!.tr, () {
Get.toNamed(Routers.otherTypeKeyListPage, arguments: {
"lockId": widget.keyInfo.lockId,
"fromType": 0
});
}),
bottomItem('images/main/icon_main_icCard.png',
TranslationLoader.lanKeys!.card!.tr, () {
Get.toNamed(Routers.otherTypeKeyListPage,
arguments: {"lockId": widget.keyInfo.lockId, "fromType": 0});
}),
//
bottomItem('images/main/icon_main_fingerprint.png', TranslationLoader.lanKeys!.fingerprint!.tr, () {
Get.toNamed(Routers.otherTypeKeyListPage, arguments: {
"lockId": widget.keyInfo.lockId,
"fromType": 1
});
bottomItem('images/main/icon_main_fingerprint.png',
TranslationLoader.lanKeys!.fingerprint!.tr, () {
Get.toNamed(Routers.otherTypeKeyListPage,
arguments: {"lockId": widget.keyInfo.lockId, "fromType": 1});
}),
//
bottomItem('images/main/icon_main_remoteControl.png', TranslationLoader.lanKeys!.remoteControl!.tr, () {
// Get.toNamed(Routers.otherTypeKeyListPage, arguments: {
// "lockId": widget.keyInfo.lockId,
// "fromType": 2
// });
Toast.show(msg: "功能暂未开放");
bottomItem('images/main/icon_main_remoteControl.png',
TranslationLoader.lanKeys!.remoteControl!.tr, () {
Get.toNamed(Routers.otherTypeKeyListPage,
arguments: {"lockId": widget.keyInfo.lockId, "fromType": 2});
}),
];
showWidgetArr.addAll(defaultWidgetArr);
@ -345,7 +345,7 @@ class _LockDetailPageState extends State<LockDetailPage> with RouteAware {
bottomItem(
'images/main/icon_main_set.png', TranslationLoader.lanKeys!.set!.tr,
() {
BlueManage().stopScan();
BlueManage().stopScan();
Get.toNamed(Routers.lockSetPage, arguments: widget.keyInfo);
}),
];

View File

@ -1,4 +1,3 @@
import 'dart:math';
import 'package:get/get.dart';
@ -13,19 +12,19 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
OtherTypeAddKeyState state = OtherTypeAddKeyState();
//
void addFingerprintsData() async{
var fingerprintType = 0;// :1;23:4
void addFingerprintsData() async {
var fingerprintType = 0; // :1;23:4
var startDate = "";
var endDate = "";
if(state.seletType.value == "0"){
if (state.seletType.value == "0") {
fingerprintType = 1;
}else if(state.seletType.value == "1"){
} else if (state.seletType.value == "1") {
fingerprintType = 2;
if(state.beginTimeTimestamp.value.isEmpty){
if (state.beginTimeTimestamp.value.isEmpty) {
Toast.show(msg: "请选择开始时间");
return;
}
if(state.endTimeTimestamp.value.isEmpty){
if (state.endTimeTimestamp.value.isEmpty) {
Toast.show(msg: "请选择开始时间");
return;
}
@ -35,25 +34,27 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
// return;
// }
print("fasdfasdfasdf:${int.parse(state.beginTimeTimestamp.value)} == ${int.parse(state.endTimeTimestamp.value)}");
if(int.parse(state.beginTimeTimestamp.value) >= int.parse(state.endTimeTimestamp.value)){
print(
"fasdfasdfasdf:${int.parse(state.beginTimeTimestamp.value)} == ${int.parse(state.endTimeTimestamp.value)}");
if (int.parse(state.beginTimeTimestamp.value) >=
int.parse(state.endTimeTimestamp.value)) {
Toast.show(msg: "失效时间要大于生效时间");
return;
}
startDate = state.beginTimeTimestamp.value;
endDate = state.endTimeTimestamp.value;
}else if(state.seletType.value == "2"){
if(state.effectiveDateTime.value <= 0){
} else if (state.seletType.value == "2") {
if (state.effectiveDateTime.value <= 0) {
Toast.show(msg: "请选择生效时间");
return;
}
if(state.failureDateTime.value <= 0){
if (state.failureDateTime.value <= 0) {
Toast.show(msg: "请选择失效时间");
return;
}
if(state.weekdaysList.value.isEmpty){
if (state.weekdaysList.value.isEmpty) {
Toast.show(msg: "请选择有效日");
return;
}
@ -63,7 +64,7 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
// return;
// }
if(state.effectiveDateTime.value >= state.failureDateTime.value){
if (state.effectiveDateTime.value >= state.failureDateTime.value) {
Toast.show(msg: "失效时间要大于生效时间");
return;
}
@ -81,7 +82,8 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
"endDate": endDate,
"addType": "1",
"cardName": state.nameController.text,
"cardNumber": (Random().nextInt(100000000) + 10000000).floor().toString(),
"cardNumber":
(Random().nextInt(100000000) + 10000000).floor().toString(),
"cardType": fingerprintType.toString(),
"isCoerced": state.isStressFingerprint.value ? "1" : "2",
"startDate": startDate,
@ -108,6 +110,20 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
break;
case 1:
//
Get.toNamed(Routers.addFingerprintPage, arguments: {
"lockId": state.lockId.value,
"endDate": endDate,
"addType": "1",
"fingerprintName": state.nameController.text,
"fingerprintNumber": "123456",
"fingerprintType": fingerprintType.toString(),
"isCoerced": state.isStressFingerprint.value ? "1" : "2",
"startDate": startDate,
"weekDay": state.weekdaysList.value,
"fromType": state.fromType.value,
});
/* tips页面
Get.toNamed(Routers.addFingerprintTipPage, arguments: {
"lockId": state.lockId.value,
"endDate": endDate,
@ -120,6 +136,7 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
"weekDay": state.weekdaysList.value,
"fromType": state.fromType.value,
});
*/
// var entity = await ApiRepository.to.addFingerprintsData(
// lockId: state.lockId.value.toString(),
@ -138,34 +155,28 @@ class OtherTypeAddKeyLogic extends BaseGetXController {
// }
break;
case 2:
//
//
break;
default:
break;
}
}
@override
void onReady() {
// TODO: implement onReady
super.onReady();
}
@override
void onInit() {
// TODO: implement onInit
super.onInit();
}
@override
void onClose() {
// TODO: implement onClose
}
}
}

View File

@ -5,6 +5,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:star_lock/app_settings/app_colors.dart';
import 'package:star_lock/tools/submitBtn.dart';
import '../../../appRouters.dart';
import '../../../baseWidget.dart';
@ -99,7 +100,7 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
Widget unHaveData() {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
@ -107,6 +108,7 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
Container(
width: 330.w,
height: 330.w,
margin: EdgeInsets.only(top: 180.h),
// decoration: BoxDecoration(
// border: Border.all(width: 4.w, color: AppColors.mainColor),
// borderRadius: BorderRadius.circular(110.w),
@ -133,11 +135,8 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
)),
],
),
SizedBox(
height: h(50.h),
),
Container(
padding: EdgeInsets.all(30.w),
padding: EdgeInsets.only(top: 10.h),
child: Text(
TranslationLoader
.lanKeys!.whenAddingLockThePhoneMustBeNextToTheLock!.tr,
@ -145,7 +144,11 @@ class _StarLockMainPageState extends State<StarLockMainPage> with BaseWidget {
fontSize: 26.sp,
// fontWeight: FontWeight.w800,
color: Colors.black),
))
)),
SizedBox(
height: 200.h,
),
SubmitBtn(btnName: '演示模式')
],
);
}

View File

@ -12,10 +12,14 @@ import '../../translations/trans_lib.dart';
//
class XSWebviewURLMacro {
static const baseWebURL = 'https://pre.lock.star-lock.cn:8093'; //baseURL
static const userAgreementURL =
'$baseWebURL/page/detail?pageId=1&lang=cn'; //1
static const privacyPolicyURL =
'$baseWebURL/page/detail?pageId=2&lang=cn'; //2
static const userAgreementURL = '$baseWebURL/app/userAgreement'; //
static const privacyPolicyURL = '$baseWebURL/app/privacy'; //
static const collectionListURL =
'$baseWebURL/app/personalInformationCollectionList'; //
static const thirdPartyInfShareListURL =
'$baseWebURL/app/thirdPartyInformationSharingList'; //
static const appPermissionDescURL =
'$baseWebURL/app/applicationPermissionDescription'; //
}
class AbountPage extends StatefulWidget {
@ -66,7 +70,11 @@ class _AbountPageState extends State<AbountPage> {
isHaveLine: false,
isHaveDirection: true,
action: () {
Toast.show(msg: "功能暂未开放");
Navigator.pushNamed(context, Routers.webviewShowPage,
arguments: {
"url": XSWebviewURLMacro.userAgreementURL,
"title": '介绍'
});
}),
Divider(
height: 1,
@ -117,7 +125,11 @@ class _AbountPageState extends State<AbountPage> {
isHaveLine: false,
isHaveDirection: true,
action: () {
Toast.show(msg: "功能暂未开放");
Navigator.pushNamed(context, Routers.webviewShowPage,
arguments: {
"url": XSWebviewURLMacro.collectionListURL,
"title": '个人信息收集清单'
});
}),
Divider(
height: 1,
@ -132,7 +144,11 @@ class _AbountPageState extends State<AbountPage> {
isHaveLine: false,
isHaveDirection: true,
action: () {
Toast.show(msg: "功能暂未开放");
Navigator.pushNamed(context, Routers.webviewShowPage,
arguments: {
"url": XSWebviewURLMacro.appPermissionDescURL,
"title": '应用权限说明'
});
}),
Divider(
height: 1,
@ -147,7 +163,11 @@ class _AbountPageState extends State<AbountPage> {
isHaveLine: false,
isHaveDirection: true,
action: () {
Toast.show(msg: "功能暂未开放");
Navigator.pushNamed(context, Routers.webviewShowPage,
arguments: {
"url": XSWebviewURLMacro.thirdPartyInfShareListURL,
"title": '第三方信息共享清单'
});
}),
],
),

View File

@ -0,0 +1,23 @@
import 'package:star_lock/mine/addLock/addLock/addLock_state.dart';
import 'package:star_lock/tools/baseGetXController.dart';
class AddLockLogic extends BaseGetXController {
final AddLockState state = AddLockState();
@override
void onReady() {
// TODO: implement onReady
super.onReady();
}
@override
void onInit() {
// TODO: implement onInit
super.onInit();
}
@override
void onClose() {
// TODO: implement onClose
}
}

View File

@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:star_lock/mine/addLock/addLock/addLock_logic.dart';
import '../../../appRouters.dart';
import '../../../app_settings/app_colors.dart';
@ -20,6 +21,9 @@ class AddLockPage extends StatefulWidget {
}
class _AddLockPageState extends State<AddLockPage> with BaseWidget {
final logic = Get.put(AddLockLogic());
final state = Get.find<AddLockLogic>().state;
@override
Widget build(BuildContext context) {
return Scaffold(
@ -49,11 +53,11 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget {
SizedBox(
height: 120.h,
),
Image.asset(
'images/lockType/addLock_touchScreen.png',
width: 278.w,
height: 278.w,
),
Obx(() => Image.asset(
state.lockTypeImg.value,
width: 278.w,
height: 278.w,
)),
SizedBox(
height: 120.h,
),
@ -73,17 +77,16 @@ class _AddLockPageState extends State<AddLockPage> with BaseWidget {
btnName: TranslationLoader.lanKeys!.next!.tr,
borderRadius: 20.w,
onClick: () {
if(Platform.isIOS){
if (Platform.isIOS) {
Navigator.pushNamed(context, Routers.nearbyLockPage);
}else {
getMicrophonePermission()
.then((value) {
} else {
getMicrophonePermission().then((value) {
if (value) {
//
Navigator.pushNamed(context, Routers.nearbyLockPage);
}else{
} else {
//
openAppSettings();//app系统设置
openAppSettings(); //app系统设置
}
});
}

View File

@ -0,0 +1,29 @@
import 'package:get/get.dart';
class AddLockState {
var getLockType = 1.obs; //0-1-2-NFC无源锁3-4-5-6-7-
var lockTypeImg = 'images/lockType/addLock_touchScreen.png'.obs; //
AddLockState() {
Map map = Get.arguments;
if (map.isNotEmpty) {
if (map["getLockType"] != null) {
getLockType.value = map["getLockType"];
//
if (getLockType.value == 4) {
lockTypeImg.value = "images/lockType/addLock_safeBg.png";
} else if (getLockType.value == 5) {
//
lockTypeImg.value = "images/lockType/addLock_parkingBg.png";
} else if (getLockType.value == 6) {
//
lockTypeImg.value = "images/lockType/addLock_entranceGuardBg.png";
}
} else {
lockTypeImg.value = 'images/lockType/addLock_touchScreen.png';
}
} else {
lockTypeImg.value = 'images/lockType/addLock_touchScreen.png';
}
}
}

View File

@ -1,6 +1,9 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:permission_handler/permission_handler.dart';
import '../../../appRouters.dart';
import '../../../app_settings/app_colors.dart';
@ -40,33 +43,34 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
children: [
lockTypeItem('images/lockType/lockType_doorLock.png',
TranslationLoader.lanKeys!.doorLock!.tr, () {
Navigator.pushNamed(context, Routers.addLockPage);
Navigator.pushNamed(context, Routers.addLockPage,
arguments: {'getLockType': 1});
}),
lockTypeItem('images/lockType/lockType_NFCLock.png',
TranslationLoader.lanKeys!.NFCPassiveLock!.tr, () {
// Navigator.pushNamed(context, Routers.addLockPage);
Toast.show(msg: "功能暂未开放");
getNearByLimits();
}),
lockTypeItem('images/lockType/lockType_padlock.png',
TranslationLoader.lanKeys!.padlock!.tr, () {
// Navigator.pushNamed(context, Routers.addLockPage);
Toast.show(msg: "功能暂未开放");
getNearByLimits();
}),
lockTypeItem('images/lockType/lockType_safeLock.png',
TranslationLoader.lanKeys!.safeLock!.tr, () {
// Navigator.pushNamed(context, Routers.addLockPage);
Toast.show(msg: "功能暂未开放");
Navigator.pushNamed(context, Routers.addLockPage,
arguments: {'getLockType': 4});
}),
lockTypeItem('images/lockType/lockType_parkingLock.png',
TranslationLoader.lanKeys!.parkingLock!.tr, () {
// Navigator.pushNamed(context, Routers.addLockPage);
Toast.show(msg: "功能暂未开放");
Navigator.pushNamed(context, Routers.addLockPage,
arguments: {'getLockType': 5});
}),
lockTypeItem('images/lockType/lockType_entranceGuardLock.png',
TranslationLoader.lanKeys!.itelligentAccessControl!.tr,
() {
// Navigator.pushNamed(context, Routers.addLockPage);
Toast.show(msg: "功能暂未开放");
Navigator.pushNamed(context, Routers.addLockPage,
arguments: {'getLockType': 6});
}),
// lockTypeItem('images/lockType/lockType_bicycleLock.png',
@ -76,7 +80,7 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
lockTypeItem('images/lockType/lockType_gatewayLock.png',
TranslationLoader.lanKeys!.gateway!.tr, () {
// Navigator.pushNamed(context, Routers.gatewayListPage);
Toast.show(msg: "功能暂未开放");
getNearByLimits();
}),
],
),
@ -90,7 +94,8 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
Widget allLock() {
return GestureDetector(
onTap: () {
Navigator.pushNamed(context, Routers.addLockPage);
Navigator.pushNamed(context, Routers.addLockPage,
arguments: {'getLockType': 0});
},
child: Container(
height: 150.h,
@ -174,6 +179,41 @@ class _SeletLockTypePageState extends State<SeletLockTypePage> with BaseWidget {
);
}
//
void getNearByLimits() {
if (Platform.isIOS) {
Navigator.pushNamed(context, Routers.nearbyLockPage);
} else {
getMicrophonePermission().then((value) {
if (value) {
//
Navigator.pushNamed(context, Routers.nearbyLockPage);
} else {
//
openAppSettings(); //app系统设置
}
});
}
}
///
Future<bool> getMicrophonePermission() async {
// You can request multiple permissions at once.
Map<Permission, PermissionStatus> statuses = await [
Permission.bluetoothScan,
Permission.bluetoothConnect,
Permission.location,
].request();
//granted denied permanentlyDenied
if (statuses[Permission.bluetoothScan]!.isGranted &&
statuses[Permission.bluetoothConnect]!.isGranted &&
statuses[Permission.location]!.isGranted) {
return true;
}
return false;
}
void onShow() {}
void onHide() {}

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/tools/noData.dart';
import '../../appRouters.dart';
import '../../app_settings/app_colors.dart';
@ -15,6 +16,7 @@ class MessageListPage extends StatefulWidget {
}
class _MessageListPageState extends State<MessageListPage> {
List dataList = [];
@override
Widget build(BuildContext context) {
return Scaffold(
@ -23,14 +25,17 @@ class _MessageListPageState extends State<MessageListPage> {
barTitle: TranslationLoader.lanKeys!.message!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
body: ListView.builder(
itemCount: 10,
itemBuilder: (c, index) {
return _seletGatewayListListItem(
'images/controls_user.png', "您的钥匙已发送成功", "2023.6.21 11.15", () {
// Navigator.pushNamed(context, Routers.gatewayConfigurationWifiPage);
});
}),
body: dataList.isEmpty
? const NoData()
: ListView.builder(
itemCount: 10,
itemBuilder: (c, index) {
return _seletGatewayListListItem(
'images/controls_user.png', "您的钥匙已发送成功", "2023.6.21 11.15",
() {
// Navigator.pushNamed(context, Routers.gatewayConfigurationWifiPage);
});
}),
);
}

View File

@ -136,8 +136,8 @@ class _StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
// }),
mineItem('images/mine/icon_mine_main_message.png',
TranslationLoader.lanKeys!.message!.tr, () {
// Navigator.pushNamed(context, Routers.messageListPage);
Toast.show(msg: "功能暂未开放");
Navigator.pushNamed(context, Routers.messageListPage);
// Toast.show(msg: "功能暂未开放");
}),
//
// mineItem('images/mine/icon_mine_main_supportStaff.png',

View File

@ -0,0 +1,124 @@
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
import 'package:star_lock/appRouters.dart';
import 'package:star_lock/mine/mineSet/addAuthorizedAdministrator/AddAuthorizedAdministrator_state.dart';
import 'package:star_lock/network/api_repository.dart';
import 'package:star_lock/tools/baseGetXController.dart';
import 'package:star_lock/tools/toast.dart';
import 'package:star_lock/translations/trans_lib.dart';
class AddAuthorizedAdministratorLogic extends BaseGetXController {
final AddAuthorizedAdministratorState state =
AddAuthorizedAdministratorState();
//
Future<void> addAuthorizedAdminRequest() async {
String getFailureDateTime = '0';
String getEffectiveDateTime = '0';
if (state.tabController!.index == 1) {
getFailureDateTime =
state.failureDateTime.value.millisecondsSinceEpoch.toString();
getEffectiveDateTime =
state.effectiveDateTime.value.millisecondsSinceEpoch.toString();
}
var entity = await ApiRepository.to.addAuthorizedAdmin(
state.isCreateUser.value ? "1" : "0",
getFailureDateTime,
state.isRemoteUnlock.value == true ? '1' : '2',
[],
state.lockIdList,
state.keyNameController.text,
getEffectiveDateTime,
state.emailOrPhoneController.text,
state.countryCode.value,
'1',
);
if (entity.errorCode!.codeIsSuccessful) {
print('发送电子钥匙成功');
state.isSendSuccess.value = true;
} else {
Toast.show(msg: '${entity.errorMsg}');
if (entity.errorCode == 425) {
//
state.isCreateUser.value = true;
addAuthorizedAdminRequest();
}
}
}
//
Future<void> sendElectronicKeyRequest(BuildContext widgetContext) async {
String getFailureDateTime = '0';
String getEffectiveDateTime = '0';
String lockID = state.keyInfo.value.lockId.toString();
String getKeyType = (int.parse(state.type.value) + 1).toString();
if (state.type.value == '0') {
getFailureDateTime =
state.failureDateTime.value.millisecondsSinceEpoch.toString();
getEffectiveDateTime =
state.effectiveDateTime.value.millisecondsSinceEpoch.toString();
}
var entity = await ApiRepository.to.sendElectronicKey(
createUser: state.isCreateUser.value ? "1" : "0",
countryCode: state.countryCode.value,
usernameType: '1',
endDate: getFailureDateTime,
faceAuthentication: state.isAuthentication.value == true ? '1' : '2',
isCameraEnable: '2',
isRemoteUnlock: state.isRemoteUnlock.value == true ? '1' : '2',
keyNameForAdmin: state.keyNameController.text,
keyRight: '0',
keyType: getKeyType,
lockId: lockID,
operatorUid: '',
receiverUsername: state.emailOrPhoneController.text,
remarks: '',
startDate: getEffectiveDateTime,
weekDays: state.weekdaysList);
if (entity.errorCode!.codeIsSuccessful) {
print('发送电子钥匙成功');
state.isSendSuccess.value = true;
} else {
if (entity.errorCode == 425) {
//
_showDialog(widgetContext, '${entity.errorMsg}');
}
}
}
//
void _showDialog(widgetContext, String errMsg) {
showCupertinoDialog(
context: widgetContext,
builder: (context) {
return CupertinoAlertDialog(
title: const Text('接收者号码未注册,请选择号码所在的国家并重新发送'),
actions: [
CupertinoDialogAction(
child: Text(TranslationLoader.lanKeys!.cancel!.tr),
onPressed: () {
Navigator.of(context).pop();
},
),
CupertinoDialogAction(
child: Text(TranslationLoader.lanKeys!.selet!.tr),
onPressed: () async {
//
state.isCreateUser.value = true;
Navigator.of(context).pop();
var result = await Get.toNamed(Routers.seletCountryRegionPage);
if (result != null) {
result as Map<String, dynamic>;
state.countryCode.value = result['code'];
state.countryName.value = result['countryName'];
}
},
),
],
);
},
);
}
}

View File

@ -0,0 +1,39 @@
import 'package:flutter/material.dart';
import 'package:flutter_native_contact_picker/flutter_native_contact_picker.dart';
import 'package:get/get.dart';
import 'package:star_lock/main/lockMian/entity/lockInfoEntity.dart';
class AddAuthorizedAdministratorState {
late TabController? tabController;
TextEditingController emailOrPhoneController =
TextEditingController(); ///
TextEditingController keyNameController = TextEditingController(); //
final FlutterContactPicker contactPicker = FlutterContactPicker();
late Contact contact;
var type = ''.obs;
var lockIdList = [].obs;
var weekdaysList = [].obs;
var isCreateUser = false.obs; //1 0
var selectEffectiveDate =
'${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day} ${DateTime.now().hour}:${DateTime.now().minute}'
.obs; //
var selectFailureDate =
'${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day} ${DateTime.now().hour}:${DateTime.now().minute}'
.obs; //
final effectiveDateTime = DateTime.now().obs;
final failureDateTime = DateTime.now().obs;
var countryName = '中国'.obs;
var countryCode = '86'.obs;
var isSendSuccess = false.obs;
final isRemoteUnlock = false.obs; //
final isAuthentication = false.obs; //
final keyInfo = KeyInfos().obs;
final lockMainEntity = LockMainEntity().obs;
AddAuthorizedAdministratorState() {
Map map = Get.arguments;
lockMainEntity.value = map["lockMainEntity"];
keyInfo.value = map["keyInfo"];
}
}

View File

@ -6,6 +6,7 @@ import 'package:star_lock/appRouters.dart';
import 'package:star_lock/app_settings/app_colors.dart';
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
import 'package:star_lock/tools/ExpandedListView.dart';
import 'package:star_lock/tools/noData.dart';
import 'package:star_lock/tools/submitBtn.dart';
import 'package:star_lock/translations/trans_lib.dart';
@ -28,6 +29,7 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
bool isDeviceSelect = false;
int selectDeviceIndex = 0;
int selectNameIndex = 0;
List dataList = [];
List tabs = [
TranslationLoader.lanKeys!.name!.tr,
@ -83,9 +85,10 @@ class _AuthorityManagementPageState extends State<AuthorityManagementPage>
)),
),
),
body: TabBarView(
controller: _tabController,
children: [_permissionNameList(), _permissionDeviceList()])));
body: TabBarView(controller: _tabController, children: [
dataList.isEmpty ? const NoData() : _permissionNameList(),
dataList.isEmpty ? const NoData() : _permissionDeviceList()
])));
}
//

View File

@ -4,6 +4,7 @@ import 'package:get/get.dart';
import 'package:star_lock/mine/mineSet/authorizedAdministrator/authorizedAdminListEntity.dart';
import 'package:star_lock/network/api_repository.dart';
import 'package:star_lock/tools/baseGetXController.dart';
import 'package:star_lock/tools/noData.dart';
import '../../../../appRouters.dart';
import '../../../../app_settings/app_colors.dart';
@ -131,12 +132,14 @@ class _AuthorizedAdministratorListPageState
}
Widget _buildMainUI(List itemList) {
return ListView.builder(
itemCount: itemList.length,
itemBuilder: (c, index) {
AuthorizedAdminListItem itemData = itemList[index];
return _electronicKeyItem(itemData);
});
return itemList.isEmpty
? const NoData()
: ListView.builder(
itemCount: itemList.length,
itemBuilder: (c, index) {
AuthorizedAdminListItem itemData = itemList[index];
return _electronicKeyItem(itemData);
});
}
Widget _electronicKeyItem(AuthorizedAdminListItem itemData) {

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/massSendLockGroupListEntity.dart';
import 'package:star_lock/tools/noData.dart';
import '../../../../../app_settings/app_colors.dart';
import '../../../../../tools/titleAppBar.dart';
@ -55,7 +56,7 @@ class _LockItemListPageState extends State<LockItemListPage> {
);
},
)
: Container(),
: const NoData(),
);
}

View File

@ -4,6 +4,7 @@ import 'package:get/get.dart';
import 'package:star_lock/main/lockDetail/electronicKey/massSendElectronicKey/massSendLockGroupList/lockUserList/lockUserListEntity.dart';
import 'package:star_lock/network/api_repository.dart';
import 'package:star_lock/tools/baseGetXController.dart';
import 'package:star_lock/tools/noData.dart';
import '../../../../appRouters.dart';
import '../../../../app_settings/app_colors.dart';
@ -119,19 +120,21 @@ class _LockUserManageListPageState extends State<LockUserManageListPage> {
}
Widget _buildMainUI() {
return ListView.separated(
itemCount: dataList.length,
itemBuilder: (c, index) {
LockUserData indexEntity = dataList[index];
return _electronicKeyItem(indexEntity);
},
separatorBuilder: (BuildContext context, int index) {
return const Divider(
height: 1,
color: AppColors.greyLineColor,
);
},
);
return dataList.isEmpty
? const NoData()
: ListView.separated(
itemCount: dataList.length,
itemBuilder: (c, index) {
LockUserData indexEntity = dataList[index];
return _electronicKeyItem(indexEntity);
},
separatorBuilder: (BuildContext context, int index) {
return const Divider(
height: 1,
color: AppColors.greyLineColor,
);
},
);
}
//

View File

@ -93,15 +93,15 @@ class _MineSetPageState extends State<MineSetPage> {
Navigator.pushNamed(
context, Routers.authorizedAdministratorListPage);
}),
//by DaisyWu --
//by DaisyWu --
CommonItem(
leftTitel: TranslationLoader.lanKeys!.authorityManagement!.tr,
rightTitle: "",
isHaveLine: true,
isHaveDirection: true,
action: () {
// Navigator.pushNamed(context, Routers.authorityManagementPage);
Toast.show(msg: "功能暂未开放");
Navigator.pushNamed(context, Routers.authorityManagementPage);
// Toast.show(msg: "功能暂未开放");
}),
CommonItem(
leftTitel: TranslationLoader.lanKeys!.lockGroup!.tr,

View File

@ -31,59 +31,51 @@ class _ValueAddedServicesPageListState
_valueAddedServicesItem(
Image.asset('images/mine/icon_mine_valueAddedServices_note.png'),
TranslationLoader.lanKeys!.note!.tr, () {
Toast.show(msg: "功能暂未开放");
// Navigator.pushNamed(
// context, Routers.valueAddedServicesNoteAndEmailDetailPage,
// arguments: 1);
Navigator.pushNamed(
context, Routers.valueAddedServicesNoteAndEmailDetailPage,
arguments: 1);
}),
_valueAddedServicesItem(
Image.asset('images/mine/icon_mine_valueAddedServices_email.png'),
TranslationLoader.lanKeys!.mail!.tr, () {
Toast.show(msg: "功能暂未开放");
// Navigator.pushNamed(
// context, Routers.valueAddedServicesNoteAndEmailDetailPage,
// arguments: 2);
Navigator.pushNamed(
context, Routers.valueAddedServicesNoteAndEmailDetailPage,
arguments: 2);
}),
_valueAddedServicesItem(
Image.asset(
'images/mine/icon_mine_valueAddedServices_realName.png'),
TranslationLoader.lanKeys!.realNameAuthentication!.tr, () {
Toast.show(msg: "功能暂未开放");
// Navigator.pushNamed(
// context, Routers.valueAddedServicesRealNamePage);
Navigator.pushNamed(
context, Routers.valueAddedServicesRealNamePage);
}),
_valueAddedServicesItem(
Image.asset('images/mine/icon_mine_valueAddedServices_vip.png'),
TranslationLoader.lanKeys!.advancedFunction!.tr, () {
Toast.show(msg: "功能暂未开放");
// Navigator.pushNamed(
// context, Routers.valueAddedServicesHighFunctionPage);
Navigator.pushNamed(
context, Routers.valueAddedServicesHighFunctionPage);
}),
_valueAddedServicesItem(
Image.asset('images/mine/icon_mine_valueAddedServices_push.png'),
TranslationLoader.lanKeys!.pushMessage!.tr, () {
Toast.show(msg: "功能暂未开放");
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
_valueAddedServicesItem(
Image.asset(
'images/mine/icon_mine_valueAddedServices_checkIn.png'),
TranslationLoader.lanKeys!.checkingIn!.tr, () {
Toast.show(msg: "功能暂未开放");
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
_valueAddedServicesItem(
Image.asset(
'images/mine/icon_mine_valueAddedServices_storage.png'),
TranslationLoader.lanKeys!.recordsRetention!.tr, () {
Toast.show(msg: "功能暂未开放");
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
_valueAddedServicesItem(
Image.asset('images/mine/icon_mine_valueAddedServices_vip.png'),
'可视对讲', () {
Toast.show(msg: "功能暂未开放");
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
_valueAddedServicesItem(
Text(
@ -94,8 +86,7 @@ class _ValueAddedServicesPageListState
fontWeight: FontWeight.w600),
),
"Amazon Alexa", () {
Toast.show(msg: "功能暂未开放");
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
_valueAddedServicesItem(
Text(
@ -106,8 +97,7 @@ class _ValueAddedServicesPageListState
fontWeight: FontWeight.w600),
),
"Google Home", () {
Toast.show(msg: "功能暂未开放");
// Navigator.pushNamed(context, Routers.gatewayDetailPage);
Navigator.pushNamed(context, Routers.gatewayDetailPage);
}),
],
),

View File

@ -107,7 +107,7 @@ class _ExpandedListTileState extends State<ExpandedListTile> {
width: 10.w,
)),
AnimatedRotation(
turns: _isExpanded ? 0 : -0.5,
turns: _isExpanded ? -0.5 : 0,
duration: _animationDuration,
child: const Icon(Icons.keyboard_arrow_down),
),

View File

@ -1,5 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:star_lock/app_settings/app_colors.dart';
class NoData extends StatelessWidget {
const NoData({Key? key}) : super(key: key);
@ -10,8 +11,22 @@ class NoData extends StatelessWidget {
width: 1.sw,
height: 1.sh - ScreenUtil().statusBarHeight,
child: Center(
child: Image.asset('images/icon_unHaveData.png',width: 300.w,height: 240.w),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
'images/icon_noData.png',
width: 160.w,
height: 180.h,
),
Text(
'暂无数据',
style:
TextStyle(color: AppColors.darkGrayTextColor, fontSize: 22.sp),
)
],
)),
);
}
}