ppt大纲

This commit is contained in:
pengguangjian 2024-11-01 14:53:43 +08:00
parent cb21773e26
commit 159d23e6db
43 changed files with 1120 additions and 113 deletions

View File

@ -353,6 +353,12 @@
CAC806702CA16E0700C21AA7 /* StartPZXZView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAC8066F2CA16E0700C21AA7 /* StartPZXZView.m */; };
CAC806732CA171ED00C21AA7 /* StartPZXZPageView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAC806722CA171ED00C21AA7 /* StartPZXZPageView.m */; };
CACB9EFA2CD225B700449541 /* FMDMySql.m in Sources */ = {isa = PBXBuildFile; fileRef = CACB9EF92CD225B700449541 /* FMDMySql.m */; };
CAD092C22CD46F7E00853A26 /* ChatCheckModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CAD092C12CD46F7E00853A26 /* ChatCheckModel.m */; };
CAD092C52CD478F400853A26 /* PptThemeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CAD092C42CD478F400853A26 /* PptThemeModel.m */; };
CAD092C82CD4794F00853A26 /* PptLangModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CAD092C72CD4794F00853A26 /* PptLangModel.m */; };
CAD092CB2CD48A2500853A26 /* MyDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = CAD092CA2CD48A2500853A26 /* MyDocument.m */; };
CAD092CE2CD4A43300853A26 /* ZZDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = CAD092CD2CD4A43300853A26 /* ZZDocument.m */; };
CAD092D12CD4AFE300853A26 /* PptOutlineModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CAD092D02CD4AFE300853A26 /* PptOutlineModel.m */; };
CAF2BC7D2CCF7F7800028275 /* TextbookModel.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF2BC7C2CCF7F7800028275 /* TextbookModel.m */; };
CAF2BC812CCF8D2700028275 /* FanWenSearchListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF2BC802CCF8D2700028275 /* FanWenSearchListViewController.m */; };
CAF76E632CBDFF8500825E5E /* AIChatYuYinView.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF76E622CBDFF8500825E5E /* AIChatYuYinView.m */; };
@ -1180,6 +1186,18 @@
CAC806722CA171ED00C21AA7 /* StartPZXZPageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StartPZXZPageView.m; sourceTree = "<group>"; };
CACB9EF82CD225B700449541 /* FMDMySql.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FMDMySql.h; sourceTree = "<group>"; };
CACB9EF92CD225B700449541 /* FMDMySql.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FMDMySql.m; sourceTree = "<group>"; };
CAD092C02CD46F7E00853A26 /* ChatCheckModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ChatCheckModel.h; sourceTree = "<group>"; };
CAD092C12CD46F7E00853A26 /* ChatCheckModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ChatCheckModel.m; sourceTree = "<group>"; };
CAD092C32CD478F400853A26 /* PptThemeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PptThemeModel.h; sourceTree = "<group>"; };
CAD092C42CD478F400853A26 /* PptThemeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PptThemeModel.m; sourceTree = "<group>"; };
CAD092C62CD4794F00853A26 /* PptLangModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PptLangModel.h; sourceTree = "<group>"; };
CAD092C72CD4794F00853A26 /* PptLangModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PptLangModel.m; sourceTree = "<group>"; };
CAD092C92CD48A2500853A26 /* MyDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyDocument.h; sourceTree = "<group>"; };
CAD092CA2CD48A2500853A26 /* MyDocument.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyDocument.m; sourceTree = "<group>"; };
CAD092CC2CD4A43300853A26 /* ZZDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZZDocument.h; sourceTree = "<group>"; };
CAD092CD2CD4A43300853A26 /* ZZDocument.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZZDocument.m; sourceTree = "<group>"; };
CAD092CF2CD4AFE300853A26 /* PptOutlineModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PptOutlineModel.h; sourceTree = "<group>"; };
CAD092D02CD4AFE300853A26 /* PptOutlineModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PptOutlineModel.m; sourceTree = "<group>"; };
CAF2BC7B2CCF7F7800028275 /* TextbookModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TextbookModel.h; sourceTree = "<group>"; };
CAF2BC7C2CCF7F7800028275 /* TextbookModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TextbookModel.m; sourceTree = "<group>"; };
CAF2BC7F2CCF8D2700028275 /* FanWenSearchListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FanWenSearchListViewController.h; sourceTree = "<group>"; };
@ -1738,6 +1756,10 @@
children = (
CA0C3AB32CB5061500E01A72 /* ZhiNengPPTView.h */,
CA0C3AB42CB5061500E01A72 /* ZhiNengPPTView.m */,
CAD092C92CD48A2500853A26 /* MyDocument.h */,
CAD092CA2CD48A2500853A26 /* MyDocument.m */,
CAD092CC2CD4A43300853A26 /* ZZDocument.h */,
CAD092CD2CD4A43300853A26 /* ZZDocument.m */,
);
path = view;
sourceTree = "<group>";
@ -3248,6 +3270,14 @@
CA0688CF2CD3291900DF7025 /* OcrModel.m */,
CA0688D12CD329AD00DF7025 /* TranslateLanguageModel.h */,
CA0688D22CD329AD00DF7025 /* TranslateLanguageModel.m */,
CAD092C02CD46F7E00853A26 /* ChatCheckModel.h */,
CAD092C12CD46F7E00853A26 /* ChatCheckModel.m */,
CAD092C32CD478F400853A26 /* PptThemeModel.h */,
CAD092C42CD478F400853A26 /* PptThemeModel.m */,
CAD092C62CD4794F00853A26 /* PptLangModel.h */,
CAD092C72CD4794F00853A26 /* PptLangModel.m */,
CAD092CF2CD4AFE300853A26 /* PptOutlineModel.h */,
CAD092D02CD4AFE300853A26 /* PptOutlineModel.m */,
);
path = models;
sourceTree = "<group>";
@ -4705,9 +4735,11 @@
CA11ED742CA69AC600209DFC /* GaiXieRunSeViewController.m in Sources */,
CAB0F3602CAA84B3003B0C39 /* XieZuoXiangQingViewController.m in Sources */,
CA10DF9E2CC7AC040094FEEE /* ExamplePicModel.m in Sources */,
CAD092C52CD478F400853A26 /* PptThemeModel.m in Sources */,
CA4257A02CA299F900A36A10 /* StartZNPPTDaGangView.m in Sources */,
CA5D02A32CC0B2DE007B3BA5 /* PeiZhiShowViewController.m in Sources */,
CA5D02AC2CC0B2DE007B3BA5 /* SetViewController.m in Sources */,
CAD092D12CD4AFE300853A26 /* PptOutlineModel.m in Sources */,
CA0C3A8B2CB4C80300E01A72 /* HuanGeSiLuCollectionViewCell.m in Sources */,
CAF76E832CBE5D6600825E5E /* GongJuCreateViewController.m in Sources */,
CA81818B2C9E598300EE7E6E /* StartKTXZWenZhangView.m in Sources */,
@ -4716,6 +4748,7 @@
CA07CD142CC5E5C500AF41ED /* XieYiAlterView.m in Sources */,
CA5D02ED2CC0DD6B007B3BA5 /* PayOrderModel.m in Sources */,
CA3868582CC1F66E009C98B0 /* LoginTelView.m in Sources */,
CAD092C22CD46F7E00853A26 /* ChatCheckModel.m in Sources */,
CA5D03632CC0DE8D007B3BA5 /* YaoQingView.m in Sources */,
CA4257A62CA29FE700A36A10 /* StartZNPPTDaGangAlterLoadView.m in Sources */,
CA0C3A992CB4D4F500E01A72 /* ZhiNengXieZuoDuanLuoView.m in Sources */,
@ -4776,6 +4809,7 @@
CA4257952CA2671400A36A10 /* StartZNPPTCell.m in Sources */,
CABA14CC2C9D4395002CB3B1 /* NSData+PEHIExtension.m in Sources */,
CAF76E662CBE01F100825E5E /* AIChatYuYinBackView.m in Sources */,
CAD092C82CD4794F00853A26 /* PptLangModel.m in Sources */,
CA22D1D02CD091AF00CA7E93 /* PicAiSaveDetailModel.m in Sources */,
CA0C3AA22CB4DBB900E01A72 /* DuanLuoXieZuoView.m in Sources */,
CA0D08542CA543370086855E /* ShouYeLSZWPGTableViewCell.m in Sources */,
@ -4841,6 +4875,7 @@
CABA14782C9D13CD002CB3B1 /* StartSFViewController.m in Sources */,
CA0D085D2CA543EE0086855E /* ShouYeZCXZTableViewCell.m in Sources */,
CA0FD6A82CA900E2009A4417 /* FXTextView.m in Sources */,
CAD092CB2CD48A2500853A26 /* MyDocument.m in Sources */,
CA0D086D2CA548F70086855E /* ShouYeLiShiJiLuPPTTableViewController.m in Sources */,
CA8EE5292CC905BD009D73E3 /* NomoAlterView.m in Sources */,
CA6D547D2CCB9FA8001B530A /* CorrectWriteErrorModel.m in Sources */,
@ -4848,6 +4883,7 @@
CA4257B62CA2BBB000A36A10 /* StartPayView.m in Sources */,
CB489DDB27449D5D00DA044A /* main.m in Sources */,
CABD8C892CBF9198009A5E5E /* GongJuWenBenViewController.m in Sources */,
CAD092CE2CD4A43300853A26 /* ZZDocument.m in Sources */,
CB489FB02744A0BD00DA044A /* FSActionSheet.m in Sources */,
CB489F652744A0BD00DA044A /* DAYComponentView.m in Sources */,
CA22D1CD2CD0829300CA7E93 /* CorrectSaveDetailModel.m in Sources */,

