//
//  TaskCheckViewController.m
//  Macalline
//
//  Created by JianjiYuan on 14-12-4.
//  Copyright (c) 2014年 JianjiYuan. All rights reserved.
//

#import "TaskCheckViewController.h"
#import "TaskUploadViewController.h"
#import "ImageBrowserViewController.h"
#import "UIScrollView+Customized.h"
#import "TaskListView.h"
#import "NewTaskUploadViewController.h"

@interface TaskCheckHeader : UIView
@property (nonatomic, strong) UIView *viewDone;

@property (nonatomic, strong) UILabel *lblTaskName;
@property (nonatomic, strong) UILabel *lblTaskAddress;
@property (nonatomic, strong) UILabel *lblTaskTime;
@property (nonatomic, strong) UIButton *StatusImage;
@property (nonatomic, strong) UIImageView *locationImage;

@property (nonatomic, strong) UILabel *lblPointPre;
@property (nonatomic, strong) UILabel *lblPoint;
@property (nonatomic, strong) UILabel *lblRemarkPre;
@property (nonatomic, strong) UILabel *lblRemark;
@property (nonatomic, strong) UILabel *lblCheckAreaPre;
@property (nonatomic, strong) UILabel *lblCheckArea;
@property (nonatomic, strong) UILabel *lblStandardPre;
@property (nonatomic, strong) UILabel *lblStandard;
@property (nonatomic,strong) UILabel *lblpicNumPre;
@property (nonatomic,strong) UILabel *lblpicNum;

@end
@interface TaskCheckHeader1 : UIView
@property (nonatomic, strong) UIView *viewDone;

@property (nonatomic, strong) UILabel *lblTaskName;
@property (nonatomic, strong) UILabel *lblTaskAddress;
@property (nonatomic, strong) UILabel *lblTaskTime;
@property (nonatomic, strong) UIButton *StatusImage;
@property (nonatomic, strong) UIImageView *locationImage;

@property (nonatomic, strong) UILabel *lblPointPre;
@property (nonatomic, strong) UILabel *lblPoint;
@property (nonatomic, strong) UILabel *lblRemarkPre;
@property (nonatomic, strong) UILabel *lblRemark;
@property (nonatomic, strong) UILabel *lblCheckAreaPre;
@property (nonatomic, strong) UILabel *lblCheckArea;
@property (nonatomic, strong) UILabel *lblStandardPre;
@property (nonatomic, strong) UILabel *lblStandard;
@property (nonatomic,strong) UILabel *lblpicNumPre;
@property (nonatomic,strong) UILabel *lblpicNum;

@end
@interface TaskCheckViewController () < ImageBrowserDelegate ,UIGestureRecognizerDelegate>
{
    UIView *viewExample;
    NSLayoutConstraint *layoutCtScrollBottm;
    NSString *picRequireMode;
    int checkpointIndex;
}
@property(nonatomic,strong) TaskListView* view1;
@property (nonatomic, strong) TaskCheckHeader *headerView;
@property (nonatomic,strong)  TaskCheckHeader1 *headerView1;

@property (nonatomic, strong) UILabel *lblExample;
@property (nonatomic, strong) UILabel *lblExampleNum;
@property (nonatomic, strong) ImageBrowserViewController *vcImageBExample;

@property (nonatomic, strong) UILabel *lblCheckRemarkPre;
@property (nonatomic, strong) UILabel *lblCheckRemarkNum;


@property (nonatomic, strong) UILabel *lblCheckRemark;
@property (nonatomic,strong) UILabel *lblCheckBeizhuPre;
@property (nonatomic,strong)UILabel *lblCheckBeizhu;

@property (nonatomic, strong) ImageBrowserViewController *vcImageBReal;

@property (nonatomic, strong) UIButton *btnBeginTask;
@property (nonatomic, strong) UIButton *btnTakePics;
@property (nonatomic, strong) UIButton *btnHistory;
@property (nonatomic, strong) UILabel *lblCheck;
@property (nonatomic, strong) ImageBrowserViewController *vcImageBCheck;

@property (nonatomic, strong) UIScrollView *scrollVContainer;

@property (nonatomic, strong) NSDictionary *dictDetails;

@property (nonatomic, strong) NSMutableArray *hitoryArr;
@end

@implementation TaskCheckViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view
    
    UIButton *btnBack = [UIButton buttonWithType:UIButtonTypeCustom];
  
    
    [btnBack setBackgroundImage:[UIImage imageNamed:@"NavBar/btn_nav_back.png"] forState:UIControlStateNormal];
    [btnBack sizeToFit];
    [btnBack addTarget:self action:@selector(btnBack) forControlEvents:UIControlEventTouchUpInside];
    
    [self.navigationController navbarLeftItemCustomized:@[btnBack] onwer:self.navigationItem];
    
  
    
    
    checkpointIndex = [self.checkPointIdArr indexOfObject:self.checkPointRecordId];
    
    viewExample = [UIView newAutoLayoutView];
    viewExample.backgroundColor = [UIColor whiteColor];

    [viewExample addSubview:self.vcImageBExample.view];
    [self addChildViewController:_vcImageBExample];
    [self.scrollVContainer addSubview:viewExample];
    
    [self.scrollVContainer autoPinEdgesToSuperviewEdgesWithInsets:UIEdgeInsetsMake(0, 0, 0, 0) excludingEdge:ALEdgeBottom];
//    
    [self.headerView autoPinEdgeToSuperviewEdge:ALEdgeTop];
    [self.headerView autoPinEdgeToSuperviewEdge:ALEdgeLeft];
    [self.headerView autoSetDimension:ALDimensionWidth toSize:320];
    [self.headerView autoSetDimension:ALDimensionHeight toSize:100];
    
    [self.headerView1 autoPinEdgeToSuperviewEdge:ALEdgeTop];
    [self.headerView1 autoPinEdgeToSuperviewEdge:ALEdgeLeft];
    [self.headerView1 autoSetDimension:ALDimensionWidth toSize:320];
    [self.headerView1 autoSetDimension:ALDimensionHeight toSize:100];
    
   // [self setViewLayoutConstraint];

    [self requestDatas];
    
    
}

- (void)btnBack
{
    for (UIViewController *controller in self.navigationController.viewControllers) {
        if ([controller isKindOfClass:NSClassFromString(@"TaskPointViewController")]) {
            [self.navigationController popToViewController:controller animated:YES];
        }
    }
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    
    if ([[UIApplication getObjectType:Number key:kShouldRequestDataWhenBack] boolValue]) {
        
        [self requestDatas];
        self.lblCheckRemark.hidden=YES;
        
        
    }
}

- (void)setViewLayoutConstraint
{

    [viewExample autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.headerView.viewDone];
    
    [viewExample autoPinEdgeToSuperviewEdge:ALEdgeLeft];
    [viewExample autoPinEdgeToSuperviewEdge:ALEdgeRight];
    [viewExample autoSetDimension:ALDimensionHeight toSize:320];
    
    
    [self.lblExample autoPinEdgesToSuperviewEdgesWithInsets:UIEdgeInsetsMake(5 , 10, 0,245) excludingEdge:ALEdgeBottom];

    [self.lblExample autoSetDimension:ALDimensionHeight toSize:30];
    
    [self.lblExampleNum autoPinEdge:ALEdgeBottom toEdge:ALEdgeBottom ofView:self.lblExample];
    [self.lblExampleNum autoPinEdge:ALEdgeTop toEdge:ALEdgeTop ofView:self.lblExample];
    [self.lblExampleNum autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:self.lblExample];
    [self.lblExampleNum autoSetDimension:ALDimensionWidth toSize:30];
    
    

    [self.vcImageBExample.view autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.lblExample withOffset:0];
  
     [self.vcImageBExample.view autoPinEdgesToSuperviewEdgesWithInsets:UIEdgeInsetsMake(0, 0, 0, 0) excludingEdge:ALEdgeTop];
    [self.vcImageBExample.view autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.lblExample withOffset:5];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)requestDatas
{
    [UIApplication showLoadingView:kTextShowInProgress];
    NSString *interface = @"queryCheckPointDetailsEX";
    NSDictionary *dicParam = @{@"checkPointRecordId":self.checkPointRecordId};
    
    NSOperation *operation = [self.networkMgr operationWithURL:kBaseEXURL(interface)
                                                     interface:interface
                                                        params:dicParam
                                                      dataType:BRNetMgrDataTypeJSON
                                                        method:BRNetMgrMethodPost];
    [self.networkMgr startOperation:operation];
}

