123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- //
- // MinRescord.m
- // LNManager
- //
- // Created by EchoShacolee on 2017/4/14.
- // Copyright © 2017年 lee. All rights reserved.
- //
- #import "MinRescord.h"
- #import "MinRecordeCell.h"
- @interface MinRescord ()
- //{
- // UIButton *trainbtn;
- // UIButton *photoBtn;
- //
- // UIView *photoView;
- //}
- @end
- @implementation MinRescord
- - (void)viewDidLoad {
- [super viewDidLoad];
-
- self.navigationItem.title = @"电子日志详细";
-
- // self.automaticallyAdjustsScrollViewInsets = NO;
- // UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(20, kNavOffSet + 10, kSize.width/2.0 - 30, 40)];
- // [btn setTitle:@"分钟学时" textColor:COLOR_THEME font:FontTitle fotState:UIControlStateNormal];
- // [btn borderColor:COLOR_THEME width:1 cornorRadios:3];
- // [btn addTarget:self action:@selector(trainAction) forControlEvents:UIControlEventTouchUpInside];
- // [self.view addSubview:btn];
- // trainbtn = btn;
- //
- // btn = [[UIButton alloc] initWithFrame:CGRectMake(kSize.width/2.0 + 10, kNavOffSet + 10, kSize.width/2.0 - 30, 40)];
- // [btn setTitle:@"训练照片" textColor:RGB_COLOR(136,136,136) font:FontTitle fotState:UIControlStateNormal];
- // [btn borderColor:RGB_COLOR(136,136,136) width:1 cornorRadios:3];
- // [btn addTarget:self action:@selector(photoAction) forControlEvents:UIControlEventTouchUpInside];
- // [self.view addSubview:btn];
- // photoBtn = btn;
- //
- // UILabel *line = [[UILabel alloc] initWithFrame:CGRectMake(10, kNavOffSet + 60, kSize.width - 20, 1)];
- // line.backgroundColor = RGB_COLOR(136,136,136);
- // [self.view addSubview:line];
- //
- // self.tableView.y = kNavOffSet + 61;
- // self.tableView.height = kSize.height - kNavOffSet - 61;
- //
- // //添加一个图片轮播器在这里 设置在屏幕右边
- // photoView = [[UIView alloc] initWithFrame:self.tableView.frame];
- // photoView.x = kSize.width;
- // photoView.backgroundColor = [UIColor redColor];
- // [self.view addSubview:photoView];
-
- [self getData];
- //点击刷新的回调
- __weak typeof(self) weakSelf = self;
- self.block = ^{
- [weakSelf getData];
- };
- }
- //- (void)trainAction {
- // [trainbtn setTitleColor:COLOR_THEME forState:UIControlStateNormal];
- // trainbtn.layer.borderColor = COLOR_THEME.CGColor;
- //
- // [photoBtn setTitleColor:RGB_COLOR(136,136,136) forState:UIControlStateNormal];
- // photoBtn.layer.borderColor = RGB_COLOR(136, 136, 136).CGColor;
- // if (self.tableView.x != 0) {
- // [UIView animateWithDuration:.4 animations:^{
- // self.tableView.x = 0;
- // photoView.x = kSize.width;
- // }];
- // }
- //}
- //
- //- (void)photoAction {
- // [trainbtn setTitleColor:RGB_COLOR(136,136,136) forState:UIControlStateNormal];
- // trainbtn.layer.borderColor = RGB_COLOR(136, 136, 136).CGColor;
- //
- // [photoBtn setTitleColor:COLOR_THEME forState:UIControlStateNormal];
- // photoBtn.layer.borderColor = COLOR_THEME.CGColor;
- // if (photoView.x != 0) {
- // [UIView animateWithDuration:.4 animations:^{
- // self.tableView.x = -kSize.width;
- // photoView.x = 0;
- // }];
- // }
- //}
- #pragma mark tableview代理相关
- -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
-
- return self.dataurce.count;
- }
- -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
-
- return 100;
- }
- -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
-
- MinRecordeCell * cell = [tableView dequeueReusableCellWithIdentifier:@"minRecordCellId"];
- if (!cell) {
- cell = [[[NSBundle mainBundle] loadNibNamed:@"MinRecordeCell" owner:nil options:nil] lastObject];
- }
- [cell upDataWithDic:self.dataurce[indexPath.row]];
- return cell;
- }
- #pragma mark 数据请求
- -(void)getData{
-
- NSMutableDictionary *mdic = [[NSMutableDictionary alloc]init];
- [mdic setValue:self.stuDic[@"STUNUM"] forKey:@"stunum"];
- [mdic setValue:self.stuDic[@"CLASSID"] forKey:@"classId"];
-
- [mdic setValue:@"1" forKey:@"isPage"];
- [mdic setValue:@"10" forKey:@"pageSize"];
- [mdic setValue:@"1" forKey:@"currentPage"];
-
-
- [self getDataWithDic:mdic method:@"trainTimesRecordMins"];
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- @end
|