View File

@ -158,8 +158,8 @@
filePath = "ProductApp/ProductMain/NetWorkManager/NetWorkManager.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1790"
endingLineNumber = "1790"
startingLineNumber = "1826"
endingLineNumber = "1826"
landmarkName = "+requestTranslateLanguageData:Callback:"
landmarkType = "7">
</BreakpointContent>
@ -180,5 +180,21 @@
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "B4BCA08C-F625-4276-897D-67D58BBD057C"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "ProductApp/ProductMain/NetWorkManager/NetWorkManager.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1958"
endingLineNumber = "1958"
landmarkName = "+requestPptOutlineData:dicpush:Callback:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>

View 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.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -4,5 +4,20 @@
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<key>com.apple.developer.icloud-container-identifiers</key>
<array/>
<key>com.apple.developer.icloud-services</key>
<array>
<string>CloudDocuments</string>
<string>CloudKit</string>
</array>
<key>com.apple.developer.ubiquity-container-identifiers</key>
<array/>
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
</dict>
</plist>

View File

@ -97,6 +97,9 @@
lbvalueLeft.isWriteEnd = YES;
lbvalueLeft.isCloseAnimation = YES;
_lbvalueLeft = lbvalueLeft;
[lbvalueLeft setUserInteractionEnabled:YES];
UILongPressGestureRecognizer *tapleft = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(leftTapAction:)];
[lbvalueLeft addGestureRecognizer:tapleft];
AIChatArcView *viewinforight = [AIChatArcView new];
[viewinforight setBackgroundColor:[UIColor clearColor]];
@ -397,6 +400,28 @@
// });
//}
-(void)leftTapAction:(UIGestureRecognizer *)gesture
{
if(gesture.state==UIGestureRecognizerStateBegan)
{
if(self.model.isAnimation)
{
if(self.model.isDrwaEnd)
{
[self copyValue];
}
}
else
{
[self copyValue];
}
}
}
-(void)copyValue
{
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = self.lbvalueLeft.strValue;
[HXHud showMessage:@"复制成功" afterDelayType:0];
}
@end

View File

@ -35,12 +35,24 @@
#import "OcrModel.h"
#import "TranslateLanguageModel.h"
#import "PptThemeModel.h"
#import "PptLangModel.h"
#import "PptOutlineModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface NetWorkManager : NSObject
/*
/api/chat/check
content
*/
+ (void)requestChatCheckData:(UIView *)view
content:(NSString *)content
Callback:(completeModeBlock)callback;
/*
/api/role/tree
@ -601,6 +613,30 @@ NS_ASSUME_NONNULL_BEGIN
tool_id:(NSString *)tool_id
Callback:(completeModeBlock)callback;
#pragma mark - PPT
/*
/api/ppt/theme
*/
+ (void)requestPptThemeData:(UIView *)view
Callback:(completeModeBlock)callback;
/*
/api/ppt/lang
*/
+ (void)requestPptLangData:(UIView *)view
Callback:(completeModeBlock)callback;
/*
/api/ppt/outline
*/
+ (void)requestPptOutlineData:(UIView *)view
dicpush:(NSDictionary *)dicpush
Callback:(completeModeBlock)callback;
@end
NS_ASSUME_NONNULL_END

View File

