修改锁列表显示问题、详情锁名字过长显示问题

This commit is contained in:
魏少阳 2023-10-23 09:46:49 +08:00
parent 7b985ed288
commit 94a20961c2
4 changed files with 66 additions and 30 deletions

View File

@ -44,7 +44,12 @@ class _CheckInCreatCompanyPageState extends State<CheckInCreatCompanyPage> {
isHaveLine: true,
isHaveDirection: true,
action: () async {
var data = await Get.toNamed(Routers.checkingInSetWorkTimePage);
var data = await Get.toNamed(Routers.checkingInSetWorkTimePage, arguments: {
"getKeyInfosData": state.getKeyInfosData.value,
"companyId": "",
"pushType": "",
"checkingInSetInfo": "",
});
if(data != null) {
setState(() {
state.beginTime.value = data["beginTime"];

View File

@ -89,33 +89,61 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
return Column(
children: [
SizedBox(height: 50.h),
// Stack(
// alignment: Alignment.center,
// children: [
// Align(
// alignment: Alignment.center,
// child: Text(
// widget.keyInfo!.lockAlias!,
// style:
// TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w400),
// )),
// Row(
// mainAxisAlignment: MainAxisAlignment.end,
// children: [
// Text(
// "100%",
// style: TextStyle(
// fontSize: 18.sp, color: AppColors.darkGrayTextColor),
// ),
// SizedBox(width: 2.w),
// Image.asset(
// 'images/main/icon_main_cell.png',
// width: 30.w,
// height: 24.w,
// ),
// SizedBox(width: 30.w),
// ],
// ),
// ],
// ),
Stack(
alignment: Alignment.centerRight,
alignment: Alignment.center,
children: [
Align(
alignment: Alignment.center,
child: Text(
widget.keyInfo!.lockAlias!,
style:
TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w400),
)),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
"100%",
style: TextStyle(
fontSize: 18.sp, color: AppColors.darkGrayTextColor),
),
SizedBox(width: 2.w),
Image.asset(
'images/main/icon_main_cell.png',
width: 30.w,
height: 24.w,
),
SizedBox(width: 30.w),
],
Container(
width: 1.sw - 120.w*2,
child: Center(child: Text(widget.keyInfo!.lockAlias!, style:TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w400),))
),
Positioned(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
"100%",
style: TextStyle(
fontSize: 18.sp, color: AppColors.darkGrayTextColor),
),
SizedBox(width: 2.w),
Image.asset(
'images/main/icon_main_cell.png',
width: 30.w,
height: 24.w,
),
SizedBox(width: 30.w),
],
)
)
],
),
SizedBox(height: 30.h),

View File

@ -221,7 +221,7 @@ class KeyInfos {
int? resetButton;
int? endDate;
int? keyRight;
int? electricQuantity;
// int? electricQuantity;
int? lockSound;
int? volume;
int? specialValue;
@ -277,7 +277,7 @@ class KeyInfos {
this.resetButton,
this.endDate,
this.keyRight,
this.electricQuantity,
// this.electricQuantity,
this.lockSound,
this.volume,
this.specialValue,
@ -334,7 +334,7 @@ class KeyInfos {
resetButton = json['resetButton'];
endDate = json['endDate'];
keyRight = json['keyRight'];
electricQuantity = json['electricQuantity'];
// electricQuantity = json['electricQuantity'];
lockSound = json['lockSound'];
volume = json['volume'];
specialValue = json['specialValue'];
@ -397,7 +397,7 @@ class KeyInfos {
data['resetButton'] = resetButton;
data['endDate'] = endDate;
data['keyRight'] = keyRight;
data['electricQuantity'] = electricQuantity;
// data['electricQuantity'] = electricQuantity;
data['lockSound'] = lockSound;
data['volume'] = volume;
data['specialValue'] = specialValue;

View File

@ -45,7 +45,7 @@ class _LockListPageState extends State<LockListPage> {
return GestureDetector(
onTap: action,
child: Container(
height: 122.h,
// height: 122.h,
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.w),
decoration: BoxDecoration(
color: Colors.white,
@ -101,6 +101,9 @@ class _LockListPageState extends State<LockListPage> {
),
],
),
SizedBox(
height: 20.h,
),
],
),
),