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
9cd24522
Commit
9cd24522
authored
Jun 24, 2026
by
张宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2222
parent
53839dd5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
monitoring_index_view.dart
lib/views/monitoring/index/monitoring_index_view.dart
+10
-5
monitoring_alert_detail_dialog.dart
...itoring/index/widgets/monitoring_alert_detail_dialog.dart
+1
-1
No files found.
lib/views/monitoring/index/monitoring_index_view.dart
View file @
9cd24522
...
...
@@ -41,7 +41,8 @@ class MonitoringIndexContent extends StatefulWidget {
class
_MonitoringIndexContentState
extends
State
<
MonitoringIndexContent
>
{
late
final
MonitoringIndexCubit
_monitoringIndexCubit
;
StreamSubscription
<
OpenBluetoothScanEvent
>?
_bluetoothScanEventSub
;
bool
_isAlertDialogShowing
=
false
;
/// 正在弹出框展示的告警,为空表示当前没有弹窗
AlertInfoBO
?
_currentDialogAlert
;
@override
void
initState
()
{
...
...
@@ -62,11 +63,11 @@ class _MonitoringIndexContentState extends State<MonitoringIndexContent> {
@override
Widget
build
(
BuildContext
context
)
{
return
BlocListener
<
MonitoringIndexCubit
,
MonitoringIndexState
>(
listenWhen:
(
previous
,
current
)
=>
current
.
selectedAlert
!=
null
&&
current
.
selectedAlert
!=
previous
.
selectedAlert
,
listener:
(
context
,
state
)
{
if
(
state
.
selectedAlert
!=
null
&&
!
_isAlertDialogShowing
)
{
_isAlertDialogShowing
=
true
;
_showAlertDetailDialog
(
state
.
selectedAlert
!);
}
},
child:
BlocBuilder
<
MonitoringIndexCubit
,
MonitoringIndexState
>(
builder:
(
context
,
state
)
{
...
...
@@ -260,6 +261,10 @@ class _MonitoringIndexContentState extends State<MonitoringIndexContent> {
}
void
_showAlertDetailDialog
(
AlertInfoBO
alert
)
{
// 已有弹窗在展示,忽略新的请求
if
(
_currentDialogAlert
!=
null
)
return
;
_currentDialogAlert
=
alert
;
showDialog
<
void
>(
context:
context
,
builder:
(
_
)
=>
BlocProvider
.
value
(
...
...
@@ -267,7 +272,7 @@ class _MonitoringIndexContentState extends State<MonitoringIndexContent> {
child:
MonitoringAlertDetailDialog
(
alert:
alert
),
),
).
then
((
_
)
{
_
isAlertDialogShowing
=
false
;
_
currentDialogAlert
=
null
;
_monitoringIndexCubit
.
clearSelectedAlert
();
});
}
...
...
lib/views/monitoring/index/widgets/monitoring_alert_detail_dialog.dart
View file @
9cd24522
...
...
@@ -48,7 +48,7 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
Widget
_buildHeader
()
{
return
Container
(
padding:
EdgeInsets
.
fromLTRB
(
40
.
w
,
24
.
h
,
40
.
w
,
2
4
.
h
),
padding:
EdgeInsets
.
fromLTRB
(
40
.
w
,
34
.
h
,
40
.
w
,
3
4
.
h
),
decoration:
const
BoxDecoration
(
// border: Border(
// bottom: BorderSide(
...
...
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