@ -9,6 +9,42 @@
#import "YSAPIClient.h"
@implementation NetWorkManager
/*
/api/chat/check
content
*/
+ (void)requestChatCheckData:(UIView *)view
content:(NSString *)content
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[dicpush setObject:[Tools isStringnil:content] forKey:@"content"];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:2 url:@"api/chat/check" 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/role/tree
@ -1825,4 +1861,104 @@
}
}];
}
#pragma mark - PPT
/*
/api/ppt/theme
*/
+ (void)requestPptThemeData:(UIView *)view
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/ppt/theme" 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,[PptThemeModel yy_modelWithJSON:dicAll],describle);
}
}];
}
/*
/api/ppt/lang
*/
+ (void)requestPptLangData:(UIView *)view
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:1 url:@"api/ppt/lang" 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,[PptLangModel yy_modelWithJSON:dicAll],describle);
}
}];
}
/*
/api/ppt/outline
*/
+ (void)requestPptOutlineData:(UIView *)view
dicpush:(NSDictionary *)dicpush
Callback:(completeModeBlock)callback
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
NSMutableDictionary *dicHeader = [NSMutableDictionary new];
[YSAPIClient requestWithRequestBaseUrl:BaseUrl Type:2 url:@"api/ppt/outline" 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,[PptOutlineModel yy_modelWithJSON:dicAll],describle);
}
}];
}
@end

View File

@ -159,12 +159,30 @@
if(rangeMessage.length>0)
{
NSArray *arrdatatmep = [strson componentsSeparatedByString:@"data:"];
for(int j=0;j<arrdatatmep.count;j++)
for(int j=1;j<arrdatatmep.count;j++)
{
NSString *strValue = arrdatatmep[j];
strValue = [strValue stringByReplacingOccurrencesOfString:@"\n\n" withString:@""];
if(strValue.length==0 || [strValue isEqualToString:@"\n"])continue;
// if(strValue.length==0)continue;
BOOL isremoven = NO;
if(stralltemp.length>1)
{
if([stralltemp containsString:@"#"] || [stralltemp containsString:@"*"])
{
isremoven = YES;
}
}
if(isremoven)
{
strValue = [strValue stringByReplacingOccurrencesOfString:@"\n\n" withString:@""];
if(strValue.length==0 || [strValue isEqualToString:@"\n"])continue;
}
else
{
strValue = [strValue stringByReplacingOccurrencesOfString:@"\n\n" withString:@""];
if(strValue.length==0)continue;
}
if(islastid&&i==arrtemp.count-1)
{
if(j==arrdatatmep.count-1)

View File

@ -0,0 +1,16 @@
//
// ChatCheckModel.h
// ProductApp
//
// Created by 工作 on 2024/11/1.
//
#import "BaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface ChatCheckModel : BaseModel
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,12 @@
//
// ChatCheckModel.m
// ProductApp
//
// Created by on 2024/11/1.
//
#import "ChatCheckModel.h"
@implementation ChatCheckModel
@end

View File

@ -0,0 +1,23 @@
//
// PptLangModel.h
// ProductApp
//
// Created by 工作 on 2024/11/1.
//
#import "BaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@class PptLangModelData;
@interface PptLangModel : BaseModel
///
@property (nonatomic , strong) NSArray *data;
@end
@interface PptLangModelData : NSObject
///
@property (nonatomic , strong) NSString *code;
///
@property (nonatomic , strong) NSString *desc;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,18 @@
//
// PptLangModel.m
// ProductApp
//
// Created by on 2024/11/1.
//
#import "PptLangModel.h"
@implementation PptLangModel
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"data" : [PptLangModelData class]};
}
@end
@implementation PptLangModelData
@end

View File

@ -0,0 +1,24 @@
//
// PptOutlineModel.h
// ProductApp
//
// Created by 工作 on 2024/11/1.
//
#import "BaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@class PptOutlineModelData;
@class ExamplePptDetailModelDataResultOutline;
@interface PptOutlineModel : BaseModel
///
@property (nonatomic , strong) PptOutlineModelData *data;
@end
@interface PptOutlineModelData : NSObject
///
@property (nonatomic , strong) NSString *ID;
///
@property (nonatomic , strong) ExamplePptDetailModelDataResultOutline *outline;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,20 @@
//
// PptOutlineModel.m
// ProductApp
//
// Created by on 2024/11/1.
//
#import "PptOutlineModel.h"
#import "ExamplePptDetailModel.h"
@implementation PptOutlineModel
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"data" : [PptOutlineModelData class]};
}
@end
@implementation PptOutlineModelData
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"outline" : [ExamplePptDetailModelDataResultOutline class]};
}
@end

View File

@ -0,0 +1,28 @@
//
// PptThemeModel.h
// ProductApp
//
// Created by 工作 on 2024/11/1.
//
#import "BaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@class PptThemeModelData;
@interface PptThemeModel : BaseModel
///
@property (nonatomic , strong) NSArray *data;
@end
@interface PptThemeModelData : NSObject
///
@property (nonatomic , strong) NSString *key;
///
@property (nonatomic , strong) NSString *name;
///
@property (nonatomic , strong) NSString *thumbnail;
@property (nonatomic , assign) BOOL select;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,18 @@
//
// PptThemeModel.m
// ProductApp
//
// Created by on 2024/11/1.
//
#import "PptThemeModel.h"
@implementation PptThemeModel
+ (NSDictionary *)modelContainerPropertyGenericClass {
return @{@"data" : [PptThemeModelData class]};
}
@end
@implementation PptThemeModelData
@end

View File

@ -61,7 +61,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic , strong) NSString *name_edit;
///
@property (nonatomic , strong) NSArray *options;
///
///是否有other
@property (nonatomic , strong) NSString *other_option;
///是否必填 *
@property (nonatomic , strong) NSString *require;

View File

@ -13,6 +13,7 @@
#import "GongJuCreateTimeTwoView.h"
#import "GongJuCreateResultViewController.h"
#import "NetWorkManager.h"
@interface GongJuCreateView ()
///
@ -229,16 +230,46 @@
}
else
{
for(GongJuCreateSuperView *view in self.arrViews)
///modelDetail.config.prompt
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[dicpush setObject:[Tools isStringnil:self.modelDetail.ID] forKey:@"tool_id"];
[dicpush setObject:[Tools isStringnil:self.modelDetail.type_id] forKey:@"sse_type"];
for(int i = 0 ; i < self.arrViews.count; i++)
{
NSLog(@"%@",[view getValues]);
ToolsListModelDataItemsConfigPrompt *model = self.modelDetail.config.prompt[i];
GongJuCreateSuperView *view = self.arrViews[i];
if(model.require.intValue == 1 && [view getValues].length==0)
{
NSString *strtemp = @"";
if([model.type isEqualToString:@"input"]||[model.type isEqualToString:@"textarea"])
{
strtemp = [NSString stringWithFormat:@"请输入%@",model.name];
}
else
{
strtemp = [NSString stringWithFormat:@"请选择%@",model.name];
}
[HXHud showMessage:strtemp afterDelayType:0];
return;
}
[dicpush setObject:[Tools isStringnil:[view getValues]] forKey:[Tools isStringnil:model.name]];
}
GongJuCreateResultViewController *vc = [GongJuCreateResultViewController new];
vc.scene = self.modelDetail.scene;
vc.dicpush = dicpush;
[self.viewController.navigationController pushViewController:vc animated:YES];
[self addtoolsNumber];
}
}
-(void)addtoolsNumber
{
[NetWorkManager requestToolsAdd_countData:self tool_id:[NSString stringWithFormat:@"%@",self.modelDetail.ID] Callback:^(BOOL state, id _Nullable responseObject, NSString * _Nullable describle) {
}];
}
@end

