修改应急中心

This commit is contained in:
History
2025-09-26 13:47:44 +08:00
parent 0ffc7ba2b2
commit b2d90a7c81
8 changed files with 98 additions and 48 deletions
@@ -82,12 +82,18 @@
//#define IntervenH5 @"https://starry.out.icdat.cn" //#define IntervenH5 @"https://starry.out.icdat.cn"
//开发环境地址 //开发环境地址
#define Http @"https://xjgateway.mcrm.vip:8888"// //#define Http @"https://xjgateway.mcrm.vip:8888"//
#define H5DevHost @"xjgateway.mcrm.vip:8888"// //#define H5DevHost @"xjgateway.mcrm.vip:8888"//
#define IntervenH5 @"https://xjconsole.mcrm.vip:8888" //#define IntervenH5 @"https://xjconsole.mcrm.vip:8888"
//#define BASEURL @"https://yyjk.cqygjk.com" //北边接口前缀
//#define SCHEME @"https" //
#define Http @"http://192.168.1.23"//
//#define Http @"https://api.xjygjk.com"//
#define H5DevHost @"api.xjygjk.com"//
#define IntervenH5 @"https://console.xjygjk.com"
#define BASEURL @"https://yyjk.cqygjk.com" //北边接口前缀 #define BASEURL @"https://yyjk.cqygjk.com" //北边接口前缀
#define SCHEME @"https" // #define SCHEME @"https" //
#endif /* StatusMacros_h */ #endif /* StatusMacros_h */
@@ -217,13 +217,16 @@
#pragma mark:网络请求 #pragma mark:网络请求
- (void)Failed:(NSString*)message tag:(NSString*)tag - (void)Failed:(NSString*)message tag:(NSString*)tag
{ {
[self.homeTable.mj_header endRefreshing];
[self.homeTable.mj_footer endRefreshing];
[EasyTextView showErrorText:message]; [EasyTextView showErrorText:message];
[self hiddenAllMBProgressHUD]; [self hiddenAllMBProgressHUD];
} }
- (void)Sucess:(id)response tag:(NSString*)tag - (void)Sucess:(id)response tag:(NSString*)tag
{ {
[self.homeTable.mj_header endRefreshing];
[self.homeTable.mj_footer endRefreshing];
if ([tag isEqualToString:@"QUSTIONAPI"]) if ([tag isEqualToString:@"QUSTIONAPI"])
{ {
@@ -56,7 +56,7 @@
[centerView addSubview:readButton]; [centerView addSubview:readButton];
// cv战士 // cv战士
UIButton * monthButton = [[UIButton alloc] initWithFrame:CGRectMake(10, readButton.top - 37 -15, 150, 15)]; UIButton * monthButton = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(15) + 10, readButton.top - 37 -15, 150, 15)];
[monthButton setTitle:@" 1个月内不在提醒" forState:UIControlStateNormal]; [monthButton setTitle:@" 1个月内不在提醒" forState:UIControlStateNormal];
monthButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; monthButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
[monthButton setTitleColor:UIColorHex(#333333) forState:UIControlStateNormal]; [monthButton setTitleColor:UIColorHex(#333333) forState:UIControlStateNormal];
@@ -68,7 +68,7 @@
[centerView addSubview:monthButton]; [centerView addSubview:monthButton];
UIButton * dayButton = [[UIButton alloc] initWithFrame:CGRectMake(10, monthButton.top - 13 -15, 150, 15)]; UIButton * dayButton = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(15) + 10, monthButton.top - 13 -15, 150, 15)];
[dayButton setTitle:@" 7日内不在提醒" forState:UIControlStateNormal]; [dayButton setTitle:@" 7日内不在提醒" forState:UIControlStateNormal];
dayButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; dayButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
[dayButton setTitleColor:UIColorHex(#333333) forState:UIControlStateNormal]; [dayButton setTitleColor:UIColorHex(#333333) forState:UIControlStateNormal];
@@ -81,7 +81,7 @@
[centerView addSubview:dayButton]; [centerView addSubview:dayButton];
UIButton * yihouButton = [[UIButton alloc] initWithFrame:CGRectMake(10, dayButton.top - 13 -15, 150, 15)]; UIButton * yihouButton = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(15) + 10, dayButton.top - 13 -15, 150, 15)];
[yihouButton setTitle:@" 以后不在提醒" forState:UIControlStateNormal]; [yihouButton setTitle:@" 以后不在提醒" forState:UIControlStateNormal];
yihouButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; yihouButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
[yihouButton setTitleColor:UIColorHex(#333333) forState:UIControlStateNormal]; [yihouButton setTitleColor:UIColorHex(#333333) forState:UIControlStateNormal];
@@ -94,7 +94,7 @@
self.mainScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, kScreenWidth - kRealValue(30), yihouButton.top - 30)]; self.mainScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, centerView.width - kRealValue(30), yihouButton.top - 30)];
[centerView addSubview:self.mainScrollView]; [centerView addSubview:self.mainScrollView];
@@ -460,10 +460,10 @@
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
//请求超时 //请求超时
[[NSUserDefaults standardUserDefaults] setObject:@"https://api.cqygjk.com" forKey:@"HTTPS"]; [[NSUserDefaults standardUserDefaults] setObject:@"https://xjapi.icdat.cn" forKey:@"HTTPS"];
[[NSUserDefaults standardUserDefaults] setObject:@"https://yyjk.cqygjk.com/" forKey:@"BASEURL"]; [[NSUserDefaults standardUserDefaults] setObject:@"https://yyjk.cqygjk.com/" forKey:@"BASEURL"];
[[NSUserDefaults standardUserDefaults] setObject:@"api.cqygjk.com" forKey:@"IntervenH5"]; [[NSUserDefaults standardUserDefaults] setObject:@"xjconsole.icdat.cn/" forKey:@"IntervenH5"];
[[NSUserDefaults standardUserDefaults] setObject:@"https://api.cqygjk.com" forKey:@"H5DevHost"]; [[NSUserDefaults standardUserDefaults] setObject:@"https://api.xjygjk.com" forKey:@"H5DevHost"];
[[NSUserDefaults standardUserDefaults] synchronize]; [[NSUserDefaults standardUserDefaults] synchronize];
}]; }];
@@ -579,19 +579,20 @@
} }
} }
if ([tag isEqualToString:@"xuzhi_0"]) { if ([tag isEqualToString:@"xuzhi_0"]) { //音视频
[self hiddenAllMBProgressHUD];
NSDictionary * parmDic = response;
if (ValidDict(parmDic)) {
self.PictureknowDic = parmDic;
}
}
if ([tag isEqualToString:@"xuzhi_1"]) {
[self hiddenAllMBProgressHUD]; [self hiddenAllMBProgressHUD];
NSDictionary * parmDic = response; NSDictionary * parmDic = response;
if (ValidDict(parmDic)) { if (ValidDict(parmDic)) {
self.AudioknowDic = parmDic; self.AudioknowDic = parmDic;
}
}
if ([tag isEqualToString:@"xuzhi_1"]) { //图文
[self hiddenAllMBProgressHUD];
NSDictionary * parmDic = response;
if (ValidDict(parmDic)) {
self.PictureknowDic = parmDic;
} }
} }
} }
@@ -96,10 +96,11 @@
[self.namelabel mas_makeConstraints:^(MASConstraintMaker *make) { [self.namelabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.doctorImg.mas_right).offset(15); make.left.mas_equalTo(self.doctorImg.mas_right).offset(15);
make.top.mas_offset(22); make.top.mas_offset(24);
make.height.mas_offset(15); make.height.mas_offset(15);
}]; }];
[self.namelabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; [self.namelabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
[self.namelabel.widthAnchor constraintLessThanOrEqualToConstant:175].active = YES;
//类型判断 //类型判断
@@ -110,8 +111,8 @@
[self.backView addSubview:self.typeView]; [self.backView addSubview:self.typeView];
[self.typeView mas_makeConstraints:^(MASConstraintMaker *make) { [self.typeView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.namelabel.mas_right).offset(10); make.left.mas_equalTo(self.namelabel.mas_right).offset(5);
make.top.mas_offset(20); make.top.mas_offset(24);
make.height.mas_offset(18); make.height.mas_offset(18);
make.width.mas_offset(67); make.width.mas_offset(67);
}]; }];
@@ -137,7 +138,8 @@
[self.questionStatusBtn mas_makeConstraints:^(MASConstraintMaker *make) { [self.questionStatusBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_offset(61); make.width.mas_offset(61);
make.height.mas_offset(26); make.height.mas_offset(26);
make.right.top.mas_offset(2); make.right.mas_offset(2);
make.top.mas_offset(0);
}]; }];
@@ -58,7 +58,7 @@
// //
//@property (strong, nonatomic) NSMutableArray * AedArray; //@property (strong, nonatomic) NSMutableArray * AedArray;
// //
//@property (strong, nonatomic) NSMutableArray * carArray; @property (strong, nonatomic) NSMutableArray * modelArray;
@end @end
@@ -93,6 +93,16 @@
// //
//} //}
- (NSMutableArray *)modelArray {
if (!_modelArray) {
_modelArray = [[NSMutableArray alloc] init];
}
return _modelArray;
}
- (NSMutableArray *)titlesArray { - (NSMutableArray *)titlesArray {
if (!_titlesArray) { if (!_titlesArray) {
@@ -242,7 +252,7 @@
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
self.isHidenNaviBar = false; self.isHidenNaviBar = false;
self.type = @"0"; self.type = @"0";
self.selecetIndex = 0; self.selecetIndex = 1;
self.navigationItem.title = @"应急就医"; self.navigationItem.title = @"应急就医";
self.view.backgroundColor = KWhiteColor; self.view.backgroundColor = KWhiteColor;
TYNavSheet = [[TYMapNavSheet alloc]init]; TYNavSheet = [[TYMapNavSheet alloc]init];
@@ -310,7 +320,7 @@
sosBtn.interval = 5; sosBtn.interval = 5;
[grapView addSubview:sosBtn]; [grapView addSubview:sosBtn];
self.titles = @[@"油田医院",@"合作医院",@"健康小屋",@"AED",@"救护车"]; self.titles = @[@"油田医院",@"健康小屋",@"AED",@"救护车"];
self.titleView.segmentTitles = self.titles; self.titleView.segmentTitles = self.titles;
[self.titleView reloadData]; [self.titleView reloadData];
@@ -506,7 +516,7 @@
[parmDic setObject:@(latitude) forKey:@"latitude"]; [parmDic setObject:@(latitude) forKey:@"latitude"];
[parmDic setObject:@"0" forKey:@"name"]; [parmDic setObject:@"0" forKey:@"name"];
// param type 1:油田医院 3:健康小屋 4:aed 5:救护车 不传则全部
JKCQAPI * sosApi = [[JKCQAPI alloc] init:self tag:@"GroupAPI" NeedToken:@""]; JKCQAPI * sosApi = [[JKCQAPI alloc] init:self tag:@"GroupAPI" NeedToken:@""];
[sosApi getSoSCreateGroupChat:parmDic]; [sosApi getSoSCreateGroupChat:parmDic];
@@ -568,7 +578,23 @@
// self.mapView.userTrackingMode = MAUserTrackingModeFollow; // self.mapView.userTrackingMode = MAUserTrackingModeFollow;
self.addressView.hidden = true; self.addressView.hidden = true;
self.grapView.hidden = false; self.grapView.hidden = false;
self.selecetIndex = selectedIndex + 1; if (selectedIndex == 0) {
self.selecetIndex = 1;
}
if (selectedIndex == 1) {
self.selecetIndex = 3;
}
if (selectedIndex == 2) {
self.selecetIndex = 4;
}
if (selectedIndex == 3) {
self.selecetIndex = 5;
}
[self getResourceDataWithType:[NSString stringWithFormat:@"%ld",self.selecetIndex] Longitude:self.Longitude withLatitude:self.latitude]; [self getResourceDataWithType:[NSString stringWithFormat:@"%ld",self.selecetIndex] Longitude:self.Longitude withLatitude:self.latitude];
[self.addressView removeFromSuperview]; [self.addressView removeFromSuperview];
@@ -605,25 +631,30 @@
{ {
if ([tag isEqualToString:@"RESOURCES"]) if ([tag isEqualToString:@"RESOURCES"])
{ {
NSDictionary * parmDic = response;
XJSOSCenterModel * model = [XJSOSCenterModel modelWithDictionary:parmDic]; NSArray * responseArray = response;
self.model = model;
NSMutableArray * poiAnnotations = [[NSMutableArray alloc] init]; NSMutableArray * poiAnnotations = [[NSMutableArray alloc] init];
[self.mapView removeAnnotations:self.mapView.annotations]; [self.mapView removeAnnotations:self.mapView.annotations];
[self.ponisArray removeAllObjects]; [self.ponisArray removeAllObjects];
[self.modelArray removeAllObjects];
for (NSDictionary * dic in responseArray) {
XJSOSResourcesModel * model = [XJSOSResourcesModel modelWithDictionary:dic];
[self.modelArray addObject:model];
for (XJSOSResourcesModel * resourceModel in model.resources) {
MAPointAnnotation *pointAnnotation = [[MAPointAnnotation alloc] init]; MAPointAnnotation *pointAnnotation = [[MAPointAnnotation alloc] init];
pointAnnotation.coordinate = CLLocationCoordinate2DMake(resourceModel.latitude, resourceModel.longitude); pointAnnotation.coordinate = CLLocationCoordinate2DMake([model.latitude doubleValue],[model.longitude doubleValue] );
pointAnnotation.title = resourceModel.name; pointAnnotation.title = model.name;
pointAnnotation.subtitle = resourceModel.address; pointAnnotation.subtitle = model.address;
[poiAnnotations addObject:pointAnnotation]; [poiAnnotations addObject:pointAnnotation];
[self addAnnotationToMapView:pointAnnotation]; [self addAnnotationToMapView:pointAnnotation];
[self.ponisArray addObject:pointAnnotation]; [self.ponisArray addObject:pointAnnotation];
} }
if (self.ponisArray.count == 1) { if (self.ponisArray.count == 1) {
self.mapView.zoomLevel = 11; self.mapView.zoomLevel = 11;
} }
@@ -729,9 +760,9 @@
reuseIdentifier:reuseIndetifier]; reuseIdentifier:reuseIndetifier];
} }
for (XJSOSResourcesModel * resourceModel in self.model.resources) { for (XJSOSResourcesModel * resourceModel in self.modelArray) {
if (annotation.coordinate.longitude == resourceModel.longitude && annotation.coordinate.latitude == resourceModel.latitude) { if (annotation.coordinate.longitude == [resourceModel.longitude doubleValue] && annotation.coordinate.latitude == [resourceModel.latitude doubleValue]) {
if ([resourceModel.type integerValue]== 1) { if ([resourceModel.type integerValue]== 1) {
annotationView.image = [UIImage imageNamed:@"youtianHosoital"]; annotationView.image = [UIImage imageNamed:@"youtianHosoital"];
} }
@@ -770,10 +801,10 @@
self.grapView.hidden = true; self.grapView.hidden = true;
for (XJSOSResourcesModel * resourceModel in self.model.resources) { for (XJSOSResourcesModel * resourceModel in self.modelArray) {
if (view.annotation.coordinate.longitude == resourceModel.longitude && view.annotation.coordinate.latitude == resourceModel.latitude) { if (view.annotation.coordinate.longitude == [ resourceModel.longitude doubleValue] && view.annotation.coordinate.latitude == [resourceModel.latitude doubleValue]) {
self.addressView.resourceModel = resourceModel; self.addressView.resourceModel = resourceModel;
self.resourceModel = resourceModel; self.resourceModel = resourceModel;
@@ -801,7 +832,7 @@
NSMutableDictionary * Dic = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"我的位置",@"startName",self.resourceModel.address,@"endName", nil]; NSMutableDictionary * Dic = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"我的位置",@"startName",self.resourceModel.address,@"endName", nil];
[TYNavSheet ShowMapNavSheetSuperView:self withLocationDic:Dic withstartCoor:CLLocationCoordinate2DMake(latitude, longitude) withendCoor:CLLocationCoordinate2DMake(self.resourceModel.latitude, self.resourceModel.longitude)]; [TYNavSheet ShowMapNavSheetSuperView:self withLocationDic:Dic withstartCoor:CLLocationCoordinate2DMake(latitude, longitude) withendCoor:CLLocationCoordinate2DMake([self.resourceModel.latitude doubleValue], [self.resourceModel.longitude doubleValue])];
} }
@@ -22,12 +22,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString * province; @property (nonatomic, copy) NSString * province;
@property (nonatomic, copy) NSString * gdId; @property (nonatomic, copy) NSString * gdId;
@property (nonatomic, assign) double latitude; @property (nonatomic, copy) NSString * latitude;
@property (nonatomic, copy) NSString * city; @property (nonatomic, copy) NSString * city;
@property (nonatomic, copy) NSString * name; @property (nonatomic, copy) NSString * name;
@property (nonatomic, copy) NSString * type; @property (nonatomic, copy) NSString * type;
@property (nonatomic, copy) NSString * level; @property (nonatomic, copy) NSString * level;
@property (nonatomic, assign) double longitude; @property (nonatomic, copy) NSString * longitude;
@property (nonatomic, copy) NSString * distance; @property (nonatomic, copy) NSString * distance;
@property (nonatomic, copy) NSString * reaourceID; @property (nonatomic, copy) NSString * reaourceID;
@property (nonatomic, copy) NSString * address; @property (nonatomic, copy) NSString * address;
@@ -42,6 +42,13 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString * driverName; @property (nonatomic, copy) NSString * driverName;
@property (nonatomic, copy) NSString * manageName;
@property (nonatomic, copy) NSString * loveNum;
@property (nonatomic, copy) NSString * orgName;
@property (nonatomic, copy) NSString * runTime;
@property (nonatomic, copy) NSString * jobNum;
@end @end