// // EleDetailCell.m // JSJPCoach // // Created by EchoShacolee on 2018/1/29. // Copyright © 2018年 Danson. All rights reserved. // #import "EleDetailCell.h" @implementation EleDetailCell - (void)awakeFromNib { [super awakeFromNib]; // Initialization code self.selectionStyle = UITableViewCellSelectionStyleNone; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } -(void)setDataDic:(NSDictionary *)dataDic{ self.name.text = dataDic[@"STUDENT_NAME"]; NSString *eStr = @"未审核"; if ([dataDic[@"RECORDSTATUS"] integerValue]==1) { eStr = @"异常记录"; NSAttributedString *attStr = [[NSAttributedString alloc]initWithString:eStr attributes:@{NSForegroundColorAttributeName:[UIColor redColor]}]; self.shenhe.attributedText = attStr; }else if ([dataDic[@"RECORDSTATUS"] integerValue]==2){ eStr = @"审核通过"; self.shenhe.text = eStr; } self.time.text = [NSString stringWithFormat:@"记录时间:%@",dataDic[@"RECORDTIME"]]; self.mileAge.text = [NSString stringWithFormat:@"里程:%@m",dataDic[@"MILEAGE"]]; self.speed.text = [NSString stringWithFormat:@"最大速度:%@km/h",dataDic[@"GPI_SPEED"]]; if ([dataDic[@"RECORDSTATUS"] integerValue]==1) { self.reason.text = [NSString stringWithFormat:@"理由:%@",dataDic[@"AUDIT_REASON"]]; }else{ self.reason.text = @""; } } @end