WorkFlowSearchVC.m 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //
  2. // WorkFlowSearchVC.m
  3. // smartRhino
  4. //
  5. // Created by tederen on 2019/11/5.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import "WorkFlowSearchVC.h"
  9. #import "InfoSearchView.h"
  10. #import "WorkFlowSearchView.h"
  11. #import "WorkFlowSearchDetailVC.h"
  12. @interface WorkFlowSearchVC ()<InfoSearchViewDelegate,WorkFlowSearchViewDelegate>
  13. @property (nonatomic, strong) InfoSearchView *topNavSearch;
  14. @property (nonatomic, strong) WorkFlowSearchView *workFlowSearchView;
  15. @property (nonatomic, strong) UIView *myBackImageView;
  16. @end
  17. @implementation WorkFlowSearchVC
  18. - (void)viewDidLoad {
  19. [super viewDidLoad];
  20. self.fd_prefersNavigationBarHidden = YES;
  21. [self.view addSubview:self.myBackImageView];
  22. self.view.backgroundColor = UIColorHex(EEEEEE);
  23. [self.view addSubview:self.topNavSearch];
  24. self.topNavSearch.searchPlaceholder = @" 搜索标题、编号、正文内容";
  25. [self.topNavSearch.searchBar becomeFirstResponder];
  26. [self.view addSubview:self.workFlowSearchView];
  27. }
  28. #pragma mark - InfoSearchViewDelegate
  29. - (void)searchButtonAction:(UISearchBar *)searchBar {
  30. [self goDetailController:searchBar.text];
  31. // [self gotoDetailSearchList];
  32. }
  33. #pragma mark - setter
  34. - (InfoSearchView *)topNavSearch {
  35. if (!_topNavSearch) {
  36. _topNavSearch = [[InfoSearchView alloc] initWithFrame:CGRectMake(0, (IS_IPHONEX?40:20), kGXScreenWidth, 45) type:InfoSearchViewTypeDefault];
  37. _topNavSearch.delegate = self;
  38. WEAKSELF
  39. _topNavSearch.backBlock = ^{
  40. STRONGSELF
  41. [strongSelf.navigationController popViewControllerAnimated:YES];
  42. };
  43. // [_topNavSearch showLineView];
  44. }
  45. return _topNavSearch;
  46. }
  47. - (WorkFlowSearchView *)workFlowSearchView{
  48. if (!_workFlowSearchView) {
  49. _workFlowSearchView = [[WorkFlowSearchView alloc] initWithFrame:CGRectMake(15, (IS_IPHONEX?40:20) + 45 + 35, kGXScreenWidth -30,130.f)];
  50. _workFlowSearchView.delegate = self;
  51. }
  52. return _workFlowSearchView;
  53. }
  54. - (UIView *)myBackImageView{
  55. if (!_myBackImageView) {
  56. _myBackImageView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, kGXScreenHeigh, kNavigationHeight-1)];
  57. _myBackImageView.backgroundColor = [UIColor whiteColor];
  58. }
  59. return _myBackImageView;
  60. }
  61. - (void)didSelectWorkFlowSearchViewAction:(TDButton *)sender{
  62. [self goDetailController:@""];
  63. }
  64. - (void)goDetailController:(NSString *)searchString{
  65. WorkFlowSearchDetailVC *workFlowSearchDetailVC = [[WorkFlowSearchDetailVC alloc ]init];
  66. workFlowSearchDetailVC.typeString = self.typeString;
  67. workFlowSearchDetailVC.apprvovalType = self.apprvovalType;
  68. workFlowSearchDetailVC.pageType = self.pageType;
  69. [workFlowSearchDetailVC goDetailController:searchString];
  70. [self.navigationController pushViewController:workFlowSearchDetailVC animated:YES];
  71. }
  72. @end