WorkFlowDetailsController.m 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  1. //
  2. // WorkFlowDetailsController.m
  3. // smartRhino
  4. //
  5. // Created by Android on 2019/12/18.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import "WorkFlowDetailsController.h"
  9. #import "HistoricalWorkFlowDetailsBaseCell.h"
  10. #import "WorkFlowPersonnelListController.h"
  11. #import "HistoricalWorkFlowDetailsTitleCell.h"
  12. #import "HistoricalWorkFlowDetailsContentCell.h"
  13. #import "MeetingDetailsTimeCell.h"
  14. #import "MyWorkFlowListCell.h"
  15. #import "NoteBookShareVC.h"
  16. #import "MyTDGroupViewController.h"
  17. #import "MyTDTopicCreateVC.h"
  18. #import "MoveViewController.h"
  19. #import "DownFileViewController.h"
  20. #import "HomeDetailController.h"
  21. #import "ChatMsgNoticeDetailVC.h"
  22. #import "MyTDTopicDetailVC.h"
  23. #import "TDInterLeterDetailVC.h"
  24. #import "NoteBookDetailVC.h"
  25. #import "TDGroupInfoListVC.h"
  26. #import "HistoricalWorkFlowDetailsMoreCell.h"
  27. #import "WorkFlowOrderController.h"
  28. #import "WorkFlowFecordController.h"
  29. #import "MyApprovalPageDetail.h"
  30. #import "ShareListVC.h"
  31. #import "MyFavoriteVC.h"
  32. #import "NoteBookVC.h"
  33. #import "OtherFavoriteVC.h"
  34. #import "OtherNoteBookVC.h"
  35. @interface WorkFlowDetailsController ()<UITableViewDelegate,UITableViewDataSource,NoteBookShareVCDelegate>
  36. @property (weak, nonatomic) IBOutlet UITableView *detailsTabView;
  37. @property (weak, nonatomic) IBOutlet UIView *bottomView;
  38. @property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomConstant;
  39. @property (strong, nonatomic) MyMeetingListModel * meetingModel;
  40. @property (strong, nonatomic) NoteBookShareVC * noteBookShareVC;
  41. @end
  42. @implementation WorkFlowDetailsController
  43. - (instancetype)initWithId:(NSInteger)meetingId {
  44. if (self = [super init]) {
  45. self.meetingId = meetingId;
  46. }
  47. return self;
  48. }
  49. - (IBAction)returnAction:(id)sender {
  50. [self shareHander];
  51. }
  52. - (void)shareHander{
  53. [self.noteBookShareVC initNoteBookShareData];
  54. // self.noteBookShareVC.isWork = YES;
  55. self.noteBookShareVC.view.hidden = !self.noteBookShareVC.view.hidden;
  56. }
  57. - (NoteBookShareVC *)noteBookShareVC{
  58. if (_noteBookShareVC == nil) {
  59. _noteBookShareVC = [NoteBookShareVC initNoteBookShareVC];
  60. [_noteBookShareVC.view setFrame:CGRectMake(0,0, SCREEN_WIDTH, SCREEN_HEIGHT)];
  61. [_noteBookShareVC.view setHidden:YES];
  62. _noteBookShareVC.delegate = self;
  63. }
  64. return _noteBookShareVC;
  65. }
  66. -(void)userSelectType:(NSString *)typeName WithIndexPath:(NSIndexPath *)indexPath{
  67. self.noteBookShareVC.view.hidden = !self.noteBookShareVC.view.hidden;
  68. if ([typeName isEqualToString:@"发给微信好友"]) {
  69. [self returnToWechatSession:UMSocialPlatformType_WechatSession];
  70. }else if ([typeName isEqualToString:@"发到朋友圈"]){
  71. [self returnToWechatSession:UMSocialPlatformType_WechatTimeLine];
  72. }else if ([typeName isEqualToString:@"发到微博"]){
  73. }else if ([typeName isEqualToString:@"发给QQ好友"]){
  74. }else if ([typeName isEqualToString:@"发到消息"]){
  75. [self returnToMessage];
  76. }else if ([typeName isEqualToString:@"发到小组"]){
  77. [self returnToGroup];
  78. }else if ([typeName isEqualToString:@"发到笔记"]){
  79. [self returnToNote];
  80. }else if ([typeName isEqualToString:@"发到话题"]){
  81. [self returnToTopic];
  82. }else{
  83. }
  84. }
  85. - (void)returnToWechatSession:(UMSocialPlatformType)platformType
  86. {
  87. [self shareWebPageToPlatformType:platformType title:self.meetingModel.Name desc:[NSString stringWithFormat:@"来自-%@",[AppUserModel sharedAppUserModel].Name] url:[NSString stringWithFormat:@"%@%ld",ShareHost(@"mobile/meetingWx?") ,self.meetingId] img:@"会议"];
  88. }
  89. - (void)shareWebPageToPlatformType:(UMSocialPlatformType)platformType title:(NSString *)title desc:(NSString *)desc url:(NSString *)url img:(NSString *)image
  90. {
  91. //创建分享消息对象
  92. UMSocialMessageObject *messageObject = [UMSocialMessageObject messageObject];
  93. messageObject.title = title;
  94. //创建网页内容对象
  95. UMShareWebpageObject *shareObject = [UMShareWebpageObject shareObjectWithTitle:title descr:desc thumImage:[UIImage imageNamed:image]];
  96. //设置网页地址
  97. shareObject.webpageUrl = url;
  98. //分享消息对象设置分享内容对象
  99. messageObject.shareObject = shareObject;
  100. //调用分享接口
  101. [[UMSocialManager defaultManager] shareToPlatform:platformType messageObject:messageObject currentViewController:self completion:^(id data, NSError *error) {
  102. if (error) {
  103. NSLog(@"************Share fail with error %@*********",error);
  104. }else{
  105. NSLog(@"response data is %@",data);
  106. }
  107. }];
  108. }
  109. - (void)returnToMessage
  110. {
  111. ShareListVC * vc = [ShareListVC initShareListVC];
  112. FlowAttachmentsModel * model = [[FlowAttachmentsModel alloc] init];
  113. model.SoureTypeId = CollectModel_meetDetail;
  114. model.Title = self.meetingModel.Name;
  115. model.SoureId = [self.meetingModel.Id integerValue];
  116. model.Author = self.meetingModel.UserName;
  117. vc.sendModel = model;
  118. vc.isReturn = YES;
  119. [self.navigationController pushViewController:vc animated:YES];
  120. }
  121. - (void)returnToGroup
  122. {
  123. MyTDGroupViewController * vc = [[MyTDGroupViewController alloc] init];
  124. FlowAttachmentsModel * model = [[FlowAttachmentsModel alloc] init];
  125. model.SoureTypeId = CollectModel_meetDetail;
  126. model.Title = self.meetingModel.Name;
  127. model.SoureId = [self.meetingModel.Id integerValue];
  128. model.Author = self.meetingModel.UserName;
  129. vc.type = CollectModel_Group;
  130. vc.sendModel = model;
  131. vc.isReturn = YES;
  132. [self.navigationController pushViewController:vc animated:YES];
  133. }
  134. - (void)returnToNote
  135. {
  136. MyTDTopicCreateVC * vc = [MyTDTopicCreateVC initMyTDTopicCreateVC];
  137. vc.type = CollectModel_NoteBook;
  138. FlowAttachmentsModel * model = [[FlowAttachmentsModel alloc] init];
  139. model.SoureTypeId = CollectModel_meetDetail;
  140. model.Title = self.meetingModel.Name;
  141. model.SoureId = [self.meetingModel.Id integerValue];
  142. model.Author = self.meetingModel.UserName;
  143. vc.sendModel = model;
  144. vc.isReturn = YES;
  145. [self.navigationController pushViewController:vc animated:YES];
  146. }
  147. - (void)returnToTopic
  148. {
  149. MyTDTopicCreateVC * vc = [MyTDTopicCreateVC initMyTDTopicCreateVC];
  150. FlowAttachmentsModel * model = [[FlowAttachmentsModel alloc] init];
  151. model.SoureTypeId = CollectModel_meetDetail;
  152. model.Title = self.meetingModel.Name;
  153. model.SoureId = [self.meetingModel.Id integerValue];
  154. model.Author = self.meetingModel.UserName;
  155. vc.sendModel = model;
  156. vc.type = CollectModel_NewTopic;
  157. vc.isReturn = YES;
  158. [self.navigationController pushViewController:vc animated:YES];
  159. }
  160. - (void)viewDidLoad {
  161. [super viewDidLoad];
  162. self.fd_prefersNavigationBarHidden = YES;
  163. self.detailsTabView.dataSource = self;
  164. self.detailsTabView.delegate = self;
  165. self.detailsTabView.tableFooterView = [UIView new];
  166. self.detailsTabView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
  167. self.detailsTabView.separatorColor = [UIColor colorWithHexString:@"F7F7F7"];
  168. [self.detailsTabView registerNib:[UINib nibWithNibName:@"HistoricalWorkFlowDetailsTitleCell" bundle:nil] forCellReuseIdentifier:@"HistoricalWorkFlowDetailsTitleCell"];
  169. [self.detailsTabView registerNib:[UINib nibWithNibName:@"HistoricalWorkFlowDetailsContentCell" bundle:nil] forCellReuseIdentifier:@"HistoricalWorkFlowDetailsContentCell"];
  170. [self.detailsTabView registerNib:[UINib nibWithNibName:@"HistoricalWorkFlowDetailsMoreCell" bundle:nil] forCellReuseIdentifier:@"HistoricalWorkFlowDetailsMoreCell"];
  171. [self.detailsTabView registerNib:[UINib nibWithNibName:@"MeetingDetailsTimeCell" bundle:nil] forCellReuseIdentifier:@"MeetingDetailsTimeCell"];
  172. if (self.meetType == MeetingEndType) {
  173. self.bottomView.alpha = 0;
  174. self.bottomView.hidden = YES;
  175. }
  176. [self getData];
  177. self.detailsTabView.hidden = YES;
  178. [[UtilsTools getWindow] addSubview:self.noteBookShareVC.view];
  179. }
  180. - (void)setBottomStatus:(BOOL)hidden
  181. {
  182. self.bottomView.hidden = hidden;
  183. if (hidden) {
  184. self.view.backgroundColor = [UIColor whiteColor];
  185. self.bottomConstant.constant = 0.f;
  186. }else{
  187. self.view.backgroundColor = [UIColor colorWithRed:234/255.0 green:234/255.0 blue:234/255.0 alpha:1];
  188. self.bottomConstant.constant = 50.f;
  189. }
  190. }
  191. - (void)getData
  192. {
  193. WS(weakSelf);
  194. NSString * url = [NSString stringWithFormat:@"%@%ld",Host(MeetingDetail),(long)self.meetingId];
  195. [[HttpManager sharedHttpManager] GETUrl:url parameters:@{} success:^(id _Nonnull responseObject) {
  196. [weakSelf.detailsTabView.mj_header endRefreshing];
  197. [weakSelf.detailsTabView.mj_footer endRefreshing];
  198. weakSelf.meetingModel = [MyMeetingListModel modelWithDictionary:responseObject];
  199. if (weakSelf.meetingModel.Status == 0) {
  200. weakSelf.meetType = MeetingWillOpenType;
  201. }else{
  202. weakSelf.meetType = MeetingEndType;
  203. }
  204. dispatch_async(dispatch_get_main_queue(), ^{
  205. if ([weakSelf.meetingModel.UserId integerValue] == [AppUserModel sharedAppUserModel].Id) {
  206. [weakSelf setBottomStatus:NO];
  207. }else{
  208. [weakSelf setBottomStatus:YES];
  209. }
  210. weakSelf.detailsTabView.hidden = NO;
  211. [weakSelf.detailsTabView reloadData];
  212. });
  213. } failure:^(NSError * _Nonnull error) {
  214. weakSelf.detailsTabView.hidden = YES;
  215. [weakSelf.detailsTabView.mj_header endRefreshing];
  216. [weakSelf.detailsTabView.mj_footer endRefreshing];
  217. }];
  218. }
  219. #pragma mark - table delegate
  220. - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
  221. {
  222. if ([cell respondsToSelector:@selector(setSeparatorInset:)])
  223. {
  224. [cell setSeparatorInset:UIEdgeInsetsZero];
  225. }
  226. if ([cell respondsToSelector:@selector(setLayoutMargins:)])
  227. {
  228. [cell setLayoutMargins:UIEdgeInsetsZero];
  229. }
  230. }
  231. - (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath {
  232. return 45.f;
  233. }
  234. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  235. if (indexPath.row == 1) {
  236. return self.meetingModel.MeetingTimes.count * 26.f + 18.f;
  237. }
  238. // if (indexPath.row == 2) {
  239. // NSString *address = [NSString stringWithFormat:@"%@ %@",self.meetingModel.Address,self.meetingModel.RoomName];
  240. // NSDictionary *txtAttribute = @{NSFontAttributeName: [UIFont systemFontOfSize:17]};
  241. // CGSize retSize = [address boundingRectWithSize:CGSizeMake(SCREEN_WIDTH - 100.f, MAXFLOAT)
  242. // options:\
  243. // NSStringDrawingTruncatesLastVisibleLine |
  244. // NSStringDrawingUsesLineFragmentOrigin |
  245. // NSStringDrawingUsesFontLeading
  246. // attributes:txtAttribute
  247. // context:nil].size;
  248. // return retSize.height + 24.f;
  249. // }
  250. if (indexPath.row == 3) {
  251. //获取实际内容
  252. NSString *content = self.meetingModel.Description;
  253. //获取字符串高度
  254. UILabel * label = [UILabel new];
  255. label.font = [UIFont systemFontOfSize:16];
  256. label.text = content;
  257. label.numberOfLines = 0;
  258. CGFloat contentHeight = [label sizeThatFits:CGSizeMake(SCREEN_WIDTH - 36, 10)].height;
  259. //图片应该展示的高度
  260. CGFloat imageHeight = self.meetingModel.ImageUrl.length > 0 ? (SCREEN_WIDTH - 30.f) * 0.5 : 0;
  261. CGFloat H = 48.f;
  262. if (self.meetingModel.ImageUrl.length > 0) {
  263. H += 15.f;
  264. }
  265. if (self.meetingModel.FlowAttachments.count > 0) {
  266. H += 15.f;
  267. }
  268. if (content.length > 0) {
  269. H += 15.f;
  270. }
  271. //添加其他高度
  272. return (contentHeight + H + imageHeight + self.meetingModel.FlowAttachments.count * 87);
  273. }
  274. return UITableViewAutomaticDimension;
  275. }
  276. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  277. if (self.meetType == MeetingEndType) {
  278. return 6;
  279. }
  280. return 5;
  281. }
  282. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  283. WS(weakSelf);
  284. switch (indexPath.row) {
  285. case 0:{
  286. HistoricalWorkFlowDetailsTitleCell * cell = (HistoricalWorkFlowDetailsTitleCell *)[tableView dequeueReusableCellWithIdentifier:@"HistoricalWorkFlowDetailsTitleCell" forIndexPath:indexPath];
  287. [cell.statusBtn setTitle:self.meetingModel.Status == 0 ? @"待开会" : @"已结束" forState:UIControlStateNormal];
  288. cell.statusBtn.hidden = self.meetType == MeetingEndType ? YES : NO;
  289. [cell setCellData:self.meetingModel withIndex:indexPath];
  290. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  291. return cell;
  292. }
  293. break;
  294. case 1:{
  295. MeetingDetailsTimeCell * cell = (MeetingDetailsTimeCell *)[tableView dequeueReusableCellWithIdentifier:@"MeetingDetailsTimeCell" forIndexPath:indexPath];
  296. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  297. [cell setCellData:self.meetingModel];
  298. return cell;
  299. }
  300. break;
  301. case 2:{
  302. HistoricalWorkFlowDetailsTitleCell * cell = [tableView dequeueReusableCellWithIdentifier:@"HistoricalWorkFlowDetailsTitleCell" forIndexPath:indexPath];
  303. [cell setCellData:self.meetingModel withIndex:indexPath];
  304. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  305. return cell;
  306. }
  307. break;
  308. case 3:{
  309. HistoricalWorkFlowDetailsContentCell * cell = (HistoricalWorkFlowDetailsContentCell *)[tableView dequeueReusableCellWithIdentifier:@"HistoricalWorkFlowDetailsContentCell" forIndexPath:indexPath];
  310. [cell setCellData:self.meetingModel withIndex:indexPath];
  311. cell.ClickAttrBlock = ^(NSDictionary * _Nonnull dict) {
  312. [weakSelf pushWithDict:dict];
  313. };
  314. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  315. return cell;
  316. }
  317. break;
  318. case 4:{
  319. HistoricalWorkFlowDetailsMoreCell * cell = (HistoricalWorkFlowDetailsMoreCell *)[tableView dequeueReusableCellWithIdentifier:@"HistoricalWorkFlowDetailsMoreCell" forIndexPath:indexPath];
  320. [cell setCellData:@"参会人员"];
  321. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  322. return cell;
  323. }
  324. break;
  325. default:{
  326. HistoricalWorkFlowDetailsMoreCell * cell = (HistoricalWorkFlowDetailsMoreCell *)[tableView dequeueReusableCellWithIdentifier:@"HistoricalWorkFlowDetailsMoreCell" forIndexPath:indexPath];
  327. [cell setCellData:@"会议纪要"];
  328. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  329. return cell;
  330. }
  331. break;
  332. }
  333. }
  334. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  335. [tableView deselectRowAtIndexPath:indexPath animated:YES];
  336. if (indexPath.row == 4) {
  337. WorkFlowPersonnelListController *controller = [[WorkFlowPersonnelListController alloc] init];
  338. controller.Id = self.meetingModel.Id;
  339. [self.navigationController pushViewController:controller animated:YES];
  340. }
  341. if (indexPath.row == 5) {
  342. WorkFlowFecordController * vc = [[WorkFlowFecordController alloc] init];
  343. vc.meetId = [self.meetingModel.Id integerValue];
  344. vc.isBack = YES;
  345. [self.navigationController pushViewController:vc animated:YES];
  346. }
  347. }
  348. - (void)pushWithDict:(NSDictionary *)dict
  349. {
  350. WS(weakSelf);
  351. NSLog(@"%@",dict);
  352. switch ([dict[@"SoureTypeId"] integerValue]){
  353. case CollectModel_Aritle:
  354. {
  355. MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
  356. vc.type = CollectModel_Aritle;
  357. vc.Id = [dict[@"SoureId"] integerValue];
  358. [weakSelf.navigationController pushViewController:vc animated:YES];
  359. }
  360. break;
  361. case CollectModel_Toipc:
  362. {
  363. MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
  364. vc.type = CollectModel_Toipc;
  365. vc.Id = [dict[@"SoureId"] integerValue];
  366. [self.navigationController pushViewController:vc animated:YES];
  367. }
  368. break;
  369. case CollectModel_NewTopic:
  370. {
  371. MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
  372. vc.type = CollectModel_NewTopic;
  373. vc.Id = [dict[@"SoureId"] integerValue];
  374. [self.navigationController pushViewController:vc animated:YES];
  375. }
  376. break;
  377. case CollectModel_Collect:
  378. {
  379. }
  380. break;
  381. case CollectModel_NoteBook:
  382. {
  383. MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
  384. vc.type = CollectModel_NoteBook;
  385. vc.Id = [dict[@"SoureId"] integerValue];
  386. [self.navigationController pushViewController:vc animated:YES];
  387. }
  388. break;
  389. case CollectModel_CollectFile:{
  390. if ([dict[@"SourceUserId"] integerValue] == [AppUserModel sharedAppUserModel].Id) {
  391. MyFavoriteVC *vc = [MyFavoriteVC initMyFavoriteVC];
  392. vc.listType = [dict[@"SoureId"] integerValue] == 0 ? MyFavoriteListLevelTypeA : MyFavoriteListLevelTypeB;
  393. vc.ParentId = 0;
  394. vc.FolderId = [dict[@"SoureId"] integerValue];
  395. vc.myTitle = dict[@"Title"];
  396. vc.hidesBottomBarWhenPushed = YES;
  397. [self.navigationController pushViewController:vc animated:YES];
  398. }else{
  399. OtherFavoriteVC *vc = [OtherFavoriteVC initOtherFavoriteVC];
  400. vc.listType = [dict[@"SoureId"] integerValue] == 0 ? MyFavoriteListLevelTypeA : MyFavoriteListLevelTypeB;
  401. vc.ParentId = 0;
  402. vc.FolderId = [dict[@"SoureId"] integerValue];
  403. vc.myTitle = dict[@"Title"];
  404. vc.VisitUserId = [dict[@"SourceUserId"] integerValue];
  405. vc.hidesBottomBarWhenPushed = YES;
  406. [self.navigationController pushViewController:vc animated:YES];
  407. }
  408. }break;
  409. case CollectModel_NoteFile:{
  410. if ([dict[@"SourceUserId"] integerValue] == [AppUserModel sharedAppUserModel].Id) {
  411. NoteBookVC *vc = [NoteBookVC initNoteBookVC];
  412. vc.listType = [dict[@"SoureId"] integerValue] == 0 ? MyFavoriteListLevelTypeA : MyFavoriteListLevelTypeB;
  413. vc.ParentId = 0;
  414. vc.FolderId = [dict[@"SoureId"] integerValue];
  415. vc.myTitle = dict[@"Title"];
  416. vc.VisitUserId = 0;
  417. vc.hidesBottomBarWhenPushed = YES;
  418. [self.navigationController pushViewController:vc animated:YES];
  419. }else{
  420. OtherNoteBookVC *vc = [OtherNoteBookVC initOtherNoteBookVC];
  421. vc.listType = [dict[@"SoureId"] integerValue] == 0 ? MyFavoriteListLevelTypeA : MyFavoriteListLevelTypeB;
  422. vc.FolderId = [dict[@"SoureId"] integerValue];
  423. vc.myTitle = dict[@"Title"];
  424. vc.VisitUserId = [dict[@"SourceUserId"] integerValue];
  425. vc.TypeValue = 0;
  426. vc.hidesBottomBarWhenPushed = YES;
  427. [self.navigationController pushViewController:vc animated:YES];
  428. }
  429. }break;
  430. case CollectModel_TopicBooK:{
  431. if ([dict[@"SourceUserId"] integerValue] == [AppUserModel sharedAppUserModel].Id) {
  432. NoteBookVC *vc = [NoteBookVC initNoteBookVC];
  433. vc.listType = MyFavoriteListLevelTypeA ;
  434. vc.ParentId = 0;
  435. vc.FolderId = [dict[@"SoureId"] integerValue];
  436. vc.myTitle = dict[@"Title"];
  437. vc.VisitUserId = 0;
  438. vc.TypeValue = 1;
  439. vc.hidesBottomBarWhenPushed = YES;
  440. [self.navigationController pushViewController:vc animated:YES];
  441. }else{
  442. OtherNoteBookVC * vc = [OtherNoteBookVC initOtherNoteBookVC];
  443. vc.listType = MyFavoriteListLevelTypeA ;
  444. vc.FolderId = [dict[@"SoureId"] integerValue];
  445. vc.CollectionDataId = [dict[@"SoureId"] integerValue];
  446. vc.CollectionType = CollectModel_TopicBooK;
  447. vc.TypeValue = 1;
  448. vc.myTitle = dict[@"Title"];
  449. vc.VisitUserId = [dict[@"SourceUserId"] integerValue];
  450. [self.navigationController pushViewController:vc animated:YES];
  451. }
  452. }break;
  453. case CollectModel_TopicSubBooK:{
  454. if ([dict[@"SourceUserId"] integerValue] == [AppUserModel sharedAppUserModel].Id) {
  455. NoteBookVC *vc = [NoteBookVC initNoteBookVC];
  456. vc.listType = MyFavoriteListLevelTypeB ;
  457. vc.FolderId = [dict[@"SoureId"] integerValue];
  458. vc.myTitle = dict[@"Title"];
  459. vc.VisitUserId = 0;
  460. vc.TypeValue = 1;
  461. [self.navigationController pushViewController:vc animated:YES];
  462. }else{
  463. OtherNoteBookVC * vc = [OtherNoteBookVC initOtherNoteBookVC];
  464. vc.listType = MyFavoriteListLevelTypeB ;
  465. vc.FolderId = [dict[@"SoureId"] integerValue];
  466. vc.CollectionDataId = [dict[@"SoureId"] integerValue];
  467. vc.CollectionType = CollectModel_TopicSubBooK;
  468. vc.TypeValue = 1;
  469. vc.myTitle = dict[@"Title"];
  470. vc.VisitUserId = [dict[@"SourceUserId"] integerValue];
  471. [self.navigationController pushViewController:vc animated:YES];
  472. }
  473. }break;
  474. case CollectModel_Notice:
  475. {
  476. MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
  477. vc.type = CollectModel_Notice;
  478. vc.Id = [dict[@"SoureId"] integerValue];
  479. [self.navigationController pushViewController:vc animated:YES];
  480. }
  481. break;
  482. case CollectModel_InterMail:
  483. {
  484. MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
  485. vc.type = CollectModel_InterMail;
  486. vc.Id = [dict[@"SoureId"] integerValue];
  487. [self.navigationController pushViewController:vc animated:YES];
  488. }
  489. break;
  490. case CollectModel_Group:
  491. {
  492. TDGroupInfoListVC * vc = [TDGroupInfoListVC initTDGroupInfoListVC];
  493. vc.GroupId = [dict[@"SoureId"] integerValue];
  494. vc.titleStr = dict[@"Title"];
  495. [self.navigationController pushViewController:vc animated:YES];
  496. }
  497. break;
  498. case CollectModel_meetMian:
  499. {
  500. MyTDTopicDetailVC * vc = [MyTDTopicDetailVC initMyTDTopicDetailVC];
  501. vc.type = CollectModel_meetMian;
  502. vc.Id = [dict[@"SoureId"] integerValue];
  503. [self.navigationController pushViewController:vc animated:YES];
  504. }
  505. break;
  506. case CollectModel_work:{
  507. MyApprovalPageDetail * vc = [[MyApprovalPageDetail alloc]init];
  508. vc.pageType = Type_ONEC;
  509. vc.indexId = [dict[@"SoureId"] integerValue];
  510. vc.title = dict[@"Title"];
  511. vc.TodoId = [dict[@"SoureId"] integerValue];
  512. [self.navigationController pushViewController:vc animated:YES];
  513. }break;
  514. default:
  515. {
  516. FlowAttachmentsModel * model = [FlowAttachmentsModel modelWithDictionary:dict];
  517. DownFileViewController *vc = [[DownFileViewController alloc]init];
  518. vc.model = model;
  519. [self.navigationController pushViewController:vc animated:YES];
  520. }
  521. break;
  522. }
  523. }
  524. #pragma mark - cancelMeeting
  525. - (IBAction)cancelMeetingBtn_Click:(id)sender {
  526. WS(weakSelf);
  527. UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:nil message:@"确认取消预约" preferredStyle:UIAlertControllerStyleAlert];
  528. UIAlertAction *ok = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  529. }];
  530. [ok setValue:k9 forKey:@"_titleTextColor"];
  531. UIAlertAction *noOk = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
  532. SHOWLOADING
  533. [[HttpManager sharedHttpManager] POSTWithUrl:CancelMeeting(self.meetingModel.Id) parameters:@{} success:^(id _Nonnull responseObject) {
  534. REMOVESHOW
  535. SHOWSUCCESS(@"已取消预约会议");
  536. if (weakSelf.cancelSussBlock) {
  537. weakSelf.cancelSussBlock();
  538. }
  539. [weakSelf.navigationController popViewControllerAnimated:YES];
  540. } failure:^(NSError * _Nonnull error) {
  541. REMOVESHOW
  542. SHOWERROR([ZYCTool handerResultData:error]);
  543. }];
  544. }];
  545. [alertVC addAction:ok];
  546. [alertVC addAction:noOk];
  547. [self presentViewController:alertVC animated:YES completion:nil];
  548. }
  549. - (IBAction)editMeetingBtn_Click:(id)sender {
  550. WS(weakSelf);
  551. WorkFlowOrderController *workFlowOrderController = [[WorkFlowOrderController alloc] initWithRID:[NSString stringWithFormat:@"%ld",(long)self.meetingId]];
  552. workFlowOrderController.mettingTitle = self.meetingModel.Name;
  553. workFlowOrderController.meetingModel = self.meetingModel;
  554. workFlowOrderController.isEdit = YES;
  555. workFlowOrderController.ChangeSuccessBlock = ^{
  556. [weakSelf getData];
  557. };
  558. [self.navigationController pushViewController:workFlowOrderController animated:YES];
  559. }
  560. @end