- (void)handleCheckPoint
{
    [UIApplication showLoadingView:kTextShowInProgress];
    NSString *interface = @"handleCheckPoint";
    NSDictionary *dicParam = @{@"checkPointRecordId":self.checkPointRecordId};
    NSOperation *operation = [self.networkMgr operationWithURL:kBaseURL(interface)
                                                     interface:interface
                                                        params:dicParam
                                                      dataType:BRNetMgrDataTypeJSON
                                                        method:BRNetMgrMethodPost];
    [self.networkMgr startOperation:operation];
}

-(void)btnReviewHistory
{
    NSDictionary *dicParam = @{@"checkPointRecordId":self.checkPointRecordId};
    
    [UIApplication showLoadingView:kTextShowInProgress];
    NSString *interface = @"queryCPReviewRecordEX";
    NSOperation *operation = [self.networkMgr operationWithURL:kBaseEXURL(interface)
                                                     interface:interface
                                                        params:dicParam
                                                      dataType:BRNetMgrDataTypeJSON
                                                        method:BRNetMgrMethodPost];
    [self.networkMgr startOperation:operation];
}

#pragma mark =============  BRNetworkMgr Delegate  =============
- (void)httpOperationSuccess:(AFHTTPRequestOperation *)operation
                      result:(NSDictionary *)result
{
    if ([operation.userInfo[@"interface"] isEqualToString:@"queryCPReviewRecordEX"]) {
        
        self.hitoryArr = [result[@"recordList"] validDataOfClass:[NSArray class]];
        if (self.hitoryArr.count==0) {
            [UIApplication showToastViewMessage:@"该任务没有审核记录"];
        }
        else
        {
            [self addTaskHistoryListView];
        }
    }

    if ([operation.userInfo[@"interface"] isEqualToString:@"queryCheckPointDetailsEX"]) {

        
        self.dictDetails = result[@"checkPointDetails"];
        
        if([[NSString stringWithFormat:@"%@",_dictDetails[@"picRequireMode"]] isEqualToString:@"1"])
        {
            _headerView.lblStandard.hidden=YES;
            _headerView.lblStandardPre.hidden=YES;
            _headerView1.lblStandard.hidden=NO;
            _headerView1.lblStandardPre.hidden=NO;
            _headerView=(TaskCheckHeader *)_headerView1;
        }
        else
            
        {
            _headerView1.hidden=YES;
        }
        self.title = [NSString stringWithFormat:@"检查点详情 %d/%lu",checkpointIndex+1, (unsigned long)self.checkPointIdArr.count];
        picRequireMode=[NSString stringWithFormat:@"%@",self.dictDetails[@"picRequireMode"]];
        _headerView.lblPoint.text = _dictDetails[@"name"];
        _headerView.lblRemark.text = _dictDetails[@"remark"];
        _headerView.lblStandard.text = _dictDetails[@"scoreDescription"];
        
        CGFloat hight = [_headerView.lblRemark.text boundingRectWithSize:CGSizeMake(CGRectGetWidth(_headerView.frame)-110, CGFLOAT_MAX)
                                                                 options:NSStringDrawingUsesFontLeading|NSStringDrawingUsesLineFragmentOrigin
                                                              attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16]}
                                                                 context:nil].size.height;

        
        [_headerView.lblRemark setFrame:CGRectMake(0, 0, CGRectGetWidth(_headerView.frame)-110, hight)];
        
        CGFloat hight1 = [_headerView.lblStandard.text boundingRectWithSize:CGSizeMake(CGRectGetWidth(_headerView.frame)-110, CGFLOAT_MAX)
                                                                 options:NSStringDrawingUsesFontLeading|NSStringDrawingUsesLineFragmentOrigin
                                                              attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16]}
                                                                 context:nil].size.height;
        
        
        [_headerView.lblStandard setFrame:CGRectMake(0, 0, CGRectGetWidth(_headerView.frame)-110, hight1)];
        
        
        if([[NSString stringWithFormat:@"%@",_dictDetails[@"picRequireMode"]] isEqualToString:@"1"])
        {
            if (hight > 20 || hight1 > 20) {
                [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, 75+hight+hight1)];
                [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:75+hight+hight1];
                
                [_headerView1.viewDone setFrame:CGRectMake(0, 0, 320, 75+hight+hight1)];
                [_headerView1.viewDone autoSetDimension:ALDimensionHeight toSize:75+hight+hight1];
            }
            else
            {
                [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, 105)];
                [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:105];
                
                [_headerView1.viewDone setFrame:CGRectMake(0, 0, 320, 105)];
                [_headerView1.viewDone autoSetDimension:ALDimensionHeight toSize:105];
            }
//            [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, hight>20? 85+hight:105)];
//            [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:hight>20? 85+hight:105];

        }
        else
        {
            if (hight > 20 || hight1 > 20) {
                [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, 101+hight+hight1)];
                [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:101+hight+hight1];
            }
            else
            {
                [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, 130)];
                [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:130];
            }
//        [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, hight>20? 111+hight:130)];
//        
//        [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:hight>20? 111+hight:130];
    
        }
        
        
        
        
        
        
        
