Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
special_equipment_flutter
Overview
Overview
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
吴春元
special_equipment_flutter
Commits
be51012f
Commit
be51012f
authored
May 27, 2024
by
吴春元
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 修改
parent
f8c76167
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
216 additions
and
46 deletions
+216
-46
api.dart
lib/dio/api.dart
+2
-2
http_utils.dart
lib/dio/http_utils.dart
+31
-0
net_utils.dart
lib/dio/net_utils.dart
+2
-0
unit_person_list_bo.dart
lib/model/exam/unit_person_list_bo.dart
+2
-0
exam_page.dart
lib/ui/examine/exam/exam_page.dart
+39
-7
exam_result_page.dart
lib/ui/examine/exam/exam_result_page.dart
+50
-13
test_page.dart
lib/ui/examine/test/test_page.dart
+39
-9
tab_home_page.dart
lib/ui/main/tab_home_page.dart
+15
-5
overseer_history_details_page.dart
lib/ui/overseer/overseer_history_details_page.dart
+19
-9
overseer_history_list_page.dart
lib/ui/overseer/overseer_history_list_page.dart
+11
-1
overseer_settings_page.dart
lib/ui/overseer/overseer_settings_page.dart
+0
-0
time_util.dart
lib/utils/time_util.dart
+6
-0
No files found.
lib/dio/api.dart
View file @
be51012f
...
...
@@ -7,11 +7,11 @@ class Api {
// IS_DEBUG ? "https://special.sxyztech.cn/" : "http://192.168.19.165:2212/";
///演示 ip
//
static String URL = "http://47.92.138.92:8009/";
static
String
URL
=
"http://47.92.138.92:8009/"
;
// static String URL = "http://192.168.19.164:8087/";
static
String
URL
=
"http://192.168.19.165:2212/"
;
//
static String URL = "http://192.168.19.165:2212/";
static
String
START_URL
=
"special/a/"
,
END_URL
=
"__ajax=true&mobileLogin=true"
;
...
...
lib/dio/http_utils.dart
View file @
be51012f
...
...
@@ -4,6 +4,7 @@ import 'dart:developer';
import
'package:dio/dio.dart'
;
import
'package:flutter/material.dart'
;
import
'package:get/route_manager.dart'
;
import
'package:special_equipment_flutter/dio/dio/do_utils.dart'
;
import
'package:special_equipment_flutter/model/app_is_open.dart'
;
import
'package:special_equipment_flutter/model/app_roles.dart'
;
...
...
@@ -44,6 +45,7 @@ import 'package:special_equipment_flutter/model/upload_multifile.dart';
import
'package:special_equipment_flutter/model/user_list.dart'
;
import
'package:special_equipment_flutter/model/week_control_list_sy_bo.dart'
;
import
'package:special_equipment_flutter/ui/common/data.dart'
;
import
'package:special_equipment_flutter/utils/eventbus_utils.dart'
;
import
'package:special_equipment_flutter/utils/storage_util.dart'
;
import
'package:special_equipment_flutter/utils/toast_utils.dart'
;
...
...
@@ -1238,6 +1240,7 @@ class HttpUtils {
'交卷中'
);
try
{
BaseModel
entity
=
BaseModel
.
fromJson
(
response
);
if
(
entity
.
success
!)
{
Map
<
String
,
dynamic
>
resultData
=
entity
.
body
;
ExamResultBo
examResultBo
=
ExamResultBo
.
fromJson
(
resultData
);
if
(
entity
.
errorCode
==
"-1"
)
{
...
...
@@ -1246,6 +1249,34 @@ class HttpUtils {
ToastUtils
.
showCenter
(
entity
.
msg
!);
return
;
}
}
else
{
showDialog
(
context:
context
,
barrierDismissible:
false
,
builder:
(
context
)
{
return
AlertDialog
(
title:
const
Text
(
"温馨提示"
),
content:
Text
(
entity
.
msg
!),
actionsPadding:
const
EdgeInsets
.
only
(
left:
0
,
top:
0
,
bottom:
10
,
right:
20
),
contentPadding:
const
EdgeInsets
.
only
(
left:
20
,
top:
0
,
bottom:
10
,
right:
20
),
titlePadding:
const
EdgeInsets
.
only
(
left:
20
,
top:
20
,
bottom:
10
,
right:
20
),
actions:
[
TextButton
(
child:
const
Text
(
"确定"
),
onPressed:
()
{
//发出通知
EventBusUtils
.
getInstance
()?.
fire
(
"1"
);
Get
.
back
();
Get
.
back
();
})
],
);
});
return
;
}
}
catch
(
e
)
{
log
(
e
.
toString
());
return
{
"message"
:
e
.
toString
()};
...
...
lib/dio/net_utils.dart
View file @
be51012f
...
...
@@ -162,8 +162,10 @@ class NetUtils {
ToastUtils
.
showCenter
(
entity
.
msg
!);
}
}
else
{
if
(
entity
.
msg
!=
'试卷已被安全监察人员删除,请查看是否有新试卷!'
)
{
ToastUtils
.
showCenter
(
entity
.
msg
!);
}
}
isLoading
?
Loading
.
dismiss
()
:
null
;
return
response
.
data
;
}
on
DioError
catch
(
e
)
{
...
...
lib/model/exam/unit_person_list_bo.dart
View file @
be51012f
...
...
@@ -53,6 +53,8 @@ class UserLists {
String
?
roleNames
;
bool
?
admin
;
bool
?
isChecked
=
false
;
bool
?
isUserSafetyDirectorChecked
=
true
;
bool
?
isUserSafetyOfficerChecked
=
true
;
UserLists
copyWith
({
String
?
id
,
...
...
lib/ui/examine/exam/exam_page.dart
View file @
be51012f
...
...
@@ -108,7 +108,39 @@ class ExamPageState extends State<ExamPage> with TickerProviderStateMixin {
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
WillPopScope
(
onWillPop:
()
async
{
Get
.
dialog
(
AlertDialog
(
title:
const
Text
(
"温馨提示"
),
content:
const
Text
(
"您确定要结束当前考试?"
),
actionsPadding:
const
EdgeInsets
.
only
(
left:
0
,
top:
0
,
bottom:
10
,
right:
20
),
contentPadding:
const
EdgeInsets
.
only
(
left:
20
,
top:
0
,
bottom:
10
,
right:
20
),
titlePadding:
const
EdgeInsets
.
only
(
left:
20
,
top:
20
,
bottom:
10
,
right:
20
),
shape:
const
RoundedRectangleBorder
(
// 这里设置shape属性
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
10.0
))),
actions:
<
Widget
>[
TextButton
(
child:
const
Text
(
"取消"
,
style:
TextStyle
(
fontSize:
16
)),
onPressed:
()
{
Get
.
back
();
},
),
TextButton
(
child:
const
Text
(
"确定"
,
style:
TextStyle
(
fontSize:
16
)),
onPressed:
()
{
Get
.
back
();
Get
.
back
();
},
),
],
));
return
true
;
// 控制是否可以侧滑返回,true为允许,false为不允许
},
child:
Scaffold
(
backgroundColor:
Colors
.
grey
[
100
],
appBar:
AppBarCustom
(
leading:
IconButton
(
...
...
@@ -212,7 +244,8 @@ class ExamPageState extends State<ExamPage> with TickerProviderStateMixin {
color:
ColorConst
.
blueColor
,
fontWeight:
FontWeight
.
bold
)),
TextSpan
(
text:
" /
${examQuestionList!.length}
"
,
text:
" /
${examQuestionList!.length}
"
,
style:
const
TextStyle
(
fontSize:
15
,
color:
Colors
.
black87
)),
...
...
@@ -224,8 +257,8 @@ class ExamPageState extends State<ExamPage> with TickerProviderStateMixin {
),
Container
(
height:
380
,
margin:
const
EdgeInsets
.
only
(
top:
0
,
left:
10
,
right:
10
),
margin:
const
EdgeInsets
.
only
(
top:
0
,
left:
10
,
right:
10
),
padding:
const
EdgeInsets
.
all
(
10
),
decoration:
const
BoxDecoration
(
color:
Colors
.
white
,
...
...
@@ -259,7 +292,8 @@ class ExamPageState extends State<ExamPage> with TickerProviderStateMixin {
///内容区
body:
Column
(
children:
[
buildExpanded
()]),
));
)),
);
}
Container
buildSliverToBoxAdapter
(
var
text
)
{
...
...
@@ -519,8 +553,6 @@ class ExamPageState extends State<ExamPage> with TickerProviderStateMixin {
onPressed:
()
{
//关闭弹窗
Get
.
back
();
// printLog(
// "《考核-交卷》提交json数据----->${json.encode(examineQuestionsBo)}");
HttpUtils
.
getExamSubmit
(
context
,
examineQuestionsBo
)
.
then
((
value
)
{
ExamResultBo
examResultBo
=
value
;
...
...
lib/ui/examine/exam/exam_result_page.dart
View file @
be51012f
...
...
@@ -54,10 +54,43 @@ class _ExamResultPageState extends State<ExamResultPage> {
padding:
EdgeInsets
.
zero
,
),
),
body:
Container
(
body:
Column
(
children:
[
Container
(
width:
double
.
infinity
,
margin:
const
EdgeInsets
.
only
(
left:
15
,
right:
15
,
top:
20
,
bottom:
0
),
padding:
const
EdgeInsets
.
only
(
left:
5
,
right:
5
,
top:
3
,
bottom:
3
),
decoration:
BoxDecoration
(
color:
Colors
.
orange
[
50
],
borderRadius:
const
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
5
),
topRight:
Radius
.
circular
(
5
),
bottomLeft:
Radius
.
circular
(
5
),
bottomRight:
Radius
.
circular
(
5
))),
child:
const
Text
.
rich
(
softWrap:
true
,
TextSpan
(
children:
[
TextSpan
(
text:
"小提示:考核成绩 "
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
orange
)),
TextSpan
(
text:
'90'
,
style:
TextStyle
(
fontSize:
20
,
color:
Colors
.
green
,
fontWeight:
FontWeight
.
bold
)),
TextSpan
(
text:
" 为合格"
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
orange
))
])),
),
Container
(
height:
300
,
width:
double
.
infinity
,
margin:
const
EdgeInsets
.
only
(
top:
15
,
left:
15
,
right:
15
,
bottom:
15
),
margin:
const
EdgeInsets
.
only
(
top:
5
,
left:
15
,
right:
15
,
bottom:
15
),
padding:
const
EdgeInsets
.
all
(
10
),
decoration:
const
BoxDecoration
(
color:
Colors
.
white
,
...
...
@@ -65,7 +98,6 @@ class _ExamResultPageState extends State<ExamResultPage> {
),
child:
Column
(
children:
[
const
SizedBox
(
height:
10
),
const
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
...
...
@@ -84,8 +116,9 @@ class _ExamResultPageState extends State<ExamResultPage> {
Text
(
examResultDataBo
!.
score
!.
round
().
toString
(),
style:
TextStyle
(
color:
examResultDataBo
!.
score
!
<
90
?
Colors
.
red
:
Colors
.
green
,
color:
examResultDataBo
!.
score
!
<
90
?
Colors
.
red
:
Colors
.
green
,
fontSize:
20
,
fontWeight:
FontWeight
.
bold
),
),
...
...
@@ -119,10 +152,11 @@ class _ExamResultPageState extends State<ExamResultPage> {
TextSpan
(
children:
[
const
TextSpan
(
text:
"答对 "
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
grey
)),
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
grey
)),
TextSpan
(
text:
"
${examResultDataBo!.correct.toString()}
题"
,
text:
"
${examResultDataBo!.correct.toString()}
题"
,
style:
const
TextStyle
(
fontSize:
14
,
color:
Colors
.
black87
)),
])),
...
...
@@ -132,10 +166,11 @@ class _ExamResultPageState extends State<ExamResultPage> {
TextSpan
(
children:
[
const
TextSpan
(
text:
"答错 "
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
grey
)),
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
grey
)),
TextSpan
(
text:
"
${examResultDataBo!.error.toString()}
题"
,
text:
"
${examResultDataBo!.error.toString()}
题"
,
style:
const
TextStyle
(
fontSize:
14
,
color:
Colors
.
black87
)),
])),
...
...
@@ -145,8 +180,8 @@ class _ExamResultPageState extends State<ExamResultPage> {
TextSpan
(
children:
[
const
TextSpan
(
text:
"总题 "
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
grey
)),
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
grey
)),
TextSpan
(
text:
"
${examResultDataBo!.questionNum.toString()}
题"
,
...
...
@@ -186,6 +221,8 @@ class _ExamResultPageState extends State<ExamResultPage> {
],
),
),
],
),
);
}
...
...
lib/ui/examine/test/test_page.dart
View file @
be51012f
...
...
@@ -3,17 +3,13 @@ import 'package:get/get.dart';
import
'package:sliding_up_panel/sliding_up_panel.dart'
;
import
'package:special_equipment_flutter/common/color_const.dart'
;
import
'package:special_equipment_flutter/dio/http_utils.dart'
;
import
'package:special_equipment_flutter/model/exam/exam_result_bo.dart'
;
import
'package:special_equipment_flutter/model/exam/test_questions_bo.dart'
;
import
'package:special_equipment_flutter/model/exam/test_setting_bo.dart'
;
import
'package:special_equipment_flutter/ui/examine/test/custom/bottom_sheet.dart'
;
import
'package:special_equipment_flutter/ui/examine/test/custom/choice_item.dart'
;
import
'package:special_equipment_flutter/utils/toast_utils.dart'
;
import
'package:special_equipment_flutter/widgets/app_bar/custom_app_bar_back.dart'
;
import
'package:special_equipment_flutter/widgets/custom_button.dart'
;
import
'../../../common/route_string.dart'
;
///考核答题页面
class
TestPage
extends
StatefulWidget
{
var
arguments
=
Get
.
arguments
;
...
...
@@ -85,7 +81,39 @@ class TestPageState extends State<TestPage> with TickerProviderStateMixin {
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
WillPopScope
(
onWillPop:
()
async
{
Get
.
dialog
(
AlertDialog
(
title:
const
Text
(
"温馨提示"
),
content:
const
Text
(
"您确定要结束当前练习吗?"
),
actionsPadding:
const
EdgeInsets
.
only
(
left:
0
,
top:
0
,
bottom:
10
,
right:
20
),
contentPadding:
const
EdgeInsets
.
only
(
left:
20
,
top:
0
,
bottom:
10
,
right:
20
),
titlePadding:
const
EdgeInsets
.
only
(
left:
20
,
top:
20
,
bottom:
10
,
right:
20
),
shape:
const
RoundedRectangleBorder
(
// 这里设置shape属性
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
10.0
))),
actions:
<
Widget
>[
TextButton
(
child:
const
Text
(
"取消"
,
style:
TextStyle
(
fontSize:
16
)),
onPressed:
()
{
Get
.
back
();
},
),
TextButton
(
child:
const
Text
(
"确定"
,
style:
TextStyle
(
fontSize:
16
)),
onPressed:
()
{
Get
.
back
();
Get
.
back
();
},
),
],
));
return
true
;
// 控制是否可以侧滑返回,true为允许,false为不允许
},
child:
Scaffold
(
backgroundColor:
Colors
.
white
,
appBar:
AppBarCustom
(
leading:
IconButton
(
...
...
@@ -189,7 +217,8 @@ class TestPageState extends State<TestPage> with TickerProviderStateMixin {
color:
ColorConst
.
blueColor
,
fontWeight:
FontWeight
.
bold
)),
TextSpan
(
text:
" /
${examQuestionList!.length}
"
,
text:
" /
${examQuestionList!.length}
"
,
style:
const
TextStyle
(
fontSize:
15
,
color:
Colors
.
black87
)),
...
...
@@ -201,8 +230,8 @@ class TestPageState extends State<TestPage> with TickerProviderStateMixin {
),
Container
(
height:
380
,
margin:
const
EdgeInsets
.
only
(
top:
0
,
left:
10
,
right:
10
),
margin:
const
EdgeInsets
.
only
(
top:
0
,
left:
10
,
right:
10
),
padding:
const
EdgeInsets
.
all
(
10
),
decoration:
const
BoxDecoration
(
color:
Colors
.
white
,
...
...
@@ -236,7 +265,8 @@ class TestPageState extends State<TestPage> with TickerProviderStateMixin {
///内容区
body:
Column
(
children:
[
buildExpanded
()]),
));
)),
);
}
Container
buildSliverToBoxAdapter
(
var
text
)
{
...
...
lib/ui/main/tab_home_page.dart
View file @
be51012f
...
...
@@ -82,6 +82,7 @@ class _HomePageState extends State<HomePage>
List
<
CountData
>?
findCountList
=
[];
ExaminePersonBo
?
mExaminePersonBo
=
ExaminePersonBo
();
OverseerHistoryListBo
?
mOverseerHistoryListBo
=
OverseerHistoryListBo
();
int
mOverseerHistoryCount
=
0
;
List
<
HistoryListData
>?
mHistoryListData
=
[];
//声明,后面需要销毁
...
...
@@ -152,6 +153,7 @@ class _HomePageState extends State<HomePage>
if
(
mounted
)
{
setState
(()
{
mOverseerHistoryListBo
=
value
;
mOverseerHistoryCount
=
mOverseerHistoryListBo
!.
count
!;
mHistoryListData
=
mOverseerHistoryListBo
!.
data
;
});
}
...
...
@@ -489,7 +491,9 @@ class _HomePageState extends State<HomePage>
onTap:
()
{
Get
.
toNamed
(
RouteString
.
OVERSEER_HISTORY_LIST_PAGE
,
arguments:
{})?.
then
((
value
)
{
if
(
value
!=
null
&&
value
)
{}
if
(
value
!=
null
&&
value
)
{
getOverseerHistoryList
();
}
});
},
child:
Container
(
...
...
@@ -524,7 +528,7 @@ class _HomePageState extends State<HomePage>
style:
TextStyle
(
fontSize:
12
,
color:
Colors
.
orange
)),
TextSpan
(
text:
mOverseerHistoryListBo
!=
null
?
mOverseerHistory
ListBo
!.
c
ount
.
toString
()
?
mOverseerHistory
C
ount
.
toString
()
:
'0'
,
style:
const
TextStyle
(
fontSize:
16
,
...
...
@@ -544,7 +548,8 @@ class _HomePageState extends State<HomePage>
}),
]
else
...[
Container
(
margin:
const
EdgeInsets
.
only
(
left:
5
,
right:
5
,
top:
0
,
bottom:
0
),
margin:
const
EdgeInsets
.
only
(
left:
5
,
right:
5
,
top:
0
,
bottom:
30
),
child:
ListView
.
separated
(
shrinkWrap:
true
,
padding:
const
EdgeInsets
.
symmetric
(
...
...
@@ -562,7 +567,9 @@ class _HomePageState extends State<HomePage>
arguments:
{
'id'
:
mHistoryListData
![
index
].
id
,
})?.
then
((
value
)
{
if
(
value
!=
null
&&
value
)
{}
if
(
value
!=
null
&&
value
)
{
getOverseerHistoryList
();
}
});
},
child:
Card
(
...
...
@@ -746,6 +753,7 @@ class _HomePageState extends State<HomePage>
mHistoryListData
!
.
removeAt
(
index
);
mOverseerHistoryCount
--;
ToastUtils
.
showCenter
(
'删除成功'
);
...
...
@@ -788,7 +796,9 @@ class _HomePageState extends State<HomePage>
'id'
:
mHistoryListData
![
index
]
.
id
,
})?.
then
((
value
)
{
if
(
value
!=
null
&&
value
)
{}
if
(
value
!=
null
&&
value
)
{
getOverseerHistoryList
();
}
});
},
width:
60
,
...
...
lib/ui/overseer/overseer_history_details_page.dart
View file @
be51012f
...
...
@@ -8,6 +8,7 @@ import 'package:special_equipment_flutter/model/exam/overseer_history_informatio
import
'package:special_equipment_flutter/utils/size_config.dart'
;
import
'package:special_equipment_flutter/utils/storage_util.dart'
;
import
'package:special_equipment_flutter/utils/time_util.dart'
;
import
'package:special_equipment_flutter/utils/toast_utils.dart'
;
import
'package:special_equipment_flutter/widgets/divider_custom.dart'
;
import
'../../widgets/app_bar/custom_app_bar.dart'
;
...
...
@@ -69,7 +70,12 @@ class _OverseerHistroyDetailsPageState
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
WillPopScope
(
onWillPop:
()
async
{
Get
.
back
(
result:
true
);
return
true
;
// 控制是否可以侧滑返回,true为允许,false为不允许
},
child:
Scaffold
(
backgroundColor:
ColorConst
.
grayf5Color
,
appBar:
AppBarCustom
(
text:
'监察记录详情'
,
...
...
@@ -193,7 +199,7 @@ class _OverseerHistroyDetailsPageState
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
black54
)),
TextSpan
(
text:
timestampToDate
(
text:
timestampToDate2
(
data
!=
null
?
data
!.
createDate
!
:
0
),
style:
const
TextStyle
(
fontSize:
14
,
color:
Colors
.
black54
)),
...
...
@@ -228,7 +234,8 @@ class _OverseerHistroyDetailsPageState
ListView
.
separated
(
shrinkWrap:
true
,
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
EdgeInsetsConst
.
padding_horizontal
),
horizontal:
EdgeInsetsConst
.
padding_horizontal
),
physics:
const
NeverScrollableScrollPhysics
(),
itemBuilder:
(
BuildContext
context
,
int
index
)
{
return
Container
(
...
...
@@ -246,7 +253,8 @@ class _OverseerHistroyDetailsPageState
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Row
(
mainAxisAlignment:
...
...
@@ -265,8 +273,9 @@ class _OverseerHistroyDetailsPageState
:
'已完成'
,
style:
TextStyle
(
fontSize:
14
,
color:
rowList
![
index
].
adopt
==
"0"
color:
rowList
![
index
]
.
adopt
==
"0"
?
ColorConst
.
red1BgColor
:
ColorConst
.
greenColor
,
fontWeight:
FontWeight
.
bold
)),
...
...
@@ -319,8 +328,8 @@ class _OverseerHistroyDetailsPageState
.
toString
(),
style:
const
TextStyle
(
fontSize:
16
,
color:
ColorConst
.
greenColor
,
color:
ColorConst
.
greenColor
,
fontWeight:
FontWeight
.
bold
)),
const
TextSpan
(
...
...
@@ -380,7 +389,8 @@ class _OverseerHistroyDetailsPageState
// ),
// )
],
));
)),
);
}
Container
buildTitleContainer
(
...
...
lib/ui/overseer/overseer_history_list_page.dart
View file @
be51012f
...
...
@@ -6,6 +6,7 @@ import 'package:special_equipment_flutter/common/edgeInsets_const.dart';
import
'package:special_equipment_flutter/common/route_string.dart'
;
import
'package:special_equipment_flutter/dio/http_utils.dart'
;
import
'package:special_equipment_flutter/model/exam/overseer_history_list_bo.dart'
;
import
'package:special_equipment_flutter/utils/eventbus_utils.dart'
;
import
'package:special_equipment_flutter/utils/storage_util.dart'
;
import
'package:special_equipment_flutter/utils/string_utils.dart'
;
import
'package:special_equipment_flutter/utils/time_util.dart'
;
...
...
@@ -69,7 +70,12 @@ class _OverseerHistoryListPageState extends State<OverseerHistoryListPage> {
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
WillPopScope
(
onWillPop:
()
async
{
Get
.
back
(
result:
true
);
return
true
;
// 控制是否可以侧滑返回,true为允许,false为不允许
},
child:
Scaffold
(
appBar:
AppBarCustom
(
text:
'考核列表'
,
height:
50
),
backgroundColor:
Colors
.
grey
[
100
],
body:
Column
(
...
...
@@ -101,6 +107,7 @@ class _OverseerHistoryListPageState extends State<OverseerHistoryListPage> {
)),
],
),
),
);
}
...
...
@@ -271,6 +278,9 @@ class _OverseerHistoryListPageState extends State<OverseerHistoryListPage> {
setState
(()
{
mHistoryListData
!
.
removeAt
(
index
);
//发出通知
EventBusUtils
.
getInstance
()
?.
fire
(
"2"
);
ToastUtils
.
showCenter
(
'删除成功'
);
Get
.
back
();
});
...
...
lib/ui/overseer/overseer_settings_page.dart
View file @
be51012f
This diff is collapsed.
Click to expand it.
lib/utils/time_util.dart
View file @
be51012f
...
...
@@ -54,3 +54,9 @@ String timestampToDate(int timestamp) {
var
formatter
=
DateFormat
(
'yyyy-MM-dd HH:mm:ss'
);
return
formatter
.
format
(
date
);
}
String
timestampToDate2
(
int
timestamp
)
{
var
date
=
DateTime
.
fromMillisecondsSinceEpoch
(
timestamp
);
var
formatter
=
DateFormat
(
'yyyy-MM-dd'
);
return
formatter
.
format
(
date
);
}
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