View File

@ -10,7 +10,10 @@
NS_ASSUME_NONNULL_BEGIN
@interface GongJuCreateResultViewController : BaseViewController
///
@property (nonatomic , strong) NSString *scene;
///
@property (nonatomic , strong) NSDictionary *dicpush;
@end
NS_ASSUME_NONNULL_END

View File

@ -41,6 +41,8 @@
make.left.right.bottom.equalTo(self.view);
make.top.offset(NavHeight);
}];
view.scene = self.scene;
view.dicpush = self.dicpush;
}

View File

@ -10,7 +10,10 @@
NS_ASSUME_NONNULL_BEGIN
@interface GongJuCreateResultView : UIView
///
@property (nonatomic , strong) NSString *scene;
///
@property (nonatomic , strong) NSDictionary *dicpush;
@end
NS_ASSUME_NONNULL_END

View File

@ -6,12 +6,17 @@
//
#import "GongJuCreateResultView.h"
#import "SSENetWorkManager.h"
#import "NetWorkManager.h"
@interface GongJuCreateResultView ()
@interface GongJuCreateResultView ()<UIScrollViewDelegate>
///
@property (nonatomic , strong) UILabel *lbcontent;
@property (nonatomic , strong) ViewLable *lbcontent;
///
@property (nonatomic , strong) SSEConfigModel *modelConfig;
@property (nonatomic , assign) BOOL isDragging;
@property (nonatomic , assign) BOOL isDraw;
@end
@implementation GongJuCreateResultView
@ -61,6 +66,7 @@
UIScrollView *scvback = [[UIScrollView alloc] init];
[scvback setShowsVerticalScrollIndicator:NO];
[scvback setDelegate:self];
[viewback addSubview:scvback];
[scvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.offset(12);
@ -69,25 +75,44 @@
make.height.equalTo(viewback).offset(-58);
}];
UILabel *lbcontent = [[UILabel alloc] init];
[lbcontent setText:@"结果内容"];
[lbcontent setNumberOfLines:0];
[lbcontent setTextColor:RGBCOLOR(26, 26, 26)];
[lbcontent setTextAlignment:NSTextAlignmentLeft];
[lbcontent setFont:[UIFont systemFontOfSize:15]];
[scvback addSubview:lbcontent];
[lbcontent mas_makeConstraints:^(MASConstraintMaker *make) {
// UILabel *lbcontent = [[UILabel alloc] init];
// [lbcontent setText:@"结果内容"];
// [lbcontent setNumberOfLines:0];
// [lbcontent setTextColor:RGBCOLOR(26, 26, 26)];
// [lbcontent setTextAlignment:NSTextAlignmentLeft];
// [lbcontent setFont:[UIFont systemFontOfSize:15]];
// [scvback addSubview:lbcontent];
// [lbcontent mas_makeConstraints:^(MASConstraintMaker *make) {
// make.left.top.width.equalTo(scvback);
// }];
// _lbcontent = lbcontent;
ViewLable *lbwz = [[ViewLable alloc] init];
[scvback addSubview:lbwz];
[lbwz mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.width.equalTo(scvback);
}];
_lbcontent = lbcontent;
lbwz.textColor = RGBCOLOR(61, 61, 61);
lbwz.textFont = [UIFont systemFontOfSize:16];
[lbwz setBackHeight:^(float fheight, BOOL isend) {
if(self.isDragging==NO)
{
if(scvback.contentSize.height-scvback.height>0)
{
[scvback setContentOffset:CGPointMake(0, scvback.contentSize.height-scvback.height)];
}
}
}];
_lbcontent = lbwz;
[scvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(lbcontent);
make.bottom.equalTo(lbwz);
}];
UILongPressGestureRecognizer *longpresee = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(LongbottomAction:)];
[lbcontent setUserInteractionEnabled:YES];
[lbcontent addGestureRecognizer:longpresee];
[lbwz setUserInteractionEnabled:YES];
[lbwz addGestureRecognizer:longpresee];
}
-(void)drawBottomView:(UIView *)view
@ -119,8 +144,68 @@
-(void)bottomAction
{
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = self.lbcontent.text;
pasteboard.string = self.lbcontent.strValue;
[HXHud showMessage:@"复制成功" afterDelayType:0];
}
-(void)setDicpush:(NSDictionary *)dicpush
{
_dicpush = dicpush;
[self getdata];
}
-(void)getdata
{
self.isDraw = YES;
[LoadAlterView show];
NSString *scene = self.scene;
[[SSENetWorkManager shareManager] requestTo:[NSString stringWithFormat:@"https://aiw.batiao8.com/api/tools/sse?scene=%@",scene] dicpush:self.dicpush config:^(SSEConfigModel * _Nonnull config) {
[LoadAlterView dismiss];
self.modelConfig = config;
self.lbcontent.fspeed = self.modelConfig.time.intValue/1000.0;
} backValue:^(NSString * _Nonnull value, BOOL isfinish) {
if(value.length>3)
{
[self chuliShuJu:value isfinish:NO];
}
else
{
if(isfinish)
{
[self chuliShuJu:value isfinish:YES];
}
}
} error:^(NSString * _Nonnull errorString) {
[LoadAlterView dismiss];
[HXHud showMessage:errorString afterDelayType:0];
self.isDraw = NO;
} ID:^(NSString * _Nonnull value) {
}];
}
-(void)chuliShuJu:(NSString *)value isfinish:(BOOL)isfinish
{
NSLog(@"%@",value);
if(isfinish)
{
self.isDraw = NO;
self.lbcontent.isWriteEnd = YES;
}
else
{
self.lbcontent.strValue = value;
}
}
#pragma mark - UIScrollView
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
{
self.isDragging = YES;
}
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
{
self.isDragging = NO;
}
@end

View File

@ -7,6 +7,8 @@
#import "BaseViewController.h"
#import "ExamplePptDetailModel.h"
#import "PptOutlineModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface StartZNPPTDaGangViewController : BaseViewController
@ -15,6 +17,9 @@ NS_ASSUME_NONNULL_BEGIN
///
@property (nonatomic , strong) ExamplePptDetailModelData *modelDetail;
///正式数据
@property (nonatomic , strong) PptOutlineModelData *modelZS;
@end
NS_ASSUME_NONNULL_END

