|
@@ -85,8 +85,8 @@
|
|
|
[self.addBtn setAction:^{
|
|
|
if (weakSelf.isSelect) {
|
|
|
MyFavoriteNewFindVC *vc = [MyFavoriteNewFindVC initMyFavoriteNewFindVC];
|
|
|
- vc.ParentId = 0;
|
|
|
- vc.roleId = 0;
|
|
|
+ vc.ParentId = weakSelf.ParentId;
|
|
|
+ vc.roleId = weakSelf.roleId;
|
|
|
vc.createFoldType = CreateNotesType;
|
|
|
vc.modifyTye = CreateType;
|
|
|
vc.fileType = NewTopicFileType;
|
|
@@ -111,12 +111,11 @@
|
|
|
}];
|
|
|
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id _Nonnull sender) {
|
|
|
MyFavoriteNewFindVC *vc = [MyFavoriteNewFindVC initMyFavoriteNewFindVC];
|
|
|
- vc.ParentId = 0;
|
|
|
- vc.roleId = 0;
|
|
|
- vc.createFoldType = CreateNotesType;
|
|
|
+ vc.ParentId = weakSelf.ParentId;
|
|
|
+ vc.roleId = weakSelf.roleId;
|
|
|
+ vc.createFoldType = CreateNewTopicType;
|
|
|
vc.modifyTye = CreateType;
|
|
|
- vc.titleStr = @"移动到";
|
|
|
- vc.fileType = NewTopicFileType;
|
|
|
+ vc.fileType = weakSelf.ParentId == 0 ? NewTopicFileType : NewNotFileType;
|
|
|
[weakSelf.navigationController pushViewController:vc animated:YES];
|
|
|
}];
|
|
|
self.noDataL.userInteractionEnabled = YES;
|
|
@@ -130,11 +129,11 @@
|
|
|
YCMenuAction *actionMenu = [YCMenuAction actionWithTitle:titleStr image:nil handler:^(YCMenuAction *action) {
|
|
|
if([@"建文件夹" isEqualToString:action.title]){
|
|
|
MyFavoriteNewFindVC *vc = [MyFavoriteNewFindVC initMyFavoriteNewFindVC];
|
|
|
- vc.ParentId = 0;
|
|
|
- vc.roleId = 0;
|
|
|
- vc.createFoldType = CreateNotesType;
|
|
|
+ vc.ParentId = weakSelf.ParentId;
|
|
|
+ vc.roleId = weakSelf.roleId;
|
|
|
+ vc.createFoldType = CreateNewTopicType;
|
|
|
vc.modifyTye = CreateType;
|
|
|
- vc.fileType = NewTopicFileType;
|
|
|
+ vc.fileType = weakSelf.ParentId == 0 ? NewTopicFileType : NewNotFileType;
|
|
|
[weakSelf.navigationController pushViewController:vc animated:YES];
|
|
|
}else if ([@"批量编辑" isEqualToString:action.title]){
|
|
|
MyTDTopicBookEditVC * vc = [MyTDTopicBookEditVC initMyTDTopicBookEditVC];
|
|
@@ -151,7 +150,7 @@
|
|
|
- (void)getData
|
|
|
{
|
|
|
NSDictionary * paraDict = @{@"ParentId":@(self.ParentId),
|
|
|
- @"TypeId":@(4),///4笔记
|
|
|
+ @"TypeId":[NSNumber numberWithInt:-4],///4笔记
|
|
|
@"RoleId":@(0),
|
|
|
@"KeyWord":@"",
|
|
|
};
|
|
@@ -166,12 +165,14 @@
|
|
|
[weakSelf.dataArray addObject:model];
|
|
|
}
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
- if (weakSelf.dataArray.count == (weakSelf.isNotRoot ? 0 : 1)) {
|
|
|
- weakSelf.noDataView.hidden = NO;
|
|
|
- weakSelf.tableView.scrollEnabled = NO;
|
|
|
- }else{
|
|
|
- weakSelf.noDataView.hidden = YES;
|
|
|
- weakSelf.tableView.scrollEnabled = YES;
|
|
|
+ if (weakSelf.ParentId == 0) {
|
|
|
+ if (weakSelf.dataArray.count == (weakSelf.isNotRoot ? 0 : 1)) {
|
|
|
+ weakSelf.noDataView.hidden = NO;
|
|
|
+ weakSelf.tableView.scrollEnabled = NO;
|
|
|
+ }else{
|
|
|
+ weakSelf.noDataView.hidden = YES;
|
|
|
+ weakSelf.tableView.scrollEnabled = YES;
|
|
|
+ }
|
|
|
}
|
|
|
[weakSelf.tableView reloadData];
|
|
|
});
|
|
@@ -196,6 +197,9 @@
|
|
|
TopicBookCell * cell = [TopicBookCell configCell0:tableView indexPath:indexPath];
|
|
|
cell.titleL.text = model.Name;
|
|
|
cell.lineV.hidden = self.dataArray.count == 1 ? YES : NO;
|
|
|
+ if (model.IsDraft) {
|
|
|
+ cell.imagV.image = IMG(@"Draft_Icon");
|
|
|
+ }
|
|
|
if (self.isSelect) {
|
|
|
cell.countL.hidden = YES;
|
|
|
cell.enterBtn.hidden = !model.IsFolder;
|
|
@@ -246,16 +250,20 @@
|
|
|
[[NSNotificationCenter defaultCenter] postNotificationName:SELECTETOPICBOOK object:nil userInfo:@{@"Id":@(model.Id),@"Name":model.Name}];
|
|
|
[self back1];
|
|
|
}else{
|
|
|
- NoteBookVC *vc = [NoteBookVC initNoteBookVC];
|
|
|
- vc.listType = MyFavoriteListLevelTypeB;
|
|
|
- vc.ParentId = 0;
|
|
|
- vc.FolderId = model.Id;
|
|
|
- vc.RoleId = model.RoleId;
|
|
|
- vc.myTitle = model.Name;
|
|
|
- vc.IsSystemDefault = model.IsSystemDefault;
|
|
|
- vc.TypeValue = 1;
|
|
|
- vc.isSubVC = YES;
|
|
|
- [self.navigationController pushViewController:vc animated:YES];
|
|
|
+ if (model.IsDraft) {
|
|
|
+
|
|
|
+ }else{
|
|
|
+ NoteBookVC *vc = [NoteBookVC initNoteBookVC];
|
|
|
+ vc.listType = MyFavoriteListLevelTypeB;
|
|
|
+ vc.ParentId = 0;
|
|
|
+ vc.FolderId = model.Id;
|
|
|
+ vc.RoleId = model.RoleId;
|
|
|
+ vc.myTitle = model.Name;
|
|
|
+ vc.IsSystemDefault = model.IsSystemDefault;
|
|
|
+ vc.TypeValue = 1;
|
|
|
+ vc.isSubVC = YES;
|
|
|
+ [self.navigationController pushViewController:vc animated:YES];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -283,7 +291,6 @@
|
|
|
WS(weakSelf);
|
|
|
TopicBookModel *model = self.dataArray[indexPath.row];
|
|
|
if (!model.IsSystemDefault) {
|
|
|
-
|
|
|
UIContextualAction *action1 = [UIContextualAction contextualActionWithStyle:UIContextualActionStyleDestructive title:@"删除" handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) {
|
|
|
[tableView setEditing:NO animated:YES];
|
|
|
UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:nil message:@"确认删除" preferredStyle:UIAlertControllerStyleAlert];
|
|
@@ -305,9 +312,9 @@
|
|
|
MyFavoriteNewFindVC *vc = [MyFavoriteNewFindVC initMyFavoriteNewFindVC];
|
|
|
vc.ParentId = model.Id;
|
|
|
vc.foldId = model.Id;
|
|
|
- vc.createFoldType = CreateNotesType;
|
|
|
+ vc.createFoldType = CreateNewTopicType;
|
|
|
vc.modifyTye = ModifyType;
|
|
|
- vc.fileType = NewOtherFileType;
|
|
|
+ vc.fileType = NewTopicFileType;
|
|
|
vc.titleStr = @"修改文件夹";
|
|
|
vc.roleId = model.RoleId;
|
|
|
vc.fileName = model.Name;
|
|
@@ -348,7 +355,7 @@
|
|
|
- (void)reCreateTable
|
|
|
{
|
|
|
NSDictionary * paraDict = @{@"ParentId":@(self.ParentId),
|
|
|
- @"TypeId":@(4),///4笔记
|
|
|
+ @"TypeId":[NSNumber numberWithInt:-4],///4笔记
|
|
|
@"RoleId":@(0),
|
|
|
@"KeyWord":@"",
|
|
|
};
|
|
@@ -398,7 +405,7 @@
|
|
|
}
|
|
|
NSMutableDictionary *dic = [[NSMutableDictionary alloc]init];
|
|
|
[dic setValue:MiddleIds forKey:@"MiddleIds"];
|
|
|
- [dic setValue:@(4) forKey:@"FolderType"];
|
|
|
+ [dic setValue:[NSNumber numberWithInt:-4] forKey:@"FolderType"];
|
|
|
|
|
|
WEAKSELF
|
|
|
[[HttpManager sharedHttpManager] POSTUrl:Host(API_Find_DeleteRecord) parameters:dic responseStyle:DATA success:^(id _Nonnull responseObject) {
|
|
@@ -409,7 +416,7 @@
|
|
|
}
|
|
|
- (void)launchMoveVC:(NSMutableArray<NSNumber*>*)selectIDArray{
|
|
|
MoveViewController * vc = [MoveViewController initMoveViewController];
|
|
|
- vc.TypeId = CreateNotesType;
|
|
|
+ vc.TypeId = CreateNewTopicType;
|
|
|
vc.collectType = CollectHanderType_Move;
|
|
|
vc.ParentId = 0;
|
|
|
vc.titleStr = @"移动到";
|