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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
257 additions
and
83 deletions
+257
-83
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
+1
-2
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
+224
-39
monitoring_video_card.dart
...views/monitoring/index/widgets/monitoring_video_card.dart
+1
-2
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';
...
@@ -3,6 +3,7 @@ import 'dart:async';
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'package:laki_icu_app/enums/video_stream_mode_enum.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/monitoring_service.dart'
;
import
'package:laki_icu_app/services/p2p_video_service.dart'
;
import
'package:laki_icu_app/services/p2p_video_service.dart'
;
import
'package:laki_icu_app/services/webrtc_service.dart'
;
import
'package:laki_icu_app/services/webrtc_service.dart'
;
...
@@ -342,6 +343,29 @@ class MonitoringIndexCubit extends Cubit<MonitoringIndexState> {
...
@@ -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 层使用
/// 获取 WebRTC 渲染器供 UI 层使用
WebrtcService
get
webrtcService
=>
_webrtcService
;
WebrtcService
get
webrtcService
=>
_webrtcService
;
...
...
lib/views/monitoring/index/cubit/monitoring_index_state.dart
View file @
701001d6
...
@@ -107,13 +107,14 @@ class MonitoringIndexState extends Equatable {
...
@@ -107,13 +107,14 @@ class MonitoringIndexState extends Equatable {
McuReport
?
latestMcuReport
,
McuReport
?
latestMcuReport
,
bool
clearBoundBluetoothDevice
=
false
,
bool
clearBoundBluetoothDevice
=
false
,
bool
clearLatestMcuReport
=
false
,
bool
clearLatestMcuReport
=
false
,
bool
clearPatientInfo
=
false
,
})
{
})
{
return
MonitoringIndexState
(
return
MonitoringIndexState
(
status:
status
??
this
.
status
,
status:
status
??
this
.
status
,
isLoading:
isLoading
??
this
.
isLoading
,
isLoading:
isLoading
??
this
.
isLoading
,
error:
error
??
this
.
error
,
error:
error
??
this
.
error
,
metrics:
metrics
??
this
.
metrics
,
metrics:
metrics
??
this
.
metrics
,
patientInfo:
patientInfo
??
this
.
patientInfo
,
patientInfo:
clearPatientInfo
?
null
:
patientInfo
??
this
.
patientInfo
,
alerts:
alerts
??
this
.
alerts
,
alerts:
alerts
??
this
.
alerts
,
videoConnectionState:
videoConnectionState
??
this
.
videoConnectionState
,
videoConnectionState:
videoConnectionState
??
this
.
videoConnectionState
,
videoStreamMode:
videoStreamMode
??
this
.
videoStreamMode
,
videoStreamMode:
videoStreamMode
??
this
.
videoStreamMode
,
...
...
lib/views/monitoring/index/monitoring_index_view.dart
View file @
701001d6
...
@@ -98,7 +98,11 @@ class _MonitoringIndexContentState extends State<MonitoringIndexContent> {
...
@@ -98,7 +98,11 @@ class _MonitoringIndexContentState extends State<MonitoringIndexContent> {
children:
[
children:
[
Expanded
(
Expanded
(
flex:
26
,
flex:
26
,
child:
MonitoringPetInfoCard
(
patientInfo:
state
.
patientInfo
),
child:
MonitoringPetInfoCard
(
patientInfo:
state
.
patientInfo
,
onExit:
()
=>
_monitoringIndexCubit
.
clearPatientInfo
(),
onBindPet:
()
=>
_monitoringIndexCubit
.
setTestPatientInfo
(),
),
),
),
SizedBox
(
width:
24
.
w
),
SizedBox
(
width:
24
.
w
),
Expanded
(
Expanded
(
...
...
lib/views/monitoring/index/widgets/monitoring_metric_card.dart
View file @
701001d6
...
@@ -2,8 +2,7 @@ import 'package:flutter/material.dart';
...
@@ -2,8 +2,7 @@ import 'package:flutter/material.dart';
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:flutter_switch/flutter_switch.dart'
;
import
'package:flutter_switch/flutter_switch.dart'
;
import
'package:laki_icu_app/models/bo/monitoring_bo.dart'
;
import
'package:laki_icu_app/models/bo/monitoring_bo.dart'
;
import
'monitoring_panel.dart'
;
class
MonitoringMetricCard
extends
StatelessWidget
{
class
MonitoringMetricCard
extends
StatelessWidget
{
final
MonitoringMetricBO
metric
;
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
This diff is collapsed.
Click to expand it.
lib/views/monitoring/index/widgets/monitoring_video_card.dart
View file @
701001d6
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'monitoring_panel.dart'
;
class
MonitoringVideoCard
extends
StatelessWidget
{
class
MonitoringVideoCard
extends
StatelessWidget
{
const
MonitoringVideoCard
({
super
.
key
});
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