//        if([[NSString stringWithFormat:@"%@",_dictDetails[@"picRequireMode"]] isEqualToString:@"1"])
//        {
//            if (hight > 20 || hight1 > 20) {
//                [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, 75+hight+hight1)];
//                [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:75+hight+hight1];
//            }
//            else
//            {
//                [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, 105)];
//                [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:105];
//            }
//            //            [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, hight>20? 85+hight:105)];
//            //            [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:hight>20? 85+hight:105];
//            
//        }
//        else
//        {
//            if (hight > 20 || hight1 > 20) {
//                [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, 101+hight+hight1)];
//                
//                [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:101+hight+hight1];
//            }
//            else
//            {
//                [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, 120)];
//                [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:120];
//            }
//            //        [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, hight>20? 111+hight:130)];
//            //
//            //        [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:hight>20? 111+hight:130];
//            
//        }
//        
        
        
        if([[NSString stringWithFormat:@"%@",_dictDetails[@"picRequireMode"]] isEqualToString:@"1"])
        {
            if ( (hight + hight1 )>40)
            {
                [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, 61+hight+hight1)];
                [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:61+hight+hight1];
            }
            else
            {
                [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, 105)];
                [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:105];
            }
            //            [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, hight>20? 85+hight:105)];
            //            [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:hight>20? 85+hight:105];
            
        }
        else
        {
            if (  (hight +hight1 )> 40) {
                [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, 87+hight+hight1)];
                
                [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:87+hight+hight1];
            }
            else
            {
                [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, 130)];
                [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:130];
            }
            //        [_headerView.viewDone setFrame:CGRectMake(0, 0, 320, hight>20? 111+hight:130)];
            //
            //        [_headerView.viewDone autoSetDimension:ALDimensionHeight toSize:hight>20? 111+hight:130];
            
        }
        
        
        
        
        
        
        
        
        
        [self setViewLayoutConstraint];
        
        NSString* checkPointStatus = _dictDetails[@"reviewStatus"];
        
        NSString *introduce = self.dictDetails[@"realPicRemark"];
        CGFloat h = [introduce boundingRectWithSize:CGSizeMake(CGRectGetWidth(self.view.frame)-20, CGFLOAT_MAX)
                                       options:NSStringDrawingUsesFontLeading|NSStringDrawingUsesLineFragmentOrigin
                                    attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:13]}
                                       context:nil].size.height+15;
        

        
        if([[NSString stringWithFormat:@"%@", _dictDetails[@"picRequireMode"]] isEqualToString:@"1"])
        {
   
          NSString *picNum=[[NSString alloc] initWithFormat:@"%d张",0];
            _headerView.lblpicNum.text=picNum;
        }
        else if([[NSString stringWithFormat:@"%@", _dictDetails[@"picRequireMode"]] isEqualToString:@"2"])
            {
                 NSString *picNum=[[NSString alloc] initWithFormat:@"%@张",_dictDetails[@"reportPicNum"]];
                _headerView.lblpicNum.text=picNum;
                
            }
            else
            {
                 NSString *picNum=@"自定义";
                _headerView.lblpicNum.text=picNum;
            }
        
        
        if ([checkPointStatus isEqualToString:kZhenggaishenhetongguocode]) {
            _headerView.StatusImage.titleLabel.font = [UIFont systemFontOfSize:12];
            _headerView.StatusImage.titleLabel.numberOfLines = 2;
            _headerView.StatusImage.contentEdgeInsets = UIEdgeInsetsMake(0, 3, 0, 3);
            _headerView1.StatusImage.titleLabel.font = [UIFont systemFontOfSize:12];
            _headerView1.StatusImage.titleLabel.numberOfLines = 2;
            _headerView1.StatusImage.contentEdgeInsets = UIEdgeInsetsMake(0, 3, 0, 3);
        }
        
        NSString* status_str=_dictDetails[@"reviewStatusDesc"];
       [_headerView.StatusImage setTitle:status_str forState:UIControlStateNormal];
        
        _headerView.lblCheckArea.text = _dictDetails[@"typeDesc"];
        int numberOfPicItems = 0;
        if ([_dictDetails[@"reviewStatus"] isEqualToString:@"1"]) {//未上传
            numberOfPicItems=1;
            [self.btnTakePics autoSetDimensionsToSize:CGSizeMake(130, 30)];
            [self.btnHistory autoSetDimensionsToSize:CGSizeMake(130, 30)];
            
            [self.btnTakePics autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:20];
            
            [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:20];
          
            [self.btnTakePics autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10];
            [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10];
            
        }else {//已上传
            numberOfPicItems = 2;
            
            [self.lblCheckRemarkPre autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:viewExample withOffset:10];
            [self.lblCheckRemarkPre autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:10];

            [self.lblCheckRemarkPre autoSetDimensionsToSize:CGSizeMake(65, 21)];
           
            [self.lblCheckRemarkNum autoPinEdge:ALEdgeTop toEdge:ALEdgeTop ofView:self.lblCheckRemarkPre];
            [self.lblCheckRemarkNum autoPinEdge:ALEdgeBottom toEdge:ALEdgeBottom ofView:self.lblCheckRemarkPre];
            [self.lblCheckRemarkNum autoSetDimension:ALDimensionWidth toSize:21];
            [self.lblCheckRemarkNum autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:self.lblCheckRemarkPre];
            
            [self.lblCheckRemark autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:viewExample withOffset:10];
            [self.lblCheckRemark autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:self.lblCheckRemarkPre];
            [self.lblCheckRemark autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:10];
            [self.lblCheckRemark autoSetDimension:ALDimensionHeight toSize:21];
            [self.lblCheckRemark sizeToFit];

            
            if([self.picEnough isEqualToString:@"0"] )
            {
                self.lblCheckRemark.text=[NSString stringWithFormat:@"上报数量不达标，要求不少于%@张",_dictDetails[@"reportPicNum"]];
            }
            
            [self.vcImageBReal.view autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.lblCheckRemark withOffset:4];
            [self.vcImageBReal.view autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:0];
            [self.vcImageBReal.view autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:0];
            [self.lblCheckBeizhuPre autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:10];
            [self.lblCheckBeizhuPre autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.vcImageBReal.view withOffset:5];
            [self.lblCheckBeizhuPre autoSetDimensionsToSize:CGSizeMake(80, 21)];
            
            [self.lblCheckBeizhu autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:20];
            
            [self.lblCheckBeizhu autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.lblCheckBeizhuPre withOffset:5];
            [self.lblCheckBeizhu autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:20];
            [self.lblCheckBeizhuPre autoSetDimension:ALDimensionHeight toSize:42];
            
            self.lblCheckBeizhu.text=self.dictDetails[@"realPicRemark"];
            
            [self.btnTakePics autoSetDimensionsToSize:CGSizeMake(130, 30)];
            [self.btnTakePics autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:20];
            [self.btnTakePics autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10];
            
            [self.btnHistory autoSetDimensionsToSize:CGSizeMake(130, 30)];
            [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:20];
            [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10];
        }
        NSArray *arrImages = [result[@"pictureList"] validDataOfClass:[NSArray class]];
        
        
        
        if (numberOfPicItems >= 1) {
            
            NSMutableArray *arrStandardImages = [NSMutableArray array];
            for (NSDictionary *dictImage in arrImages) {
                if ([dictImage[@"type"] isEqualToString:@"1"]) {
                    ImageBrowserObj *obj = [[ImageBrowserObj alloc] init];
                    obj.imageURL = dictImage[@"url"];
                    obj.sourceType = ImageSourceTypeWebURL;
                    obj.imageId = dictImage[@"id"];
                     [arrStandardImages addObject:obj];
                }
                
            }
            
            if (arrStandardImages.count == 0  ) {
//                ImageBrowserObj *obj = [[ImageBrowserObj alloc] init];
//                obj.imageName = @"no_picture.png";
//                obj.sourceType = ImageSourceTypeBundle;
//                obj.itemType = ImageItemTypeDefault;
//                [arrStandardImages addObject:obj];
                self.lblExampleNum.hidden=NO;
               
     
            }
            
            else
            {
                self.lblExampleNum.hidden=YES;
                
            }
            _vcImageBExample.selectedImages = arrStandardImages;
            int count = (int)arrStandardImages.count;
            int row = count/2+(count%2?1:0);
           
            CGFloat height = row * (_vcImageBExample.itemSize.height+_vcImageBExample.edgeInset.top+ _vcImageBExample.edgeInset.bottom);
            [viewExample autoSetDimensionsToSize:CGSizeMake(320, height+21)];
            [_vcImageBExample reloadImageDatas];
            
        }
        
        if (numberOfPicItems >= 2) {
            NSMutableArray *arrRealImages = [NSMutableArray array];
            for (NSDictionary *dictImage in arrImages) {
                if ([dictImage[@"type"] isEqualToString:@"2"]) {
                    ImageBrowserObj *obj = [[ImageBrowserObj alloc] init];
                    obj.imageURL = dictImage[@"url"];
                    obj.sourceType = ImageSourceTypeWebURL;
                    obj.imageId = dictImage[@"id"];
                    obj.isBGGray = YES;
                    [arrRealImages addObject:obj];
                }
                
            }
            if (arrRealImages.count == 0 && [[NSString stringWithFormat:@"%@", _dictDetails[@"picRequireMode"]] isEqualToString:@"1"] ) {
                self.lblCheckRemarkNum.hidden=NO;

            }
            
            else
            {
                self.lblCheckRemarkNum.hidden=YES;
                
            }
            _vcImageBReal.selectedImages = arrRealImages;
            int count = (int)arrRealImages.count;
            int row = count/2+(count%2?1:0);
            CGFloat height = row * (_vcImageBExample.itemSize.height+_vcImageBExample.edgeInset.top+ _vcImageBExample.edgeInset.bottom);
            [_vcImageBReal.view autoSetDimensionsToSize:CGSizeMake(320, height)];
            [_vcImageBReal reloadImageDatas];
        }

        
        if ([[DataMgr getInstance].roleId isEqualToString:@"2"] &&
            ([_dictDetails[@"status"] isEqualToString:@"1"] || [_dictDetails[@"status"] isEqualToString:@"2"])) {
            
            if (numberOfPicItems == 1) {
                [viewExample autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10 relation:NSLayoutRelationGreaterThanOrEqual];
            }else if (numberOfPicItems == 2) {
                [self.vcImageBReal.view autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10 relation:NSLayoutRelationGreaterThanOrEqual];
            }else if (numberOfPicItems == 3) {
                [self.vcImageBCheck.view autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10 relation:NSLayoutRelationGreaterThanOrEqual];
            }
            
            [self.btnTakePics autoSetDimensionsToSize:CGSizeMake(280, 30)];
            [self.btnTakePics autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:20];
            [self.btnTakePics autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10];
            
            [self.btnHistory autoSetDimensionsToSize:CGSizeMake(130, 30)];
            [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:20];
            [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10];
            
            if ([_dictDetails[@"status"] isEqualToString:@"2"]) {
                [self.btnTakePics setTitle:@"编辑" forState:UIControlStateNormal];
            }else {
                [self.btnTakePics setTitle:@"拍照" forState:UIControlStateNormal];
            }
            //过期，不可见
            //self.btnTakePics.hidden = [DataMgr getInstance].isUploadActionExpired;
            
            
//            [self.scrollVContainer removeConstraint:layoutCtScrollBottm];
//            layoutCtScrollBottm = [self.scrollVContainer autoPinEdge:ALEdgeBottom toEdge:ALEdgeTop ofView:self.btnTakePics withOffset:10];
            
            
        }else if ([[DataMgr getInstance].roleId isEqualToString:@"3"] &&
                  ([_dictDetails[@"status"] isEqualToString:@"2"] || [_dictDetails[@"status"] isEqualToString:@"3"])) {
            
            if (numberOfPicItems == 1) {
                [viewExample autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10];
            }else if (numberOfPicItems == 2) {
                [self.vcImageBReal.view autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10];
            }
            
        }else {
            //            if (_btnTakePics) {
            //                [_btnTakePics autoRemoveConstraintsAffectingView];
            //                [_btnTakePics removeFromSuperview];
            //            }
            //            if (_btnBeginTask) {
            //                [_btnBeginTask autoRemoveConstraintsAffectingView];
            //                [_btnBeginTask removeFromSuperview];
            //            }
            // [self.headerView.lblRemark autoSetDimensionsToSize:CGSizeMake(80, 40)];
            if (numberOfPicItems == 1) {
                [viewExample autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10 relation:NSLayoutRelationGreaterThanOrEqual];
            }else if (numberOfPicItems == 2) {
                [self.vcImageBReal.view autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:h+20 relation:NSLayoutRelationGreaterThanOrEqual];
            }else if (numberOfPicItems == 3) {
                [self.vcImageBCheck.view autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:h+20 relation:NSLayoutRelationGreaterThanOrEqual];
            }
            
//            [self.scrollVContainer removeConstraint:layoutCtScrollBottm];
//            layoutCtScrollBottm = [self.scrollVContainer autoPinEdgeToSuperviewEdge:ALEdgeBottom];
        }
        
        //[self.scrollVContainer addSubview:self.btnTakePics];
        if ([self.taskStatus isEqualToString:kWeitijiaocode]||[self.taskStatus isEqualToString:kDaizhenggaicode])
        {
            
            if ([[DataMgr getInstance].taskIsEnd isEqualToString:@"YES"]) {
                self.btnTakePics.hidden=YES;
                self.btnHistory.hidden=NO;
                [self.btnHistory autoSetDimension:ALDimensionHeight toSize:30];
                [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:20];
                [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:20];
                [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10];
                [self.scrollVContainer autoPinEdgesToSuperviewEdgesWithInsets:UIEdgeInsetsMake(0, 0, 50, 0)];
            }
            else
            {
                if ([checkPointStatus isEqualToString:kWeitijiaocode]||[checkPointStatus isEqualToString:kDaizhenggaicode]||[checkPointStatus isEqualToString:kWeishenhecode]||[checkPointStatus isEqualToString:kYizhenggaicode]) {
                    self.btnTakePics.hidden=NO;
                    self.btnHistory.hidden=NO;
                    [self.btnHistory autoSetDimensionsToSize:CGSizeMake(130, 30)];
                    [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:20];
                    [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10];
                    [self.scrollVContainer autoPinEdgesToSuperviewEdgesWithInsets:UIEdgeInsetsMake(0, 0, 50, 0)];
                }
                else
                {
                    self.btnTakePics.hidden=YES;
                    self.btnHistory.hidden=NO;
                    [self.btnHistory autoSetDimension:ALDimensionHeight toSize:30];
                    [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:20];
                    [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:20];
                    [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10];
                    [self.scrollVContainer autoPinEdgesToSuperviewEdgesWithInsets:UIEdgeInsetsMake(0, 0, 50, 0)];
                }
            }
            
        }
        else
        {
            self.btnTakePics.hidden=YES;
            self.btnHistory.hidden=NO;
            [self.btnHistory autoSetDimension:ALDimensionHeight toSize:30];
            [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:20];
            [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:20];
            [self.btnHistory autoPinEdgeToSuperviewEdge:ALEdgeBottom withInset:10];
            [self.scrollVContainer autoPinEdgesToSuperviewEdgesWithInsets:UIEdgeInsetsMake(0, 0, 50, 0)];
            
        }
    
    }
