feat(emergency): 专家端应急求助入口对齐员工端

- 首页新增员工应急求助入口,接口改用 myParticipatedOrders,1条直接进群聊,多条弹窗选择
- ChatViewController 加急救员流程:isFromFirstAid、群成员面板、工单弹窗
- 急救员入口隐藏语音通话/档案/结束咨询,标题写死"应急求助"
- XJDNetAPI 加 getMyParticipatedOrders/getActualGroupMemberList/getSearchEmployee/getSearchExpert/postAddGroupUser
- 拷贝 XJSelectContactViewController、XJParticipatedOrderModel、checkbox/order 等图标资源
- IM断线静默重登,异地登录弹提示跳登录页
- 首页数量标签默认隐藏,非零才显示

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
jiayangyang
2026-08-04 16:30:32 +08:00
co-authored by Claude Opus 4.7
parent 2cf2ddcb19
commit 2bcac71a19
52 changed files with 2344 additions and 156 deletions
+65
View File
@@ -0,0 +1,65 @@
//
// MapMessageCustomCell.m
// EscortProject
//
// Created by 仁康信息 on 2023/7/7.
//
#import "MapMessageCustomCell.h"
@implementation MapMessageCustomCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
self.container.layer.cornerRadius = 10;
self.container.backgroundColor = UIColor.whiteColor;
self.myTextLabel = [[UILabel alloc] init];
self.myTextLabel.textAlignment = NSTextAlignmentLeft;
self.myTextLabel.font = [UIFont systemFontOfSize:14];
self.myTextLabel.backgroundColor = UIColor.whiteColor;
[self.container addSubview:self.myTextLabel];
self.mapImage = [[UIImageView alloc] init];
[self.container addSubview:self.mapImage];
}
return self;
}
// 根据 cellData 绘制 cell
- (void)fillWithData:(MapMessageCustomCellData *)data;
{
[super fillWithData:data];
self.myTextLabel.text = @" 位置";
[self.mapImage sd_setImageWithURL:[NSURL URLWithString:data.MapPictureImg] placeholderImage:nil];
}
// 设置控件坐标
- (void)layoutSubviews
{
[super layoutSubviews];
self.myTextLabel.mm_right(0).mm_top(0).mm_left(0).mm_height(30).mm_width(245);
self.mapImage.mm_top(self.myTextLabel.mm_y + 30 ).mm_width(245).mm_height(140);
}
@end
+24
View File
@@ -0,0 +1,24 @@
//
// MapMessageCustomCell.h
// EscortProject
//
// Created by 仁康信息 on 2023/7/7.
//
#import "TUIMessageCell.h"
#import "MapMessageCustomCellData.h"
#import <TIMCommon/TUIBubbleMessageCell.h>
#import <TIMCommon/TUIMessageCell.h>
NS_ASSUME_NONNULL_BEGIN
@interface MapMessageCustomCell : TUIBubbleMessageCell
@property UILabel * myTextLabel; // 展示文本
@property UIImageView * mapImage; //
@property MapMessageCustomCellData * cellData;
- (void)fillWithData:(MapMessageCustomCellData *)data;
@end
NS_ASSUME_NONNULL_END
+65
View File
@@ -0,0 +1,65 @@
//
// MapMessageCustomCell.m
// EscortProject
//
// Created by 仁康信息 on 2023/7/7.
//
#import "MapMessageCustomCell.h"
@implementation MapMessageCustomCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
self.container.layer.cornerRadius = 10;
self.container.backgroundColor = UIColor.whiteColor;
self.myTextLabel = [[UILabel alloc] init];
self.myTextLabel.textAlignment = NSTextAlignmentLeft;
self.myTextLabel.font = [UIFont systemFontOfSize:14];
self.myTextLabel.backgroundColor = UIColor.whiteColor;
[self.container addSubview:self.myTextLabel];
self.mapImage = [[UIImageView alloc] init];
[self.container addSubview:self.mapImage];
}
return self;
}
// 根据 cellData 绘制 cell
- (void)fillWithData:(MapMessageCustomCellData *)data;
{
[super fillWithData:data];
self.myTextLabel.text = @" 位置";
[self.mapImage sd_setImageWithURL:[NSURL URLWithString:data.MapPictureImg] placeholderImage:nil];
}
// 设置控件坐标
- (void)layoutSubviews
{
[super layoutSubviews];
self.myTextLabel.mm_right(0).mm_top(0).mm_left(0).mm_height(30).mm_width(245);
self.mapImage.mm_top(self.myTextLabel.mm_y + 30 ).mm_width(245).mm_height(140);
}
@end
+21
View File
@@ -0,0 +1,21 @@
//
// MapMessageCustomCellData.h
// EscortProject
//
// Created by 仁康信息 on 2023/7/7.
//
#import "TUIMessageCellData.h"
#import <TIMCommon/TUIBubbleMessageCellData.h>
NS_ASSUME_NONNULL_BEGIN
@interface MapMessageCustomCellData : TUIBubbleMessageCellData
@property (nonatomic, copy) NSString *text;
@property (nonatomic, copy) NSString * MapPictureImg;
@end
NS_ASSUME_NONNULL_END
+80
View File
@@ -0,0 +1,80 @@
//
// MapMessageCustomCellData.m
// EscortProject
//
// Created by 仁康信息 on 2023/7/7.
//
#import "MapMessageCustomCellData.h"
#import "MapMessageCustomCell.h"
#import<CommonCrypto/CommonDigest.h>
@implementation MapMessageCustomCellData
+ (TUIMessageCellData *)getCellData:(V2TIMMessage *)message{
// NSDictionary *param = [NSJSONSerialization JSONObjectWithData:message.locationElem.desc options:NSJSONReadingAllowFragments error:nil];
MapMessageCustomCellData *cellData = [[MapMessageCustomCellData alloc] initWithDirection:message.isSelf ? MsgDirectionOutgoing : MsgDirectionIncoming];
cellData.innerMessage = message;
cellData.msgID = message.msgID;
cellData.text = message.locationElem.desc;
cellData.MapPictureImg = [self mapLocationImage:message.locationElem.longitude Withlation:message.locationElem.latitude];
cellData.reuseId = @"MapMessageCustomCell";
cellData.showAvatar = true;
// cellData.avatarUrl = [NSURL URLWithString:message.faceURL];
return cellData;
}
+ (NSString *)mapLocationImage:(CGFloat)longLation Withlation:(CGFloat)lation {
// 0: self.longLation,self.lation
NSString * staciUrl = @"https://restapi.amap.com/v3/staticmap?key=9e4aac9a04b8296e9039adce3b472f28";
NSString * mapKey = @"9e4aac9a04b8296e9039adce3b472f28";
NSString * loctaionUrl = @"https://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png";
NSString * needMdString = [NSString stringWithFormat:@"key=%@&location=%f,%f&markers=-1,%@,0:%f,%f&size=700*500&zoom=154985aa1abb49ce2daa20d032a374eb58",mapKey,longLation,lation,loctaionUrl,longLation,lation];
NSString * mapUrl = [NSString stringWithFormat:@"%@&location=%f,%f&markers=-1,%@,0:%f,%f&size=700*500&zoom=15&sig=%@",staciUrl,longLation,lation,loctaionUrl,longLation,lation,[self md5:needMdString]];
return mapUrl;
}
//md加密
+ (NSString *)md5:(NSString *)str
{
const char *cStr = [str UTF8String];
unsigned char result[16];
CC_MD5(cStr, strlen(cStr), result); // This is the md5 call
return [NSString stringWithFormat:
@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
result[0], result[1], result[2], result[3],
result[4], result[5], result[6], result[7],
result[8], result[9], result[10], result[11],
result[12], result[13], result[14], result[15]
];
}
- (CGSize)contentSize
{
// CGRect rect = [self.text boundingRectWithSize:CGSizeMake(300, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{ NSFontAttributeName : [UIFont systemFontOfSize:15] } context:nil];
// CGSize size = CGSizeMake(ceilf(rect.size.width)+1, ceilf(rect.size.height));
// // 加上气泡边距
// size.height += 60;
// size.width += 20;
// return size;
CGFloat textMaxWidth = 245.f;
CGSize size = CGSizeMake(textMaxWidth, 170);
return size;
}
@end
+21
View File
@@ -0,0 +1,21 @@
//
// MapMessageCustomCellData.h
// EscortProject
//
// Created by 仁康信息 on 2023/7/7.
//
#import "TUIMessageCellData.h"
#import <TIMCommon/TUIBubbleMessageCellData.h>
NS_ASSUME_NONNULL_BEGIN
@interface MapMessageCustomCellData : TUIBubbleMessageCellData
@property (nonatomic, copy) NSString *text;
@property (nonatomic, copy) NSString * MapPictureImg;
@end
NS_ASSUME_NONNULL_END
+80
View File
@@ -0,0 +1,80 @@
//
// MapMessageCustomCellData.m
// EscortProject
//
// Created by 仁康信息 on 2023/7/7.
//
#import "MapMessageCustomCellData.h"
#import "MapMessageCustomCell.h"
#import<CommonCrypto/CommonDigest.h>
@implementation MapMessageCustomCellData
+ (TUIMessageCellData *)getCellData:(V2TIMMessage *)message{
// NSDictionary *param = [NSJSONSerialization JSONObjectWithData:message.locationElem.desc options:NSJSONReadingAllowFragments error:nil];
MapMessageCustomCellData *cellData = [[MapMessageCustomCellData alloc] initWithDirection:message.isSelf ? MsgDirectionOutgoing : MsgDirectionIncoming];
cellData.innerMessage = message;
cellData.msgID = message.msgID;
cellData.text = message.locationElem.desc;
cellData.MapPictureImg = [self mapLocationImage:message.locationElem.longitude Withlation:message.locationElem.latitude];
cellData.reuseId = @"MapMessageCustomCell";
cellData.showAvatar = true;
// cellData.avatarUrl = [NSURL URLWithString:message.faceURL];
return cellData;
}
+ (NSString *)mapLocationImage:(CGFloat)longLation Withlation:(CGFloat)lation {
// 0: self.longLation,self.lation
NSString * staciUrl = @"https://restapi.amap.com/v3/staticmap?key=9e4aac9a04b8296e9039adce3b472f28";
NSString * mapKey = @"9e4aac9a04b8296e9039adce3b472f28";
NSString * loctaionUrl = @"https://a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png";
NSString * needMdString = [NSString stringWithFormat:@"key=%@&location=%f,%f&markers=-1,%@,0:%f,%f&size=700*500&zoom=154985aa1abb49ce2daa20d032a374eb58",mapKey,longLation,lation,loctaionUrl,longLation,lation];
NSString * mapUrl = [NSString stringWithFormat:@"%@&location=%f,%f&markers=-1,%@,0:%f,%f&size=700*500&zoom=15&sig=%@",staciUrl,longLation,lation,loctaionUrl,longLation,lation,[self md5:needMdString]];
return mapUrl;
}
//md加密
+ (NSString *)md5:(NSString *)str
{
const char *cStr = [str UTF8String];
unsigned char result[16];
CC_MD5(cStr, strlen(cStr), result); // This is the md5 call
return [NSString stringWithFormat:
@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
result[0], result[1], result[2], result[3],
result[4], result[5], result[6], result[7],
result[8], result[9], result[10], result[11],
result[12], result[13], result[14], result[15]
];
}
- (CGSize)contentSize
{
// CGRect rect = [self.text boundingRectWithSize:CGSizeMake(300, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{ NSFontAttributeName : [UIFont systemFontOfSize:15] } context:nil];
// CGSize size = CGSizeMake(ceilf(rect.size.width)+1, ceilf(rect.size.height));
// // 加上气泡边距
// size.height += 60;
// size.width += 20;
// return size;
CGFloat textMaxWidth = 245.f;
CGSize size = CGSizeMake(textMaxWidth, 170);
return size;
}
@end