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
abf8a10d
Commit
abf8a10d
authored
Dec 27, 2017
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VI检查添加字段控制是否拍照和是否从相册选取
parent
4ba86e22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
218 additions
and
736 deletions
+218
-736
project.pbxproj
total.xcodeproj/project.pbxproj
+90
-115
BusinessViewController.m
total/GTOApp/Business/BusinessViewController.m
+1
-1
InspectionAnswerTableViewCell.m
...ctionResults(VI巡检结果)/View/InspectionAnswerTableViewCell.m
+16
-1
PatrolExamAttachmentCell.m
...line(VI巡检)/Cells/QuestionCells/PatrolExamAttachmentCell.m
+1
-1
ZJPatrolDetail.h
...TOApp/Business/PatrolOnline(VI巡检)/Models/ZJPatrolDetail.h
+3
-3
PatrolAttachmentViewController.m
...e(VI巡检)/ViewConstrollers/PatrolAttachmentViewController.m
+2
-1
PatrolExamViewController.m
...lOnline(VI巡检)/ViewConstrollers/PatrolExamViewController.m
+1
-1
PatrolTempCheckViewController.m
...ne(VI巡检)/ViewConstrollers/PatrolTempCheckViewController.m
+2
-2
GTOLicenceNewViewController.h
total/GTOApp/Business/Repair/GTOLicenceNewViewController.h
+0
-15
GTOLicenceNewViewController.m
total/GTOApp/Business/Repair/GTOLicenceNewViewController.m
+0
-576
RequestManager.h
total/GTOApp/UserUtil/Network/RequestManager.h
+1
-1
RequestManager.m
total/GTOApp/UserUtil/Network/RequestManager.m
+1
-1
UrlConst.h
total/GTOApp/UserUtil/Network/UrlConst.h
+1
-1
UrlConst.m
total/GTOApp/UserUtil/Network/UrlConst.m
+1
-1
ZJPictureTableViewCell.h
total/GTOApp/UserUtil/PictureCell/ZJPictureTableViewCell.h
+9
-2
ZJPictureTableViewCell.m
total/GTOApp/UserUtil/PictureCell/ZJPictureTableViewCell.m
+51
-8
YXProgressHUDView.m
total/GTOApp/UserUtil/YXProgressHUDView/YXProgressHUDView.m
+0
-1
GTOAppMacro.h
total/Macro/GTOAppMacro.h
+38
-5
No files found.
total.xcodeproj/project.pbxproj
View file @
abf8a10d
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/BusinessViewController.m
View file @
abf8a10d
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
,
@"function_vicheck"
,
@"function_vicheck"
,
@"function_vicheckresult"
,
nil
];
,
@"function_vicheckresult"
,
nil
];
NSArray
*
titleArray
=
[
NSArray
arrayWithObjects
:
NSArray
*
titleArray
=
[
NSArray
arrayWithObjects
:
@"
临时VI检
查"
@"
VI抽
查"
,
@"VI检查任务"
,
@"VI检查任务"
,
@"VI检查结果"
,
nil
];
,
@"VI检查结果"
,
nil
];
NSDictionary
*
dict
=
@{
@"image"
:
[
imageArray
objectAtIndex
:
i
],
@"title"
:
[
titleArray
objectAtIndex
:
i
]};
NSDictionary
*
dict
=
@{
@"image"
:
[
imageArray
objectAtIndex
:
i
],
@"title"
:
[
titleArray
objectAtIndex
:
i
]};
...
...
total/GTOApp/Business/PatroIInspectionResults(VI巡检结果)/View/InspectionAnswerTableViewCell.m
View file @
abf8a10d
...
@@ -157,7 +157,22 @@
...
@@ -157,7 +157,22 @@
[
self
noAnswersCondition
];
return
;
[
self
noAnswersCondition
];
return
;
}
}
NewDetails
*
detail
=
[
self
.
answerModel
.
details
firstObject
];
NewDetails
*
detail
=
[
self
.
answerModel
.
details
firstObject
];
self
.
contentLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,(
detail
.
index
==
ONE
)?
@"是"
:
@"否"
];
NSString
*
string
;
switch
(
detail
.
index
)
{
case
1
:
string
=
@"是"
;
break
;
case
2
:
string
=
@"否"
;
break
;
case
3
:
string
=
@"无此项"
;
break
;
default
:
break
;
}
self
.
contentLabel
.
text
=
string
;
[
self
addImageAttachment
];
[
self
addImageAttachment
];
}
}
...
...
total/GTOApp/Business/PatrolOnline(VI巡检)/Cells/QuestionCells/PatrolExamAttachmentCell.m
View file @
abf8a10d
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
[
self
.
btnAtt
setTitleColor
:
RGBA
(
227
,
12
,
53
,
1
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setTitleColor
:
RGBA
(
227
,
12
,
53
,
1
)
forState
:
UIControlStateNormal
];
}
}
}
else
{
}
else
{
if
(
cellModel
.
question
.
needPhoto
)
{
if
(
photoType
(
cellModel
.
question
.
photoType
)
!=
PHOTO_TYPE_NO
)
{
[
self
.
btnAtt
setBackgroundImage
:
TCImage
(
@"patrol_exam_btn_bg_red"
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setBackgroundImage
:
TCImage
(
@"patrol_exam_btn_bg_red"
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setImage
:
TCImage
(
@"patrol_exam_camera_red"
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setImage
:
TCImage
(
@"patrol_exam_camera_red"
)
forState
:
UIControlStateNormal
];
if
(
self
.
cellModel
.
answer
.
resultAttachments
.
count
>
0
)
{
if
(
self
.
cellModel
.
answer
.
resultAttachments
.
count
>
0
)
{
...
...
total/GTOApp/Business/PatrolOnline(VI巡检)/Models/ZJPatrolDetail.h
View file @
abf8a10d
...
@@ -174,17 +174,17 @@
...
@@ -174,17 +174,17 @@
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
lineNo
;
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
lineNo
;
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
scoreTo
;
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
scoreTo
;
/**
/**
是否必须拍照
拍照类型
*/
*/
@property
(
nonatomic
,
assign
)
BOOL
needPhoto
;
@property
(
nonatomic
,
copy
)
NSString
*
photoType
;
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
scoreFrom
;
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
scoreFrom
;
@property
(
nonatomic
,
strong
)
NSString
<
Optional
>
*
reference
;
@property
(
nonatomic
,
strong
)
NSString
<
Optional
>
*
reference
;
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
star
;
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
star
;
@end
@end
...
...
total/GTOApp/Business/PatrolOnline(VI巡检)/ViewConstrollers/PatrolAttachmentViewController.m
View file @
abf8a10d
...
@@ -92,7 +92,8 @@
...
@@ -92,7 +92,8 @@
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
ZJPictureTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"ZJPictureTableViewCell"
forIndexPath
:
indexPath
];
ZJPictureTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"ZJPictureTableViewCell"
forIndexPath
:
indexPath
];
NSString
*
memarkString
=
[
NSString
stringWithFormat
:
@"%@ %@
\n
%@ %@"
,
kUser
.
f_user_name
,
self
.
cellModel
.
question
.
title
,[[
NSDate
date
]
httpParameterString
],
self
.
cellModel
.
viewModel
.
inspector
.
store_name
];
NSString
*
memarkString
=
[
NSString
stringWithFormat
:
@"%@ %@
\n
%@ %@"
,
kUser
.
f_user_name
,
self
.
cellModel
.
question
.
title
,[[
NSDate
date
]
httpParameterString
],
self
.
cellModel
.
viewModel
.
inspector
.
store_name
];
[
cell
configCellWithViewModel
:
self
.
viewModel
indexPath
:
indexPath
target
:
self
remarkString
:
memarkString
];
PHOTO_TYPE
type
=
photoType
(
self
.
cellModel
.
question
.
photoType
);
[
cell
configCellWithViewModel
:
self
.
viewModel
indexPath
:
indexPath
target
:
self
remarkString
:
memarkString
photoType
:
type
];
@weakify
(
self
);
@weakify
(
self
);
cell
.
blockReloadData
=
^
{
cell
.
blockReloadData
=
^
{
@strongify
(
self
);
@strongify
(
self
);
...
...
total/GTOApp/Business/PatrolOnline(VI巡检)/ViewConstrollers/PatrolExamViewController.m
View file @
abf8a10d
...
@@ -326,7 +326,7 @@
...
@@ -326,7 +326,7 @@
}
}
for
(
NSInteger
i
=
0
;
i
<
self
.
viewModel
.
arrCellData
.
count
;
i
++
)
{
for
(
NSInteger
i
=
0
;
i
<
self
.
viewModel
.
arrCellData
.
count
;
i
++
)
{
PatrolExamCellViewModel
*
vm
=
self
.
viewModel
.
arrCellData
[
i
];
PatrolExamCellViewModel
*
vm
=
self
.
viewModel
.
arrCellData
[
i
];
if
(
vm
.
question
.
needPhoto
)
{
if
(
1
)
{
if
([
questionArray
containsObject
:
vm
.
question
.
uuid
])
{
if
([
questionArray
containsObject
:
vm
.
question
.
uuid
])
{
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
i
inSection
:
0
];
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
i
inSection
:
0
];
[
self
.
tableView
scrollToRowAtIndexPath
:
indexPath
atScrollPosition
:(
UITableViewScrollPositionMiddle
)
animated
:
YES
];
[
self
.
tableView
scrollToRowAtIndexPath
:
indexPath
atScrollPosition
:(
UITableViewScrollPositionMiddle
)
animated
:
YES
];
...
...
total/GTOApp/Business/PatrolOnline(VI巡检)/ViewConstrollers/PatrolTempCheckViewController.m
View file @
abf8a10d
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
[
self
addStoreChildVc
];
[
self
addStoreChildVc
];
[
self
addHistoryButtonItem
];
[
self
addHistoryButtonItem
];
self
.
title
=
@"
临时VI检
查"
;
self
.
title
=
@"
VI抽
查"
;
}
}
#pragma mark -布局完成
#pragma mark -布局完成
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
[
RequestManager
request_CreatePatrolTempCheck
:
weakSelf
.
selectedStoreModel
.
uuid
success
:
^
(
id
returnValue
)
{
[
RequestManager
request_CreatePatrolTempCheck
:
weakSelf
.
selectedStoreModel
.
uuid
success
:
^
(
id
returnValue
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
hideHUDWithText
:
nil
];
if
([
BaseViewModel
verifyData
:
returnValue
])
{
if
([
BaseViewModel
verifyData
:
returnValue
])
{
[
IBTLoadingView
showTextOnly
:
@"生成VI
临时VI检
查任务成功"
];
[
IBTLoadingView
showTextOnly
:
@"生成VI
VI抽
查任务成功"
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
ZJPatrolDetail
*
detail
=
[
ZJPatrolDetail
modelWithDic
:[
BaseViewModel
formatData
:
returnValue
]];
ZJPatrolDetail
*
detail
=
[
ZJPatrolDetail
modelWithDic
:[
BaseViewModel
formatData
:
returnValue
]];
PatrolTaskCustomModel
*
customModel
=
[
PatrolTaskCustomModel
new
];
PatrolTaskCustomModel
*
customModel
=
[
PatrolTaskCustomModel
new
];
...
...
total/GTOApp/Business/Repair/GTOLicenceNewViewController.h
deleted
100644 → 0
View file @
4ba86e22
//
// GTORepairNewViewController.h
// total
//
// Created by freecui on 15/10/31.
// Copyright © 2015年 free. All rights reserved.
//
#import <UIKit/UIKit.h>
@class
GTORepair
;
@interface
GTOLicenceNewViewController
:
UIViewController
@property
(
nonatomic
,
strong
)
GTORepair
*
d_repair
;
//- (instancetype)initWithRepairUuid: (NSString *)repairUuid;
@end
total/GTOApp/Business/Repair/GTOLicenceNewViewController.m
deleted
100644 → 0
View file @
4ba86e22
This diff is collapsed.
Click to expand it.
total/GTOApp/UserUtil/Network/RequestManager.h
View file @
abf8a10d
...
@@ -152,7 +152,7 @@
...
@@ -152,7 +152,7 @@
+
(
void
)
request_UploadInspectResult
:(
NSString
*
)
taskUuid
parmeter
:(
NSDictionary
*
)
parmeter
success
:(
SuccessBlock
)
success
failure
:(
ErrorBlock
)
failure
;
+
(
void
)
request_UploadInspectResult
:(
NSString
*
)
taskUuid
parmeter
:(
NSDictionary
*
)
parmeter
success
:(
SuccessBlock
)
success
failure
:(
ErrorBlock
)
failure
;
/**
/**
生成VI
临时VI检
查
生成VI
VI抽
查
@param store_Uuid 油站ID
@param store_Uuid 油站ID
@param success 成功回调
@param success 成功回调
...
...
total/GTOApp/UserUtil/Network/RequestManager.m
View file @
abf8a10d
...
@@ -611,7 +611,7 @@
...
@@ -611,7 +611,7 @@
/**
/**
生成VI
临时VI检
查
生成VI
VI抽
查
@param store_Uuid 油站ID
@param store_Uuid 油站ID
@param success 成功回调
@param success 成功回调
...
...
total/GTOApp/UserUtil/Network/UrlConst.h
View file @
abf8a10d
...
@@ -28,7 +28,7 @@ UIKIT_EXTERN NSString *const PRAISEANDINSPECTOR_PROGRESS;
...
@@ -28,7 +28,7 @@ UIKIT_EXTERN NSString *const PRAISEANDINSPECTOR_PROGRESS;
UIKIT_EXTERN
NSString
*
const
SUPERVISOR_SERVICE
;
UIKIT_EXTERN
NSString
*
const
SUPERVISOR_SERVICE
;
//当日自检任务进度(首页)
//当日自检任务进度(首页)
UIKIT_EXTERN
NSString
*
const
QUERYPRAISESBYDAY
;
UIKIT_EXTERN
NSString
*
const
QUERYPRAISESBYDAY
;
//生成VI
临时VI检
查
//生成VI
VI抽
查
UIKIT_EXTERN
NSString
*
const
CREATEVITEMPCHECK
;
UIKIT_EXTERN
NSString
*
const
CREATEVITEMPCHECK
;
//当日自检任务列表、时间轴(首页)
//当日自检任务列表、时间轴(首页)
UIKIT_EXTERN
NSString
*
const
QUERYPRAISESBYDAY2
;
UIKIT_EXTERN
NSString
*
const
QUERYPRAISESBYDAY2
;
...
...
total/GTOApp/UserUtil/Network/UrlConst.m
View file @
abf8a10d
...
@@ -76,7 +76,7 @@ NSString *const QUERYPATROLINSPECTPLAN = @"vipatrol/plan/query/%@?start_date=%@&
...
@@ -76,7 +76,7 @@ NSString *const QUERYPATROLINSPECTPLAN = @"vipatrol/plan/query/%@?start_date=%@&
NSString
*
const
QUERYPATROLINSPECTDETAIL
=
@"vipatrol/plan/get_rstore_result/%@?store_uuid=%@"
;
NSString
*
const
QUERYPATROLINSPECTDETAIL
=
@"vipatrol/plan/get_rstore_result/%@?store_uuid=%@"
;
//查询VI检查任务附件
//查询VI检查任务附件
NSString
*
const
QUERYPATROLATTACHMENT
=
@"attachment/get_urls?entity_type=repairingBill&entity_uuid=%@"
;
NSString
*
const
QUERYPATROLATTACHMENT
=
@"attachment/get_urls?entity_type=repairingBill&entity_uuid=%@"
;
//生成VI
临时VI检
查
//生成VI
VI抽
查
NSString
*
const
CREATEVITEMPCHECK
=
@"vipatrol/plan/create_by_temporary/%@?store_uuid=%@"
;
NSString
*
const
CREATEVITEMPCHECK
=
@"vipatrol/plan/create_by_temporary/%@?store_uuid=%@"
;
//修改密码
//修改密码
NSString
*
const
CHANGEPASSWORD
=
@"user/change_password/%@?time=%@&operId=%@&operName=%@"
;
NSString
*
const
CHANGEPASSWORD
=
@"user/change_password/%@?time=%@&operId=%@&operName=%@"
;
...
...
total/GTOApp/UserUtil/PictureCell/ZJPictureTableViewCell.h
View file @
abf8a10d
...
@@ -13,12 +13,17 @@
...
@@ -13,12 +13,17 @@
typedef
void
(
^
repairBlock
)(
void
);
typedef
void
(
^
repairBlock
)(
void
);
@interface
ZJPictureTableViewCell
:
UITableViewCell
<
UICollectionViewDelegate
,
@interface
ZJPictureTableViewCell
:
UITableViewCell
<
UICollectionViewDelegate
,
UICollectionViewDataSource
,
DBCameraViewControllerDelegate
>
UICollectionViewDataSource
,
DBCameraViewControllerDelegate
,
DBCameraContainerDelegate
>
@property
(
weak
,
nonatomic
)
IBOutlet
UICollectionView
*
collectionView
;
@property
(
weak
,
nonatomic
)
IBOutlet
UICollectionView
*
collectionView
;
@property
(
weak
,
nonatomic
)
IBOutlet
UICollectionViewFlowLayout
*
layOut
;
@property
(
weak
,
nonatomic
)
IBOutlet
UICollectionViewFlowLayout
*
layOut
;
@property
(
weak
,
nonatomic
)
UIViewController
*
vc
;
@property
(
weak
,
nonatomic
)
UIViewController
*
vc
;
@property
(
strong
,
nonatomic
)
PicViewModel
*
viewModel
;
@property
(
strong
,
nonatomic
)
PicViewModel
*
viewModel
;
/**
附件选取类型
*/
@property
(
nonatomic
,
assign
)
PHOTO_TYPE
type
;
/**
/**
水印文字
水印文字
*/
*/
...
@@ -26,6 +31,8 @@ UICollectionViewDataSource,DBCameraViewControllerDelegate>
...
@@ -26,6 +31,8 @@ UICollectionViewDataSource,DBCameraViewControllerDelegate>
/** 是否显示添加按钮 */
/** 是否显示添加按钮 */
@property
(
nonatomic
,
copy
)
repairBlock
blockReloadData
;
@property
(
nonatomic
,
copy
)
repairBlock
blockReloadData
;
-
(
void
)
configCellWithViewModel
:(
PicViewModel
*
)
viewModel
indexPath
:(
NSIndexPath
*
)
indexPath
target
:(
UIViewController
*
)
target
remarkString
:(
NSString
*
)
remarkString
;
-
(
void
)
configCellWithViewModel
:(
PicViewModel
*
)
viewModel
indexPath
:(
NSIndexPath
*
)
indexPath
target
:(
UIViewController
*
)
target
remarkString
:(
NSString
*
)
remarkString
photoType
:(
PHOTO_TYPE
)
photoType
;
-
(
void
)
pushImagePickerController
;
-
(
void
)
pushImagePickerController
;
@end
@end
total/GTOApp/UserUtil/PictureCell/ZJPictureTableViewCell.m
View file @
abf8a10d
...
@@ -8,6 +8,9 @@
...
@@ -8,6 +8,9 @@
#import "ZJPictureTableViewCell.h"
#import "ZJPictureTableViewCell.h"
#import "ZJAddPictureCollectionCell.h"
#import "ZJAddPictureCollectionCell.h"
#import "DBCameraLibraryViewController.h"
#import "DBCameraContainerViewController.h"
@interface
ZJPictureTableViewCell
()
@interface
ZJPictureTableViewCell
()
...
@@ -22,13 +25,13 @@
...
@@ -22,13 +25,13 @@
self
.
layOut
.
minimumInteritemSpacing
=
10
;
self
.
layOut
.
minimumInteritemSpacing
=
10
;
self
.
layOut
.
minimumLineSpacing
=
10
;
self
.
layOut
.
minimumLineSpacing
=
10
;
self
.
layOut
.
sectionInset
=
UIEdgeInsetsMake
(
10
,
10
,
10
,
10
);
self
.
layOut
.
sectionInset
=
UIEdgeInsetsMake
(
10
,
10
,
10
,
10
);
// Initialization code
}
}
-
(
void
)
configCellWithViewModel
:
(
PicViewModel
*
)
viewModel
indexPath
:
(
NSIndexPath
*
)
indexPath
target
:
(
UIViewController
*
)
target
remarkString
:
(
NSString
*
)
remarkString
{
-
(
void
)
configCellWithViewModel
:
(
PicViewModel
*
)
viewModel
indexPath
:
(
NSIndexPath
*
)
indexPath
target
:
(
UIViewController
*
)
target
remarkString
:
(
NSString
*
)
remarkString
photoType
:
(
PHOTO_TYPE
)
photoType
{
self
.
vc
=
target
;
self
.
vc
=
target
;
self
.
viewModel
=
viewModel
;
self
.
viewModel
=
viewModel
;
self
.
remarkString
=
remarkString
;
self
.
remarkString
=
remarkString
;
self
.
type
=
photoType
;
//如果是只读的,则直接刷新。
//如果是只读的,则直接刷新。
if
(
self
.
viewModel
.
type
==
kPicCellTypeRead
)
{
if
(
self
.
viewModel
.
type
==
kPicCellTypeRead
)
{
[
self
.
collectionView
reloadData
];
[
self
.
collectionView
reloadData
];
...
@@ -98,15 +101,44 @@
...
@@ -98,15 +101,44 @@
}
}
#pragma mark - TZImagePickerController
#pragma mark - TZImagePickerController
-
(
void
)
pushImagePickerController
{
-
(
void
)
pushImagePickerController
{
DBCameraViewController
*
cameraVc
=
[
DBCameraViewController
initWithDelegate
:
self
];
switch
(
self
.
type
)
{
[
cameraVc
setUseCameraSegue
:
NO
];
case
PHOTO_TYPE_NO
:
[
self
.
vc
presentViewController
:
cameraVc
animated
:
YES
completion
:
nil
];
ShowDefaultErrorView
(
@"此分类不用拍照"
,
nil
);
break
;
case
PHOTO_TYPE_ONLYPHOTO
:
{
DBCameraViewController
*
cameraVc
=
[
DBCameraViewController
initWithDelegate
:
self
];
[
cameraVc
setUseCameraSegue
:
NO
];
[
self
.
vc
presentViewController
:
cameraVc
animated
:
YES
completion
:
nil
];
}
break
;
case
PHOTO_TYPE_ONLYLBUM
:
{
DBCameraLibraryViewController
*
vc
=
[[
DBCameraLibraryViewController
alloc
]
init
];
[
vc
setDelegate
:
self
];
[
IBTLoadingView
showProgressLabel
:
@"加载中"
];
[
self
.
vc
presentViewController
:
vc
animated
:
YES
completion
:^
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
}];
}
break
;
case
PHOTO_TYPE_ALL
:
{
DBCameraViewController
*
cameraController
=
[
DBCameraViewController
initWithDelegate
:
self
];
[
cameraController
setForceQuadCrop
:
YES
];
DBCameraContainerViewController
*
container
=
[[
DBCameraContainerViewController
alloc
]
initWithDelegate
:
self
];
[
container
setCameraViewController
:
cameraController
];
[
container
setFullScreenMode
];
[
self
.
vc
presentViewController
:
container
animated
:
YES
completion
:
nil
];
}
break
;
default
:
break
;
}
}
}
#pragma mark - DBCameraViewControllerDelegate
#pragma mark - DBCameraViewControllerDelegate
-
(
void
)
dismissCamera
:
(
id
)
cameraViewController
{
-
(
void
)
dismissCamera
:
(
id
)
cameraViewController
{
[
self
.
vc
dismissViewControllerAnimated
:
YES
completion
:
nil
];
[
self
.
vc
dismissViewControllerAnimated
:
YES
completion
:
nil
];
[
cameraViewController
restoreFullScreenMode
];
[
cameraViewController
restoreFullScreenMode
];
...
@@ -121,7 +153,6 @@
...
@@ -121,7 +153,6 @@
return
;
return
;
}
}
UIImage
*
newImage
=
[
image
rescaleImageToSize
:
CGSizeMake
(
ScreenSize
.
width
,
ScreenSize
.
width
*
4
/
3
)];
UIImage
*
newImage
=
[
image
rescaleImageToSize
:
CGSizeMake
(
ScreenSize
.
width
,
ScreenSize
.
width
*
4
/
3
)];
// NSString *string = [NSString stringWithFormat:@"%@ %@",kUser.f_user_name,[[NSDate date] httpParameterString]];
NSDictionary
*
fontDict
=
@{
NSForegroundColorAttributeName
:
[
UIColor
yellowColor
],
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
17
]};
NSDictionary
*
fontDict
=
@{
NSForegroundColorAttributeName
:
[
UIColor
yellowColor
],
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
17
]};
UIImage
*
waterImage
=
[
newImage
imageWaterMarkWithString
:
self
.
remarkString
point
:
CGPointMake
(
20
,
newImage
.
size
.
height
-
20
)
attribute
:
fontDict
];
UIImage
*
waterImage
=
[
newImage
imageWaterMarkWithString
:
self
.
remarkString
point
:
CGPointMake
(
20
,
newImage
.
size
.
height
-
20
)
attribute
:
fontDict
];
NSString
*
imageName
=
[
self
saveImageToLocal
:
waterImage
];
NSString
*
imageName
=
[
self
saveImageToLocal
:
waterImage
];
...
@@ -129,6 +160,18 @@
...
@@ -129,6 +160,18 @@
self
.
blockReloadData
();
self
.
blockReloadData
();
}
}
#pragma mark - DBCameraContainerDelegate
-
(
void
)
backFromController
:
(
id
)
fromController
{
[
self
.
vc
dismissViewControllerAnimated
:
YES
completion
:
nil
];
[
fromController
restoreFullScreenMode
];
}
-
(
void
)
switchFromController
:
(
id
)
fromController
toController
:
(
id
)
controller
{
}
#pragma mark -保存到本地
#pragma mark -保存到本地
-
(
NSString
*
)
saveImageToLocal
:
(
UIImage
*
)
image
-
(
NSString
*
)
saveImageToLocal
:
(
UIImage
*
)
image
{
{
...
...
total/GTOApp/UserUtil/YXProgressHUDView/YXProgressHUDView.m
View file @
abf8a10d
...
@@ -242,7 +242,6 @@ void PerformCustomHUDMethod(MBProgressHUD *hud,NSString *message,NSString *image
...
@@ -242,7 +242,6 @@ void PerformCustomHUDMethod(MBProgressHUD *hud,NSString *message,NSString *image
}
}
}
}
/**
/**
进度条
进度条
默认窗口
默认窗口
...
...
total/Macro/GTOAppMacro.h
View file @
abf8a10d
...
@@ -158,10 +158,39 @@ typedef NS_ENUM(NSInteger,ATTACHMENT_TYPE){
...
@@ -158,10 +158,39 @@ typedef NS_ENUM(NSInteger,ATTACHMENT_TYPE){
ATTACHMENT_VIDEO
ATTACHMENT_VIDEO
};
};
/**
VI检查拍照类型
- PHOTO_TYPE_NO: 不允许拍照
- PHOTO_TYPE_ONLYPHOTO: 只允许拍照
- PHOTO_TYPE_ONLYLBUM: 只允许从相册选取
- PHOTO_TYPE_ALL: 可以拍照,可以从相册获取
*/
typedef
NS_ENUM
(
NSInteger
,
PHOTO_TYPE
)
{
PHOTO_TYPE_NO
=
0
,
PHOTO_TYPE_ONLYPHOTO
,
PHOTO_TYPE_ONLYLBUM
,
PHOTO_TYPE_ALL
};
static
PHOTO_TYPE
photoType
(
NSString
*
type
)
{
if
([
type
isEqualToString
:
@"no"
])
{
return
PHOTO_TYPE_NO
;
}
if
([
type
isEqualToString
:
@"onlyphoto"
])
{
return
PHOTO_TYPE_ONLYPHOTO
;
}
if
([
type
isEqualToString
:
@"onlyalbum"
])
{
return
PHOTO_TYPE_ONLYLBUM
;
}
if
([
type
isEqualToString
:
@"all"
])
{
return
PHOTO_TYPE_ALL
;
}
return
PHOTO_TYPE_ONLYPHOTO
;
};
/**
/**
附件位置
附件位置
- ATTACHMENT_HTTP: 网络
- ATTACHMENT_HTTP: 网络
- ATTACHMENT_LOCAL: 本地
- ATTACHMENT_LOCAL: 本地
*/
*/
...
@@ -179,12 +208,16 @@ typedef NS_ENUM(NSInteger,ATTACHMENT_LOCATION){
...
@@ -179,12 +208,16 @@ 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_LOCAL_BASE_URL @"http://dev.gomoretech.com"
//#define HTTP_REST_API_BASE_URL @"http://dev.gomoretech.com/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
...
...
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