//    else if ([operation.userInfo[@"interface"] isEqualToString:@"handleCheckPointEx"]) {
//        
//        [self.navigationController popViewControllerAnimated:YES];
//        [UIApplication showToastViewMessage:@"检查通过！"];
//    }
//    
    
}

- (void)httpOperationFailed:(AFHTTPRequestOperation *)operation
                      error:(NSError *)error
{
    [self.scrollVContainer autoPinEdgeToSuperviewEdge:ALEdgeBottom];
}
-(void)addTaskHistoryListView
{
    _view1 = [[TaskListView alloc] initWithFrame:self.navigationController.view.bounds andHistoryArray:self.hitoryArr];
    
    UITapGestureRecognizer* tapGesture1 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(Actiondo:)];
    
    tapGesture1.delegate = self;
    [_view1 addGestureRecognizer:tapGesture1];
    [self.navigationController.view addSubview:_view1];
}





-(void)Actiondo:(UITapGestureRecognizer*)sender
{
    [_view1 removeFromSuperview];
}
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
    if (touch.view == _view1) {
        return YES;
        
    }
    return NO;
}
- (void)btnTakePicsClick:(UIButton *)sender
{
    
    NSString* status = self.dictDetails[@"reviewStatus"];
    if ([status isEqualToString:kDaizhenggaicode]) {
        
        NewTaskUploadViewController *detailVC = [[NewTaskUploadViewController alloc] init];
        detailVC.isUserCustom =  [NSString stringWithFormat:@"%@",_dictDetails[@"picRequireMode"]];
        detailVC.checkPointRecordId = self.checkPointRecordId;
        detailVC.dictTaskCheckInfo = self.dictDetails;
        detailVC.picRemark=self.dictDetails[@"realPicRemark"];
        detailVC.PicNumNeed=_dictDetails[@"reportPicNum"];
        detailVC.picRequireMode=picRequireMode;
        
        
        NSArray *arrTempImages=_vcImageBReal.selectedImages;
        
        NSMutableArray *arrImages = [NSMutableArray array];
        for (ImageBrowserObj *obj in arrTempImages) {
            if (obj.itemType == ImageItemTypeImage) {
                obj.isDeletable = YES;
                [arrImages addObject:obj];
            }
        }
        detailVC.oldImages = arrImages;
        detailVC.oldBeizhu = _dictDetails[@"realPicRemark"];
        //self.picEnough=[NSString stringWithFormat:@"%lu",(unsigned long)arrImages.count];
        detailVC.isEditMode = YES;
        [self.navigationController pushViewController:detailVC animated:YES];
    }
    else
    {
        TaskUploadViewController *detailVC = [[TaskUploadViewController alloc] initWithNibName:@"TaskUploadViewController" bundle:nil];
        detailVC.checkPointRecordId = self.checkPointRecordId;
        detailVC.dictTaskCheckInfo = self.dictDetails;
        detailVC.picRemark=self.dictDetails[@"realPicRemark"];
        detailVC.PicNumNeed=_dictDetails[@"reportPicNum"];
        detailVC.picRequireMode=picRequireMode;
        
        
        NSArray *arrTempImages=_vcImageBReal.selectedImages;
        
        NSMutableArray *arrImages = [NSMutableArray array];
        for (ImageBrowserObj *obj in arrTempImages) {
            if (obj.itemType == ImageItemTypeImage) {
                obj.isDeletable = YES;
                [arrImages addObject:obj];
            }
        }
        detailVC.arrImages = arrImages;
        //self.picEnough=[NSString stringWithFormat:@"%lu",(unsigned long)arrImages.count];
        detailVC.isEditMode = YES;
        [self.navigationController pushViewController:detailVC animated:YES];
    }
}


- (void)btnBeginTaskClick:(id)sender
{
    [self handleCheckPoint];
}