View File

@ -37,6 +37,7 @@
}];
view.isyindao = self.isyindao;
view.modelDetail = self.modelDetail;
view.modelZS = self.modelZS;
}
@end

View File

@ -7,12 +7,19 @@
#import <UIKit/UIKit.h>
#import "ExamplePptDetailModel.h"
#import "PptOutlineModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface StartZNPPTDaGangView : UIView
@property (nonatomic , assign) BOOL isyindao;
///
@property (nonatomic , strong) ExamplePptDetailModelData *modelDetail;
///正式数据
@property (nonatomic , strong) PptOutlineModelData *modelZS;
@end
NS_ASSUME_NONNULL_END

View File

@ -112,6 +112,52 @@
}
return self;
}
-(void)setModelZS:(PptOutlineModelData *)modelZS
{
_modelZS = modelZS;
if(modelZS==nil)return;
}
-(void)setModelDetail:(ExamplePptDetailModelData *)modelDetail
{
_modelDetail = modelDetail;
if(modelDetail==nil)return;
[self setnomoData];
[self.tableView reloadData];
[self.tableViewinfo reloadData];
}
-(void)setnomoData
{
self.arrTitle = [NSMutableArray new];
for(int i = 0 ; i < 2; i++)
{
ExamplePptDetailModelDataResultOutlineChapters *model = [ExamplePptDetailModelDataResultOutlineChapters new];
model.chapterTitle = self.modelDetail.result.outline.title;
if(i==1)
{
model.chapterTitle = self.modelDetail.result.outline.subTitle;
}
model.isTitle = YES;
[self.arrTitle addObject:model];
}
self.tableView.dataArray = self.arrTitle;
float fheight = 0;
self.arrContent = [NSMutableArray new];
for(ExamplePptDetailModelDataResultOutlineChapters *modelChapters in self.modelDetail.result.outline.chapters)
{
fheight+=47;
fheight+=47*modelChapters.chapterContents.count;
}
[self.arrContent addObjectsFromArray:self.modelDetail.result.outline.chapters];
self.tableViewinfo.dataArray = self.arrContent;
[self.tableViewinfo mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.offset(fheight+10);
}];
}
-(void)nextAction
{
@ -154,44 +200,6 @@
}
}
-(void)setModelDetail:(ExamplePptDetailModelData *)modelDetail
{
_modelDetail = modelDetail;
[self setnomoData];
[self.tableView reloadData];
[self.tableViewinfo reloadData];
}
-(void)setnomoData
{
self.arrTitle = [NSMutableArray new];
for(int i = 0 ; i < 2; i++)
{
ExamplePptDetailModelDataResultOutlineChapters *model = [ExamplePptDetailModelDataResultOutlineChapters new];
model.chapterTitle = self.modelDetail.result.outline.title;
if(i==1)
{
model.chapterTitle = self.modelDetail.result.outline.subTitle;
}
model.isTitle = YES;
[self.arrTitle addObject:model];
}
self.tableView.dataArray = self.arrTitle;
float fheight = 0;
self.arrContent = [NSMutableArray new];
for(ExamplePptDetailModelDataResultOutlineChapters *modelChapters in self.modelDetail.result.outline.chapters)
{
fheight+=47;
fheight+=47*modelChapters.chapterContents.count;
}
[self.arrContent addObjectsFromArray:self.modelDetail.result.outline.chapters];
self.tableViewinfo.dataArray = self.arrContent;
[self.tableViewinfo mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.offset(fheight+10);
}];
}
#pragma mark - UITableView
-(void)scrollViewDidScroll:(UIScrollView *)scrollView
{

View File

@ -143,6 +143,11 @@
}
-(void)btAction:(UIButton *)sender
{
if([UserInfoModel shareModel].user_stage==nil)
{
[HXHud showMessage:@"请选择身份" afterDelayType:0];
return;
}
switch (sender.tag) {
case 0:
{

View File

@ -6,7 +6,7 @@
//
#import "ShouYeZCXZTableViewCell.h"
#import "ZhiNengXieZuoViewController.h"
@interface ShouYeZCXZTableViewCell ()
@ -73,9 +73,20 @@
make.right.equalTo(viewback).offset(-18);
}];
UIButton *btnext = [[UIButton alloc] init];
[viewback addSubview:btnext];
[btnext mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(viewback);
}];
[btnext addTarget:self action:@selector(nextAction) forControlEvents:UIControlEventTouchUpInside];
}
return self;
}
-(void)nextAction
{
ZhiNengXieZuoViewController *vc = [ZhiNengXieZuoViewController new];
[self.viewController.navigationController pushViewController:vc animated:YES];
}
@end

View File

@ -9,6 +9,8 @@
#import "ZhiNengPPTView.h"
#import "NetWorkManager.h"
@interface ZhiNengPPTViewController ()
@ -44,6 +46,25 @@
make.top.offset(NavHeight);
}];
[LoadAlterView show];
[NetWorkManager requestPptThemeData:self.view Callback:^(BOOL state, PptThemeModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
view.arrTheme = responseObject.data;
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
}];
[NetWorkManager requestPptLangData:self.view Callback:^(BOOL state, PptLangModel *responseObject, NSString * _Nullable describle) {
if(state)
{
view.arrLang = responseObject.data;
}
}];
}

View File

@ -6,11 +6,12 @@
//
#import <UIKit/UIKit.h>
#import "PptThemeModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface ZhiNengPPTCollectionViewCell : UICollectionViewCell
///
@property (nonatomic , strong) PptThemeModelData *model;
@end
NS_ASSUME_NONNULL_END

View File

