fix: 增加网络信号信息
This commit is contained in:
parent
d3cd4adce8
commit
ddb71668c4
@ -35,10 +35,7 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColors.mainBackgroundColor,
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
appBar: TitleAppBar(
|
appBar: TitleAppBar(barTitle: '基本信息'.tr, haveBack: true, backgroundColor: AppColors.mainColor),
|
||||||
barTitle: '基本信息'.tr,
|
|
||||||
haveBack: true,
|
|
||||||
backgroundColor: AppColors.mainColor),
|
|
||||||
body: ListView(
|
body: ListView(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
@ -48,8 +45,7 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
|||||||
isHaveLine: true)),
|
isHaveLine: true)),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: 'MAC/ID',
|
leftTitel: 'MAC/ID',
|
||||||
rightTitle:
|
rightTitle: "${state.lockBasicInfo.value.mac ?? ""}/${state.lockBasicInfo.value.lockId ?? ""}",
|
||||||
"${state.lockBasicInfo.value.mac ?? ""}/${state.lockBasicInfo.value.lockId ?? ""}",
|
|
||||||
allHeight: 70.h,
|
allHeight: 70.h,
|
||||||
isHaveLine: true)),
|
isHaveLine: true)),
|
||||||
// Obx(() => CommonItem(
|
// Obx(() => CommonItem(
|
||||||
@ -67,22 +63,17 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
|||||||
),
|
),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: '电量'.tr,
|
leftTitel: '电量'.tr,
|
||||||
rightTitle:
|
rightTitle: '${state.lockBasicInfo.value.electricQuantity ?? 0}%',
|
||||||
'${state.lockBasicInfo.value.electricQuantity ?? 0}%',
|
|
||||||
isHaveLine: true,
|
isHaveLine: true,
|
||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.uploadElectricQuantityPage,
|
Get.toNamed(Routers.uploadElectricQuantityPage,
|
||||||
arguments: <String, LockSetInfoData>{
|
arguments: <String, LockSetInfoData>{'lockSetInfoData': state.lockSetInfoData.value});
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
|
||||||
});
|
|
||||||
})),
|
})),
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
leftTitel: '有效期'.tr,
|
leftTitel: '有效期'.tr,
|
||||||
rightTitle: logic.getUseKeyTypeStr(
|
rightTitle: logic.getUseKeyTypeStr(state.lockBasicInfo.value.startDate,
|
||||||
state.lockBasicInfo.value.startDate,
|
state.lockBasicInfo.value.endDate, state.lockBasicInfo.value.keyType),
|
||||||
state.lockBasicInfo.value.endDate,
|
|
||||||
state.lockBasicInfo.value.keyType),
|
|
||||||
allHeight: 70.h,
|
allHeight: 70.h,
|
||||||
isHaveLine: true)),
|
isHaveLine: true)),
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
@ -104,28 +95,19 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
|||||||
)),
|
)),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
visible: state.lockBasicInfo.value.isLockOwner == 1 ||
|
visible: state.lockBasicInfo.value.isLockOwner == 1 || state.lockBasicInfo.value.keyRight == 1,
|
||||||
state.lockBasicInfo.value.keyRight == 1,
|
child: lockDataListItem('名称'.tr, state.lockBasicInfo.value.lockAlias ?? '', () async {
|
||||||
child: lockDataListItem(
|
|
||||||
'名称'.tr, state.lockBasicInfo.value.lockAlias ?? '',
|
|
||||||
() async {
|
|
||||||
var data = await Get.toNamed(Routers.editLockNamePage,
|
var data = await Get.toNamed(Routers.editLockNamePage,
|
||||||
arguments: <String, LockSetInfoData>{
|
arguments: <String, LockSetInfoData>{'lockSetInfoData': state.lockSetInfoData.value});
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
|
||||||
});
|
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
state.lockBasicInfo.value = data['lockBasicInfo'];
|
state.lockBasicInfo.value = data['lockBasicInfo'];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}))),
|
}))),
|
||||||
Obx(() => lockDataListItem(
|
Obx(() => lockDataListItem('锁分组'.tr, state.lockBasicInfo.value.groupName ?? '', () async {
|
||||||
'锁分组'.tr, state.lockBasicInfo.value.groupName ?? '',
|
|
||||||
() async {
|
|
||||||
Get.toNamed(Routers.lockSelectGroupingPage,
|
Get.toNamed(Routers.lockSelectGroupingPage,
|
||||||
arguments: <String, LockSetInfoData>{
|
arguments: <String, LockSetInfoData>{'lockSetInfoData': state.lockSetInfoData.value})!
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
|
||||||
})!
|
|
||||||
.then((val) {
|
.then((val) {
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
// mockNetworkDataRequest();
|
// mockNetworkDataRequest();
|
||||||
@ -142,22 +124,41 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
|||||||
isHaveDirection: true,
|
isHaveDirection: true,
|
||||||
action: () {
|
action: () {
|
||||||
Get.toNamed(Routers.adminOpenLockPasswordPage,
|
Get.toNamed(Routers.adminOpenLockPasswordPage,
|
||||||
arguments: <String, LockSetInfoData>{
|
arguments: <String, LockSetInfoData>{'lockSetInfoData': state.lockSetInfoData.value});
|
||||||
'lockSetInfoData': state.lockSetInfoData.value
|
|
||||||
});
|
|
||||||
}),
|
}),
|
||||||
)),
|
)),
|
||||||
Obx(() => Visibility(
|
Obx(
|
||||||
visible: (state.lockBasicInfo.value.lockName ?? '')
|
() => Visibility(
|
||||||
.contains('T9A'),
|
visible: state.lockSetInfoData.value.lockFeature?.wifi == 1,
|
||||||
child: CommonItem(
|
child: CommonItem(
|
||||||
leftTitel: '当前网络'.tr,
|
leftTitel: '当前网络'.tr,
|
||||||
rightTitle:
|
rightTitle: state.lockBasicInfo.value.networkInfo?.wifiName ?? '-',
|
||||||
state.lockBasicInfo.value.networkInfo?.wifiName ??
|
allHeight: 70.h,
|
||||||
'-',
|
isHaveLine: true),
|
||||||
allHeight: 70.h,
|
),
|
||||||
isHaveLine: true),
|
),
|
||||||
)),
|
Obx(
|
||||||
|
() => Visibility(
|
||||||
|
visible: state.lockSetInfoData.value.lockFeature?.wifi == 1,
|
||||||
|
child: CommonItem(
|
||||||
|
leftTitel: '网络信号强度'.tr,
|
||||||
|
rightTitle: '-',
|
||||||
|
allHeight: 70.h,
|
||||||
|
isHaveLine: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Obx(
|
||||||
|
() => Visibility(
|
||||||
|
visible: state.lockSetInfoData.value.lockFeature?.wifi == 1,
|
||||||
|
child: CommonItem(
|
||||||
|
leftTitel: '设备时区'.tr,
|
||||||
|
rightTitle: '-',
|
||||||
|
allHeight: 70.h,
|
||||||
|
isHaveLine: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
// Obx(() => CommonItem(
|
// Obx(() => CommonItem(
|
||||||
// leftTitel: '位置信息'.tr,
|
// leftTitel: '位置信息'.tr,
|
||||||
// // rightTitle: state.lockBasicInfo.value.address ?? "-",
|
// // rightTitle: state.lockBasicInfo.value.address ?? "-",
|
||||||
@ -190,14 +191,12 @@ class _BasicInformationPageState extends State<BasicInformationPage> {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget lockDataListItem(
|
Widget lockDataListItem(String leftTitle, String conentStr, Function()? action) {
|
||||||
String leftTitle, String conentStr, Function()? action) {
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: action,
|
onTap: action,
|
||||||
child: Container(
|
child: Container(
|
||||||
// height: 70.h,
|
// height: 70.h,
|
||||||
padding:
|
padding: EdgeInsets.only(left: 20.w, right: 10.w, top: 15.h, bottom: 15.h),
|
||||||
EdgeInsets.only(left: 20.w, right: 10.w, top: 15.h, bottom: 15.h),
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
border: Border(
|
border: Border(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user