#pragma mark ====== UISwipeGestureRecognizer 左右滑动手势 ======
-(void)handleSwipeFrom:(UISwipeGestureRecognizer *)recognizer{
    
    if(recognizer.direction==UISwipeGestureRecognizerDirectionDown) {
        
        NSLog(@"swipe down");
        //执行程序
    }
    if(recognizer.direction==UISwipeGestureRecognizerDirectionUp) {
        
        NSLog(@"swipe up");
        //执行程序
    }
    
    if(recognizer.direction==UISwipeGestureRecognizerDirectionLeft) {
        checkpointIndex++;
        int m = self.checkPointIdArr.count;
        if (checkpointIndex >= m) {
            checkpointIndex = self.checkPointIdArr.count-1;
        }
        else
        {
            self.checkPointRecordId = [self.checkPointIdArr objectAtIndex:checkpointIndex];
            TaskCheckViewController* vc = [[TaskCheckViewController alloc] init];
            vc.checkPointRecordId = self.checkPointRecordId;
            vc.taskStatus = self.taskStatus;
            vc.picEnough=self.checkPointIsEnoughArr[checkpointIndex];
            
            vc.checkPointIdArr = self.checkPointIdArr;
            vc.checkPointIsEnoughArr = self.checkPointIsEnoughArr;
            
            CATransition *transition = [CATransition animation];
            transition.duration = 0.5;
            transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
            transition.type = kCATransitionPush;
            transition.subtype = kCATransitionFromRight;
            transition.delegate = self;
            [self.navigationController.view.layer addAnimation:transition forKey:nil];
            self.navigationController.navigationBarHidden = NO;
            
            [self.navigationController pushViewController:vc animated:YES];
            //            [self removeFromParentViewController];
        }
        
    }
    
    if(recognizer.direction==UISwipeGestureRecognizerDirectionRight) {
        checkpointIndex--;
        if (checkpointIndex < 0) {
            checkpointIndex = 0;
        }
        else
        {
            self.checkPointRecordId = [self.checkPointIdArr objectAtIndex:checkpointIndex];
            TaskCheckViewController* vc = [[TaskCheckViewController alloc] init];
            vc.checkPointRecordId = self.checkPointRecordId;
            vc.taskStatus = self.taskStatus;
            vc.picEnough=self.checkPointIsEnoughArr[checkpointIndex];
            
            vc.checkPointIdArr = self.checkPointIdArr;
            vc.checkPointIsEnoughArr = self.checkPointIsEnoughArr;
            
            CATransition *transition = [CATransition animation];
            transition.duration = 0.5;
            transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
            transition.type = kCATransitionPush;
            transition.subtype = kCATransitionFromLeft;
            transition.delegate = self;
            [self.navigationController.view.layer addAnimation:transition forKey:nil];
            self.navigationController.navigationBarHidden = NO;
            //            [self.navigationController pushViewController:viewController animated:NO];
            
            [self.navigationController pushViewController:vc animated:NO];
            //[self removeFromParentViewController];
        }
        
    }
    
}



#pragma mark =============  ImageBrowserViewController Delegate  =============

- (void)imageBrowser:(ImageBrowserViewController *)imageBrowser didSelectImages:(NSArray *)images
{
    
}

#pragma mark =============  Propertise LazyLoad  =============

- (UIScrollView *)scrollVContainer
{
    if (!_scrollVContainer) {
        self.scrollVContainer = [UIScrollView newAutoLayoutView];
        _scrollVContainer.showsHorizontalScrollIndicator = NO;
        _scrollVContainer.showsVerticalScrollIndicator = YES;
       _scrollVContainer.backgroundColor = [UIColor clearColor];
        
        [self.view addSubview:_scrollVContainer];
    }
    return _scrollVContainer;
}

- (UILabel *)lblExample
{
    if (!_lblExample) {
        self.lblExample = [UILabel newAutoLayoutView];
        _lblExample.text = @"标准图：";
        _lblExample.textColor = RGBColor(153, 153, 153, 1);
        _lblExample.backgroundColor = [UIColor clearColor];
        _lblExample.textAlignment = NSTextAlignmentLeft;
        _lblExample.font=[UIFont systemFontOfSize:16];
        
        
        [viewExample addSubview:_lblExample];
        
    }
    return _lblExample;
}
- (UILabel *)lblExampleNum
{
    if (!_lblExampleNum) {
        self.lblExampleNum = [UILabel newAutoLayoutView];
        _lblExampleNum.text = @"无";
        _lblExampleNum.textColor = RGBColor(244, 160, 0, 1);
        _lblExampleNum.backgroundColor = [UIColor clearColor];
        _lblExampleNum.textAlignment = NSTextAlignmentLeft;
        _lblExampleNum.font=[UIFont systemFontOfSize:14];
        [viewExample addSubview:_lblExampleNum];
        
    }
    return _lblExampleNum;
}


- (UILabel *)lblCheckRemarkPre
{
    if (!_lblCheckRemarkPre) {
        self.lblCheckRemarkPre = [UILabel newAutoLayoutView];
        _lblCheckRemarkPre.text = @"上报图:";

        _lblCheckRemarkPre.textColor = RGBColor(153, 153, 153, 1);
       
        _lblCheckRemarkPre.font = [UIFont systemFontOfSize:16];
        _lblCheckRemarkPre.backgroundColor = [UIColor clearColor];
        _lblCheckRemarkPre.textAlignment = NSTextAlignmentLeft;
                
        [self.scrollVContainer addSubview:_lblCheckRemarkPre];
        
    }
    return _lblCheckRemarkPre;
}


- (UILabel *)lblCheckRemarkNum
{
    if (!_lblCheckRemarkNum) {
        self.lblCheckRemarkNum = [UILabel newAutoLayoutView];
        _lblCheckRemarkNum.text = @"无";
        _lblCheckRemarkNum.textColor = RGBColor(244, 160, 0, 1);
        
        _lblCheckRemarkNum.font = [UIFont systemFontOfSize:14];
        _lblCheckRemarkNum.backgroundColor = [UIColor clearColor];
        _lblCheckRemarkNum.textAlignment = NSTextAlignmentLeft;
        [self.scrollVContainer addSubview:_lblCheckRemarkNum];
    }
    return _lblCheckRemarkNum;
}


- (UILabel *)lblCheckBeizhuPre
{
    if (!_lblCheckBeizhuPre) {
        self.lblCheckBeizhuPre = [UILabel newAutoLayoutView];
        _lblCheckBeizhuPre.text = @"上报备注：";
        _lblCheckBeizhuPre.textColor = RGBColor(153, 153, 153, 1);
        _lblCheckBeizhuPre.font = [UIFont systemFontOfSize:16];
        _lblCheckRemark.numberOfLines=0;
        
        _lblCheckBeizhuPre.backgroundColor = [UIColor clearColor];
        _lblCheckBeizhuPre.textAlignment = NSTextAlignmentLeft;
        [self.scrollVContainer addSubview:_lblCheckBeizhuPre];
    }
    return _lblCheckBeizhuPre;
}

- (UILabel *)lblCheckBeizhu
{
    if (!_lblCheckBeizhu) {
        self.lblCheckBeizhu = [UILabel newAutoLayoutView];
        _lblCheckBeizhu.text = @"";
        _lblCheckBeizhu.textColor = RGBColor(153, 153, 153, 1);
        _lblCheckBeizhu.font = [UIFont systemFontOfSize:16];
        _lblCheckBeizhu.backgroundColor = [UIColor clearColor];
        _lblCheckBeizhu.textAlignment = NSTextAlignmentLeft;
        _lblCheckBeizhu.numberOfLines = 0;
        _lblCheckBeizhu.lineBreakMode = NSLineBreakByWordWrapping;
        [self.scrollVContainer addSubview:_lblCheckBeizhu];
    }
    return _lblCheckBeizhu;
}
- (UILabel *)lblCheckRemark
{
    if (!_lblCheckRemark) {
        self.lblCheckRemark = [UILabel newAutoLayoutView];
        _lblCheckRemark.textColor = RGBColor(244, 160, 0, 1);
        _lblCheckRemark.backgroundColor = [UIColor clearColor];
        _lblCheckRemark.textAlignment = NSTextAlignmentLeft;
        _lblCheckRemark.font = [UIFont systemFontOfSize:14];
        _lblCheckRemark.numberOfLines=0;
        [self.scrollVContainer addSubview:_lblCheckRemark];
    }
    return _lblCheckRemark;
}

- (UILabel *)lblCheck
{
    if (!_lblCheck) {
        self.lblCheck = [UILabel newAutoLayoutView];
        _lblCheck.text = @"检查人员上传：";
        _lblCheck.textColor = RGBColor(153, 153, 153, 1);
        _lblCheck.backgroundColor = [UIColor clearColor];
        _lblCheck.textAlignment = NSTextAlignmentLeft;
        [self.scrollVContainer addSubview:_lblCheck];
    }
    return _lblCheck;
}
- (TaskCheckHeader *)headerView
{
    if (!_headerView) {
        self.headerView = [[TaskCheckHeader alloc] initWithFrame:CGRectZero];
        _headerView.translatesAutoresizingMaskIntoConstraints = NO;
        [self.scrollVContainer addSubview:_headerView];
    }
    return _headerView;
}