@ -7,6 +7,15 @@
#import "ZhiNengPPTCollectionViewCell.h"
@interface ZhiNengPPTCollectionViewCell ()
///
@property (nonatomic , strong) UIImageView *imgvback;
///
@property (nonatomic , strong) UILabel *lbname;
///
@property (nonatomic , strong) UIButton *btselect;
@end
@implementation ZhiNengPPTCollectionViewCell
-(id)initWithFrame:(CGRect)frame
{
@ -19,7 +28,6 @@
}];
UIImageView *imgvback = [[UIImageView alloc] init];
[imgvback setImage:[UIImage imageNamed:@"home_ls_znxz"]];
[viewback addSubview:imgvback];
[imgvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.equalTo(viewback);
@ -28,6 +36,7 @@
[imgvback setContentMode:UIViewContentModeScaleAspectFill];
[imgvback.layer setMasksToBounds:YES];
[imgvback.layer setCornerRadius:4];
_imgvback = imgvback;
UILabel *lbname = [[UILabel alloc] init];
[lbname setText:@"企业工作汇报"];
@ -39,6 +48,7 @@
make.left.right.equalTo(viewback);
make.top.equalTo(imgvback.mas_bottom).offset(10);
}];
_lbname = lbname;
UIButton *btselect = [[UIButton alloc] init];
[btselect setImage:[UIImage imageNamed:@"ppt_fengeN"] forState:UIControlStateNormal];
@ -49,9 +59,17 @@
make.width.height.offset(30);
}];
[btselect setUserInteractionEnabled:NO];
_btselect = btselect;
}
return self;
}
-(void)setModel:(PptThemeModelData *)model
{
_model = model;
self.btselect.selected = model.select;
self.lbname.text = [Tools isStringnilkong:model.name];
[self.imgvback sd_setImageWithURL:[NSURL URLWithString:[Tools isStringnil:model.thumbnail]] placeholderImage:nil];
}
@end

View File

@ -0,0 +1,20 @@
//
// MyDocument.h
// ProductApp
//
// Created by 工作 on 2024/11/1.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef void(^downloadBlock)(id obj);
@interface MyDocument : NSObject
+ (BOOL)iCloudEnable;
+ (void)downloadWithDocumentURL:(NSURL*)url callBack:(downloadBlock)block;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,48 @@
//
// MyDocument.m
// ProductApp
//
// Created by on 2024/11/1.
//
#import "MyDocument.h"
#import "ZZDocument.h"
@interface MyDocument ()
@end
@implementation MyDocument
+ (BOOL)iCloudEnable {
NSFileManager *manager = [NSFileManager defaultManager];
NSURL *url = [manager URLForUbiquityContainerIdentifier:nil];
if (url != nil) {
return YES;
}
NSLog(@"iCloud 不可用");
return NO;
}
+ (void)downloadWithDocumentURL:(NSURL*)url callBack:(downloadBlock)block {
ZZDocument *iCloudDoc = [[ZZDocument alloc]initWithFileURL:url];
[iCloudDoc openWithCompletionHandler:^(BOOL success) {
if (success) {
[iCloudDoc closeWithCompletionHandler:^(BOOL success) {
NSLog(@"关闭成功");
}];
if (block) {
block(iCloudDoc.data);
}
}
}];
}
@end

View File

@ -0,0 +1,16 @@
//
// ZZDocument.h
// ProductApp
//
// Created by 工作 on 2024/11/1.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZZDocument : UIDocument
@property (nonatomic, strong) NSData *data;
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,15 @@
//
// ZZDocument.m
// ProductApp
//
// Created by on 2024/11/1.
//
#import "ZZDocument.h"
@implementation ZZDocument
- (BOOL)loadFromContents:(id)contents ofType:(NSString *)typeName error:(NSError * _Nullable __autoreleasing *)outError {
self.data = contents;
return YES;
}
@end

View File

@ -10,7 +10,9 @@
NS_ASSUME_NONNULL_BEGIN
@interface ZhiNengPPTView : UIView
///
@property (nonatomic , strong) NSArray *arrTheme;
@property (nonatomic , strong) NSArray *arrLang;
@end
NS_ASSUME_NONNULL_END

View File

