AssessorDetail.m 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. //
  2. // AssessorDetail.m
  3. // LNManager
  4. //
  5. // Created by EchoShacolee on 2017/4/10.
  6. // Copyright © 2017年 lee. All rights reserved.
  7. //
  8. #import "AssessorDetail.h"
  9. #import <TZImageManager.h>
  10. #import <TZImagePickerController.h>
  11. @interface AssessorDetail ()
  12. @end
  13. @implementation AssessorDetail
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. self.navigationItem.title = @"考核员详情";
  17. [self setSegmentControllWithTitles:@[@"基本信息"] isBttomBar:NO];
  18. [self getRequsetData];
  19. }
  20. -(void)setData{
  21. self.headImgStr = self.dataSource[@"EI_PHOTO_PATH"];
  22. _keysArr = @[
  23. // @[@"培训机构编号",@"EI_INSCODE"],
  24. @[@"姓名",@"EI_NAME"],
  25. @[@"性别",@"EI_SEX"],
  26. @[@"证件号",@"EI_IDCARD"],
  27. @[@"手机号码",@"EI_MOBILE"],
  28. @[@"联系地址",@"EI_ADDRESS"],
  29. @[@"驾驶证号",@"EI_DRILICENCE"],
  30. @[@"驾驶证初领日期",@"EI_FSTDRILICDATE"],
  31. @[@"职业资格证号",@"EI_OCCUPATIONNO"],
  32. @[@"职业资格等级",@"EI_OCCUPATIONLEVEL"],
  33. @[@"准驾车型",@"EI_DRIPERMITTED"],
  34. @[@"准教车型",@"EI_TEACHPERMITTED"],
  35. @[@"供职状态",@"EI_EMPLOYSTATUS"],
  36. @[@"入职日期",@"EI_HIREDATE"],
  37. @[@"离职日期",@"EI_LEAVEDATE"],
  38. @[@"全国统一编号",@"EI_EXAMNUM"],
  39. @[@"备案时间",@"EI_RECORD_DATE"]
  40. // @[@"备案状态",@"EI_RECORD_STATUS"]
  41. ];
  42. [super setData];
  43. }
  44. #pragma mark - 上传头像
  45. -(void)uploadHeadImg:(UIImage*)image
  46. {
  47. NSData *data = UIImagePNGRepresentation([image scaledToWid:100]);
  48. NSString *imgString = [data base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength];
  49. NSMutableDictionary *dic = [NSMutableDictionary dictionary];
  50. [dic setObject:imgString forKey:@"content"];
  51. [dic setObject:self.dataSource[@"EI_ID"] forKey:@"eiId"];
  52. NSString *method = @"uploadExaminerPhoto";
  53. [MBProgressHUD showLoadToView:self.view];
  54. [NetManager requestAnythingWithURL:method dictionary:dic dataArray:nil completion:^(NSDictionary *root) {
  55. [MBProgressHUD hideHUDForView:self.view];
  56. if (!root) {
  57. ShowMsg(@"上传头像失败!");
  58. return;
  59. }
  60. if ([root[@"code"] isEqualToString:@"1"]) {
  61. ShowErrorMsg(root[@"msg"]);
  62. return;
  63. }
  64. //上传照片成功
  65. self.headImgStr = root[@"body"];
  66. ShowMsg(root[@"msg"]);
  67. [_tableViews[0] reloadData];
  68. }];
  69. }
  70. -(void)getRequsetData{
  71. [self getDataWithDic:self.requesetDic method:@"examers" block:^(NSDictionary *successDic) {
  72. self.dataSource = [NSMutableDictionary dictionaryWithDictionary:successDic[@"body"][0]];
  73. self.headImgStr = [NSString stringWithFormat:@"%@",self.dataSource[@"EI_PHOTO_PATH"]];
  74. [_tableViews[0] reloadData];
  75. }];
  76. }
  77. - (void)didReceiveMemoryWarning {
  78. [super didReceiveMemoryWarning];
  79. // Dispose of any resources that can be recreated.
  80. }
  81. /*
  82. #pragma mark - Navigation
  83. // In a storyboard-based application, you will often want to do a little preparation before navigation
  84. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  85. // Get the new view controller using [segue destinationViewController].
  86. // Pass the selected object to the new view controller.
  87. }
  88. */
  89. @end