设备详情

This commit is contained in:
czz
2025-07-24 14:58:36 +08:00
parent 9a76b889b4
commit 42ad1ef14c

View File

@@ -103,7 +103,7 @@ class DeviceInfoWidget extends GetView {
_buildInfoRow( _buildInfoRow(
'设备ID', '设备ID',
deviceListController deviceListController
.model.deviceList[index]["_id"] ?? .model.deviceList[index]["mac"] ??
'', '',
valueColor: (deviceListController valueColor: (deviceListController
.model.deviceList[index] .model.deviceList[index]
@@ -115,7 +115,7 @@ class DeviceInfoWidget extends GetView {
'房间', '房间',
deviceListController.model deviceListController.model
.deviceList[index]["roomName"] ?? .deviceList[index]["roomName"] ??
'', '未分配房间',
valueColor: (deviceListController valueColor: (deviceListController
.model.deviceList[index] .model.deviceList[index]
["status"]?["status"]) == ["status"]?["status"]) ==
@@ -136,63 +136,6 @@ class DeviceInfoWidget extends GetView {
1 1
? Color(0xFF6BFDAC) ? Color(0xFF6BFDAC)
: Color(0xFF6BFDAC)), : Color(0xFF6BFDAC)),
// Row(
// mainAxisSize: MainAxisSize.max,
// children: [
// Expanded(
// child: RichText(
// text: TextSpan(
// children: [
// TextSpan(
// text: '设备ID' +
// (deviceListController.model
// .deviceList[
// index]['_id'] ??
// ''),
// style: TextStyle(
// fontFamily: 'Readex Pro',
// color: Color(0xFFC8CBD2),
// fontSize: 26.rpx,
// letterSpacing: 0,
// height: 1),
// ),
// ],
// ),
// maxLines: 1, // 限制显示一行
// overflow: TextOverflow
// .ellipsis, // 超出部分显示省略号
// ),
// ),
// ],
// ),
// Align(
// alignment: AlignmentDirectional(-1, 0),
// child: Text(
// '房间:' +
// (deviceListController
// .model.deviceList[index]
// ['roomName'] ??
// ''),
// style: TextStyle(
// fontFamily: 'Readex Pro',
// color: Color(0xFFC8CBD2),
// fontSize: 26.rpx,
// letterSpacing: 0,
// height: 1),
// ),
// ),
// Align(
// alignment: AlignmentDirectional(-1, 0),
// child: Text(
// '设备状态:${(deviceListController.model.deviceList[index]["status"]?["status"]) == 1 ? '在线' : '离线'}',
// style: TextStyle(
// fontFamily: 'Readex Pro',
// color: Color(0xFFC8CBD2),
// fontSize: 26.rpx,
// letterSpacing: 0,
// height: 1),
// ),
// )
].divide(SizedBox(height: 36.rpx)), ].divide(SizedBox(height: 36.rpx)),
), ),
), ),
@@ -269,9 +212,11 @@ class DeviceInfoWidget extends GetView {
children: [ children: [
InkWell( InkWell(
onTap: () async { onTap: () async {
await Get.toNamed("/deviceSharePage", if (device['bind_type'] == 1) {
arguments: deviceListController await Get.toNamed("/deviceSharePage",
.model.deviceList[index]); arguments: deviceListController
.model.deviceList[index]);
}
// if (device['type'] == 1) { // if (device['type'] == 1) {
// globalController.model.deviceMain = device; // globalController.model.deviceMain = device;
// await Get.toNamed("/deviceSharePage"); // await Get.toNamed("/deviceSharePage");
@@ -303,8 +248,7 @@ class DeviceInfoWidget extends GetView {
'已分享:', '已分享:',
style: TextStyle( style: TextStyle(
fontFamily: 'Readex Pro', fontFamily: 'Readex Pro',
fontSize: fontSize: 21.rpx,
AppFontsize.normal_text_size,
letterSpacing: 0, letterSpacing: 0,
color: Colors.white, color: Colors.white,
), ),
@@ -323,8 +267,7 @@ class DeviceInfoWidget extends GetView {
style: TextStyle( style: TextStyle(
fontFamily: 'Readex Pro', fontFamily: 'Readex Pro',
color: Color(0xFF85F5FF), color: Color(0xFF85F5FF),
fontSize: fontSize: 21.rpx,
AppFontsize.normal_text_size,
letterSpacing: 0, letterSpacing: 0,
), ),
), ),
@@ -334,8 +277,7 @@ class DeviceInfoWidget extends GetView {
'', '',
style: TextStyle( style: TextStyle(
fontFamily: 'Readex Pro', fontFamily: 'Readex Pro',
fontSize: fontSize: 21.rpx,
AppFontsize.normal_text_size,
letterSpacing: 0, letterSpacing: 0,
color: Colors.white, color: Colors.white,
), ),
@@ -345,8 +287,7 @@ class DeviceInfoWidget extends GetView {
'来自', '来自',
style: TextStyle( style: TextStyle(
fontFamily: 'Readex Pro', fontFamily: 'Readex Pro',
fontSize: fontSize: 21.rpx,
AppFontsize.normal_text_size,
letterSpacing: 0, letterSpacing: 0,
color: Colors.white, color: Colors.white,
), ),
@@ -361,8 +302,7 @@ class DeviceInfoWidget extends GetView {
style: TextStyle( style: TextStyle(
fontFamily: 'Readex Pro', fontFamily: 'Readex Pro',
color: Color(0xFF85F5FF), color: Color(0xFF85F5FF),
fontSize: fontSize: 21.rpx,
AppFontsize.normal_text_size,
letterSpacing: 0, letterSpacing: 0,
), ),
), ),
@@ -372,8 +312,7 @@ class DeviceInfoWidget extends GetView {
'的分享', '的分享',
style: TextStyle( style: TextStyle(
fontFamily: 'Readex Pro', fontFamily: 'Readex Pro',
fontSize: fontSize: 21.rpx,
AppFontsize.normal_text_size,
letterSpacing: 0, letterSpacing: 0,
color: Colors.white, color: Colors.white,
), ),
@@ -449,10 +388,16 @@ class DeviceInfoWidget extends GetView {
return Row( return Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Text( Container(
'$label ', constraints: BoxConstraints(
style: minWidth: 140.rpx, // 最小宽度
TextStyle(color: Color(0XFF929699), fontSize: 26.rpx, height: 1), ),
alignment: Alignment.centerLeft,
child: Text(
'$label ',
style: TextStyle(
color: Color(0XFF929699), fontSize: 26.rpx, height: 1),
),
), ),
Flexible( Flexible(
child: Text( child: Text(