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
a35340e1
Commit
a35340e1
authored
Jun 25, 2026
by
张宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
222
parent
7a77a537
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
15 deletions
+50
-15
alert_box_bg_2.png
lib/assets/monitoring/alert_box_bg_2.png
+0
-0
monitoring_mock_data.dart
lib/repositories/mock/monitoring_mock_data.dart
+12
-0
monitoring_index_cubit.dart
lib/views/monitoring/index/cubit/monitoring_index_cubit.dart
+1
-1
monitoring_index_state.dart
lib/views/monitoring/index/cubit/monitoring_index_state.dart
+4
-1
monitoring_index_view.dart
lib/views/monitoring/index/monitoring_index_view.dart
+3
-1
monitoring_alert_card.dart
...views/monitoring/index/widgets/monitoring_alert_card.dart
+13
-2
monitoring_alert_detail_dialog.dart
...itoring/index/widgets/monitoring_alert_detail_dialog.dart
+17
-10
No files found.
lib/assets/monitoring/alert_box_bg_2.png
View replaced file @
7a77a537
View file @
a35340e1
This diff is collapsed.
Click to expand it.
lib/repositories/mock/monitoring_mock_data.dart
View file @
a35340e1
...
...
@@ -65,6 +65,18 @@ class MonitoringMockData {
static
List
<
AlertInfoBO
>
getMockAlerts
()
{
return
const
[
AlertInfoBO
(
title:
'设备告警'
,
description:
'温度高于阈值26℃,当前温度29℃'
,
time:
'2026-05-04 16:22:49'
,
status:
'待处理'
,
),
AlertInfoBO
(
title:
'温度异常'
,
description:
'2023年2月,华为云集中发布了三款软件开发工具:需求管理服务 CodeArts Req、测试管理服务 CodeArts TestPlan、代码检查服务 CodeArts Check。随着 CodeArts 不断的丰富与发展,华为云在 DevSecOps 领域的布局又迈出了稳健的一步。 [22]2023年2月14日,华为云发布分布式编译构建系统 CodeArts Build,旨在支撑企业实现高效的软件开发,缩短产品上市周期,帮助企业的软件产品快速形成关键竞争力。'
,
time:
'2026-05-04 16:22:49'
,
status:
'已处理'
,
),
AlertInfoBO
(
title:
'温度异常'
,
description:
'温度高于阈值26℃,当前温度29℃'
,
time:
'2026-05-04 16:22:49'
,
...
...
lib/views/monitoring/index/cubit/monitoring_index_cubit.dart
View file @
a35340e1
...
...
@@ -1039,7 +1039,7 @@ class MonitoringIndexCubit extends Cubit<MonitoringIndexState> {
/// 清除选中的告警(用于关闭弹窗)
void
clearSelectedAlert
()
{
if
(
isClosed
)
return
;
emit
(
state
.
copyWith
(
selectedAlert:
null
));
emit
(
state
.
copyWith
(
clearSelectedAlert:
true
));
}
/// 标记告警为已处理
...
...
lib/views/monitoring/index/cubit/monitoring_index_state.dart
View file @
a35340e1
...
...
@@ -145,6 +145,7 @@ class MonitoringIndexState extends Equatable {
bool
clearLatestMcuReport
=
false
,
bool
clearPatientInfo
=
false
,
bool
clearMqttDeviceSn
=
false
,
bool
clearSelectedAlert
=
false
,
})
{
return
MonitoringIndexState
(
status:
status
??
this
.
status
,
...
...
@@ -182,7 +183,9 @@ class MonitoringIndexState extends Equatable {
clearMqttDeviceSn
?
null
:
mqttDeviceSn
??
this
.
mqttDeviceSn
,
cabinCameraSn:
cabinCameraSn
??
this
.
cabinCameraSn
,
cabinWifiPwd:
cabinWifiPwd
??
this
.
cabinWifiPwd
,
selectedAlert:
selectedAlert
??
this
.
selectedAlert
,
selectedAlert:
clearSelectedAlert
?
null
:
selectedAlert
??
this
.
selectedAlert
,
);
}
...
...
lib/views/monitoring/index/monitoring_index_view.dart
View file @
a35340e1
...
...
@@ -271,7 +271,9 @@ class _MonitoringIndexContentState extends State<MonitoringIndexContent> {
value:
_monitoringIndexCubit
,
child:
MonitoringAlertDetailDialog
(
alert:
alert
),
),
).
then
((
_
)
{
).
whenComplete
(()
{
// 使用 whenComplete 替代 then,确保无论 Future 成功或失败都会清理状态,
// 防止 _currentDialogAlert 锁死导致后续点击永远无法弹出 dialog
_currentDialogAlert
=
null
;
_monitoringIndexCubit
.
clearSelectedAlert
();
});
...
...
lib/views/monitoring/index/widgets/monitoring_alert_card.dart
View file @
a35340e1
...
...
@@ -75,13 +75,24 @@ class MonitoringAlertCard extends StatelessWidget {
itemBuilder:
(
context
,
index
)
{
final
item
=
alerts
[
index
];
final
pending
=
item
.
status
.
contains
(
'待处理'
);
return
_buildAlertItem
(
context
,
item
,
pending
);
return
_buildAlertItem
(
context
,
item
,
pending
,
key:
ValueKey
(
'
${item.title}
_
${item.time}
_
$index
'
),
);
},
);
}
Widget
_buildAlertItem
(
BuildContext
context
,
AlertInfoBO
item
,
bool
pending
)
{
Widget
_buildAlertItem
(
BuildContext
context
,
AlertInfoBO
item
,
bool
pending
,
{
Key
?
key
,
})
{
return
InkWell
(
key:
key
,
onTap:
()
=>
context
.
read
<
MonitoringIndexCubit
>().
selectAlert
(
item
),
borderRadius:
BorderRadius
.
circular
(
16
.
r
),
child:
IntrinsicHeight
(
...
...
lib/views/monitoring/index/widgets/monitoring_alert_detail_dialog.dart
View file @
a35340e1
...
...
@@ -33,15 +33,23 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
),
borderRadius:
BorderRadius
.
circular
(
20
.
r
),
),
child:
Column
(
child:
Stack
(
children:
[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
_buildHeader
(),
SizedBox
(
height:
30
.
h
),
_buildContent
(
context
),
_buildDesc
(),
SizedBox
(
height:
60
.
h
),
_buildBottomButtons
(
context
),
],
),
Positioned
(
left:
0
,
right:
0
,
bottom:
40
.
h
,
child:
_buildBottomButtons
(
context
),
),
],
),
);
...
...
@@ -64,7 +72,7 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
Text
(
'告警详情'
,
style:
TextStyle
(
color:
const
Color
(
0xFF00D4FF
)
,
color:
Colors
.
white
,
fontSize:
28
.
sp
,
fontWeight:
FontWeight
.
bold
,
),
...
...
@@ -142,15 +150,14 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
width:
double
.
infinity
,
padding:
EdgeInsets
.
only
(
left:
60
.
w
,
right:
60
.
w
),
decoration:
BoxDecoration
(
border:
Border
.
all
(
color:
Colors
.
red
,
width:
1
.
w
,
),
//
border: Border.all(
//
color: Colors.red,
//
width: 1.w,
//
),
),
child:
SingleChildScrollView
(
child:
Text
(
// alert.description,
"2023年2月,华为云集中发布了三款软件开发工具:需求管理服务 CodeArts Req、测试管理服务 CodeArts TestPlan、代码检查服务 CodeArts Check。随着 CodeArts 不断的丰富与发展,华为云在 DevSecOps 领域的布局又迈出了稳健的一步。 [22]2023年2月14日,华为云发布分布式编译构建系统 CodeArts Build,旨在支撑企业实现高效的软件开发,缩短产品上市周期,帮助企业的软件产品快速形成关键竞争力。"
,
alert
.
description
,
style:
TextStyle
(
color:
Color
(
0xFFB1F0FF
),
fontSize:
24
.
sp
,
...
...
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