- (TaskCheckHeader1 *)headerView1
{
    if (!_headerView1) {
        self.headerView1 = [[TaskCheckHeader1 alloc] initWithFrame:CGRectZero];
        _headerView.translatesAutoresizingMaskIntoConstraints = NO;
        [self.scrollVContainer addSubview:_headerView1];
    }
    return _headerView1;
}

- (ImageBrowserViewController *)vcImageBExample
{
    if (!_vcImageBExample) {
        self.vcImageBExample = [[ImageBrowserViewController alloc] initWithNibName:nil bundle:nil];
        _vcImageBExample.showAddPicsButton = NO;
        _vcImageBExample.delegate = self;
        _vcImageBExample.collectionView.scrollEnabled = NO;
        _vcImageBExample.vcImagePickerPrensentFrom = self.navigationController;
    }
    return _vcImageBExample;
}
- (ImageBrowserViewController *)vcImageBReal
{
    if (!_vcImageBReal) {
        self.vcImageBReal = [[ImageBrowserViewController alloc] initWithNibName:nil bundle:nil];
        _vcImageBReal.delegate = self;
        _vcImageBReal.showAddPicsButton = NO;
        _vcImageBReal.collectionView.scrollEnabled = NO;
        _vcImageBReal.vcImagePickerPrensentFrom = self.navigationController;
        [self addChildViewController:_vcImageBReal];
        [self.scrollVContainer addSubview:_vcImageBReal.view];
    }
    return _vcImageBReal;
}
- (ImageBrowserViewController *)vcImageBCheck
{
    if (!_vcImageBCheck) {
        self.vcImageBCheck = [[ImageBrowserViewController alloc] initWithNibName:nil bundle:nil];
        _vcImageBCheck.delegate = self;
        _vcImageBCheck.showAddPicsButton = NO;
        
        _vcImageBCheck.collectionView.scrollEnabled = NO;
        _vcImageBCheck.vcImagePickerPrensentFrom = self.navigationController;
        [self addChildViewController:_vcImageBCheck];
        [self.scrollVContainer addSubview:_vcImageBCheck.view];
    }
    return _vcImageBCheck;
}