@ -11,12 +11,38 @@
#import "StartZNPPTHUDAlter.h"
#import "StartZNPPTDaGangViewController.h"
#import "NetWorkManager.h"
#import "MyDocument.h"
#import "PublicUploadImageManager.h"
@interface ZhiNengPPTView ()<UICollectionViewDelegate,UICollectionViewDataSource,UIDocumentPickerDelegate>
///
@property (nonatomic , strong) FSTextView *textview ;
@interface ZhiNengPPTView ()<UICollectionViewDelegate,UICollectionViewDataSource>
///
@property (nonatomic , strong) UIView *viewtext;
@property (nonatomic , strong) UIView *viewfile;
///
@property (nonatomic , strong) UIImageView *imgvico;
@property (nonatomic , strong) UILabel *lbfilename;
///
@property (nonatomic , strong) UICollectionView *collect;
///
@property (nonatomic , strong) UIButton *btyuyan;
///@"演讲备注",@"智能配图"
@property (nonatomic , strong) NSMutableArray *arrBtTypes;
///
@property (nonatomic , strong) FSTextView *textviewbc;
///
@property (nonatomic , strong) NSString *language;
///
@property (nonatomic , strong) PptThemeModelData *modelMB;
///
@property (nonatomic , strong) NSData *dataSave;
///
@property (nonatomic , strong) NSString *file_id;
@end
@implementation ZhiNengPPTView
@ -72,7 +98,7 @@
make.height.offset(((UISCREEN_WIDTH-42)/2.0*270/458+30+10)*3);
}];
[collect registerClass:[ZhiNengPPTCollectionViewCell class] forCellWithReuseIdentifier:@"ZhiNengPPTCollectionViewCell"];
_collect = collect;
[scvback mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(collect).offset(30);
@ -136,6 +162,7 @@
make.height.offset(110);
}];
[textview setMaxLength:100];
_textview = textview;
UILabel *lbnumber = [[UILabel alloc] init];
[lbnumber setText:@"0/100"];
@ -168,7 +195,9 @@
}];
[btyuyan setIconInRightWithSpacing:2];
[btyuyan addTarget:self action:@selector(yuyanAction:) forControlEvents:UIControlEventTouchUpInside];
_btyuyan = btyuyan;
self.arrBtTypes = [NSMutableArray new];
NSArray *arr = @[@"演讲备注",@"智能配图"];
for(int i = 0 ; i < 2; i++)
{
@ -188,6 +217,7 @@
[bttype setIconInRightWithSpacing:2];
[bttype setTag:i];
[bttype addTarget:self action:@selector(typeAction:) forControlEvents:UIControlEventTouchUpInside];
[self.arrBtTypes addObject:bttype];
}
UIView *viewline = [[UIView alloc] init];
@ -277,7 +307,7 @@
}];
UIImageView *imgvico= [[UIImageView alloc] init];
[imgvico setImage:[UIImage imageNamed:@"yd_txt"]];
[imgvico setImage:[UIImage imageNamed:@"ppt_点击上传"]];
[imgvico setContentMode:UIViewContentModeScaleAspectFit];
[viewfileson addSubview:imgvico];
[imgvico mas_makeConstraints:^(MASConstraintMaker *make) {
@ -285,10 +315,12 @@
make.width.height.offset(33);
make.top.offset(0);
}];
[imgvico setTag:1000];
_imgvico = imgvico;
UILabel *lbfilename = [[UILabel alloc] init];
[lbfilename setText:@"年终总结手稿.txt"];
[lbfilename setTextColor:RGBCOLOR(51, 51, 51)];
[lbfilename setText:@"点击上传"];
[lbfilename setTextColor:RGBCOLOR(153, 153, 153)];///51, 51, 51
[lbfilename setTextAlignment:NSTextAlignmentCenter];
[lbfilename setFont:[UIFont systemFontOfSize:11]];
[lbfilename setNumberOfLines:2];
@ -297,6 +329,8 @@
make.left.right.equalTo(viewfileson);
make.top.equalTo(imgvico.mas_bottom).offset(4);
}];
[lbfilename setTag:1001];
_lbfilename = lbfilename;
[viewfileson mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(lbfilename);
@ -340,6 +374,7 @@
make.edges.equalTo(view);
}];
[textview setMaxLength:1000];
_textviewbc = textview;
UILabel *lbnumber = [[UILabel alloc] init];
[lbnumber setText:@"0/1000"];
@ -354,10 +389,44 @@
lbnumber.text = [NSString stringWithFormat:@"%ld/1000",textView.text.length];
}];
}
-(void)updataYuYanBt
{
float f_width = [Tools getWidthWithText:self.btyuyan.titleLabel.text height:20 font:13]+30;
if(f_width<40)f_width = 40;
if(f_width>150)f_width = 150;
[self.btyuyan mas_updateConstraints:^(MASConstraintMaker *make) {
make.width.offset(f_width);
}];
[self.btyuyan setIconInRightWithSpacing:2];
}
-(void)setArrTheme:(NSArray *)arrTheme
{
_arrTheme = arrTheme;
[self.collect reloadData];
}
-(void)setArrLang:(NSArray *)arrLang
{
_arrLang = arrLang;
if(arrLang.count==0)return;
PptLangModelData *model = self.arrLang.firstObject;
[self.btyuyan setTitle:[Tools isStringnil:model.desc] forState:UIControlStateNormal];
[self updataYuYanBt];
///
self.language = model.code;
}
///
-(void)yuyanAction:(UIButton *)sender
{
[[[MOFSPickerManager shareManger] pickView] showWithDataArray:self.arrLang keyMapper:@"desc" title:@"" commitTitle:@"确定" cancelTitle:@"取消" commitBlock:^(id _Nullable model) {
PptLangModelData *modelshow = model;
[self.btyuyan setTitle:[Tools isStringnil:modelshow.desc] forState:UIControlStateNormal];
[self updataYuYanBt];
self.language = modelshow.code;
} cancelBlock:^{
}];
}
//
-(void)typeAction:(UIButton *)sender
@ -373,29 +442,157 @@
///
-(void)fileAction
{
NSArray *documentTypes = @[@"public.content", @"public.text", @"com.adobe.pdf", @"com.microsoft.word.doc", @"com.microsoft.powerpoint.ppt"];
UIDocumentPickerViewController *documentPickerViewController = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:documentTypes inMode:UIDocumentPickerModeOpen];
documentPickerViewController.delegate = self;
[self.viewController presentViewController:documentPickerViewController animated:YES completion:nil];
}
- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentsAtURLs:(NSArray <NSURL *>*)urls
{
self.dataSave = nil;
if(urls.count>0)
{
NSURL *url = urls.firstObject;
NSArray *array = [[url absoluteString] componentsSeparatedByString:@"/"];
NSString *fileName = [array lastObject];
fileName = [fileName stringByRemovingPercentEncoding];
if([fileName containsString:@"txt"]
||[fileName containsString:@"pdf"]
||[fileName containsString:@"doc"]
||[fileName containsString:@"docx"])
{
[MyDocument downloadWithDocumentURL:url callBack:^(id obj) {
NSData *data = obj;
if(data)
{
self.dataSave = data;
self.lbfilename.text = fileName;
if([fileName containsString:@"txt"])
{
self.imgvico.image = [UIImage imageNamed:@"yd_txt"];
}
else if([fileName containsString:@"pdf"])
{
self.imgvico.image = [UIImage imageNamed:@"yd_pdf"];
}
else if([fileName containsString:@"doc"])
{
self.imgvico.image = [UIImage imageNamed:@"yd_doc"];
}
else
{
self.imgvico.image = [UIImage imageNamed:@"yd_docx"];
}
[self.lbfilename setTextColor:RGBCOLOR(51, 51, 51)];
}
else
{
[self.imgvico setImage:[UIImage imageNamed:@"ppt_点击上传"]];
[self.lbfilename setText:@"点击上传"];
[self.lbfilename setTextColor:RGBCOLOR(153, 153, 153)];
}
}];
}
else
{
[self.imgvico setImage:[UIImage imageNamed:@"ppt_点击上传"]];
[self.lbfilename setText:@"点击上传"];
[self.lbfilename setTextColor:RGBCOLOR(153, 153, 153)];
[HXHud showMessage:@"请选择txt、pdf、doc或docx文档" afterDelayType:0];
}
}
else
{
[self.imgvico setImage:[UIImage imageNamed:@"ppt_点击上传"]];
[self.lbfilename setText:@"点击上传"];
[self.lbfilename setTextColor:RGBCOLOR(153, 153, 153)];
}
}
///
-(void)shengchengAction
{
[StartZNPPTHUDAlter show];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if(self.viewfile.hidden==NO && self.dataSave)
{
NSMutableDictionary *dicQuery = [NSMutableDictionary new];
[dicQuery setObject:@"ppt" forKey:@"scene"];
[[PublicUploadImageManager shareManager] netWorkUrlUserPost:[NSString stringWithFormat:@"%@api/user/upload",BaseUrl] UploadData:self.dataSave name:self.lbfilename.text dicQuery:dicQuery Callback:^(BOOL state, NSDictionary *responseObject, NSString * _Nullable describle) {
if(state)
{
self.file_id = [Tools isStringnil:[responseObject objectForKey:@"id"]];
[self createSiLu];
}
else
{
[HXHud showMessage:@"文件上传失败" afterDelayType:1];
}
}];
}
else
{
[self createSiLu];
}
// [StartZNPPTHUDAlter show];
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// [StartZNPPTHUDAlter dismis];
// StartZNPPTDaGangViewController *vc = [StartZNPPTDaGangViewController new];
// [self.viewController.navigationController pushViewController:vc animated:YES];
//
// });
}
-(void)createSiLu
{
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[dicpush setObject:[Tools isStringnil:self.file_id] forKey:@"file_id"];
[dicpush setObject:[Tools isStringnil:self.modelMB.key] forKey:@"theme"];
[dicpush setObject:[Tools isStringnil:self.language] forKey:@"language"];
[dicpush setObject:[NSNumber numberWithBool:YES] forKey:@"is_cover_img"];
UIButton *btbz = self.arrBtTypes[0];
[dicpush setObject:[NSNumber numberWithBool:btbz.selected] forKey:@"is_card_note"];
UIButton *btpt = self.arrBtTypes[1];
[dicpush setObject:[NSNumber numberWithBool:btpt.selected] forKey:@"is_figure"];
if(self.viewtext.hidden==NO)
{
[dicpush setObject:[NSString stringWithFormat:@"%@,%@",self.textview.text,self.textviewbc.text] forKey:@"query"];
}
else
{
[dicpush setObject:self.textview.text forKey:@"query"];
}
NSLog(@"%@",dicpush);
[NetWorkManager requestPptOutlineData:self dicpush:dicpush Callback:^(BOOL state, PptOutlineModel *responseObject, NSString * _Nullable describle) {
[StartZNPPTHUDAlter dismis];
StartZNPPTDaGangViewController *vc = [StartZNPPTDaGangViewController new];
[self.viewController.navigationController pushViewController:vc animated:YES];
});
if(state)
{
StartZNPPTDaGangViewController *vc = [StartZNPPTDaGangViewController new];
vc.modelZS = responseObject.data;
[self.viewController.navigationController pushViewController:vc animated:YES];
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
}];
}
#pragma mark - UICollectionView
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return 5;
return self.arrTheme.count;
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
ZhiNengPPTCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"ZhiNengPPTCollectionViewCell" forIndexPath:indexPath];
cell.model = self.arrTheme[indexPath.row];
return cell;
}
//section
@ -420,7 +617,14 @@
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
///
for(PptThemeModelData *model in self.arrTheme)
{
model.select = NO;
}
PptThemeModelData *model = self.arrTheme[indexPath.row];
model.select = YES;
[self.collect reloadData];
self.modelMB = model;
}
@end

