批量批改模块
This commit is contained in:
parent
9431fafde2
commit
af9396b696
|
@ -287,6 +287,7 @@
|
|||
CAA600D52CA9579800026CF4 /* KeTangXieZuoCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CAA600D42CA9579800026CF4 /* KeTangXieZuoCollectionViewCell.m */; };
|
||||
CAA600D92CA95AAC00026CF4 /* KeTangXieZuoNJViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CAA600D82CA95AAC00026CF4 /* KeTangXieZuoNJViewController.m */; };
|
||||
CAA600DD2CA95B0200026CF4 /* KeTangXieZuoNJTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CAA600DC2CA95B0200026CF4 /* KeTangXieZuoNJTableViewCell.m */; };
|
||||
CAAE0C1D2CF0297700830D4B /* PiLiangXiuGaiFailTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = CAAE0C1C2CF0297700830D4B /* PiLiangXiuGaiFailTableViewCell.m */; };
|
||||
CAAFA5EC2CD8597200A58D23 /* PptByOutlineModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CAAFA5EB2CD8597200A58D23 /* PptByOutlineModel.m */; };
|
||||
CAAFA5EF2CD85A1500A58D23 /* PptProgressModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CAAFA5EE2CD85A1500A58D23 /* PptProgressModel.m */; };
|
||||
CAAFA5F22CD85FC100A58D23 /* PPtYuLanZSViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CAAFA5F12CD85FC100A58D23 /* PPtYuLanZSViewController.m */; };
|
||||
|
@ -352,6 +353,10 @@
|
|||
CABA14EB2C9D7AB2002CB3B1 /* StartKeTangXieZuoView.m in Sources */ = {isa = PBXBuildFile; fileRef = CABA14EA2C9D7AB2002CB3B1 /* StartKeTangXieZuoView.m */; };
|
||||
CABA14ED2C9D7CE2002CB3B1 /* alimamashuheiti.ttf in Resources */ = {isa = PBXBuildFile; fileRef = CABA14EC2C9D7CE2002CB3B1 /* alimamashuheiti.ttf */; };
|
||||
CABC083E2CEEDF6D003FE507 /* CorrectConfigModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CABC083D2CEEDF6D003FE507 /* CorrectConfigModel.m */; };
|
||||
CABC08432CEF356B003FE507 /* BatchStatusByidModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CABC08422CEF356B003FE507 /* BatchStatusByidModel.m */; };
|
||||
CABC08462CEF384F003FE507 /* BatchCorrectModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CABC08452CEF384F003FE507 /* BatchCorrectModel.m */; };
|
||||
CABC08492CEF3A18003FE507 /* BatchCorrectSaveModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CABC08482CEF3A18003FE507 /* BatchCorrectSaveModel.m */; };
|
||||
CABC084C2CEF3AA0003FE507 /* BatchCorrectSaveDetailModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CABC084B2CEF3AA0003FE507 /* BatchCorrectSaveDetailModel.m */; };
|
||||
CABD8C752CBF61BB009A5E5E /* GongJuCreateSuperView.m in Sources */ = {isa = PBXBuildFile; fileRef = CABD8C742CBF61BB009A5E5E /* GongJuCreateSuperView.m */; };
|
||||
CABD8C792CBF6AC4009A5E5E /* GongJuCreateResultViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CABD8C782CBF6AC4009A5E5E /* GongJuCreateResultViewController.m */; };
|
||||
CABD8C7D2CBF6B6D009A5E5E /* GongJuCreateResultView.m in Sources */ = {isa = PBXBuildFile; fileRef = CABD8C7C2CBF6B6D009A5E5E /* GongJuCreateResultView.m */; };
|
||||
|
@ -1092,6 +1097,8 @@
|
|||
CAA600D82CA95AAC00026CF4 /* KeTangXieZuoNJViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KeTangXieZuoNJViewController.m; sourceTree = "<group>"; };
|
||||
CAA600DB2CA95B0200026CF4 /* KeTangXieZuoNJTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KeTangXieZuoNJTableViewCell.h; sourceTree = "<group>"; };
|
||||
CAA600DC2CA95B0200026CF4 /* KeTangXieZuoNJTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KeTangXieZuoNJTableViewCell.m; sourceTree = "<group>"; };
|
||||
CAAE0C1B2CF0297700830D4B /* PiLiangXiuGaiFailTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PiLiangXiuGaiFailTableViewCell.h; sourceTree = "<group>"; };
|
||||
CAAE0C1C2CF0297700830D4B /* PiLiangXiuGaiFailTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PiLiangXiuGaiFailTableViewCell.m; sourceTree = "<group>"; };
|
||||
CAAFA5EA2CD8597200A58D23 /* PptByOutlineModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PptByOutlineModel.h; sourceTree = "<group>"; };
|
||||
CAAFA5EB2CD8597200A58D23 /* PptByOutlineModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PptByOutlineModel.m; sourceTree = "<group>"; };
|
||||
CAAFA5ED2CD85A1500A58D23 /* PptProgressModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PptProgressModel.h; sourceTree = "<group>"; };
|
||||
|
@ -1217,6 +1224,14 @@
|
|||
CABA14EC2C9D7CE2002CB3B1 /* alimamashuheiti.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = alimamashuheiti.ttf; sourceTree = "<group>"; };
|
||||
CABC083C2CEEDF6D003FE507 /* CorrectConfigModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CorrectConfigModel.h; sourceTree = "<group>"; };
|
||||
CABC083D2CEEDF6D003FE507 /* CorrectConfigModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CorrectConfigModel.m; sourceTree = "<group>"; };
|
||||
CABC08412CEF356B003FE507 /* BatchStatusByidModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BatchStatusByidModel.h; sourceTree = "<group>"; };
|
||||
CABC08422CEF356B003FE507 /* BatchStatusByidModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BatchStatusByidModel.m; sourceTree = "<group>"; };
|
||||
CABC08442CEF384F003FE507 /* BatchCorrectModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BatchCorrectModel.h; sourceTree = "<group>"; };
|
||||
CABC08452CEF384F003FE507 /* BatchCorrectModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BatchCorrectModel.m; sourceTree = "<group>"; };
|
||||
CABC08472CEF3A18003FE507 /* BatchCorrectSaveModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BatchCorrectSaveModel.h; sourceTree = "<group>"; };
|
||||
CABC08482CEF3A18003FE507 /* BatchCorrectSaveModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BatchCorrectSaveModel.m; sourceTree = "<group>"; };
|
||||
CABC084A2CEF3AA0003FE507 /* BatchCorrectSaveDetailModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BatchCorrectSaveDetailModel.h; sourceTree = "<group>"; };
|
||||
CABC084B2CEF3AA0003FE507 /* BatchCorrectSaveDetailModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BatchCorrectSaveDetailModel.m; sourceTree = "<group>"; };
|
||||
CABD8C732CBF61BB009A5E5E /* GongJuCreateSuperView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GongJuCreateSuperView.h; sourceTree = "<group>"; };
|
||||
CABD8C742CBF61BB009A5E5E /* GongJuCreateSuperView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GongJuCreateSuperView.m; sourceTree = "<group>"; };
|
||||
CABD8C772CBF6AC4009A5E5E /* GongJuCreateResultViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GongJuCreateResultViewController.h; sourceTree = "<group>"; };
|
||||
|
@ -2293,6 +2308,8 @@
|
|||
CA2A38DC2CEB2CD900156CD2 /* PiLiangXiuGaiTableViewCell.m */,
|
||||
CA2A38DE2CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.h */,
|
||||
CA2A38DF2CEB3AF400156CD2 /* PiLiangXiuGaiPGTableViewCell.m */,
|
||||
CAAE0C1B2CF0297700830D4B /* PiLiangXiuGaiFailTableViewCell.h */,
|
||||
CAAE0C1C2CF0297700830D4B /* PiLiangXiuGaiFailTableViewCell.m */,
|
||||
);
|
||||
path = cell;
|
||||
sourceTree = "<group>";
|
||||
|
@ -3556,6 +3573,14 @@
|
|||
CAAFA5F42CD86E7C00A58D23 /* PptHestoryModel.m */,
|
||||
CABC083C2CEEDF6D003FE507 /* CorrectConfigModel.h */,
|
||||
CABC083D2CEEDF6D003FE507 /* CorrectConfigModel.m */,
|
||||
CABC08412CEF356B003FE507 /* BatchStatusByidModel.h */,
|
||||
CABC08422CEF356B003FE507 /* BatchStatusByidModel.m */,
|
||||
CABC08442CEF384F003FE507 /* BatchCorrectModel.h */,
|
||||
CABC08452CEF384F003FE507 /* BatchCorrectModel.m */,
|
||||
CABC08472CEF3A18003FE507 /* BatchCorrectSaveModel.h */,
|
||||
CABC08482CEF3A18003FE507 /* BatchCorrectSaveModel.m */,
|
||||
CABC084A2CEF3AA0003FE507 /* BatchCorrectSaveDetailModel.h */,
|
||||
CABC084B2CEF3AA0003FE507 /* BatchCorrectSaveDetailModel.m */,
|
||||
);
|
||||
path = models;
|
||||
sourceTree = "<group>";
|
||||
|
@ -5052,6 +5077,7 @@
|
|||
CA0C3A832CB4C27E00E01A72 /* HuanGeSiLuViewController.m in Sources */,
|
||||
CA0C3A962CB4D06600E01A72 /* ChongXieYiPianView.m in Sources */,
|
||||
CA5D03732CC0E8D9007B3BA5 /* ShareAlterView.m in Sources */,
|
||||
CABC08462CEF384F003FE507 /* BatchCorrectModel.m in Sources */,
|
||||
CA4257982CA2914100A36A10 /* StartZNPPTHUDAlter.m in Sources */,
|
||||
CA6B97222CBCEB56000213F3 /* AIChatArcView.m in Sources */,
|
||||
CA5D03602CC0DE8D007B3BA5 /* YaoQingGZView.m in Sources */,
|
||||
|
@ -5109,6 +5135,7 @@
|
|||
CA22D1D02CD091AF00CA7E93 /* PicAiSaveDetailModel.m in Sources */,
|
||||
CA0C3AA22CB4DBB900E01A72 /* DuanLuoXieZuoView.m in Sources */,
|
||||
CA0D08542CA543370086855E /* ShouYeLSZWPGTableViewCell.m in Sources */,
|
||||
CABC08492CEF3A18003FE507 /* BatchCorrectSaveModel.m in Sources */,
|
||||
CABA14EB2C9D7AB2002CB3B1 /* StartKeTangXieZuoView.m in Sources */,
|
||||
CABA14642C9D0B25002CB3B1 /* FanWenViewController.m in Sources */,
|
||||
CA5D02A22CC0B2DE007B3BA5 /* GunYuController.m in Sources */,
|
||||
|
@ -5212,8 +5239,10 @@
|
|||
CB489F7B2744A0BD00DA044A /* UIImageView+VideoImageView.m in Sources */,
|
||||
CB489F602744A0BD00DA044A /* GETCorelLocation.m in Sources */,
|
||||
CB489F892744A0BD00DA044A /* TagInfoModel.m in Sources */,
|
||||
CABC084C2CEF3AA0003FE507 /* BatchCorrectSaveDetailModel.m in Sources */,
|
||||
CABA14712C9D0D4E002CB3B1 /* StartViewController.m in Sources */,
|
||||
CA2A38D32CEB0C4600156CD2 /* MosaiPath.m in Sources */,
|
||||
CABC08432CEF356B003FE507 /* BatchStatusByidModel.m in Sources */,
|
||||
CABA14892C9D2AE2002CB3B1 /* StartGNTiShiView.m in Sources */,
|
||||
CAF76E7A2CBE569500825E5E /* SearchInputHestoryView.m in Sources */,
|
||||
CA5D02E12CC0DD6B007B3BA5 /* M3u8Model.m in Sources */,
|
||||
|
@ -5242,6 +5271,7 @@
|
|||
CB489F982744A0BD00DA044A /* BaseModel.m in Sources */,
|
||||
CA4257B92CA2C42E00A36A10 /* StartPayTQView.m in Sources */,
|
||||
CAA600D52CA9579800026CF4 /* KeTangXieZuoCollectionViewCell.m in Sources */,
|
||||
CAAE0C1D2CF0297700830D4B /* PiLiangXiuGaiFailTableViewCell.m in Sources */,
|
||||
CA8EE5172CC88B22009D73E3 /* ExamplePptModel.m in Sources */,
|
||||
CB489F9B2744A0BD00DA044A /* YSAPIClient.m in Sources */,
|
||||
CB489F822744A0BD00DA044A /* NSData+Base64.m in Sources */,
|
||||
|
|
Binary file not shown.
22
ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_lsjl.imageset/Contents.json
vendored
Normal file
22
ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_lsjl.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "容器@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "容器@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
22
ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_tjzw.imageset/Contents.json
vendored
Normal file
22
ProductApp/ProductApp/Assets.xcassets/首页/批量批改/plpg_tjzw.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "容器@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "容器@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
|
@ -312,7 +312,7 @@ static UserInfoModel *userinfo;
|
|||
+(void)quanXianJiaoYan:(UIViewController *)vc scence:(NSString *)scence ispush:(BOOL)ispush back:(UserInfoModelQuanXianBack)backValue
|
||||
{
|
||||
[LoadAlterView show];
|
||||
[PublicNetWorkManager requestUserAuthData:nil scene:@"scence" Callback:^(BOOL state, UserAuthModel *responseObject, NSString * _Nullable describle) {
|
||||
[PublicNetWorkManager requestUserAuthData:nil scene:scence Callback:^(BOOL state, UserAuthModel *responseObject, NSString * _Nullable describle) {
|
||||
[LoadAlterView dismiss];
|
||||
if(state)
|
||||
{
|
||||
|
|
|
@ -43,6 +43,10 @@
|
|||
#import "PptHestoryModel.h"
|
||||
|
||||
#import "CorrectConfigModel.h"
|
||||
#import "BatchStatusByidModel.h"
|
||||
#import "BatchCorrectModel.h"
|
||||
#import "BatchCorrectSaveModel.h"
|
||||
#import "BatchCorrectSaveDetailModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
@ -720,24 +724,27 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
images:(NSArray *)images
|
||||
Callback:(completeModeBlock)callback;
|
||||
|
||||
/*
|
||||
查询单个状态
|
||||
/api/batch/correct/status
|
||||
id
|
||||
*/
|
||||
+ (void)requestBatchCorrectStatusData:(UIView *)view
|
||||
ID:(NSString *)ID
|
||||
Callback:(completeModeBlock)callback;
|
||||
///*
|
||||
// 查询单个状态
|
||||
// /api/batch/correct/status
|
||||
// id
|
||||
// */
|
||||
//+ (void)requestBatchCorrectStatusData:(UIView *)view
|
||||
// ID:(NSString *)ID
|
||||
// Callback:(completeModeBlock)callback;
|
||||
|
||||
/*
|
||||
查询单个数据
|
||||
/api/batch/correct/detail
|
||||
id
|
||||
批量查询状态详情
|
||||
/api/batch/status/byid
|
||||
ids
|
||||
*/
|
||||
+ (void)requestBatchCorrectDetailData:(UIView *)view
|
||||
ID:(NSString *)ID
|
||||
+ (void)requestBatchStatusByidData:(UIView *)view
|
||||
ids:(NSString *)ids
|
||||
Callback:(completeModeBlock)callback;
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
保存记录
|
||||
/api/batch/correct/save
|
||||
|
@ -765,14 +772,6 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
ID:(NSString *)ID
|
||||
Callback:(completeModeBlock)callback;
|
||||
|
||||
/*
|
||||
查询某时间后批改状态
|
||||
/api/batch/status
|
||||
start_time
|
||||
*/
|
||||
+ (void)requestBatchStatusData:(UIView *)view
|
||||
start_time:(NSString *)start_time
|
||||
Callback:(completeModeBlock)callback;
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -2196,5 +2196,190 @@
|
|||
}];
|
||||
}
|
||||
|
||||
#pragma mark - 批量批改
|
||||
|
||||
/*
|
||||
新建记录
|
||||
/api/batch/correct
|
||||
config_id
|
||||
images [] 图片ID
|
||||
*/
|
||||
+ (void)requestBatchCorrectData:(UIView *)view
|
||||
config_id:(NSString *)config_id
|
||||
images:(NSArray *)images
|
||||
Callback:(completeModeBlock)callback
|
||||
{
|
||||
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||
|
||||
|
||||
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||
|
||||
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||
[dicpush setObject:[Tools isStringnil:config_id] forKey:@"config_id"];
|
||||
[dicpush setObject:images forKey:@"images"];
|
||||
|
||||
|
||||
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:2 url:@"api/batch/correct" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
|
||||
BOOL state = NO;
|
||||
NSString *describle = @"";
|
||||
if (responseObject==nil) {
|
||||
describle = @"网络错误";
|
||||
BaseModel *model = [BaseModel new];
|
||||
model.message =describle;
|
||||
callback(state,model,describle);
|
||||
}else{
|
||||
NSDictionary *dicAll=responseObject;
|
||||
describle = dicAll[@"message"];
|
||||
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
|
||||
state = YES;
|
||||
}
|
||||
callback(state,[BatchCorrectModel yy_modelWithJSON:dicAll],describle);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
/*
|
||||
批量查询状态详情
|
||||
/api/batch/status/byid
|
||||
ids
|
||||
*/
|
||||
+ (void)requestBatchStatusByidData:(UIView *)view
|
||||
ids:(NSString *)ids
|
||||
Callback:(completeModeBlock)callback
|
||||
{
|
||||
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||
[dicQuery setObject:[Tools isStringnil:ids] forKey:@"ids"];
|
||||
|
||||
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||
|
||||
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||
|
||||
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/batch/status/byid" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
|
||||
BOOL state = NO;
|
||||
NSString *describle = @"";
|
||||
if (responseObject==nil) {
|
||||
describle = @"网络错误";
|
||||
BaseModel *model = [BaseModel new];
|
||||
model.message =describle;
|
||||
callback(state,model,describle);
|
||||
}else{
|
||||
NSDictionary *dicAll=responseObject;
|
||||
describle = dicAll[@"message"];
|
||||
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
|
||||
state = YES;
|
||||
}
|
||||
callback(state,[BatchStatusByidModel yy_modelWithJSON:dicAll],describle);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
/*
|
||||
保存记录
|
||||
/api/batch/correct/save
|
||||
id
|
||||
*/
|
||||
+ (void)requestBatchCorrectSaveData:(UIView *)view
|
||||
ID:(NSString *)ID
|
||||
Callback:(completeModeBlock)callback
|
||||
{
|
||||
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||
|
||||
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||
|
||||
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||
[dicpush setObject:[Tools isStringnil:ID] forKey:@"id"];
|
||||
|
||||
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:2 url:@"api/batch/correct/save" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
|
||||
BOOL state = NO;
|
||||
NSString *describle = @"";
|
||||
if (responseObject==nil) {
|
||||
describle = @"网络错误";
|
||||
BaseModel *model = [BaseModel new];
|
||||
model.message =describle;
|
||||
callback(state,model,describle);
|
||||
}else{
|
||||
NSDictionary *dicAll=responseObject;
|
||||
describle = dicAll[@"message"];
|
||||
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
|
||||
state = YES;
|
||||
}
|
||||
callback(state,[BaseModel yy_modelWithJSON:dicAll],describle);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
/*
|
||||
获取记录列表
|
||||
/api/batch/correct/save
|
||||
page
|
||||
*/
|
||||
+ (void)requestBatchCorrectSaveListData:(UIView *)view
|
||||
page:(NSString *)page
|
||||
Callback:(completeModeBlock)callback
|
||||
{
|
||||
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||
[dicQuery setObject:[Tools isStringnil:page] forKey:@"page"];
|
||||
[dicQuery setObject:@"10" forKey:@"size"];
|
||||
|
||||
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||
|
||||
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||
|
||||
|
||||
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/batch/correct/save" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
|
||||
BOOL state = NO;
|
||||
NSString *describle = @"";
|
||||
if (responseObject==nil) {
|
||||
describle = @"网络错误";
|
||||
BaseModel *model = [BaseModel new];
|
||||
model.message =describle;
|
||||
callback(state,model,describle);
|
||||
}else{
|
||||
NSDictionary *dicAll=responseObject;
|
||||
describle = dicAll[@"message"];
|
||||
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
|
||||
state = YES;
|
||||
}
|
||||
callback(state,[BatchStatusByidModel yy_modelWithJSON:dicAll],describle);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
/*
|
||||
获取记录详情
|
||||
/api/batch/correct/save/detail
|
||||
id
|
||||
*/
|
||||
+ (void)requestBatchCorrectSaveDetailData:(UIView *)view
|
||||
ID:(NSString *)ID
|
||||
Callback:(completeModeBlock)callback
|
||||
{
|
||||
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
|
||||
[dicQuery setObject:[Tools isStringnil:ID] forKey:@"id"];
|
||||
|
||||
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
|
||||
|
||||
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||
|
||||
|
||||
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/batch/correct/save/detail" paraments:dicpush Headers:dicHeader Query:dicQuery completeBlock:^(id _Nullable responseObject, NSError * _Nullable error) {
|
||||
BOOL state = NO;
|
||||
NSString *describle = @"";
|
||||
if (responseObject==nil) {
|
||||
describle = @"网络错误";
|
||||
BaseModel *model = [BaseModel new];
|
||||
model.message =describle;
|
||||
callback(state,model,describle);
|
||||
}else{
|
||||
NSDictionary *dicAll=responseObject;
|
||||
describle = dicAll[@"message"];
|
||||
if ([[NSString stringWithFormat:@"%@",dicAll[@"code"]] intValue] == 0) {
|
||||
state = YES;
|
||||
}
|
||||
callback(state,[BatchCorrectSaveDetailModel yy_modelWithJSON:dicAll],describle);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -175,7 +175,7 @@
|
|||
BOOL isremoven = NO;
|
||||
if(stralltemp.length>1)
|
||||
{
|
||||
if([stralltemp containsString:@"#"] || [stralltemp containsString:@"*"])
|
||||
if([stralltemp containsString:@"#"] || [stralltemp containsString:@"*"]||[stralltemp containsString:@"#"] || [stralltemp containsString:@"*"])
|
||||
{
|
||||
isremoven = YES;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
//
|
||||
// BatchCorrectModel.h
|
||||
// ProductApp
|
||||
//
|
||||
// Created by 工作 on 2024/11/21.
|
||||
//
|
||||
|
||||
#import "BaseModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class BatchCorrectModelData;
|
||||
@interface BatchCorrectModel : BaseModel
|
||||
///
|
||||
@property (nonatomic , strong) BatchCorrectModelData *data;
|
||||
@end
|
||||
@interface BatchCorrectModelData : NSObject
|
||||
///
|
||||
@property (nonatomic , strong) NSString *ID;
|
||||
///
|
||||
@property (nonatomic , strong) NSString *config_id;
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) NSArray *images;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,26 @@
|
|||
//
|
||||
// BatchCorrectModel.m
|
||||
// ProductApp
|
||||
//
|
||||
// Created by 工作 on 2024/11/21.
|
||||
//
|
||||
|
||||
#import "BatchCorrectModel.h"
|
||||
|
||||
#import "BatchStatusByidModel.h"
|
||||
|
||||
@implementation BatchCorrectModel
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||
return @{@"data" : [BatchCorrectModelData class]};
|
||||
}
|
||||
@end
|
||||
@implementation BatchCorrectModelData
|
||||
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper
|
||||
{
|
||||
return @{@"ID" : @"id"};
|
||||
}
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||
return @{@"images" : [BatchStatusByidModelDataItemsImages class]};
|
||||
}
|
||||
@end
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
//
|
||||
// BatchCorrectSaveDetailModel.h
|
||||
// ProductApp
|
||||
//
|
||||
// Created by 工作 on 2024/11/21.
|
||||
//
|
||||
|
||||
#import "BaseModel.h"
|
||||
#import "BatchStatusByidModel.h"
|
||||
@class BatchStatusByidModelDataItems;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class BatchCorrectSaveDetailModelData;
|
||||
@interface BatchCorrectSaveDetailModel : BaseModel
|
||||
///
|
||||
@property (nonatomic , strong) BatchCorrectSaveDetailModelData *data;
|
||||
@end
|
||||
@interface BatchCorrectSaveDetailModelData : BatchStatusByidModelDataItems
|
||||
///
|
||||
@property (nonatomic , strong) NSDictionary *result;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// BatchCorrectSaveDetailModel.m
|
||||
// ProductApp
|
||||
//
|
||||
// Created by 工作 on 2024/11/21.
|
||||
//
|
||||
|
||||
#import "BatchCorrectSaveDetailModel.h"
|
||||
|
||||
|
||||
@implementation BatchCorrectSaveDetailModel
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||
return @{@"data" : [BatchCorrectSaveDetailModelData class]};
|
||||
}
|
||||
@end
|
||||
@implementation BatchCorrectSaveDetailModelData
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
//
|
||||
// BatchCorrectSaveModel.h
|
||||
// ProductApp
|
||||
//
|
||||
// Created by 工作 on 2024/11/21.
|
||||
//
|
||||
|
||||
#import "BaseModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class BatchCorrectSaveModelData;
|
||||
@interface BatchCorrectSaveModel : BaseModel
|
||||
///
|
||||
@property (nonatomic , strong) BatchCorrectSaveModelData *data;
|
||||
@end
|
||||
@interface BatchCorrectSaveModelData : NSObject
|
||||
///
|
||||
@property (nonatomic , strong) NSArray *items;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,21 @@
|
|||
//
|
||||
// BatchCorrectSaveModel.m
|
||||
// ProductApp
|
||||
//
|
||||
// Created by 工作 on 2024/11/21.
|
||||
//
|
||||
|
||||
#import "BatchCorrectSaveModel.h"
|
||||
#import "BatchCorrectSaveDetailModel.h"
|
||||
|
||||
@implementation BatchCorrectSaveModel
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||
return @{@"data" : [BatchCorrectSaveModelData class]};
|
||||
}
|
||||
@end
|
||||
@implementation BatchCorrectSaveModelData
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||
return @{@"items" : [BatchCorrectSaveDetailModelData class]};
|
||||
}
|
||||
@end
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
//
|
||||
// BatchStatusByidModel.h
|
||||
// ProductApp
|
||||
//
|
||||
// Created by 工作 on 2024/11/21.
|
||||
//
|
||||
|
||||
#import "BaseModel.h"
|
||||
|
||||
@class CorrectConfigModelDataItemConfig;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class BatchStatusByidModelData,BatchStatusByidModelDataItems,BatchStatusByidModelDataItemsConfig,BatchStatusByidModelDataItemsImages;
|
||||
@interface BatchStatusByidModel : BaseModel
|
||||
///
|
||||
@property (nonatomic , strong) BatchStatusByidModelData *data;
|
||||
@end
|
||||
@interface BatchStatusByidModelData : NSObject
|
||||
///
|
||||
@property (nonatomic , strong) NSArray *items;
|
||||
@end
|
||||
@interface BatchStatusByidModelDataItems : NSObject
|
||||
///
|
||||
@property (nonatomic , strong) NSString *title;
|
||||
///
|
||||
@property (nonatomic , strong) NSString *comment;
|
||||
///
|
||||
@property (nonatomic , strong) NSString *score;
|
||||
///
|
||||
@property (nonatomic , strong) NSString *config_id;
|
||||
///
|
||||
@property (nonatomic , strong) BatchStatusByidModelDataItemsConfig *config;
|
||||
///
|
||||
@property (nonatomic , strong) NSString *status;
|
||||
///
|
||||
@property (nonatomic , strong) NSArray *images;
|
||||
///
|
||||
@property (nonatomic , strong) NSString *create_time;
|
||||
///
|
||||
@property (nonatomic , strong) NSString *ID;
|
||||
///0 等待 1 成功 2失败
|
||||
@property (nonatomic , strong) NSString *complete_status;
|
||||
|
||||
///是否保存 自己添加的字段
|
||||
@property (nonatomic , assign) BOOL issave;
|
||||
|
||||
@end
|
||||
|
||||
@interface BatchStatusByidModelDataItemsConfig : NSObject
|
||||
///
|
||||
@property (nonatomic , strong) NSString *ID;
|
||||
///
|
||||
@property (nonatomic , strong) NSString *name;
|
||||
///
|
||||
@property (nonatomic , strong) NSString *is_default;
|
||||
///
|
||||
@property (nonatomic , strong) NSString *score;
|
||||
///
|
||||
@property (nonatomic , strong) CorrectConfigModelDataItemConfig *config;
|
||||
|
||||
@end
|
||||
|
||||
@interface BatchStatusByidModelDataItemsImages : NSObject
|
||||
///
|
||||
@property (nonatomic , strong) NSString *ID;
|
||||
///
|
||||
@property (nonatomic , strong) NSString *url;
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,47 @@
|
|||
//
|
||||
// BatchStatusByidModel.m
|
||||
// ProductApp
|
||||
//
|
||||
// Created by 工作 on 2024/11/21.
|
||||
//
|
||||
|
||||
#import "BatchStatusByidModel.h"
|
||||
#import "CorrectConfigModel.h"
|
||||
|
||||
@implementation BatchStatusByidModel
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||
return @{@"data" : [BatchStatusByidModelData class]};
|
||||
}
|
||||
@end
|
||||
@implementation BatchStatusByidModelData
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||
return @{@"items" : [BatchStatusByidModelDataItems class]};
|
||||
}
|
||||
@end
|
||||
@implementation BatchStatusByidModelDataItems
|
||||
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper
|
||||
{
|
||||
return @{@"ID" : @"id"};
|
||||
}
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||
return @{@"config" : [BatchStatusByidModelDataItemsConfig class],
|
||||
@"images" : [BatchStatusByidModelDataItemsImages class]};
|
||||
}
|
||||
@end
|
||||
@implementation BatchStatusByidModelDataItemsConfig
|
||||
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper
|
||||
{
|
||||
return @{@"ID" : @"id"};
|
||||
}
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||
return @{@"config" : [CorrectConfigModelDataItemConfig class]};
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation BatchStatusByidModelDataItemsImages
|
||||
+ (nullable NSDictionary<NSString *, id> *)modelCustomPropertyMapper
|
||||
{
|
||||
return @{@"ID" : @"id"};
|
||||
}
|
||||
@end
|
||||
|
|
@ -47,6 +47,10 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
@property (nonatomic , strong) NSString *name;
|
||||
///
|
||||
@property (nonatomic , strong) NSString *scene;
|
||||
|
||||
///自己加的字段
|
||||
///显示的页面
|
||||
@property (nonatomic , strong) UIView *viewshow;
|
||||
@end
|
||||
@interface CorrectConfigModelDataItemConfigSingle_score : NSObject
|
||||
///
|
||||
|
|
|
@ -13,11 +13,36 @@
|
|||
#import "CamreViewController.h"
|
||||
#import "PLPGSetListController.h"
|
||||
#import "PLPGDetailViewController.h"
|
||||
|
||||
#import "NetWorkManager.h"
|
||||
#import "PublicUploadImageManager.h"
|
||||
#import "PiLiangXiuGaiFailTableViewCell.h"
|
||||
|
||||
@interface PiLiangXiuGaiViewController ()<UITableViewDelegate,UITableViewDataSource>
|
||||
///
|
||||
@property (nonatomic , strong) UITableView *tableView;
|
||||
///
|
||||
@property (nonatomic , strong) UILabel *lbzd;
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) NSString *strid;
|
||||
|
||||
///当前上传图片
|
||||
@property (nonatomic , strong) NSMutableArray *arrNowImages;
|
||||
@property (nonatomic , assign) int inowUpImageTag;
|
||||
///
|
||||
@property (nonatomic , strong) NSMutableArray *arrNowImagesID;
|
||||
|
||||
///显示的数据id
|
||||
@property (nonatomic , strong) NSMutableArray *arrDataIDs;
|
||||
///显示的数据
|
||||
@property (nonatomic , strong) NSMutableArray *arrData;
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) NSTimer *timer;
|
||||
|
||||
|
||||
///需要移除的数据
|
||||
@property (nonatomic , strong) NSString *strremoveid;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -32,7 +57,8 @@
|
|||
[self.navigationView setTitle:@"批量批改" titleColor:RGBCOLOR(60, 60, 60)];
|
||||
[self.navigationView setBackgroundColor:[UIColor clearColor]];
|
||||
[self.navigationView setMuenTitle:@"历史记录" titleColor:RGBCOLOR(26, 26, 26)];
|
||||
[self.navigationView setMuenImg:@""];
|
||||
[self.navigationView setMuenImg:@"plpg_lsjl"];
|
||||
self.navigationView.muenBtnWidth.constant = 80;
|
||||
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
|
||||
}
|
||||
-(void)viewWillDisappear:(BOOL)animated
|
||||
|
@ -45,6 +71,8 @@
|
|||
[NomoAlterView showInfo:@"退出后会清空列表,是否退出" SelectTag:^(NSInteger tag) {
|
||||
if(tag==1)
|
||||
{
|
||||
[self.timer invalidate];
|
||||
self.timer = nil;
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
}];
|
||||
|
@ -95,6 +123,15 @@
|
|||
}];
|
||||
[self drawBottomView:viewbottom];
|
||||
|
||||
[self getdataConfig];
|
||||
|
||||
self.arrDataIDs = [NSMutableArray new];
|
||||
self.arrData = [NSMutableArray new];
|
||||
|
||||
self.timer = [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(getListData) userInfo:nil repeats:YES];
|
||||
[[NSRunLoop mainRunLoop] addTimer:self.timer forMode:NSDefaultRunLoopMode];
|
||||
[[NSRunLoop mainRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes];
|
||||
|
||||
}
|
||||
-(void)drawBottomView:(UIView *)view
|
||||
{
|
||||
|
@ -104,7 +141,7 @@
|
|||
[btadd.titleLabel setFont:[UIFont systemFontOfSize:15]];
|
||||
[btadd.layer setMasksToBounds:YES];
|
||||
[btadd.layer setCornerRadius:6];
|
||||
// [btadd setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
|
||||
[btadd setImage:[UIImage imageNamed:@"plpg_tjzw"] forState:UIControlStateNormal];
|
||||
[view addSubview:btadd];
|
||||
[btadd mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.offset(16);
|
||||
|
@ -178,6 +215,7 @@
|
|||
make.centerY.equalTo(view);
|
||||
make.right.equalTo(imgvnext.mas_left).offset(-4);
|
||||
}];
|
||||
_lbzd = lbzd;
|
||||
|
||||
UIButton *btzdy = [[UIButton alloc] init];
|
||||
[view addSubview:btzdy];
|
||||
|
@ -192,37 +230,209 @@
|
|||
{
|
||||
PLPGSetListController *vc = [PLPGSetListController new];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
[vc setBackValue:^(CorrectConfigModelDataItem * _Nonnull model) {
|
||||
self.lbzd.text = model.name;
|
||||
///
|
||||
self.strid = model.ID;
|
||||
}];
|
||||
}
|
||||
///添加作文
|
||||
-(void)addAction
|
||||
{
|
||||
if([Tools isStringnil:self.strid].length==0)
|
||||
{
|
||||
[HXHud showMessage:@"请添加通用批改设置" afterDelayType:0];
|
||||
return;
|
||||
}
|
||||
CamreViewController *vc = [CamreViewController new];
|
||||
vc.type = 1;
|
||||
vc.ispiliangpigai = YES;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
[vc setBackImages:^(NSMutableArray * _Nonnull arrbackImages) {
|
||||
///
|
||||
[LoadAlterView show];
|
||||
self.arrNowImages = arrbackImages;
|
||||
self.inowUpImageTag = 0;
|
||||
self.arrNowImagesID = [NSMutableArray new];
|
||||
[self uploadImage];
|
||||
}];
|
||||
[UserInfoModel shijianShangBao:0 key:@"client.jump.to.camera" value:@"correct" extra:@""];
|
||||
}
|
||||
///重新拍照上传
|
||||
-(void)updateAddAction
|
||||
{
|
||||
if([Tools isStringnil:self.strid].length==0)
|
||||
{
|
||||
[HXHud showMessage:@"请添加通用批改设置" afterDelayType:0];
|
||||
return;
|
||||
}
|
||||
CamreViewController *vc = [CamreViewController new];
|
||||
vc.type = 1;
|
||||
vc.ispiliangpigai = YES;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
[vc setBackImages:^(NSMutableArray * _Nonnull arrbackImages) {
|
||||
///
|
||||
[LoadAlterView show];
|
||||
self.arrNowImages = arrbackImages;
|
||||
self.inowUpImageTag = 0;
|
||||
self.arrNowImagesID = [NSMutableArray new];
|
||||
[self uploadImage];
|
||||
|
||||
for(BatchStatusByidModelDataItems *model in self.arrData)
|
||||
{
|
||||
if([model.ID isEqualToString:self.strremoveid])
|
||||
{
|
||||
[self.arrData removeObject:model];
|
||||
break;
|
||||
}
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
|
||||
}];
|
||||
[UserInfoModel shijianShangBao:0 key:@"client.jump.to.camera" value:@"correct" extra:@""];
|
||||
}
|
||||
|
||||
-(void)getdataConfig
|
||||
{
|
||||
[LoadAlterView show];
|
||||
[NetWorkManager requestCorrectConfigData:self.view page:@"1" Callback:^(BOOL state, CorrectConfigModel *responseObject, NSString * _Nullable describle) {
|
||||
[LoadAlterView dismiss];
|
||||
|
||||
if(state)
|
||||
{
|
||||
for(CorrectConfigModelDataItem *model in responseObject.data.items)
|
||||
{
|
||||
if(model.is_default)
|
||||
{
|
||||
self.lbzd.text = model.name;
|
||||
self.strid = model.ID;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||
}
|
||||
}];
|
||||
}
|
||||
///上传图片
|
||||
-(void)uploadImage
|
||||
{
|
||||
NSString *strurl = @"api/correct/image";
|
||||
[[PublicUploadImageManager shareManager] netWorkUrlUserPost:[NSString stringWithFormat:@"%@%@",BaseUrl,strurl] UploadImage:self.arrNowImages[self.inowUpImageTag] dicQuery:@{} Callback:^(BOOL state, NSDictionary *responseObject, NSString * _Nullable describle) {
|
||||
if(state)
|
||||
{
|
||||
[self.arrNowImagesID addObject:[Tools isStringnil:[responseObject objectForKey:@"id"]]];
|
||||
}
|
||||
else
|
||||
{
|
||||
[HXHud showMessage:describle afterDelayType:1];
|
||||
}
|
||||
self.inowUpImageTag++;
|
||||
if(self.inowUpImageTag>=self.arrNowImages.count)
|
||||
{///上传完
|
||||
[self createCorrect];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self uploadImage];
|
||||
}
|
||||
}];
|
||||
}
|
||||
///新建记录
|
||||
-(void)createCorrect
|
||||
{
|
||||
[NetWorkManager requestBatchCorrectData:self.view config_id:self.strid images:self.arrNowImagesID Callback:^(BOOL state, BatchCorrectModel *responseObject, NSString * _Nullable describle) {
|
||||
[LoadAlterView dismiss];
|
||||
if(state)
|
||||
{
|
||||
[self.arrDataIDs addObject:responseObject.data];
|
||||
[self getListData];
|
||||
}
|
||||
else
|
||||
{
|
||||
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||
}
|
||||
}];
|
||||
}
|
||||
///批量查询数据
|
||||
-(void)getListData
|
||||
{
|
||||
if(self.arrDataIDs.count==0)return;
|
||||
|
||||
NSMutableArray *arrids = [NSMutableArray new];
|
||||
for(BatchCorrectModelData *model in self.arrDataIDs)
|
||||
{
|
||||
[arrids addObject:[Tools isStringnil:model.ID]];
|
||||
}
|
||||
|
||||
[NetWorkManager requestBatchStatusByidData:self.view ids:[arrids componentsJoinedByString:@","] Callback:^(BOOL state, BatchStatusByidModel *responseObject, NSString * _Nullable describle) {
|
||||
if(state)
|
||||
{
|
||||
for(BatchStatusByidModelDataItems *model in responseObject.data.items)
|
||||
{
|
||||
if(model.complete_status.intValue>0)
|
||||
{
|
||||
for(BatchCorrectModelData *modelids in self.arrDataIDs)
|
||||
{
|
||||
if([modelids.ID isEqualToString:model.ID])
|
||||
{
|
||||
[self.arrDataIDs removeObject:modelids];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
BOOL isyou = NO;
|
||||
for(int i=0; i < self.arrData.count; i++)
|
||||
{
|
||||
BatchStatusByidModelDataItems *modeltemp = self.arrData[i];
|
||||
if([modeltemp.ID isEqualToString:model.ID])
|
||||
{
|
||||
isyou = YES;
|
||||
if(model.complete_status.intValue>0)
|
||||
{
|
||||
[self.arrData replaceObjectAtIndex:i withObject:model];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(isyou==NO)
|
||||
{
|
||||
[self.arrData addObject:model];
|
||||
if(model.complete_status.intValue == 0)
|
||||
{
|
||||
for(BatchCorrectModelData *modelids in self.arrDataIDs)
|
||||
{
|
||||
if([modelids.ID isEqualToString:model.ID])
|
||||
{
|
||||
model.images = modelids.images;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UITableView
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return 5;
|
||||
return self.arrData.count;
|
||||
}
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
if(indexPath.row==0)
|
||||
{
|
||||
static NSString *strcell = @"PiLiangXiuGaiPGTableViewCell";
|
||||
PiLiangXiuGaiPGTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell];
|
||||
if(!cell)
|
||||
{
|
||||
cell = [[PiLiangXiuGaiPGTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:strcell];
|
||||
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
|
||||
[cell setBackgroundColor:[UIColor clearColor]];
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
BatchStatusByidModelDataItems *model = self.arrData[indexPath.row];
|
||||
if(model.complete_status.intValue == 1)
|
||||
{///成功
|
||||
static NSString *strcell = @"PiLiangXiuGaiTableViewCell";
|
||||
PiLiangXiuGaiTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell];
|
||||
if(!cell)
|
||||
|
@ -231,9 +441,43 @@
|
|||
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
|
||||
[cell setBackgroundColor:[UIColor clearColor]];
|
||||
}
|
||||
cell.model = model;
|
||||
|
||||
return cell;
|
||||
}
|
||||
else if(model.complete_status.intValue == 2)
|
||||
{///失败
|
||||
static NSString *strcell = @"PiLiangXiuGaiFailTableViewCell";
|
||||
PiLiangXiuGaiFailTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell];
|
||||
if(!cell)
|
||||
{
|
||||
cell = [[PiLiangXiuGaiFailTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:strcell];
|
||||
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
|
||||
[cell setBackgroundColor:[UIColor clearColor]];
|
||||
}
|
||||
cell.model = model;
|
||||
[cell setBackValue:^(BatchStatusByidModelDataItems * _Nonnull model) {
|
||||
self.strremoveid = model.ID;
|
||||
[self updateAddAction];
|
||||
}];
|
||||
|
||||
return cell;
|
||||
}
|
||||
else
|
||||
{///批改中
|
||||
static NSString *strcell = @"PiLiangXiuGaiPGTableViewCell";
|
||||
PiLiangXiuGaiPGTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strcell];
|
||||
if(!cell)
|
||||
{
|
||||
cell = [[PiLiangXiuGaiPGTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:strcell];
|
||||
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
|
||||
[cell setBackgroundColor:[UIColor clearColor]];
|
||||
}
|
||||
cell.model = model;
|
||||
|
||||
return cell;
|
||||
}
|
||||
}
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
return 10;
|
||||
|
@ -256,7 +500,10 @@
|
|||
}
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
BatchStatusByidModelDataItems *model = self.arrData[indexPath.row];
|
||||
if(model.complete_status.intValue!=1)return;
|
||||
PLPGDetailViewController *vc = [PLPGDetailViewController new];
|
||||
vc.modelDetail = self.arrData[indexPath.row];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
//
|
||||
// PiLiangXiuGaiFailTableViewCell.h
|
||||
// ProductApp
|
||||
//
|
||||
// Created by 工作 on 2024/11/22.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "BatchStatusByidModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
typedef void(^PiLiangXiuGaiFailTableViewCellBack)(BatchStatusByidModelDataItems *model);
|
||||
@interface PiLiangXiuGaiFailTableViewCell : UITableViewCell
|
||||
///
|
||||
@property (nonatomic , strong) BatchStatusByidModelDataItems *model;
|
||||
|
||||
///重新拍照上传
|
||||
@property (nonatomic , strong) PiLiangXiuGaiFailTableViewCellBack backValue;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
|
@ -0,0 +1,174 @@
|
|||
//
|
||||
// PiLiangXiuGaiFailTableViewCell.m
|
||||
// ProductApp
|
||||
//
|
||||
// Created by 工作 on 2024/11/22.
|
||||
//
|
||||
|
||||
#import "PiLiangXiuGaiFailTableViewCell.h"
|
||||
#import "XLPhotoBrowser.h"
|
||||
#import "CamreViewController.h"
|
||||
|
||||
@interface PiLiangXiuGaiFailTableViewCell ()
|
||||
///
|
||||
@property (nonatomic , strong) UIImageView *imgvback;
|
||||
|
||||
@property (nonatomic , strong) UILabel *lbname;
|
||||
@property (nonatomic , strong) UILabel *lbinfo;
|
||||
@property (nonatomic , strong) UILabel *lbtime;
|
||||
@end
|
||||
|
||||
@implementation PiLiangXiuGaiFailTableViewCell
|
||||
|
||||
-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
|
||||
{
|
||||
if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
|
||||
{
|
||||
UIView *viewback = [[UIView alloc] init];
|
||||
[viewback setBackgroundColor:[UIColor whiteColor]];
|
||||
[self.contentView addSubview:viewback];
|
||||
[viewback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.offset(16);
|
||||
make.right.equalTo(self).offset(-16);
|
||||
make.top.offset(0);
|
||||
make.bottom.equalTo(self).offset(-10);
|
||||
}];
|
||||
[Tools normalShadow:viewback shadowColor:RGBACOLOR(0, 80, 106, 0.1) shadowOpacity:0 cornerRadius:8 shadowRadius:10];
|
||||
|
||||
UIImageView *imgvback = [[UIImageView alloc] init];
|
||||
[viewback addSubview:imgvback];
|
||||
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.offset(12);
|
||||
make.top.offset(14);
|
||||
make.bottom.equalTo(viewback).offset(-14);
|
||||
make.width.offset(72);
|
||||
}];
|
||||
[imgvback.layer setMasksToBounds:YES];
|
||||
[imgvback.layer setCornerRadius:6];
|
||||
[imgvback.layer setBorderWidth:1];
|
||||
[imgvback.layer setBorderColor:RGBCOLOR(42, 211, 237).CGColor];
|
||||
_imgvback = imgvback;
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self addJianBianLine:imgvback colors:@[(id)RGBCOLOR(42, 211, 237).CGColor,(id)RGBCOLOR(148, 127, 255).CGColor] start:CGPointMake(0, 0) end:CGPointMake(0, 1)];
|
||||
});
|
||||
|
||||
UIButton *btimg = [[UIButton alloc] init];
|
||||
[viewback addSubview:btimg];
|
||||
[btimg mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(imgvback);
|
||||
}];
|
||||
[btimg addTarget:self action:@selector(imageAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
|
||||
UILabel *lbname = [[UILabel alloc] init];
|
||||
[lbname setText:@"批改失败"];
|
||||
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
|
||||
[lbname setTextAlignment:NSTextAlignmentLeft];
|
||||
[lbname setFont:[UIFont boldSystemFontOfSize:14]];
|
||||
[viewback addSubview:lbname];
|
||||
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.offset(14);
|
||||
make.left.equalTo(imgvback.mas_right).offset(12);
|
||||
make.right.equalTo(viewback).offset(-90);
|
||||
}];
|
||||
_lbname = lbname;
|
||||
|
||||
UILabel *lbinfo = [[UILabel alloc] init];
|
||||
[lbinfo setText:@"可能是您的图片不清晰,请【重新拍照上传】试试,若还是不行请联系客服。"];
|
||||
[lbinfo setTextColor:RGBCOLOR(153, 153, 153)];
|
||||
[lbinfo setTextAlignment:NSTextAlignmentLeft];
|
||||
[lbinfo setFont:[UIFont systemFontOfSize:12]];
|
||||
[lbinfo setNumberOfLines:2];
|
||||
[viewback addSubview:lbinfo];
|
||||
[lbinfo mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(lbname);
|
||||
make.top.equalTo(lbname.mas_bottom).offset(6);
|
||||
make.right.equalTo(viewback).offset(-12);
|
||||
}];
|
||||
_lbinfo = lbinfo;
|
||||
|
||||
UILabel *lbtime = [[UILabel alloc] init];
|
||||
[lbtime setText:@"2024-10-17 14:10:23"];
|
||||
[lbtime setTextColor:RGBCOLOR(153, 153, 153)];
|
||||
[lbtime setTextAlignment:NSTextAlignmentLeft];
|
||||
[lbtime setFont:[UIFont systemFontOfSize:10]];
|
||||
[viewback addSubview:lbtime];
|
||||
[lbtime mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(lbname);
|
||||
make.bottom.equalTo(imgvback).offset(-5);
|
||||
}];
|
||||
_lbtime = lbtime;
|
||||
|
||||
UIButton *btcheck = [[UIButton alloc] init];
|
||||
[btcheck setTitle:@"重新拍照上传" forState:UIControlStateNormal];
|
||||
[btcheck setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
[btcheck.titleLabel setFont:[UIFont systemFontOfSize:12]];
|
||||
[btcheck.layer setMasksToBounds:YES];
|
||||
[btcheck.layer setCornerRadius:4];
|
||||
[btcheck setBackgroundColor:RGBCOLOR(108, 119, 246)];
|
||||
[viewback addSubview:btcheck];
|
||||
[btcheck mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.equalTo(lbinfo);
|
||||
make.centerY.equalTo(lbtime);
|
||||
make.size.sizeOffset(CGSizeMake(84, 24));
|
||||
}];
|
||||
[btcheck addTarget:self action:@selector(chakanAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
///给边框添加渐变
|
||||
-(void)addJianBianLine:(UIView *)myView colors:(NSArray *)colors start:(CGPoint)start end:(CGPoint)end
|
||||
{
|
||||
// 创建CAGradientLayer实例
|
||||
CAGradientLayer *gradientLayer = [CAGradientLayer layer];
|
||||
gradientLayer.frame = myView.bounds; // 确保layer的大小和view相同
|
||||
// 设置渐变色
|
||||
gradientLayer.colors = colors;
|
||||
// 设置渐变方向
|
||||
gradientLayer.startPoint = start;
|
||||
gradientLayer.endPoint = end;
|
||||
|
||||
// 创建一个子layer来渲染渐变效果,而不是直接在view的layer上
|
||||
CALayer *borderLayer = [CALayer layer];
|
||||
borderLayer.frame = CGRectInset(myView.bounds, 1, 1); // 内边框
|
||||
borderLayer.masksToBounds = YES;
|
||||
borderLayer.contents = (__bridge id)([UIImage new].CGImage);
|
||||
// 将渐变layer添加为borderLayer的mask
|
||||
borderLayer.mask = gradientLayer;
|
||||
// 将borderLayer添加到view的layer上
|
||||
[myView.layer addSublayer:borderLayer];
|
||||
}
|
||||
-(void)setModel:(BatchStatusByidModelDataItems *)model
|
||||
{
|
||||
_model = model;
|
||||
if(model.images.count>0)
|
||||
{
|
||||
BatchStatusByidModelDataItemsImages *modelimage = [model.images firstObject];
|
||||
[self.imgvback sd_setImageWithURL:[NSURL URLWithString:[Tools isStringnil:modelimage.url]] placeholderImage:nil];
|
||||
}
|
||||
self.lbtime.text = [Tools isStringnilkong:model.create_time];
|
||||
|
||||
}
|
||||
|
||||
-(void)imageAction
|
||||
{
|
||||
NSMutableArray *arrimageurl = [NSMutableArray new];
|
||||
for(BatchStatusByidModelDataItemsImages *modelimage in self.model.images)
|
||||
{
|
||||
[arrimageurl addObject:[Tools isStringnil:modelimage.url]];
|
||||
}
|
||||
[XLPhotoBrowser showPhotoBrowserWithImages:arrimageurl currentImageIndex:0];
|
||||
}
|
||||
|
||||
-(void)chakanAction
|
||||
{
|
||||
///重新拍照上传
|
||||
if(self.backValue)
|
||||
{
|
||||
self.backValue(self.model);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
|
@ -6,11 +6,12 @@
|
|||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "BatchStatusByidModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface PiLiangXiuGaiPGTableViewCell : UITableViewCell
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) BatchStatusByidModelDataItems *model;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
|
|
@ -6,10 +6,11 @@
|
|||
//
|
||||
|
||||
#import "PiLiangXiuGaiPGTableViewCell.h"
|
||||
|
||||
#import "XLPhotoBrowser.h"
|
||||
|
||||
@interface PiLiangXiuGaiPGTableViewCell ()
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) UIImageView *imgvback;
|
||||
@end
|
||||
|
||||
@implementation PiLiangXiuGaiPGTableViewCell
|
||||
|
@ -30,7 +31,6 @@
|
|||
[Tools normalShadow:viewback shadowColor:RGBACOLOR(0, 80, 106, 0.1) shadowOpacity:0 cornerRadius:8 shadowRadius:10];
|
||||
|
||||
UIImageView *imgvback = [[UIImageView alloc] init];
|
||||
// [imgvback setImage:[UIImage imageNamed:@""]];
|
||||
[viewback addSubview:imgvback];
|
||||
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.offset(12);
|
||||
|
@ -42,11 +42,18 @@
|
|||
[imgvback.layer setCornerRadius:6];
|
||||
[imgvback.layer setBorderWidth:1];
|
||||
[imgvback.layer setBorderColor:RGBCOLOR(42, 211, 237).CGColor];
|
||||
// _imgvback = imgvback;
|
||||
_imgvback = imgvback;
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self addJianBianLine:imgvback colors:@[(id)RGBCOLOR(42, 211, 237).CGColor,(id)RGBCOLOR(148, 127, 255).CGColor] start:CGPointMake(0, 0) end:CGPointMake(0, 1)];
|
||||
});
|
||||
|
||||
UIButton *btimg = [[UIButton alloc] init];
|
||||
[viewback addSubview:btimg];
|
||||
[btimg mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(imgvback);
|
||||
}];
|
||||
[btimg addTarget:self action:@selector(imageAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
UILabel *lbname = [[UILabel alloc] init];
|
||||
[lbname setText:@"批改中..."];
|
||||
[lbname setTextColor:RGBCOLOR(255, 59, 55)];
|
||||
|
@ -84,4 +91,25 @@
|
|||
// 将borderLayer添加到view的layer上
|
||||
[myView.layer addSublayer:borderLayer];
|
||||
}
|
||||
|
||||
-(void)setModel:(BatchStatusByidModelDataItems *)model
|
||||
{
|
||||
_model = model;
|
||||
if(model.images.count>0)
|
||||
{
|
||||
BatchStatusByidModelDataItemsImages *modelimage = [model.images firstObject];
|
||||
[self.imgvback sd_setImageWithURL:[NSURL URLWithString:[Tools isStringnil:modelimage.url]] placeholderImage:nil];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)imageAction
|
||||
{
|
||||
NSMutableArray *arrimageurl = [NSMutableArray new];
|
||||
for(BatchStatusByidModelDataItemsImages *modelimage in self.model.images)
|
||||
{
|
||||
[arrimageurl addObject:[Tools isStringnil:modelimage.url]];
|
||||
}
|
||||
[XLPhotoBrowser showPhotoBrowserWithImages:arrimageurl currentImageIndex:0];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -6,11 +6,12 @@
|
|||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "BatchStatusByidModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface PiLiangXiuGaiTableViewCell : UITableViewCell
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) BatchStatusByidModelDataItems *model;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
|
|
@ -8,9 +8,20 @@
|
|||
#import "PiLiangXiuGaiTableViewCell.h"
|
||||
|
||||
#import "PingYuAlterView.h"
|
||||
#import "NetWorkManager.h"
|
||||
#import "XLPhotoBrowser.h"
|
||||
|
||||
@interface PiLiangXiuGaiTableViewCell ()
|
||||
///
|
||||
@property (nonatomic , strong) UIImageView *imgvback;
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) UILabel *lbfen;
|
||||
@property (nonatomic , strong) UILabel *lbname;
|
||||
@property (nonatomic , strong) UILabel *lbinfo;
|
||||
@property (nonatomic , strong) UILabel *lbtime;
|
||||
@property (nonatomic , strong) UIButton *btsave;
|
||||
@property (nonatomic , strong) UIView *viewpoint;
|
||||
@end
|
||||
|
||||
@implementation PiLiangXiuGaiTableViewCell
|
||||
|
@ -31,7 +42,6 @@
|
|||
[Tools normalShadow:viewback shadowColor:RGBACOLOR(0, 80, 106, 0.1) shadowOpacity:0 cornerRadius:8 shadowRadius:10];
|
||||
|
||||
UIImageView *imgvback = [[UIImageView alloc] init];
|
||||
// [imgvback setImage:[UIImage imageNamed:@""]];
|
||||
[viewback addSubview:imgvback];
|
||||
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.offset(12);
|
||||
|
@ -43,11 +53,18 @@
|
|||
[imgvback.layer setCornerRadius:6];
|
||||
[imgvback.layer setBorderWidth:1];
|
||||
[imgvback.layer setBorderColor:RGBCOLOR(42, 211, 237).CGColor];
|
||||
// _imgvback = imgvback;
|
||||
_imgvback = imgvback;
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self addJianBianLine:imgvback colors:@[(id)RGBCOLOR(42, 211, 237).CGColor,(id)RGBCOLOR(148, 127, 255).CGColor] start:CGPointMake(0, 0) end:CGPointMake(0, 1)];
|
||||
});
|
||||
|
||||
UIButton *btimg = [[UIButton alloc] init];
|
||||
[viewback addSubview:btimg];
|
||||
[btimg mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(imgvback);
|
||||
}];
|
||||
[btimg addTarget:self action:@selector(imageAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
UIView *viewfen = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 30, 16)];
|
||||
[imgvback addSubview:viewfen];
|
||||
[viewfen mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
@ -73,6 +90,7 @@
|
|||
[lbfen mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(viewfen);
|
||||
}];
|
||||
_lbfen = lbfen;
|
||||
|
||||
UILabel *lbname = [[UILabel alloc] init];
|
||||
[lbname setText:@"抓星星的奇妙瞬间"];
|
||||
|
@ -85,6 +103,7 @@
|
|||
make.left.equalTo(imgvback.mas_right).offset(12);
|
||||
make.right.equalTo(viewback).offset(-90);
|
||||
}];
|
||||
_lbname = lbname;
|
||||
|
||||
UILabel *lbinfo = [[UILabel alloc] init];
|
||||
[lbinfo setText:@"评语:请加强语句结构化,静态事物描述不够仔细,其中有错别字..."];
|
||||
|
@ -98,6 +117,7 @@
|
|||
make.top.equalTo(lbname.mas_bottom).offset(6);
|
||||
make.right.equalTo(viewback).offset(-12);
|
||||
}];
|
||||
_lbinfo = lbinfo;
|
||||
|
||||
UILabel *lbtime = [[UILabel alloc] init];
|
||||
[lbtime setText:@"2024-10-17 14:10:23"];
|
||||
|
@ -109,6 +129,7 @@
|
|||
make.left.equalTo(lbname);
|
||||
make.bottom.equalTo(imgvback).offset(-5);
|
||||
}];
|
||||
_lbtime = lbtime;
|
||||
|
||||
UIButton *btxq = [[UIButton alloc] init];
|
||||
[btxq setTitle:@"查看详情" forState:UIControlStateNormal];
|
||||
|
@ -156,6 +177,7 @@
|
|||
make.height.offset(24);
|
||||
}];
|
||||
[btsave addTarget:self action:@selector(saveAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
_btsave =btsave;
|
||||
|
||||
UIView *viewpoint = [[UIView alloc] init];
|
||||
[viewpoint setBackgroundColor:RGBCOLOR(12, 219, 199)];
|
||||
|
@ -168,15 +190,16 @@
|
|||
[viewpoint.layer setMasksToBounds:YES];
|
||||
[viewpoint.layer setCornerRadius:2.5];
|
||||
[viewpoint setHidden:YES];
|
||||
_viewpoint = viewpoint;
|
||||
|
||||
[btsave setTitle:@"已保存" forState:UIControlStateNormal];
|
||||
[btsave setTitleColor:RGBCOLOR(12, 219, 199) forState:UIControlStateNormal];
|
||||
[btsave mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.offset(47);
|
||||
}];
|
||||
[btsave setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight];///UIControlContentHorizontalAlignmentCenter
|
||||
[viewpoint setHidden:NO];
|
||||
[btsave setBackgroundColor:[UIColor clearColor]];
|
||||
// [btsave setTitle:@"已保存" forState:UIControlStateNormal];
|
||||
// [btsave setTitleColor:RGBCOLOR(12, 219, 199) forState:UIControlStateNormal];
|
||||
// [btsave mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
// make.width.offset(47);
|
||||
// }];
|
||||
// [btsave setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight];///UIControlContentHorizontalAlignmentCenter
|
||||
// [viewpoint setHidden:NO];
|
||||
// [btsave setBackgroundColor:[UIColor clearColor]];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -202,15 +225,83 @@
|
|||
// 将borderLayer添加到view的layer上
|
||||
[myView.layer addSublayer:borderLayer];
|
||||
}
|
||||
-(void)setModel:(BatchStatusByidModelDataItems *)model
|
||||
{
|
||||
_model = model;
|
||||
if(model.images.count>0)
|
||||
{
|
||||
BatchStatusByidModelDataItemsImages *modelimage = [model.images firstObject];
|
||||
[self.imgvback sd_setImageWithURL:[NSURL URLWithString:[Tools isStringnil:modelimage.url]] placeholderImage:nil];
|
||||
}
|
||||
|
||||
self.lbname.text = [Tools isStringnilkong:model.title];
|
||||
self.lbinfo.text = [Tools isStringnilkong:model.comment];
|
||||
self.lbtime.text = [Tools isStringnilkong:model.create_time];
|
||||
self.lbfen.text = [NSString stringWithFormat:@"%d分",model.score.intValue];
|
||||
if(model.issave)
|
||||
{
|
||||
[self.btsave setTitle:@"已保存" forState:UIControlStateNormal];
|
||||
[self.btsave setTitleColor:RGBCOLOR(12, 219, 199) forState:UIControlStateNormal];
|
||||
[self.btsave mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.offset(47);
|
||||
}];
|
||||
[self.btsave setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight];///UIControlContentHorizontalAlignmentCenter
|
||||
[self.viewpoint setHidden:NO];
|
||||
[self.btsave setBackgroundColor:[UIColor clearColor]];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self.btsave setTitle:@"保存" forState:UIControlStateNormal];
|
||||
[self.btsave setTitleColor:RGBCOLOR(255, 119, 29) forState:UIControlStateNormal];
|
||||
[self.btsave mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.offset(44);
|
||||
}];
|
||||
[self.btsave setContentHorizontalAlignment:UIControlContentHorizontalAlignmentCenter];///UIControlContentHorizontalAlignmentCenter
|
||||
[self.viewpoint setHidden:YES];
|
||||
[self.btsave setBackgroundColor:RGBCOLOR(255, 241, 232)];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)chakanAction
|
||||
{
|
||||
[PingYuAlterView showInfo:@"这篇作文以成长的脚步为线索,贯穿了作者从幼儿园到初中的心路历程,情感真挚,描绘细腻。作者巧妙地运用了不同的比喻和引用,展现了成长中的种种感悟,整体上是一篇富有深意和文采的作文。"];
|
||||
[PingYuAlterView showInfo:self.model.comment];
|
||||
}
|
||||
|
||||
-(void)saveAction
|
||||
{
|
||||
if(self.model.issave)return;
|
||||
[LoadAlterView show];
|
||||
[NetWorkManager requestBatchCorrectSaveData:self ID:self.model.ID Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
|
||||
[LoadAlterView dismiss];
|
||||
if(state)
|
||||
{
|
||||
self.model.issave = YES;
|
||||
|
||||
[self.btsave setTitle:@"已保存" forState:UIControlStateNormal];
|
||||
[self.btsave setTitleColor:RGBCOLOR(12, 219, 199) forState:UIControlStateNormal];
|
||||
[self.btsave mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.offset(47);
|
||||
}];
|
||||
[self.btsave setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight];///UIControlContentHorizontalAlignmentCenter
|
||||
[self.viewpoint setHidden:NO];
|
||||
[self.btsave setBackgroundColor:[UIColor clearColor]];
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||
}
|
||||
}];
|
||||
}
|
||||
-(void)imageAction
|
||||
{
|
||||
NSMutableArray *arrimageurl = [NSMutableArray new];
|
||||
for(BatchStatusByidModelDataItemsImages *modelimage in self.model.images)
|
||||
{
|
||||
[arrimageurl addObject:[Tools isStringnil:modelimage.url]];
|
||||
}
|
||||
[XLPhotoBrowser showPhotoBrowserWithImages:arrimageurl currentImageIndex:0];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -7,12 +7,19 @@
|
|||
|
||||
#import "PiLiangXiuGaiLiShiViewController.h"
|
||||
#import "PiLiangXiuGaiLiShiTableViewCell.h"
|
||||
#import "NetWorkManager.h"
|
||||
#import "PLPGDetailViewController.h"
|
||||
|
||||
|
||||
@interface PiLiangXiuGaiLiShiViewController ()<UITableViewDelegate,UITableViewDataSource>
|
||||
@interface PiLiangXiuGaiLiShiViewController ()<UITableViewDelegate,UITableViewDataSource,DZNEmptyDataSetDelegate,DZNEmptyDataSetSource>
|
||||
///
|
||||
@property (nonatomic , strong) UITableView *tableView;
|
||||
|
||||
@property (nonatomic , assign) int ipage;
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) NSMutableArray *arrdata;
|
||||
|
||||
@end
|
||||
|
||||
@implementation PiLiangXiuGaiLiShiViewController
|
||||
|
@ -43,12 +50,46 @@
|
|||
make.bottom.equalTo(self.view);
|
||||
}];
|
||||
_tableView = tableView;
|
||||
[self.tableView setEmptyDataSetDelegate:self];
|
||||
[self.tableView setEmptyDataSetSource:self];
|
||||
tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||
self.ipage = 1;
|
||||
[self getdata];
|
||||
}];
|
||||
tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
|
||||
self.ipage += 1;
|
||||
[self getdata];
|
||||
}];
|
||||
self.ipage = 1;
|
||||
[self getdata];
|
||||
|
||||
}
|
||||
|
||||
-(void)getdata
|
||||
{
|
||||
[LoadAlterView show];
|
||||
[NetWorkManager requestBatchCorrectSaveListData:self.view page:[NSString stringWithFormat:@"%d",self.ipage] Callback:^(BOOL state, BatchStatusByidModel *responseObject, NSString * _Nullable describle) {
|
||||
[LoadAlterView dismiss];
|
||||
[self.tableView.mj_header endRefreshing];
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
if(self.ipage==1)self.arrdata = [NSMutableArray new];
|
||||
if(state)
|
||||
{
|
||||
[self.arrdata addObjectsFromArray:responseObject.data.items];
|
||||
}
|
||||
else
|
||||
{
|
||||
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - UITableView
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return 5;
|
||||
return self.arrdata.count;
|
||||
}
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
|
@ -60,6 +101,7 @@
|
|||
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
|
||||
[cell setBackgroundColor:[UIColor clearColor]];
|
||||
}
|
||||
cell.model = self.arrdata[indexPath.row];
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
@ -85,8 +127,44 @@
|
|||
}
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
PLPGDetailViewController *vc = [PLPGDetailViewController new];
|
||||
vc.modelDetailHestory = self.arrdata[indexPath.row];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
#pragma mark - DZNEmptyDataSetSource
|
||||
- (UIView *)customViewForEmptyDataSet:(UIScrollView *)scrollView
|
||||
{
|
||||
UIView *viewback = [[UIView alloc] init];
|
||||
NSLayoutConstraint *heightConstraint = [NSLayoutConstraint constraintWithItem:viewback attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1 constant:UISCREEN_HEIGHT-NavHeight-50];
|
||||
[viewback addConstraint:heightConstraint];
|
||||
[viewback setBackgroundColor:[UIColor clearColor]];
|
||||
[viewback setUserInteractionEnabled:YES];
|
||||
|
||||
NSString *strimg = @"fanwen_noinfo";
|
||||
|
||||
UIImageView *imgvback = [[UIImageView alloc] init];
|
||||
[imgvback setImage:[UIImage imageNamed:strimg]];
|
||||
[imgvback setContentMode:UIViewContentModeScaleAspectFit];
|
||||
[viewback addSubview:imgvback];
|
||||
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.offset(UISCREEN_WIDTH*0.6);
|
||||
make.centerX.equalTo(viewback);
|
||||
make.top.offset(50);
|
||||
}];
|
||||
|
||||
NSString *str = @"暂无数据";
|
||||
UILabel *lbname = [[UILabel alloc] init];
|
||||
[lbname setText:str];
|
||||
[lbname setTextColor:RGBCOLOR(51, 51, 51)];
|
||||
[lbname setTextAlignment:NSTextAlignmentCenter];
|
||||
[lbname setFont:[UIFont boldSystemFontOfSize:20]];
|
||||
[viewback addSubview:lbname];
|
||||
[lbname mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(imgvback.mas_bottom).offset(20);
|
||||
make.centerX.equalTo(viewback);
|
||||
}];
|
||||
|
||||
return viewback;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -7,9 +7,12 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "BatchStatusByidModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface PiLiangXiuGaiLiShiTableViewCell : UITableViewCell
|
||||
///
|
||||
@property (nonatomic , strong) BatchStatusByidModelDataItems *model;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -10,7 +10,12 @@
|
|||
#import "PingYuAlterView.h"
|
||||
|
||||
@interface PiLiangXiuGaiLiShiTableViewCell ()
|
||||
|
||||
@property (nonatomic , strong) UIImageView *imgvback;
|
||||
///
|
||||
@property (nonatomic , strong) UILabel *lbfen;
|
||||
@property (nonatomic , strong) UILabel *lbname;
|
||||
@property (nonatomic , strong) UILabel *lbinfo;
|
||||
@property (nonatomic , strong) UILabel *lbtime;
|
||||
@end
|
||||
|
||||
@implementation PiLiangXiuGaiLiShiTableViewCell
|
||||
|
@ -31,7 +36,6 @@
|
|||
[Tools normalShadow:viewback shadowColor:RGBACOLOR(0, 80, 106, 0.1) shadowOpacity:0 cornerRadius:8 shadowRadius:10];
|
||||
|
||||
UIImageView *imgvback = [[UIImageView alloc] init];
|
||||
// [imgvback setImage:[UIImage imageNamed:@""]];
|
||||
[viewback addSubview:imgvback];
|
||||
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.offset(12);
|
||||
|
@ -43,7 +47,7 @@
|
|||
[imgvback.layer setCornerRadius:6];
|
||||
[imgvback.layer setBorderWidth:1];
|
||||
[imgvback.layer setBorderColor:RGBCOLOR(42, 211, 237).CGColor];
|
||||
// _imgvback = imgvback;
|
||||
_imgvback = imgvback;
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self addJianBianLine:imgvback colors:@[(id)RGBCOLOR(42, 211, 237).CGColor,(id)RGBCOLOR(148, 127, 255).CGColor] start:CGPointMake(0, 0) end:CGPointMake(0, 1)];
|
||||
});
|
||||
|
@ -73,6 +77,7 @@
|
|||
[lbfen mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(viewfen);
|
||||
}];
|
||||
_lbfen = lbfen;
|
||||
|
||||
UILabel *lbname = [[UILabel alloc] init];
|
||||
[lbname setText:@"抓星星的奇妙瞬间"];
|
||||
|
@ -85,6 +90,7 @@
|
|||
make.left.equalTo(imgvback.mas_right).offset(12);
|
||||
make.right.equalTo(viewback).offset(-90);
|
||||
}];
|
||||
_lbname = lbname;
|
||||
|
||||
UILabel *lbinfo = [[UILabel alloc] init];
|
||||
[lbinfo setText:@"评语:请加强语句结构化,静态事物描述不够仔细,其中有错别字..."];
|
||||
|
@ -98,6 +104,7 @@
|
|||
make.top.equalTo(lbname.mas_bottom).offset(6);
|
||||
make.right.equalTo(viewback).offset(-12);
|
||||
}];
|
||||
_lbinfo = lbinfo;
|
||||
|
||||
UILabel *lbtime = [[UILabel alloc] init];
|
||||
[lbtime setText:@"2024-10-17 14:10:23"];
|
||||
|
@ -109,6 +116,7 @@
|
|||
make.left.equalTo(lbname);
|
||||
make.bottom.equalTo(imgvback).offset(-5);
|
||||
}];
|
||||
_lbtime = lbtime;
|
||||
|
||||
UIButton *btxq = [[UIButton alloc] init];
|
||||
[btxq setTitle:@"查看详情" forState:UIControlStateNormal];
|
||||
|
@ -166,10 +174,25 @@
|
|||
// 将borderLayer添加到view的layer上
|
||||
[myView.layer addSublayer:borderLayer];
|
||||
}
|
||||
-(void)setModel:(BatchStatusByidModelDataItems *)model
|
||||
{
|
||||
_model = model;
|
||||
|
||||
_model = model;
|
||||
if(model.images.count>0)
|
||||
{
|
||||
BatchStatusByidModelDataItemsImages *modelimage = [model.images firstObject];
|
||||
[self.imgvback sd_setImageWithURL:[NSURL URLWithString:[Tools isStringnil:modelimage.url]] placeholderImage:nil];
|
||||
}
|
||||
|
||||
self.lbname.text = [Tools isStringnilkong:model.title];
|
||||
self.lbinfo.text = [Tools isStringnilkong:model.comment];
|
||||
self.lbtime.text = [Tools isStringnilkong:model.create_time];
|
||||
self.lbfen.text = [NSString stringWithFormat:@"%d分",model.score.intValue];
|
||||
}
|
||||
-(void)chakanAction
|
||||
{
|
||||
[PingYuAlterView showInfo:@"这篇作文以成长的脚步为线索,贯穿了作者从幼儿园到初中的心路历程,情感真挚,描绘细腻。作者巧妙地运用了不同的比喻和引用,展现了成长中的种种感悟,整体上是一篇富有深意和文采的作文。"];
|
||||
[PingYuAlterView showInfo:self.model.comment];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -6,11 +6,12 @@
|
|||
//
|
||||
|
||||
#import "BaseViewController.h"
|
||||
|
||||
#import "CorrectConfigModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void(^PLPGSetListControllerBack)(CorrectConfigModelDataItem *model);
|
||||
@interface PLPGSetListController : BaseViewController
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) PLPGSetListControllerBack backValue;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
|
|
@ -186,7 +186,11 @@
|
|||
}
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
|
||||
if(self.backValue)
|
||||
{
|
||||
self.backValue(self.arrdata[indexPath.row]);
|
||||
}
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
#pragma mark - DZNEmptyDataSetSource
|
||||
- (UIView *)customViewForEmptyDataSet:(UIScrollView *)scrollView
|
||||
|
|
|
@ -6,11 +6,17 @@
|
|||
//
|
||||
|
||||
#import "BaseViewController.h"
|
||||
|
||||
#import "BatchStatusByidModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface PLPGDetailViewController : BaseViewController
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) BatchStatusByidModelDataItems *modelDetail;
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) BatchStatusByidModelDataItems *modelDetailHestory;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#import "PLPGDetailViewController.h"
|
||||
#import "PLPGDetailView.h"
|
||||
|
||||
#import "NetWorkManager.h"
|
||||
|
||||
@interface PLPGDetailViewController ()
|
||||
|
||||
|
@ -35,6 +35,25 @@
|
|||
make.left.right.bottom.equalTo(self.view);
|
||||
make.top.offset(NavHeight);
|
||||
}];
|
||||
view.modelDetail = self.modelDetail;
|
||||
|
||||
if(self.modelDetailHestory)
|
||||
{
|
||||
[LoadAlterView show];
|
||||
[NetWorkManager requestBatchCorrectSaveDetailData:self.view ID:self.modelDetailHestory.ID Callback:^(BOOL state, BatchCorrectSaveDetailModel *responseObject, NSString * _Nullable describle) {
|
||||
[LoadAlterView dismiss];
|
||||
if(state)
|
||||
{
|
||||
view.modelDetailHestory = responseObject.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
[HXHud showMessage:responseObject.message afterDelayType:1];
|
||||
}
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,6 +11,21 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
@interface PLPGDetailItemView : UIView
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) NSString *scene;
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) NSString *strid;
|
||||
@property (nonatomic , assign) BOOL ishestory;
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) NSString *strshowvalue;
|
||||
|
||||
///是否写完
|
||||
@property (nonatomic , assign) BOOL iswriteend;
|
||||
|
||||
-(NSString *)getShowValue;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
|
|
@ -6,13 +6,18 @@
|
|||
//
|
||||
|
||||
#import "PLPGDetailItemView.h"
|
||||
#import "SSENetWorkManager.h"
|
||||
|
||||
@interface PLPGDetailItemView ()<UIScrollViewDelegate>
|
||||
///
|
||||
@property (nonatomic , strong) UIScrollView *scvback;
|
||||
@property (nonatomic , assign) BOOL isDragging;
|
||||
///
|
||||
@property (nonatomic , strong) UIView *viewinfo ;
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) ViewLable *lbwz;
|
||||
|
||||
@end
|
||||
|
||||
@implementation PLPGDetailItemView
|
||||
|
@ -80,12 +85,96 @@
|
|||
}];
|
||||
lbwz.textColor = RGBCOLOR(61, 61, 61);
|
||||
lbwz.textFont = [UIFont systemFontOfSize:14];
|
||||
lbwz.isCloseAnimation = YES;
|
||||
lbwz.strValue = @"原文问题:文章内容相对空洞,仅仅描述了春天的景色和小华、小刚放风筝的情景,缺乏深度和细节。";
|
||||
[lbwz setBackHeight:^(float fheight, BOOL isend) {
|
||||
self.iswriteend = isend;
|
||||
if(self.isDragging==NO)
|
||||
{
|
||||
if(self.scvback.contentSize.height-self.scvback.height>0)
|
||||
{
|
||||
[self.scvback setContentOffset:CGPointMake(0, self.scvback.contentSize.height-self.scvback.height) animated:NO];
|
||||
}
|
||||
}
|
||||
}];
|
||||
_lbwz = lbwz;
|
||||
|
||||
[view mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(lbwz).offset(17);
|
||||
}];
|
||||
}
|
||||
#pragma mark - UIScrollView
|
||||
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
|
||||
{
|
||||
self.isDragging = YES;
|
||||
}
|
||||
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
|
||||
{
|
||||
self.isDragging = NO;
|
||||
}
|
||||
-(void)setStrshowvalue:(NSString *)strshowvalue
|
||||
{
|
||||
_strshowvalue = strshowvalue;
|
||||
self.lbwz.isCloseAnimation = YES;
|
||||
self.lbwz.strValue = strshowvalue;
|
||||
self.iswriteend = YES;
|
||||
}
|
||||
-(void)setStrid:(NSString *)strid
|
||||
{
|
||||
_strid = strid;
|
||||
if([Tools isStringnil:strid].length==0)return;
|
||||
if([Tools isStringnil:self.strshowvalue].length>0)return;
|
||||
[self getdata];
|
||||
}
|
||||
-(NSString *)getShowValue
|
||||
{
|
||||
return self.lbwz.strValue;
|
||||
}
|
||||
-(void)getdata
|
||||
{
|
||||
[LoadAlterView show];
|
||||
|
||||
NSMutableDictionary *dicpush = [NSMutableDictionary new];
|
||||
|
||||
if(self.ishestory)
|
||||
{
|
||||
[dicpush setObject:[Tools isStringnil:self.strid] forKey:@"save_id"];
|
||||
}
|
||||
else
|
||||
{
|
||||
[dicpush setObject:[Tools isStringnil:self.strid] forKey:@"id"];
|
||||
}
|
||||
[[SSENetWorkManager shareManager] requestTo:[NSString stringWithFormat:@"https://aiw.batiao8.com/api/batch/correct/completions?scene=%@",self.scene] dicpush:dicpush config:^(SSEConfigModel * _Nonnull config) {
|
||||
[LoadAlterView dismiss];
|
||||
// self.modelConfig = config;
|
||||
} backValue:^(NSString * _Nonnull value, BOOL isfinish) {
|
||||
NSLog(@"%@",value);
|
||||
if(value.length>5)
|
||||
{
|
||||
[self chuliShuJu:value isfinish:NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isfinish)
|
||||
{
|
||||
[self chuliShuJu:value isfinish:YES];
|
||||
}
|
||||
}
|
||||
} error:^(NSString * _Nonnull errorString) {
|
||||
[LoadAlterView dismiss];
|
||||
[HXHud showMessage:errorString afterDelayType:0];
|
||||
} ID:^(NSString * _Nonnull value) {
|
||||
|
||||
}];
|
||||
}
|
||||
-(void)chuliShuJu:(NSString *)value isfinish:(BOOL)isfinish
|
||||
{
|
||||
if(isfinish)
|
||||
{
|
||||
self.lbwz.isWriteEnd = YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.lbwz.strValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -6,10 +6,16 @@
|
|||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "BatchStatusByidModel.h"
|
||||
#import "BatchCorrectSaveDetailModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface PLPGDetailView : UIView
|
||||
///
|
||||
@property (nonatomic , strong) BatchStatusByidModelDataItems *modelDetail;
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) BatchCorrectSaveDetailModelData *modelDetailHestory;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#import "StartKTXZPGDetailTabView.h"
|
||||
#import "PLPGDetailItemView.h"
|
||||
|
||||
#import "CorrectConfigModel.h"
|
||||
|
||||
@interface PLPGDetailView ()<UIScrollViewDelegate>
|
||||
///
|
||||
@property (nonatomic , strong) UIScrollView *scvback;
|
||||
|
@ -27,9 +29,8 @@
|
|||
@property (nonatomic , strong) UIScrollView *scvbackinfo;
|
||||
|
||||
///
|
||||
@property (nonatomic , strong) PLPGDetailItemView *viewwd;
|
||||
|
||||
|
||||
@property (nonatomic , strong) NSMutableArray *arrtopModel;
|
||||
@property (nonatomic , assign) NSInteger toptag;
|
||||
@end
|
||||
|
||||
|
||||
|
@ -39,6 +40,7 @@
|
|||
{
|
||||
if(self = [super initWithFrame:frame])
|
||||
{
|
||||
self.toptag = 0;
|
||||
UIScrollView *scvback = [[UIScrollView alloc] init];
|
||||
[self addSubview:scvback];
|
||||
[scvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
@ -108,7 +110,7 @@
|
|||
}];
|
||||
|
||||
UIButton *btpigai = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, UISCREEN_WIDTH-32, 46)];
|
||||
[btpigai setTitle:@"复制保存" forState:UIControlStateNormal];
|
||||
[btpigai setTitle:@"复制" forState:UIControlStateNormal];
|
||||
[btpigai setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
[btpigai.titleLabel setFont:[UIFont boldSystemFontOfSize:16]];
|
||||
[btpigai.layer setMasksToBounds:YES];
|
||||
|
@ -160,26 +162,6 @@
|
|||
[self showVC:tag];
|
||||
}];
|
||||
_viewtop = viewtop;
|
||||
[viewtop setArrTitle:@[@"评分维度",@"错别字检查",@"优化思路"]];
|
||||
|
||||
UIScrollView *scvback = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 80, UISCREEN_WIDTH, view.height-80)];
|
||||
[scvback setPagingEnabled:YES];
|
||||
[scvback setShowsHorizontalScrollIndicator:NO];
|
||||
[view addSubview:scvback];
|
||||
[scvback setContentSize:CGSizeMake(UISCREEN_WIDTH*2, 0)];
|
||||
[scvback setDelegate:self];
|
||||
_scvbackinfo = scvback;
|
||||
|
||||
///
|
||||
PLPGDetailItemView *viewwd = [PLPGDetailItemView new];
|
||||
[scvback addSubview:viewwd];
|
||||
[viewwd mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.offset(0);
|
||||
make.top.offset(0);
|
||||
make.width.height.equalTo(scvback);
|
||||
}];
|
||||
_viewwd = viewwd;
|
||||
///
|
||||
}
|
||||
- (void)panGestureAction:(UIPanGestureRecognizer *)pan
|
||||
{
|
||||
|
@ -209,13 +191,237 @@
|
|||
[pan setTranslation:CGPointZero inView:self];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)setModelDetail:(BatchStatusByidModelDataItems *)modelDetail
|
||||
{
|
||||
_modelDetail = modelDetail;
|
||||
if(modelDetail==nil)return;
|
||||
|
||||
if(modelDetail.images.count>0)
|
||||
{
|
||||
UIView *viewlast = nil;
|
||||
for(BatchStatusByidModelDataItemsImages *modelimage in self.modelDetail.images)
|
||||
{
|
||||
NSString *str = modelimage.url;
|
||||
UIImageView *imgvback = [[UIImageView alloc] init];
|
||||
[imgvback setContentMode:UIViewContentModeScaleAspectFit];
|
||||
[self.scvback addSubview:imgvback];
|
||||
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.offset(0);
|
||||
make.width.offset(UISCREEN_WIDTH);
|
||||
if(viewlast)
|
||||
{
|
||||
make.top.equalTo(viewlast.mas_bottom);
|
||||
}
|
||||
else
|
||||
{
|
||||
make.top.offset(0);
|
||||
}
|
||||
make.height.offset(100);
|
||||
}];
|
||||
|
||||
[imgvback sd_setImageWithURL:[NSURL URLWithString:str] placeholderImage:nil completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
|
||||
if(image)
|
||||
{
|
||||
[imgvback mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.offset(image.size.height*UISCREEN_WIDTH/image.size.width);
|
||||
}];
|
||||
}
|
||||
}];
|
||||
viewlast = imgvback;
|
||||
}
|
||||
|
||||
[self.scvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(viewlast).offset(20);
|
||||
}];
|
||||
}
|
||||
self.lbfen.text = [Tools isStringnil:self.modelDetail.score];
|
||||
[self.scvback bringSubviewToFront:self.lbfen];
|
||||
[self.scvback bringSubviewToFront:self.imgvnumber];
|
||||
|
||||
///
|
||||
|
||||
NSMutableArray *arrtopModel = [NSMutableArray new];
|
||||
CorrectConfigModelDataItemConfigScenes *model = [CorrectConfigModelDataItemConfigScenes new];
|
||||
model.name = @"评分维度";
|
||||
model.scene = @"batch_correct";
|
||||
[arrtopModel addObject:model];
|
||||
if(self.modelDetail.config.config.scenes)
|
||||
{
|
||||
[arrtopModel addObjectsFromArray:self.modelDetail.config.config.scenes];
|
||||
}
|
||||
|
||||
NSMutableArray *arrtoptitle = [NSMutableArray new];
|
||||
for(CorrectConfigModelDataItemConfigScenes *modelsc in arrtopModel)
|
||||
{
|
||||
[arrtoptitle addObject:[Tools isStringnil:modelsc.name]];
|
||||
}
|
||||
[self.viewtop setArrTitle:arrtoptitle];
|
||||
self.arrtopModel = arrtopModel;
|
||||
|
||||
UIScrollView *scvback = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 80, UISCREEN_WIDTH, self.viewback.height-80)];
|
||||
[scvback setPagingEnabled:YES];
|
||||
[scvback setShowsHorizontalScrollIndicator:NO];
|
||||
[self.viewback addSubview:scvback];
|
||||
[scvback setContentSize:CGSizeMake(UISCREEN_WIDTH*arrtopModel.count, 0)];
|
||||
[scvback setDelegate:self];
|
||||
_scvbackinfo = scvback;
|
||||
|
||||
CorrectConfigModelDataItemConfigScenes *modelfirst = self.arrtopModel.firstObject;
|
||||
///
|
||||
PLPGDetailItemView *viewwd = [PLPGDetailItemView new];
|
||||
[scvback addSubview:viewwd];
|
||||
[viewwd mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.offset(0);
|
||||
make.top.offset(0);
|
||||
make.width.height.equalTo(scvback);
|
||||
}];
|
||||
viewwd.scene = modelfirst.scene;
|
||||
viewwd.strid = self.modelDetail.ID;
|
||||
modelfirst.viewshow = viewwd;
|
||||
|
||||
}
|
||||
|
||||
-(void)setModelDetailHestory:(BatchCorrectSaveDetailModelData *)modelDetailHestory
|
||||
{
|
||||
_modelDetailHestory = modelDetailHestory;
|
||||
|
||||
|
||||
if(modelDetailHestory.images.count>0)
|
||||
{
|
||||
UIView *viewlast = nil;
|
||||
for(BatchStatusByidModelDataItemsImages *modelimage in self.modelDetailHestory.images)
|
||||
{
|
||||
NSString *str = modelimage.url;
|
||||
UIImageView *imgvback = [[UIImageView alloc] init];
|
||||
[imgvback setContentMode:UIViewContentModeScaleAspectFit];
|
||||
[self.scvback addSubview:imgvback];
|
||||
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.offset(0);
|
||||
make.width.offset(UISCREEN_WIDTH);
|
||||
if(viewlast)
|
||||
{
|
||||
make.top.equalTo(viewlast.mas_bottom);
|
||||
}
|
||||
else
|
||||
{
|
||||
make.top.offset(0);
|
||||
}
|
||||
make.height.offset(100);
|
||||
}];
|
||||
|
||||
[imgvback sd_setImageWithURL:[NSURL URLWithString:str] placeholderImage:nil completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
|
||||
if(image)
|
||||
{
|
||||
[imgvback mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.offset(image.size.height*UISCREEN_WIDTH/image.size.width);
|
||||
}];
|
||||
}
|
||||
}];
|
||||
viewlast = imgvback;
|
||||
}
|
||||
|
||||
[self.scvback mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(viewlast).offset(20);
|
||||
}];
|
||||
}
|
||||
self.lbfen.text = [Tools isStringnil:self.modelDetailHestory.score];
|
||||
[self.scvback bringSubviewToFront:self.lbfen];
|
||||
[self.scvback bringSubviewToFront:self.imgvnumber];
|
||||
|
||||
///
|
||||
|
||||
NSMutableArray *arrtopModel = [NSMutableArray new];
|
||||
CorrectConfigModelDataItemConfigScenes *model = [CorrectConfigModelDataItemConfigScenes new];
|
||||
model.name = @"评分维度";
|
||||
model.scene = @"batch_correct";
|
||||
[arrtopModel addObject:model];
|
||||
if(self.modelDetailHestory.config.config.scenes)
|
||||
{
|
||||
[arrtopModel addObjectsFromArray:self.modelDetailHestory.config.config.scenes];
|
||||
}
|
||||
|
||||
NSMutableArray *arrtoptitle = [NSMutableArray new];
|
||||
for(CorrectConfigModelDataItemConfigScenes *modelsc in arrtopModel)
|
||||
{
|
||||
[arrtoptitle addObject:[Tools isStringnil:modelsc.name]];
|
||||
}
|
||||
[self.viewtop setArrTitle:arrtoptitle];
|
||||
self.arrtopModel = arrtopModel;
|
||||
|
||||
UIScrollView *scvback = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 80, UISCREEN_WIDTH, self.viewback.height-80)];
|
||||
[scvback setPagingEnabled:YES];
|
||||
[scvback setShowsHorizontalScrollIndicator:NO];
|
||||
[self.viewback addSubview:scvback];
|
||||
[scvback setContentSize:CGSizeMake(UISCREEN_WIDTH*arrtopModel.count, 0)];
|
||||
[scvback setDelegate:self];
|
||||
_scvbackinfo = scvback;
|
||||
|
||||
CorrectConfigModelDataItemConfigScenes *modelfirst = self.arrtopModel.firstObject;
|
||||
///
|
||||
PLPGDetailItemView *viewwd = [PLPGDetailItemView new];
|
||||
[scvback addSubview:viewwd];
|
||||
[viewwd mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.offset(0);
|
||||
make.top.offset(0);
|
||||
make.width.height.equalTo(scvback);
|
||||
}];
|
||||
viewwd.scene = modelfirst.scene;
|
||||
viewwd.ishestory = YES;
|
||||
NSString *strvalue = [self.modelDetailHestory.result objectForKey:modelfirst.scene];
|
||||
if([Tools isStringnil:strvalue].length>0)
|
||||
{
|
||||
viewwd.strshowvalue = strvalue;
|
||||
}
|
||||
viewwd.strid = self.modelDetailHestory.ID;
|
||||
modelfirst.viewshow = viewwd;
|
||||
}
|
||||
|
||||
-(void)showVC:(NSInteger)page
|
||||
{
|
||||
self.toptag = page;
|
||||
CorrectConfigModelDataItemConfigScenes *modelfirst = self.arrtopModel[page];
|
||||
if(!modelfirst.viewshow)
|
||||
{
|
||||
PLPGDetailItemView *viewwd = [PLPGDetailItemView new];
|
||||
[self.scvbackinfo addSubview:viewwd];
|
||||
[viewwd mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.offset(UISCREEN_WIDTH*page);
|
||||
make.top.offset(0);
|
||||
make.width.height.equalTo(self.scvbackinfo);
|
||||
}];
|
||||
viewwd.scene = modelfirst.scene;
|
||||
if(self.modelDetailHestory)
|
||||
{
|
||||
viewwd.ishestory = YES;
|
||||
NSString *strvalue = [self.modelDetailHestory.result objectForKey:modelfirst.scene];
|
||||
if([Tools isStringnil:strvalue].length>0)
|
||||
{
|
||||
viewwd.strshowvalue = strvalue;
|
||||
}
|
||||
|
||||
viewwd.strid = self.modelDetailHestory.ID;
|
||||
}
|
||||
else
|
||||
{
|
||||
viewwd.strid = self.modelDetail.ID;
|
||||
}
|
||||
modelfirst.viewshow = viewwd;
|
||||
}
|
||||
}
|
||||
-(void)copyAction
|
||||
{
|
||||
CorrectConfigModelDataItemConfigScenes *modelfirst = self.arrtopModel[self.toptag];
|
||||
PLPGDetailItemView *view = (PLPGDetailItemView *)modelfirst.viewshow;
|
||||
if(view.iswriteend==NO)
|
||||
{
|
||||
[HXHud showMessage:@"请等待写作完成" afterDelayType:0];
|
||||
return;
|
||||
}
|
||||
|
||||
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
|
||||
pasteboard.string = [Tools isStringnil:[view getShowValue]];
|
||||
[HXHud showMessage:@"复制成功" afterDelayType:0];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -8,12 +8,14 @@
|
|||
#import "BaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void(^CamreViewControllerBack)(NSMutableArray *arrbackImages);
|
||||
@interface CamreViewController : BaseViewController
|
||||
///1作文批改 2拍照写作 3课堂写作
|
||||
@property (nonatomic , assign) int type;
|
||||
///是否是批量批改
|
||||
@property (nonatomic , assign) BOOL ispiliangpigai;
|
||||
///批量批改将图片返回
|
||||
@property (nonatomic , strong) CamreViewControllerBack backImages;
|
||||
|
||||
///课堂写作 课堂写作id
|
||||
@property (nonatomic , strong) NSString *textbook_id;
|
||||
|
|
|
@ -263,7 +263,7 @@
|
|||
}];
|
||||
[btyinxiao setIconInLeftWithSpacing:4];
|
||||
[btyinxiao addTarget:self action:@selector(yinxiaoAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
if([[[NSUserDefaults standardUserDefaults] objectForKey:yingxiaoSave] intValue ]== 1)
|
||||
if([[[NSUserDefaults standardUserDefaults] objectForKey:yingxiaoSave] intValue ]== 0)
|
||||
{
|
||||
[btyinxiao setSelected:YES];
|
||||
}
|
||||
|
@ -285,7 +285,7 @@
|
|||
}];
|
||||
[btjiaoyan setIconInLeftWithSpacing:4];
|
||||
[btjiaoyan addTarget:self action:@selector(jiaoyanAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
if([[[NSUserDefaults standardUserDefaults] objectForKey:jiaoyanSave] intValue ]== 1)
|
||||
if([[[NSUserDefaults standardUserDefaults] objectForKey:jiaoyanSave] intValue ]== 0)
|
||||
{
|
||||
[btjiaoyan setSelected:YES];
|
||||
}
|
||||
|
@ -316,12 +316,12 @@
|
|||
-(void)yinxiaoAction:(UIButton *)sender
|
||||
{
|
||||
sender.selected = !sender.selected;
|
||||
[[NSUserDefaults standardUserDefaults] setObject:sender.selected==YES?@"1":@"0" forKey:yingxiaoSave];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:sender.selected==YES?@"0":@"1" forKey:yingxiaoSave];
|
||||
}
|
||||
-(void)jiaoyanAction:(UIButton *)sender
|
||||
{
|
||||
sender.selected = !sender.selected;
|
||||
[[NSUserDefaults standardUserDefaults] setObject:sender.selected==YES?@"1":@"0" forKey:jiaoyanSave];
|
||||
[[NSUserDefaults standardUserDefaults] setObject:sender.selected==YES?@"0":@"1" forKey:jiaoyanSave];
|
||||
}
|
||||
#pragma mark - 示例
|
||||
-(void)shiliAction
|
||||
|
@ -399,11 +399,11 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if([[[NSUserDefaults standardUserDefaults] objectForKey:jiaoyanSave] intValue] == 1)
|
||||
if([[[NSUserDefaults standardUserDefaults] objectForKey:jiaoyanSave] intValue] == 0)
|
||||
{///去校验图片
|
||||
[self.session stopRunning];
|
||||
ImageEditDrawViewController *vc = [ImageEditDrawViewController new];
|
||||
vc.arrImages = @[[UIImage imageNamed:@"yd_xs_0"],[UIImage imageNamed:@"yd_xs_1"]];
|
||||
vc.arrImages = self.arrData;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
[vc setBackValue:^(NSMutableArray * _Nonnull arrimages) {
|
||||
[self pushImage:arrimages];
|
||||
|
@ -448,8 +448,11 @@
|
|||
[UserInfoModel quanXianJiaoYan:self scence:@"write_correct" ispush:NO back:^(BOOL value) {
|
||||
if(self.ispiliangpigai)
|
||||
{///批量批改详情
|
||||
[HXHud showMessage:@"批量批改详情" afterDelayType:0];
|
||||
|
||||
if(self.backImages)
|
||||
{
|
||||
self.backImages(arrImgages);
|
||||
}
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -691,6 +694,11 @@
|
|||
}
|
||||
-(void)playAudio
|
||||
{
|
||||
if([[[NSUserDefaults standardUserDefaults] objectForKey:yingxiaoSave] intValue]==1)
|
||||
{
|
||||
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
|
||||
[audioSession setCategory:AVAudioSessionCategoryRecord error:nil];
|
||||
[audioSession setActive:YES error:nil];
|
||||
if(!self.audioPlayer)
|
||||
{
|
||||
NSString *audioPath = [[NSBundle mainBundle] pathForResource:@"wushenyy" ofType:@"mp3"];
|
||||
|
@ -704,9 +712,20 @@
|
|||
[self.audioPlayer prepareToPlay];
|
||||
}
|
||||
}
|
||||
if([[[NSUserDefaults standardUserDefaults] objectForKey:yingxiaoSave] intValue]==0)
|
||||
{
|
||||
|
||||
[self.audioPlayer play];
|
||||
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
|
||||
[audioSession setCategory:AVAudioSessionCategoryPlayback error:nil];
|
||||
[audioSession setActive:YES error:nil];
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
|
||||
[audioSession setCategory:AVAudioSessionCategoryPlayback error:nil];
|
||||
[audioSession setActive:YES error:nil];
|
||||
}
|
||||
}
|
||||
// 保存照片
|
||||
|
|
Loading…
Reference in New Issue