- (UIButton *)btnBeginTask
{
    if (!_btnBeginTask) {
        self.btnBeginTask = [UIButton buttonWithType:UIButtonTypeCustom];
        _btnBeginTask.translatesAutoresizingMaskIntoConstraints = NO;
        [_btnBeginTask setBackgroundImage:[UIImage imageWithColor:RGBColor(0, 120, 193, 1)] forState:UIControlStateNormal];
        [_btnBeginTask setTitle:@"检查无问题" forState:UIControlStateNormal];
        [_btnBeginTask setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        
        [_btnBeginTask addTarget:self action:@selector(btnBeginTaskClick:) forControlEvents:UIControlEventTouchUpInside];
        [self.view addSubview:_btnBeginTask];
    }
    return _btnBeginTask;
}
- (UIButton *)btnTakePics
{
    if (!_btnTakePics) {
        self.btnTakePics = [UIButton buttonWithType:UIButtonTypeCustom];
        _btnTakePics.translatesAutoresizingMaskIntoConstraints = NO;
        _btnTakePics.layer.cornerRadius = 5;
        _btnTakePics.clipsToBounds = YES;
        [_btnTakePics setBackgroundImage:[UIImage imageWithColor:[UIColor colorWithRed:0.2431 green:0.7137 blue:0.9373 alpha:1]] forState:UIControlStateNormal];
        _btnTakePics.titleLabel.font=[UIFont systemFontOfSize:14];

        [_btnTakePics setTitle:@"下一步 拍照" forState:UIControlStateNormal];
        [_btnTakePics setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        [_btnTakePics addTarget:self action:@selector(btnTakePicsClick:) forControlEvents:UIControlEventTouchUpInside];
        [self.view addSubview:_btnTakePics];
    }
    return _btnTakePics;
}
- (UIButton *)btnHistory
{
    if (!_btnHistory) {
        self.btnHistory = [UIButton buttonWithType:UIButtonTypeCustom];
        _btnHistory.translatesAutoresizingMaskIntoConstraints = NO;
        _btnHistory.layer.cornerRadius = 5;
        _btnHistory.clipsToBounds = YES;
        [_btnHistory setBackgroundImage:[UIImage imageWithColor:[UIColor colorWithRed:0.2431 green:0.7137 blue:0.9373 alpha:1]] forState:UIControlStateNormal];
        [_btnHistory setTitle:@"查看审核历史" forState:UIControlStateNormal];
        [_btnHistory setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        _btnHistory.titleLabel.font=[UIFont systemFontOfSize:14];

        [_btnHistory addTarget:self action:@selector(btnReviewHistory) forControlEvents:UIControlEventTouchUpInside];
        [self.view addSubview:_btnHistory];
    }
    return _btnHistory;
}
@end

@implementation TaskCheckHeader

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        [self.viewDone autoPinEdgesToSuperviewEdgesWithInsets:UIEdgeInsetsMake(0, 0, 0, 0) excludingEdge:ALEdgeBottom];
        [self.viewDone autoPinEdgeToSuperviewEdge:ALEdgeLeft];
        [self.viewDone autoPinEdgeToSuperviewEdge:ALEdgeRight];
        //[self.viewDone autoSetDimension:ALDimensionHeight toSize:170];
        
        [self.viewDone addSubview:self.lblPointPre];
        [self.viewDone addSubview:self.lblPoint];
        [self.viewDone addSubview:self.lblCheckAreaPre];
        [self.viewDone addSubview:self.lblCheckArea];
        [self.viewDone addSubview:self.lblpicNumPre];
        [self.viewDone addSubview:self.lblpicNum];
        
        [self.viewDone addSubview:self.lblRemarkPre];
        [self.viewDone addSubview:self.lblRemark];
     
        [self.viewDone addSubview:self.lblStandardPre];
        [self.viewDone addSubview:self.lblStandard];
        [self.viewDone addSubview:self.StatusImage];
        
        [self.lblPointPre autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:4];
        [self.lblPointPre autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:10];
        [self.lblPointPre autoSetDimensionsToSize:CGSizeMake(80, 21)];
        
        [self.lblPoint autoAlignAxis:ALAxisHorizontal toSameAxisOfView:self.lblPointPre];
        [self.lblPoint autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:self.lblPointPre];
        [self.lblPoint autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:8];
        [self.lblPoint autoSetDimension:ALDimensionHeight toSize:21 relation:NSLayoutRelationGreaterThanOrEqual];
        [self.lblPoint sizeToFit];
        
        
    
        [self.lblCheckAreaPre autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.lblPoint withOffset:5];
        [self.lblCheckAreaPre autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:10];
        [self.lblCheckAreaPre autoSetDimensionsToSize:CGSizeMake(80, 21)];
        [self.lblCheckArea autoPinEdge:ALEdgeTop toEdge:ALEdgeTop ofView:self.lblCheckAreaPre];
        [self.lblCheckArea autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:self.lblCheckAreaPre];
        [self.lblCheckArea autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:8];
        [self.lblCheckArea sizeToFit];
        [self.lblCheckArea autoSetDimension:ALDimensionHeight toSize:21 relation:NSLayoutRelationGreaterThanOrEqual];
        [self.lblCheckArea autoSetDimensionsToSize:CGSizeMake(80, 21)];
        
        
    
        [self.lblpicNumPre autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.lblCheckArea withOffset:5];
        [self.lblpicNumPre autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:10];
        [self.lblpicNumPre autoSetDimensionsToSize:CGSizeMake(80, 21)];
        [self.lblpicNum autoPinEdge:ALEdgeTop toEdge:ALEdgeTop ofView:self.lblpicNumPre];
        [self.lblpicNum autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:self.lblpicNumPre];
        [self.lblpicNum autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:8];
        [self.lblpicNum sizeToFit];
        [self.lblpicNum autoSetDimension:ALDimensionHeight toSize:21 relation:NSLayoutRelationGreaterThanOrEqual];
        [self.lblpicNum autoSetDimensionsToSize:CGSizeMake(80, 21)];
        
        
        

        
        [self.lblRemarkPre autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.lblpicNum withOffset:5];
        [self.lblRemarkPre autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:10];
        [self.lblRemarkPre autoSetDimensionsToSize:CGSizeMake(80, 21)];
        [self.lblRemark autoPinEdge:ALEdgeTop toEdge:ALEdgeTop ofView:self.lblRemarkPre];
        
        [self.lblRemark autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:self.lblRemarkPre];
        
        [self.lblRemark autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:8];
        
        [self.lblRemark sizeToFit];
        
        [self.lblRemark autoSetDimension:ALDimensionHeight toSize:21 relation:NSLayoutRelationGreaterThanOrEqual];

        
        
        
        
        
        [self.lblStandardPre autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.lblRemark withOffset:5];
        [self.lblStandardPre autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:10];
        [self.lblStandardPre autoSetDimensionsToSize:CGSizeMake(80, 21)];
        [self.lblStandard autoPinEdge:ALEdgeTop toEdge:ALEdgeTop ofView:self.lblStandardPre];
        [self.lblStandard autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:self.lblStandardPre];
        [self.lblStandard autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:8];
        [self.lblStandard sizeToFit];
        [self.lblStandard autoSetDimension:ALDimensionHeight toSize:21 relation:NSLayoutRelationGreaterThanOrEqual];
       
//        [self.StatusImage autoAlignAxis:ALAxisHorizontal toSameAxisOfView:self.lblCheckAreaPre];
        [self.StatusImage autoPinEdge:ALEdgeTop toEdge:ALEdgeTop ofView:self.lblPointPre];
        
        [self.StatusImage autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:12];
        [self.StatusImage autoSetDimensionsToSize:CGSizeMake(45, 45)];

    }
    return self;
}


- (UIView *)viewDone
{
    if (!_viewDone) {
        self.viewDone = [UIView newAutoLayoutView];
        _viewDone.backgroundColor = [UIColor colorWithRed:0.8667 green:0.8667 blue:0.8667 alpha:1];
        [self addSubview:_viewDone];
        
    }
    return _viewDone;
}



- (UIButton *)StatusImage
{
    if (!_StatusImage) {
        self.StatusImage = [UIButton newAutoLayoutView];
        [self.StatusImage setBackgroundImage:[UIImage imageNamed:@"Task/icon_bg_no_report.png"] forState:UIControlStateNormal];
        [self.StatusImage setTitle:@"已上报" forState:UIControlStateNormal];
        self.StatusImage.titleLabel.numberOfLines = 0;
        self.StatusImage.titleLabel.font = [UIFont systemFontOfSize:13];
    }
    return _StatusImage;
}

- (UILabel *)lblPointPre
{
    if (!_lblPointPre) {
        self.lblPointPre = [UILabel newAutoLayoutView];
        _lblPointPre.text = @"检 查 点 ：";
        _lblPointPre.textColor = RGBColor(102, 102, 102, 1);
        _lblPointPre.backgroundColor = [UIColor clearColor];
        _lblPointPre.textAlignment = NSTextAlignmentLeft;
        _lblPointPre.font = [UIFont systemFontOfSize:16];
    }
    return _lblPointPre;
}

- (UILabel *)lblPoint
{
    if (!_lblPoint) {
        self.lblPoint = [UILabel newAutoLayoutView];
        _lblPoint.textColor = RGBColor(102, 102, 102, 1);
        _lblPoint.backgroundColor = [UIColor clearColor];
        _lblPoint.textAlignment = NSTextAlignmentLeft;
        _lblPoint.font = [UIFont systemFontOfSize:16];
    }
    return _lblPoint;
}

- (UILabel *)lblRemarkPre
{
    if (!_lblRemarkPre) {
        self.lblRemarkPre = [UILabel newAutoLayoutView];
        _lblRemarkPre.text = @"检查要求：";
        _lblRemarkPre.textColor = RGBColor(102, 102, 102, 1);
        _lblRemarkPre.backgroundColor = [UIColor clearColor];
        _lblRemarkPre.textAlignment = NSTextAlignmentLeft;
        _lblRemarkPre.font = [UIFont systemFontOfSize:16];
    }
    return _lblRemarkPre;
}

- (UILabel *)lblRemark
{
    if (!_lblRemark) {
        self.lblRemark = [UILabel newAutoLayoutView];
        _lblRemark.textColor = RGBColor(102, 102, 102, 1);
        _lblRemark.backgroundColor = [UIColor clearColor];
        _lblRemark.textAlignment = NSTextAlignmentLeft;
        _lblRemark.font = [UIFont systemFontOfSize:16];
        _lblRemark.numberOfLines = 0;
    }
    return _lblRemark;
}

- (UILabel *)lblCheckAreaPre
{
    if (!_lblCheckAreaPre) {
        self.lblCheckAreaPre = [UILabel newAutoLayoutView];
        _lblCheckAreaPre.text = @"所属区域：";
        _lblCheckAreaPre.textColor = RGBColor(102, 102, 102, 1);
        _lblCheckAreaPre.backgroundColor = [UIColor clearColor];
        _lblCheckAreaPre.textAlignment = NSTextAlignmentLeft;
        _lblCheckAreaPre.font = [UIFont systemFontOfSize:16];
    }
    return _lblCheckAreaPre;
}

- (UILabel *)lblCheckArea
{
    if (!_lblCheckArea) {
        self.lblCheckArea = [UILabel newAutoLayoutView];
        _lblCheckArea.textColor = RGBColor(102, 102, 102, 1);
        _lblCheckArea.backgroundColor = [UIColor clearColor];
        _lblCheckArea.textAlignment = NSTextAlignmentLeft;
        _lblCheckArea.font = [UIFont systemFontOfSize:16];

    }
    return _lblCheckArea;
}

- (UILabel *)lblpicNumPre
{
    if (!_lblpicNumPre) {
        self.lblpicNumPre = [UILabel newAutoLayoutView];
        _lblpicNumPre.text = @"图片要求：";
        _lblpicNumPre.textColor = RGBColor(102, 102, 102, 1);
        _lblpicNumPre.backgroundColor = [UIColor clearColor];
        _lblpicNumPre.textAlignment = NSTextAlignmentLeft;
        _lblpicNumPre.font = [UIFont systemFontOfSize:16];
    }
    return _lblpicNumPre;
}


- (UILabel *)lblpicNum
{
    if (!_lblpicNum) {
        self.lblpicNum = [UILabel newAutoLayoutView];
        _lblpicNum.textColor = RGBColor(102, 102, 102, 1);
        _lblpicNum.backgroundColor = [UIColor clearColor];
        _lblpicNum.textAlignment = NSTextAlignmentLeft;
        _lblpicNum.font = [UIFont systemFontOfSize:16];
        _lblpicNum.text=@"4张";
    }
    return _lblpicNum;
}




- (UILabel *)lblStandardPre
{
    if (!_lblStandardPre) {
        self.lblStandardPre = [UILabel newAutoLayoutView];
        _lblStandardPre.text = @"评分标准：";
        _lblStandardPre.textColor = RGBColor(102, 102, 102, 1);
        _lblStandardPre.backgroundColor = [UIColor clearColor];
        _lblStandardPre.textAlignment = NSTextAlignmentLeft;
        _lblStandardPre.font = [UIFont systemFontOfSize:16];
        
    }
    return _lblStandardPre;
}

- (UILabel *)lblStandard
{
    if (!_lblStandard) {
        self.lblStandard = [UILabel newAutoLayoutView];
        _lblStandard.textColor = RGBColor(102, 102, 102, 1);
        _lblStandard.backgroundColor = [UIColor clearColor];
        _lblStandard.textAlignment = NSTextAlignmentLeft;
        _lblStandard.font = [UIFont systemFontOfSize:16];
       
        _lblStandard.numberOfLines = 0;
    }
    return _lblStandard;
}




@end
@implementation TaskCheckHeader1

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        [self.viewDone autoPinEdgesToSuperviewEdgesWithInsets:UIEdgeInsetsMake(0, 0, 0, 0) excludingEdge:ALEdgeBottom];
        [self.viewDone autoPinEdgeToSuperviewEdge:ALEdgeLeft];
        [self.viewDone autoPinEdgeToSuperviewEdge:ALEdgeRight];
        //[self.viewDone autoSetDimension:ALDimensionHeight toSize:170];
        
        [self.viewDone addSubview:self.lblPointPre];
        [self.viewDone addSubview:self.lblPoint];
        [self.viewDone addSubview:self.lblCheckAreaPre];
        [self.viewDone addSubview:self.lblCheckArea];
        [self.viewDone addSubview:self.lblpicNumPre];
        [self.viewDone addSubview:self.lblpicNum];
        
        [self.viewDone addSubview:self.lblRemarkPre];
        [self.viewDone addSubview:self.lblRemark];
        
        [self.viewDone addSubview:self.lblStandardPre];
        [self.viewDone addSubview:self.lblStandard];
        [self.viewDone addSubview:self.StatusImage];
        
        [self.lblPointPre autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:4];
        [self.lblPointPre autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:10];
        [self.lblPointPre autoSetDimensionsToSize:CGSizeMake(80, 21)];
        
        [self.lblPoint autoAlignAxis:ALAxisHorizontal toSameAxisOfView:self.lblPointPre];
        [self.lblPoint autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:self.lblPointPre];
        [self.lblPoint autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:8];
        [self.lblPoint autoSetDimension:ALDimensionHeight toSize:21 relation:NSLayoutRelationGreaterThanOrEqual];
        [self.lblPoint sizeToFit];
        
        
        
        [self.lblCheckAreaPre autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.lblPoint withOffset:5];
        [self.lblCheckAreaPre autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:10];
        [self.lblCheckAreaPre autoSetDimensionsToSize:CGSizeMake(80, 21)];
        [self.lblCheckArea autoPinEdge:ALEdgeTop toEdge:ALEdgeTop ofView:self.lblCheckAreaPre];
        [self.lblCheckArea autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:self.lblCheckAreaPre];
        [self.lblCheckArea autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:8];
        [self.lblCheckArea sizeToFit];
        [self.lblCheckArea autoSetDimension:ALDimensionHeight toSize:21 relation:NSLayoutRelationGreaterThanOrEqual];
        [self.lblCheckArea autoSetDimensionsToSize:CGSizeMake(80, 21)];
        
        
        [self.lblRemarkPre autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.lblCheckArea withOffset:5];
        [self.lblRemarkPre autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:10];
        [self.lblRemarkPre autoSetDimensionsToSize:CGSizeMake(80, 21)];
        [self.lblRemark autoPinEdge:ALEdgeTop toEdge:ALEdgeTop ofView:self.lblRemarkPre];
        
        [self.lblRemark autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:self.lblRemarkPre];
        
        [self.lblRemark autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:8];
        
        [self.lblRemark sizeToFit];
        
        [self.lblRemark autoSetDimension:ALDimensionHeight toSize:21 relation:NSLayoutRelationGreaterThanOrEqual];
        
        
        
        
        
        
        [self.lblStandardPre autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.lblRemark withOffset:5];
        [self.lblStandardPre autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:10];
        [self.lblStandardPre autoSetDimensionsToSize:CGSizeMake(80, 21)];
        [self.lblStandard autoPinEdge:ALEdgeTop toEdge:ALEdgeTop ofView:self.lblStandardPre];
        [self.lblStandard autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:self.lblStandardPre];
        [self.lblStandard autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:8];
        [self.lblStandard sizeToFit];
        [self.lblStandard autoSetDimension:ALDimensionHeight toSize:21 relation:NSLayoutRelationGreaterThanOrEqual];
        
//        [self.StatusImage autoAlignAxis:ALAxisHorizontal toSameAxisOfView:self.lblCheckAreaPre];
        [self.StatusImage autoPinEdge:ALEdgeTop toEdge:ALEdgeTop ofView:self.lblPointPre];
        [self.StatusImage autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:12];
        [self.StatusImage autoSetDimensionsToSize:CGSizeMake(45, 45)];
        
    }
    return self;
}


