新疆1.0.8版本
This commit is contained in:
@@ -63,20 +63,6 @@
|
||||
#pragma mark: 网络前缀
|
||||
#define ResourceAddress [NSString stringWithFormat:@"%@/file/show/",Http]
|
||||
|
||||
//生产环境
|
||||
//#define Http @"https://api.cqygjk.com"//
|
||||
//#define H5Http @"https://console.cqygjk.com/"///
|
||||
//#define H5DevHost @"cqyt.out.yg.icdat.cn"//
|
||||
//#define IntervenH5 @"https://console.cqygjk.com"
|
||||
|
||||
//#define Http UserDefaultObjectForKey(@"HTTPS")//
|
||||
//#define H5DevHost UserDefaultObjectForKey(@"H5DevHost")//
|
||||
//#define IntervenH5 UserDefaultObjectForKey(@"IntervenH5")
|
||||
|
||||
//#define Http @"https://starry.test.icdat.cn"
|
||||
//#define H5DevHost @"starry.test.icdat.cn"//
|
||||
//#define IntervenH5 @"https://starry.out.icdat.cn"
|
||||
|
||||
//开发环境地址 彭杰 http://192.168.1.37
|
||||
|
||||
//#define Http @"http://192.168.1.37"//
|
||||
|
||||
+3
-1
@@ -500,7 +500,9 @@
|
||||
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||
{
|
||||
[self hiddenAllMBProgressHUD];
|
||||
[self showMBProgressHUDOnlyWithString:message];
|
||||
|
||||
[EasyTextView showErrorText:message];
|
||||
// [self showMBProgressHUDOnlyWithString:message];
|
||||
|
||||
|
||||
}
|
||||
|
||||
+170
-139
@@ -15,21 +15,21 @@
|
||||
@property (nonatomic, strong) MonitoringWarchTableHeardView * badHeardView;
|
||||
|
||||
//@property (nonatomic, strong) MonitoringWatchTableFooterView * badfooterView;
|
||||
@property (nonatomic, strong) NSMutableArray * customArray;
|
||||
//@property (nonatomic, strong) NSMutableArray * customArray;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation MonitoringWatchTableView
|
||||
|
||||
|
||||
- (NSMutableArray *)customArray {
|
||||
|
||||
if (!_customArray) {
|
||||
_customArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _customArray;
|
||||
}
|
||||
//
|
||||
//- (NSMutableArray *)customArray {
|
||||
//
|
||||
// if (!_customArray) {
|
||||
// _customArray = [[NSMutableArray alloc] init];
|
||||
// }
|
||||
// return _customArray;
|
||||
//}
|
||||
|
||||
- (MonitoringWarchTableHeardView *)badHeardView {
|
||||
|
||||
@@ -85,11 +85,11 @@
|
||||
|
||||
- (void)setModel:(MonitoringDataModel *)model {
|
||||
|
||||
[self.customArray removeAllObjects];
|
||||
// [self.customArray removeAllObjects];
|
||||
|
||||
_model = model;
|
||||
|
||||
[self buildCustomArray];
|
||||
// [self buildCustomArray];
|
||||
self.badHeardView.heardModel = _model;
|
||||
// self.badfooterView.footModel = _model;
|
||||
[self reloadData];
|
||||
@@ -106,36 +106,36 @@
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
{
|
||||
|
||||
return self.customArray.count;
|
||||
return 4;
|
||||
|
||||
}
|
||||
|
||||
- (void)buildCustomArray {
|
||||
[self.customArray removeAllObjects];
|
||||
|
||||
NSArray *orderArray = @[@"心率", @"血氧饱和度", @"压力", @"体温"];
|
||||
|
||||
for (NSString *typeName in orderArray) {
|
||||
for (MonitoringListDataModel *listModel in self.model.indexItemVos) {
|
||||
|
||||
// 排除 睡眠 / 步数(如果接口里可能混着)
|
||||
if ([listModel.wdTypeName isEqualToString:@"睡眠"] ||
|
||||
[listModel.wdTypeName isEqualToString:@"步数"]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ([listModel.wdTypeName isEqualToString:typeName]) {
|
||||
[self.customArray addObject:listModel];
|
||||
break; // 找到就跳出,防止重复
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//- (void)buildCustomArray {
|
||||
// [self.customArray removeAllObjects];
|
||||
//
|
||||
// NSArray *orderArray = @[@"心率", @"血氧饱和度", @"压力", @"体温"];
|
||||
//
|
||||
// for (NSString *typeName in orderArray) {
|
||||
// for (MonitoringListDataModel *listModel in self.model.indexItemVos) {
|
||||
//
|
||||
// // 排除 睡眠 / 步数(如果接口里可能混着)
|
||||
// if ([listModel.wdTypeName isEqualToString:@"睡眠"] ||
|
||||
// [listModel.wdTypeName isEqualToString:@"步数"]) {
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// if ([listModel.wdTypeName isEqualToString:typeName]) {
|
||||
// [self.customArray addObject:listModel];
|
||||
// break; // 找到就跳出,防止重复
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
MonitoringListDataModel * listModel = self.customArray[indexPath.section];
|
||||
// MonitoringListDataModel * listModel = self.customArray[indexPath.section];
|
||||
|
||||
MonitoringWatchTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"CELLID"];
|
||||
|
||||
@@ -144,52 +144,83 @@
|
||||
cell = [[MonitoringWatchTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CELLID"];
|
||||
}
|
||||
cell.backgroundColor = CViewBgColor;
|
||||
// if (indexPath.section == 0) {
|
||||
//
|
||||
// for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
//
|
||||
// if ([listModel.wdTypeName isEqualToString:@"心率"]) {
|
||||
// cell.listModel = listModel;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
// if (indexPath.section == 1) {
|
||||
//
|
||||
// for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
//
|
||||
// if ([listModel.wdTypeName isEqualToString:@"血氧饱和度"]) {
|
||||
// cell.listModel = listModel;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// if (indexPath.section == 2) {
|
||||
//
|
||||
// for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
//
|
||||
// if ([listModel.wdTypeName isEqualToString:@"压力"]) {
|
||||
// cell.listModel = listModel;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// if (indexPath.section == 3) {
|
||||
//
|
||||
// for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
//
|
||||
// if ([listModel.wdTypeName isEqualToString:@"体温"]) {
|
||||
// cell.listModel = listModel;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
cell.listModel = listModel;
|
||||
if (indexPath.section == 0) {
|
||||
MonitoringListDataModel * currentListModel;
|
||||
|
||||
for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
|
||||
if ([listModel.wdTypeName isEqualToString:@"心率"]) {
|
||||
currentListModel = listModel;
|
||||
cell.listModel = listModel;
|
||||
}
|
||||
|
||||
}
|
||||
if (!currentListModel) {
|
||||
MonitoringListDataModel * lismodel = [MonitoringListDataModel alloc];
|
||||
lismodel.wdTypeName = @"心率";
|
||||
cell.listModel = lismodel;
|
||||
}
|
||||
|
||||
}
|
||||
if (indexPath.section == 1) {
|
||||
MonitoringListDataModel * currentListModel;
|
||||
|
||||
for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
|
||||
if ([listModel.wdTypeName isEqualToString:@"血氧饱和度"]) {
|
||||
currentListModel = listModel;
|
||||
cell.listModel = listModel;
|
||||
}
|
||||
|
||||
}
|
||||
if (!currentListModel) {
|
||||
MonitoringListDataModel * lismodel = [MonitoringListDataModel alloc];
|
||||
lismodel.wdTypeName = @"血氧饱和度";
|
||||
cell.listModel = lismodel;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (indexPath.section == 2) {
|
||||
MonitoringListDataModel * currentListModel;
|
||||
|
||||
for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
|
||||
if ([listModel.wdTypeName isEqualToString:@"压力"]) {
|
||||
currentListModel = listModel;
|
||||
cell.listModel = listModel;
|
||||
}
|
||||
|
||||
}
|
||||
if (!currentListModel) {
|
||||
MonitoringListDataModel * lismodel = [MonitoringListDataModel alloc];
|
||||
lismodel.wdTypeName = @"压力";
|
||||
cell.listModel = lismodel;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (indexPath.section == 3) {
|
||||
|
||||
MonitoringListDataModel * currentListModel;
|
||||
|
||||
for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
|
||||
if ([listModel.wdTypeName isEqualToString:@"体温"]) {
|
||||
currentListModel = listModel;
|
||||
cell.listModel = listModel;
|
||||
}
|
||||
|
||||
}
|
||||
if (!currentListModel) {
|
||||
MonitoringListDataModel * lismodel = [MonitoringListDataModel alloc];
|
||||
lismodel.wdTypeName = @"体温";
|
||||
cell.listModel = lismodel;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// cell.listModel = listModel;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
cell.popBlock = self.popBlock;
|
||||
cell.historyBlock = self.historyBlock;
|
||||
@@ -201,66 +232,66 @@
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
NSString * lookType;
|
||||
MonitoringListDataModel * listModel = self.customArray[indexPath.section];
|
||||
|
||||
if (self.detailBlock) {
|
||||
self.detailBlock(listModel.wdType, listModel.dataDate);
|
||||
// MonitoringListDataModel * listModel = self.customArray[indexPath.section];
|
||||
//
|
||||
// if (self.detailBlock) {
|
||||
// self.detailBlock(listModel.wdType, listModel.dataDate);
|
||||
// }
|
||||
if (indexPath.section == 0) {
|
||||
|
||||
for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
|
||||
if ([listModel.wdTypeName isEqualToString:@"心率"]) {
|
||||
|
||||
if (self.detailBlock) {
|
||||
self.detailBlock(listModel.wdType, listModel.dataDate);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (indexPath.section == 1) {
|
||||
|
||||
for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
|
||||
if ([listModel.wdTypeName isEqualToString:@"血氧饱和度"]) {
|
||||
|
||||
if (self.detailBlock) {
|
||||
self.detailBlock(listModel.wdType, listModel.dataDate);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (indexPath.section == 2) {
|
||||
|
||||
for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
|
||||
if ([listModel.wdTypeName isEqualToString:@"压力"]) {
|
||||
if (self.detailBlock) {
|
||||
self.detailBlock(listModel.wdType, listModel.dataDate);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (indexPath.section == 3) {
|
||||
|
||||
for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
|
||||
if ([listModel.wdTypeName isEqualToString:@"体温"]) {
|
||||
if (self.detailBlock) {
|
||||
self.detailBlock(listModel.wdType, listModel.dataDate);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// if (indexPath.section == 0) {
|
||||
//
|
||||
// for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
//
|
||||
// if ([listModel.wdTypeName isEqualToString:@"心率"]) {
|
||||
//
|
||||
// if (self.detailBlock) {
|
||||
// self.detailBlock(listModel.wdType, listModel.dataDate);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
// if (indexPath.section == 1) {
|
||||
//
|
||||
// for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
//
|
||||
// if ([listModel.wdTypeName isEqualToString:@"血氧饱和度"]) {
|
||||
//
|
||||
// if (self.detailBlock) {
|
||||
// self.detailBlock(listModel.wdType, listModel.dataDate);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// if (indexPath.section == 2) {
|
||||
//
|
||||
// for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
//
|
||||
// if ([listModel.wdTypeName isEqualToString:@"压力"]) {
|
||||
// if (self.detailBlock) {
|
||||
// self.detailBlock(listModel.wdType, listModel.dataDate);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// if (indexPath.section == 3) {
|
||||
//
|
||||
// for (MonitoringListDataModel * listModel in self.model.indexItemVos) {
|
||||
//
|
||||
// if ([listModel.wdTypeName isEqualToString:@"体温"]) {
|
||||
// if (self.detailBlock) {
|
||||
// self.detailBlock(listModel.wdType, listModel.dataDate);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property (nonatomic, copy) showHistoryListBlock historyBlock;
|
||||
|
||||
@property (nonatomic, strong) UILabel * projectName;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
@property (nonatomic, strong) UIImageView * projectImage;
|
||||
|
||||
@property (nonatomic, strong) UILabel * projectName;
|
||||
|
||||
@property (nonatomic, strong) UILabel * timeLabel;
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
[self.phoneLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(kRealValue(15));
|
||||
make.right.mas_offset(-30);
|
||||
make.right.mas_offset(-60);
|
||||
make.top.mas_equalTo(self.lvLabel.mas_bottom).offset(11);
|
||||
make.height.mas_offset(13);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user