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
4a218b88
Commit
4a218b88
authored
Jun 12, 2026
by
张宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
612
parent
e9fe298f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
21 deletions
+55
-21
app_router.dart
lib/routes/app_router.dart
+21
-1
inspection_history_cubit.dart
...me/inspection_history/cubit/inspection_history_cubit.dart
+17
-1
inspection_record_item.dart
...ome/inspection_history/widget/inspection_record_item.dart
+15
-17
对接方案.md
对接方案.md
+2
-2
No files found.
lib/routes/app_router.dart
View file @
4a218b88
...
...
@@ -12,29 +12,49 @@ class AppRouter extends $AppRouter {
@override
List
<
AutoRoute
>
get
routes
=>
[
// LoginRoute / LoginView(登录页)
AutoRoute
(
page:
LoginRoute
.
page
,
initial:
true
),
// DefaultLayoutRoute / DefaultLayoutView(默认布局页/主框架)
AutoRoute
(
page:
DefaultLayoutRoute
.
page
,
children:
[
// HomeRoute / HomeView(首页)
AutoRoute
(
page:
HomeRoute
.
page
,
initial:
true
),
// ServiceIndexRoute / ServiceIndexView(服务首页/客房服务看板)
AutoRoute
(
page:
ServiceIndexRoute
.
page
),
// ReportIndexRoute / ReportIndexView(报表首页)
AutoRoute
(
page:
ReportIndexRoute
.
page
),
// ProfileRoute / ProfileView(我的/个人中心)
AutoRoute
(
page:
ProfileRoute
.
page
),
],
),
// SearchRoute / SearchView(搜索页)
AutoRoute
(
page:
SearchRoute
.
page
),
// AbnormalDetailRoute / AbnormalDetailView(异常详情页)
AutoRoute
(
page:
AbnormalDetailRoute
.
page
),
AutoRoute
(
page:
DeviceDetailRoute
.
page
),
// DeviceDetailRoute / DeviceDetailView(设备详情页)
AutoRoute
(
page:
DeviceDetailRoute
.
page
),
// ServiceRoomDetailRoute / ServiceRoomDetailView(服务-房间详情页)
AutoRoute
(
page:
ServiceRoomDetailRoute
.
page
),
// ReportEnergyDetailRoute / ReportEnergyDetailView(报表-能耗详情页)
AutoRoute
(
page:
ReportEnergyDetailRoute
.
page
),
// ReportRoomDetailRoute / ReportRoomDetailView(报表-房间详情页)
AutoRoute
(
page:
ReportRoomDetailRoute
.
page
),
// ServiceDeviceDetailRoute / ServiceDeviceDetailView(服务-设备详情页)
AutoRoute
(
page:
ServiceDeviceDetailRoute
.
page
),
// InspectionDetailRoute / InspectionDetailView(巡检详情页)
AutoRoute
(
page:
InspectionDetailRoute
.
page
),
// InspectionDeviceRoute / InspectionDeviceView(巡检设备页)
AutoRoute
(
page:
InspectionDeviceRoute
.
page
),
// InspectionHistoryRoute / InspectionHistoryView(巡检历史页)
AutoRoute
(
page:
InspectionHistoryRoute
.
page
),
// AbnormalListRoute / AbnormalListView(异常列表页)
AutoRoute
(
page:
AbnormalListRoute
.
page
),
// ReportRuleManagementRoute / ReportRuleManagementView(报表-联动规则管理页)
AutoRoute
(
page:
ReportRuleManagementRoute
.
page
),
// ReportDeviceListRoute / ReportDeviceListView(报表-设备列表页)
AutoRoute
(
page:
ReportDeviceListRoute
.
page
),
// InspectionTopologyRoute / InspectionTopologyView(巡检拓扑页)
AutoRoute
(
page:
InspectionTopologyRoute
.
page
),
];
}
lib/views/home/inspection_history/cubit/inspection_history_cubit.dart
View file @
4a218b88
...
...
@@ -39,7 +39,7 @@ class InspectionHistoryCubit extends Cubit<InspectionHistoryState> {
deviceName:
result
.
deviceInfo
.
deviceName
,
inspectorName:
row
.
inspectorName
,
inspectionTime:
row
.
inspectTime
,
result:
row
.
inspectStatus
,
result:
_getInspectStatusText
(
row
.
inspectStatus
)
,
remark:
row
.
remark
,
items:
row
.
itemsDetail
.
map
((
item
)
=>
InspectionItemRecord
(
...
...
@@ -51,4 +51,19 @@ class InspectionHistoryCubit extends Cubit<InspectionHistoryState> {
);
}).
toList
();
}
String
_getInspectStatusText
(
String
status
)
{
switch
(
status
)
{
case
'0'
:
return
'巡检中'
;
case
'1'
:
return
'不通过'
;
case
'2'
:
return
'通过'
;
case
'3'
:
return
'警告'
;
default
:
return
status
;
}
}
}
\ No newline at end of file
lib/views/home/inspection_history/widget/inspection_record_item.dart
View file @
4a218b88
...
...
@@ -158,18 +158,18 @@ class InspectionRecordItem extends StatelessWidget {
spacing:
8
.
w
,
runSpacing:
8
.
h
,
children:
[
...
record
.
items
.
map
((
item
)
=>
_buildItemTag
(
item
)).
toList
(
),
...
record
.
items
.
take
(
3
).
map
((
item
)
=>
_buildItemTag
(
item
)
),
if
(
record
.
items
.
length
>
3
)
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
1
2
.
w
,
vertical:
6
.
h
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
1
4
.
w
,
vertical:
8
.
h
),
decoration:
BoxDecoration
(
color:
const
Color
.
fromRGBO
(
242
,
24
3
,
245
,
1.0
),
borderRadius:
BorderRadius
.
circular
(
1
6
.
r
),
color:
const
Color
.
fromRGBO
(
242
,
24
5
,
249
,
1.0
),
borderRadius:
BorderRadius
.
circular
(
1
8
.
r
),
),
child:
Text
(
'+
${record.items.length - 3}
'
,
style:
TextStyle
(
fontSize:
2
0
.
sp
,
fontSize:
2
2
.
sp
,
color:
const
Color
.
fromRGBO
(
100
,
116
,
139
,
1.0
),
),
),
...
...
@@ -182,30 +182,28 @@ class InspectionRecordItem extends StatelessWidget {
}
Widget
_buildItemTag
(
InspectionItemRecord
item
)
{
final
resultColor
=
_getResultColor
(
item
.
result
);
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
1
2
.
w
,
vertical:
6
.
h
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
1
4
.
w
,
vertical:
8
.
h
),
decoration:
BoxDecoration
(
color:
_getResultColor
(
item
.
result
).
withOpacity
(
0.1
),
borderRadius:
BorderRadius
.
circular
(
16
.
r
),
border:
Border
.
all
(
color:
_getResultColor
(
item
.
result
),
width:
1
.
w
,
),
color:
Color
.
fromRGBO
(
209
,
250
,
229
,
1.0
),
// resultColor.withValues(alpha: 0.18),
borderRadius:
BorderRadius
.
circular
(
18
.
r
),
),
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
Icon
(
_getResultIcon
(
item
.
result
),
color:
_getResultColor
(
item
.
result
)
,
size:
1
6
.
sp
,
color:
resultColor
,
size:
1
8
.
sp
,
),
SizedBox
(
width:
4
.
w
),
SizedBox
(
width:
6
.
w
),
Text
(
item
.
name
,
style:
TextStyle
(
fontSize:
2
0
.
sp
,
color:
_getResultColor
(
item
.
result
)
,
fontSize:
2
2
.
sp
,
color:
resultColor
,
),
),
],
...
...
对接方案.md
View file @
4a218b88
# 智慧酒
店 App 接口对接方案
# 智慧酒
店 App 接口对接方案
...
...
@@ -1374,7 +1374,7 @@ class xxxBO extends Equatable {
"inspectId": 0,
"inspectorName": "string",
"inspectTime": "string",
"inspectStatus": "string",
"inspectStatus": "string",
// 巡检整体结果状态码:0=巡检中 1=不通过(×红色) 2=通过(✓绿色) 3=警告(⚠黄色)
"remark": "string",
"itemsDetail": [ // 巡检项明细列表
{
...
...
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