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
bcfa14c3
Commit
bcfa14c3
authored
6 years ago
by
哈南
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
4285c42b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
171 additions
and
22 deletions
+171
-22
project.pbxproj
total.xcodeproj/project.pbxproj
+16
-10
IDEWorkspaceChecks.plist
total.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+8
-0
InspectionPhotoViewController.m
...esults(VI巡检结果)/Controller/InspectionPhotoViewController.m
+8
-2
PatrolExamViewController.m
...lOnline(VI巡检)/ViewConstrollers/PatrolExamViewController.m
+0
-1
ImageTool.h
total/GTOApp/UserUtil/ImageTool.h
+18
-0
ImageTool.m
total/GTOApp/UserUtil/ImageTool.m
+112
-0
Info.plist
total/Info.plist
+1
-1
GTOAppMacro.h
total/Macro/GTOAppMacro.h
+8
-8
No files found.
total.xcodeproj/project.pbxproj
View file @
bcfa14c3
...
...
@@ -249,6 +249,7 @@
29F5C49F1FCBB1220052CBF1
/* PYPhotoView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29F5C4901FCBB1220052CBF1
/* PYPhotoView.m */
;
};
29F5C4A91FCBB3520052CBF1
/* UIViewController+StoryBoard.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29F5C4A71FCBB3510052CBF1
/* UIViewController+StoryBoard.m */
;
};
29F9995C1D2E63C600090EBF
/* UIImage+RTTint.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29F9995B1D2E63C600090EBF
/* UIImage+RTTint.m */
;
};
345335D9216B25AB006A9A59
/* ImageTool.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
345335D8216B25AA006A9A59
/* ImageTool.m */
;
};
3506E23B1C27E14700288B3E
/* GTOBusinessSignInfo.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3506E23A1C27E14700288B3E
/* GTOBusinessSignInfo.m */
;
};
3506ECC41BA00E3400897EBE
/* main.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3506ECC31BA00E3400897EBE
/* main.m */
;
};
3506ECCA1BA00E3400897EBE
/* ViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3506ECC91BA00E3400897EBE
/* ViewController.m */
;
};
...
...
@@ -935,6 +936,8 @@
29F5C4A81FCBB3510052CBF1
/* UIViewController+StoryBoard.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"UIViewController+StoryBoard.h"
;
sourceTree
=
"<group>"
;
};
29F9995A1D2E63C600090EBF
/* UIImage+RTTint.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"UIImage+RTTint.h"
;
sourceTree
=
"<group>"
;
};
29F9995B1D2E63C600090EBF
/* UIImage+RTTint.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"UIImage+RTTint.m"
;
sourceTree
=
"<group>"
;
};
345335D7216B25AA006A9A59
/* ImageTool.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ImageTool.h
;
sourceTree
=
"<group>"
;
};
345335D8216B25AA006A9A59
/* ImageTool.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ImageTool.m
;
sourceTree
=
"<group>"
;
};
3506E2391C27E14700288B3E
/* GTOBusinessSignInfo.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GTOBusinessSignInfo.h
;
sourceTree
=
"<group>"
;
};
3506E23A1C27E14700288B3E
/* GTOBusinessSignInfo.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
GTOBusinessSignInfo.m
;
sourceTree
=
"<group>"
;
};
3506ECBE1BA00E3400897EBE
/* total.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
total.app
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
...
...
@@ -2949,6 +2952,8 @@
29603D841D1CDEA000951670
/* DetailsTimeSelect */
,
2978ED491D1BC64C00159B4A
/* NSdateSelect */
,
2978ED451D1BB02400159B4A
/* Drop-downBox(单项选择) */
,
345335D7216B25AA006A9A59
/* ImageTool.h */
,
345335D8216B25AA006A9A59
/* ImageTool.m */
,
3547450D1BCFFA4F00361FFD
/* GTOCommonTools.h */
,
3547450E1BCFFA4F00361FFD
/* GTOCommonTools.m */
,
35FC363E1BCE52AA00C62137
/* ChooseViewController */
,
...
...
@@ -3581,7 +3586,7 @@
3506ECBD1BA00E3400897EBE
=
{
CreatedOnToolsVersion
=
6.4
;
DevelopmentTeam
=
W54V2VB863
;
ProvisioningStyle
=
Manual
;
ProvisioningStyle
=
Automatic
;
SystemCapabilities
=
{
com.apple.BackgroundModes
=
{
enabled
=
1
;
...
...
@@ -4003,6 +4008,7 @@
35FC36331BCE1BD000C62137
/* GTONewAddPioneeringViewController.m in Sources */
,
29B501D81D1A8972003D4E74
/* FirstTableViewCell.m in Sources */
,
3506ED5F1BA0164E00897EBE
/* IBTWebProgressBar.m in Sources */
,
345335D9216B25AB006A9A59
/* ImageTool.m in Sources */
,
35D922CD1BAF9A6900D02338
/* ICRPostAttachment.m in Sources */
,
3506EDA31BA0166700897EBE
/* JTRecordView.m in Sources */
,
29F5C4461FCBAB410052CBF1
/* InspectionTableViewController.m in Sources */
,
...
...
@@ -4303,9 +4309,9 @@
CLANG_ENABLE_MODULES
=
YES
;
CLANG_ENABLE_OBJC_WEAK
=
YES
;
CODE_SIGN_ENTITLEMENTS
=
total/total.entitlements
;
CODE_SIGN_IDENTITY
=
"iPhone Developer
: jie zhang (9V9955H2BK)
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
istribution
"
;
CODE_SIGN_STYLE
=
Manual
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
eveloper
"
;
CODE_SIGN_STYLE
=
Automatic
;
DEVELOPMENT_TEAM
=
W54V2VB863
;
ENABLE_BITCODE
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
(
...
...
@@ -4322,8 +4328,8 @@
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomoe.total
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"
6191b2a0-c443-4299-bfd2-2107e96949af
"
;
PROVISIONING_PROFILE_SPECIFIER
=
"
Total Fabu
"
;
PROVISIONING_PROFILE
=
""
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
SWIFT_OBJC_BRIDGING_HEADER
=
"total/total-Bridging-Header.h"
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
...
...
@@ -4339,9 +4345,9 @@
CLANG_ENABLE_MODULES
=
YES
;
CLANG_ENABLE_OBJC_WEAK
=
YES
;
CODE_SIGN_ENTITLEMENTS
=
total/total.entitlements
;
CODE_SIGN_IDENTITY
=
"iPhone D
eveloper: jie zhang (9V9955H2BK)
"
;
CODE_SIGN_IDENTITY
=
"iPhone D
istribution
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Distribution"
;
CODE_SIGN_STYLE
=
Manual
;
CODE_SIGN_STYLE
=
Automatic
;
DEVELOPMENT_TEAM
=
W54V2VB863
;
ENABLE_BITCODE
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
(
...
...
@@ -4358,8 +4364,8 @@
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomoe.total
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"
6191b2a0-c443-4299-bfd2-2107e96949af
"
;
PROVISIONING_PROFILE_SPECIFIER
=
"
Total Fabu
"
;
PROVISIONING_PROFILE
=
""
;
PROVISIONING_PROFILE_SPECIFIER
=
""
;
SWIFT_OBJC_BRIDGING_HEADER
=
"total/total-Bridging-Header.h"
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
USER_HEADER_SEARCH_PATHS
=
"$(PODS_ROOT)/**"
;
...
...
This diff is collapsed.
Click to expand it.
total.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
0 → 100644
View file @
bcfa14c3
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
IDEDidComputeMac32BitWarning
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
/plist
>
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/PatroIInspectionResults(VI巡检结果)/Controller/InspectionPhotoViewController.m
View file @
bcfa14c3
...
...
@@ -55,9 +55,15 @@ static NSString * const reuseIdentifier = @"InspectionPhotoCollectionViewCell";
PYPhotoBrowseView
*
photoBroseView
=
[[
PYPhotoBrowseView
alloc
]
init
];
photoBroseView
.
currentIndex
=
indexPath
.
item
;
NSMutableArray
*
imageArray
=
[
NSMutableArray
array
];
for
(
InspectionPhotoCollectionViewCell
*
cell
in
collectionView
.
visibleCells
)
{
int
number
=
(
int
)[
collectionView
numberOfItemsInSection
:
indexPath
.
section
];
for
(
int
index
=
0
;
index
<
number
;
index
++
){
NSIndexPath
*
cellIndex
=
[
NSIndexPath
indexPathForItem
:
index
inSection
:
indexPath
.
section
];
InspectionPhotoCollectionViewCell
*
cell
=
(
InspectionPhotoCollectionViewCell
*
)[
collectionView
cellForItemAtIndexPath
:
cellIndex
];
[
imageArray
addObject
:
cell
.
inspectionImageView
];
}
};
// for (InspectionPhotoCollectionViewCell *cell in collectionView.visibleCells) {
// [imageArray addObject:cell.inspectionImageView];
// }
photoBroseView
.
sourceImgageViews
=
imageArray
;
[
photoBroseView
show
];
}
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/PatrolOnline(VI巡检)/ViewConstrollers/PatrolExamViewController.m
View file @
bcfa14c3
...
...
@@ -272,7 +272,6 @@
case
ExamCellTypeScore
:
{
PatrolExamScoreCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"PatrolExamScoreCell"
forIndexPath
:
indexPath
];
cell
.
cellModel
=
cellVM
;
return
cell
;
}
break
;
case
ExamCellTypeAttachment
:
{
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/UserUtil/ImageTool.h
0 → 100644
View file @
bcfa14c3
//
// ImageTool.h
// besttoneMobile
//
// Created by Besttone on 16/12/6.
// Copyright © 2016年 Besttone. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface
ImageTool
:
NSObject
+
(
NSData
*
)
zipImageWithUrl
:(
id
)
imageUrl
;
+
(
NSData
*
)
zipImageWithUrl
:(
id
)
imageUrl
maxSize
:(
CGFloat
)
size
;
+
(
NSData
*
)
zipImageWithImage
:(
UIImage
*
)
image
maxSize
:(
CGFloat
)
size
;
+
(
CGFloat
)
getImageSize
:(
UIImage
*
)
image
;
+
(
UIImage
*
)
imageWithUrl
:(
id
)
imageUrl
;
@end
This diff is collapsed.
Click to expand it.
total/GTOApp/UserUtil/ImageTool.m
0 → 100644
View file @
bcfa14c3
//
// ImageTool.m
// besttoneMobile
//
// Created by Besttone on 16/12/6.
// Copyright © 2016年 Besttone. All rights reserved.
//
#import "ImageTool.h"
#import <UIKit/UIKit.h>
@implementation
ImageTool
//对图片大小进行压缩至32K以下
+
(
NSData
*
)
zipImageWithUrl
:(
id
)
imageUrl
{
NSURL
*
url
=
[
NSURL
URLWithString
:
imageUrl
];
if
(
url
==
nil
){
url
=
[
NSURL
URLWithString
:[
imageUrl
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
]];
}
NSData
*
imageData
=
[[
NSData
alloc
]
initWithContentsOfURL
:
url
];
CGFloat
maxFileSize
=
32
*
1024
;
CGFloat
compression
=
0
.
9
f
;
CGFloat
maxCompression
=
0
.
1
f
;
UIImage
*
image
=
[
UIImage
imageWithData
:
imageData
];
NSData
*
compressedData
=
UIImageJPEGRepresentation
(
image
,
compression
);
while
([
compressedData
length
]
>
maxFileSize
&&
compression
>
maxCompression
)
{
compression
-=
0
.
1
;
compressedData
=
UIImageJPEGRepresentation
(
image
,
compression
);
}
return
compressedData
;
}
+
(
NSData
*
)
zipImageWithUrl
:(
id
)
imageUrl
maxSize
:(
CGFloat
)
size
{
NSURL
*
url
=
[
NSURL
URLWithString
:
imageUrl
];
if
(
url
==
nil
){
url
=
[
NSURL
URLWithString
:[
imageUrl
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
]];
}
NSData
*
data
=
[[
NSData
alloc
]
initWithContentsOfURL
:
url
];
UIImage
*
resultImage
=
[[
UIImage
alloc
]
initWithData
:
data
];
NSUInteger
lastDataLength
=
0
;
while
(
data
.
length
>
size
&&
data
.
length
!=
lastDataLength
)
{
lastDataLength
=
data
.
length
;
CGFloat
ratio
=
size
/
data
.
length
;
CGSize
size
=
CGSizeMake
((
NSUInteger
)(
resultImage
.
size
.
width
*
sqrtf
(
ratio
)),
(
NSUInteger
)(
resultImage
.
size
.
height
*
sqrtf
(
ratio
)));
UIGraphicsBeginImageContext
(
size
);
[
resultImage
drawInRect
:
CGRectMake
(
0
,
0
,
size
.
width
,
size
.
height
)];
resultImage
=
UIGraphicsGetImageFromCurrentImageContext
();
UIGraphicsEndImageContext
();
data
=
UIImageJPEGRepresentation
(
resultImage
,
1
);
}
return
data
;
}
+
(
NSData
*
)
zipImageWithImage
:(
UIImage
*
)
image
maxSize
:(
CGFloat
)
size
{
UIImage
*
resultImage
=
image
;
NSData
*
data
=
UIImageJPEGRepresentation
(
image
,
0
.
8
);
NSUInteger
lastDataLength
=
0
;
while
(
data
.
length
>
size
&&
data
.
length
!=
lastDataLength
)
{
lastDataLength
=
data
.
length
;
CGFloat
ratio
=
size
/
data
.
length
;
CGSize
size
=
CGSizeMake
((
NSUInteger
)(
resultImage
.
size
.
width
*
sqrtf
(
ratio
)),
(
NSUInteger
)(
resultImage
.
size
.
height
*
sqrtf
(
ratio
)));
UIGraphicsBeginImageContext
(
size
);
[
resultImage
drawInRect
:
CGRectMake
(
0
,
0
,
size
.
width
,
size
.
height
)];
resultImage
=
UIGraphicsGetImageFromCurrentImageContext
();
UIGraphicsEndImageContext
();
data
=
UIImageJPEGRepresentation
(
resultImage
,
1
.
0
);
}
return
data
;
}
+
(
CGFloat
)
getImageSize
:(
UIImage
*
)
image
{
NSData
*
compressedData
=
UIImageJPEGRepresentation
(
image
,
1
);
return
[
compressedData
length
];
}
+
(
UIImage
*
)
imageWithUrl
:(
id
)
imageUrl
{
NSURL
*
url
=
[
NSURL
URLWithString
:
imageUrl
];
if
(
url
==
nil
){
url
=
[
NSURL
URLWithString
:[
imageUrl
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
]];
}
NSData
*
imageData
=
[[
NSData
alloc
]
initWithContentsOfURL
:
url
];
return
[
UIImage
imageWithData
:
imageData
];
}
@end
This diff is collapsed.
Click to expand it.
total/Info.plist
View file @
bcfa14c3
...
...
@@ -19,7 +19,7 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.
3.9
<
/string
>
<
string
>
1.
4.0
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
...
...
This diff is collapsed.
Click to expand it.
total/Macro/GTOAppMacro.h
View file @
bcfa14c3
...
...
@@ -205,16 +205,16 @@ typedef NS_ENUM(NSInteger,ATTACHMENT_LOCATION){
//测试环境 测试VI检查、VI抽查、VI检查结果模块使用
//
#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 VIHTTP_REST_API_BASE_URL @"http://139.196.39.77:8280/total-server/rest"
//
#define VIHTTP_LOCAL_BASE_URL @"http://139.196.39.77:8280"
#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 VIHTTP_REST_API_BASE_URL @"http://139.196.39.77:8280/total-server/rest"
#define VIHTTP_LOCAL_BASE_URL @"http://139.196.39.77:8280"
//正式环境 正式VI检查、VI抽查、VI检查结果模块使用
#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:7080/total-server/rest"
#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:7080"
#define VIHTTP_REST_API_BASE_URL @"http://139.196.39.77:7280/total-server/rest"
#define VIHTTP_LOCAL_BASE_URL @"http://139.196.39.77:7280"
//
#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:7080/total-server/rest"
//
#define HTTP_LOCAL_BASE_URL @"http://139.196.39.77:7080"
//
#define VIHTTP_REST_API_BASE_URL @"http://139.196.39.77:7280/total-server/rest"
//
#define VIHTTP_LOCAL_BASE_URL @"http://139.196.39.77:7280"
//开发环境
//#define HTTP_LOCAL_BASE_URL @"http://192.168.1.176:8083"
...
...
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