Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
total
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
张杰
total
Commits
4ba86e22
Commit
4ba86e22
authored
7 years ago
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复VI检查任务为展开无法提交问题
parent
39fe1244
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
21 deletions
+22
-21
AppDelegate.m
total/AppDelegate/AppDelegate.m
+7
-12
InspectionDetailTableViewController.m
...(VI巡检结果)/Controller/InspectionDetailTableViewController.m
+3
-0
Patrol_PatrolInspect.storyboard
...siness/PatrolOnline(VI巡检)/Patrol_PatrolInspect.storyboard
+3
-2
PatrolExamViewController.m
...lOnline(VI巡检)/ViewConstrollers/PatrolExamViewController.m
+3
-1
Info.plist
total/Info.plist
+2
-2
GTOAppMacro.h
total/Macro/GTOAppMacro.h
+4
-4
No files found.
total/AppDelegate/AppDelegate.m
View file @
4ba86e22
...
@@ -99,9 +99,8 @@
...
@@ -99,9 +99,8 @@
NSDictionary
*
content
=
[
NSDictionary
dictionaryWithContentsOfFile
:
path
];
NSDictionary
*
content
=
[
NSDictionary
dictionaryWithContentsOfFile
:
path
];
NSString
*
version
=
[
content
valueForKey
:
@"CFBundleShortVersionString"
]
;
NSString
*
version
=
[
content
valueForKey
:
@"CFBundleShortVersionString"
]
;
self
.
version
=
version
;
self
.
version
=
version
;
// 获取服务器更新信息
// 获取服务器更新信息
[
self
getDataFromServer
];
[
self
getDataFromServer
];
}
}
//请求服务器更新信息
//请求服务器更新信息
...
@@ -114,7 +113,6 @@
...
@@ -114,7 +113,6 @@
NSInteger
success
=
[
data
[
@"success"
]
integerValue
];
NSInteger
success
=
[
data
[
@"success"
]
integerValue
];
NSString
*
message
=
data
[
@"message"
]
;
NSString
*
message
=
data
[
@"message"
]
;
if
(
success
==
1
)
{
if
(
success
==
1
)
{
NSDictionary
*
dictData
=
data
[
@"data"
];
NSDictionary
*
dictData
=
data
[
@"data"
];
NSString
*
serverVeision
=
[
dictData
objectForKey
:
@"version"
];
NSString
*
serverVeision
=
[
dictData
objectForKey
:
@"version"
];
NSString
*
serverUrl
=
[
dictData
objectForKey
:
@"url"
];
NSString
*
serverUrl
=
[
dictData
objectForKey
:
@"url"
];
...
@@ -137,6 +135,7 @@
...
@@ -137,6 +135,7 @@
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
[[
ICRHTTPController
sharedController
]
getVeisionIdWithType
:
@"ipa"
success
:
succ
failure
:
fail
];
[[
ICRHTTPController
sharedController
]
getVeisionIdWithType
:
@"ipa"
success
:
succ
failure
:
fail
];
}
}
//比较版本号及是否下载
//比较版本号及是否下载
-
(
void
)
comperVersion
-
(
void
)
comperVersion
{
{
...
@@ -154,16 +153,13 @@
...
@@ -154,16 +153,13 @@
NSLog
(
@"string:%@"
,
[
array2
objectAtIndex
:
i
]);
NSLog
(
@"string:%@"
,
[
array2
objectAtIndex
:
i
]);
}
}
BOOL
isNeedUpdate
=
[
self
compareVersion
];
BOOL
isNeedUpdate
=
[
self
compareVersion
];
if
(
isNeedUpdate
)
{
if
(
isNeedUpdate
)
{
if
(
self
.
severForceUpdate
)
{
if
(
self
.
severForceUpdate
)
{
//强制更新
//强制更新
self
.
alertV
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"新版本告知"
message
:
@"有新版本发布请您下载最新版本"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"去下载"
,
nil
];
self
.
alertV
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"新版本告知"
message
:
@"有新版本发布请您下载最新版本"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"去下载"
,
nil
];
self
.
alertV
.
tag
=
1001
;
self
.
alertV
.
tag
=
1001
;
[
self
.
alertV
show
];
[
self
.
alertV
show
];
}
else
{
}
else
{
self
.
alertV
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"新版本告知"
message
:
@"有新版本发布请您下载最新版本"
delegate
:
self
cancelButtonTitle
:
@"下次再说"
otherButtonTitles
:
@"去下载"
,
nil
];
//
self
.
alertV
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"新版本告知"
message
:
@"有新版本发布请您下载最新版本"
delegate
:
self
cancelButtonTitle
:
@"下次再说"
otherButtonTitles
:
@"去下载"
,
nil
];
//
self
.
alertV
.
tag
=
1002
;
self
.
alertV
.
tag
=
1002
;
[
self
.
alertV
show
];
[
self
.
alertV
show
];
...
@@ -171,20 +167,19 @@
...
@@ -171,20 +167,19 @@
}
}
}
}
}
}
-
(
BOOL
)
compareVersion
-
(
BOOL
)
compareVersion
{
{
float
version
=
[
self
.
intVersion
floatValue
];
float
version
=
[
self
.
intVersion
floatValue
];
float
severVersion
=
[
self
.
intSeverVersion
floatValue
];
float
severVersion
=
[
self
.
intSeverVersion
floatValue
];
if
(
severVersion
>
version
)
{
if
(
severVersion
>
version
)
{
return
YES
;
return
YES
;
}
else
}
else
{
{
return
NO
;
return
NO
;
}
}
}
}
-
(
void
)
alertView
:
(
UIAlertView
*
)
alertView
-
(
void
)
alertView
:
(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:
(
NSInteger
)
buttonIndex
{
clickedButtonAtIndex
:
(
NSInteger
)
buttonIndex
{
if
(
alertView
.
tag
==
1001
)
{
if
(
alertView
.
tag
==
1001
)
{
[[
UIApplication
sharedApplication
]
openURL
:[
NSURL
URLWithString
:
self
.
severUrl
]];
[[
UIApplication
sharedApplication
]
openURL
:[
NSURL
URLWithString
:
self
.
severUrl
]];
}
else
if
(
alertView
.
tag
==
1002
)
}
else
if
(
alertView
.
tag
==
1002
)
...
@@ -193,8 +188,8 @@ clickedButtonAtIndex:(NSInteger)buttonIndex {
...
@@ -193,8 +188,8 @@ clickedButtonAtIndex:(NSInteger)buttonIndex {
[[
UIApplication
sharedApplication
]
openURL
:[
NSURL
URLWithString
:
self
.
severUrl
]];
[[
UIApplication
sharedApplication
]
openURL
:[
NSURL
URLWithString
:
self
.
severUrl
]];
}
}
}
}
}
}
//比较版本号
//比较版本号
-
(
NSComparisonResult
)
p_compareVersions
:
(
NSString
*
)
version1
betweenVersion2
:
(
NSString
*
)
version2
{
-
(
NSComparisonResult
)
p_compareVersions
:
(
NSString
*
)
version1
betweenVersion2
:
(
NSString
*
)
version2
{
NSComparisonResult
result
=
NSOrderedSame
;
NSComparisonResult
result
=
NSOrderedSame
;
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/PatroIInspectionResults(VI巡检结果)/Controller/InspectionDetailTableViewController.m
View file @
4ba86e22
...
@@ -211,6 +211,9 @@ NSString *const CELL = @"CustomInspectionTableViewCell";
...
@@ -211,6 +211,9 @@ NSString *const CELL = @"CustomInspectionTableViewCell";
[
self
.
categoryArray
addObject
:
answer
.
questionCategory
];
[
self
.
categoryArray
addObject
:
answer
.
questionCategory
];
}
}
}
}
NSArray
*
sortDesc
=
@[
[[
NSSortDescriptor
alloc
]
initWithKey
:
@"self"
ascending
:
YES
]];
self
.
categoryArray
=
[
NSMutableArray
arrayWithArray
:[
self
.
categoryArray
sortedArrayUsingDescriptors
:
sortDesc
]];
//划分数据
//划分数据
for
(
NSString
*
string
in
self
.
categoryArray
)
{
for
(
NSString
*
string
in
self
.
categoryArray
)
{
NSMutableArray
*
subArray
=
[
NSMutableArray
array
];
NSMutableArray
*
subArray
=
[
NSMutableArray
array
];
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/PatrolOnline(VI巡检)/Patrol_PatrolInspect.storyboard
View file @
4ba86e22
...
@@ -180,7 +180,7 @@
...
@@ -180,7 +180,7 @@
<nil
key=
"textColor"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
已完成
"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"hth-nU-ISq"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
---
"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"hth-nU-ISq"
>
<rect
key=
"frame"
x=
"275"
y=
"0.0"
width=
"84"
height=
"40"
/>
<rect
key=
"frame"
x=
"275"
y=
"0.0"
width=
"84"
height=
"40"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"15"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"15"
/>
<color
key=
"textColor"
red=
"0.63179747500000005"
green=
"0.63179747500000005"
blue=
"0.63179747500000005"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
key=
"textColor"
red=
"0.63179747500000005"
green=
"0.63179747500000005"
blue=
"0.63179747500000005"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
...
@@ -244,7 +244,7 @@
...
@@ -244,7 +244,7 @@
<constraints>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"85"
id=
"QCJ-l1-s8b"
/>
<constraint
firstAttribute=
"width"
constant=
"85"
id=
"QCJ-l1-s8b"
/>
</constraints>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"1
5
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"1
4
"
/>
<inset
key=
"titleEdgeInsets"
minX=
"-16"
minY=
"0.0"
maxX=
"20"
maxY=
"0.0"
/>
<inset
key=
"titleEdgeInsets"
minX=
"-16"
minY=
"0.0"
maxX=
"20"
maxY=
"0.0"
/>
<inset
key=
"imageEdgeInsets"
minX=
"65"
minY=
"0.0"
maxX=
"0.0"
maxY=
"0.0"
/>
<inset
key=
"imageEdgeInsets"
minX=
"65"
minY=
"0.0"
maxX=
"0.0"
maxY=
"0.0"
/>
<state
key=
"normal"
title=
"全部展开"
image=
"arrowturnoff"
>
<state
key=
"normal"
title=
"全部展开"
image=
"arrowturnoff"
>
...
@@ -750,6 +750,7 @@
...
@@ -750,6 +750,7 @@
</view>
</view>
<connections>
<connections>
<outlet
property=
"btnSubmit"
destination=
"mHa-66-Myc"
id=
"NST-Nh-EKj"
/>
<outlet
property=
"btnSubmit"
destination=
"mHa-66-Myc"
id=
"NST-Nh-EKj"
/>
<outlet
property=
"expandButton"
destination=
"hMf-am-3kG"
id=
"nc4-ru-Xbd"
/>
<outlet
property=
"tableView"
destination=
"gKa-XF-Dts"
id=
"V6d-RQ-tOd"
/>
<outlet
property=
"tableView"
destination=
"gKa-XF-Dts"
id=
"V6d-RQ-tOd"
/>
<outlet
property=
"topView"
destination=
"T76-CQ-jFE"
id=
"inO-g5-zWE"
/>
<outlet
property=
"topView"
destination=
"T76-CQ-jFE"
id=
"inO-g5-zWE"
/>
</connections>
</connections>
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/PatrolOnline(VI巡检)/ViewConstrollers/PatrolExamViewController.m
View file @
4ba86e22
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
@property
(
weak
,
nonatomic
)
IBOutlet
PatrolExamTopView
*
topView
;
@property
(
weak
,
nonatomic
)
IBOutlet
PatrolExamTopView
*
topView
;
@property
(
weak
,
nonatomic
)
IBOutlet
UITableView
*
tableView
;
@property
(
weak
,
nonatomic
)
IBOutlet
UITableView
*
tableView
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
btnSubmit
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
btnSubmit
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
expandButton
;
@property
(
strong
,
nonatomic
)
NSTimer
*
timer
;
@property
(
strong
,
nonatomic
)
NSTimer
*
timer
;
/**
/**
...
@@ -291,7 +292,8 @@
...
@@ -291,7 +292,8 @@
#pragma mark -提交VI检查任务
#pragma mark -提交VI检查任务
-
(
IBAction
)
actionSubmit
:
(
id
)
sender
{
-
(
IBAction
)
actionSubmit
:
(
id
)
sender
{
[
self
.
viewModel
openAll
];
self
.
expandButton
.
selected
=
YES
;
if
(
!
self
.
viewModel
.
detail
.
temp
)
{
if
(
!
self
.
viewModel
.
detail
.
temp
)
{
//找到最上面一个没有回答的问题
//找到最上面一个没有回答的问题
if
(
self
.
viewModel
.
detail
.
questions
.
count
!=
self
.
viewModel
.
dicAnswers
.
count
)
{
if
(
self
.
viewModel
.
detail
.
questions
.
count
!=
self
.
viewModel
.
dicAnswers
.
count
)
{
...
...
This diff is collapsed.
Click to expand it.
total/Info.plist
View file @
4ba86e22
...
@@ -19,11 +19,11 @@
...
@@ -19,11 +19,11 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.3.
0
<
/string
>
<
string
>
1.3.
1
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1.3.
0
<
/string
>
<
string
>
1.3.
1
<
/string
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
tru
e
/
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
...
...
This diff is collapsed.
Click to expand it.
total/Macro/GTOAppMacro.h
View file @
4ba86e22
...
@@ -179,12 +179,12 @@ typedef NS_ENUM(NSInteger,ATTACHMENT_LOCATION){
...
@@ -179,12 +179,12 @@ typedef NS_ENUM(NSInteger,ATTACHMENT_LOCATION){
//#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:7080"
//#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:7080"
//测试环境
//测试环境
//
#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8180/total-server/rest"
#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8180/total-server/rest"
//
#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180"
#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:8180"
//开发环境
//开发环境
#define HTTP_LOCAL_BASE_URL @"http://192.168.1.176:8083"
//
#define HTTP_LOCAL_BASE_URL @"http://192.168.1.176:8083"
#define HTTP_REST_API_BASE_URL @"http://192.168.1.176:8083/total-server/rest"
//
#define HTTP_REST_API_BASE_URL @"http://192.168.1.176:8083/total-server/rest"
#define HTTP_WEATHER_URL @"http://apis.baidu.com/heweather/weather/free"
#define HTTP_WEATHER_URL @"http://apis.baidu.com/heweather/weather/free"
//refreshUpdateDate
//refreshUpdateDate
...
...
This diff is collapsed.
Click to expand it.
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