- (UIView *)viewDone
{
    if (!_viewDone) {
        self.viewDone = [UIView newAutoLayoutView];
        _viewDone.backgroundColor = [UIColor colorWithRed:0.8667 green:0.8667 blue:0.8667 alpha:1];
        [self addSubview:_viewDone];
        
    }
    return _viewDone;
}



- (UIButton *)StatusImage
{
    if (!_StatusImage) {
        self.StatusImage = [UIButton newAutoLayoutView];
        [self.StatusImage setBackgroundImage:[UIImage imageNamed:@"Task/icon_bg_no_report.png"] forState:UIControlStateNormal];
        [self.StatusImage setTitle:@"已上报" forState:UIControlStateNormal];
        
        self.StatusImage.titleLabel.font = [UIFont systemFontOfSize:13];
    }
    return _StatusImage;
}

- (UILabel *)lblPointPre
{
    if (!_lblPointPre) {
        self.lblPointPre = [UILabel newAutoLayoutView];
        _lblPointPre.text = @"检 查 点 ：";
        _lblPointPre.textColor = RGBColor(102, 102, 102, 1);
        _lblPointPre.backgroundColor = [UIColor clearColor];
        _lblPointPre.textAlignment = NSTextAlignmentLeft;
        _lblPointPre.font = [UIFont systemFontOfSize:16];
    }
    return _lblPointPre;
}

- (UILabel *)lblPoint
{
    if (!_lblPoint) {
        self.lblPoint = [UILabel newAutoLayoutView];
        _lblPoint.textColor = RGBColor(102, 102, 102, 1);
        _lblPoint.backgroundColor = [UIColor clearColor];
        _lblPoint.textAlignment = NSTextAlignmentLeft;
        _lblPoint.font = [UIFont systemFontOfSize:16];
    }
    return _lblPoint;
}

- (UILabel *)lblRemarkPre
{
    if (!_lblRemarkPre) {
        self.lblRemarkPre = [UILabel newAutoLayoutView];
        _lblRemarkPre.text = @"检查要求：";
        _lblRemarkPre.textColor = RGBColor(102, 102, 102, 1);
        _lblRemarkPre.backgroundColor = [UIColor clearColor];
        _lblRemarkPre.textAlignment = NSTextAlignmentLeft;
        _lblRemarkPre.font = [UIFont systemFontOfSize:16];
    }
    return _lblRemarkPre;
}

- (UILabel *)lblRemark
{
    if (!_lblRemark) {
        self.lblRemark = [UILabel newAutoLayoutView];
        _lblRemark.textColor = RGBColor(102, 102, 102, 1);
        _lblRemark.backgroundColor = [UIColor clearColor];
        _lblRemark.textAlignment = NSTextAlignmentLeft;
        _lblRemark.font = [UIFont systemFontOfSize:16];
        _lblRemark.numberOfLines = 0;
    }
    return _lblRemark;
}

- (UILabel *)lblCheckAreaPre
{
    if (!_lblCheckAreaPre) {
        self.lblCheckAreaPre = [UILabel newAutoLayoutView];
        _lblCheckAreaPre.text = @"所属区域：";
        _lblCheckAreaPre.textColor = RGBColor(102, 102, 102, 1);
        _lblCheckAreaPre.backgroundColor = [UIColor clearColor];
        _lblCheckAreaPre.textAlignment = NSTextAlignmentLeft;
        _lblCheckAreaPre.font = [UIFont systemFontOfSize:16];
    }
    return _lblCheckAreaPre;
}

- (UILabel *)lblCheckArea
{
    if (!_lblCheckArea) {
        self.lblCheckArea = [UILabel newAutoLayoutView];
        _lblCheckArea.textColor = RGBColor(102, 102, 102, 1);
        _lblCheckArea.backgroundColor = [UIColor clearColor];
        _lblCheckArea.textAlignment = NSTextAlignmentLeft;
        _lblCheckArea.font = [UIFont systemFontOfSize:16];
        
    }
    return _lblCheckArea;
}




- (UILabel *)lblStandardPre
{
    if (!_lblStandardPre) {
        self.lblStandardPre = [UILabel newAutoLayoutView];
        _lblStandardPre.text = @"评分标准：";
        _lblStandardPre.textColor = RGBColor(102, 102, 102, 1);
        _lblStandardPre.backgroundColor = [UIColor clearColor];
        _lblStandardPre.textAlignment = NSTextAlignmentLeft;
        _lblStandardPre.font = [UIFont systemFontOfSize:16];
    }
    return _lblStandardPre;
}

- (UILabel *)lblStandard
{
    if (!_lblStandard) {
        self.lblStandard = [UILabel newAutoLayoutView];
        _lblStandard.textColor = RGBColor(102, 102, 102, 1);
        _lblStandard.backgroundColor = [UIColor clearColor];
        _lblStandard.textAlignment = NSTextAlignmentLeft;
        _lblStandard.font = [UIFont systemFontOfSize:16];
        
        _lblStandard.numberOfLines = 0;
    }
    return _lblStandard;
}





@end


