Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart_hotel_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
张宏
smart_hotel_app
Commits
93ea6fa5
Commit
93ea6fa5
authored
Jun 11, 2026
by
张宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
28c64984
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
5 deletions
+12
-5
alert_detail_bo.dart
lib/models/bo/alert_detail_bo.dart
+1
-1
device_control_bo.dart
lib/models/bo/device_control_bo.dart
+3
-3
device_cubit.dart
lib/views/home/device/cubit/device_cubit.dart
+2
-1
temperature_block.dart
lib/views/home/index/widget/temperature_block.dart
+3
-0
voltage_operate_block.dart
lib/views/home/index/widget/voltage_operate_block.dart
+3
-0
No files found.
lib/models/bo/alert_detail_bo.dart
View file @
93ea6fa5
...
...
@@ -69,7 +69,7 @@ class AlertBasicInfoBO extends Equatable {
alertCount:
json
[
'alertCount'
]
as
int
?
??
0
,
alertTime:
json
[
'alertTime'
]
as
String
?
??
''
,
alertIcon:
json
[
'alertIcon'
]
as
String
?
??
''
,
alertDeviceId:
json
[
'alertDeviceId'
]
as
String
?
??
''
,
alertDeviceId:
json
[
'alertDeviceId'
]
?.
toString
()
??
''
,
);
}
...
...
lib/models/bo/device_control_bo.dart
View file @
93ea6fa5
...
...
@@ -28,7 +28,7 @@ class DeviceBasicInfoBO {
final
int
deviceId
;
final
String
deviceName
;
final
String
deviceCode
;
final
String
roomName
;
final
String
deviceLocation
;
final
String
deviceTypeIcon
;
final
String
onlineStatus
;
...
...
@@ -36,7 +36,7 @@ class DeviceBasicInfoBO {
required
this
.
deviceId
,
required
this
.
deviceName
,
required
this
.
deviceCode
,
required
this
.
roomName
,
required
this
.
deviceLocation
,
required
this
.
deviceTypeIcon
,
required
this
.
onlineStatus
,
});
...
...
@@ -46,7 +46,7 @@ class DeviceBasicInfoBO {
deviceId:
json
[
'deviceId'
]
as
int
?
??
0
,
deviceName:
json
[
'deviceName'
]
as
String
?
??
''
,
deviceCode:
json
[
'deviceCode'
]
as
String
?
??
''
,
roomName:
json
[
'roomName
'
]
as
String
?
??
''
,
deviceLocation:
json
[
'deviceLocation
'
]
as
String
?
??
''
,
deviceTypeIcon:
json
[
'deviceTypeIcon'
]
as
String
?
??
''
,
onlineStatus:
json
[
'onlineStatus'
]
as
String
?
??
''
,
);
...
...
lib/views/home/device/cubit/device_cubit.dart
View file @
93ea6fa5
...
...
@@ -46,7 +46,8 @@ class DeviceCubit extends Cubit<DeviceState> {
return
DeviceInfo
(
deviceName:
basic
.
deviceName
,
deviceId:
basic
.
deviceCode
,
location:
basic
.
roomName
,
// location: basic.roomName,
location:
basic
.
deviceLocation
,
status:
status
,
voltage:
params
.
voltage
,
current:
params
.
current
,
...
...
lib/views/home/index/widget/temperature_block.dart
View file @
93ea6fa5
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:smart_hotel_app/repositories/alert_detail_repository.dart'
;
import
'package:smart_hotel_app/services/alert_detail_service.dart'
;
import
'package:smart_hotel_app/views/home/index/cubit/home_index_cubit.dart'
;
class
TemperatureBlock
extends
StatelessWidget
{
final
int
alertId
;
...
...
@@ -340,6 +342,7 @@ class TemperatureBlock extends StatelessWidget {
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
const
SnackBar
(
content:
Text
(
'操作成功'
)),
);
context
.
read
<
HomeIndexCubit
>().
reloadDashboard
();
}
}
catch
(
e
)
{
if
(
context
.
mounted
)
{
...
...
lib/views/home/index/widget/voltage_operate_block.dart
View file @
93ea6fa5
import
'package:auto_route/auto_route.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:smart_hotel_app/repositories/alert_detail_repository.dart'
;
import
'package:smart_hotel_app/routes/app_router.gr.dart'
;
import
'package:smart_hotel_app/services/alert_detail_service.dart'
;
import
'package:smart_hotel_app/views/home/index/cubit/home_index_cubit.dart'
;
class
VoltageOperateBlock
extends
StatelessWidget
{
final
int
alertId
;
...
...
@@ -279,6 +281,7 @@ class VoltageOperateBlock extends StatelessWidget {
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
const
SnackBar
(
content:
Text
(
'操作成功'
)),
);
context
.
read
<
HomeIndexCubit
>().
reloadDashboard
();
}
}
catch
(
e
)
{
if
(
context
.
mounted
)
{
...
...
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