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
05716b0f
Commit
05716b0f
authored
May 31, 2024
by
吴春元
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 修改
parent
e6f370e1
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
132 additions
and
37 deletions
+132
-37
build.gradle
android/app/build.gradle
+6
-0
Info.plist
ios/Runner/Info.plist
+2
-2
api.dart
lib/dio/api.dart
+4
-4
exam_result_page.dart
lib/ui/examine/exam/exam_result_page.dart
+3
-3
tab_home_page.dart
lib/ui/main/tab_home_page.dart
+33
-5
overseer_history_details_page.dart
lib/ui/overseer/overseer_history_details_page.dart
+2
-2
overseer_history_list_page.dart
lib/ui/overseer/overseer_history_list_page.dart
+50
-13
overseer_settings_page.dart
lib/ui/overseer/overseer_settings_page.dart
+26
-2
register_page2.dart
lib/ui/register/register_page2.dart
+2
-2
user_settings_page.dart
lib/ui/unit/user/user_settings_page.dart
+3
-3
pubspec.yaml
pubspec.yaml
+1
-1
No files found.
android/app/build.gradle
View file @
05716b0f
...
...
@@ -82,6 +82,12 @@ android {
signingConfig
signingConfigs
.
debug
}
}
//自定义打包时apk名字
android
.
applicationVariants
.
all
{
variant
->
variant
.
outputs
.
all
{
outputFileName
=
"special_equipment${variant.versionName}.apk"
}
}
}
flutter
{
...
...
ios/Runner/Info.plist
View file @
05716b0f
...
...
@@ -25,11 +25,11 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0.
5
<
/string
>
<
string
>
1.0.
6
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
5
<
/string
>
<
string
>
6
<
/string
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSCameraUsageDescription
<
/k
e
y
>
...
...
lib/dio/api.dart
View file @
05716b0f
// ignore_for_file: unnecessary_brace_in_string_interps, non_constant_identifier_names
class
Api
{
static
var
IS_DEBUG
=
fals
e
;
static
var
IS_DEBUG
=
tru
e
;
//
static String URL =
//
IS_DEBUG ? "https://special.sxyztech.cn/" : "http://192.168.19.165:2212/";
static
String
URL
=
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/";
...
...
lib/ui/examine/exam/exam_result_page.dart
View file @
05716b0f
...
...
@@ -116,9 +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
.
green
:
Colors
.
red
,
fontSize:
20
,
fontWeight:
FontWeight
.
bold
),
),
...
...
lib/ui/main/tab_home_page.dart
View file @
05716b0f
...
...
@@ -12,6 +12,7 @@ import 'package:package_info/package_info.dart';
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/app_is_open.dart'
;
import
'package:special_equipment_flutter/model/check_update.dart'
;
import
'package:special_equipment_flutter/model/count_bo.dart'
;
import
'package:special_equipment_flutter/model/echart_bo.dart'
;
...
...
@@ -84,13 +85,15 @@ class _HomePageState extends State<HomePage>
OverseerHistoryListBo
?
mOverseerHistoryListBo
=
OverseerHistoryListBo
();
int
mOverseerHistoryCount
=
0
;
List
<
HistoryListData
>?
mHistoryListData
=
[];
String
?
isOpen
=
'0'
;
//声明,后面需要销毁
//声明,后面需要销毁
StreamSubscription
?
event
;
@override
void
initState
()
{
super
.
initState
();
doAppIsOpen
();
///获取版本
checkUpdateVersion
();
...
...
@@ -146,6 +149,20 @@ class _HomePageState extends State<HomePage>
getDeviceData
();
}
///版本显示控制
void
doAppIsOpen
()
{
if
(
Platform
.
isIOS
)
{
HttpUtils
.
doAppIsOpen
(
context
,
onSuccess:
(
value
)
{
AppIsOpen
appIsOpen
=
value
;
if
(
mounted
)
{
setState
(()
{
isOpen
=
appIsOpen
.
appIsOpen
!;
});
}
});
}
}
///获取监察记录列表
void
getOverseerHistoryList
()
{
HttpUtils
.
getPapers
(
context
,
StorageUtil
.
getInstance
().
getUserId
(),
1
,
10
)
...
...
@@ -327,6 +344,7 @@ class _HomePageState extends State<HomePage>
}
else
{
getQuestionsPerson
();
}
doAppIsOpen
();
});
},
child:
CustomScrollView
(
...
...
@@ -386,6 +404,7 @@ class _HomePageState extends State<HomePage>
///统计
// buildSliverStatistics(context),
///监察人员
]
else
if
(
isInspectorRoles
(
StorageUtil
.
getInstance
().
getRoleNames
())!)
...[
...
...
@@ -400,13 +419,22 @@ class _HomePageState extends State<HomePage>
///日管控整改、周排查整改、月调度整改布局
buildSliverRiskDayWeekMonth
(),
if
(!
isRolesName1
(
StorageUtil
.
getInstance
().
getRoleNames
())!)
...[
///统计
buildSliverStatistics
(
context
)
]
else
...[
if
(
Platform
.
isIOS
)
...[
if
(
isOpen
==
'1'
)
...[
buildSliverToBoxAdapter
(
'assets/examine/exam_title_icon.png'
,
'考核练习'
),
buildSliverGridExamination
(),
///统计
// buildSliverStatistics(context),
]
]
else
...[
buildSliverToBoxAdapter
(
'assets/examine/exam_title_icon.png'
,
'考核练习'
),
buildSliverGridExamination
(),
]
]
]
],
),
...
...
lib/ui/overseer/overseer_history_details_page.dart
View file @
05716b0f
...
...
@@ -222,8 +222,8 @@ class _OverseerHistroyDetailsPageState
),
child:
Column
(
children:
[
buildTitleContainer
(
Icons
.
event_repeat
,
ColorConst
.
blueColor
,
'考核
状态
'
,
Colors
.
black54
),
buildTitleContainer
(
Icons
.
person_pin
,
ColorConst
.
blueColor
,
'考核
人
'
,
Colors
.
black54
),
Container
(
padding:
const
EdgeInsets
.
only
(
left:
30
,
right:
15
,
top:
0
,
bottom:
15
),
...
...
lib/ui/overseer/overseer_history_list_page.dart
View file @
05716b0f
...
...
@@ -34,6 +34,8 @@ class _OverseerHistoryListPageState extends State<OverseerHistoryListPage> {
List
<
HistoryListData
>?
mHistoryListData
=
[];
int
page
=
1
;
bool
isLastPage
=
true
;
OverseerHistoryListBo
?
mOverseerHistoryListBo
=
OverseerHistoryListBo
();
int
mOverseerHistoryCount
=
0
;
@override
void
initState
()
{
...
...
@@ -45,16 +47,18 @@ class _OverseerHistoryListPageState extends State<OverseerHistoryListPage> {
void
getOverseerHistoryList
()
{
HttpUtils
.
getPapers
(
context
,
StorageUtil
.
getInstance
().
getUserId
(),
1
,
10
)
.
then
((
value
)
{
OverseerHistoryListBo
mOverseerHistoryListBo
=
value
;
mOverseerHistoryListBo
=
value
;
if
(
mounted
)
{
setState
(()
{
mOverseerHistoryCount
=
mOverseerHistoryListBo
!.
count
!;
if
(
page
==
1
)
{
mHistoryListData
!.
clear
();
}
List
<
HistoryListData
>?
rows
=
mOverseerHistoryListBo
.
data
;
List
<
HistoryListData
>?
rows
=
mOverseerHistoryListBo
!
.
data
;
mHistoryListData
!.
addAll
(
rows
!);
int
totalPage
=
StringUtils
.
totalPage
(
mOverseerHistoryListBo
.
count
,
10
);
StringUtils
.
totalPage
(
mOverseerHistoryListBo
!
.
count
,
10
);
print
(
'
$totalPage
====
$page
'
);
if
(
totalPage
==
page
)
{
isLastPage
=
true
;
...
...
@@ -114,6 +118,38 @@ class _OverseerHistoryListPageState extends State<OverseerHistoryListPage> {
Column
buildBody
()
{
return
Column
(
children:
[
Container
(
width:
double
.
infinity
,
margin:
const
EdgeInsets
.
only
(
left:
10
,
right:
10
,
top:
10
,
bottom:
0
),
padding:
const
EdgeInsets
.
only
(
left:
10
,
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:
Text
.
rich
(
softWrap:
true
,
TextSpan
(
children:
[
const
TextSpan
(
text:
"历史监察记录共 "
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
orange
)),
TextSpan
(
text:
mOverseerHistoryListBo
!=
null
?
mOverseerHistoryCount
.
toString
()
:
'0'
,
style:
const
TextStyle
(
fontSize:
18
,
color:
Colors
.
orange
,
fontWeight:
FontWeight
.
bold
)),
const
TextSpan
(
text:
" 条"
,
style:
TextStyle
(
fontSize:
14
,
color:
Colors
.
orange
))
])),
),
//文章列表
ListView
.
separated
(
shrinkWrap:
true
,
...
...
@@ -137,20 +173,20 @@ class _OverseerHistoryListPageState extends State<OverseerHistoryListPage> {
InkWell
buildItem
(
int
index
,
BuildContext
context
)
{
return
InkWell
(
onTap:
()
{
// Get.toNamed(RouteString.DAY_INSPECT_SUBMIT_SY,
// arguments: {'argsData': widget.args, 'listBo': list(index)})
//
?.then((value) {
//
if (value != null && value) {
// getData
();
//
}
//
});
Get
.
toNamed
(
RouteString
.
OVERSEER_HISTROY_DETAILS_PAGE
,
arguments:
{
'id'
:
mHistoryListData
![
index
].
id
,
})
?.
then
((
value
)
{
if
(
value
!=
null
&&
value
)
{
getOverseerHistoryList
();
}
});
},
child:
Card
(
elevation:
10
,
shadowColor:
mHistoryListData
![
index
].
incomplete
!=
0
?
ColorConst
.
orangeColor
:
ColorConst
.
greenColor
,
margin:
const
EdgeInsets
.
only
(
left:
0
,
right:
0
,
top:
1
5
,
bottom:
0
),
margin:
const
EdgeInsets
.
only
(
left:
0
,
right:
0
,
top:
1
0
,
bottom:
0
),
shape:
const
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
10
)),
),
...
...
@@ -281,8 +317,9 @@ class _OverseerHistoryListPageState extends State<OverseerHistoryListPage> {
mHistoryListData
!
.
removeAt
(
index
);
//发出通知
EventBusUtils
.
getInstance
()
?.
fire
(
"2"
);
// EventBusUtils.getInstance()
// ?.fire("2");
mOverseerHistoryCount
--;
ToastUtils
.
showCenter
(
'删除成功'
);
Get
.
back
();
});
...
...
lib/ui/overseer/overseer_settings_page.dart
View file @
05716b0f
...
...
@@ -312,6 +312,9 @@ class _OverseerSettingsState extends State<OverseerSettingsPage> {
controller:
singleZJText
,
onChanged:
(
num
)
{
setState
(()
{
if
(
num
.
isEmpty
)
{
num
=
'0'
;
}
if
(
mDataEq
!=
null
&&
int
.
parse
(
num
)
>
mDataEq
!.
dxNum
!)
{
ToastUtils
.
showCenter
(
...
...
@@ -347,6 +350,9 @@ class _OverseerSettingsState extends State<OverseerSettingsPage> {
controller:
judgmentZJText
,
onChanged:
(
num
)
{
setState
(()
{
if
(
num
.
isEmpty
)
{
num
=
'0'
;
}
if
(
mDataEq
!=
null
&&
int
.
parse
(
num
)
>
mDataEq
!.
pdNum
!)
{
ToastUtils
.
showCenter
(
...
...
@@ -429,6 +435,9 @@ class _OverseerSettingsState extends State<OverseerSettingsPage> {
controller:
singleAQYText
,
onChanged:
(
num
)
{
setState
(()
{
if
(
num
.
isEmpty
)
{
num
=
'0'
;
}
if
(
mDataEq
!=
null
&&
int
.
parse
(
num
)
>
mDataEq
!.
dxNum
!)
{
ToastUtils
.
showCenter
(
...
...
@@ -464,6 +473,9 @@ class _OverseerSettingsState extends State<OverseerSettingsPage> {
controller:
judgmentAQYText
,
onChanged:
(
num
)
{
setState
(()
{
if
(
num
.
isEmpty
)
{
num
=
'0'
;
}
if
(
mDataEq
!=
null
&&
int
.
parse
(
num
)
>
mDataEq
!.
pdNum
!)
{
ToastUtils
.
showCenter
(
...
...
@@ -820,15 +832,19 @@ class _OverseerSettingsState extends State<OverseerSettingsPage> {
}
bool
isSafety
=
false
;
bool
isSafety1
=
false
;
bool
isSafety2
=
false
;
for
(
var
i
=
0
;
i
<
userSafetyDirectorList
!.
length
;
i
++)
{
if
(
userSafetyDirectorList
![
i
].
isChecked
!)
{
isSafety
=
true
;
isSafety1
=
true
;
}
}
for
(
var
i
=
0
;
i
<
userSafetyOfficerList
!.
length
;
i
++)
{
if
(
userSafetyOfficerList
![
i
].
isChecked
!)
{
isSafety
=
true
;
isSafety2
=
true
;
}
}
...
...
@@ -837,10 +853,18 @@ class _OverseerSettingsState extends State<OverseerSettingsPage> {
return
;
}
if
(
allZJ
==
0
&&
allAQY
==
0
)
{
ToastUtils
.
showCenter
(
'总题数不能为 0'
);
if
(
isSafety1
)
{
if
(
allZJ
==
0
)
{
ToastUtils
.
showCenter
(
'【安全总监】总题数不能为 0'
);
return
;
}
}
if
(
isSafety2
)
{
if
(
allAQY
==
0
)
{
ToastUtils
.
showCenter
(
'【安全员】总题数不能为 0'
);
return
;
}
}
Get
.
dialog
(
AlertDialog
(
title:
const
Text
(
"温馨提示"
),
...
...
lib/ui/register/register_page2.dart
View file @
05716b0f
...
...
@@ -171,7 +171,7 @@ class _RegisterPage2State extends State<RegisterPage2> {
),
child:
const
Text
(
softWrap:
true
,
'密码至少包含以下 3 种类别:大写字母、小写字母、数字、特殊符号、8-20位'
,
'密码至少包含以下 3 种类别:大写字母、小写字母、数字、特殊符号
( @#*. )
、8-20位'
,
style:
TextStyle
(
color:
Colors
.
orange
,
fontSize:
12
),
),
),
...
...
@@ -470,7 +470,7 @@ class _RegisterPage2State extends State<RegisterPage2> {
if
(!
StringUtils
.
isValidPassword
(
passwordText
!.
text
))
{
passwordFocusNode
!.
requestFocus
();
ToastUtils
.
showCenter
(
'密码至少包含以下 3 种类别:大写字母、小写字母、数字、特殊符号、8-20位'
);
ToastUtils
.
showCenter
(
'密码至少包含以下 3 种类别:大写字母、小写字母、数字、特殊符号
(@#*.)
、8-20位'
);
return
;
}
...
...
lib/ui/unit/user/user_settings_page.dart
View file @
05716b0f
...
...
@@ -261,7 +261,7 @@ class _UserSettingsPageState extends State<UserSettingsPage> {
),
child:
const
Text
(
softWrap:
true
,
'密码至少包含以下 3 种类别:大写字母、小写字母、数字、特殊符号、8-20位'
,
'密码至少包含以下 3 种类别:大写字母、小写字母、数字、特殊符号
( @#*. )
、8-20位'
,
style:
TextStyle
(
color:
Colors
.
orange
,
fontSize:
12
),
),
),
...
...
@@ -1058,7 +1058,7 @@ class _UserSettingsPageState extends State<UserSettingsPage> {
if
(!
StringUtils
.
isValidPassword
(
passwordText
!.
text
))
{
passwordFocusNode
!.
requestFocus
();
ToastUtils
.
showCenter
(
'密码至少包含以下 3 种类别:大写字母、小写字母、数字、特殊符号、8-20位'
);
'密码至少包含以下 3 种类别:大写字母、小写字母、数字、特殊符号
(@#*.)
、8-20位'
);
return
;
}
if
(
okPasswordText
!.
text
.
isEmpty
)
{
...
...
@@ -1075,7 +1075,7 @@ class _UserSettingsPageState extends State<UserSettingsPage> {
if
(!
StringUtils
.
isValidPassword
(
passwordText
!.
text
))
{
passwordFocusNode
!.
requestFocus
();
ToastUtils
.
showCenter
(
'密码至少包含以下 3 种类别:大写字母、小写字母、数字、特殊符号、8-20位'
);
'密码至少包含以下 3 种类别:大写字母、小写字母、数字、特殊符号
(@#*.)
、8-20位'
);
return
;
}
if
(
okPasswordText
!.
text
.
isEmpty
)
{
...
...
pubspec.yaml
View file @
05716b0f
...
...
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version
:
1.0.
5+5
version
:
1.0.
6+6
environment
:
sdk
:
'
>=3.1.3
<4.0.0'
...
...
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