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