View File

@ -9,6 +9,7 @@
#import "TiCaiAlterView.h"
#import "DuanLuoXieZuoViewController.h"
#import "RoleTreeModel.h"
#import "NetWorkManager.h"
@interface ZhiNengXieZuoDuanLuoView ()
///
@ -247,15 +248,28 @@
[HXHud showMessage:@"请输入作文标题" afterDelayType:0];
return;
}
NSArray *arrbt = @[@"开头",@"段落",@"结尾"];
DuanLuoXieZuoViewController *vc = [DuanLuoXieZuoViewController new];
vc.strtitle = arrbt[self.btselect.tag];
vc.stage = [UserInfoModel shareModel].user_stage.name;
vc.dic_title = [self getFieldValue:0];
vc.require = [self getFieldValue:1];
vc.paragraph_type = [NSString stringWithFormat:@"%ld",self.btselect.tag];
vc.technique = [self getFieldValue:2];
[self.viewController.navigationController pushViewController:vc animated:YES];
[LoadAlterView show];
[NetWorkManager requestChatCheckData:self content:[NSString stringWithFormat:@"%@%@",[self getFieldValue:0],[self getFieldValue:1]] Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
NSArray *arrbt = @[@"开头",@"段落",@"结尾"];
DuanLuoXieZuoViewController *vc = [DuanLuoXieZuoViewController new];
vc.strtitle = arrbt[self.btselect.tag];
vc.stage = [UserInfoModel shareModel].user_stage.name;
vc.dic_title = [self getFieldValue:0];
vc.require = [self getFieldValue:1];
vc.paragraph_type = [NSString stringWithFormat:@"%ld",self.btselect.tag];
vc.technique = [self getFieldValue:2];
[self.viewController.navigationController pushViewController:vc animated:YES];
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
}];
}
-(NSString *)getFieldValue:(int)tag
{

View File

@ -11,6 +11,7 @@
#import "ChuangZuoSiLuViewController.h"
#import "XieZuoXiangQingViewController.h"
#import "RoleTreeModel.h"
#import "NetWorkManager.h"
@interface ZhiNengXieZuoQuanWenView ()
///
@ -217,19 +218,29 @@
[HXHud showMessage:@"请输入作文标题" afterDelayType:0];
return;
}
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[dicpush setObject:[self getFieldValue:0] forKey:@"title"];
[dicpush setObject:[self getFieldValue:1] forKey:@"require"];
[dicpush setObject:[self getFieldValue:2] forKey:@"type"];
[dicpush setObject:[self getFieldValue:3] forKey:@"require_num"];
[dicpush setObject:[Tools isStringnil:[UserInfoModel shareModel].user_stage.name] forKey:@"stage"];
XieZuoXiangQingViewController *vc = [XieZuoXiangQingViewController new];
vc.scene = @"write_one_key";
vc.dic_type = [self getFieldValue:2];
vc.dicpush = dicpush;
[self.viewController.navigationController pushViewController:vc animated:YES];
[LoadAlterView show];
[NetWorkManager requestChatCheckData:self content:[NSString stringWithFormat:@"%@%@",[self getFieldValue:0],[self getFieldValue:1]] Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
NSMutableDictionary *dicpush = [NSMutableDictionary new];
[dicpush setObject:[self getFieldValue:0] forKey:@"title"];
[dicpush setObject:[self getFieldValue:1] forKey:@"require"];
[dicpush setObject:[self getFieldValue:2] forKey:@"type"];
[dicpush setObject:[self getFieldValue:3] forKey:@"require_num"];
[dicpush setObject:[Tools isStringnil:[UserInfoModel shareModel].user_stage.name] forKey:@"stage"];
XieZuoXiangQingViewController *vc = [XieZuoXiangQingViewController new];
vc.scene = @"write_one_key";
vc.dic_type = [self getFieldValue:2];
vc.dicpush = dicpush;
[self.viewController.navigationController pushViewController:vc animated:YES];
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
}];
}
-(NSString *)getFieldValue:(int)tag
{

View File

@ -12,6 +12,7 @@
#import "SSENetWorkManager.h"
#import "RoleTreeModel.h"
#import "NetWorkManager.h"
@interface HuanGeSiLuView ()<UICollectionViewDelegate,UICollectionViewDataSource>
///
@ -192,9 +193,21 @@
[self.arrselect addObject:self.textView.text];
}
NSString *strtemp = [self.arrselect componentsJoinedByString:@"、"];
self.backValue(strtemp);
[self.viewController.navigationController popViewControllerAnimated:YES];
[LoadAlterView show];
[NetWorkManager requestChatCheckData:self content:strtemp Callback:^(BOOL state, BaseModel *responseObject, NSString * _Nullable describle) {
[LoadAlterView dismiss];
if(state)
{
self.backValue(strtemp);
[self.viewController.navigationController popViewControllerAnimated:YES];
}
else
{
[HXHud showMessage:responseObject.message afterDelayType:1];
}
}];
}
#pragma mark - UICollectionView
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView