EleDetailCell.m 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // EleDetailCell.m
  3. // JSJPCoach
  4. //
  5. // Created by EchoShacolee on 2018/1/29.
  6. // Copyright © 2018年 Danson. All rights reserved.
  7. //
  8. #import "EleDetailCell.h"
  9. @implementation EleDetailCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. // Initialization code
  13. self.selectionStyle = UITableViewCellSelectionStyleNone;
  14. }
  15. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  16. [super setSelected:selected animated:animated];
  17. // Configure the view for the selected state
  18. }
  19. -(void)setDataDic:(NSDictionary *)dataDic{
  20. self.name.text = dataDic[@"STUDENT_NAME"];
  21. NSString *eStr = @"未审核";
  22. if ([dataDic[@"RECORDSTATUS"] integerValue]==1) {
  23. eStr = @"异常记录";
  24. NSAttributedString *attStr = [[NSAttributedString alloc]initWithString:eStr attributes:@{NSForegroundColorAttributeName:[UIColor redColor]}];
  25. self.shenhe.attributedText = attStr;
  26. }else if ([dataDic[@"RECORDSTATUS"] integerValue]==2){
  27. eStr = @"审核通过";
  28. self.shenhe.text = eStr;
  29. }
  30. self.time.text = [NSString stringWithFormat:@"记录时间:%@",dataDic[@"RECORDTIME"]];
  31. self.mileAge.text = [NSString stringWithFormat:@"里程:%@m",dataDic[@"MILEAGE"]];
  32. self.speed.text = [NSString stringWithFormat:@"最大速度:%@km/h",dataDic[@"GPI_SPEED"]];
  33. if ([dataDic[@"RECORDSTATUS"] integerValue]==1) {
  34. self.reason.text = [NSString stringWithFormat:@"理由:%@",dataDic[@"AUDIT_REASON"]];
  35. }else{
  36. self.reason.text = @"";
  37. }
  38. }
  39. @end