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
70c95cd5
Commit
70c95cd5
authored
Jun 11, 2026
by
张宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1111111111111
parent
a8c199a0
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
14 deletions
+13
-14
device_topology_repository.dart
lib/repositories/device_topology_repository.dart
+3
-3
app_router.gr.dart
lib/routes/app_router.gr.dart
+4
-5
device_topology_service.dart
lib/services/device_topology_service.dart
+1
-1
inspection_device_view.dart
lib/views/home/inspection_device/inspection_device_view.dart
+1
-1
inspection_topology_cubit.dart
.../inspection_topology/cubit/inspection_topology_cubit.dart
+2
-2
inspection_topology_view.dart
...ws/home/inspection_topology/inspection_topology_view.dart
+2
-2
No files found.
lib/repositories/device_topology_repository.dart
View file @
70c95cd5
...
...
@@ -4,10 +4,10 @@ import '../models/bo/device_topology_bo.dart';
class
DeviceTopologyRepository
{
/// 获取设备拓扑
Future
<
ResponseModel
<
DeviceTopologyBO
>>
getTopology
({
required
int
deviceId
})
{
return
DioRequest
.
instance
.
pos
t
<
DeviceTopologyBO
>(
Future
<
ResponseModel
<
DeviceTopologyBO
>>
getTopology
({
required
String
deviceId
})
{
return
DioRequest
.
instance
.
ge
t
<
DeviceTopologyBO
>(
'/app/device/topology'
,
data
:
{
'deviceId'
:
deviceId
},
queryParameters
:
{
'deviceId'
:
deviceId
},
fromJsonT:
(
data
)
=>
DeviceTopologyBO
.
fromJson
(
data
as
Map
<
String
,
dynamic
>),
);
...
...
lib/routes/app_router.gr.dart
View file @
70c95cd5
...
...
@@ -120,8 +120,7 @@ abstract class $AppRouter extends _i21.RootStackRouter {
);
},
InspectionTopologyRoute
.
name
:
(
routeData
)
{
final
args
=
routeData
.
argsAs
<
InspectionTopologyRouteArgs
>(
orElse:
()
=>
const
InspectionTopologyRouteArgs
());
final
args
=
routeData
.
argsAs
<
InspectionTopologyRouteArgs
>();
return
_i21
.
AutoRoutePage
<
dynamic
>(
routeData:
routeData
,
child:
_i9
.
InspectionTopologyView
(
...
...
@@ -433,7 +432,7 @@ class InspectionTopologyRoute
extends
_i21
.
PageRouteInfo
<
InspectionTopologyRouteArgs
>
{
InspectionTopologyRoute
({
_i22
.
Key
?
key
,
int
deviceId
=
0
,
required
String
deviceId
,
List
<
_i21
.
PageRouteInfo
>?
children
,
})
:
super
(
InspectionTopologyRoute
.
name
,
...
...
@@ -453,12 +452,12 @@ class InspectionTopologyRoute
class
InspectionTopologyRouteArgs
{
const
InspectionTopologyRouteArgs
({
this
.
key
,
this
.
deviceId
=
0
,
required
this
.
deviceId
,
});
final
_i22
.
Key
?
key
;
final
int
deviceId
;
final
String
deviceId
;
@override
String
toString
()
{
...
...
lib/services/device_topology_service.dart
View file @
70c95cd5
...
...
@@ -7,7 +7,7 @@ class DeviceTopologyService {
DeviceTopologyService
({
required
DeviceTopologyRepository
repository
})
:
_repository
=
repository
;
Future
<
DeviceTopologyBO
>
getTopology
({
required
int
deviceId
})
async
{
Future
<
DeviceTopologyBO
>
getTopology
({
required
String
deviceId
})
async
{
final
result
=
await
_repository
.
getTopology
(
deviceId:
deviceId
);
if
(
result
.
success
&&
result
.
data
!=
null
)
{
return
result
.
data
!;
...
...
lib/views/home/inspection_device/inspection_device_view.dart
View file @
70c95cd5
...
...
@@ -41,7 +41,7 @@ class InspectionDeviceView extends StatelessWidget {
),
title:
GestureDetector
(
onTap:
()
{
context
.
pushRoute
(
InspectionTopologyRoute
());
context
.
pushRoute
(
InspectionTopologyRoute
(
deviceId:
deviceId
));
},
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
end
,
...
...
lib/views/home/inspection_topology/cubit/inspection_topology_cubit.dart
View file @
70c95cd5
...
...
@@ -7,11 +7,11 @@ import 'inspection_topology_state.dart';
class
InspectionTopologyCubit
extends
Cubit
<
InspectionTopologyState
>
{
final
DeviceTopologyService
_service
;
final
int
_deviceId
;
final
String
_deviceId
;
InspectionTopologyCubit
({
DeviceTopologyService
?
service
,
required
int
deviceId
,
required
String
deviceId
,
})
:
_service
=
service
??
DeviceTopologyService
(
repository:
DeviceTopologyRepository
(),
...
...
lib/views/home/inspection_topology/inspection_topology_view.dart
View file @
70c95cd5
...
...
@@ -11,9 +11,9 @@ import 'widget/device_detail_dialog.dart';
@RoutePage
()
class
InspectionTopologyView
extends
StatelessWidget
{
final
int
deviceId
;
final
String
deviceId
;
const
InspectionTopologyView
({
super
.
key
,
this
.
deviceId
=
0
});
const
InspectionTopologyView
({
super
.
key
,
required
this
.
deviceId
});
@override
Widget
build
(
BuildContext
context
)
{
...
...
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