更新
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 4.5 KiB |
BIN
assets/img/errorImg.png
Normal file
BIN
assets/img/errorImg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
@@ -95,7 +95,7 @@
|
|||||||
"欢迎使用太和e护":"欢迎使用太和e护",
|
"欢迎使用太和e护":"欢迎使用太和e护",
|
||||||
"科技睡眠 洞悉万千":"科技睡眠 洞悉万千",
|
"科技睡眠 洞悉万千":"科技睡眠 洞悉万千",
|
||||||
"本机号码一键登录/注册":"本机号码一键登录/注册",
|
"本机号码一键登录/注册":"本机号码一键登录/注册",
|
||||||
"其他手机号码":"其他手机号码",
|
"其他手机号码":"其他账号登录",
|
||||||
"协议1":"登录时将自动注册,且代表您同意",
|
"协议1":"登录时将自动注册,且代表您同意",
|
||||||
"协议2":"《用户协议》",
|
"协议2":"《用户协议》",
|
||||||
"协议3":"和",
|
"协议3":"和",
|
||||||
@@ -338,7 +338,7 @@
|
|||||||
"图片未上传":"图片未上传",
|
"图片未上传":"图片未上传",
|
||||||
"设备未选择":"设备未选择",
|
"设备未选择":"设备未选择",
|
||||||
"参数未填写":"参数未填写",
|
"参数未填写":"参数未填写",
|
||||||
"问题描述未填写":"请上传图片",
|
"问题描述未填写":"问题描述未填写",
|
||||||
"编辑":"编辑",
|
"编辑":"编辑",
|
||||||
"滑动退出提醒":"再按一次退出程序",
|
"滑动退出提醒":"再按一次退出程序",
|
||||||
"操作说明":"操作说明",
|
"操作说明":"操作说明",
|
||||||
@@ -366,5 +366,6 @@
|
|||||||
"删除错误提示":"请至少选择一项",
|
"删除错误提示":"请至少选择一项",
|
||||||
"解绑":"解绑",
|
"解绑":"解绑",
|
||||||
"删除":"删除",
|
"删除":"删除",
|
||||||
"校准未完成提示":"校准还未完成,是否确认退出校准流程?"
|
"校准未完成提示":"校准还未完成,是否确认退出校准流程?",
|
||||||
|
"确定":"确定"
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ class ServiceConstant {
|
|||||||
static String share_deleted = "";//删除分享
|
static String share_deleted = "";//删除分享
|
||||||
static String start_calibration = "/api/caibration";//开始校准
|
static String start_calibration = "/api/caibration";//开始校准
|
||||||
static String calibration_process = "/api/caibration";//校准进度
|
static String calibration_process = "/api/caibration";//校准进度
|
||||||
static String submit_repair = "";//提交报修
|
static String submit_repair = "/api/device/repair";//提交报修
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,13 @@ DeviceShareListModel _$DeviceShareListModelFromJson(
|
|||||||
Map<String, dynamic> json) =>
|
Map<String, dynamic> json) =>
|
||||||
DeviceShareListModel()
|
DeviceShareListModel()
|
||||||
..key = json['key'] as String?
|
..key = json['key'] as String?
|
||||||
..all = (json['all'] as num?)?.toInt();
|
..all = (json['all'] as num?)?.toInt()
|
||||||
|
..accountKey = json['accountKey'] as String?;
|
||||||
|
|
||||||
Map<String, dynamic> _$DeviceShareListModelToJson(
|
Map<String, dynamic> _$DeviceShareListModelToJson(
|
||||||
DeviceShareListModel instance) =>
|
DeviceShareListModel instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'key': instance.key,
|
'key': instance.key,
|
||||||
'all': instance.all,
|
'all': instance.all,
|
||||||
|
'accountKey': instance.accountKey,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,8 +16,11 @@ part 'repair_controller.g.dart'; // 由json_serializable自动生成的部分
|
|||||||
class RepairModel {
|
class RepairModel {
|
||||||
String? id; //设备id
|
String? id; //设备id
|
||||||
String? param; //设备参数
|
String? param; //设备参数
|
||||||
String? issue; //问题描述
|
// String? issue; //问题描述
|
||||||
String? fileUrl; //文件地址
|
String? fileUrl; //文件地址
|
||||||
|
String? mac; //状态
|
||||||
|
String? desc;//问题描述
|
||||||
|
List? img;//上传图片
|
||||||
RepairModel();
|
RepairModel();
|
||||||
factory RepairModel.fromJson(Map<String, dynamic> json) {
|
factory RepairModel.fromJson(Map<String, dynamic> json) {
|
||||||
try {
|
try {
|
||||||
@@ -140,7 +143,7 @@ class RepairController extends GetControllerEx<RepairModel> {
|
|||||||
// apiResponse.msg = "上传限制(视频最大50MB)".tr;
|
// apiResponse.msg = "上传限制(视频最大50MB)".tr;
|
||||||
// return apiResponse;
|
// return apiResponse;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// // 构建上传地址
|
// // 构建上传地址
|
||||||
// String queryUrl =
|
// String queryUrl =
|
||||||
// "${ServiceConstant.service_address}${ServiceConstant.server_service}${ServiceConstant.upload_file}";
|
// "${ServiceConstant.service_address}${ServiceConstant.server_service}${ServiceConstant.upload_file}";
|
||||||
@@ -175,5 +178,4 @@ class RepairController extends GetControllerEx<RepairModel> {
|
|||||||
// return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
// return ApiResponse(code: -1, msg: "服务器.失败".tr);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,13 +9,17 @@ part of 'repair_controller.dart';
|
|||||||
RepairModel _$RepairModelFromJson(Map<String, dynamic> json) => RepairModel()
|
RepairModel _$RepairModelFromJson(Map<String, dynamic> json) => RepairModel()
|
||||||
..id = json['id'] as String?
|
..id = json['id'] as String?
|
||||||
..param = json['param'] as String?
|
..param = json['param'] as String?
|
||||||
..issue = json['issue'] as String?
|
..fileUrl = json['fileUrl'] as String?
|
||||||
..fileUrl = json['fileUrl'] as String?;
|
..mac = json['mac'] as String?
|
||||||
|
..desc = json['desc'] as String?
|
||||||
|
..img = json['img'] as List<dynamic>?;
|
||||||
|
|
||||||
Map<String, dynamic> _$RepairModelToJson(RepairModel instance) =>
|
Map<String, dynamic> _$RepairModelToJson(RepairModel instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'id': instance.id,
|
'id': instance.id,
|
||||||
'param': instance.param,
|
'param': instance.param,
|
||||||
'issue': instance.issue,
|
|
||||||
'fileUrl': instance.fileUrl,
|
'fileUrl': instance.fileUrl,
|
||||||
|
'mac': instance.mac,
|
||||||
|
'desc': instance.desc,
|
||||||
|
'img': instance.img,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ WeatherModel _$WeatherModelFromJson(Map<String, dynamic> json) => WeatherModel()
|
|||||||
..max_temperature = (json['max_temperature'] as num?)?.toInt()
|
..max_temperature = (json['max_temperature'] as num?)?.toInt()
|
||||||
..wind_direction = json['wind_direction'] as String?
|
..wind_direction = json['wind_direction'] as String?
|
||||||
..wind_speed = (json['wind_speed'] as num?)?.toInt()
|
..wind_speed = (json['wind_speed'] as num?)?.toInt()
|
||||||
..cityName = json['cityName'] as String?;
|
..cityName = json['cityName'] as String?
|
||||||
|
..weatherIcon = json['weatherIcon'] as String?
|
||||||
|
..weatherIconurl = json['weatherIconurl'] as String?;
|
||||||
|
|
||||||
Map<String, dynamic> _$WeatherModelToJson(WeatherModel instance) =>
|
Map<String, dynamic> _$WeatherModelToJson(WeatherModel instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
@@ -28,4 +30,6 @@ Map<String, dynamic> _$WeatherModelToJson(WeatherModel instance) =>
|
|||||||
'wind_direction': instance.wind_direction,
|
'wind_direction': instance.wind_direction,
|
||||||
'wind_speed': instance.wind_speed,
|
'wind_speed': instance.wind_speed,
|
||||||
'cityName': instance.cityName,
|
'cityName': instance.cityName,
|
||||||
|
'weatherIcon': instance.weatherIcon,
|
||||||
|
'weatherIconurl': instance.weatherIconurl,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -404,7 +404,8 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
|||||||
void _showRenameDialog() {
|
void _showRenameDialog() {
|
||||||
personController.currentPersonId.value = widget.device['_id'];
|
personController.currentPersonId.value = widget.device['_id'];
|
||||||
personController.name.value = "";
|
personController.name.value = "";
|
||||||
showConfirmDialog(
|
String text = "确定".tr;
|
||||||
|
showSingleConfirmDialog(
|
||||||
context,
|
context,
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(0.rpx, 41.rpx, 0.rpx, 0),
|
padding: EdgeInsetsDirectional.fromSTEB(0.rpx, 41.rpx, 0.rpx, 0),
|
||||||
@@ -476,6 +477,7 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
|||||||
onCancel: () {
|
onCancel: () {
|
||||||
print('用户点击了取消');
|
print('用户点击了取消');
|
||||||
},
|
},
|
||||||
|
confirmText: text,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -96,193 +96,23 @@ class _DeviceDetailPageState extends State<DeviceDetailPage> {
|
|||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
50.rpx, 0.rpx, 0.rpx, 0.rpx),
|
0.rpx, 92.rpx, 0.rpx, 0.rpx),
|
||||||
child: Row(
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Container(
|
||||||
mainAxisSize: MainAxisSize.min,
|
width: MediaQuery.sizeOf(context).width * 0.267,
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
height: MediaQuery.sizeOf(context).width * 0.267,
|
||||||
children: [
|
constraints: BoxConstraints(
|
||||||
Container(
|
minWidth: 200.rpx,
|
||||||
width: MediaQuery.sizeOf(context).width * 0.267,
|
minHeight: 200.rpx,
|
||||||
height: MediaQuery.sizeOf(context).width * 0.267,
|
),
|
||||||
constraints: BoxConstraints(
|
decoration: BoxDecoration(
|
||||||
minWidth: 200.rpx,
|
color: Colors.transparent,
|
||||||
minHeight: 200.rpx,
|
),
|
||||||
),
|
child:
|
||||||
decoration: BoxDecoration(),
|
(widget.device['code']?.toString().isNotEmpty ??
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'设备详情.设备名称'.tr,
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc4,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'设备详情.MAC'.tr,
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc4,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'设备详情.型号'.tr,
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc4,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'设备详情.版本'.tr,
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc4,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'设备详情.网络状态'.tr,
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc4,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'设备详情.故障状态'.tr,
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc4,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'设备详情.更新状态'.tr,
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc4,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'设备详情.更新时间'.tr,
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc4,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
.divide(SizedBox(height: 34.rpx))
|
|
||||||
.addToStart(SizedBox(height: 92.rpx))
|
|
||||||
.addToEnd(SizedBox(height: 97.rpx)),
|
|
||||||
),
|
|
||||||
Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: MediaQuery.sizeOf(context).width * 0.267,
|
|
||||||
height: MediaQuery.sizeOf(context).width * 0.267,
|
|
||||||
constraints: BoxConstraints(
|
|
||||||
minWidth: 200.rpx,
|
|
||||||
minHeight: 200.rpx,
|
|
||||||
),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.transparent,
|
|
||||||
),
|
|
||||||
child: (widget.device['code']
|
|
||||||
?.toString()
|
|
||||||
.isNotEmpty ??
|
|
||||||
false)
|
false)
|
||||||
? QrImageView(
|
? QrImageView(
|
||||||
data: widget.device['code'].toString(),
|
data: widget.device['code'].toString(),
|
||||||
@@ -290,182 +120,439 @@ class _DeviceDetailPageState extends State<DeviceDetailPage> {
|
|||||||
size: 200.0.rpx,
|
size: 200.0.rpx,
|
||||||
)
|
)
|
||||||
: Image.asset(
|
: Image.asset(
|
||||||
"assets/img/errorImg.jpeg",
|
"assets/img/errorImg.png",
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
(widget.device['code'] ?? '')
|
|
||||||
.toString()
|
|
||||||
.isNotEmpty
|
|
||||||
? widget.device['code'].toString()
|
|
||||||
: '未知数据'.tr,
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc3,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'${widget.device['person']?['name'] ?? '未命名'.tr}',
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc3,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'${widget.device['mac'] ?? '-'.tr}',
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc3,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'-',
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc3,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'-',
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc3,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'${widget.device['status']['status'] == 1 ? '在线'.tr : '离线'.tr}',
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc3,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'${widget.device['status']['failure'] == 1 ? '有故障'.tr : '无故障'.tr}',
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc3,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'${widget.device['status']['upgrade'] == 1 ? '有更新'.tr : '无更新'.tr}',
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc3,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 50.rpx,
|
|
||||||
decoration: BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: AlignmentDirectional(-1.rpx, 0.rpx),
|
|
||||||
child: Text(
|
|
||||||
'${widget.device['status']?['updateTime'] == null ? '-'.tr : MyUtils.timestampToDateString(widget.device['status']?['updateTime'])}',
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 26.rpx,
|
|
||||||
letterSpacing: 0.rpx,
|
|
||||||
color: themeController.currentColor.sc3,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
.divide(SizedBox(height: 34.rpx))
|
|
||||||
.addToStart(SizedBox(height: 92.rpx))
|
|
||||||
.addToEnd(SizedBox(height: 97.rpx)),
|
|
||||||
),
|
),
|
||||||
].divide(SizedBox(width: 34.rpx)),
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Text(
|
||||||
|
(widget.device['code'] ?? '').toString().isNotEmpty
|
||||||
|
? widget.device['code'].toString()
|
||||||
|
: '未知数据'.tr,
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController.currentColor.sc3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
// Container(
|
||||||
|
// width:
|
||||||
|
// MediaQuery.sizeOf(context).width * 0.267,
|
||||||
|
// height:
|
||||||
|
// MediaQuery.sizeOf(context).width * 0.267,
|
||||||
|
// constraints: BoxConstraints(
|
||||||
|
// minWidth: 200.rpx,
|
||||||
|
// minHeight: 200.rpx,
|
||||||
|
// ),
|
||||||
|
// decoration: BoxDecoration(),
|
||||||
|
// ),
|
||||||
|
// Container(
|
||||||
|
// height: 50.rpx,
|
||||||
|
// decoration: BoxDecoration(),
|
||||||
|
// ),
|
||||||
|
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'设备详情.设备名称'.tr,
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc4,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'设备详情.MAC'.tr,
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc4,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'设备详情.型号'.tr,
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc4,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'设备详情.版本'.tr,
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc4,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'设备详情.网络状态'.tr,
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc4,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'设备详情.故障状态'.tr,
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc4,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'设备详情.更新状态'.tr,
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc4,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'设备详情.更新时间'.tr,
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc4,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
.divide(SizedBox(height: 34.rpx))
|
||||||
|
.addToStart(SizedBox(height: 92.rpx))
|
||||||
|
.addToEnd(SizedBox(height: 97.rpx)),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// Container(
|
||||||
|
// width:
|
||||||
|
// MediaQuery.sizeOf(context).width * 0.267,
|
||||||
|
// height:
|
||||||
|
// MediaQuery.sizeOf(context).width * 0.267,
|
||||||
|
// constraints: BoxConstraints(
|
||||||
|
// minWidth: 200.rpx,
|
||||||
|
// minHeight: 200.rpx,
|
||||||
|
// ),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: Colors.transparent,
|
||||||
|
// ),
|
||||||
|
// child: (widget.device['code']
|
||||||
|
// ?.toString()
|
||||||
|
// .isNotEmpty ??
|
||||||
|
// false)
|
||||||
|
// ? QrImageView(
|
||||||
|
// data:
|
||||||
|
// widget.device['code'].toString(),
|
||||||
|
// version: QrVersions.auto,
|
||||||
|
// size: 200.0.rpx,
|
||||||
|
// )
|
||||||
|
// : Image.asset(
|
||||||
|
// "assets/img/errorImg.jpeg",
|
||||||
|
// fit: BoxFit.cover,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Container(
|
||||||
|
// height: 50.rpx,
|
||||||
|
// decoration: BoxDecoration(),
|
||||||
|
// child: Align(
|
||||||
|
// alignment:
|
||||||
|
// AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
// child: Text(
|
||||||
|
// (widget.device['code'] ?? '')
|
||||||
|
// .toString()
|
||||||
|
// .isNotEmpty
|
||||||
|
// ? widget.device['code'].toString()
|
||||||
|
// : '未知数据'.tr,
|
||||||
|
// style: FlutterFlowTheme.of(context)
|
||||||
|
// .bodyMedium
|
||||||
|
// .override(
|
||||||
|
// fontFamily: 'Inter',
|
||||||
|
// fontSize: 26.rpx,
|
||||||
|
// letterSpacing: 0.rpx,
|
||||||
|
// color: themeController
|
||||||
|
// .currentColor.sc3,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'${widget.device['person']?['name'] ?? '未命名'.tr}',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'${widget.device['mac'] ?? '-'.tr}',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'-',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'-',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'${widget.device['status']['status'] == 1 ? '在线'.tr : '离线'.tr}',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'${widget.device['status']['failure'] == 1 ? '有故障'.tr : '无故障'.tr}',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'${widget.device['status']['upgrade'] == 1 ? '有更新'.tr : '无更新'.tr}',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 50.rpx,
|
||||||
|
decoration: BoxDecoration(),
|
||||||
|
child: Align(
|
||||||
|
alignment:
|
||||||
|
AlignmentDirectional(-1.rpx, 0.rpx),
|
||||||
|
child: Text(
|
||||||
|
'${widget.device['status']?['updateTime'] == null ? '-'.tr : MyUtils.timestampToDateString(widget.device['status']?['updateTime'])}',
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 26.rpx,
|
||||||
|
letterSpacing: 0.rpx,
|
||||||
|
color: themeController
|
||||||
|
.currentColor.sc3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
.divide(SizedBox(height: 34.rpx))
|
||||||
|
.addToStart(SizedBox(height: 92.rpx))
|
||||||
|
.addToEnd(SizedBox(height: 97.rpx)),
|
||||||
|
),
|
||||||
|
].divide(SizedBox(width: 34.rpx)),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -579,6 +579,148 @@ void showConfirmDialog(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void showSingleConfirmDialog(
|
||||||
|
BuildContext context,
|
||||||
|
Widget widget,
|
||||||
|
String title, {
|
||||||
|
required VoidCallback onConfirm,
|
||||||
|
required VoidCallback onCancel,
|
||||||
|
String confirmText = "确定",
|
||||||
|
}) {
|
||||||
|
ThemeController themeController = Get.find();
|
||||||
|
BlueteethBindController blueteethBindController = Get.find();
|
||||||
|
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
barrierDismissible: true,
|
||||||
|
barrierColor: Colors.black.withOpacity(0.5), // 背景模糊色
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return FrostedDialog(
|
||||||
|
blurSigma: 3.0,
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: themeController.currentColor.sc17,
|
||||||
|
borderRadius: BorderRadius.circular(20.0),
|
||||||
|
),
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(31.rpx, 0, 31.rpx, 0),
|
||||||
|
child: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
maxHeight: MediaQuery.sizeOf(context).height * 0.656,
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
// 标题
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
ClickableContainer(
|
||||||
|
backgroundColor: Colors.transparent, // 容器背景色
|
||||||
|
highlightColor:
|
||||||
|
themeController.currentColor.sc21, // 点击时的背景色
|
||||||
|
padding: EdgeInsets.zero, // 这里去掉外部的 padding,避免影响点击范围
|
||||||
|
onTap: () {
|
||||||
|
Get.back();
|
||||||
|
onCancel();
|
||||||
|
},
|
||||||
|
child: Padding(
|
||||||
|
// padding:
|
||||||
|
// EdgeInsetsDirectional.fromSTEB(0, 33.rpx, 0, 0.rpx),
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
33.rpx, 33.rpx, 33.rpx, 33.rpx),
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
'assets/img/icon/close.svg',
|
||||||
|
width: 25.rpx,
|
||||||
|
height: 25.rpx, // 如果 SVG 中没有固定颜色,使用 color 设置
|
||||||
|
color: themeController.currentColor.sc3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentDirectional(0, 0),
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
33.rpx, 60.rpx, 33.rpx, 33.rpx),
|
||||||
|
child: Text(
|
||||||
|
title,
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize: 30.rpx,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
color: themeController.currentColor.sc3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
33.rpx, 0.rpx, 33.rpx, 0.rpx),
|
||||||
|
child: widget,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(
|
||||||
|
33.rpx, 58.rpx, 33.rpx, 60.rpx),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
|
||||||
|
CustomCard(
|
||||||
|
borderRadius: AppConstants().button_container_radius,
|
||||||
|
onTap: () {
|
||||||
|
Get.back();
|
||||||
|
onConfirm();
|
||||||
|
// await Future.delayed(Duration(milliseconds: 300));
|
||||||
|
},
|
||||||
|
colors: [
|
||||||
|
themeController.currentColor.sc1,
|
||||||
|
themeController.currentColor.sc2,
|
||||||
|
],
|
||||||
|
child: Container(
|
||||||
|
width: MediaQuery.sizeOf(context).width * 0.43,
|
||||||
|
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minWidth: 160.rpx,
|
||||||
|
minHeight: 90.rpx,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
confirmText,
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
color: themeController.currentColor.sc3,
|
||||||
|
fontFamily: 'Inter',
|
||||||
|
fontSize:
|
||||||
|
AppConstants().normal_text_fontSize,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].divide(SizedBox(width: 17.rpx)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
].divide(SizedBox(
|
||||||
|
width: 70.rpx,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
void showWifiDialog(
|
void showWifiDialog(
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
Widget widget,
|
Widget widget,
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class _EPageState extends State<PersonPage> {
|
|||||||
TopSlideNotification.show(context,
|
TopSlideNotification.show(context,
|
||||||
text: apiRespons.msg!);
|
text: apiRespons.msg!);
|
||||||
Get.offAllNamed("/bindDeviceSuccess");
|
Get.offAllNamed("/bindDeviceSuccess");
|
||||||
// Get.toNamed("/wifiPage");
|
// Get.toNamed("/wifiPage");
|
||||||
} else {
|
} else {
|
||||||
TopSlideNotification.show(context,
|
TopSlideNotification.show(context,
|
||||||
text: apiRespons.msg!,
|
text: apiRespons.msg!,
|
||||||
@@ -200,7 +200,8 @@ class _EPageState extends State<PersonPage> {
|
|||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
fontSize: 26.rpx,
|
fontSize: 26.rpx,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
color: themeController.currentColor.sc4,
|
color: themeController
|
||||||
|
.currentColor.sc4,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
@@ -286,26 +287,11 @@ class _EPageState extends State<PersonPage> {
|
|||||||
Container(
|
Container(
|
||||||
width: 90.rpx,
|
width: 90.rpx,
|
||||||
height: 90.rpx,
|
height: 90.rpx,
|
||||||
decoration: BoxDecoration(),
|
child: ClipOval(
|
||||||
child: Container(
|
child: Opacity(
|
||||||
clipBehavior:
|
opacity: isMaleGreyed
|
||||||
Clip.antiAlias,
|
? 0.4
|
||||||
decoration: BoxDecoration(
|
: 1.0, // 控制透明度
|
||||||
shape: BoxShape.circle,
|
|
||||||
),
|
|
||||||
child: ColorFiltered(
|
|
||||||
colorFilter: isMaleGreyed
|
|
||||||
? ColorFilter.mode(
|
|
||||||
Colors.grey
|
|
||||||
.withOpacity(
|
|
||||||
0.6),
|
|
||||||
BlendMode
|
|
||||||
.saturation)
|
|
||||||
: ColorFilter.mode(
|
|
||||||
Colors
|
|
||||||
.transparent,
|
|
||||||
BlendMode
|
|
||||||
.saturation),
|
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
"assets/img/man.png",
|
"assets/img/man.png",
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
@@ -355,28 +341,13 @@ class _EPageState extends State<PersonPage> {
|
|||||||
Container(
|
Container(
|
||||||
width: 90.rpx,
|
width: 90.rpx,
|
||||||
height: 90.rpx,
|
height: 90.rpx,
|
||||||
decoration: BoxDecoration(),
|
child: ClipOval(
|
||||||
child: Container(
|
child: Opacity(
|
||||||
clipBehavior:
|
opacity: isFemaleGreyed
|
||||||
Clip.antiAlias,
|
? 0.4
|
||||||
decoration: BoxDecoration(
|
: 1.0, // 控制透明度
|
||||||
shape: BoxShape.circle,
|
|
||||||
),
|
|
||||||
child: ColorFiltered(
|
|
||||||
colorFilter: isFemaleGreyed
|
|
||||||
? ColorFilter.mode(
|
|
||||||
Colors.grey
|
|
||||||
.withOpacity(
|
|
||||||
0.6),
|
|
||||||
BlendMode
|
|
||||||
.saturation)
|
|
||||||
: ColorFilter.mode(
|
|
||||||
Colors
|
|
||||||
.transparent,
|
|
||||||
BlendMode
|
|
||||||
.saturation),
|
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
"assets/img/woman.png",
|
"assets/img/man.png",
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -431,18 +402,16 @@ class _EPageState extends State<PersonPage> {
|
|||||||
.requestFocus(FocusNode());
|
.requestFocus(FocusNode());
|
||||||
Future.delayed(Duration(milliseconds: 250),
|
Future.delayed(Duration(milliseconds: 250),
|
||||||
() {
|
() {
|
||||||
showDateSelectionDialog(
|
showDateSelectionDialog(context,
|
||||||
context,
|
checkDate:
|
||||||
checkDate: personController.dateTime ??
|
personController.dateTime ??
|
||||||
DateTime.now(),
|
DateTime.now(),
|
||||||
checkChange: (DateTime d) {
|
checkChange: (DateTime d) {
|
||||||
personController.birthday.value =
|
personController.birthday.value =
|
||||||
MyUtils.formatBindTime(d);
|
MyUtils.formatBindTime(d);
|
||||||
personController.dateTime = d;
|
personController.dateTime = d;
|
||||||
personController.updateAll();
|
personController.updateAll();
|
||||||
},
|
}, title: "生日".tr);
|
||||||
title: "生日".tr
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
|
|||||||
@@ -288,26 +288,11 @@ class _UpdatePageState extends State<UpdatePersonPage> {
|
|||||||
Container(
|
Container(
|
||||||
width: 90.rpx,
|
width: 90.rpx,
|
||||||
height: 90.rpx,
|
height: 90.rpx,
|
||||||
decoration: BoxDecoration(),
|
child: ClipOval(
|
||||||
child: Container(
|
child: Opacity(
|
||||||
clipBehavior:
|
opacity: isMaleGreyed
|
||||||
Clip.antiAlias,
|
? 0.4
|
||||||
decoration: BoxDecoration(
|
: 1.0, // 控制透明度
|
||||||
shape: BoxShape.circle,
|
|
||||||
),
|
|
||||||
child: ColorFiltered(
|
|
||||||
colorFilter: isMaleGreyed
|
|
||||||
? ColorFilter.mode(
|
|
||||||
Colors.grey
|
|
||||||
.withOpacity(
|
|
||||||
0.6),
|
|
||||||
BlendMode
|
|
||||||
.saturation)
|
|
||||||
: ColorFilter.mode(
|
|
||||||
Colors
|
|
||||||
.transparent,
|
|
||||||
BlendMode
|
|
||||||
.saturation),
|
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
"assets/img/man.png",
|
"assets/img/man.png",
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
@@ -357,28 +342,13 @@ class _UpdatePageState extends State<UpdatePersonPage> {
|
|||||||
Container(
|
Container(
|
||||||
width: 90.rpx,
|
width: 90.rpx,
|
||||||
height: 90.rpx,
|
height: 90.rpx,
|
||||||
decoration: BoxDecoration(),
|
child: ClipOval(
|
||||||
child: Container(
|
child: Opacity(
|
||||||
clipBehavior:
|
opacity: isFemaleGreyed
|
||||||
Clip.antiAlias,
|
? 0.4
|
||||||
decoration: BoxDecoration(
|
: 1.0, // 控制透明度
|
||||||
shape: BoxShape.circle,
|
|
||||||
),
|
|
||||||
child: ColorFiltered(
|
|
||||||
colorFilter: isFemaleGreyed
|
|
||||||
? ColorFilter.mode(
|
|
||||||
Colors.grey
|
|
||||||
.withOpacity(
|
|
||||||
0.6),
|
|
||||||
BlendMode
|
|
||||||
.saturation)
|
|
||||||
: ColorFilter.mode(
|
|
||||||
Colors
|
|
||||||
.transparent,
|
|
||||||
BlendMode
|
|
||||||
.saturation),
|
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
"assets/img/woman.png",
|
"assets/img/man.png",
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -328,8 +328,12 @@ class _ApplyRepairPageState extends State<ApplyRepairPage> {
|
|||||||
String queryUrl =
|
String queryUrl =
|
||||||
"$serviceAddress$serviceName$serviceApi";
|
"$serviceAddress$serviceName$serviceApi";
|
||||||
var data = {
|
var data = {
|
||||||
"repairList": repairController.repairList,
|
"device": repairController.repairList,
|
||||||
"type": repairController.device_type.value,
|
"type": repairController.device_type.value,
|
||||||
|
"contacts": {
|
||||||
|
"name": repairController.name.value,
|
||||||
|
"phone": repairController.phone.value
|
||||||
|
},
|
||||||
};
|
};
|
||||||
ApiResponse apiResponse = await requestWithLog(
|
ApiResponse apiResponse = await requestWithLog(
|
||||||
logTitle: "提交报修信息",
|
logTitle: "提交报修信息",
|
||||||
@@ -478,7 +482,6 @@ class _ApplyRepairPageState extends State<ApplyRepairPage> {
|
|||||||
cursorColor: themeController.currentColor.sc3,
|
cursorColor: themeController.currentColor.sc3,
|
||||||
onChanged: onChanged,
|
onChanged: onChanged,
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].divide(SizedBox(width: 24.rpx)),
|
].divide(SizedBox(width: 24.rpx)),
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||||
|
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||||
import 'package:vbvs_app/routers/routers.dart';
|
import 'package:vbvs_app/routers/routers.dart';
|
||||||
|
|
||||||
@@ -28,14 +29,17 @@ class _RepairHistoryInfoWidgetState extends State<RepairHistoryInfoWidget> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return CustomCard(
|
return ClickableContainer(
|
||||||
borderRadius: AppConstants().normal_container_radius,
|
borderRadius: AppConstants().normal_container_radius,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
//跳转详情
|
//跳转详情
|
||||||
},
|
},
|
||||||
colors: [
|
// colors: [
|
||||||
themeController.currentColor.sc5,
|
// themeController.currentColor.sc5,
|
||||||
],
|
// ],
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
highlightColor: themeController.currentColor.sc21,
|
||||||
|
padding: EdgeInsetsDirectional.fromSTEB(0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|||||||
@@ -326,13 +326,16 @@ class _RepairModelWidgetState extends State<RepairModelWidget> {
|
|||||||
.refresh(); // 通知 Obx 更新(如果用了 GetX)
|
.refresh(); // 通知 Obx 更新(如果用了 GetX)
|
||||||
print(widget.model);
|
print(widget.model);
|
||||||
} else {
|
} else {
|
||||||
TopSlideNotification.show(
|
if (widget.model['path'] == null ||
|
||||||
context,
|
widget.model['path'].isEmpty) {
|
||||||
text: apiResponse.msg!,
|
TopSlideNotification.show(
|
||||||
textColor: apiResponse.code == HttpStatusCodes.ok
|
context,
|
||||||
? themeController.currentColor.sc2
|
text: apiResponse.msg!,
|
||||||
: themeController.currentColor.sc9,
|
textColor: apiResponse.code == HttpStatusCodes.ok
|
||||||
);
|
? themeController.currentColor.sc2
|
||||||
|
: themeController.currentColor.sc9,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
import 'package:ef/ef.dart';
|
import 'package:ef/ef.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
|
||||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||||
import 'package:vbvs_app/controller/device/body_device_controller.dart';
|
|
||||||
import 'package:vbvs_app/controller/device/device_type_controller.dart';
|
|
||||||
import 'package:vbvs_app/controller/repair/repair_controller.dart';
|
|
||||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
|
||||||
import 'package:vbvs_app/pages/repair/component/RepairHistoryInfoWidget.dart';
|
import 'package:vbvs_app/pages/repair/component/RepairHistoryInfoWidget.dart';
|
||||||
|
|
||||||
class RepairListPage extends StatefulWidget {
|
class RepairListPage extends StatefulWidget {
|
||||||
|
|||||||
Reference in New Issue
Block a user