123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- //
- // AssessorDetail.m
- // LNManager
- //
- // Created by EchoShacolee on 2017/4/10.
- // Copyright © 2017年 lee. All rights reserved.
- //
- #import "AssessorDetail.h"
- #import <TZImageManager.h>
- #import <TZImagePickerController.h>
- @interface AssessorDetail ()
- @end
- @implementation AssessorDetail
- - (void)viewDidLoad {
- [super viewDidLoad];
-
- self.navigationItem.title = @"考核员详情";
-
- [self setSegmentControllWithTitles:@[@"基本信息"] isBttomBar:NO];
-
- [self getRequsetData];
- }
- -(void)setData{
- self.headImgStr = self.dataSource[@"EI_PHOTO_PATH"];
- _keysArr = @[
- // @[@"培训机构编号",@"EI_INSCODE"],
-
- @[@"姓名",@"EI_NAME"],
- @[@"性别",@"EI_SEX"],
- @[@"证件号",@"EI_IDCARD"],
- @[@"手机号码",@"EI_MOBILE"],
- @[@"联系地址",@"EI_ADDRESS"],
-
- @[@"驾驶证号",@"EI_DRILICENCE"],
- @[@"驾驶证初领日期",@"EI_FSTDRILICDATE"],
- @[@"职业资格证号",@"EI_OCCUPATIONNO"],
- @[@"职业资格等级",@"EI_OCCUPATIONLEVEL"],
- @[@"准驾车型",@"EI_DRIPERMITTED"],
- @[@"准教车型",@"EI_TEACHPERMITTED"],
- @[@"供职状态",@"EI_EMPLOYSTATUS"],
- @[@"入职日期",@"EI_HIREDATE"],
- @[@"离职日期",@"EI_LEAVEDATE"],
- @[@"全国统一编号",@"EI_EXAMNUM"],
- @[@"备案时间",@"EI_RECORD_DATE"]
- // @[@"备案状态",@"EI_RECORD_STATUS"]
- ];
-
- [super setData];
- }
- #pragma mark - 上传头像
- -(void)uploadHeadImg:(UIImage*)image
- {
-
- NSData *data = UIImagePNGRepresentation([image scaledToWid:100]);
- NSString *imgString = [data base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength];
-
- NSMutableDictionary *dic = [NSMutableDictionary dictionary];
-
- [dic setObject:imgString forKey:@"content"];
- [dic setObject:self.dataSource[@"EI_ID"] forKey:@"eiId"];
-
- NSString *method = @"uploadExaminerPhoto";
- [MBProgressHUD showLoadToView:self.view];
- [NetManager requestAnythingWithURL:method dictionary:dic dataArray:nil completion:^(NSDictionary *root) {
-
- [MBProgressHUD hideHUDForView:self.view];
-
- if (!root) {
- ShowMsg(@"上传头像失败!");
- return;
- }
- if ([root[@"code"] isEqualToString:@"1"]) {
- ShowErrorMsg(root[@"msg"]);
- return;
- }
-
- //上传照片成功
- self.headImgStr = root[@"body"];
- ShowMsg(root[@"msg"]);
- [_tableViews[0] reloadData];
- }];
-
- }
- -(void)getRequsetData{
-
- [self getDataWithDic:self.requesetDic method:@"examers" block:^(NSDictionary *successDic) {
-
- self.dataSource = [NSMutableDictionary dictionaryWithDictionary:successDic[@"body"][0]];
- self.headImgStr = [NSString stringWithFormat:@"%@",self.dataSource[@"EI_PHOTO_PATH"]];
- [_tableViews[0] reloadData];
-
- }];
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- /*
- #pragma mark - Navigation
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- // Get the new view controller using [segue destinationViewController].
- // Pass the selected object to the new view controller.
- }
- */
- @end
|