Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
laki_icu_app
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张宏
laki_icu_app
Commits
701001d6
Commit
701001d6
authored
Jun 23, 2026
by
张宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
宠物信息调整
parent
e5f6d0a9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
231 additions
and
57 deletions
+231
-57
cat_sleep.png
lib/assets/monitoring/cat_sleep.png
+0
-0
cat_stand.png
lib/assets/monitoring/cat_stand.png
+0
-0
monitoring_index_cubit.dart
lib/views/monitoring/index/cubit/monitoring_index_cubit.dart
+24
-0
monitoring_index_state.dart
lib/views/monitoring/index/cubit/monitoring_index_state.dart
+2
-1
monitoring_index_view.dart
lib/views/monitoring/index/monitoring_index_view.dart
+5
-1
monitoring_metric_card.dart
...iews/monitoring/index/widgets/monitoring_metric_card.dart
+0
-1
monitoring_panel.dart
lib/views/monitoring/index/widgets/monitoring_panel.dart
+0
-38
monitoring_pet_info_card.dart
...ws/monitoring/index/widgets/monitoring_pet_info_card.dart
+200
-15
monitoring_video_card.dart
...views/monitoring/index/widgets/monitoring_video_card.dart
+0
-1
No files found.
lib/assets/monitoring/cat_sleep.png
0 → 100644
View file @
701001d6
414 KB
lib/assets/monitoring/cat_stand.png
0 → 100644
View file @
701001d6
347 KB
lib/views/monitoring/index/cubit/monitoring_index_cubit.dart
View file @
701001d6
...
...
@@ -3,6 +3,7 @@ import 'dart:async';
import
'package:flutter/foundation.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'package:laki_icu_app/enums/video_stream_mode_enum.dart'
;
import
'package:laki_icu_app/models/bo/monitoring_bo.dart'
;
import
'package:laki_icu_app/services/monitoring_service.dart'
;
import
'package:laki_icu_app/services/p2p_video_service.dart'
;
import
'package:laki_icu_app/services/webrtc_service.dart'
;
...
...
@@ -342,6 +343,29 @@ class MonitoringIndexCubit extends Cubit<MonitoringIndexState> {
));
}
/// 清空宠物信息(出舱)
void
clearPatientInfo
()
{
if
(
isClosed
)
return
;
emit
(
state
.
copyWith
(
clearPatientInfo:
true
));
}
/// 设置测试宠物信息(绑定宠物)
void
setTestPatientInfo
()
{
if
(
isClosed
)
return
;
final
testPatientInfo
=
PatientInfoBO
(
name:
'妮蔻'
,
type:
'猫'
,
phone:
'130-1111-3333'
,
breed:
'长毛三花'
,
doctor:
'张医生'
,
disease:
'胃炎'
,
checkInDate:
'2025-6-15'
,
careLevel:
'特级'
,
avatarUrl:
''
,
);
emit
(
state
.
copyWith
(
patientInfo:
testPatientInfo
));
}
/// 获取 WebRTC 渲染器供 UI 层使用
WebrtcService
get
webrtcService
=>
_webrtcService
;
...
...
lib/views/monitoring/index/cubit/monitoring_index_state.dart
View file @
701001d6
...
...
@@ -107,13 +107,14 @@ class MonitoringIndexState extends Equatable {
McuReport
?
latestMcuReport
,
bool
clearBoundBluetoothDevice
=
false
,
bool
clearLatestMcuReport
=
false
,
bool
clearPatientInfo
=
false
,
})
{
return
MonitoringIndexState
(
status:
status
??
this
.
status
,
isLoading:
isLoading
??
this
.
isLoading
,
error:
error
??
this
.
error
,
metrics:
metrics
??
this
.
metrics
,
patientInfo:
patientInfo
??
this
.
patientInfo
,
patientInfo:
clearPatientInfo
?
null
:
patientInfo
??
this
.
patientInfo
,
alerts:
alerts
??
this
.
alerts
,
videoConnectionState:
videoConnectionState
??
this
.
videoConnectionState
,
videoStreamMode:
videoStreamMode
??
this
.
videoStreamMode
,
...
...
lib/views/monitoring/index/monitoring_index_view.dart
View file @
701001d6
...
...
@@ -98,7 +98,11 @@ class _MonitoringIndexContentState extends State<MonitoringIndexContent> {
children:
[
Expanded
(
flex:
26
,
child:
MonitoringPetInfoCard
(
patientInfo:
state
.
patientInfo
),
child:
MonitoringPetInfoCard
(
patientInfo:
state
.
patientInfo
,
onExit:
()
=>
_monitoringIndexCubit
.
clearPatientInfo
(),
onBindPet:
()
=>
_monitoringIndexCubit
.
setTestPatientInfo
(),
),
),
SizedBox
(
width:
24
.
w
),
Expanded
(
...
...
lib/views/monitoring/index/widgets/monitoring_metric_card.dart
View file @
701001d6
...
...
@@ -3,7 +3,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import
'package:flutter_switch/flutter_switch.dart'
;
import
'package:laki_icu_app/models/bo/monitoring_bo.dart'
;
import
'monitoring_panel.dart'
;
class
MonitoringMetricCard
extends
StatelessWidget
{
final
MonitoringMetricBO
metric
;
...
...
lib/views/monitoring/index/widgets/monitoring_panel.dart
deleted
100644 → 0
View file @
e5f6d0a9
import
'package:flutter/material.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
class
MonitoringPanel
extends
StatelessWidget
{
final
String
backgroundAsset
;
final
Widget
child
;
final
EdgeInsetsGeometry
?
padding
;
final
BorderRadiusGeometry
?
borderRadius
;
final
BoxFit
fit
;
const
MonitoringPanel
({
super
.
key
,
required
this
.
backgroundAsset
,
required
this
.
child
,
this
.
padding
,
this
.
borderRadius
,
this
.
fit
=
BoxFit
.
fill
,
});
@override
Widget
build
(
BuildContext
context
)
{
return
ClipRRect
(
// borderRadius: borderRadius ?? BorderRadius.circular(18.r),
child:
Container
(
decoration:
BoxDecoration
(
image:
DecorationImage
(
image:
AssetImage
(
backgroundAsset
),
fit:
fit
,
),
),
child:
Padding
(
padding:
padding
??
EdgeInsets
.
all
(
18
.
w
),
child:
child
,
),
),
);
}
}
lib/views/monitoring/index/widgets/monitoring_pet_info_card.dart
View file @
701001d6
...
...
@@ -2,14 +2,17 @@ import 'package:flutter/material.dart';
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:laki_icu_app/models/bo/monitoring_bo.dart'
;
import
'monitoring_panel.dart'
;
class
MonitoringPetInfoCard
extends
StatelessWidget
{
final
PatientInfoBO
?
patientInfo
;
final
VoidCallback
?
onExit
;
final
VoidCallback
?
onBindPet
;
const
MonitoringPetInfoCard
({
super
.
key
,
required
this
.
patientInfo
,
this
.
onExit
,
this
.
onBindPet
,
});
@override
...
...
@@ -25,11 +28,193 @@ class MonitoringPetInfoCard extends StatelessWidget {
}
Widget
_buildEmpty
()
{
return
Center
(
child:
Text
(
'暂无宠物信息'
,
style:
TextStyle
(
color:
Colors
.
white70
,
fontSize:
20
.
sp
),
return
Column
(
children:
[
SizedBox
(
height:
10
.
h
),
// 顶部区域 - 空闲舱
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
width:
150
.
w
,
height:
160
.
w
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
20
.
r
),
color:
const
Color
(
0xFF1F4E79
).
withOpacity
(
0.3
),
),
child:
Center
(
child:
Icon
(
Icons
.
pets
,
color:
const
Color
(
0xFFAAFAFF
).
withOpacity
(
0.5
),
size:
80
.
w
,
),
),
),
SizedBox
(
width:
24
.
w
),
Expanded
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
'空闲舱'
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
40
.
sp
,
fontWeight:
FontWeight
.
w700
,
height:
1.2
,
),
),
SizedBox
(
height:
20
.
h
),
Text
(
'已就绪可入住'
,
style:
TextStyle
(
color:
const
Color
(
0xFFB8E8FF
),
fontSize:
25
.
sp
,
),
),
],
),
),
],
),
SizedBox
(
height:
132
.
h
),
// 猫咪图片
Image
.
asset
(
'lib/assets/monitoring/cat_sleep.png'
,
width:
254
.
w
,
height:
132
.
h
,
fit:
BoxFit
.
contain
,
),
SizedBox
(
height:
20
.
h
),
// 护理等级区域
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
'护理等级'
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
30
.
sp
,
fontWeight:
FontWeight
.
w600
,
),
),
SizedBox
(
height:
41
.
h
),
Text
(
'暂无'
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
64
.
sp
,
fontWeight:
FontWeight
.
bold
,
letterSpacing:
8
.
w
,
),
),
SizedBox
(
height:
55
.
h
),
// 进度条
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
4
.
w
),
decoration:
BoxDecoration
(
color:
const
Color
(
0xFF0A1A2E
),
borderRadius:
BorderRadius
.
circular
(
6
.
r
),
),
child:
Row
(
children:
[
Expanded
(
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
2
.
w
),
height:
10
.
h
,
decoration:
BoxDecoration
(
color:
const
Color
(
0xFFFFFFFF
),
borderRadius:
BorderRadius
.
circular
(
2
.
r
),
boxShadow:
const
[
BoxShadow
(
color:
Color
(
0x99FFFFFF
),
blurRadius:
6
,
),
],
),
),
),
Expanded
(
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
2
.
w
),
height:
10
.
h
,
decoration:
BoxDecoration
(
color:
const
Color
(
0xFF25E5B0
).
withOpacity
(
0.3
),
borderRadius:
BorderRadius
.
circular
(
2
.
r
),
),
),
),
Expanded
(
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
2
.
w
),
height:
10
.
h
,
decoration:
BoxDecoration
(
color:
const
Color
(
0xFFFFB347
).
withOpacity
(
0.3
),
borderRadius:
BorderRadius
.
circular
(
2
.
r
),
),
),
),
Expanded
(
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
2
.
w
),
height:
10
.
h
,
decoration:
BoxDecoration
(
color:
const
Color
(
0xFFFF7A4D
).
withOpacity
(
0.3
),
borderRadius:
BorderRadius
.
circular
(
2
.
r
),
),
),
),
Expanded
(
child:
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
2
.
w
),
height:
10
.
h
,
decoration:
BoxDecoration
(
color:
const
Color
(
0xFFFF4E4E
).
withOpacity
(
0.3
),
borderRadius:
BorderRadius
.
circular
(
2
.
r
),
),
),
),
],
),
),
],
),
SizedBox
(
height:
26
.
h
),
// 绑定宠物按钮
GestureDetector
(
onTap:
onBindPet
,
child:
Container
(
width:
double
.
infinity
,
height:
140
.
h
,
decoration:
const
BoxDecoration
(
image:
DecorationImage
(
image:
AssetImage
(
'lib/assets/monitoring/title_bg_spacewalk.png'
),
fit:
BoxFit
.
fill
,
),
),
child:
Center
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SizedBox
(
width:
24
.
w
),
Text
(
'绑定宠物'
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
32
.
sp
,
fontWeight:
FontWeight
.
w700
,
letterSpacing:
4
.
w
,
),
),
SizedBox
(
width:
24
.
w
),
],
),
),
),
),
],
);
}
...
...
@@ -45,9 +230,10 @@ class MonitoringPetInfoCard extends StatelessWidget {
_buildInfoBlock
(
info
),
SizedBox
(
height:
20
.
h
),
_buildDivider
(),
SizedBox
(
height:
4
0
.
h
),
SizedBox
(
height:
3
0
.
h
),
_buildCareLevelBlock
(
info
),
SizedBox
(
height:
20
.
h
),
SizedBox
(
height:
25
.
h
),
_buildExitButton
(),
],
);
...
...
@@ -209,11 +395,11 @@ class MonitoringPetInfoCard extends StatelessWidget {
'护理等级'
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
24
.
sp
,
fontSize:
30
.
sp
,
fontWeight:
FontWeight
.
w600
,
),
),
SizedBox
(
height:
2
0
.
h
),
SizedBox
(
height:
4
0
.
h
),
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
...
...
@@ -240,7 +426,7 @@ class MonitoringPetInfoCard extends StatelessWidget {
),
],
),
SizedBox
(
height:
20
.
h
),
SizedBox
(
height:
49
.
h
),
_buildLevelBar
(),
],
);
...
...
@@ -293,7 +479,9 @@ class MonitoringPetInfoCard extends StatelessWidget {
}
Widget
_buildExitButton
()
{
return
Container
(
return
GestureDetector
(
onTap:
onExit
,
child:
Container
(
width:
double
.
infinity
,
height:
140
.
h
,
decoration:
const
BoxDecoration
(
...
...
@@ -306,8 +494,6 @@ class MonitoringPetInfoCard extends StatelessWidget {
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Icon
(
Icons
.
chevron_left
,
color:
const
Color
(
0xFF77EFFF
),
size:
30
.
w
),
Icon
(
Icons
.
chevron_left
,
color:
const
Color
(
0xFF77EFFF
),
size:
30
.
w
),
SizedBox
(
width:
24
.
w
),
Text
(
'出舱'
,
...
...
@@ -319,11 +505,10 @@ class MonitoringPetInfoCard extends StatelessWidget {
),
),
SizedBox
(
width:
24
.
w
),
Icon
(
Icons
.
chevron_right
,
color:
const
Color
(
0xFF77EFFF
),
size:
30
.
w
),
Icon
(
Icons
.
chevron_right
,
color:
const
Color
(
0xFF77EFFF
),
size:
30
.
w
),
],
),
),
),
);
}
}
lib/views/monitoring/index/widgets/monitoring_video_card.dart
View file @
701001d6
import
'package:flutter/material.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'monitoring_panel.dart'
;
class
MonitoringVideoCard
extends
StatelessWidget
{
const
MonitoringVideoCard
({
super
.
key
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment