更新
This commit is contained in:
@@ -1164,7 +1164,8 @@ class _DeviceDataComponentWidgetState extends State<DeviceDataComponentWidget> {
|
||||
child: CustomCard(
|
||||
borderRadius: AppConstants().button_container_radius,
|
||||
onTap: () {
|
||||
TopSlideNotification.show(context, text: "待开发功能".tr);
|
||||
// TopSlideNotification.show(context, text: "待开发功能".tr);
|
||||
Get.toNamed("/messageReviewPage",arguments: widget.device);
|
||||
},
|
||||
colors: [
|
||||
themeController.currentColor.sc1,
|
||||
|
||||
318
lib/pages/device/message_review_page.dart
Normal file
318
lib/pages/device/message_review_page.dart
Normal file
@@ -0,0 +1,318 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||||
import 'package:vbvs_app/component/NullDataComponentWidget.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/controller/repair/repair_controller.dart';
|
||||
import 'package:vbvs_app/model/api_response.dart';
|
||||
import 'package:vbvs_app/pages/repair/component/RepairHistoryInfoWidget.dart';
|
||||
|
||||
class MessageReviewPage extends StatefulWidget {
|
||||
var data; //1.绑定时 2.绑定后
|
||||
MessageReviewPage({super.key, required this.data});
|
||||
|
||||
@override
|
||||
State<MessageReviewPage> createState() => _MessageReviewPageState();
|
||||
}
|
||||
|
||||
class _MessageReviewPageState extends State<MessageReviewPage> {
|
||||
RepairController repairController = Get.find();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
loadData();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, bodysize) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/img/bgNoImg.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: themeController.currentColor.sc17,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(
|
||||
color: themeController.currentColor.sc3,
|
||||
),
|
||||
titleSpacing: 0,
|
||||
title: Container(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
/// 居中标题
|
||||
Text(
|
||||
'消息回看'.tr,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: themeController.currentColor.sc3,
|
||||
letterSpacing: 0,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 0,
|
||||
// child: returnIconButtom,
|
||||
child: returnIconButtomAddCallback(() {}),
|
||||
),
|
||||
// Positioned(
|
||||
// right: 20.rpx,
|
||||
// child: ClickableContainer(
|
||||
// backgroundColor: Colors.transparent,
|
||||
// highlightColor: themeController.currentColor.sc16,
|
||||
// padding: EdgeInsets.all(8.rpx),
|
||||
// onTap: () {},
|
||||
// child: SvgPicture.asset(
|
||||
// 'assets/img/icon/history.svg',
|
||||
// width: 39.rpx,
|
||||
// height: 39.rpx,
|
||||
// color: themeController.currentColor.sc16,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsetsDirectional.fromSTEB(30.rpx, 29.rpx, 30.rpx, 0),
|
||||
// child: Obx(() {
|
||||
// final isEmpty = repairController.repairHistory.value.isEmpty;
|
||||
// if (isEmpty) {
|
||||
// return Expanded(child: NullDataWidget());
|
||||
// }
|
||||
// return SingleChildScrollView(
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: repairController.repairHistory.value
|
||||
// .map((item) => RepairHistoryInfoWidget(
|
||||
// data: item)) // 假设组件支持传 data
|
||||
// .toList()
|
||||
// .divide(SizedBox(height: 25.rpx))
|
||||
// .addToEnd(SizedBox(height: 25.rpx)),
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 120.rpx),
|
||||
child: ClickableContainer(
|
||||
backgroundColor: themeController.currentColor.sc5,
|
||||
highlightColor:
|
||||
themeController.currentColor.sc5, // 或你希望的点击水波纹颜色
|
||||
borderRadius: AppConstants()
|
||||
.normal_container_radius, // 如果你想加圆角可以设置 eg. 12.rpx
|
||||
padding: EdgeInsets.zero,
|
||||
onTap: () {
|
||||
print('点击了体征卡片');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
'实时体征.姓名'.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'实时体征.年龄'.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(height: 34.rpx)),
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'${widget.data['person']?['name'] ?? '未命名'.tr}',
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController
|
||||
.currentColor.sc3,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${MyUtils.getAgeByDate(MyUtils.formatBirthdayTime(widget.data['person']?['birthday'])) ?? '未知数据'.tr}',
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController
|
||||
.currentColor.sc3,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(height: 34.rpx)),
|
||||
),
|
||||
]
|
||||
.divide(SizedBox(width: 33.rpx))
|
||||
.addToStart(SizedBox(width: 37.rpx)),
|
||||
),
|
||||
]
|
||||
.addToStart(SizedBox(height: 36.rpx))
|
||||
.addToEnd(SizedBox(height: 36.rpx)),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
'实时体征.设备ID'.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'实时体征.体重'.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(height: 34.rpx)),
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'${widget.data['code'] ?? '未知数据'.tr}',
|
||||
// "D11250300003",
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController
|
||||
.currentColor.sc3,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${widget.data['person']?['weight'] ?? '未知数据'.tr}kg',
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController
|
||||
.currentColor.sc3,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(height: 34.rpx)),
|
||||
),
|
||||
]
|
||||
.divide(SizedBox(width: 33.rpx))
|
||||
.addToStart(SizedBox(width: 37.rpx)),
|
||||
),
|
||||
]
|
||||
.addToStart(SizedBox(height: 36.rpx))
|
||||
.addToEnd(SizedBox(height: 36.rpx)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> loadData() async {
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.submit_repair;
|
||||
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
|
||||
ApiResponse apiResponse = await requestWithLog(
|
||||
logTitle: "查询报修数据", method: MyHttpMethod.get, queryUrl: queryUrl);
|
||||
RepairController repairController = Get.find();
|
||||
repairController.repairHistory.value = apiResponse.data;
|
||||
repairController.updateAll();
|
||||
}
|
||||
}
|
||||
@@ -506,12 +506,7 @@ class _EPageState extends State<LoginPage> {
|
||||
// },
|
||||
onTap: () async {
|
||||
//loginController.model.isIos == true &&
|
||||
if (loginController
|
||||
.model.isWeChatNotInstalled !=
|
||||
true) {
|
||||
TopSlideNotification.show(context,text: "微信安装提示".tr,textColor: themeController.currentColor.sc9);
|
||||
} else {
|
||||
if (loginController
|
||||
if (loginController
|
||||
.model.register_agree ==
|
||||
null ||
|
||||
loginController
|
||||
@@ -527,7 +522,6 @@ class _EPageState extends State<LoginPage> {
|
||||
}
|
||||
await loginController
|
||||
.wxLoginSendAuth(context);
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width: 91.rpx,
|
||||
|
||||
@@ -827,15 +827,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
|
||||
padding: EdgeInsets.zero,
|
||||
onTap: () async {
|
||||
//loginController.model.isIos == true &&
|
||||
if (loginController
|
||||
.model.isWeChatNotInstalled !=
|
||||
true) {
|
||||
TopSlideNotification.show(context,
|
||||
text: "微信安装提示".tr,
|
||||
textColor:
|
||||
themeController.currentColor.sc9);
|
||||
} else {
|
||||
if (loginController
|
||||
if (loginController
|
||||
.model.register_agree ==
|
||||
null ||
|
||||
loginController
|
||||
@@ -851,7 +843,6 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
|
||||
}
|
||||
await loginController
|
||||
.wxLoginSendAuth(context);
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width: 91.rpx,
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
import 'package:vbvs_app/pages/device/BodyDeviceWidget.dart';
|
||||
import 'package:vbvs_app/pages/device/device_detail.dart';
|
||||
import 'package:vbvs_app/pages/device/instant_body_page.dart';
|
||||
import 'package:vbvs_app/pages/device/message_review_page.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/MobileScannerTestPage.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/bind_device_success.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/blueteeth_device_page.dart';
|
||||
@@ -82,6 +83,7 @@ var routes = {
|
||||
"/repairDetailPage": (contxt, {arguments}) =>
|
||||
RepairDetailPage(data: arguments),
|
||||
"/applyRepairSuccess": (contxt) => ApplyRepairSuccess(),
|
||||
"/messageReviewPage": (contxt,{arguments}) => MessageReviewPage(data: arguments),
|
||||
};
|
||||
|
||||
var onGenerateRoute = (RouteSettings settings) {
|
||||
|
||||
Reference in New Issue
Block a user