修改员工端项目名称图标
@@ -381,15 +381,15 @@
|
||||
GCC_PREFIX_HEADER = "$(SRCROOT)/XinjiangProject/Supporting Files/PrefixHeader.pch";
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = "$(SRCROOT)/XinjiangProject/Supporting Files/Info.plist";
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "新疆亚克西";
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "健康油我";
|
||||
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
|
||||
INFOPLIST_KEY_NSCameraUsageDescription = "健康咨询员工端需要访问您的相机用来档案功能,是否同意?";
|
||||
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "APP需要您的定位服务,否则可能无法使用。";
|
||||
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "APP需要您的定位服务,否则可能无法使用。";
|
||||
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "APP需要您的定位服务,否则可能无法使用。";
|
||||
INFOPLIST_KEY_NSMicrophoneUsageDescription = "健康咨询员工端需要访问您的麦克风用来视频录制,是否同意?";
|
||||
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "新疆员工端需要访问您的相册上传图片,方便您的使用,是否同意?";
|
||||
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "健康咨询想使用您的相册功能 是否同意?";
|
||||
INFOPLIST_KEY_NSCameraUsageDescription = "健康油我需要访问您的相机用来档案功能,是否同意?";
|
||||
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。";
|
||||
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。";
|
||||
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。";
|
||||
INFOPLIST_KEY_NSMicrophoneUsageDescription = "健康油我需要访问您的麦克风用来视频录制,是否同意?";
|
||||
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "健康油我需要访问您的相册上传图片,方便您的使用,是否同意?";
|
||||
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "健康油我想使用您的相册功能 是否同意?";
|
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
|
||||
@@ -425,15 +425,15 @@
|
||||
GCC_PREFIX_HEADER = "$(SRCROOT)/XinjiangProject/Supporting Files/PrefixHeader.pch";
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = "$(SRCROOT)/XinjiangProject/Supporting Files/Info.plist";
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "新疆亚克西";
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "健康油我";
|
||||
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
|
||||
INFOPLIST_KEY_NSCameraUsageDescription = "健康咨询员工端需要访问您的相机用来档案功能,是否同意?";
|
||||
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "APP需要您的定位服务,否则可能无法使用。";
|
||||
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "APP需要您的定位服务,否则可能无法使用。";
|
||||
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "APP需要您的定位服务,否则可能无法使用。";
|
||||
INFOPLIST_KEY_NSMicrophoneUsageDescription = "健康咨询员工端需要访问您的麦克风用来视频录制,是否同意?";
|
||||
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "新疆员工端需要访问您的相册上传图片,方便您的使用,是否同意?";
|
||||
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "健康咨询想使用您的相册功能 是否同意?";
|
||||
INFOPLIST_KEY_NSCameraUsageDescription = "健康油我需要访问您的相机用来档案功能,是否同意?";
|
||||
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。";
|
||||
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。";
|
||||
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "健康油我需要您的定位服务,否则可能无法使用。";
|
||||
INFOPLIST_KEY_NSMicrophoneUsageDescription = "健康油我需要访问您的麦克风用来视频录制,是否同意?";
|
||||
INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "健康油我需要访问您的相册上传图片,方便您的使用,是否同意?";
|
||||
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "健康油我想使用您的相册功能 是否同意?";
|
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait;
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
#define H5DevHost @"xjgateway.mcrm.vip:8888"//
|
||||
#define IntervenH5 @"https://xjconsole.mcrm.vip:8888"
|
||||
#define BASEURL @"https://yyjk.cqygjk.com" //北边接口前缀
|
||||
#define SCHEME @"http" //
|
||||
#define SCHEME @"https" //
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
|
||||
//高德key
|
||||
#define AMAPSDKKEY @"e5e5b1aa469fcf577c829165bae860dd"
|
||||
#define AMAPSDKKEY @"59c99e428ea0ea0086d1e1bd7ab2ca6b"
|
||||
|
||||
#define KNotificAgreeProtoocl @"AGREEPMAP"
|
||||
|
||||
|
||||
@@ -184,10 +184,12 @@ alpha:1.0])
|
||||
|
||||
//数据验证
|
||||
#define StrValid(f) ([f isKindOfClass:[NSNull class]] || f == nil || [f length] < 1 || [f isEqualToString:@"(null)"] || [f isEqualToString:@"<null>"] || [f isEqualToString:@"null"]? YES : NO)
|
||||
|
||||
#define ValidStr(f) StrValid(f)
|
||||
|
||||
#define SafeStr(f) (!StrValid(f) ? f:@"-")
|
||||
#define HasString(str,key) ([str rangeOfString:key].location!=NSNotFound)
|
||||
|
||||
#define ValidStr(f) StrValid(f)
|
||||
#define ValidDict(f) (f!=nil && [f isKindOfClass:[NSDictionary class]])
|
||||
#define ValidArray(f) (f!=nil && [f isKindOfClass:[NSArray class]] && [f count]>0)
|
||||
#define ValidNum(f) (f!=nil && [f isKindOfClass:[NSNumber class]])
|
||||
|
||||
@@ -142,6 +142,15 @@ typedef NS_ENUM(NSInteger, RequestType) {
|
||||
if (![self requestBeforeJudgeConnect]) {//断网
|
||||
[self showError:@"请检查网络设置"];
|
||||
DYLog(@"\n\n----%@------\n\n",@"没有网络");
|
||||
UIWindow *keyWindow = UIApplication.sharedApplication.windows.firstObject;
|
||||
for (UIWindow *window in UIApplication.sharedApplication.windows) {
|
||||
if (window.isKeyWindow) {
|
||||
keyWindow = window;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[MBProgressHUD hideHUDForView:keyWindow animated:YES];
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -188,9 +197,19 @@ typedef NS_ENUM(NSInteger, RequestType) {
|
||||
}else
|
||||
{
|
||||
NSLog(@"%@",url);
|
||||
UIWindow *keyWindow = UIApplication.sharedApplication.windows.firstObject;
|
||||
for (UIWindow *window in UIApplication.sharedApplication.windows) {
|
||||
if (window.isKeyWindow) {
|
||||
keyWindow = window;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[MBProgressHUD hideHUDForView:keyWindow animated:YES];
|
||||
[self showError:@"网络服务出错"];
|
||||
}
|
||||
|
||||
|
||||
// }
|
||||
|
||||
|
||||
@@ -218,6 +237,17 @@ typedef NS_ENUM(NSInteger, RequestType) {
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
NSLog(@"%@",url);
|
||||
UIWindow *keyWindow = UIApplication.sharedApplication.windows.firstObject;
|
||||
for (UIWindow *window in UIApplication.sharedApplication.windows) {
|
||||
if (window.isKeyWindow) {
|
||||
keyWindow = window;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[MBProgressHUD hideHUDForView:keyWindow animated:YES];
|
||||
[self showError:@"网络服务出错"];
|
||||
}
|
||||
|
||||
|
||||
@@ -52,12 +52,21 @@
|
||||
object:nil];
|
||||
if ([HQCommonUtils isLogin]) {
|
||||
//腾讯im
|
||||
JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"IMAPI" NeedToken:nil];
|
||||
[proctocolApi GetIMLoginAccount:nil];
|
||||
#if DEBUG
|
||||
// [self loginImAccount];
|
||||
|
||||
#else
|
||||
[self loginImAccount];
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)loginImAccount {
|
||||
JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"IMAPI" NeedToken:nil];
|
||||
[proctocolApi GetIMLoginAccount:nil];
|
||||
}
|
||||
#pragma mark ————— 初始化window —————
|
||||
-(void)initWindow{
|
||||
|
||||
@@ -230,7 +239,7 @@
|
||||
|
||||
paragraphStyle.alignment = NSTextAlignmentLeft;
|
||||
|
||||
NSMutableAttributedString *message = [[NSMutableAttributedString alloc] initWithString:@"\n亲,感谢您对健康咨询员工端一直以来的信任!我们依据最新的监管要求更新了健康咨询员工端《隐私权政策》,特向您说明如下\n1.为向您提供交易相关基本功能,我们会收集、使用必要的信息;\n2.基于您的明示授权,我们可能会获取您的位置(为您提供服务)等信息,您有权拒绝或取消授权;\n3.我们会采取业界先进的安全措施保护您的信息安全;\n4.未经您同意,我们不会从第三方处获取、共享或向提供您的信息;" attributes:@{
|
||||
NSMutableAttributedString *message = [[NSMutableAttributedString alloc] initWithString:@"\n亲,感谢您对健康油我一直以来的信任!我们依据最新的监管要求更新了健康油我《隐私权政策》,特向您说明如下\n1.为向您提供交易相关基本功能,我们会收集、使用必要的信息;\n2.基于您的明示授权,我们可能会获取您的位置(为您提供服务)等信息,您有权拒绝或取消授权;\n3.我们会采取业界先进的安全措施保护您的信息安全;\n4.未经您同意,我们不会从第三方处获取、共享或向提供您的信息;" attributes:@{
|
||||
NSParagraphStyleAttributeName:paragraphStyle,
|
||||
}];
|
||||
|
||||
|
||||
@@ -74,18 +74,18 @@
|
||||
_VCS = @[].mutableCopy;
|
||||
|
||||
QuestionViewController * questionVC = [[QuestionViewController alloc]init];
|
||||
[self setupChildViewController:questionVC title:@"咨询" imageName:@"Question_normal_icon" seleceImageName:@"Question_selected_icon"];
|
||||
[self setupChildViewController:questionVC title:@"咨询" imageName:@"questionTabBar_nomal" seleceImageName:@"questionTabBar_selected"];
|
||||
|
||||
|
||||
XJSosCenterViewController * sosVC = [[XJSosCenterViewController alloc]init];
|
||||
[self setupChildViewController:sosVC title:@"就医" imageName:@"Question_normal_icon" seleceImageName:@"Question_selected_icon"];
|
||||
[self setupChildViewController:sosVC title:@"应急" imageName:@"sosCenterTabBar_nomal" seleceImageName:@"sosCenterTabBar_selected"];
|
||||
|
||||
MonitoringWarchViewController * jianceVC = [[MonitoringWarchViewController alloc]init];
|
||||
[self setupChildViewController:jianceVC title:@"监测" imageName:@"Question_normal_icon" seleceImageName:@"Question_selected_icon"];
|
||||
[self setupChildViewController:jianceVC title:@"监测" imageName:@"monitoringTabBar_nomal" seleceImageName:@"monitoringTabBar_selected"];
|
||||
|
||||
|
||||
XJMyCenterViewController * centerVC = [[XJMyCenterViewController alloc] init];
|
||||
[self setupChildViewController:centerVC title:@"我的" imageName:@"mine_normal" seleceImageName:@"mine_selected"];
|
||||
[self setupChildViewController:centerVC title:@"我的" imageName:@"mineTabBar_nomal" seleceImageName:@"mineTabBar_selected"];
|
||||
|
||||
|
||||
self.viewControllers = _VCS;
|
||||
|
||||
@@ -7,15 +7,13 @@
|
||||
|
||||
#import "XJLoginFoundPasswordViewController.h"
|
||||
#import "XJLoginSetPasswordViewController.h"
|
||||
#import "LVKeyboard.h"
|
||||
#import "MQTextField.h"
|
||||
@interface XJLoginFoundPasswordViewController ()<LVKeyboardDelegate,UITextFieldDelegate>
|
||||
#import "JXIDNumTextField.h"
|
||||
@interface XJLoginFoundPasswordViewController ()<UITextFieldDelegate>
|
||||
|
||||
@property (nonatomic, strong)UITextField * nameTextFild;
|
||||
@property (nonatomic, strong)UITextField * phoneTextFild;
|
||||
@property (nonatomic, strong)MQTextField * codeTextFild;
|
||||
@property (nonatomic, strong)JXIDNumTextField * codeTextFild;
|
||||
@property (nonatomic, strong)UIButton * codeButton;
|
||||
@property (nonatomic, strong) LVKeyboard *keyboard;
|
||||
|
||||
@end
|
||||
|
||||
@@ -33,10 +31,6 @@
|
||||
- (void)createUI {
|
||||
|
||||
|
||||
//初始化键盘
|
||||
LVKeyboard *keyboard = [[LVKeyboard alloc] init];
|
||||
keyboard.delegate = self;
|
||||
self.keyboard = keyboard;
|
||||
|
||||
UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(151))];
|
||||
topView.backgroundColor = KWhiteColor;
|
||||
@@ -76,12 +70,11 @@
|
||||
|
||||
[codeLeft addSubview:codeLabel];
|
||||
|
||||
self.codeTextFild = [[MQTextField alloc] initWithFrame:CGRectMake(0, self.nameTextFild.bottom+1, kScreenWidth, kRealValue(50))];
|
||||
self.codeTextFild = [[JXIDNumTextField alloc] initWithFrame:CGRectMake(0, self.nameTextFild.bottom+1, kScreenWidth, kRealValue(50))];
|
||||
self.codeTextFild.placeholder = @"请输入用户身份证号";
|
||||
self.codeTextFild.font = [UIFont systemFontOfSize:14];
|
||||
self.codeTextFild.backgroundColor = KWhiteColor;
|
||||
self.codeTextFild.inputView = self.keyboard;
|
||||
self.codeTextFild.delegate = self;
|
||||
// self.codeTextFild.delegate = self;
|
||||
self.codeTextFild.leftView = codeLeft;
|
||||
self.codeTextFild.leftViewMode = UITextFieldViewModeAlways;
|
||||
[topView addSubview:self.codeTextFild];
|
||||
@@ -179,24 +172,12 @@
|
||||
|
||||
if(textField == self.codeTextFild) {
|
||||
|
||||
self.codeTextFild.inputView = self.keyboard;
|
||||
// self.codeTextFild.inputView = self.keyboard;
|
||||
}
|
||||
return YES;
|
||||
|
||||
}
|
||||
|
||||
- (void)keyboard:(LVKeyboard *)keyboard didClickDeleteButton:(UIButton *)deleteBtn string:(NSMutableString *)string {
|
||||
self.codeTextFild.text = string;
|
||||
}
|
||||
|
||||
- (void)keyboard:(LVKeyboard *)keyboard didClickTextButton:(UIButton *)textBtn string:(NSMutableString *)string {
|
||||
self.codeTextFild.text = string;
|
||||
}
|
||||
|
||||
|
||||
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
|
||||
[self.codeTextFild resignFirstResponder];
|
||||
}
|
||||
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
@@ -116,6 +116,7 @@
|
||||
UIView * leftview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 20, 40)];
|
||||
self.userNameField.leftView = leftview;
|
||||
self.userNameField.leftViewMode = UITextFieldViewModeAlways;
|
||||
self.userNameField.autocapitalizationType = UITextAutocapitalizationTypeNone;
|
||||
[loginView addSubview:accountField ];
|
||||
//
|
||||
//
|
||||
@@ -402,15 +403,15 @@
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
NSString * avatar = @"";
|
||||
NSString * placeholdImg ;
|
||||
if (!ValidStr(user.avatar)) {
|
||||
if (!ValidStr(user.avatar) && ![user.avatar isEqualToString:ResourceAddress]) {
|
||||
avatar = user.avatar;
|
||||
}else
|
||||
{
|
||||
if ([user.sex_dictText isEqualToString:@"女"]) {
|
||||
placeholdImg = @"heard_man";
|
||||
placeholdImg = @"heard_woman";
|
||||
}else
|
||||
{
|
||||
placeholdImg = @"heard_woman";
|
||||
placeholdImg = @"heard_man";
|
||||
}
|
||||
}
|
||||
if (ValidStr(user.personType) || [user.personType intValue] != 1 ) {
|
||||
@@ -423,8 +424,14 @@
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
||||
KPostNotification(KNotificationLoginStateChange, @YES);
|
||||
//登录im
|
||||
[self loginImAccount];
|
||||
#if DEBUG
|
||||
[self loginImAccount];
|
||||
|
||||
|
||||
#else
|
||||
[self loginImAccount];
|
||||
|
||||
#endif
|
||||
}
|
||||
if ([tag isEqualToString:@"IMAPI"]) {
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
[self.view addSubview:self.nameField];
|
||||
//手机号
|
||||
self.phoneField = [self createFieldWithLeftTitle:@"手机号" withRightString:@" " placeholderStr:@"请填写手机号" isShowRight:true];
|
||||
self.phoneField.keyboardType = UIKeyboardTypeNumberPad;
|
||||
self.phoneField.frame = CGRectMake(0, self.nameField.bottom, kScreenWidth, 51);
|
||||
[self.view addSubview:self.phoneField];
|
||||
//身份证号码,
|
||||
@@ -215,7 +216,10 @@
|
||||
|
||||
FamilyMemberRelationModel * model = [FamilyMemberRelationModel modelWithDictionary:dic] ;
|
||||
|
||||
[self.memberArray addObject:model];
|
||||
if(![model.title isEqualToString:@"本人"]) {
|
||||
[self.memberArray addObject:model];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if ([tag isEqualToString:@"ADDAPI"]) {
|
||||
@@ -236,6 +240,8 @@
|
||||
|
||||
- (void)relastionShipOnclick {
|
||||
|
||||
[self.view endEditing:YES];
|
||||
|
||||
/// 1.单列字符串选择器(传字符串数组)
|
||||
BRStringPickerView *stringPickerView = [[BRStringPickerView alloc]init];
|
||||
stringPickerView.pickerMode = BRStringPickerComponentSingle;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XJEmergencyListViewController.h
|
||||
// XinjiangProject
|
||||
//
|
||||
// Created by Apple on 2025/7/3.
|
||||
//
|
||||
|
||||
#import "HQBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XJEmergencyListViewController : HQBaseViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,229 @@
|
||||
//
|
||||
// XJEmergencyListViewController.m
|
||||
// XinjiangProject
|
||||
//
|
||||
// Created by Apple on 2025/7/3.
|
||||
//
|
||||
|
||||
#import "XJEmergencyListViewController.h"
|
||||
#import "XJEmergencyContactModel.h"
|
||||
#import "XJAddContactViewController.h"
|
||||
|
||||
@interface XJEmergencyListViewController ()<UITableViewDelegate,UITableViewDataSource>
|
||||
|
||||
@property (nonatomic, strong) UITableView * homeTable;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * dataArray;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XJEmergencyListViewController
|
||||
|
||||
- (NSMutableArray *)dataArray {
|
||||
|
||||
if (!_dataArray) {
|
||||
_dataArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _dataArray;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
self.view.backgroundColor = UIColorHex(#EFEFEF);
|
||||
self.isHidenNaviBar = false;
|
||||
self.navigationItem.title = @"紧急联系人";
|
||||
[self addNavigationItemWithTitles:@[@"新增"] isLeft:false target:self action:@selector(addEmergencyContact) tags:@[@1]];
|
||||
[self createUI];
|
||||
//请求紧急联系人
|
||||
[self.dataArray removeAllObjects];
|
||||
[self getEmergencyContact];
|
||||
}
|
||||
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
[self.homeTable.mj_header beginRefreshing];
|
||||
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
self.homeTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - kTopHeight) style:UITableViewStylePlain];
|
||||
if ([[UIDevice currentDevice].systemVersion floatValue] >= 11) {
|
||||
self.homeTable.estimatedRowHeight = 0;
|
||||
self.homeTable.estimatedSectionFooterHeight = 0;
|
||||
self.homeTable.estimatedSectionHeaderHeight = 0;
|
||||
if (@available(iOS 15.0, *)) {
|
||||
self.homeTable.sectionHeaderTopPadding = 0;
|
||||
} else {
|
||||
// Fallback on earlier versions
|
||||
}
|
||||
self.homeTable.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
self.homeTable.delegate = self;
|
||||
self.homeTable.dataSource = self;
|
||||
self.homeTable.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
|
||||
self.homeTable.showsVerticalScrollIndicator = NO;
|
||||
self.homeTable.sectionHeaderHeight = 0;
|
||||
self.homeTable.sectionFooterHeight = 0;
|
||||
self.homeTable.contentInset = UIEdgeInsetsZero;
|
||||
self.homeTable.contentOffset = CGPointZero;
|
||||
self.homeTable.backgroundColor = KClearColor;
|
||||
[self.view addSubview:self.homeTable];
|
||||
|
||||
__weak __typeof(self) weakSelf = self;
|
||||
self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||
|
||||
[weakSelf.dataArray removeAllObjects];
|
||||
[self getEmergencyContact];
|
||||
|
||||
}];
|
||||
|
||||
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noDataBox" titleStr:@"暂无数据" detailStr:@""];
|
||||
//元素竖直方向的间距
|
||||
emptyView.subViewMargin = 20.f;
|
||||
//标题颜色
|
||||
emptyView.titleLabTextColor = [UIColor blackColor];
|
||||
//描述字体
|
||||
emptyView.detailLabFont = [UIFont systemFontOfSize:17];
|
||||
//按钮背景色
|
||||
emptyView.actionBtnBackGroundColor = KWhiteColor;
|
||||
emptyView.actionBtnWidth = CGFLOAT_MIN;
|
||||
emptyView.actionBtnHeight = CGFLOAT_MIN;
|
||||
//设置空内容占位图
|
||||
self.homeTable.ly_emptyView = emptyView;
|
||||
|
||||
}
|
||||
|
||||
#pragma mark:新增联系人
|
||||
- (void)addEmergencyContact {
|
||||
|
||||
XJAddContactViewController * addVC = [[XJAddContactViewController alloc] init];
|
||||
|
||||
[self.navigationController pushViewController:addVC animated:YES];
|
||||
|
||||
}
|
||||
//请求紧急联系人
|
||||
- (void)getEmergencyContact {
|
||||
|
||||
NSMutableDictionary * dic = [[NSMutableDictionary alloc] init];
|
||||
|
||||
JKCQAPI * numbeApi = [[JKCQAPI alloc] init:self tag:@"ContactAPI" NeedToken:@""];
|
||||
|
||||
[numbeApi getEmergencyContact:dic];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -网络请求处理
|
||||
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||
{
|
||||
[self.homeTable.mj_header endRefreshing];
|
||||
[self showMBProgressHUDOnlyWithString:message];
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
}
|
||||
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||
{
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
|
||||
if ([tag isEqualToString:@"ContactAPI"]) {
|
||||
|
||||
[self.homeTable.mj_header endRefreshing];
|
||||
|
||||
NSArray * array = response;
|
||||
[self.dataArray removeAllObjects];
|
||||
for (NSDictionary * parmDic in array) {
|
||||
|
||||
XJEmergencyContactModel * model = [XJEmergencyContactModel modelWithDictionary:parmDic];
|
||||
|
||||
[self.dataArray addObject:model];
|
||||
|
||||
}
|
||||
[self.homeTable reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - DataSource
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
|
||||
return self.dataArray.count;
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
{
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
|
||||
XJEmergencyContactModel * model = self.dataArray[indexPath.row];
|
||||
|
||||
|
||||
static NSString * cellID = @"cellID";
|
||||
|
||||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CONNETCELL"];
|
||||
|
||||
if (!cell) {
|
||||
|
||||
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"CONNETCELL"];
|
||||
}
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
cell.textLabel.font = SYSTEMFONT(14);
|
||||
cell.textLabel.text = [NSString stringWithFormat:@"%@-%@",model.name,model.phone];
|
||||
cell.detailTextLabel.text = model.familyRelation_dictText;
|
||||
return cell;
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
|
||||
return 45;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
XJEmergencyContactModel * model = self.dataArray[indexPath.row];
|
||||
XJAddContactViewController * addVC = [[XJAddContactViewController alloc] init];
|
||||
addVC.model = model;
|
||||
[self.navigationController pushViewController:addVC animated:YES];
|
||||
|
||||
}
|
||||
|
||||
- (CGFloat )tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
return CGFLOAT_MIN;
|
||||
}
|
||||
|
||||
- (CGFloat )tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
|
||||
{
|
||||
return CGFLOAT_MIN;
|
||||
}
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
|
||||
|
||||
return UIView.new;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
#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
|
||||
@@ -95,7 +95,6 @@
|
||||
self.isHidenNaviBar = false;
|
||||
self.pageNo = 0;
|
||||
|
||||
|
||||
[self createUI];
|
||||
|
||||
if ([ESCTUIManager TUIUserStatus] == false) {
|
||||
@@ -107,17 +106,17 @@
|
||||
{
|
||||
[self getChatList];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self createData];
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// [self createData];
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
[self.dataArray removeAllObjects];
|
||||
[self.homeTable.mj_header beginRefreshing];
|
||||
|
||||
|
||||
@@ -149,16 +148,8 @@
|
||||
listBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||
}
|
||||
}
|
||||
if (self.selectOnes == 4) {
|
||||
if (index == 1 ) {
|
||||
listBtn.selected = YES;
|
||||
listBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||
}else{
|
||||
listBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||
}
|
||||
}
|
||||
if (self.selectOnes == 5) {
|
||||
if (index == 2 ) {
|
||||
if (index == 1 ) {
|
||||
listBtn.selected = YES;
|
||||
listBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||
}else{
|
||||
@@ -258,7 +249,7 @@
|
||||
[weakSelf createData];
|
||||
}
|
||||
}];
|
||||
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noData" titleStr:@"暂无数据" detailStr:@""];
|
||||
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noDataBox" titleStr:@"暂无数据" detailStr:@""];
|
||||
//元素竖直方向的间距
|
||||
emptyView.subViewMargin = 20.f;
|
||||
//标题颜色
|
||||
@@ -484,10 +475,11 @@
|
||||
- (void)setSelectOnes:(NSInteger)selectOnes {
|
||||
|
||||
_selectOnes = selectOnes;
|
||||
self.type = [NSString stringWithFormat:@"%ld",_selectOnes];
|
||||
// self.type = [NSString stringWithFormat:@"%ld",_selectOnes];
|
||||
switch (_selectOnes) {
|
||||
case 3://进行中
|
||||
{
|
||||
self.type = @"3";
|
||||
for (UIButton * seleBtn in self.buttonArray) {
|
||||
if (seleBtn.tag == 1000) {
|
||||
seleBtn.selected = YES;
|
||||
@@ -503,6 +495,7 @@
|
||||
break;
|
||||
case 5://已评价
|
||||
{
|
||||
self.type = @"5";
|
||||
for (UIButton * seleBtn in self.buttonArray) {
|
||||
if (seleBtn.tag == 1001) {
|
||||
seleBtn.selected = YES;
|
||||
@@ -518,6 +511,7 @@
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
self.type = @"";
|
||||
for (UIButton * seleBtn in self.buttonArray) {
|
||||
if (seleBtn.tag == 1002) {
|
||||
seleBtn.selected = YES;
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
/** 按钮数组 */
|
||||
@property (nonatomic, strong) NSMutableArray *titleButtons;
|
||||
|
||||
@property (nonatomic, strong) XJMineVideoRecordViewController * videoVC;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation XJMineQuestionRecordViewController
|
||||
@@ -79,7 +82,9 @@
|
||||
//
|
||||
XJMineVideoRecordViewController * videoVc = [[XJMineVideoRecordViewController alloc] init];
|
||||
videoVc.navigationItem.title = @"视频咨询";
|
||||
videoVc.isSlected = false;
|
||||
videoVc.selectOnes = self.type;
|
||||
self.videoVC = videoVc;
|
||||
videoVc.view.backgroundColor = CViewBgColor;
|
||||
[self addChildViewController:videoVc];
|
||||
|
||||
@@ -105,6 +110,14 @@
|
||||
|
||||
//滚动collectionView 修改偏移量
|
||||
CGFloat offsetX = i * kScreenWidth;
|
||||
if (i == 1) {
|
||||
|
||||
self.videoVC.isSlected = true;
|
||||
}else
|
||||
{
|
||||
self.videoVC.isSlected = false;
|
||||
|
||||
}
|
||||
_collectionView.contentOffset = CGPointMake(offsetX, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property (nonatomic, assign) NSInteger selectOnes;
|
||||
|
||||
@property (nonatomic, assign) bool isSlected;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -84,14 +84,18 @@
|
||||
self.pageNo = 0;
|
||||
self.type = [NSString stringWithFormat:@"%ld",_selectOnes];
|
||||
[self createUI];
|
||||
[self createData];
|
||||
if (self.isSlected == true) {
|
||||
[self createData];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
[self.homeTable.mj_header beginRefreshing];
|
||||
if (self.isSlected == true) {
|
||||
[self.homeTable.mj_header beginRefreshing];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -181,7 +185,7 @@
|
||||
weakSelf.pageNo ++;
|
||||
[weakSelf createData];
|
||||
}];
|
||||
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noData" titleStr:@"暂无数据" detailStr:@""];
|
||||
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noDataBox" titleStr:@"暂无数据" detailStr:@""];
|
||||
//元素竖直方向的间距
|
||||
emptyView.subViewMargin = 20.f;
|
||||
//标题颜色
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#import "XJMineCenterUserModel.h"
|
||||
#import "XJEditSystemViewController.h"
|
||||
#import "XJSOSLookDoctoreViewController.h"
|
||||
#import "XJEmergencyListViewController.h"
|
||||
|
||||
@interface XJMyCenterViewController ()<myCenterHeardToolsDelegate,cenerCellListDelegate>
|
||||
|
||||
@@ -168,7 +169,7 @@
|
||||
- (void)completeEvaluation {
|
||||
XJMineQuestionRecordViewController * recordVC = [[XJMineQuestionRecordViewController alloc] init];
|
||||
recordVC.titleSelected = 10;//图文视频
|
||||
recordVC.type = 4;
|
||||
recordVC.type = 5;
|
||||
[self.navigationController pushViewController:recordVC animated:YES];
|
||||
|
||||
}
|
||||
@@ -201,6 +202,10 @@
|
||||
case 1:
|
||||
vcToPush = [[XJSOSLookDoctoreViewController alloc] init];
|
||||
break;
|
||||
case 2:
|
||||
vcToPush = [[XJEmergencyListViewController alloc] init];
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
@property (nonatomic, strong) UIScrollView * mainScrollview;
|
||||
@property (nonatomic, strong) YYLabel * jingguoLabel;
|
||||
@property (nonatomic, strong) YYLabel * xiaojieLabel;
|
||||
@property (nonatomic, strong) UILabel * xiaojieTitle;
|
||||
|
||||
@end
|
||||
|
||||
@@ -63,11 +64,12 @@
|
||||
xiaojieTitle.text = @"事件小结";
|
||||
xiaojieTitle.textColor = CFontColor1;
|
||||
xiaojieTitle.font = BOLDSYSTEMFONT(14);
|
||||
self.xiaojieTitle = xiaojieTitle;
|
||||
[self.mainScrollview addSubview:xiaojieTitle];
|
||||
|
||||
//小结
|
||||
|
||||
self.xiaojieLabel = [[YYLabel alloc] initWithFrame:CGRectMake(kRealValue(13),kRealValue(55), self.mainScrollview.width, 13)];
|
||||
self.xiaojieLabel = [[YYLabel alloc] initWithFrame:CGRectMake(kRealValue(13),xiaojieTitle.bottom + kRealValue(31), self.mainScrollview.width, 13)];
|
||||
self.xiaojieLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.xiaojieLabel.font = MEDIUMFONT(13);
|
||||
self.xiaojieLabel.textColor = UIColorHex(#333333);
|
||||
@@ -110,7 +112,7 @@
|
||||
|
||||
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||
{
|
||||
if ([tag isEqualToString:@"DETAILAPI"]) {
|
||||
if ([tag isEqualToString:@"SMALLAPI"]) {
|
||||
NSDictionary * dic = response;
|
||||
if (ValidDict(dic)) {
|
||||
NSString * jingguoString = [dic objectForKey:@"orderThrough"];
|
||||
@@ -118,36 +120,45 @@
|
||||
|
||||
if (!ValidStr(jingguoString)) {
|
||||
|
||||
NSData *data = [jingguoString dataUsingEncoding:NSUnicodeStringEncoding];
|
||||
NSDictionary *options = @{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType };
|
||||
NSError *error = nil;
|
||||
NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithData:data
|
||||
options:options
|
||||
documentAttributes:nil
|
||||
error:&error];
|
||||
// ✅ 设置字体为13号
|
||||
[attrStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:13] range:NSMakeRange(0, attrStr.length)];
|
||||
|
||||
self.jingguoLabel.attributedText = attrStr;
|
||||
|
||||
NSAttributedString *attrStr = [[NSAttributedString alloc] initWithData:[jingguoString dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];
|
||||
self.jingguoLabel.frame = CGRectMake(kRealValue(13),kRealValue(55), self.mainScrollview.width, 13);
|
||||
// 查询文本排版结果
|
||||
// 计算文本尺寸YYTextLayout
|
||||
CGSize maxSize = CGSizeMake(self.mainScrollview.width, MAXFLOAT);
|
||||
self.jingguoLabel.frame = CGRectMake(kRealValue(13), kRealValue(55), self.mainScrollview.width, 13);
|
||||
|
||||
YYTextLayout * layout = [YYTextLayout layoutWithContainerSize:maxSize text:self.jingguoLabel.attributedText];
|
||||
self.jingguoLabel.textLayout = layout;
|
||||
CGFloat introHeight = layout.textBoundingSize.height;
|
||||
// 记录真正的正确高度
|
||||
self.jingguoLabel.height = introHeight;
|
||||
CGSize maxSize = CGSizeMake(self.mainScrollview.width, MAXFLOAT);
|
||||
YYTextLayout *layout = [YYTextLayout layoutWithContainerSize:maxSize text:attrStr];
|
||||
self.jingguoLabel.textLayout = layout;
|
||||
self.jingguoLabel.height = layout.textBoundingSize.height;
|
||||
}
|
||||
if (!ValidStr(xiaojieString)) {
|
||||
//小结
|
||||
NSData *data = [xiaojieString dataUsingEncoding:NSUnicodeStringEncoding];
|
||||
NSDictionary *options = @{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType };
|
||||
NSError *error = nil;
|
||||
NSMutableAttributedString *sumAttrStr = [[NSMutableAttributedString alloc] initWithData:data
|
||||
options:options
|
||||
documentAttributes:nil
|
||||
error:&error];
|
||||
// ✅ 设置字体为13号
|
||||
[sumAttrStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:13] range:NSMakeRange(0, sumAttrStr.length)];
|
||||
|
||||
NSAttributedString * sumAttrStr = [[NSAttributedString alloc] initWithData:[xiaojieString dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];
|
||||
self.xiaojieLabel.frame = CGRectMake(kRealValue(13),kRealValue(55), self.mainScrollview.width, 13);
|
||||
self.xiaojieLabel.attributedText = sumAttrStr;
|
||||
// 查询文本排版结果
|
||||
// 计算文本尺寸YYTextLayout
|
||||
CGSize maxSize = CGSizeMake(self.mainScrollview.width, MAXFLOAT);
|
||||
YYTextLayout * sumlayout = [YYTextLayout layoutWithContainerSize:maxSize text:self.xiaojieLabel.attributedText];
|
||||
self.xiaojieLabel.textLayout = sumlayout;
|
||||
CGFloat sumIntroHeight = sumlayout.textBoundingSize.height;
|
||||
// 记录真正的正确高度
|
||||
self.xiaojieLabel.height = sumIntroHeight;
|
||||
self.xiaojieTitle.top = self.jingguoLabel.bottom + kRealValue(24);
|
||||
self.xiaojieLabel.frame = CGRectMake(kRealValue(13), self.xiaojieTitle.bottom + kRealValue(20), self.mainScrollview.width, 13);
|
||||
self.xiaojieLabel.attributedText = sumAttrStr;
|
||||
|
||||
// 显示文本排版结果
|
||||
CGSize maxSize = CGSizeMake(self.mainScrollview.width, MAXFLOAT);
|
||||
YYTextLayout *sumLayout = [YYTextLayout layoutWithContainerSize:maxSize text:sumAttrStr];
|
||||
self.xiaojieLabel.textLayout = sumLayout;
|
||||
self.xiaojieLabel.height = sumLayout.textBoundingSize.height;
|
||||
}
|
||||
self.mainScrollview.contentSize = CGSizeMake(self.mainScrollview.width, self.xiaojieLabel.bottom + kRealValue(20));
|
||||
}
|
||||
|
||||
@@ -43,8 +43,9 @@
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
UIImageView * heardImg = [[UIImageView alloc] initWithFrame:CGRectMake(kRealValue(26), - kRealValue(16) , 52, 52)];
|
||||
UIImageView * heardImg = [[UIImageView alloc] initWithFrame:CGRectMake(kRealValue(26), - kRealValue(16) ,52, 52)];
|
||||
self.heardImage = heardImg;
|
||||
self.heardImage.backgroundColor = KClearColor;
|
||||
heardImg.layer.cornerRadius = 26;
|
||||
heardImg.layer.masksToBounds = true;
|
||||
heardImg.userInteractionEnabled = true;
|
||||
@@ -74,27 +75,36 @@
|
||||
[self addSubview:self.lookMoreLabel];
|
||||
|
||||
|
||||
NSArray * array = @[@[@"进行中",@"HeardProgress_icon"],@[@"待评价",@"waitEveal_icon"],@[@"已评价",@"alreadyEveal"],@[@"历史",@"HeardHistory_icon"]];
|
||||
NSArray *array = @[@[@"进行中",@"HeardProgress_icon"],
|
||||
@[@"待评价",@"waitEveal_icon"],
|
||||
@[@"已评价",@"alreadyEveal"],
|
||||
@[@"历史",@"HeardHistory_icon"]];
|
||||
|
||||
CGFloat w = 58 ;
|
||||
CGFloat imageWidth = kRealValue(58);
|
||||
NSInteger itemCount = array.count;
|
||||
CGFloat sideMargin = 12.0;
|
||||
CGFloat spacingCount = itemCount - 1;
|
||||
|
||||
for (int i = 0 ; i < 4; i++) {
|
||||
CGFloat availableWidth = self.width - 2 * sideMargin - itemCount * imageWidth;
|
||||
CGFloat spacing = availableWidth / spacingCount;
|
||||
|
||||
UIView * heardView = [[UIView alloc] initWithFrame:CGRectMake(i * (kScreenWidth - kRealValue(30))/4, self.heardImage.bottom + kRealValue(18),(kScreenWidth - kRealValue(30))/4, self.height - self.heardImage.bottom - kRealValue(18))];
|
||||
for (int i = 0; i < itemCount; i++) {
|
||||
CGFloat x = sideMargin + i * (imageWidth + spacing);
|
||||
|
||||
UIView *heardView = [[UIView alloc] initWithFrame:CGRectMake(x, self.heardImage.bottom + 2, imageWidth, self.height - self.heardImage.bottom - 18)];
|
||||
[self addSubview:heardView];
|
||||
|
||||
UIImageView * toolsImg = [[UIImageView alloc] initWithFrame:CGRectMake((heardView.width / 2 - 29 ) , kRealValue(18), w, w)];
|
||||
UIImageView *toolsImg = [[UIImageView alloc] initWithFrame:CGRectMake(heardView.width/2 -imageWidth/2, 15, imageWidth, imageWidth)];
|
||||
toolsImg.image = [UIImage imageNamed:array[i][1]];
|
||||
toolsImg.userInteractionEnabled = true;
|
||||
toolsImg.userInteractionEnabled = YES;
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
UILabel * numLabel = [[UILabel alloc] initWithFrame:CGRectMake(toolsImg.width - 16, -2, 18, 18)];
|
||||
if (i == 0) {
|
||||
UILabel *numLabel = [[UILabel alloc] initWithFrame:CGRectMake(imageWidth - 16, -2, 18, 18)];
|
||||
numLabel.text = @"1";
|
||||
numLabel.textColor = KWhiteColor;
|
||||
numLabel.font = SYSTEMFONT(13);
|
||||
numLabel.textColor = UIColor.whiteColor;
|
||||
numLabel.font = [UIFont systemFontOfSize:13];
|
||||
numLabel.textAlignment = NSTextAlignmentCenter;
|
||||
numLabel.backgroundColor = KRedColor;
|
||||
numLabel.backgroundColor = UIColor.redColor;
|
||||
numLabel.layer.borderColor = UIColor.whiteColor.CGColor;
|
||||
numLabel.layer.borderWidth = 1.0f;
|
||||
numLabel.layer.cornerRadius = 9.0;
|
||||
@@ -103,24 +113,25 @@
|
||||
numLabel.hidden = YES;
|
||||
[toolsImg addSubview:numLabel];
|
||||
}
|
||||
|
||||
[heardView addSubview:toolsImg];
|
||||
|
||||
UILabel * toolsLabel = [[UILabel alloc] initWithFrame:CGRectMake(0 ,toolsImg.bottom + kRealValue(5), heardView.width, 15)];
|
||||
toolsLabel.textColor = CFontColor1;
|
||||
toolsLabel.font = SYSTEMFONT(13);
|
||||
UILabel *toolsLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(toolsImg.frame) + 5, imageWidth, 15)];
|
||||
toolsLabel.textColor = [UIColor blackColor];
|
||||
toolsLabel.font = [UIFont systemFontOfSize:13];
|
||||
toolsLabel.text = array[i][0];
|
||||
toolsLabel.textAlignment = NSTextAlignmentCenter;
|
||||
[heardView addSubview:toolsLabel];
|
||||
|
||||
UIButton * heardBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, heardView.width, 80)];
|
||||
UIButton *heardBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, imageWidth, 80)];
|
||||
[heardBtn addTarget:self action:@selector(heardToolsAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
heardBtn.tag = 100 + i;
|
||||
[heardView addSubview:heardBtn];
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)heardToolsAction:(UIButton *)toolsBtn {
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
- (UIView *)createHeardView
|
||||
{
|
||||
XJMyCenterHeardView * heardV = [[XJMyCenterHeardView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(150))];
|
||||
XJMyCenterHeardView * heardV = [[XJMyCenterHeardView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, kScreenWidth - kRealValue(30), kRealValue(150))];
|
||||
heardV.layer.cornerRadius = 10;
|
||||
heardV.backgroundColor = KWhiteColor;
|
||||
heardV.heardDelegate = self.heardDelegate;
|
||||
@@ -88,7 +88,7 @@
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
|
||||
return 2;
|
||||
return 3;
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
@@ -102,7 +102,8 @@
|
||||
//,@[@"我的关注",@"myLove_icon"]
|
||||
NSArray *sectionOne = @[
|
||||
@[@"咨询人管理", @"relatives_icon"],
|
||||
@[@"应急就医", @"medicalReson_icon"]
|
||||
@[@"应急就医", @"medicalReson_icon"],
|
||||
@[@"紧急联系人", @"emergency_icon"]
|
||||
];
|
||||
|
||||
static NSString * cellID = @"cellID";
|
||||
@@ -117,18 +118,8 @@
|
||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
cell.textLabel.font = SYSTEMFONT(14);
|
||||
cell.textLabel.text = sectionOne[indexPath.row][0];
|
||||
// cell.imageView.image = [UIImage imageNamed: sectionOne[indexPath.row][1]];
|
||||
// 安全判断
|
||||
if (indexPath.row < sectionOne.count) {
|
||||
NSArray *item = sectionOne[indexPath.row];
|
||||
if (item.count >= 2) {
|
||||
cell.textLabel.text = item[0];
|
||||
cell.imageView.image = [UIImage imageNamed:item[1]];
|
||||
}
|
||||
} else {
|
||||
cell.textLabel.text = @"--";
|
||||
cell.imageView.image = nil;
|
||||
}
|
||||
cell.imageView.image = [UIImage imageNamed: sectionOne[indexPath.row][1]];
|
||||
|
||||
return cell;
|
||||
|
||||
}
|
||||
|
||||
@@ -74,23 +74,24 @@
|
||||
make.left.mas_offset(15);
|
||||
make.top.mas_equalTo(self.nameLabel.mas_bottom).offset(14);
|
||||
make.height.mas_offset(14);
|
||||
make.bottom.mas_offset(-20);
|
||||
}];
|
||||
[self.timeLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
|
||||
self.hospitalLabel = [[UILabel alloc] init];
|
||||
self.hospitalLabel.textColor = UIColorHex(#333333);
|
||||
self.hospitalLabel.font = MEDIUMFONT(14);
|
||||
self.hospitalLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.hospitalLabel.text = @"应急医院:西京医院-协助检查";
|
||||
[self.contentView addSubview:self.hospitalLabel];
|
||||
|
||||
[self.hospitalLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_offset(15);
|
||||
make.top.mas_equalTo(self.timeLabel.mas_bottom).offset(14);
|
||||
make.height.mas_offset(13);
|
||||
make.bottom.mas_offset(-18);
|
||||
}];
|
||||
[self.hospitalLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
// self.hospitalLabel = [[UILabel alloc] init];
|
||||
// self.hospitalLabel.textColor = UIColorHex(#333333);
|
||||
// self.hospitalLabel.font = MEDIUMFONT(14);
|
||||
// self.hospitalLabel.textAlignment = NSTextAlignmentLeft;
|
||||
// self.hospitalLabel.text = @"应急医院:西京医院-协助检查";
|
||||
// [self.contentView addSubview:self.hospitalLabel];
|
||||
//
|
||||
// [self.hospitalLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.left.mas_offset(15);
|
||||
// make.top.mas_equalTo(self.timeLabel.mas_bottom).offset(14);
|
||||
// make.height.mas_offset(13);
|
||||
// make.bottom.mas_offset(-18);
|
||||
// }];
|
||||
// [self.hospitalLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
|
||||
UIImageView * accowImg = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"garyRight"]];
|
||||
[self.contentView addSubview:accowImg];
|
||||
@@ -126,7 +127,7 @@
|
||||
|
||||
[self.statusLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_offset(-15);
|
||||
make.top.mas_equalTo(self.lookDetail.mas_bottom).offset(26);
|
||||
make.top.mas_equalTo(self.lookDetail.mas_bottom).offset(18);
|
||||
make.height.mas_offset(13);
|
||||
}];
|
||||
|
||||
@@ -137,12 +138,12 @@
|
||||
_model = model;
|
||||
self.nameLabel.text = [NSString stringWithFormat:@"求助人:%@",_model.initiatorUserName];
|
||||
self.timeLabel.text = [NSString stringWithFormat:@"求救时间:%@",_model.createTime];
|
||||
if ( ValidStr(_model.sendOrderHospital) ) {
|
||||
self.hospitalLabel.text = @"应急医院:";
|
||||
}else
|
||||
{
|
||||
self.hospitalLabel.text =[NSString stringWithFormat:@"应急医院:%@-%@",_model.sendOrderHospital,_model.stationBusiness_dictText];
|
||||
}
|
||||
// if ( ValidStr(_model.sendOrderHospital) ) {
|
||||
// self.hospitalLabel.text = @"应急医院:";
|
||||
// }else
|
||||
// {
|
||||
// self.hospitalLabel.text =[NSString stringWithFormat:@"应急医院:%@-%@",_model.sendOrderHospital,_model.stationBusiness_dictText];
|
||||
// }
|
||||
self.statusLabel.text = model.orderStatus_dictText;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MonitoringDetailViewController : BaseWebViewVC
|
||||
|
||||
@property (nonatomic, strong) NSString * navTitle;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
// Do any additional setup after loading the view.
|
||||
self.view.backgroundColor = CViewBgColor;
|
||||
self.isHidenNaviBar = false;
|
||||
self.navigationItem.title = @"详情";
|
||||
self.navigationItem.title = self.navTitle;
|
||||
[self addNavigationItemWithImageNames:@[@"whiteBack_icon"] isLeft:YES target:self action:@selector(backOnclick) tags:@[@"1"]];
|
||||
|
||||
}
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
- (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation{
|
||||
[self hiddenAllMBProgressHUD];
|
||||
self.navigationItem.title = @"详情";;
|
||||
self.navigationItem.title = self.navTitle;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
[weakSelf updateHistoryData:self.currentDate];
|
||||
}];
|
||||
|
||||
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noData" titleStr:@"暂无数据" detailStr:@""];
|
||||
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noDataBox" titleStr:@"暂无数据" detailStr:@""];
|
||||
//元素竖直方向的间距
|
||||
emptyView.subViewMargin = 20.f;
|
||||
//标题颜色
|
||||
@@ -129,6 +129,7 @@
|
||||
- (void)updateMonthLabel {
|
||||
NSString *currentMonth = [self getMonthFromDate:self.currentDate];
|
||||
self.weekLabel.text = currentMonth; // 设置标签显示当前月份
|
||||
[self.dataArray removeAllObjects];
|
||||
[self updateHistoryData:currentMonth];
|
||||
}
|
||||
|
||||
@@ -246,6 +247,9 @@
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
NSArray * array = response;
|
||||
|
||||
if (self.pageNo == 1) {
|
||||
[self.dataArray removeAllObjects];
|
||||
}
|
||||
for (NSDictionary * dic in array) {
|
||||
|
||||
MonitoringDataModel * model = [MonitoringDataModel modelWithDictionary:dic];
|
||||
|
||||
@@ -63,38 +63,39 @@
|
||||
[self.view addSubview:self.homeTable];
|
||||
|
||||
MJWeakSelf
|
||||
self.homeTable.popBlock = ^(NSString *type) {
|
||||
if ([type isEqualToString:@"heart_rate"]) {
|
||||
|
||||
self.homeTable.popBlock = ^(MonitoringListDataModel *model) {
|
||||
if ([model.wdType isEqualToString:@"heart_rate"]) {
|
||||
|
||||
[weakSelf showPickStringView:BRStringPickerComponentMulti
|
||||
withTitle: @"心率阈值"
|
||||
withDataArray:@[@[@"40次/分钟", @"45次/分钟", @"50次/分钟"], @[@"100次/分钟",@"110次/分钟",@"120次/分钟",@"130次/分钟",@"140次/分钟",@"150次/分钟"]] withType:type];
|
||||
withDataArray:@[@[@"40次/分钟", @"45次/分钟", @"50次/分钟"], @[@"100次/分钟",@"110次/分钟",@"120次/分钟",@"130次/分钟",@"140次/分钟",@"150次/分钟"]] withType:model.wdType withLeft:model.warnMin withRight:model.warnMax];
|
||||
|
||||
|
||||
}
|
||||
if ([type isEqualToString:@"spo2"]) {
|
||||
if ([model.wdType isEqualToString:@"spo2"]) {
|
||||
|
||||
[weakSelf showPickStringView:BRStringPickerComponentSingle
|
||||
withTitle: @"血氧阈值"
|
||||
withDataArray:@[@"75%", @"80%", @"85%",@"90%"] withType:type];
|
||||
withTitle: @"血氧阈值(下限)"
|
||||
withDataArray:@[@"75%", @"80%", @"85%",@"90%"] withType:model.wdType withLeft:model.warnMin withRight:model.warnMax];
|
||||
|
||||
|
||||
}
|
||||
|
||||
if ([type isEqualToString:@"stress"]) {
|
||||
if ([model.wdType isEqualToString:@"stress"]) {
|
||||
|
||||
[weakSelf showPickStringView:BRStringPickerComponentSingle
|
||||
withTitle: @"压力阈值"
|
||||
withDataArray:@[@"80", @"81", @"82",@"83",@"84",@"85",@"86",@"87",@"88",@"89",@"90",@"91",@"92",@"93",@"94",@"95",@"96",@"97",@"98",@"99"] withType:type];
|
||||
withTitle: @"压力阈值(上限)"
|
||||
withDataArray:@[@"80", @"81", @"82",@"83",@"84",@"85",@"86",@"87",@"88",@"89",@"90",@"91",@"92",@"93",@"94",@"95",@"96",@"97",@"98",@"99"] withType:model.wdType withLeft:model.warnMin withRight:model.warnMin];
|
||||
|
||||
|
||||
}
|
||||
if ([type isEqualToString:@"temperature"]) {
|
||||
if ([model.wdType isEqualToString:@"temperature"]) {
|
||||
|
||||
[weakSelf showPickStringView:BRStringPickerComponentMulti
|
||||
withTitle: @"体温阈值"
|
||||
withDataArray:@[@[@"34.0℃", @"34.1℃", @"34.2℃",@"34.3℃",@"34.4℃",@"34.5℃",@"34.6℃",@"34.7℃",@"34.8℃",@"34.9℃",@"35.0℃",@"35.1℃",@"35.2℃",@"35.3℃",@"35.4℃",@"35.5℃",@"35.6℃",@"35.7℃",@"35.8℃",@"35.9℃"],
|
||||
@[@"37.2℃", @"37.3℃", @"37.4℃",@"37.5℃",@"37.6℃",@"37.7℃",@"37.8℃",@"37.9℃",@"38.0℃",@"38.1℃",@"38.2℃",@"38.3℃",@"38.4℃"]] withType:type];
|
||||
@[@"37.2℃", @"37.3℃", @"37.4℃",@"37.5℃",@"37.6℃",@"37.7℃",@"37.8℃",@"37.9℃",@"38.0℃",@"38.1℃",@"38.2℃",@"38.3℃",@"38.4℃"]] withType:model.wdType withLeft:model.warnMin withRight:model.warnMax];
|
||||
|
||||
|
||||
}
|
||||
@@ -116,6 +117,12 @@
|
||||
|
||||
};
|
||||
|
||||
self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||
|
||||
[weakSelf createDetail];
|
||||
|
||||
}];
|
||||
|
||||
// UIView * warnView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.homeTable.bottom + kRealValue(15), kScreenWidth - kRealValue(30), kRealValue(325))];
|
||||
// warnView.layer.cornerRadius = 10;
|
||||
// warnView.backgroundColor = KWhiteColor;
|
||||
@@ -197,6 +204,7 @@
|
||||
}
|
||||
|
||||
- (void)createDetail {
|
||||
[self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:false];
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject:User_ID forKey:@"userId"];
|
||||
@@ -231,6 +239,8 @@
|
||||
if ([tag isEqualToString:@"DETAILAPI"])
|
||||
{
|
||||
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
NSDictionary * dic = response;
|
||||
|
||||
MonitoringDataModel * model = [MonitoringDataModel modelWithDictionary:dic];
|
||||
@@ -253,7 +263,24 @@
|
||||
- (void)showPickStringView:(BRStringPickerMode)stringModel
|
||||
withTitle:(NSString *)title
|
||||
withDataArray:(NSArray *)array
|
||||
withType:(NSString *)type{
|
||||
withType:(NSString *)type
|
||||
withLeft:(NSString *)leftString
|
||||
withRight:(NSString *)rightString{
|
||||
UIView * customView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 30)];
|
||||
|
||||
UILabel * leftLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, kScreenWidth/2, 20)];
|
||||
leftLabel.text = @"下限";
|
||||
leftLabel.font = SYSTEMFONT(15);
|
||||
leftLabel.textAlignment = NSTextAlignmentCenter;
|
||||
leftLabel.textColor = CFontColor2;
|
||||
[customView addSubview:leftLabel];
|
||||
|
||||
UILabel * rightLabel = [[UILabel alloc] initWithFrame:CGRectMake(kScreenWidth/2, 10, kScreenWidth/2, 20)];
|
||||
rightLabel.text = @"上限";
|
||||
rightLabel.font = SYSTEMFONT(15);
|
||||
rightLabel.textAlignment = NSTextAlignmentCenter;
|
||||
rightLabel.textColor = CFontColor2;
|
||||
[customView addSubview:rightLabel];
|
||||
|
||||
/// 多列文本选择器
|
||||
BRStringPickerView *textPickerView = [[BRStringPickerView alloc]initWithPickerMode:stringModel];
|
||||
@@ -263,37 +290,102 @@
|
||||
textPickerView.pickerStyle.doneTextColor = UIColorHex(#21BEBD);
|
||||
// 设置数据源
|
||||
textPickerView.dataSourceArr = array;
|
||||
if (stringModel == 0) {
|
||||
textPickerView.selectIndex =1;
|
||||
if (stringModel == 0) { //单列
|
||||
|
||||
NSInteger selectedOnes = 0;
|
||||
|
||||
if ([type isEqualToString:@"spo2"]) {
|
||||
|
||||
for (NSString * dataString in array) {
|
||||
|
||||
if ( [dataString intValue] == [leftString intValue]) {
|
||||
textPickerView.selectIndex = selectedOnes;
|
||||
}
|
||||
selectedOnes ++;
|
||||
}
|
||||
}
|
||||
|
||||
if ([type isEqualToString:@"stress"]) {
|
||||
|
||||
for (NSString * dataString in array) {
|
||||
|
||||
if ( [dataString intValue] == [rightString intValue]) {
|
||||
textPickerView.selectIndex = selectedOnes;
|
||||
}
|
||||
selectedOnes ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
textPickerView.resultModelBlock = ^(BRResultModel *resultModel) {
|
||||
NSString *valueStr = [self extractNumberFromString:resultModel.value];
|
||||
|
||||
if ([type isEqualToString:@"spo2"]) {
|
||||
[self settingWithType:type MaxAndMin:@"0" minValue:resultModel.value];
|
||||
|
||||
[self settingWithType:type MaxAndMin:@"0" minValue:valueStr];
|
||||
}
|
||||
if ([type isEqualToString:@"stress"]) {
|
||||
[self settingWithType:type MaxAndMin:resultModel.value minValue:@"0"];
|
||||
|
||||
[self settingWithType:type MaxAndMin:valueStr minValue:@"0"];
|
||||
}
|
||||
|
||||
};
|
||||
}else {
|
||||
textPickerView.selectIndexs = @[@1,@1];
|
||||
} else {
|
||||
|
||||
[textPickerView addSubViewToPicker:customView];
|
||||
|
||||
NSInteger selectedLeft = 0;
|
||||
|
||||
for (NSString * dataString in array[0]) {
|
||||
|
||||
if ( [dataString intValue] == [leftString intValue]) {
|
||||
break;
|
||||
}
|
||||
selectedLeft ++;
|
||||
}
|
||||
|
||||
NSInteger selectedRight = 0;
|
||||
|
||||
for (NSString * dataString in array[1]) {
|
||||
|
||||
if ( [dataString intValue] == [rightString intValue]) {
|
||||
break;
|
||||
}
|
||||
selectedRight ++;
|
||||
}
|
||||
textPickerView.selectIndexs = @[@(selectedLeft),@(selectedRight)];
|
||||
|
||||
|
||||
textPickerView.resultModelArrayBlock = ^(NSArray<BRResultModel *> * _Nullable resultModelArr) {
|
||||
|
||||
BRResultModel * resultModel1 = resultModelArr[0];
|
||||
BRResultModel * resultModel2 = resultModelArr[1];
|
||||
|
||||
[self settingWithType:type MaxAndMin:resultModel1.value minValue:resultModel2.value];
|
||||
BRResultModel *resultModel1 = resultModelArr[1];
|
||||
BRResultModel *resultModel2 = resultModelArr[0];
|
||||
|
||||
NSString *maxValue = [self extractNumberFromString:resultModel1.value];
|
||||
NSString *minValue = [self extractNumberFromString:resultModel2.value];
|
||||
|
||||
[self settingWithType:type MaxAndMin:maxValue minValue:minValue];
|
||||
};
|
||||
}
|
||||
|
||||
[textPickerView show];
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 提取字符串中的第一个数字(包括小数),例如从 @"34.1m" 提取 @"34.1"
|
||||
- (NSString *)extractNumberFromString:(NSString *)input {
|
||||
NSError *error = nil;
|
||||
NSString *pattern = @"\\d+\\.?\\d*"; // 支持整数和小数
|
||||
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern options:0 error:&error];
|
||||
|
||||
NSTextCheckingResult *match = [regex firstMatchInString:input options:0 range:NSMakeRange(0, input.length)];
|
||||
if (match) {
|
||||
return [input substringWithRange:match.range];
|
||||
}
|
||||
return @"0"; // 没找到数字时返回默认值
|
||||
}
|
||||
|
||||
|
||||
#pragma mark:设置最大最小值
|
||||
|
||||
- (void)settingWithType:(NSString *)type
|
||||
@@ -301,7 +393,8 @@
|
||||
minValue:(NSString *)min{
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject:User_ID forKey:@"userId"];
|
||||
[parmDic setObject:type forKey:@"eventType"];
|
||||
[parmDic setObject:User_ID forKey:@"uerId"];
|
||||
[parmDic setObject:max forKey:@"warnMax"];
|
||||
[parmDic setObject:min forKey:@"warnMin"];
|
||||
|
||||
@@ -321,6 +414,7 @@
|
||||
|
||||
detailVC.webUrl = [NSString stringWithFormat:@"%@/static/monitor/index.html?p=%@&r=%@&t=%@&id=%@&d=%@&h=%@#/%@",
|
||||
IntervenH5, @"heartRate", H5DevHost, User_Token, User_ID, time, SCHEME, @"heartRate"];
|
||||
detailVC.navTitle = @"心率";
|
||||
|
||||
|
||||
}
|
||||
@@ -329,6 +423,7 @@
|
||||
detailVC.webUrl = [NSString stringWithFormat:@"%@/static/monitor/index.html?p=%@&r=%@&t=%@&id=%@&d=%@&h=%@#/%@",
|
||||
IntervenH5, @"oxygenSaturation", H5DevHost, User_Token, User_ID, time, SCHEME, @"oxygenSaturation"];
|
||||
|
||||
detailVC.navTitle = @"血氧饱和度";
|
||||
|
||||
}
|
||||
|
||||
@@ -336,6 +431,7 @@
|
||||
|
||||
detailVC.webUrl = [NSString stringWithFormat:@"%@/static/monitor/index.html?p=%@&r=%@&t=%@&id=%@&d=%@&h=%@#/%@",
|
||||
IntervenH5, @"pressure", H5DevHost, User_Token, User_ID, time, SCHEME, @"pressure"];
|
||||
detailVC.navTitle = @"压力";
|
||||
|
||||
|
||||
}
|
||||
@@ -344,6 +440,7 @@
|
||||
|
||||
detailVC.webUrl = [NSString stringWithFormat:@"%@/static/monitor/index.html?p=%@&r=%@&t=%@&id=%@&d=%@&h=%@#/%@",
|
||||
IntervenH5, @"temperature", H5DevHost, User_Token, User_ID, time, SCHEME, @"temperature"];
|
||||
detailVC.navTitle = @"体温";
|
||||
|
||||
}
|
||||
|
||||
@@ -352,6 +449,7 @@
|
||||
|
||||
detailVC.webUrl = [NSString stringWithFormat:@"%@/static/monitor/index.html?p=%@&r=%@&t=%@&id=%@&d=%@&h=%@#/%@",
|
||||
IntervenH5, @"stepNumber", H5DevHost, User_Token, User_ID, time, SCHEME, @"stepNumber"];
|
||||
detailVC.navTitle = @"步数";
|
||||
|
||||
}
|
||||
|
||||
@@ -360,6 +458,7 @@
|
||||
|
||||
detailVC.webUrl = [NSString stringWithFormat:@"%@/static/monitor/index.html?p=%@&r=%@&t=%@&id=%@&d=%@&h=%@#/%@",
|
||||
IntervenH5, @"sleep", H5DevHost, User_Token, User_ID, time, SCHEME, @"sleep"];
|
||||
detailVC.navTitle = @"睡眠";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "MonitoringDataModel.h"
|
||||
|
||||
typedef void(^showPickStringBlock)(NSString * type);
|
||||
typedef void(^showPickStringBlock)(MonitoringListDataModel * model);
|
||||
|
||||
typedef void(^showHistoryListBlock)(NSString * type);
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
}
|
||||
- (void)popStringPick {
|
||||
|
||||
self.popBlock(self.listModel.wdType);
|
||||
self.popBlock(self.listModel);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
#import "FoundExpertModel.h"
|
||||
#import "EvaluatListModel.h"
|
||||
#import "SearchZhuangJiaViewController.h"
|
||||
#import "EvaluationListViewController.h"
|
||||
#import "XJEvaluationListViewController.h"
|
||||
#import "HospitalIntroViewController.h"
|
||||
#import "TYMapNavSheet.h"
|
||||
#import "ExpertMainViewController.h"
|
||||
#import "XJExpertMainViewController.h"
|
||||
|
||||
@interface HospitalMainViewController ()<UIActionSheetDelegate>
|
||||
{
|
||||
@@ -206,7 +206,7 @@
|
||||
self.collectView.layer.cornerRadius = 10;
|
||||
self.collectView.layer.masksToBounds = true;
|
||||
self.collectView.collSelectBlock = ^(NSString * _Nonnull doctorID, NSString * _Nonnull doctorName) {
|
||||
ExpertMainViewController * serarchVC = [[ ExpertMainViewController alloc] init];
|
||||
XJExpertMainViewController * serarchVC = [[ XJExpertMainViewController alloc] init];
|
||||
// serarchVC.departmentId = @"";
|
||||
// serarchVC.departmentName = @"";
|
||||
// serarchVC.sickId = @"";
|
||||
@@ -227,7 +227,7 @@
|
||||
self.homeTable.layer.cornerRadius = 10;
|
||||
self.homeTable.layer.masksToBounds = true;
|
||||
self.homeTable.moreBlock = ^{
|
||||
EvaluationListViewController * evalVC = [[EvaluationListViewController alloc] init];
|
||||
XJEvaluationListViewController * evalVC = [[XJEvaluationListViewController alloc] init];
|
||||
evalVC.hospitalID = weakSelf.hospitalID;
|
||||
[weakSelf.navigationController pushViewController:evalVC animated:YES];
|
||||
};
|
||||
|
||||
@@ -136,38 +136,42 @@
|
||||
|
||||
|
||||
NSDictionary * resDic = response;
|
||||
if ([resDic.allKeys containsObject:@"id"]) {
|
||||
self.showID = [NSString stringWithFormat:@"%@",resDic[@"id"]];
|
||||
}
|
||||
|
||||
if ([resDic.allKeys containsObject:@"content"]) {
|
||||
NSMutableAttributedString *text = [NSMutableAttributedString new];
|
||||
// 添加文本
|
||||
NSString *title = resDic[@"content"];
|
||||
if (ValidDict(resDic)) {
|
||||
|
||||
// //富文本
|
||||
// [NSString stringWithFormat:@"<font style='font-size:20px;color:red'>%@</font> ",title];
|
||||
NSAttributedString *attrStr = [[NSAttributedString alloc] initWithData:[[NSString stringWithFormat:@"<font style='font-size:16px;color:black'>%@</font> ",title] dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];
|
||||
if ([resDic.allKeys containsObject:@"id"]) {
|
||||
self.showID = [NSString stringWithFormat:@"%@",resDic[@"id"]];
|
||||
}
|
||||
|
||||
[text appendAttributedString:attrStr];
|
||||
if ([resDic.allKeys containsObject:@"content"]) {
|
||||
NSMutableAttributedString *text = [NSMutableAttributedString new];
|
||||
// 添加文本
|
||||
NSString *title = resDic[@"content"];
|
||||
|
||||
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
||||
[paragraphStyle setLineSpacing:6];
|
||||
[text addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [text length])];
|
||||
// //富文本
|
||||
// [NSString stringWithFormat:@"<font style='font-size:20px;color:red'>%@</font> ",title];
|
||||
NSAttributedString *attrStr = [[NSAttributedString alloc] initWithData:[[NSString stringWithFormat:@"<font style='font-size:16px;color:black'>%@</font> ",title] dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];
|
||||
|
||||
self.conntLabel.attributedText = text;
|
||||
[text appendAttributedString:attrStr];
|
||||
|
||||
CGSize maxSize = CGSizeMake(self.conntLabel.width, MAXFLOAT);
|
||||
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
||||
[paragraphStyle setLineSpacing:6];
|
||||
[text addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [text length])];
|
||||
|
||||
YYTextLayout * layout = [YYTextLayout layoutWithContainerSize:maxSize text:self.conntLabel.attributedText];
|
||||
self.conntLabel.textLayout = layout;
|
||||
CGFloat introHeight = layout.textBoundingSize.height;
|
||||
self.conntLabel.width = maxSize.width;
|
||||
// 记录真正的正确高度
|
||||
self.conntLabel.height = introHeight;
|
||||
// 显示文本排版结果
|
||||
self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - 30, self.conntLabel.bottom);
|
||||
self.conntLabel.attributedText = text;
|
||||
|
||||
CGSize maxSize = CGSizeMake(self.conntLabel.width, MAXFLOAT);
|
||||
|
||||
YYTextLayout * layout = [YYTextLayout layoutWithContainerSize:maxSize text:self.conntLabel.attributedText];
|
||||
self.conntLabel.textLayout = layout;
|
||||
CGFloat introHeight = layout.textBoundingSize.height;
|
||||
self.conntLabel.width = maxSize.width;
|
||||
// 记录真正的正确高度
|
||||
self.conntLabel.height = introHeight;
|
||||
// 显示文本排版结果
|
||||
self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - 30, self.conntLabel.bottom);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if([tag isEqualToString:@"NOTSHOW"]) {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#import "QuestionPeopleModel.h"
|
||||
#import "SelectedQuestionViewController.h"
|
||||
#import "XJAddQuestionViewController.h"
|
||||
|
||||
#import "XJExpertMainViewController.h"
|
||||
|
||||
@interface QuestionPeopleMangerVC ()
|
||||
|
||||
@@ -51,10 +51,22 @@
|
||||
self.isHidenNaviBar = false;
|
||||
self.pageNo = 1;
|
||||
self.navigationItem.title = @"咨询人管理";
|
||||
[self addNavigationItemWithImageNames:@[@"whiteBack_icon"] isLeft:YES target:self action:@selector(popToExpertMainViewController) tags:@[@"78"]];
|
||||
[self createUI];
|
||||
[self getData];
|
||||
}
|
||||
|
||||
- (void)popToExpertMainViewController {
|
||||
for (UIViewController *vc in self.navigationController.viewControllers) {
|
||||
if ([vc isKindOfClass:[XJExpertMainViewController class]]) {
|
||||
[self.navigationController popToViewController:vc animated:YES];
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 如果没找到,可以选择 pop 回根控制器,或做其他处理
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
self.homeTable = [[QuestionPeopleManagerTable alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - kTopHeight - SafetyAreaHeight - 45) style:UITableViewStylePlain];
|
||||
@@ -81,6 +93,22 @@
|
||||
[weakSelf getData];
|
||||
}];
|
||||
|
||||
|
||||
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noDataBox" titleStr:@"暂无数据" detailStr:@""];
|
||||
//元素竖直方向的间距
|
||||
emptyView.subViewMargin = 20.f;
|
||||
//标题颜色
|
||||
emptyView.titleLabTextColor = [UIColor blackColor];
|
||||
//描述字体
|
||||
emptyView.detailLabFont = [UIFont systemFontOfSize:17];
|
||||
//按钮背景色
|
||||
emptyView.actionBtnBackGroundColor = KWhiteColor;
|
||||
emptyView.actionBtnWidth = CGFLOAT_MIN;
|
||||
emptyView.actionBtnHeight = CGFLOAT_MIN;
|
||||
//设置空内容占位图
|
||||
self.homeTable.ly_emptyView = emptyView;
|
||||
|
||||
|
||||
UIButton * addBtn = [[UIButton alloc] initWithFrame:CGRectMake(kScreenWidth/2 - kRealValue(140) ,kScreenHeight - kTopHeight - SafetyAreaHeight - 45 , kRealValue(130), 45)];
|
||||
[addBtn setBackgroundColor:UIColorHex(#21BEBD)];
|
||||
[addBtn setTitle:@"新增" forState:UIControlStateNormal];
|
||||
@@ -181,6 +209,14 @@
|
||||
}
|
||||
DLog(@"%ld",mode.isSelected);
|
||||
}
|
||||
if(self.dataArray.count == 0) {
|
||||
[EasyTextView showErrorText:@"暂无联系人"];
|
||||
return;
|
||||
}
|
||||
if(seleArray.count == 0) {
|
||||
[EasyTextView showErrorText:@"请选择要删除的联系人"];
|
||||
return;
|
||||
}
|
||||
[self showMBProgressHUDWithString:@"删除中,请稍候..." autoHidden:false];
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#import "FoundExpertViewController.h"
|
||||
#import "XJDoctorMainViewController.h"
|
||||
#import "DoctorRecommendModel.h"
|
||||
#import "ExpertMainViewController.h"
|
||||
#import "XJExpertMainViewController.h"
|
||||
#import "XJQustionRecordViewController.h"
|
||||
#import "ChatViewController.h"
|
||||
#import "QuesstionDetailLookFileViewController.h"
|
||||
@@ -43,6 +43,8 @@
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * dataArray;
|
||||
|
||||
@property (nonatomic, strong) HomeQusetionRecordsModel * recomendModel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation QuestionViewController
|
||||
@@ -194,8 +196,8 @@
|
||||
// var mCheckToken = false
|
||||
// var mCurrentLon = 108.949845
|
||||
NSUserDefaults * user = [NSUserDefaults standardUserDefaults];
|
||||
[user setObject:@(108.949845) forKey:USERDEFAULLONG];
|
||||
[user setObject:@(34.327271) forKey:USERDEFAULLATITUDE];
|
||||
[user setObject:@(87.627704) forKey:USERDEFAULLONG];
|
||||
[user setObject:@(43.793026) forKey:USERDEFAULLATITUDE];
|
||||
[user synchronize];
|
||||
return;
|
||||
}
|
||||
@@ -252,7 +254,7 @@
|
||||
self.homeTable.headDelegate = self;
|
||||
kWeakSelf(self);
|
||||
self.homeTable.tableBlock = ^(HomeQusetionRecordsModel * _Nonnull model) {
|
||||
|
||||
weakself.recomendModel = model;
|
||||
//1图文 2视频
|
||||
if ([model.contentType intValue] == 2) {
|
||||
|
||||
@@ -286,7 +288,11 @@
|
||||
[weakself.navigationController pushViewController:chatVC animated:YES];
|
||||
}else
|
||||
{
|
||||
[EasyTextView showErrorText:@"登录过期,请重新登录"];
|
||||
if ([HQCommonUtils isLogin]) {
|
||||
[weakself loginImAccountList];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -537,19 +543,14 @@
|
||||
}
|
||||
if ([tag isEqualToString:@"SMALLHELP"]) {
|
||||
|
||||
if ([ESCTUIManager TUIUserStatus] == false) {
|
||||
|
||||
|
||||
[self loginImAccount];
|
||||
return;
|
||||
}
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
SmallHelpIMDataModel * model = [SmallHelpIMDataModel modelWithDictionary:response];
|
||||
ChatViewController * chatVC = [[ChatViewController alloc] init];
|
||||
chatVC.isGroupID = YES;
|
||||
chatVC.chatID = model.groupId;
|
||||
chatVC.smallHelp_id = model.small_id;
|
||||
chatVC.isVideo = YES;
|
||||
chatVC.isVideo = false;
|
||||
chatVC.eableSendReport = YES;
|
||||
chatVC.eableMapTools = false;
|
||||
chatVC.navTitle = @"全科医生";
|
||||
@@ -572,6 +573,40 @@
|
||||
[self smallQuestionAction];
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"loginIMList"]) {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
NSDictionary * pamrDic = response;
|
||||
|
||||
IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:pamrDic];
|
||||
|
||||
IMUserInfoModel * iminfoModel = [[IMUserInfoModel alloc] init];
|
||||
iminfoModel.IMInfo = pamrDic;
|
||||
[HQCommonUtils keyedArchiverWithData:iminfoModel key:IMLoginUserInfo];
|
||||
[ESCTUIManager loginInitTUISDKAppidWith:[model.sdkAppId intValue] UserID:model.userId userSig:model.userSig];
|
||||
|
||||
ChatViewController * chatVC = [[ChatViewController alloc] init];
|
||||
chatVC.isGroupID = YES;
|
||||
chatVC.chatID = self.recomendModel.imId ;
|
||||
chatVC.eableSendReport = true;
|
||||
chatVC.eablehaveHelathData = false;
|
||||
chatVC.navTitle = @"图文咨询";
|
||||
chatVC.isVideo = NO;
|
||||
chatVC.pictureEnd_id = self.recomendModel.records_id;
|
||||
chatVC.questionType = 2;
|
||||
chatVC.medicalRecordsId = self.recomendModel.memberId;
|
||||
if ([self.recomendModel.contentStatus intValue] == 5) {
|
||||
chatVC.isEveal = true;
|
||||
}else
|
||||
{
|
||||
chatVC.isEveal = false;
|
||||
}
|
||||
if ([self.recomendModel.contentStatus intValue] >=4 ) {
|
||||
chatVC.endRecordType = 100;
|
||||
}
|
||||
[self.navigationController pushViewController:chatVC animated:YES];
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ([tag isEqualToString:@"UPVERSION"]) {
|
||||
|
||||
@@ -656,19 +691,28 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
#pragma mark:小助手的回调
|
||||
- (void)loginImAccount {
|
||||
|
||||
JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"loginIMAPI" NeedToken:nil];
|
||||
[proctocolApi GetIMLoginAccount:nil];
|
||||
|
||||
}
|
||||
#pragma mark:列表点击回调
|
||||
|
||||
- (void)loginImAccountList {
|
||||
|
||||
JKCQAPI * proctocolApi = [[JKCQAPI alloc] init:self tag:@"loginIMList" NeedToken:nil];
|
||||
[proctocolApi GetIMLoginAccount:nil];
|
||||
|
||||
}
|
||||
|
||||
|
||||
#pragma mark:医生列表点击事件
|
||||
|
||||
- (void)doctorListClick:(NSString *)doctorID {
|
||||
|
||||
ExpertMainViewController * mainVC = [[ExpertMainViewController alloc] init];
|
||||
XJExpertMainViewController * mainVC = [[XJExpertMainViewController alloc] init];
|
||||
mainVC.doctorId = doctorID;
|
||||
[self.navigationController pushViewController:mainVC animated:YES];
|
||||
}
|
||||
@@ -685,6 +729,13 @@
|
||||
|
||||
- (void)smallQuestionAction {
|
||||
|
||||
if ([ESCTUIManager TUIUserStatus] == false) {
|
||||
|
||||
|
||||
[self loginImAccount];
|
||||
return;
|
||||
}
|
||||
|
||||
NSMutableDictionary * dic = [[NSMutableDictionary alloc] init];
|
||||
|
||||
[self showMBProgressHUDWithString:@"咨询中,请稍候..." autoHidden:NO];
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
[weakSelf createData];
|
||||
}];
|
||||
|
||||
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noData" titleStr:@"暂无数据" detailStr:@""];
|
||||
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImageStr:@"noDataBox" titleStr:@"暂无数据" detailStr:@""];
|
||||
//元素竖直方向的间距
|
||||
emptyView.subViewMargin = 20.f;
|
||||
//标题颜色
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
//元素竖直方向的间距
|
||||
emptyView.titleLabMargin = kRealValue(5);
|
||||
emptyView.contentViewY = kRealValue(450);
|
||||
emptyView.contentViewY = kRealValue(250);
|
||||
|
||||
emptyView.imageSize = CGSizeMake(kRealValue(101), kRealValue(60));
|
||||
//标题颜色
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#import "SearchZhuangjiaTable.h"
|
||||
#import "SearchZhuangJiaViewController.h"
|
||||
#import "HospitalMainViewController.h"
|
||||
#import "ExpertMainViewController.h"
|
||||
#import "XJExpertMainViewController.h"
|
||||
#import "QuestionMustKnowViewController.h"
|
||||
#import "SelectedQuestionViewController.h"
|
||||
#import "SelectedDoctorTimeVC.h"
|
||||
@@ -181,7 +181,7 @@
|
||||
self.homeTable.mainBlock = ^(NSString * _Nonnull type, NSString * _Nonnull needID) {
|
||||
if ([type isEqualToString:@"医生"]) {
|
||||
|
||||
ExpertMainViewController * mainVC = [[ExpertMainViewController alloc] init];
|
||||
XJExpertMainViewController * mainVC = [[XJExpertMainViewController alloc] init];
|
||||
mainVC.doctorId = needID;
|
||||
[weakSelf.navigationController pushViewController:mainVC animated:YES];
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
#import "SearchZhuangJiaViewController.h"
|
||||
#import "ExpertMainViewController.h"
|
||||
#import "XJExpertMainViewController.h"
|
||||
#import "HQSearchView.h"
|
||||
#import "SearchConetShowTable.h"
|
||||
#import "SearchZhuangjiaTable.h"
|
||||
@@ -831,7 +831,7 @@
|
||||
|
||||
- (void)zhuangjiaJumpDetail:(NSString *)memberID {
|
||||
|
||||
ExpertMainViewController * mainVC = [[ExpertMainViewController alloc] init];
|
||||
XJExpertMainViewController * mainVC = [[XJExpertMainViewController alloc] init];
|
||||
mainVC.doctorId = memberID;
|
||||
[self.navigationController pushViewController:mainVC animated:YES];
|
||||
|
||||
|
||||
@@ -127,10 +127,10 @@
|
||||
|
||||
|
||||
self.collLoveBtn = [[UIButton alloc] initWithFrame:CGRectMake(kScreenWidth - kRealValue(15) - 60, kRealValue(24), 60, 25)];
|
||||
self.collLoveBtn.titleLabel.font = MEDIUMFONT(12);
|
||||
self.collLoveBtn.layer.cornerRadius = 13.0;
|
||||
self.collLoveBtn.layer.masksToBounds = true;
|
||||
[self.collLoveBtn addTarget:self action:@selector(collectHosptal:) forControlEvents:UIControlEventTouchUpInside];
|
||||
// self.collLoveBtn.titleLabel.font = MEDIUMFONT(12);
|
||||
// self.collLoveBtn.layer.cornerRadius = 13.0;
|
||||
// self.collLoveBtn.layer.masksToBounds = true;
|
||||
// [self.collLoveBtn addTarget:self action:@selector(collectHosptal:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[doctView addSubview:self.collLoveBtn];
|
||||
|
||||
self.hospitalLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.heardImage.right + kRealValue(18),self.jobLabel.bottom + kRealValue(15) ,kScreenWidth - self.heardImage.right - kRealValue(30), 13)];
|
||||
@@ -305,22 +305,22 @@
|
||||
|
||||
DoctorDetailModel * model = [DoctorDetailModel modelWithDictionary:parmDic];
|
||||
|
||||
if ([model.tfFollow integerValue] == 1) {
|
||||
[self.collLoveBtn setTitle:@"已关注" forState:UIControlStateNormal];
|
||||
[self.collLoveBtn setTitleColor:KWhiteColor forState:UIControlStateNormal];
|
||||
[self.collLoveBtn setImage:[UIImage imageWithColor:UIColor.grayColor] forState:UIControlStateNormal];
|
||||
self.collLoveBtn.backgroundColor = RGBA(221, 221, 221, 1);
|
||||
self.collLoveBtn.selected = true;
|
||||
|
||||
}else
|
||||
{
|
||||
[self.collLoveBtn setTitle:@" 关注" forState:UIControlStateNormal];
|
||||
[self.collLoveBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||
[self.collLoveBtn setImage:IMAGE_NAMED(@"collectLove") forState:UIControlStateNormal];
|
||||
self.collLoveBtn.backgroundColor = KWhiteColor ;
|
||||
self.collLoveBtn.selected = false;
|
||||
|
||||
}
|
||||
// if ([model.tfFollow integerValue] == 1) {
|
||||
// [self.collLoveBtn setTitle:@"已关注" forState:UIControlStateNormal];
|
||||
// [self.collLoveBtn setTitleColor:KWhiteColor forState:UIControlStateNormal];
|
||||
// [self.collLoveBtn setImage:[UIImage imageWithColor:UIColor.grayColor] forState:UIControlStateNormal];
|
||||
// self.collLoveBtn.backgroundColor = RGBA(221, 221, 221, 1);
|
||||
// self.collLoveBtn.selected = true;
|
||||
//
|
||||
// }else
|
||||
// {
|
||||
// [self.collLoveBtn setTitle:@" 关注" forState:UIControlStateNormal];
|
||||
// [self.collLoveBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||
// [self.collLoveBtn setImage:IMAGE_NAMED(@"collectLove") forState:UIControlStateNormal];
|
||||
// self.collLoveBtn.backgroundColor = KWhiteColor ;
|
||||
// self.collLoveBtn.selected = false;
|
||||
//
|
||||
// }
|
||||
self.doctorLabel.text = model.doctorName;
|
||||
self.jobLabel.text = model.doctorTitle;
|
||||
|
||||
|
||||
@@ -215,8 +215,14 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(self.dataArray.count == 0) {
|
||||
[EasyTextView showErrorText:@"请先新增咨询人"];
|
||||
return;
|
||||
}
|
||||
|
||||
if (ValidStr(upID) || ValidStr(onID)) {
|
||||
[EasyTextView showErrorText:@"请选择咨询人"];
|
||||
[EasyTextView showErrorText:@"请选择或新增咨询人档案"];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -195,9 +195,9 @@
|
||||
[self.view addSubview:saveBtn];
|
||||
|
||||
if (self.questionModel) {
|
||||
self.baseHelathInfoField.hidden = false;
|
||||
baseBtn.hidden = false;
|
||||
tishiLabel.top = self.baseHelathInfoField.bottom + kRealValue(10);
|
||||
self.baseHelathInfoField.hidden = false;
|
||||
baseBtn.hidden = false;
|
||||
tishiLabel.top = self.baseHelathInfoField.bottom + kRealValue(10);
|
||||
self.questionNameField.text = self.questionModel.name;
|
||||
self.relationshipTextField.text = self.questionModel.familyRelation;
|
||||
self.weightTextField.text = [NSString stringWithFormat:@"%@",self.questionModel.weight];
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#import "LookModficalFileViewController.h"
|
||||
#import "QuesstionDetailLookFileViewController.h"
|
||||
#import "QuestionBodyReportModel.h"
|
||||
#import "ExpertMainViewController.h"
|
||||
#import "XJExpertMainViewController.h"
|
||||
#import "evaluationPopView.h"
|
||||
#import "FSXBStarRateView.h"
|
||||
#import "SelectedQuestionViewController.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// EvaluationListViewController.h
|
||||
// XJEvaluationListViewController.h
|
||||
// XinjiangProject
|
||||
//
|
||||
// Created by 仁康信息 on 2023/6/14.
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface EvaluationListViewController : HQBaseViewController
|
||||
@interface XJEvaluationListViewController : HQBaseViewController
|
||||
|
||||
@property (nonatomic, copy) NSString * hospitalID;
|
||||
@property (nonatomic, assign) NSInteger type;
|
||||
@@ -1,17 +1,17 @@
|
||||
//
|
||||
// EvaluationListViewController.m
|
||||
// XJEvaluationListViewController.m
|
||||
// XinjiangProject
|
||||
//
|
||||
// Created by 仁康信息 on 2023/6/14.
|
||||
//
|
||||
|
||||
#import "EvaluationListViewController.h"
|
||||
#import "XJEvaluationListViewController.h"
|
||||
#import "EvaluationListTableView.h"
|
||||
#import "FSXBStarRateView.h"
|
||||
#import "EvaluatListModel.h"
|
||||
|
||||
|
||||
@interface EvaluationListViewController ()
|
||||
@interface XJEvaluationListViewController ()
|
||||
|
||||
@property (nonatomic, assign) NSInteger pageNo;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
@end
|
||||
|
||||
@implementation EvaluationListViewController
|
||||
@implementation XJEvaluationListViewController
|
||||
|
||||
- (NSMutableArray *)dataArray {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// ExpertMainViewController.h
|
||||
// XJExpertMainViewController.h
|
||||
// XinjiangProject
|
||||
//
|
||||
// Created by 仁康信息 on 2023/6/16.
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface ExpertMainViewController : HQBaseViewController
|
||||
@interface XJExpertMainViewController : HQBaseViewController
|
||||
|
||||
@property (nonatomic, copy) NSString * doctorId;
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
//
|
||||
// ExpertMainViewController.m
|
||||
// XJExpertMainViewController.m
|
||||
// XinjiangProject
|
||||
//
|
||||
// Created by 仁康信息 on 2023/6/16.
|
||||
//
|
||||
|
||||
#import "ExpertMainViewController.h"
|
||||
#import "XJExpertMainViewController.h"
|
||||
#import "ZHTagListView.h"
|
||||
#import "HospitalMainTableView.h"
|
||||
#import "EvaluationListViewController.h"
|
||||
#import "XJEvaluationListViewController.h"
|
||||
#import "DoctorDetailModel.h"
|
||||
#import "EvaluatListModel.h"
|
||||
#import "DoctorEvaluationTable.h"
|
||||
#import "SelectedDoctorTimeVC.h"
|
||||
#import "FileDataDetailViewController.h"
|
||||
#import "XJFileDataDetailViewController.h"
|
||||
#import "SelectFIleDateDetailViewController.h"
|
||||
#import "SelectedQuestionViewController.h"
|
||||
#import "QuestionMustKnowViewController.h"
|
||||
|
||||
@interface ExpertMainViewController ()
|
||||
@interface XJExpertMainViewController ()
|
||||
|
||||
@property (nonatomic, strong) UIScrollView * mainScrollView;
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
@end
|
||||
|
||||
@implementation ExpertMainViewController
|
||||
@implementation XJExpertMainViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
@@ -70,8 +70,9 @@
|
||||
self.view.backgroundColor = UIColorHex(#EEEEEE);
|
||||
[self createUI];
|
||||
[self createData];
|
||||
//1 图文 0 音视频
|
||||
[self getMustknowWithType:@"1"];
|
||||
[self getMustknowWithType:@"2"];
|
||||
[self getMustknowWithType:@"0"];
|
||||
|
||||
}
|
||||
|
||||
@@ -147,14 +148,14 @@
|
||||
[self.topView addSubview:self.hospitalName];
|
||||
|
||||
self.collectBtn = [[UIButton alloc] initWithFrame:CGRectMake(kScreenWidth - kRealValue(15) - 60, kRealValue(33), 60, 26)];
|
||||
self.collectBtn.backgroundColor = KWhiteColor;
|
||||
[self.collectBtn setTitle:@" 关注" forState:UIControlStateNormal];
|
||||
[self.collectBtn setTitle:@"已关注" forState:UIControlStateSelected];
|
||||
self.collectBtn.titleLabel.font = SYSTEMFONT(12);
|
||||
[self.collectBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||
[self.collectBtn addTarget:self action:@selector(collectHosptal:) forControlEvents:UIControlEventTouchUpInside];
|
||||
self.collectBtn.layer.cornerRadius = 13.0;
|
||||
self.collectBtn.layer.masksToBounds = true;
|
||||
// self.collectBtn.backgroundColor = KWhiteColor;
|
||||
// [self.collectBtn setTitle:@" 关注" forState:UIControlStateNormal];
|
||||
// [self.collectBtn setTitle:@"已关注" forState:UIControlStateSelected];
|
||||
// self.collectBtn.titleLabel.font = SYSTEMFONT(12);
|
||||
// [self.collectBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||
// [self.collectBtn addTarget:self action:@selector(collectHosptal:) forControlEvents:UIControlEventTouchUpInside];
|
||||
// self.collectBtn.layer.cornerRadius = 13.0;
|
||||
// self.collectBtn.layer.masksToBounds = true;
|
||||
[self.topView addSubview:self.collectBtn];
|
||||
|
||||
NSMutableArray *_dataSource = @[
|
||||
@@ -337,7 +338,7 @@
|
||||
self.homeTable.layer.masksToBounds = true;
|
||||
MJWeakSelf;
|
||||
self.homeTable.moreBlock = ^{
|
||||
EvaluationListViewController * evalVC = [[EvaluationListViewController alloc] init];
|
||||
XJEvaluationListViewController * evalVC = [[XJEvaluationListViewController alloc] init];
|
||||
evalVC.doctorId = weakSelf.doctorId;
|
||||
evalVC.type = 2;
|
||||
[weakSelf.navigationController pushViewController:evalVC animated:YES];
|
||||
@@ -392,18 +393,18 @@
|
||||
|
||||
DoctorDetailModel * model = [DoctorDetailModel modelWithDictionary:parmDic];
|
||||
|
||||
if ([model.tfFollow integerValue] == 1) {
|
||||
|
||||
self.collectBtn.selected = YES;
|
||||
[self.collectBtn setImage:[UIImage imageWithColor:KWhiteColor] forState:UIControlStateNormal];
|
||||
|
||||
|
||||
}else
|
||||
{
|
||||
self.collectBtn.selected = NO;
|
||||
[self.collectBtn setImage:IMAGE_NAMED(@"collectLove") forState:UIControlStateNormal];
|
||||
|
||||
}
|
||||
// if ([model.tfFollow integerValue] == 1) {
|
||||
//
|
||||
// self.collectBtn.selected = YES;
|
||||
// [self.collectBtn setImage:[UIImage imageWithColor:KWhiteColor] forState:UIControlStateNormal];
|
||||
//
|
||||
//
|
||||
// }else
|
||||
// {
|
||||
// self.collectBtn.selected = NO;
|
||||
// [self.collectBtn setImage:IMAGE_NAMED(@"collectLove") forState:UIControlStateNormal];
|
||||
//
|
||||
// }
|
||||
self.doctorName.text = model.doctorName;
|
||||
self.jobName.text = model.doctorTitle;
|
||||
|
||||
@@ -577,18 +578,21 @@
|
||||
self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.homeTable.bottom + kRealValue(30));
|
||||
}
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"xuzhi_0"]) {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
NSDictionary * parmDic = response;
|
||||
if (ValidDict(parmDic)) {
|
||||
self.PictureknowDic = parmDic;
|
||||
}
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"xuzhi_1"]) {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
NSDictionary * parmDic = response;
|
||||
self.PictureknowDic = parmDic;
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"xuzhi_2"]) {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
NSDictionary * parmDic = response;
|
||||
self.AudioknowDic = parmDic;
|
||||
|
||||
if (ValidDict(parmDic)) {
|
||||
self.AudioknowDic = parmDic;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -655,7 +659,7 @@
|
||||
{
|
||||
QuestionMustKnowViewController * questionVC = [[QuestionMustKnowViewController alloc] init];
|
||||
questionVC.doctorId = self.doctorId;
|
||||
questionVC.popType = 2; //1 图文 0 音视频 2 用户须知
|
||||
questionVC.popType = 0; //1 图文 0 音视频 2 用户须知
|
||||
[self.navigationController pushViewController:questionVC animated:YES];
|
||||
}else
|
||||
{
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// FileDataDetailViewController.h
|
||||
// XJFileDataDetailViewController.h
|
||||
// XinjiangProject
|
||||
//
|
||||
// Created by 仁康信息 on 2023/6/19.
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface FileDataDetailViewController : HQBaseViewController
|
||||
@interface XJFileDataDetailViewController : HQBaseViewController
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
//
|
||||
// FileDataDetailViewController.m
|
||||
// XJFileDataDetailViewController.m
|
||||
// XinjiangProject
|
||||
//
|
||||
// Created by 仁康信息 on 2023/6/19.
|
||||
//
|
||||
|
||||
#import "FileDataDetailViewController.h"
|
||||
#import "XJFileDataDetailViewController.h"
|
||||
#import "DetailTitleView.h"
|
||||
#import "DetailUserInfoView.h"
|
||||
#import "FileDataDeatilCenterView.h"
|
||||
#import "BasicHealthInfoView.h"
|
||||
|
||||
@interface FileDataDetailViewController ()
|
||||
@interface XJFileDataDetailViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation FileDataDetailViewController
|
||||
@implementation XJFileDataDetailViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
@@ -101,13 +101,13 @@
|
||||
|
||||
|
||||
self.collectBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.width - kRealValue(15) - 60, kRealValue(24), 60, 25)];
|
||||
self.collectBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||
[self.collectBtn setTitle:@"关注" forState:UIControlStateNormal];
|
||||
self.collectBtn.titleLabel.font = SYSTEMFONT(12);
|
||||
[self.collectBtn setTitleColor:KWhiteColor forState:UIControlStateNormal];
|
||||
self.collectBtn.layer.cornerRadius = 13.0;
|
||||
self.collectBtn.layer.masksToBounds = true;
|
||||
[self.collectBtn addTarget:self action:@selector(userCollectDoctor) forControlEvents:UIControlEventTouchUpInside];
|
||||
// self.collectBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||
// [self.collectBtn setTitle:@"关注" forState:UIControlStateNormal];
|
||||
// self.collectBtn.titleLabel.font = SYSTEMFONT(12);
|
||||
// [self.collectBtn setTitleColor:KWhiteColor forState:UIControlStateNormal];
|
||||
// self.collectBtn.layer.cornerRadius = 13.0;
|
||||
// self.collectBtn.layer.masksToBounds = true;
|
||||
// [self.collectBtn addTarget:self action:@selector(userCollectDoctor) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self addSubview:self.collectBtn];
|
||||
|
||||
self.hospatilLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.heardImage.right + kRealValue(18),self.jobLabel.bottom + kRealValue(18) ,self.width - self.heardImage.right - kRealValue(30), 13)];
|
||||
@@ -323,17 +323,17 @@
|
||||
}
|
||||
|
||||
|
||||
if([doctorModel.tfFollow integerValue] == 1) {
|
||||
|
||||
[self.collectBtn setTitle:@"已关注" forState:UIControlStateNormal];
|
||||
[self.collectBtn setTitleColor:CFontColor2 forState:UIControlStateNormal];
|
||||
[self.collectBtn setBackgroundColor:CViewBgColor];
|
||||
[self.collectBtn setImage:[UIImage imageWithColor:CViewBgColor] forState:UIControlStateNormal];
|
||||
|
||||
}else
|
||||
{
|
||||
[self.collectBtn setImage:IMAGE_NAMED(@"detail_collect") forState:UIControlStateNormal];
|
||||
}
|
||||
// if([doctorModel.tfFollow integerValue] == 1) {
|
||||
//
|
||||
// [self.collectBtn setTitle:@"已关注" forState:UIControlStateNormal];
|
||||
// [self.collectBtn setTitleColor:CFontColor2 forState:UIControlStateNormal];
|
||||
// [self.collectBtn setBackgroundColor:CViewBgColor];
|
||||
// [self.collectBtn setImage:[UIImage imageWithColor:CViewBgColor] forState:UIControlStateNormal];
|
||||
//
|
||||
// }else
|
||||
// {
|
||||
// [self.collectBtn setImage:IMAGE_NAMED(@"detail_collect") forState:UIControlStateNormal];
|
||||
// }
|
||||
//状态数据
|
||||
NSString * timeString = [HQCommonUtils getTimeFromTimestamp:[sessionModel.sessionDateLong integerValue] andDateFormat:@"YYYY年MM月dd日"];
|
||||
NSString * weekString;
|
||||
|
||||
@@ -37,16 +37,16 @@
|
||||
- (void)createUI {
|
||||
|
||||
|
||||
UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kStatusBarHeight + kRealValue(18))];
|
||||
UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kStatusBarHeight)];
|
||||
topView.backgroundColor = UIColorHex(#14BEBE);
|
||||
[self addSubview:topView];
|
||||
|
||||
UILabel * detailLabel = [[UILabel alloc] initWithFrame:CGRectMake(0 ,kStatusBarHeight , kScreenWidth, kRealValue(18))];
|
||||
detailLabel.text = @"健康咨询";
|
||||
detailLabel.font = MEDIUMFONT(18);
|
||||
detailLabel.textColor = KWhiteColor;
|
||||
detailLabel.textAlignment = NSTextAlignmentCenter;
|
||||
[topView addSubview:detailLabel];
|
||||
//
|
||||
// UILabel * detailLabel = [[UILabel alloc] initWithFrame:CGRectMake(0 ,kStatusBarHeight , kScreenWidth, kRealValue(18))];
|
||||
// detailLabel.text = @"";
|
||||
// detailLabel.font = MEDIUMFONT(18);
|
||||
// detailLabel.textColor = KWhiteColor;
|
||||
// detailLabel.textAlignment = NSTextAlignmentCenter;
|
||||
// [topView addSubview:detailLabel];
|
||||
|
||||
UIImageView * backImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, topView.bottom - 1, kScreenWidth, kRealValue(288))];
|
||||
backImage.image = [UIImage imageNamed:@"topBackImg"];
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
}];
|
||||
|
||||
self.nameLabel = [[UILabel alloc] init];
|
||||
self.nameLabel.text = @"感冒";
|
||||
self.nameLabel.text = @"--";
|
||||
self.nameLabel.font = BOLDSYSTEMFONT(14);
|
||||
self.nameLabel.textColor = CFontColor1;
|
||||
self.nameLabel.textAlignment = NSTextAlignmentLeft;
|
||||
@@ -87,7 +87,7 @@
|
||||
}];
|
||||
|
||||
self.desLabel = [[UILabel alloc] init];
|
||||
self.desLabel.text = @"最近总是肚子不舒服,总是半夜肚子疼。感觉肚子有些凉,最近没有去过医院";
|
||||
self.desLabel.text = @"--";
|
||||
self.desLabel.font = MEDIUMFONT(13);
|
||||
self.desLabel.textColor = UIColorHex(#999999);
|
||||
self.desLabel.textAlignment = NSTextAlignmentLeft;
|
||||
@@ -124,9 +124,9 @@
|
||||
|
||||
_model = model;
|
||||
|
||||
self.nameLabel.text = model.medicalDescribe;
|
||||
self.nameLabel.text = model.recordsName;
|
||||
|
||||
self.desLabel.text = model.recordsName;
|
||||
self.desLabel.text = model.medicalDescribe ;
|
||||
|
||||
self.chooseBtn.selected = model.isSelected;
|
||||
|
||||
|
||||
@@ -53,44 +53,45 @@
|
||||
|
||||
@property (assign, nonatomic) NSInteger selecetIndex;
|
||||
|
||||
@property (strong, nonatomic) NSMutableArray * hospitalArray;
|
||||
|
||||
@property (strong, nonatomic) NSMutableArray * AedArray;
|
||||
|
||||
@property (strong, nonatomic) NSMutableArray * carArray;
|
||||
@property (nonatomic, strong) UIButton *gpsButton;
|
||||
//@property (strong, nonatomic) NSMutableArray * hospitalArray;
|
||||
//
|
||||
//@property (strong, nonatomic) NSMutableArray * AedArray;
|
||||
//
|
||||
//@property (strong, nonatomic) NSMutableArray * carArray;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XJSosCenterViewController
|
||||
|
||||
- (NSMutableArray *)carArray {
|
||||
|
||||
if (!_carArray) {
|
||||
|
||||
_carArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _carArray;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)hospitalArray {
|
||||
|
||||
if (!_hospitalArray) {
|
||||
|
||||
_hospitalArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _hospitalArray;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)AedArray {
|
||||
|
||||
if (!_AedArray) {
|
||||
|
||||
_AedArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _AedArray;
|
||||
|
||||
|
||||
}
|
||||
//- (NSMutableArray *)carArray {
|
||||
//
|
||||
// if (!_carArray) {
|
||||
//
|
||||
// _carArray = [[NSMutableArray alloc] init];
|
||||
// }
|
||||
// return _carArray;
|
||||
//}
|
||||
//
|
||||
//- (NSMutableArray *)hospitalArray {
|
||||
//
|
||||
// if (!_hospitalArray) {
|
||||
//
|
||||
// _hospitalArray = [[NSMutableArray alloc] init];
|
||||
// }
|
||||
// return _hospitalArray;
|
||||
//}
|
||||
//
|
||||
//- (NSMutableArray *)AedArray {
|
||||
//
|
||||
// if (!_AedArray) {
|
||||
//
|
||||
// _AedArray = [[NSMutableArray alloc] init];
|
||||
// }
|
||||
// return _AedArray;
|
||||
//
|
||||
//
|
||||
//}
|
||||
|
||||
- (NSMutableArray *)titlesArray {
|
||||
|
||||
@@ -114,7 +115,7 @@
|
||||
|
||||
if (!_addressView) {
|
||||
|
||||
_addressView = [[XJSOSAddressView alloc] initWithFrame:CGRectMake(kRealValue(15), kScreenHeight - kTopHeight - kRealValue(130), kScreenWidth - kRealValue(30), kRealValue(110))];
|
||||
_addressView = [[XJSOSAddressView alloc] initWithFrame:CGRectZero];
|
||||
_addressView.addressDelegate = self;
|
||||
_addressView.backgroundColor = KWhiteColor;
|
||||
|
||||
@@ -223,9 +224,8 @@
|
||||
self.Longitude = location.coordinate.longitude;
|
||||
self.latitude = location.coordinate.latitude;
|
||||
[self getResourceDataWithType:@"1" Longitude:self.Longitude withLatitude:self.latitude];
|
||||
|
||||
XJSosCenterViewController *strongSelf = weakSelf;
|
||||
[strongSelf addAnnotationToMapView:annotation];
|
||||
// XJSosCenterViewController *strongSelf = weakSelf;
|
||||
// [strongSelf addAnnotationToMapView:annotation];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -246,10 +246,16 @@
|
||||
self.navigationItem.title = @"应急就医";
|
||||
self.view.backgroundColor = KWhiteColor;
|
||||
TYNavSheet = [[TYMapNavSheet alloc]init];
|
||||
|
||||
|
||||
[self initMapView];
|
||||
// [self initCompleteBlock];
|
||||
// [self configLocationManager];
|
||||
// [self reGeocodeAction];
|
||||
|
||||
UIButton *locationBtn = [[UIButton alloc] initWithFrame:CGRectMake(20, 80, 40, 40)];
|
||||
[locationBtn setImage:[UIImage imageNamed:@"location_icon"] forState:UIControlStateNormal];
|
||||
[locationBtn addTarget:self action:@selector(onLocationBtnPressed) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self.view addSubview:locationBtn];
|
||||
|
||||
|
||||
|
||||
self.titleView = [[LXSegmentTitleView alloc] initWithFrame:CGRectMake(0 , 0 , kScreenWidth , kRealValue(35))];
|
||||
self.titleView.itemMinMargin = 15.f;
|
||||
@@ -263,25 +269,14 @@
|
||||
[self.view addSubview:self.titleView];
|
||||
|
||||
UIView * grapView = [[UIView alloc] initWithFrame:CGRectMake(0, kScreenHeight - kTopHeight - kRealValue(170) - kTabBarHeight, kScreenWidth,kRealValue(170))];
|
||||
grapView.backgroundColor = RGBA(0, 0, 0, 0.1);
|
||||
grapView.backgroundColor = RGBA(0, 0, 0, 0.2); //
|
||||
self.grapView = grapView;
|
||||
self.grapView.hidden = false;
|
||||
[self.view addSubview:grapView];
|
||||
|
||||
[self addWhiteToBlackTransparentGradientToView:self.grapView];
|
||||
|
||||
// 添加渐变图层
|
||||
CAGradientLayer *gradient = [CAGradientLayer layer];
|
||||
gradient.frame = grapView.bounds;
|
||||
gradient.colors = @[(__bridge id)[UIColor colorWithWhite:1.0 alpha:0.0].CGColor, // 顶部白色透明
|
||||
(__bridge id)[UIColor blackColor].CGColor]; // 底部黑色
|
||||
gradient.locations = @[@0.0, @1.0];
|
||||
gradient.startPoint = CGPointMake(0.5, 0.0); // 从上到下
|
||||
gradient.endPoint = CGPointMake(0.5, 1.0);
|
||||
|
||||
[grapView.layer insertSublayer:gradient atIndex:0];
|
||||
|
||||
|
||||
XMButton * callBtn = [[XMButton alloc] initWithFrame:CGRectMake(kScreenWidth/2 - 70 - kRealValue(33), grapView.height - StatusBar_Height - kRealValue(80) , kRealValue(70), kRealValue(70))];
|
||||
XMButton * callBtn = [[XMButton alloc] initWithFrame:CGRectMake(kScreenWidth/2 - 70 - kRealValue(33), grapView.height - 17 - 70 , 70, 70)];
|
||||
callBtn.style = SDButtonStyleTop;
|
||||
callBtn.backgroundColor = KWhiteColor;
|
||||
callBtn.layer.cornerRadius = 35.0f;
|
||||
@@ -298,7 +293,7 @@
|
||||
callBtn.interval = 5;
|
||||
[grapView addSubview:callBtn];
|
||||
|
||||
XMButton * sosBtn = [[XMButton alloc] initWithFrame:CGRectMake(kScreenWidth/2 + kRealValue(33), callBtn.top , kRealValue(70), kRealValue(70))];
|
||||
XMButton * sosBtn = [[XMButton alloc] initWithFrame:CGRectMake(kScreenWidth/2 + kRealValue(33), callBtn.top , 70,70)];
|
||||
sosBtn.style = SDButtonStyleTop;
|
||||
sosBtn.backgroundColor = KWhiteColor;
|
||||
sosBtn.layer.cornerRadius = 35.0f;
|
||||
@@ -315,11 +310,48 @@
|
||||
sosBtn.interval = 5;
|
||||
[grapView addSubview:sosBtn];
|
||||
|
||||
self.titles = @[@"油田医院",@"合作医院",@"医疗点",@"AED",@"救护车"];
|
||||
self.titles = @[@"油田医院",@"合作医院",@"健康小屋",@"AED",@"救护车"];
|
||||
self.titleView.segmentTitles = self.titles;
|
||||
[self.titleView reloadData];
|
||||
|
||||
self.gpsButton = [self makeGPSButtonView];
|
||||
self.gpsButton.frame = CGRectMake(kScreenWidth - 40, kRealValue(150), 40, 40);
|
||||
[self.mapView addSubview:self.gpsButton];
|
||||
|
||||
UIView *zoomPannelView = [self makeZoomPannelView];
|
||||
zoomPannelView.center = CGPointMake(self.grapView.bounds.size.width - CGRectGetMidX(zoomPannelView.bounds) - 10,
|
||||
self.grapView.bounds.size.height - CGRectGetMidY(zoomPannelView.bounds) - 10);
|
||||
|
||||
zoomPannelView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin;
|
||||
[self.grapView addSubview:zoomPannelView];
|
||||
}
|
||||
|
||||
- (void)addWhiteToBlackTransparentGradientToView:(UIView *)view {
|
||||
// 让 view 本身透明
|
||||
view.backgroundColor = [UIColor clearColor];
|
||||
|
||||
// 移除已有的渐变层,避免重复叠加
|
||||
for (CALayer *layer in view.layer.sublayers.copy) {
|
||||
if ([layer isKindOfClass:[CAGradientLayer class]]) {
|
||||
[layer removeFromSuperlayer];
|
||||
}
|
||||
}
|
||||
|
||||
CAGradientLayer *gradient = [CAGradientLayer layer];
|
||||
gradient.frame = view.bounds;
|
||||
|
||||
gradient.colors = @[
|
||||
(__bridge id)[[UIColor colorWithWhite:1.0 alpha:0.15] CGColor], // 顶部白色半透明
|
||||
(__bridge id)[[UIColor colorWithWhite:0.0 alpha:0.25] CGColor] // 底部黑色半透明
|
||||
];
|
||||
|
||||
gradient.startPoint = CGPointMake(0.5, 0.0);
|
||||
gradient.endPoint = CGPointMake(0.5, 1.0);
|
||||
|
||||
[view.layer insertSublayer:gradient atIndex:0];
|
||||
}
|
||||
|
||||
|
||||
- (void)initMapView {
|
||||
if (self.mapView == nil) {
|
||||
[AMapServices sharedServices].enableHTTPS = YES;
|
||||
@@ -330,18 +362,14 @@
|
||||
self.mapView.compassOrigin = CGPointMake(self.mapView.compassOrigin.x, 222);
|
||||
self.mapView.showsScale = YES; //设置成NO表示不显示比例尺;YES表示显示比例尺
|
||||
self.mapView.delegate = self;
|
||||
///如果您需要进入地图就显示定位小蓝点,则需要下面两行代码
|
||||
_mapView.scaleOrigin= CGPointMake(_mapView.scaleOrigin.x, kRealValue(45)); //设置比例尺位置
|
||||
|
||||
|
||||
// ///如果您需要进入地图就显示定位小蓝点,则需要下面两行代码
|
||||
// _mapView.scaleOrigin= CGPointMake(_mapView.scaleOrigin.x, kRealValue(45)); //设置比例尺位置
|
||||
[self.view addSubview:self.mapView];
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
self.mapView.showsUserLocation = YES;
|
||||
self.mapView.userTrackingMode = MAUserTrackingModeFollow;
|
||||
|
||||
// self.mapView.userTrackingMode = MAUserTrackingModeFollow;
|
||||
//1.2、新增点A
|
||||
|
||||
// //将目标经纬度设置为地图中心店
|
||||
MAUserLocationRepresentation *r = [[MAUserLocationRepresentation alloc] init];
|
||||
r.showsAccuracyRing = YES;///精度圈是否显示,默认YES
|
||||
@@ -354,6 +382,68 @@
|
||||
|
||||
}
|
||||
|
||||
- (UIButton *)makeGPSButtonView {
|
||||
UIButton *ret = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
|
||||
ret.backgroundColor = [UIColor whiteColor];
|
||||
ret.layer.cornerRadius = 4;
|
||||
[ret setImage:[UIImage imageNamed:@"gpsStat1"] forState:UIControlStateNormal];
|
||||
[ret addTarget:self action:@selector(gpsAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
- (void)gpsAction {
|
||||
|
||||
|
||||
self.mapView.showsUserLocation = YES;
|
||||
self.mapView.userTrackingMode = MAUserTrackingModeFollow;
|
||||
self.mapView.zoomLevel = 13;
|
||||
[self.mapView setCenterCoordinate:self.mapView.userLocation.location.coordinate animated:YES];
|
||||
[self.gpsButton setSelected:YES];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (UIView *)makeZoomPannelView
|
||||
{
|
||||
UIView *ret = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 53, 98)];
|
||||
|
||||
UIButton *incBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 53, 49)];
|
||||
[incBtn setImage:[UIImage imageNamed:@"increase"] forState:UIControlStateNormal];
|
||||
[incBtn sizeToFit];
|
||||
[incBtn addTarget:self action:@selector(zoomPlusAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
UIButton *decBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 49, 53, 49)];
|
||||
[decBtn setImage:[UIImage imageNamed:@"decrease"] forState:UIControlStateNormal];
|
||||
[decBtn sizeToFit];
|
||||
[decBtn addTarget:self action:@selector(zoomMinusAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
|
||||
[ret addSubview:incBtn];
|
||||
[ret addSubview:decBtn];
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
- (void)zoomPlusAction
|
||||
{
|
||||
CGFloat oldZoom = self.mapView.zoomLevel;
|
||||
[self.mapView setZoomLevel:(oldZoom + 1) animated:YES];
|
||||
self.mapView.showsScale = YES;
|
||||
}
|
||||
|
||||
- (void)zoomMinusAction
|
||||
{
|
||||
CGFloat oldZoom = self.mapView.zoomLevel;
|
||||
[self.mapView setZoomLevel:(oldZoom - 1) animated:YES];
|
||||
self.mapView.showsScale = NO;
|
||||
}
|
||||
|
||||
- (void)onLocationBtnPressed {
|
||||
self.mapView.zoomLevel = 13;
|
||||
self.mapView.userTrackingMode = MAUserTrackingModeFollow;
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
@@ -369,8 +459,8 @@
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
// 开启定位
|
||||
self.mapView.showsUserLocation = YES;
|
||||
self.mapView.userTrackingMode = MAUserTrackingModeFollow;
|
||||
// self.mapView.showsUserLocation = YES;
|
||||
// self.mapView.userTrackingMode = MAUserTrackingModeFollow;
|
||||
}
|
||||
|
||||
- (void)viewDidDisappear:(BOOL)animated
|
||||
@@ -457,14 +547,11 @@
|
||||
self.Longitude = userLocation.location.coordinate.longitude;
|
||||
self.latitude = userLocation.location.coordinate.latitude;
|
||||
NSUserDefaults * user = [NSUserDefaults standardUserDefaults];
|
||||
// [self.mapView setCenterCoordinate: userLocation.location.coordinate animated:YES];
|
||||
|
||||
[user setObject:@(userLocation.location.coordinate.longitude) forKey:USERDEFAULLONG];
|
||||
[user setObject:@(userLocation.location.coordinate.latitude) forKey:USERDEFAULLATITUDE];
|
||||
[user synchronize];
|
||||
// [self getResourceDataWithType:@"0" Longitude:self.Longitude withLatitude:self.latitude];
|
||||
|
||||
// [self getResourceDataWithType:self.type Longitude:self.Longitude withLatitude:self.latitude];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -477,91 +564,17 @@
|
||||
|
||||
- (void)segmentTitleView:(LXSegmentTitleView *)segmentView selectedIndex:(NSInteger)selectedIndex lastSelectedIndex:(NSInteger)lastSelectedIndex {
|
||||
|
||||
self.mapView.showsUserLocation = YES;
|
||||
self.mapView.userTrackingMode = MAUserTrackingModeFollow;
|
||||
|
||||
[self getResourceDataWithType:[NSString stringWithFormat:@"%ld",selectedIndex] Longitude:self.Longitude withLatitude:self.latitude];
|
||||
// self.mapView.showsUserLocation = YES;
|
||||
// self.mapView.userTrackingMode = MAUserTrackingModeFollow;
|
||||
self.addressView.hidden = true;
|
||||
self.grapView.hidden = false;
|
||||
self.selecetIndex = selectedIndex + 1;
|
||||
[self getResourceDataWithType:[NSString stringWithFormat:@"%ld",self.selecetIndex] Longitude:self.Longitude withLatitude:self.latitude];
|
||||
[self.addressView removeFromSuperview];
|
||||
|
||||
// self.selecetIndex = selectedIndex + 1;
|
||||
// if (self.selecetIndex == 1 || self.selecetIndex == 2)
|
||||
// {
|
||||
// [self getResourceDataWithType:[NSString stringWithFormat:@"%ld",self.selecetIndex] Longitude:self.Longitude withLatitude:self.latitude];
|
||||
// [self.addressView removeFromSuperview];
|
||||
// }
|
||||
// if (self.selecetIndex ==3) {
|
||||
// [self.hospitalArray removeAllObjects];
|
||||
// [self NearbyHospitalData];
|
||||
// [self.addressView removeFromSuperview];
|
||||
// }
|
||||
// if (self.selecetIndex ==4) {
|
||||
// [self.AedArray removeAllObjects];
|
||||
// [self NearbyAEDEquipmentData];
|
||||
// [self.addressView removeFromSuperview];
|
||||
// }
|
||||
//
|
||||
// if (self.selecetIndex ==5) {
|
||||
// [self.AedArray removeAllObjects];
|
||||
// [self NearbySoSCarInf0Data];
|
||||
// [self.addressView removeFromSuperview];
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
#pragma mark:请求医疗点数据
|
||||
//- (void)NearbyHospitalData {
|
||||
//
|
||||
// NSUserDefaults * user = [NSUserDefaults standardUserDefaults];
|
||||
// CGFloat longitude = [[user objectForKey:USERDEFAULLONG] floatValue];
|
||||
// CGFloat latitude = [[user objectForKey:USERDEFAULLATITUDE] floatValue];
|
||||
//
|
||||
// NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
// [parmDic setObject:[NSString stringWithFormat:@"%f",longitude] forKey:@"longitude"];
|
||||
// [parmDic setObject:[NSString stringWithFormat:@"%f",latitude] forKey:@"latitude"];
|
||||
// [parmDic setObject:[NSString stringWithFormat:@"%d",100000] forKey:@"radiusRange"];
|
||||
// [parmDic setObject:@"" forKey:@"name"];
|
||||
// [parmDic setObject:@(5) forKey:@"resourceNum"];
|
||||
//
|
||||
// JKCQAPI * sosApi = [[JKCQAPI alloc] init:self tag:@"HOSPITALAPI" NeedToken:@""];
|
||||
// [sosApi getNearbyHomePageHospitalPoint:parmDic];
|
||||
//
|
||||
//}
|
||||
//#pragma mark:请求医疗点数据
|
||||
//- (void)NearbyAEDEquipmentData {
|
||||
//
|
||||
// NSUserDefaults * user = [NSUserDefaults standardUserDefaults];
|
||||
// CGFloat longitude = [[user objectForKey:USERDEFAULLONG] floatValue];
|
||||
// CGFloat latitude = [[user objectForKey:USERDEFAULLATITUDE] floatValue];
|
||||
//
|
||||
// NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
// [parmDic setObject:[NSString stringWithFormat:@"%f",longitude] forKey:@"longitude"];
|
||||
// [parmDic setObject:[NSString stringWithFormat:@"%f",latitude] forKey:@"latitude"];
|
||||
// [parmDic setObject:[NSString stringWithFormat:@"%d",100000] forKey:@"radiusRange"];
|
||||
// [parmDic setObject:@"" forKey:@"aedNum"];
|
||||
//
|
||||
// JKCQAPI * sosApi = [[JKCQAPI alloc] init:self tag:@"AEDEQAPI" NeedToken:@""];
|
||||
// [sosApi getNearbyAEDEquipmentqNumber:parmDic];
|
||||
//
|
||||
//}
|
||||
|
||||
//#pragma mark:请求救护车数据
|
||||
//- (void)NearbySoSCarInf0Data {
|
||||
//
|
||||
// NSUserDefaults * user = [NSUserDefaults standardUserDefaults];
|
||||
// CGFloat longitude = [[user objectForKey:USERDEFAULLONG] floatValue];
|
||||
// CGFloat latitude = [[user objectForKey:USERDEFAULLATITUDE] floatValue];
|
||||
//
|
||||
// NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
// [parmDic setObject:[NSString stringWithFormat:@"%f",longitude] forKey:@"longitude"];
|
||||
// [parmDic setObject:[NSString stringWithFormat:@"%f",latitude] forKey:@"latitude"];
|
||||
// [parmDic setObject:[NSString stringWithFormat:@"%d",100000] forKey:@"radiusRange"];
|
||||
//
|
||||
// JKCQAPI * sosApi = [[JKCQAPI alloc] init:self tag:@"SOSCARAPI" NeedToken:@""];
|
||||
// [sosApi getSoSCarInfoLocationHome:parmDic];
|
||||
//
|
||||
//}
|
||||
|
||||
|
||||
- (void)getResourceDataWithType:(NSString *)type
|
||||
Longitude:(CGFloat)longitude
|
||||
@@ -600,13 +613,8 @@
|
||||
NSMutableArray * poiAnnotations = [[NSMutableArray alloc] init];
|
||||
[self.mapView removeAnnotations:self.mapView.annotations];
|
||||
[self.ponisArray removeAllObjects];
|
||||
// 获取用户位置
|
||||
MAUserLocation *userLocation = self.mapView.userLocation;
|
||||
if (userLocation) {
|
||||
[self.ponisArray addObject:userLocation];
|
||||
}
|
||||
for (XJSOSResourcesModel * resourceModel in model.resources) {
|
||||
|
||||
for (XJSOSResourcesModel * resourceModel in model.resources) {
|
||||
MAPointAnnotation *pointAnnotation = [[MAPointAnnotation alloc] init];
|
||||
pointAnnotation.coordinate = CLLocationCoordinate2DMake(resourceModel.latitude, resourceModel.longitude);
|
||||
pointAnnotation.title = resourceModel.name;
|
||||
@@ -615,7 +623,25 @@
|
||||
[self addAnnotationToMapView:pointAnnotation];
|
||||
[self.ponisArray addObject:pointAnnotation];
|
||||
}
|
||||
|
||||
if (self.ponisArray.count == 1) {
|
||||
self.mapView.zoomLevel = 11;
|
||||
}
|
||||
|
||||
if (self.ponisArray.count == 0) {
|
||||
self.mapView.showsUserLocation = YES;
|
||||
self.mapView.userTrackingMode = MAUserTrackingModeFollow;
|
||||
self.mapView.zoomLevel = 13;
|
||||
} else {
|
||||
|
||||
UIEdgeInsets insets = UIEdgeInsetsMake(80, 50, 80, 50); // 增加边距让视野更广
|
||||
[self.mapView showAnnotations:self.ponisArray edgePadding:insets animated:YES];
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if ([tag isEqualToString:@"CALLAPI"]) {
|
||||
NSDictionary * dic = response;
|
||||
|
||||
@@ -623,6 +649,7 @@
|
||||
}
|
||||
if ([tag isEqualToString:@"GroupAPI"]) {
|
||||
NSDictionary * dic = response;
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
if ([ESCTUIManager TUIUserStatus] == false) {
|
||||
|
||||
@@ -645,7 +672,6 @@
|
||||
chatVC.navTitle = @"应急中心";
|
||||
chatVC.questionType = 1;
|
||||
[self.navigationController pushViewController:chatVC animated:YES];
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"loginIMAPI"]) {
|
||||
@@ -661,92 +687,6 @@
|
||||
[self callSoSAction];
|
||||
}
|
||||
|
||||
// if([tag isEqualToString:@"HOSPITALAPI"]) {
|
||||
//
|
||||
// NSArray * responseArray = response;
|
||||
//
|
||||
// NSMutableArray * poiAnnotations = [[NSMutableArray alloc] init];
|
||||
// [self.mapView removeAnnotations:self.mapView.annotations];
|
||||
// [self.ponisArray removeAllObjects];
|
||||
// // 获取用户位置
|
||||
// MAUserLocation *userLocation = self.mapView.userLocation;
|
||||
// if (userLocation) {
|
||||
// [self.ponisArray addObject:userLocation];
|
||||
// }
|
||||
// for (NSDictionary * dic in responseArray) {
|
||||
//
|
||||
// XJHealthInterveneHomeModel * hospitalModel = [XJHealthInterveneHomeModel modelWithDictionary:dic];
|
||||
// [self.hospitalArray addObject:hospitalModel];
|
||||
//
|
||||
// MAPointAnnotation *pointAnnotation = [[MAPointAnnotation alloc] init];
|
||||
// pointAnnotation.coordinate = CLLocationCoordinate2DMake(hospitalModel.latitude, hospitalModel.longitude);
|
||||
// pointAnnotation.title = hospitalModel.name;
|
||||
// pointAnnotation.subtitle = hospitalModel.address;
|
||||
// [poiAnnotations addObject:pointAnnotation];
|
||||
// [self addAnnotationToMapView:pointAnnotation];
|
||||
// [self.ponisArray addObject:pointAnnotation];
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
// if ([tag isEqualToString:@"AEDEQAPI"]) {
|
||||
//
|
||||
// NSArray * responseArray = response;
|
||||
//
|
||||
// NSMutableArray * poiAnnotations = [[NSMutableArray alloc] init];
|
||||
// [self.mapView removeAnnotations:self.mapView.annotations];
|
||||
// [self.ponisArray removeAllObjects];
|
||||
// // 获取用户位置
|
||||
// MAUserLocation *userLocation = self.mapView.userLocation;
|
||||
// if (userLocation) {
|
||||
// [self.ponisArray addObject:userLocation];
|
||||
// }
|
||||
//
|
||||
// for (NSDictionary * dic in responseArray) {
|
||||
//
|
||||
// XJAEDNetWrokModel * aedModel = [XJAEDNetWrokModel modelWithDictionary:dic];
|
||||
// [self.AedArray addObject:aedModel];
|
||||
//
|
||||
// MAPointAnnotation *pointAnnotation = [[MAPointAnnotation alloc] init];
|
||||
// pointAnnotation.coordinate = CLLocationCoordinate2DMake(aedModel.latitude, aedModel.longitude);
|
||||
// pointAnnotation.title = aedModel.name;
|
||||
// pointAnnotation.subtitle = aedModel.installAddress;
|
||||
// [poiAnnotations addObject:pointAnnotation];
|
||||
// [self addAnnotationToMapView:pointAnnotation];
|
||||
// [self.ponisArray addObject:pointAnnotation];
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// if ([tag isEqualToString:@"SOSCARAPI"]) {
|
||||
//
|
||||
// NSArray * responseArray = response;
|
||||
//
|
||||
// NSMutableArray * poiAnnotations = [[NSMutableArray alloc] init];
|
||||
// [self.mapView removeAnnotations:self.mapView.annotations];
|
||||
// [self.ponisArray removeAllObjects];
|
||||
// // 获取用户位置
|
||||
// MAUserLocation *userLocation = self.mapView.userLocation;
|
||||
// if (userLocation) {
|
||||
// [self.ponisArray addObject:userLocation];
|
||||
// }
|
||||
//
|
||||
// for (NSDictionary * dic in responseArray) {
|
||||
//
|
||||
// XJSOSResourcesModel * aedModel = [XJSOSResourcesModel modelWithDictionary:dic];
|
||||
// [self.carArray addObject:aedModel];
|
||||
//
|
||||
// MAPointAnnotation *pointAnnotation = [[MAPointAnnotation alloc] init];
|
||||
// pointAnnotation.coordinate = CLLocationCoordinate2DMake(aedModel.latitude, aedModel.longitude);
|
||||
// pointAnnotation.title = aedModel.departCode;
|
||||
// pointAnnotation.subtitle = aedModel.licensePlateNumber;
|
||||
// [poiAnnotations addObject:pointAnnotation];
|
||||
// [self addAnnotationToMapView:pointAnnotation];
|
||||
// [self.ponisArray addObject:pointAnnotation];
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
//
|
||||
|
||||
|
||||
}
|
||||
@@ -760,7 +700,6 @@
|
||||
|
||||
- (MAAnnotationView *)mapView:(MAMapView *)mapView viewForAnnotation:(id<MAAnnotation>)annotation
|
||||
{
|
||||
[self.mapView showAnnotations:self.ponisArray edgePadding:UIEdgeInsetsMake(100, 100, 100, 100) animated:YES];
|
||||
//用户当前位置大头针
|
||||
if ([annotation isKindOfClass:[MAUserLocation class]])
|
||||
{
|
||||
@@ -789,54 +728,7 @@
|
||||
annotationView = [[MAAnnotationView alloc] initWithAnnotation:annotation
|
||||
reuseIdentifier:reuseIndetifier];
|
||||
}
|
||||
// if (self.selecetIndex == 0) {
|
||||
//
|
||||
// for (XJHealthInterveneHomeModel * hospitalModel in self.hospitalArray) {
|
||||
//
|
||||
// if (annotation.coordinate.longitude == hospitalModel.longitude && annotation.coordinate.latitude == hospitalModel.latitude) {
|
||||
// annotationView.image = [UIImage imageNamed:@"medicalAnnitation"];
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // 使用动画效果将点显示在屏幕内
|
||||
// [annotationView setSelected:false animated:YES];
|
||||
// //设置中心点偏移,使得标注底部中间点成为经纬度对应点
|
||||
// annotationView.centerOffset = CGPointMake(0, -18);
|
||||
// return annotationView;
|
||||
// }
|
||||
// if (self.selecetIndex == 3) {
|
||||
//
|
||||
// for (XJAEDNetWrokModel * aedModel in self.AedArray) {
|
||||
//
|
||||
// if (annotation.coordinate.longitude == aedModel.longitude && annotation.coordinate.latitude == aedModel.latitude) {
|
||||
// annotationView.image = [UIImage imageNamed:@"AEDIcon"];
|
||||
// }
|
||||
// }
|
||||
// // 使用动画效果将点显示在屏幕内
|
||||
// [annotationView setSelected:false animated:YES];
|
||||
// //设置中心点偏移,使得标注底部中间点成为经纬度对应点
|
||||
// annotationView.centerOffset = CGPointMake(0, -18);
|
||||
// return annotationView;
|
||||
//
|
||||
// }
|
||||
// //救护车
|
||||
// if (self.selecetIndex == 5) {
|
||||
//
|
||||
// for (XJSOSResourcesModel * aedModel in self.carArray) {
|
||||
//
|
||||
// if (annotation.coordinate.longitude == aedModel.longitude && annotation.coordinate.latitude == aedModel.latitude) {
|
||||
// annotationView.image = [UIImage imageNamed:@"sosCard"];
|
||||
// }
|
||||
// }
|
||||
// // 使用动画效果将点显示在屏幕内
|
||||
// [annotationView setSelected:false animated:YES];
|
||||
// //设置中心点偏移,使得标注底部中间点成为经纬度对应点
|
||||
// annotationView.centerOffset = CGPointMake(0, -18);
|
||||
// return annotationView;
|
||||
//
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
||||
for (XJSOSResourcesModel * resourceModel in self.model.resources) {
|
||||
|
||||
if (annotation.coordinate.longitude == resourceModel.longitude && annotation.coordinate.latitude == resourceModel.latitude) {
|
||||
@@ -864,13 +756,11 @@
|
||||
// 使用动画效果将点显示在屏幕内
|
||||
[annotationView setSelected:false animated:YES];
|
||||
//设置中心点偏移,使得标注底部中间点成为经纬度对应点
|
||||
annotationView.centerOffset = CGPointMake(0, -18);
|
||||
|
||||
annotationView.centerOffset = CGPointMake(0, -10);
|
||||
[self.mapView showAnnotations:self.mapView.annotations edgePadding:UIEdgeInsetsMake(100, 100, 100, 100) animated:YES];
|
||||
return annotationView;
|
||||
}
|
||||
|
||||
|
||||
// }
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -880,73 +770,6 @@
|
||||
self.grapView.hidden = true;
|
||||
|
||||
|
||||
if (self.selecetIndex == 3) { //医疗点
|
||||
|
||||
for (XJHealthInterveneHomeModel * hospitalModel in self.hospitalArray) {
|
||||
|
||||
if (view.annotation.coordinate.longitude == hospitalModel.longitude && view.annotation.coordinate.latitude == hospitalModel.latitude) {
|
||||
|
||||
XJSOSResourcesModel * resourceModel = [[XJSOSResourcesModel alloc] init];
|
||||
|
||||
resourceModel.address = hospitalModel.address;
|
||||
resourceModel.name = hospitalModel.name;
|
||||
resourceModel.mobile = hospitalModel.mobile;
|
||||
resourceModel.latitude = hospitalModel.latitude;
|
||||
resourceModel.longitude = hospitalModel.longitude;
|
||||
|
||||
self.addressView.resourceModel = resourceModel;
|
||||
self.resourceModel = resourceModel;
|
||||
[self.mapView addSubview:self.addressView];
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
}
|
||||
if (self.selecetIndex == 4) { //aed
|
||||
|
||||
for (XJAEDNetWrokModel * aedModel in self.AedArray) {
|
||||
|
||||
if (view.annotation.coordinate.longitude == aedModel.longitude && view.annotation.coordinate.latitude == aedModel.latitude) {
|
||||
|
||||
XJHealthInterveneAEDModel * subAedModel = [[XJHealthInterveneAEDModel alloc] init];
|
||||
|
||||
subAedModel.resourceAddress = aedModel.installAddress;
|
||||
subAedModel.resourceName = aedModel.name;
|
||||
subAedModel.principalPhone = aedModel.chargeFirstMobile;
|
||||
self.addressView.aedModel = subAedModel;
|
||||
|
||||
XJSOSResourcesModel * resourceModel = [[XJSOSResourcesModel alloc] init];
|
||||
resourceModel.address = aedModel.installAddress;
|
||||
resourceModel.name = aedModel.name;
|
||||
resourceModel.mobile = aedModel.chargeFirstMobile;
|
||||
resourceModel.latitude = aedModel.latitude;
|
||||
resourceModel.longitude = aedModel.longitude;
|
||||
self.resourceModel = resourceModel;
|
||||
[self.mapView addSubview:self.addressView];
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
}
|
||||
if (self.selecetIndex == 5) {
|
||||
|
||||
for (XJSOSResourcesModel * aedModel in self.carArray) {
|
||||
|
||||
if (view.annotation.coordinate.longitude == aedModel.longitude && view.annotation.coordinate.latitude == aedModel.latitude) {
|
||||
|
||||
XJSOSResourcesModel * resourceModel = [[XJSOSResourcesModel alloc] init];
|
||||
resourceModel.address = aedModel.licensePlateNumber;
|
||||
resourceModel.name = aedModel.departCode;
|
||||
resourceModel.latitude = aedModel.latitude;
|
||||
resourceModel.longitude = aedModel.longitude;
|
||||
self.resourceModel = resourceModel;
|
||||
self.addressView.resourceModel = resourceModel;
|
||||
[self.mapView addSubview:self.addressView];
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
}
|
||||
for (XJSOSResourcesModel * resourceModel in self.model.resources) {
|
||||
|
||||
|
||||
@@ -954,7 +777,14 @@
|
||||
|
||||
self.addressView.resourceModel = resourceModel;
|
||||
self.resourceModel = resourceModel;
|
||||
self.addressView.hidden = false;
|
||||
|
||||
[self.mapView addSubview:self.addressView];
|
||||
|
||||
[ self.addressView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.equalTo(self.view).insets(UIEdgeInsetsMake(0, 20, 0, 20));
|
||||
make.bottom.mas_offset(- 20);
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic, copy) NSString * licensePlateNumber;
|
||||
|
||||
@property (nonatomic, copy) NSString * departCode;
|
||||
@property (nonatomic, copy) NSString * level_dictText;
|
||||
|
||||
|
||||
@property (nonatomic, copy) NSString * driverName;
|
||||
|
||||
@@ -6,14 +6,16 @@
|
||||
//
|
||||
|
||||
#import "XJSOSAddressView.h"
|
||||
#import "PaddingLabel.h"
|
||||
|
||||
|
||||
@interface XJSOSAddressView ()
|
||||
|
||||
@property (nonatomic, strong) UILabel * lvLabel;
|
||||
@property (nonatomic, strong) PaddingLabel * lvLabel;
|
||||
@property (nonatomic, strong) UILabel * hospitalName;
|
||||
@property (nonatomic, strong) UILabel * phoneLabel;
|
||||
@property (nonatomic, strong) UILabel * addressLabel;
|
||||
@property (nonatomic, strong) UIButton * samllPhoneBtn;
|
||||
|
||||
|
||||
@end
|
||||
@@ -42,8 +44,9 @@
|
||||
|
||||
self.layer.cornerRadius = 10;
|
||||
self.layer.masksToBounds = true;
|
||||
self.lvLabel = [[UILabel alloc] init];
|
||||
self.lvLabel = [[PaddingLabel alloc] init];
|
||||
self.lvLabel.layer.cornerRadius = 3.0f;
|
||||
self.lvLabel.textInsets = UIEdgeInsetsMake(0, 6, 0, 6); // 上下0,左右6
|
||||
self.lvLabel.layer.masksToBounds = true;
|
||||
self.lvLabel.text = @"--";
|
||||
self.lvLabel.textColor = KWhiteColor;
|
||||
@@ -55,11 +58,11 @@
|
||||
|
||||
[self.lvLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(kRealValue(18));
|
||||
make.width.mas_offset(60);
|
||||
make.top.mas_offset(20);
|
||||
make.height.mas_offset(16);
|
||||
|
||||
}];
|
||||
[self.lvLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
|
||||
self.hospitalName = [[UILabel alloc] init];
|
||||
self.hospitalName.text = @"--";
|
||||
@@ -86,8 +89,8 @@
|
||||
[self.phoneLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(kRealValue(15));
|
||||
make.right.mas_offset(-30);
|
||||
make.top.mas_equalTo(self.lvLabel.mas_bottom).offset(12);
|
||||
make.height.mas_offset(15);
|
||||
make.top.mas_equalTo(self.lvLabel.mas_bottom).offset(11);
|
||||
make.height.mas_offset(13);
|
||||
|
||||
}];
|
||||
|
||||
@@ -95,14 +98,16 @@
|
||||
self.addressLabel = [[UILabel alloc] init];
|
||||
self.addressLabel.text = @"--km | ---";
|
||||
self.addressLabel.font = MEDIUMFONT(13);
|
||||
self.addressLabel.numberOfLines = 0;
|
||||
self.addressLabel.textColor = UIColorHex(#999999);
|
||||
|
||||
[self addSubview:self.addressLabel];
|
||||
|
||||
[self.addressLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(kRealValue(18));
|
||||
make.right.mas_offset(kRealValue(-15));
|
||||
make.top.mas_equalTo(self.phoneLabel.mas_bottom).offset(10);
|
||||
make.bottom.mas_offset(-10);
|
||||
make.top.mas_equalTo(self.phoneLabel.mas_bottom).offset(11);
|
||||
make.bottom.mas_offset(-26);
|
||||
}];
|
||||
|
||||
[self.addressLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
@@ -133,6 +138,7 @@
|
||||
UIButton * samllPhoneBtn = [[UIButton alloc] init];
|
||||
[samllPhoneBtn setImage:IMAGE_NAMED(@"address_phone") forState:UIControlStateNormal];
|
||||
[samllPhoneBtn addTarget:self action:@selector(LocationPhoneView) forControlEvents:UIControlEventTouchUpInside];
|
||||
self.samllPhoneBtn = samllPhoneBtn;
|
||||
[self addSubview:samllPhoneBtn];
|
||||
|
||||
[samllPhoneBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -140,13 +146,15 @@
|
||||
make.top.mas_equalTo(self.hospitalName.mas_bottom).offset(4);
|
||||
make.width.height.mas_offset(26);
|
||||
}];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)setResourceModel:(XJSOSResourcesModel *)resourceModel {
|
||||
_resourceModel = resourceModel;
|
||||
if ( !ValidStr(_resourceModel.level) ) {
|
||||
if ( !ValidStr(_resourceModel.level_dictText) ) {
|
||||
self.lvLabel.hidden = false;
|
||||
self.lvLabel.text = _resourceModel.level;
|
||||
self.lvLabel.text = _resourceModel.level_dictText;
|
||||
[self.hospitalName mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.lvLabel.mas_right).offset(10);
|
||||
make.right.mas_offset(-30);
|
||||
@@ -164,9 +172,30 @@
|
||||
|
||||
}];
|
||||
}
|
||||
self.addressLabel.text = _resourceModel.address;
|
||||
self.addressLabel.text = [NSString stringWithFormat:@"%@",_resourceModel.address];
|
||||
self.hospitalName.text = _resourceModel.name;
|
||||
self.phoneLabel.text = _resourceModel.mobile;
|
||||
if (!ValidStr(_resourceModel.mobile)) {
|
||||
self.phoneLabel.text = _resourceModel.mobile;
|
||||
self.samllPhoneBtn.hidden = false;
|
||||
[self.addressLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(kRealValue(18));
|
||||
make.right.mas_offset(kRealValue(-15));
|
||||
make.top.mas_equalTo(self.phoneLabel.mas_bottom).offset(11);
|
||||
make.bottom.mas_offset(-25);
|
||||
}];
|
||||
}else
|
||||
{
|
||||
self.phoneLabel.text = @"";
|
||||
self.samllPhoneBtn.hidden = true;
|
||||
|
||||
[self.addressLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(kRealValue(18));
|
||||
make.right.mas_offset(kRealValue(-15));
|
||||
make.top.mas_equalTo(self.hospitalName.mas_bottom).offset(11);
|
||||
make.bottom.mas_offset(-25);
|
||||
}];
|
||||
|
||||
}
|
||||
}
|
||||
- (void)setAedModel:(XJHealthInterveneAEDModel *)aedModel {
|
||||
|
||||
@@ -180,8 +209,14 @@
|
||||
}];
|
||||
self.addressLabel.text = [NSString stringWithFormat:@"%.2f | %@",_aedModel.distance / 1000.0, _aedModel.resourceAddress] ;
|
||||
self.hospitalName.text = _aedModel.resourceName;
|
||||
self.phoneLabel.text = _aedModel.principalPhone;
|
||||
|
||||
if (!ValidStr(_aedModel.principalPhone)) {
|
||||
self.phoneLabel.text = _aedModel.principalPhone;
|
||||
self.samllPhoneBtn.hidden = false;
|
||||
}else
|
||||
{
|
||||
self.phoneLabel.text = @"";
|
||||
self.samllPhoneBtn.hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)navLocationView {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#import "EndSystemSoSCell.h"
|
||||
#import "DoctorIDCardMessageCell.h"
|
||||
#import "healthDataCustomCell.h"
|
||||
#import "ExpertMainViewController.h"
|
||||
#import "XJExpertMainViewController.h"
|
||||
#import "SendHealthDataViewController.h"
|
||||
#import "CurrentLocationViewController.h"
|
||||
#import "TUITextMessageCellData.h"
|
||||
@@ -71,8 +71,8 @@
|
||||
self.title = self.navTitle;
|
||||
// self 为 id<V2TIMSignalingListener>
|
||||
self.view.backgroundColor = CViewBgColor;
|
||||
|
||||
[self addNavigationItemWithImageNames:@[@"sangedian"] isLeft:false target:self action:@selector(foundMoreHistory) tags:@[@"1000"]];
|
||||
//聊天记录
|
||||
// [self addNavigationItemWithImageNames:@[@"sangedian"] isLeft:false target:self action:@selector(foundMoreHistory) tags:@[@"1000"]];
|
||||
// 启用侧滑返回手势
|
||||
// self.navigationController.interactivePopGestureRecognizer.delegate = self;
|
||||
// self.navigationController.interactivePopGestureRecognizer.enabled = YES;
|
||||
@@ -108,7 +108,7 @@
|
||||
// TUIChatConfig.defaultConfig.enableTextTranslation = YES;
|
||||
//不显示视频和语音
|
||||
[TUIChatConfig defaultConfig].enableVideoCall = self.isVideo; // YES:开启,NO:关闭
|
||||
[TUIChatConfig defaultConfig].enableAudioCall = self.isVideo; // YES:开启,NO:关闭
|
||||
[TUIChatConfig defaultConfig].enableAudioCall = NO; // YES:开启,NO:关闭
|
||||
[TUIChatConfig defaultConfig].backgroudColor = CViewBgColor;
|
||||
|
||||
//是否显示发送报告
|
||||
@@ -241,13 +241,13 @@
|
||||
// self.backgroundView.hidden = NO;
|
||||
// }
|
||||
}
|
||||
#pragma mark:医生详情
|
||||
#pragma mark:医生详情 //头像点击
|
||||
- (void)chatSelectedHeardImg:(TUIMessageCell *)cell {
|
||||
if (!cell.messageData.innerMessage.isSelf)
|
||||
{
|
||||
NSString * userID = cell.messageData.innerMessage.sender;
|
||||
self.userID = userID;
|
||||
[self getIsSmallHelp:userID];
|
||||
// NSString * userID = cell.messageData.innerMessage.sender;
|
||||
// self.userID = userID;
|
||||
// [self getIsSmallHelp:userID];
|
||||
|
||||
}
|
||||
|
||||
@@ -297,6 +297,11 @@
|
||||
////1 应急 2 图文咨询 3 音视频咨询 小助手
|
||||
if (self.questionType == 1) {
|
||||
|
||||
[self showMBProgressHUDWithString:@"正在结束本次应急" autoHidden:false];
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject:self.sosEnd_id forKey:@"id"];
|
||||
JKCQAPI * endApi = [[JKCQAPI alloc] init:self tag:@"ENDSOSAPI" NeedToken:@""];
|
||||
[endApi PostEndSoSIMQuestion:parmDic];
|
||||
}
|
||||
if (self.questionType == 2) {
|
||||
[self showMBProgressHUDWithString:@"正在结束本次会话" autoHidden:false];
|
||||
@@ -428,7 +433,7 @@
|
||||
|
||||
if ([cell isKindOfClass:EndSystemSoSCell.class]) {
|
||||
EndSystemSoSCell * endCell = cell;
|
||||
if (endCell.reviewBtn.hidden == false) {
|
||||
if (endCell.reviewBtn.hidden == false && [TUIChatConfig defaultConfig].isEvealCell == false ) {
|
||||
evaluationPopView * popView = [[evaluationPopView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
|
||||
self.popView = popView;
|
||||
popView.popBlock = ^(CGFloat starNumber, BOOL isSecrect, NSString * _Nonnull evaluationString) {
|
||||
@@ -510,7 +515,7 @@
|
||||
NSString * isExpired =[NSString stringWithFormat:@"%@",response] ;
|
||||
|
||||
if ([isExpired integerValue]== 0) {
|
||||
ExpertMainViewController * experVC= [[ExpertMainViewController alloc] init];
|
||||
XJExpertMainViewController * experVC= [[XJExpertMainViewController alloc] init];
|
||||
experVC.doctorId = self.doctorCardID;
|
||||
[self.navigationController pushViewController:experVC animated:YES];
|
||||
}else
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
// size.width += 20;
|
||||
// return size;
|
||||
|
||||
CGFloat textMaxWidth = 245.f;
|
||||
CGFloat textMaxWidth = 260.f;
|
||||
|
||||
CGSize size = CGSizeMake(textMaxWidth, 106);
|
||||
return size;
|
||||
|
||||
@@ -35,25 +35,29 @@
|
||||
self.container.layer.cornerRadius = 10;
|
||||
self.container.backgroundColor = KWhiteColor;
|
||||
self.doctorImg = [[UIImageView alloc] init];
|
||||
self.doctorImg.layer.masksToBounds = true;
|
||||
self.doctorImg.layer.cornerRadius = 10;
|
||||
[self.container addSubview:self.doctorImg];
|
||||
|
||||
self.doctorNameLabel = [[UILabel alloc] init];
|
||||
self.doctorNameLabel.text = @"张医生";
|
||||
self.doctorNameLabel.text = @"--";
|
||||
self.doctorNameLabel.font = SYSTEMFONT(14);
|
||||
self.doctorNameLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.doctorNameLabel.textColor = UIColorHex(#333333);
|
||||
[self.container addSubview:self.doctorNameLabel];
|
||||
|
||||
self.jobLabel = [[UILabel alloc] init];
|
||||
self.jobLabel.text = @"张医生";
|
||||
self.jobLabel.font = SYSTEMFONT(14);
|
||||
self.jobLabel.text = @"--";
|
||||
self.jobLabel.font = SYSTEMFONT(13);
|
||||
self.jobLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.jobLabel.textColor = UIColorHex(#666666);
|
||||
[self.container addSubview:self.jobLabel];
|
||||
|
||||
self.hospatilLabel = [[UILabel alloc] init];
|
||||
self.hospatilLabel.text = @"西京医院 - 消化科";
|
||||
self.hospatilLabel.font = SYSTEMFONT(14);
|
||||
self.hospatilLabel.text = @"--";
|
||||
self.hospatilLabel.font = SYSTEMFONT(13);
|
||||
self.hospatilLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.hospatilLabel.numberOfLines = 2;
|
||||
[self.container addSubview:self.hospatilLabel];
|
||||
|
||||
self.bottomLabel = [[UILabel alloc] init];
|
||||
@@ -69,7 +73,9 @@
|
||||
|
||||
[super fillWithData:data];
|
||||
self.doctorNameLabel.text = data.doctorName;
|
||||
self.jobLabel.text = data.doctorTitle;
|
||||
if(!ValidStr(data.doctorTitle)){
|
||||
self.jobLabel.text = [NSString stringWithFormat:@"(%@)", data.doctorTitle];
|
||||
}
|
||||
// self.messageData = data.timestamp;
|
||||
if (ValidStr(data.departmentName)) {
|
||||
|
||||
@@ -116,9 +122,9 @@
|
||||
|
||||
self.doctorImg.frame = CGRectMake(14, 18, 50, 50);
|
||||
self.doctorNameLabel.frame = CGRectMake(self.doctorImg.right + 14, 18, w, 20);
|
||||
self.jobLabel.frame = CGRectMake(self.doctorNameLabel.right + 2, 18, self.container.width - 80, 20);
|
||||
self.jobLabel.frame = CGRectMake(self.doctorNameLabel.right + 2, 18, self.container.width - 2 - w, 20);
|
||||
|
||||
self.hospatilLabel.frame = CGRectMake(self.doctorNameLabel.left, self.doctorNameLabel.bottom + 10, self.container.width - 80, 20);
|
||||
self.hospatilLabel.frame = CGRectMake(self.doctorNameLabel.left, self.doctorNameLabel.bottom, self.container.width - 80, 40);
|
||||
|
||||
UIView * linv = [[UIView alloc] initWithFrame:CGRectMake(10, self.doctorImg.bottom + 10, self.container.width, 1)];
|
||||
linv.backgroundColor = UIColorHex(#EFEFEF);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "健康油我 1.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
@@ -12,6 +13,7 @@
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "健康油我.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
@@ -23,6 +25,7 @@
|
||||
"value" : "tinted"
|
||||
}
|
||||
],
|
||||
"filename" : "健康油我 2.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
|
||||
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 588 B |
|
Before Width: | Height: | Size: 967 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
@@ -1,17 +1,15 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "tabbar_homepage_normal_icon.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "tabbar_homepage_normal_icon@2x.png",
|
||||
"filename" : "20250703-134619.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "tabbar_homepage_normal_icon@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "decrease@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 296 B |
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "gpsStat1@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 489 B |
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "increase@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 317 B |
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "mineTabBar_nomal.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "mineTabBar_nomal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mineTabBar_nomal@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 949 B |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "mineTabBar_selected.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "mineTabBar_selected@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mineTabBar_selected@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "monitoringTabbar_nomal.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "monitoringTabbar_nomal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "monitoringTabbar_nomal@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1019 B |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "monitoringTabbar_selected.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "monitoringTabbar_selected@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "monitoringTabbar_selected@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "questionTabBar_nomal.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "questionTabBar_nomal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "questionTabBar_nomal@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 998 B |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "questionTabBar_selected.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "questionTabBar_selected@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "questionTabBar_selected@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "sosCenterTabar_nomal.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "sosCenterTabar_nomal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "sosCenterTabar_nomal@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 992 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "sosCenterTabar_selected.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "sosCenterTabar_selected@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "sosCenterTabar_selected@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.1 KiB |