设备人员更新
This commit is contained in:
@@ -28,6 +28,7 @@ class ServiceConstant {
|
||||
static String room_list = "/api/room/info"; //查询房间列表
|
||||
static String issue_list = "/api/help/list"; //问题与帮助列表
|
||||
|
||||
|
||||
static String logService = "$service_address/vsbs_log";
|
||||
static const String webSocketService = "wss://$baseHost/vsbs_ws_gateway/ws";
|
||||
static const String sleep_token = "HdAMjzqiYQKsmHRyEFKhfRGQ";
|
||||
|
||||
@@ -50,7 +50,7 @@ class MhMessageController extends GetControllerEx<MhMessageModel> {
|
||||
String serviceApi = ServiceConstant.message_list;
|
||||
String messageType = "app_system";
|
||||
if (model.type == 1) {
|
||||
messageType = "app_body";
|
||||
messageType = "app_vsm";
|
||||
} else {
|
||||
messageType = "app_system";
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/pages/common/bezier_bottom_navigation_bar.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/MattressControl.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/device_list.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/homepage/mht_sleep_report_page.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/homepage/new_Home_page.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/new_mine_page.dart';
|
||||
@@ -31,7 +32,7 @@ class _HomePageState extends State<MainPageBBottomChange>
|
||||
// Text('报告'),
|
||||
// RegisterPage(),
|
||||
// ShareDeviceWidget(),
|
||||
MhtSleepReportPage(),
|
||||
DeviceListPage(),
|
||||
// FindPasswordPage(),
|
||||
// Smys(),
|
||||
MattressControlPage(),
|
||||
|
||||
@@ -102,152 +102,6 @@ class _MessagePageState extends State<MessagePage> {
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 40.rpx),
|
||||
// Expanded(
|
||||
// child: Stack(
|
||||
// alignment: Alignment.bottomLeft,
|
||||
// children: [
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
// children: [
|
||||
// Obx(() {
|
||||
// return ClickableContainer(
|
||||
// padding: EdgeInsets.all(0),
|
||||
// backgroundColor: Colors.transparent,
|
||||
// highlightColor:
|
||||
// themeController.currentColor.sc21,
|
||||
// borderRadius: 8.rpx,
|
||||
// onTap: () => _onTabChanged(0),
|
||||
// child: Container(
|
||||
// width: 160.rpx,
|
||||
// alignment: Alignment.center,
|
||||
// child: Stack(
|
||||
// alignment: Alignment.center,
|
||||
// clipBehavior: Clip.none,
|
||||
// children: [
|
||||
// Text(
|
||||
// '体征消息'.tr,
|
||||
// style: FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// fontSize: AppConstants()
|
||||
// .title_text_fontSize,
|
||||
// color:
|
||||
// messageController
|
||||
// .model.type ==
|
||||
// 2
|
||||
// ? themeController
|
||||
// .currentColor.sc3
|
||||
// : themeController
|
||||
// .currentColor.sc2,
|
||||
// ),
|
||||
// ),
|
||||
// Obx(() {
|
||||
// return messageController.model
|
||||
// .body_message_read ==
|
||||
// 1
|
||||
// ? Positioned(
|
||||
// top: -4,
|
||||
// right: -14,
|
||||
// child: Container(
|
||||
// width: 8,
|
||||
// height: 8,
|
||||
// decoration:
|
||||
// const BoxDecoration(
|
||||
// color: Colors.red,
|
||||
// shape: BoxShape.circle,
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// : const SizedBox.shrink();
|
||||
// }),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// Obx(() {
|
||||
// return ClickableContainer(
|
||||
// padding: EdgeInsets.all(0),
|
||||
// backgroundColor: Colors.transparent,
|
||||
// highlightColor:
|
||||
// themeController.currentColor.sc21,
|
||||
// borderRadius: 8.rpx,
|
||||
// onTap: () => _onTabChanged(1),
|
||||
// child: Container(
|
||||
// width: 160.rpx,
|
||||
// alignment: Alignment.center,
|
||||
// child: Stack(
|
||||
// alignment: Alignment.center,
|
||||
// clipBehavior: Clip.none,
|
||||
// children: [
|
||||
// Text(
|
||||
// '系统消息'.tr,
|
||||
// style: FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// fontSize: AppConstants()
|
||||
// .title_text_fontSize,
|
||||
// color:
|
||||
// messageController
|
||||
// .model.type ==
|
||||
// 1
|
||||
// ? themeController
|
||||
// .currentColor.sc3
|
||||
// : themeController
|
||||
// .currentColor.sc2,
|
||||
// ),
|
||||
// ),
|
||||
// Obx(() {
|
||||
// return messageController.model
|
||||
// .system_message_read ==
|
||||
// 1
|
||||
// ? Positioned(
|
||||
// top: -4,
|
||||
// right: -14,
|
||||
// child: Container(
|
||||
// width: 8,
|
||||
// height: 8,
|
||||
// decoration:
|
||||
// const BoxDecoration(
|
||||
// color: Colors.red,
|
||||
// shape: BoxShape.circle,
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// : const SizedBox.shrink();
|
||||
// }),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// ].divide(SizedBox(width: 10.rpx)),
|
||||
// ),
|
||||
// Obx(() {
|
||||
// double lineWidth = 170.rpx;
|
||||
// return AnimatedPositioned(
|
||||
// duration: const Duration(milliseconds: 300),
|
||||
// curve: Curves.easeInOut,
|
||||
// bottom: 0,
|
||||
// left: messageController.model.type == 1
|
||||
// ? 0
|
||||
// : 170.rpx,
|
||||
// child: Container(
|
||||
// width: lineWidth,
|
||||
// height: 4.rpx,
|
||||
// decoration: BoxDecoration(
|
||||
// color: themeController.currentColor.sc2,
|
||||
// borderRadius: BorderRadius.circular(2.rpx),
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
|
||||
Expanded(
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomLeft,
|
||||
@@ -407,7 +261,6 @@ class _MessagePageState extends State<MessagePage> {
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(height: 17.rpx),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -135,9 +135,17 @@ class _MattressControlPageState extends State<MattressControlPage> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
_buildBedImageSection(context),
|
||||
_buildModeSelector(context),
|
||||
Expanded(child: _buildControlCards(context)),
|
||||
Center(
|
||||
child: Text(
|
||||
"等待引入",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
))
|
||||
|
||||
// _buildBedImageSection(context),
|
||||
// _buildModeSelector(context),
|
||||
// Expanded(child: _buildControlCards(context)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
350
lib/pages/mh_page/applyRepair/apply_repair_success.dart
Normal file
350
lib/pages/mh_page/applyRepair/apply_repair_success.dart
Normal file
@@ -0,0 +1,350 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.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/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart';
|
||||
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
||||
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
||||
import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
|
||||
class ApplyRepairSuccess extends StatefulWidget {
|
||||
const ApplyRepairSuccess({super.key});
|
||||
|
||||
@override
|
||||
State<ApplyRepairSuccess> createState() => _ApplyRepairSuccessState();
|
||||
}
|
||||
|
||||
class _ApplyRepairSuccessState extends State<ApplyRepairSuccess> {
|
||||
GlobalController globalController = Get.find();
|
||||
UserInfoController userInfoController = Get.find();
|
||||
BlueteethBindController blueteethBindController = Get.find();
|
||||
ThemeController themeController = Get.find();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@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/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent, // 加上这一行
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
automaticallyImplyLeading: false,
|
||||
iconTheme: IconThemeData(
|
||||
color: themeController.currentColor.sc3,
|
||||
),
|
||||
titleSpacing: 0,
|
||||
// leading: returnIconButtom,
|
||||
title: Container(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
/// 居中标题
|
||||
Text(
|
||||
'报修成功标题'.tr,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: themeController.currentColor.sc3,
|
||||
letterSpacing: 0,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
|
||||
/// 左边返回按钮
|
||||
// Positioned(
|
||||
// left: 0,
|
||||
// child: returnIconButtom,
|
||||
// ),
|
||||
Positioned(
|
||||
left: 40.rpx,
|
||||
child: ClickableContainer(
|
||||
onTap: () {
|
||||
Get.offNamed("/mianPageBottomChange");
|
||||
},
|
||||
backgroundColor: Colors.transparent,
|
||||
highlightColor: Colors
|
||||
.grey, // 可以设置为 themeController.currentColor.sc3 之类
|
||||
borderRadius: 8.rpx,
|
||||
padding: EdgeInsets.all(8.rpx), // 增加可点击区域
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/close.svg',
|
||||
width: 25.rpx,
|
||||
height: 25.rpx,
|
||||
color: themeController.currentColor.sc3,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
actions: [],
|
||||
centerTitle: false,
|
||||
),
|
||||
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(113.rpx, 0, 113.rpx, 0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Container(
|
||||
height: bodySize.maxHeight * 0.15,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0),
|
||||
child: Container(
|
||||
width: 148.rpx,
|
||||
height: 148.rpx,
|
||||
// width: double.infinity,
|
||||
decoration: BoxDecoration(),
|
||||
child: SvgPicture.asset('assets/img/icon/tick.svg',
|
||||
fit: BoxFit.cover, color: Color(0XFF84F5FF)),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0, 42.rpx, 0, 0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(),
|
||||
child: Align(
|
||||
alignment: AlignmentDirectional(0, 0),
|
||||
child: Text(
|
||||
'报修成功'.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0.0,
|
||||
color: themeController.currentColor.sc3,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
height: 90.rpx,
|
||||
),
|
||||
// Padding(
|
||||
// padding:
|
||||
// EdgeInsetsDirectional.fromSTEB(0, 265.rpx, 0, 0),
|
||||
// child: Container(
|
||||
// width: double.infinity,
|
||||
// decoration: BoxDecoration(),
|
||||
// child: Align(
|
||||
// alignment: AlignmentDirectional(0, 0),
|
||||
// child: Text(
|
||||
// '绑定成功.分享标题'.tr,
|
||||
// style: FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// fontSize: 30.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// color: themeController.currentColor.sc3,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: EdgeInsetsDirectional.fromSTEB(0, 48.rpx, 0, 0),
|
||||
// child: Container(
|
||||
// width: double.infinity,
|
||||
// decoration: BoxDecoration(),
|
||||
// child: Align(
|
||||
// alignment: AlignmentDirectional(-1, 0),
|
||||
// child: Text(
|
||||
// '报修成功标语'.tr,
|
||||
// style: FlutterFlowTheme.of(context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// fontSize: 26.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// color: themeController.currentColor.sc4,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0, 110.rpx, 0, 0),
|
||||
child: CustomCard(
|
||||
borderRadius:
|
||||
AppConstants().button_container_radius, // 圆角半径
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () async {
|
||||
Get.toNamed("/repairListPage");
|
||||
},
|
||||
colors: [
|
||||
Color(0xFFFCFCFC),
|
||||
Color(0xFFF8FAF9),
|
||||
Color(0XFFECF6F3),
|
||||
Color(0XFFD9F0E9),
|
||||
Color(0xFFCEECE3)
|
||||
],
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width * 0.66,
|
||||
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 500.rpx,
|
||||
minHeight: 90.rpx,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 2.rpx, 0, 0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/history.svg',
|
||||
width: 25.rpx,
|
||||
height: 25.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
color: Color(0xFF011D33),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'查看报修历史'.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
color: Color(0xFF011D33),
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize, // 自定义字体大小
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 17.rpx)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0, 18.rpx, 0, 0),
|
||||
child: CustomCard(
|
||||
borderRadius:
|
||||
AppConstants().button_container_radius, // 圆角半径
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {
|
||||
Get.offNamed("/mianPageBottomChange");
|
||||
},
|
||||
colors: [
|
||||
// 渐变色
|
||||
Color(0xFFFCFCFC),
|
||||
Color(0xFFF8FAF9),
|
||||
Color(0XFFECF6F3),
|
||||
Color(0XFFD9F0E9),
|
||||
Color(0xFFCEECE3)
|
||||
],
|
||||
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width * 0.66,
|
||||
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 500.rpx,
|
||||
minHeight: 90.rpx,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'绑定成功.返回'.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
color: Color(0xFF011D33),
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize, // 自定义字体大小
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 17.rpx)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildDeviceCard(BuildContext context,
|
||||
{required String title, required String imageUrl, required String type}) {
|
||||
return CustomCard(
|
||||
borderRadius: 20.rpx, // 圆角大小
|
||||
onTap: () {
|
||||
if (type != null) {
|
||||
if (type == '1') {
|
||||
Get.toNamed("/blueteethDevice");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
colors: [themeController.currentColor.sc17], // 背景色
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.sizeOf(context).height * 0.135,
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 220.rpx,
|
||||
),
|
||||
padding: EdgeInsetsDirectional.fromSTEB(77.rpx, 0, 21.rpx, 0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Inter',
|
||||
color: const Color(0xFFC2CED7),
|
||||
fontSize: 30.rpx,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.rpx),
|
||||
child: Image.asset(
|
||||
imageUrl,
|
||||
width: 212.rpx,
|
||||
height: 168.rpx,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,7 @@ import 'package:flutter_svg/svg.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
|
||||
class BluetoothPage extends GetView {
|
||||
Map data;
|
||||
@@ -135,18 +136,14 @@ class BluetoothPage extends GetView {
|
||||
arguments: data),
|
||||
_buildMenuButton(
|
||||
context, '房间选择', "/roomPickerPage"),
|
||||
_buildMenuButton(
|
||||
context, '设备校准', "/devicePeopleInfo"),
|
||||
_buildMenuButton(
|
||||
context, '体征传感器', "/devicePeopleInfo"),
|
||||
_buildMenuButton(
|
||||
context, 'WIFI配置', "/devicePeopleInfo"),
|
||||
_buildMenuButton(context, '设备校准', ""),
|
||||
_buildMenuButton(context, '体征传感器', ""),
|
||||
_buildMenuButton(context, 'WIFI配置', ""),
|
||||
_buildMenuButton(
|
||||
context, '睡眠习惯', "/sleepHabitPage"),
|
||||
_buildMenuButton(
|
||||
context, '分享设备', "/deviceSharePage"),
|
||||
_buildMenuButton(
|
||||
context, '解绑', "/devicePeopleInfo"),
|
||||
_buildMenuButton(context, '解绑', ""),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -172,6 +169,11 @@ class BluetoothPage extends GetView {
|
||||
} else {
|
||||
Get.toNamed(path!);
|
||||
}
|
||||
} else {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "功能开发中...",
|
||||
);
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/base/THFlutterFlowDropDown.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/book_info_controller.dart';
|
||||
import 'package:vbvs_app/pages/common/selectDialog.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/book_date_widget.dart';
|
||||
@@ -584,39 +585,39 @@ class BookInfoPage extends GetView<BookInfoController> {
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {
|
||||
if (controller.model.select_time_index == null) {
|
||||
showToast("请选择体验时间");
|
||||
return;
|
||||
}
|
||||
if (controller.model.userName == null ||
|
||||
controller.model.userName == "") {
|
||||
showToast("请输入姓名");
|
||||
return;
|
||||
}
|
||||
if (controller.model.userPhone == null ||
|
||||
controller.model.userPhone == "") {
|
||||
showToast("请输入手机号");
|
||||
return;
|
||||
}
|
||||
if (MyUtils.isValidPhoneNumber(
|
||||
controller.model.userPhone!) ==
|
||||
false) {
|
||||
showToast("请输入正确的手机号");
|
||||
return;
|
||||
}
|
||||
controller.submitData(data["id"]).then((d) {
|
||||
if (d.data["status"] == 2) {
|
||||
d.data["addressDetail"] = data['addressDetail'];
|
||||
d.data["name"] = data["name"];
|
||||
controller.messageAdd(d.data);
|
||||
Get.offAndToNamed("/bookSuccessPage",
|
||||
arguments: {"data": d.data});
|
||||
} else {
|
||||
showToast("预约失败");
|
||||
}
|
||||
}).catchError((d) {
|
||||
showToast("预约失败");
|
||||
});
|
||||
// if (controller.model.select_time_index == null) {
|
||||
// showToast("请选择体验时间");
|
||||
// return;
|
||||
// }
|
||||
// if (controller.model.userName == null ||
|
||||
// controller.model.userName == "") {
|
||||
// showToast("请输入姓名");
|
||||
// return;
|
||||
// }
|
||||
// if (controller.model.userPhone == null ||
|
||||
// controller.model.userPhone == "") {
|
||||
// showToast("请输入手机号");
|
||||
// return;
|
||||
// }
|
||||
// if (MyUtils.isValidPhoneNumber(
|
||||
// controller.model.userPhone!) ==
|
||||
// false) {
|
||||
// showToast("请输入正确的手机号");
|
||||
// return;
|
||||
// }
|
||||
// controller.submitData(data["id"]).then((d) {
|
||||
// if (d.data["status"] == 2) {
|
||||
// d.data["addressDetail"] = data['addressDetail'];
|
||||
// d.data["name"] = data["name"];
|
||||
// controller.messageAdd(d.data);
|
||||
// Get.offAndToNamed("/bookSuccessPage",
|
||||
// arguments: {"data": d.data});
|
||||
// } else {
|
||||
// showToast("预约失败");
|
||||
// }
|
||||
// }).catchError((d) {
|
||||
// showToast("预约失败");
|
||||
// });
|
||||
// Get.toNamed("/bookSuccessPage", arguments: {
|
||||
// "data": {
|
||||
// "id": "7fbfbd614ef5befa3d8a84730f666853",
|
||||
@@ -678,6 +679,10 @@ class BookInfoPage extends GetView<BookInfoController> {
|
||||
// "storeAddress": null
|
||||
// },
|
||||
// });
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "功能开发中...",
|
||||
);
|
||||
},
|
||||
colors: const [
|
||||
Color(0xFFFCFCFC),
|
||||
|
||||
@@ -35,6 +35,9 @@ class DevicePeopleInfo extends GetView<PeopleInfoController> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
controller.initData(data['mac']);
|
||||
});
|
||||
return LayoutBuilder(
|
||||
builder: (context, boxConstraints) => GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
|
||||
@@ -1,20 +1,37 @@
|
||||
import 'package:ef/base/widget/flutterflow/FlutterFlowTheme.dart';
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/common/color/ServiceConstant.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/tool/CustomCard.dart';
|
||||
|
||||
class EditBedPage extends StatefulWidget {
|
||||
const EditBedPage({Key? key}) : super(key: key);
|
||||
final Map data;
|
||||
EditBedPage({Key? key, required this.data});
|
||||
@override
|
||||
_EditBedPageState createState() => _EditBedPageState();
|
||||
}
|
||||
|
||||
BoxConstraints? bodysize;
|
||||
RxString _bedName = "".obs;
|
||||
|
||||
class _EditBedPageState extends State<EditBedPage> {
|
||||
late Map<String, dynamic> editedData;
|
||||
late TextEditingController _nameController; //名称文本输入框
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
editedData = Map.from(widget.data); // 创建副本
|
||||
_nameController = TextEditingController(text: editedData['name']);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_nameController.dispose(); // 记得释放Controller
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(builder: (context, cc) {
|
||||
@@ -94,12 +111,13 @@ class _EditBedPageState extends State<EditBedPage> {
|
||||
width: 0))),
|
||||
child: TextFormField(
|
||||
// autofocus: true,
|
||||
controller: _nameController,
|
||||
obscureText: false,
|
||||
onChanged: (val) {
|
||||
// controller.model.name = val;
|
||||
editedData['name'] = val;
|
||||
},
|
||||
textAlign: TextAlign.center,
|
||||
initialValue: _bedName.value,
|
||||
initialValue: widget.data['name'],
|
||||
decoration: InputDecoration(
|
||||
hintText: "请输入床的名称",
|
||||
contentPadding:
|
||||
@@ -172,7 +190,25 @@ class _EditBedPageState extends State<EditBedPage> {
|
||||
child: CustomCard(
|
||||
borderRadius: 16.rpx,
|
||||
gradientDirection: GradientDirection.vertical,
|
||||
onTap: () {},
|
||||
onTap: () async {
|
||||
String serviceAddress =
|
||||
ServiceConstant.service_address;
|
||||
String serviceName =
|
||||
ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.person_info;
|
||||
String queryUrl =
|
||||
"$serviceAddress$serviceName$serviceApi";
|
||||
await requestWithLog(
|
||||
logTitle: "更新设备信息",
|
||||
method: MyHttpMethod.put,
|
||||
queryUrl: queryUrl,
|
||||
data: {
|
||||
"id": editedData["id"],
|
||||
"name": editedData["name"],
|
||||
},
|
||||
onSuccess: (res) {},
|
||||
);
|
||||
},
|
||||
colors: const [
|
||||
Color(0xFFFCFCFC),
|
||||
Color(0xFFF8FAF9),
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/issue_controller.dart';
|
||||
import 'package:vbvs_app/controller/mh_controller/issue_preview_controller.dart';
|
||||
|
||||
@@ -21,13 +22,17 @@ class IssuePreviewWidget extends GetView<IssuePreviewInfoController> {
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
issueListController.model.selectedIndex = index;
|
||||
issueListController.updateAll();
|
||||
await Future.delayed(Duration(milliseconds: 100));
|
||||
issueListController.model.selectedIndex = -1;
|
||||
issueListController.updateAll();
|
||||
var article = issueListController.model.issueList![index];
|
||||
Get.toNamed("/helpArticle", arguments: article);
|
||||
// issueListController.model.selectedIndex = index;
|
||||
// issueListController.updateAll();
|
||||
// await Future.delayed(Duration(milliseconds: 100));
|
||||
// issueListController.model.selectedIndex = -1;
|
||||
// issueListController.updateAll();
|
||||
// var article = issueListController.model.issueList![index];
|
||||
// Get.toNamed("/helpArticle", arguments: article);
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "功能开发中...",
|
||||
);
|
||||
},
|
||||
child: Obx(() {
|
||||
return Container(
|
||||
|
||||
@@ -77,65 +77,65 @@ class _MessagePageState extends State<MessagePage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
messageController.messageList.value = [
|
||||
{
|
||||
"_id": "6836c3ee4e626030c8000000",
|
||||
"type": "app_vsm",
|
||||
"data": {
|
||||
"title": "实时监测通知",
|
||||
"val": [
|
||||
{"k": "设备ID", "v": "48ca43b1b454"},
|
||||
{"k": "使用人员", "v": "bb"},
|
||||
{"k": "消息类型", "v": "呼吸异常"},
|
||||
{"k": "检测值", "v": '26'},
|
||||
{"k": "检测时间", "v": "2025-05-28 16:06:07"}
|
||||
]
|
||||
},
|
||||
"level": 3,
|
||||
"tid": "67f5d96e26ef310463000000",
|
||||
"uid": "68319fe9702cc59bd1000000",
|
||||
"status": 0,
|
||||
"createTime": "1748419566651"
|
||||
},
|
||||
{
|
||||
"_id": "6836c3e84e625f30c8000000",
|
||||
"type": "app_vsm",
|
||||
"data": {
|
||||
"title": "实时监测通知",
|
||||
"val": [
|
||||
{"k": "设备ID", "v": "48ca43b1b454"},
|
||||
{"k": "使用人员", "v": "bb"},
|
||||
{"k": "消息类型", "v": "心率异常"},
|
||||
{"k": "检测值", "v": '115'},
|
||||
{"k": "检测时间", "v": "2025-05-28 16:06:00"}
|
||||
]
|
||||
},
|
||||
"level": 3,
|
||||
"tid": "67f5d96e26ef310463000000",
|
||||
"uid": "68319fe9702cc59bd1000000",
|
||||
"status": 0,
|
||||
"createTime": "1748419560486"
|
||||
},
|
||||
{
|
||||
"_id": "6836bd0c4e625e30c8000000",
|
||||
"type": "app_vsm",
|
||||
"data": {
|
||||
"title": "实时监测通知",
|
||||
"val": [
|
||||
{"k": "设备ID", "v": "48ca43b1b454"},
|
||||
{"k": "使用人员", "v": "bb"},
|
||||
{"k": "消息类型", "v": "心率异常"},
|
||||
{"k": "检测值", "v": '107'},
|
||||
{"k": "检测时间", "v": "1748417761000"}
|
||||
]
|
||||
},
|
||||
"level": 3,
|
||||
"tid": "67f5d96e26ef310463000000",
|
||||
"uid": "68319fe9702cc59bd1000000",
|
||||
"status": 0,
|
||||
"createTime": "1748417804381"
|
||||
}
|
||||
];
|
||||
// messageController.messageList.value = [
|
||||
// {
|
||||
// "_id": "6836c3ee4e626030c8000000",
|
||||
// "type": "app_vsm",
|
||||
// "data": {
|
||||
// "title": "实时监测通知",
|
||||
// "val": [
|
||||
// {"k": "设备ID", "v": "48ca43b1b454"},
|
||||
// {"k": "使用人员", "v": "bb"},
|
||||
// {"k": "消息类型", "v": "呼吸异常"},
|
||||
// {"k": "检测值", "v": '26'},
|
||||
// {"k": "检测时间", "v": "2025-05-28 16:06:07"}
|
||||
// ]
|
||||
// },
|
||||
// "level": 3,
|
||||
// "tid": "67f5d96e26ef310463000000",
|
||||
// "uid": "68319fe9702cc59bd1000000",
|
||||
// "status": 0,
|
||||
// "createTime": "1748419566651"
|
||||
// },
|
||||
// {
|
||||
// "_id": "6836c3e84e625f30c8000000",
|
||||
// "type": "app_vsm",
|
||||
// "data": {
|
||||
// "title": "实时监测通知",
|
||||
// "val": [
|
||||
// {"k": "设备ID", "v": "48ca43b1b454"},
|
||||
// {"k": "使用人员", "v": "bb"},
|
||||
// {"k": "消息类型", "v": "心率异常"},
|
||||
// {"k": "检测值", "v": '115'},
|
||||
// {"k": "检测时间", "v": "2025-05-28 16:06:00"}
|
||||
// ]
|
||||
// },
|
||||
// "level": 3,
|
||||
// "tid": "67f5d96e26ef310463000000",
|
||||
// "uid": "68319fe9702cc59bd1000000",
|
||||
// "status": 0,
|
||||
// "createTime": "1748419560486"
|
||||
// },
|
||||
// {
|
||||
// "_id": "6836bd0c4e625e30c8000000",
|
||||
// "type": "app_vsm",
|
||||
// "data": {
|
||||
// "title": "实时监测通知",
|
||||
// "val": [
|
||||
// {"k": "设备ID", "v": "48ca43b1b454"},
|
||||
// {"k": "使用人员", "v": "bb"},
|
||||
// {"k": "消息类型", "v": "心率异常"},
|
||||
// {"k": "检测值", "v": '107'},
|
||||
// {"k": "检测时间", "v": "1748417761000"}
|
||||
// ]
|
||||
// },
|
||||
// "level": 3,
|
||||
// "tid": "67f5d96e26ef310463000000",
|
||||
// "uid": "68319fe9702cc59bd1000000",
|
||||
// "status": 0,
|
||||
// "createTime": "1748417804381"
|
||||
// }
|
||||
// ];
|
||||
|
||||
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
@@ -239,13 +239,13 @@ class _MessagePageState extends State<MessagePage> {
|
||||
onPageChanged: _onPageChanged,
|
||||
children: [
|
||||
Obx(() {
|
||||
final list = messageController.messageList.value;
|
||||
final list = messageController.messageList;
|
||||
return list.isEmpty
|
||||
? const NullDataWidget()
|
||||
: _buildMessageListView(list);
|
||||
}),
|
||||
Obx(() {
|
||||
final list = messageController.messageList.value;
|
||||
final list = messageController.messageList;
|
||||
return list.isEmpty
|
||||
? const NullDataWidget()
|
||||
: _buildMessageListView(list);
|
||||
|
||||
@@ -5,6 +5,8 @@ import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
|
||||
import 'package:vbvs_app/controller/mh_controller/my_experience_list_controller.dart';
|
||||
import 'package:vbvs_app/pages/common/selectDialog.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/app_map_location.dart';
|
||||
|
||||
import '../../common/color/appFontsize.dart';
|
||||
|
||||
@@ -263,27 +265,27 @@ class MyExperienceWidget extends GetView {
|
||||
Flexible(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
// AppMapLocation.checkInstalledApps()
|
||||
// .then((d) {
|
||||
// if (AppMapLocation
|
||||
// .availableMapsToNames.isEmpty) {
|
||||
// showToast("未检测到导航软件");
|
||||
// } else {
|
||||
// showOneSelectionDialog(context,
|
||||
// title: "选择地图",
|
||||
// arr: AppMapLocation
|
||||
// .availableMapsToNames,
|
||||
// checkChange: (index) {
|
||||
// AppMapLocation.launchMap(
|
||||
// index,
|
||||
// data["name"],
|
||||
// double.parse(
|
||||
// "${data["latitude"]}"),
|
||||
// double.parse(
|
||||
// "${data["longitude"]}"));
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
AppMapLocation.checkInstalledApps()
|
||||
.then((d) {
|
||||
if (AppMapLocation
|
||||
.availableMapsToNames.isEmpty) {
|
||||
showToast("未检测到导航软件");
|
||||
} else {
|
||||
showOneSelectionDialog(context,
|
||||
title: "选择地图",
|
||||
arr: AppMapLocation
|
||||
.availableMapsToNames,
|
||||
checkChange: (index) {
|
||||
AppMapLocation.launchMap(
|
||||
index,
|
||||
data["name"],
|
||||
double.parse(
|
||||
"${data["latitude"]}"),
|
||||
double.parse(
|
||||
"${data["longitude"]}"));
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
width: MediaQuery.sizeOf(context).width *
|
||||
|
||||
@@ -236,7 +236,9 @@ class _MinePageState extends State<NewMinePage> {
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 46.rpx, bottom: 109.rpx),
|
||||
child: ElevatedButton(
|
||||
onPressed: () {},
|
||||
onPressed: () {
|
||||
Get.toNamed("/deviceListPage");
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
backgroundColor: const Color(0XFF85F5FF),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
@@ -151,6 +152,12 @@ class DeviceRepairPage extends GetView<RepairListController> {
|
||||
Colors.white,
|
||||
decorationThickness: 4.rpx,
|
||||
),
|
||||
recognizer:
|
||||
TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
MyUtils.makePhoneCall(
|
||||
"400-8756-966");
|
||||
},
|
||||
),
|
||||
TextSpan(
|
||||
text: " 反馈。",
|
||||
|
||||
@@ -130,7 +130,7 @@ class Smys extends GetView<SleepingHabitController> {
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
@@ -185,7 +185,7 @@ class Smys extends GetView<SleepingHabitController> {
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
@@ -263,7 +263,7 @@ class Smys extends GetView<SleepingHabitController> {
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Color(0xFF9EA4B7),
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
|
||||
@@ -637,7 +637,7 @@ class _RxhxMhtState extends State<RxhxMht> {
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Readex Pro',
|
||||
color: Colors.white,
|
||||
color: Color(0xFF929699),
|
||||
fontSize: 20.rpx,
|
||||
letterSpacing: 0,
|
||||
),
|
||||
|
||||
@@ -9,6 +9,7 @@ import 'package:vbvs_app/pages/main_bottom/component/main_page_b_bottom_change.d
|
||||
import 'package:vbvs_app/pages/mh_page/HomeDeviceType.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/LanguagePage.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/address_list_page.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/applyRepair/apply_repair_success.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/apply_repair_page.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/book_info_page.dart';
|
||||
import 'package:vbvs_app/pages/mh_page/book_success_page.dart';
|
||||
@@ -68,7 +69,7 @@ var mhroutes = {
|
||||
'/syms': (context) => Smys(),
|
||||
"/applyRepairPage": (context) => ApplyRepairPage(),
|
||||
"/roomPickerPage": (context) => RoomPickerPage(),
|
||||
"/editBedPage": (context) => EditBedPage(),
|
||||
"/editBedPage": (context, {arguments}) => EditBedPage(data: arguments),
|
||||
"/experienceStorePage": (context) => ExperienceStorePage(),
|
||||
"/bookInfoPage": (context, {arguments}) =>
|
||||
BookInfoPage(data: arguments["data"]),
|
||||
@@ -89,9 +90,10 @@ var mhroutes = {
|
||||
"/bindDeviceSuccess": (contxt) => MHTBindDeviceSuccess(),
|
||||
"/newSleepReportPage": (contxt, {arguments}) =>
|
||||
NewSleepReportPage(data: arguments),
|
||||
"/rxhxMht": (context) => RxhxMht(),
|
||||
"/helpArticle": (contxt, {arguments}) => HelpArticle(article: arguments),
|
||||
"/rxhxMht": (context) => RxhxMht(),
|
||||
"/helpArticle": (contxt, {arguments}) => HelpArticle(article: arguments),
|
||||
"/mHTPeopleInfoPage": (contxt) => MHTPeopleInfoPage(),
|
||||
"/applyRepairSuccess": (contxt) => ApplyRepairSuccess(),
|
||||
};
|
||||
var mhonGenerateRoute = (RouteSettings settings) {
|
||||
final String? name = settings.name; // 获取路由名称,如 /news 或 /search
|
||||
|
||||
Reference in New Issue
Block a user