删除多余文件
This commit is contained in:
@@ -1,104 +0,0 @@
|
||||
//
|
||||
// API.h
|
||||
// XZYNetworking
|
||||
//
|
||||
// Created by 仁康信息 on 2022/9/9.
|
||||
// Copyright © 2022年 仁康信息. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "YXNetworkingWithCache.h"
|
||||
|
||||
@interface YXNetAPI : NSObject
|
||||
|
||||
@property (nonatomic,strong) YXNetworkingWithCache * httpRequest;
|
||||
|
||||
#pragma mark - init方法
|
||||
//无需token
|
||||
- (instancetype)init:(id)delegate tag:(NSString *)tag;
|
||||
//携带token
|
||||
- (instancetype)init:(id)delegate tag:(NSString *)tag NeedToken:(NSString *)NeedToken;
|
||||
|
||||
#pragma mark - 首页模块
|
||||
|
||||
- (void)getHomeData:(NSMutableDictionary *)parmaDic;
|
||||
- (void)getHomeSmallData:(NSMutableDictionary *)parmaDic;
|
||||
- (void)getHomeFoundSmallHelpData:(NSMutableDictionary *)parmaDic;
|
||||
|
||||
//接受咨询
|
||||
- (void)getAcceptQuestion:(NSMutableDictionary *)parmaDic;
|
||||
|
||||
#pragma mark: -医生排班
|
||||
|
||||
- (void)PostDoctorWorkTime:(NSMutableDictionary *)parmDic;
|
||||
- (void)GetDoctorWorkSetting:(NSMutableDictionary *)pamraDic;
|
||||
|
||||
#pragma mark:咨询统计
|
||||
|
||||
- (void)GetQuestionStatistics:(NSMutableDictionary *)pamraDic;
|
||||
- (void)GetStatisticsEarnings:(NSMutableDictionary *)pamraDic;
|
||||
- (void)GetQuestionRecoredList:(NSMutableDictionary *)parmDic;
|
||||
- (void)GetRecoredQuestionDetail:(NSMutableDictionary *)pamraDic;
|
||||
- (void)getBodyReportDeatil:(NSMutableDictionary *)parmDic;
|
||||
- (void)GetCancelReasourData:(NSMutableDictionary *)pamraDic;
|
||||
- (void)submitCancelreasourData:(NSMutableDictionary *)pamraDic;
|
||||
- (void)fileDetatilData:(NSMutableDictionary *)pamraDic;
|
||||
#pragma mark:暂停公告
|
||||
|
||||
- (void)GetPublishServerMessage:(NSMutableDictionary *)pamraDic;
|
||||
- (void)GetSPublishServerRecored:(NSMutableDictionary *)pamraDic;
|
||||
- (void)GetChangePublishServer:(NSMutableDictionary *)pamraDic;
|
||||
- (void)GetPhyscialSearchAnomalyData:(NSMutableDictionary *)parmDic;
|
||||
|
||||
#pragma mark:发布公告
|
||||
|
||||
- (void)PostStopPublishServer:(NSMutableDictionary *)pamraDic;
|
||||
|
||||
//查询停诊原因
|
||||
- (void)GetPublishServerReason:(NSMutableDictionary *)pamraDic;
|
||||
//查询当前咨询数量
|
||||
- (void)GetCurrentServerNumber:(NSMutableDictionary *)pamraDic;
|
||||
#pragma mark: im
|
||||
|
||||
- (void)PostEndSoSIMQuestion:(NSMutableDictionary *)pamraDic;
|
||||
- (void)GetEndPictureEndIMQuestion:(NSMutableDictionary *)pamraDic;
|
||||
- (void)PostGroupIDArray:(NSMutableDictionary *)parmDic;
|
||||
|
||||
#pragma mark - 我的模块
|
||||
|
||||
- (void)GetInquireDoctorInfo:(NSMutableDictionary *)pamraDic;
|
||||
|
||||
//查询科室
|
||||
- (void)GetInquireDoctorRoomInfo:(NSMutableDictionary *)pamraDic;
|
||||
//个人简介
|
||||
- (void)postUpdateDoctorInfo:(NSMutableDictionary *)pamraDic;
|
||||
//收益明细
|
||||
- (void)GetBillListData:(NSMutableDictionary *)pamraDic;
|
||||
//提现详情
|
||||
- (void)withDrawDetailsData:(NSMutableDictionary *)pamraDic;
|
||||
|
||||
#pragma mark - 登录注册
|
||||
|
||||
- (void)PostLogin:(NSMutableDictionary *)parmDic;
|
||||
- (void)GetIMLoginAccount:(NSMutableDictionary *)pamraDic;
|
||||
- (void)postSetUserPassword:(NSMutableDictionary *)parmDic;
|
||||
- (void)postImageArrayUpload:(NSArray *)imageArray;
|
||||
- (void)postResetUserNewPassword:(NSMutableDictionary *)parmDic;
|
||||
//更新头像
|
||||
- (void)updateUserAvatar:(NSMutableDictionary *)parmDic;
|
||||
//更新密码
|
||||
- (void)updateDoctorLoginPassword:(NSMutableDictionary *)pamraDic;
|
||||
- (void)getUserAgreementPrivacy:(NSMutableDictionary *)parmDic;
|
||||
- (void)getVesionHideRegis:(NSMutableDictionary *)parmDic;
|
||||
#pragma mark - IM模块
|
||||
|
||||
- (void)getAgainSessionReservationDate:(NSMutableDictionary *)parmDic;
|
||||
- (void)getendVideoReportById:(NSMutableDictionary *)parmDic;
|
||||
//获取体检语音
|
||||
- (void)docotorReportListAudioResource:(NSMutableDictionary *)parmDic;
|
||||
- (void)docotorReportListHistoryDoctorAudioResource:(NSMutableDictionary *)parmDic;
|
||||
- (void)GetDoctorPhyscialIDCardSearch:(NSMutableDictionary *)parmDic;
|
||||
- (void)getHistoryReportById:(NSMutableDictionary *)parmDic;
|
||||
- (void)getSendVideoStart:(NSMutableDictionary *)pamraDic;
|
||||
|
||||
@end
|
||||
@@ -1,333 +0,0 @@
|
||||
//
|
||||
// API.m
|
||||
// XZYNetworking
|
||||
//
|
||||
// Created by 仁康信息 on 2022/9/9.
|
||||
// Copyright © 2022年 仁康信息. All rights reserved.
|
||||
//
|
||||
|
||||
#import "YXNetAPI.h"
|
||||
#define needToken httpRequest.needToken
|
||||
#define isLoginFlag httpRequest.isLoginFlag
|
||||
|
||||
@implementation YXNetAPI
|
||||
|
||||
#pragma mark - init方法
|
||||
@synthesize httpRequest;
|
||||
|
||||
//无需token
|
||||
- (instancetype)init:(id)delegate tag:(NSString *)tag
|
||||
{
|
||||
YXUserInfo * user = [HQCommonUtils keyedUnarchiverWithKey:LoginUserInfo];
|
||||
return [self init:delegate tag:tag NeedToken:user.token];
|
||||
}
|
||||
|
||||
//携带token
|
||||
- (instancetype)init:(id)delegate tag:(NSString *)tag NeedToken:(NSString *)NeedToken
|
||||
{
|
||||
if (self=[super init]) {
|
||||
if (![tag isEqualToString:@"LOGINGAPI"] || ![tag isEqualToString:@"CHANGEAPI"] ) {
|
||||
|
||||
YXUserInfo * user = [HQCommonUtils keyedUnarchiverWithKey:LoginUserInfo];
|
||||
|
||||
httpRequest = [[YXNetworkingWithCache alloc] initWithDelegate:delegate bindTag:tag NeedToken:user.token];
|
||||
}else{
|
||||
httpRequest = [[YXNetworkingWithCache alloc] initWithDelegate:delegate bindTag:tag NeedToken:@""];
|
||||
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
#pragma mark - 首页模块
|
||||
- (void)getHomeData:(NSMutableDictionary *)parmaDic {
|
||||
|
||||
//GET https://starry.test.icdat.cn/health-consultation/api/consult/conSession/selectSessionProfessorIng HTTP/1.1
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/selectSessionProfessorIngNew",Http] params:parmaDic];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)getHomeSmallData:(NSMutableDictionary *)parmaDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/insertProfessorAndHelperSessionShow",Http] params:parmaDic];
|
||||
|
||||
}
|
||||
|
||||
- (void)getHomeFoundSmallHelpData:(NSMutableDictionary *)parmaDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/insertProfessorAndHelperSession",Http] params:parmaDic];
|
||||
|
||||
}
|
||||
- (void)getAcceptQuestion:(NSMutableDictionary *)parmaDic {
|
||||
|
||||
// GET https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/conSession/sessionConfirm?id=1744619023486275586&startTime=1705287600000&endTime=1705294800000 HTTP/1.1
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/sessionConfirm",Http] params:parmaDic];
|
||||
}
|
||||
//结束图文咨询
|
||||
- (void)GetEndPictureEndIMQuestion:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/finishSession",Http] params:pamraDic];
|
||||
// /health-consultation/api/consult/conSession/finishSession
|
||||
}
|
||||
|
||||
- (void)PostEndSoSIMQuestion:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-emergency/api/emergency/order/orderOver",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
|
||||
- (void)GetInquireDoctorInfo:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctor/queryDoctor",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark: -医生排班
|
||||
|
||||
- (void)PostDoctorWorkTime:(NSMutableDictionary *)parmDic {
|
||||
|
||||
[httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctorScheduling/insertDoctorScheduling",Http] params:parmDic];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark: -查询医生排班
|
||||
- (void)GetDoctorWorkSetting:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctorScheduling/selectDoctorScheduling",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
|
||||
- (void)postUpdateDoctorInfo:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
// POST https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/conDoctor/update HTTP/1.1
|
||||
[httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctor/update",Http] params:pamraDic];
|
||||
|
||||
|
||||
}
|
||||
#pragma mark:咨询统计
|
||||
|
||||
- (void)GetQuestionStatistics:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conCostStatistics/groupByTypehList",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
|
||||
- (void)GetStatisticsEarnings:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conCostStatistics/getStatistics",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
|
||||
- (void)GetQuestionRecoredList:(NSMutableDictionary *)parmDic {
|
||||
|
||||
//selectSessionListByDoctorId
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/selectSessionListByDoctorIdNew",Http] params:parmDic];
|
||||
}
|
||||
|
||||
#pragma mark:咨询详情
|
||||
- (void)GetRecoredQuestionDetail:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/sessionDetailDoctorAll",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
- (void)getBodyReportDeatil:(NSMutableDictionary *)parmDic {
|
||||
|
||||
// [httpRequest httpGetRequest:[NSString stringWithFormat:@"%@cqyt/middleController/getCheckItemBySfzhNewNew",Http] params:parmDic];
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-archives/historyReport/selectNewHealthReport",Http] params:parmDic];
|
||||
|
||||
}
|
||||
//拒绝理由
|
||||
- (void)GetCancelReasourData:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/selectRejectReason",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
//开始视频
|
||||
|
||||
- (void)getSendVideoStart:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
// GET https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/conSessionVideoInfo/startVideoSession?sessionId=1778696654498156546 HTTP/1.1
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSessionVideoInfo/startVideoSession",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
//确认拒绝
|
||||
- (void)submitCancelreasourData:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/sessionReject",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
- (void)fileDetatilData:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/medicalRecords/selectConMedicalRecordsByIdDoctor",Http] params:pamraDic];
|
||||
}
|
||||
|
||||
//提现详情
|
||||
- (void)withDrawDetailsData:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conCostStatistics/queryById",Http] params:pamraDic];
|
||||
}
|
||||
|
||||
- (void)getAgainSessionReservationDate:(NSMutableDictionary *)parmDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/sessionReservationDate/sessionReservationDate",Http] params:parmDic];
|
||||
|
||||
}
|
||||
|
||||
|
||||
//查询体检信息(整合,带正常异常数量)
|
||||
|
||||
- (void)GetPhyscialSearchAnomalyData:(NSMutableDictionary *)parmDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/cqyt/middleController/getCheckItemBySfzhTotal/",Http] params:parmDic];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark:暂停公告
|
||||
|
||||
//暂停公告发布
|
||||
- (void)GetPublishServerMessage:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/conDoctor/getServiceByDoctorId",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
//暂停公告列表
|
||||
- (void)GetSPublishServerRecored:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conService/list",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
//编辑公告状态
|
||||
- (void)GetChangePublishServer:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conService/edit",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
|
||||
//发布公告状态
|
||||
- (void)PostStopPublishServer:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conService/add",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
//查询停诊原因
|
||||
- (void)GetPublishServerReason:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctor/selectDictList",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
//查询当前咨询数量
|
||||
- (void)GetCurrentServerNumber:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/selectSessionVideoExistDoctor",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
|
||||
//上传图片
|
||||
- (void)postImageArrayUpload:(NSArray *)imageArray {
|
||||
|
||||
[httpRequest upLoadDataWithUrlStr:[NSString stringWithFormat:@"%@/sys/upload/uploadFileMany",Http] params:nil withDataArray:imageArray];
|
||||
}
|
||||
//更新头像
|
||||
- (void)updateUserAvatar:(NSMutableDictionary *)parmDic {
|
||||
|
||||
[httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/sys/user/updateUserAvatar",Http] params:parmDic];
|
||||
}
|
||||
#pragma mark - 登录注册
|
||||
- (void)PostLogin:(NSMutableDictionary *)parmDic {
|
||||
|
||||
[httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-consultation/conDoctor/loginDoctor",Http] params:parmDic];
|
||||
|
||||
}
|
||||
- (void)getUserAgreementPrivacy:(NSMutableDictionary *)parmDic {
|
||||
|
||||
//GET https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/conDoctor/selectDictList?dictKey=jump_url HTTP/1.1
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctor/selectDictList?dictKey=jump_url",Http] params:parmDic];
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
IM登录
|
||||
*/
|
||||
- (void)GetIMLoginAccount:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-im/wnapp/userSigAndroid",Http] params:pamraDic];
|
||||
}
|
||||
|
||||
- (void)PostGroupIDArray:(NSMutableDictionary *)parmDic {
|
||||
|
||||
// POST https://starry.test.icdat.cn/health-consultation/api/consult/conSession/selectSessionByImIdNew HTTP/1.1
|
||||
[httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSession/selectSessionByImIdNewNew",Http] params:parmDic];
|
||||
}
|
||||
|
||||
#pragma mark:我的
|
||||
- (void)GetInquireDoctorRoomInfo:(NSMutableDictionary *)pamraDic {
|
||||
|
||||
// GET https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/conSicks/selectSickListByDepartmentIdDoctorSearch?departmentId=1677938163633926145 HTTP/1.1
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conSicks/selectSickListByDepartmentIdDoctorSearch",Http] params:pamraDic];
|
||||
|
||||
}
|
||||
|
||||
- (void)GetBillListData:(NSMutableDictionary *)pamraDic {
|
||||
//
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conCostStatistics/findlistpage",Http] params:pamraDic];
|
||||
}
|
||||
|
||||
//修改密码
|
||||
- (void)updateDoctorLoginPassword:(NSMutableDictionary *)pamraDic {
|
||||
//T https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/conDoctor/updatePassword
|
||||
[httpRequest httpPUTCacheRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/conDoctor/updatePassword",Http] params:pamraDic];
|
||||
}
|
||||
|
||||
- (void)postResetUserNewPassword:(NSMutableDictionary *)parmDic {
|
||||
|
||||
[httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-system/api/anon/sys/resetUserPwd",Http] params:parmDic];
|
||||
|
||||
}
|
||||
|
||||
- (void)postSetUserPassword:(NSMutableDictionary *)parmDic {
|
||||
|
||||
[httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-system/api/anon/sys/checkUser",Http] params:parmDic];
|
||||
|
||||
}
|
||||
- (void)getVesionHideRegis:(NSMutableDictionary *)parmDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-system/sys/api/notice/selectIosUpdate",Http] params:parmDic];
|
||||
}
|
||||
|
||||
//获取体检语音
|
||||
- (void)docotorReportListAudioResource:(NSMutableDictionary *)parmDic{
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-archives/historyReport/getVoiceUrl",Http] params:parmDic];
|
||||
|
||||
}
|
||||
- (void)docotorReportListHistoryDoctorAudioResource:(NSMutableDictionary *)parmDic{
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-archives/historyReport/convertVoice2",Http] params:parmDic];
|
||||
|
||||
}
|
||||
- (void)GetDoctorPhyscialIDCardSearch:(NSMutableDictionary *)parmDic {
|
||||
|
||||
[httpRequest httpPostRequest:[NSString stringWithFormat:@"%@/health-archives/historyReport/getHistoryReportByPage",Http] params:parmDic];
|
||||
|
||||
}
|
||||
- (void)getHistoryReportById:(NSMutableDictionary *)parmDic {
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-archives/historyReport/getHistoryReportById",Http] params:parmDic];
|
||||
|
||||
}
|
||||
|
||||
- (void)getendVideoReportById:(NSMutableDictionary *)parmDic {
|
||||
|
||||
// GET https://cqyt.test.yg.icdat.cn/health-consultation/api/consult/sessionReservationDate/endPhone?id=1780071436959469569 HTTP/1.1
|
||||
|
||||
[httpRequest httpGetRequest:[NSString stringWithFormat:@"%@/health-consultation/api/consult/sessionReservationDate/endPhone",Http] params:parmDic];
|
||||
|
||||
}
|
||||
|
||||
//结束咨询
|
||||
- (void)getABMUpdate:(NSMutableDictionary *)parmDic {
|
||||
|
||||
[httpRequest httpGetRequest:@"https://base.icdat.cn/latest" params:parmDic];
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,36 +0,0 @@
|
||||
|
||||
// YXKeychainTool.h
|
||||
// idleBuy
|
||||
//
|
||||
// Created by ios on 2018/5/28.
|
||||
// Copyright © 2018年 ios. All rights reserved.
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Security/Security.h>
|
||||
|
||||
@interface YXKeychainTool : NSObject
|
||||
/**
|
||||
* 储存字符串到🔑钥匙串
|
||||
*
|
||||
* @param sValue 对应的Value
|
||||
* @param sKey 对应的Key
|
||||
*/
|
||||
+ (void)saveKeychainValue:(NSString *)sValue key:(NSString *)sKey;
|
||||
|
||||
|
||||
/**
|
||||
* 从🔑钥匙串获取字符串
|
||||
*
|
||||
* @param sKey 对应的Key
|
||||
*
|
||||
* @return 返回储存的Value
|
||||
*/
|
||||
+ (NSString *)readKeychainValue:(NSString *)sKey;
|
||||
|
||||
|
||||
/**
|
||||
* 从🔑钥匙串删除字符串
|
||||
*
|
||||
* @param sKey 对应的Key
|
||||
*/
|
||||
+ (void)deleteKeychainValue:(NSString *)sKey;
|
||||
@end
|
||||
@@ -1,56 +0,0 @@
|
||||
|
||||
// NewLottery
|
||||
//
|
||||
// Created by 孙号斌 on 2017/2/14.
|
||||
// Copyright © 2017年 孙号斌. All rights reserved.
|
||||
//
|
||||
|
||||
#import "YXKeychainTool.h"
|
||||
|
||||
@implementation YXKeychainTool
|
||||
+ (NSMutableDictionary *)getKeychainQuery:(NSString *)service{
|
||||
return [NSMutableDictionary dictionaryWithObjectsAndKeys:
|
||||
(__bridge_transfer id)kSecClassGenericPassword,
|
||||
(__bridge_transfer id)kSecClass,service,
|
||||
(__bridge_transfer id)kSecAttrService,service,
|
||||
(__bridge_transfer id)kSecAttrAccount,
|
||||
(__bridge_transfer id)kSecAttrAccessibleAfterFirstUnlock,
|
||||
(__bridge_transfer id)kSecAttrAccessible,
|
||||
nil];
|
||||
}
|
||||
|
||||
+ (void)saveKeychainValue:(NSString *)sValue key:(NSString *)sKey{
|
||||
NSMutableDictionary * keychainQuery = [self getKeychainQuery:sKey];
|
||||
SecItemDelete((__bridge_retained CFDictionaryRef)keychainQuery);
|
||||
|
||||
[keychainQuery setObject:[NSKeyedArchiver archivedDataWithRootObject:sValue] forKey:(__bridge_transfer id)kSecValueData];
|
||||
|
||||
SecItemAdd((__bridge_retained CFDictionaryRef)keychainQuery, NULL);
|
||||
|
||||
}
|
||||
|
||||
+ (NSString *)readKeychainValue:(NSString *)sKey
|
||||
{
|
||||
NSString *ret = nil;
|
||||
NSMutableDictionary *keychainQuery = [self getKeychainQuery:sKey];
|
||||
[keychainQuery setObject:(id)kCFBooleanTrue forKey:(__bridge_transfer id)kSecReturnData];
|
||||
[keychainQuery setObject:(__bridge_transfer id)kSecMatchLimitOne forKey:(__bridge_transfer id)kSecMatchLimit];
|
||||
CFDataRef keyData = NULL;
|
||||
if (SecItemCopyMatching((__bridge CFDictionaryRef)keychainQuery, (CFTypeRef *)&keyData) == noErr) {
|
||||
@try {
|
||||
ret = (NSString *)[NSKeyedUnarchiver unarchiveObjectWithData:(__bridge NSData *)keyData];
|
||||
} @catch (NSException *e) {
|
||||
NSLog(@"Unarchive of %@ failed: %@", sKey, e);
|
||||
} @finally {
|
||||
}
|
||||
}
|
||||
if (keyData)
|
||||
CFRelease(keyData);
|
||||
return ret;
|
||||
}
|
||||
+ (void)deleteKeychainValue:(NSString *)sKey {
|
||||
NSMutableDictionary *keychainQuery = [self getKeychainQuery:sKey];
|
||||
SecItemDelete((__bridge CFDictionaryRef)keychainQuery);
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,38 +0,0 @@
|
||||
//
|
||||
// YXUserInfo.h
|
||||
// idleBuy
|
||||
//
|
||||
// Created by ios on 2018/5/30.
|
||||
// Copyright © 2018年 ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface YXUserInfo : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSDictionary *userInfo;
|
||||
|
||||
@property (nonatomic, copy) NSString * user_id;
|
||||
@property (nonatomic, copy) NSString * username;
|
||||
@property (nonatomic, copy) NSString * realname;
|
||||
@property (nonatomic, copy) NSString * avatar;
|
||||
@property (nonatomic, copy) NSString * phone;
|
||||
@property (nonatomic, copy) NSString * orgCode;
|
||||
@property (nonatomic, copy) NSString * sex;
|
||||
@property (nonatomic, copy) NSString * loginTenantId;
|
||||
@property (nonatomic, copy) NSString * status_dictText;
|
||||
@property (nonatomic, copy) NSString * delFlag;
|
||||
@property (nonatomic, copy) NSString * workNo;
|
||||
@property (nonatomic, copy) NSString * idCard;
|
||||
@property (nonatomic, copy) NSString * sex_dictText;
|
||||
@property (nonatomic, copy) NSString * email;
|
||||
|
||||
@property (nonatomic, copy) NSString * status;
|
||||
@property (nonatomic, copy) NSString * depart;
|
||||
@property (nonatomic, copy) NSString * personType_dictText;
|
||||
@property (nonatomic, copy) NSString * createTime;
|
||||
|
||||
@property (nonatomic, copy) NSString * token;
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,73 +0,0 @@
|
||||
//
|
||||
// YXUserInfo.m
|
||||
// idleBuy
|
||||
//
|
||||
// Created by ios on 2018/5/30.
|
||||
// Copyright © 2018年 ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "YXUserInfo.h"
|
||||
|
||||
@implementation YXUserInfo
|
||||
- (void)encodeWithCoder:(NSCoder *)aCoder
|
||||
{
|
||||
[aCoder encodeObject:self.userInfo forKey:@"userInfo"];
|
||||
[aCoder encodeObject:self.user_id forKey:@"user_id"];
|
||||
[aCoder encodeObject:self.avatar forKey:@"avatar"];
|
||||
[aCoder encodeObject:self.username forKey:@"username"];
|
||||
[aCoder encodeObject:self.realname forKey:@"realname"];
|
||||
[aCoder encodeObject:self.phone forKey:@"phone"];
|
||||
[aCoder encodeObject:self.idCard forKey:@"idCard"];
|
||||
[aCoder encodeObject:self.status forKey:@"status"];
|
||||
[aCoder encodeObject:self.workNo forKey:@"workNo"];
|
||||
[aCoder encodeObject:self.token forKey:@"token"];
|
||||
[aCoder encodeObject:self.sex_dictText forKey:@"sex_dictText"];
|
||||
|
||||
|
||||
|
||||
}
|
||||
- (id)initWithCoder:(NSCoder *)aDecoder
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
self.userInfo = [aDecoder decodeObjectForKey:@"userInfo"];
|
||||
self.user_id = [aDecoder decodeObjectForKey:@"user_id"];
|
||||
self.avatar = [aDecoder decodeObjectForKey:@"avatar"];
|
||||
self.username = [aDecoder decodeObjectForKey:@"username"];
|
||||
self.realname = [aDecoder decodeObjectForKey:@"realname"];
|
||||
self.phone = [aDecoder decodeObjectForKey:@"phone"];
|
||||
self.idCard = [aDecoder decodeObjectForKey:@"idCard"];
|
||||
self.token = [aDecoder decodeObjectForKey:@"token"];
|
||||
self.status = [aDecoder decodeObjectForKey:@"status"];
|
||||
self.workNo = [aDecoder decodeObjectForKey:@"workNo"];
|
||||
self.sex_dictText = [aDecoder decodeObjectForKey:@"sex_dictText"];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
- (void)setUserInfo:(NSDictionary *)userInfo {
|
||||
|
||||
_userInfo = userInfo;
|
||||
self.user_id = [_userInfo objectForKey:@"id"];
|
||||
self.avatar = [NSString stringWithFormat:@"%@%@",ResourceAddress,[_userInfo objectForKey:@"avatar"]];
|
||||
self.phone = [_userInfo objectForKey:@"phone"];
|
||||
self.realname = [_userInfo objectForKey:@"realname"];
|
||||
self.username = [_userInfo objectForKey:@"username"];
|
||||
self.sex = [_userInfo objectForKey:@"sex"];
|
||||
self.status = [_userInfo objectForKey:@"status"];
|
||||
self.email = [_userInfo objectForKey:@"email"];
|
||||
self.idCard = [_userInfo objectForKey:@"idCard"];
|
||||
self.workNo = [_userInfo objectForKey:@"workNo"];
|
||||
self.sex_dictText = [_userInfo objectForKey:@"sex_dictText"];
|
||||
}
|
||||
|
||||
|
||||
-(void)setToken:(NSString *)token {
|
||||
_token = token;
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// HQShowPromptPopView.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2022/9/28.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface HQShowPromptPopView : UIView
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,134 +0,0 @@
|
||||
//
|
||||
// HQShowPromptPopView.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2022/9/28.
|
||||
//
|
||||
|
||||
#import "HQShowPromptPopView.h"
|
||||
|
||||
@implementation HQShowPromptPopView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
UIView * backView = [[UIView alloc] initWithFrame:self.frame];
|
||||
backView.backgroundColor = UIColorBackground;
|
||||
[self addSubview:backView];
|
||||
|
||||
UIImageView * popImageView = [[UIImageView alloc] initWithImage:IMAGE_NAMED(@"popCenterImg")];
|
||||
popImageView.userInteractionEnabled = true;
|
||||
[backView addSubview:popImageView];
|
||||
|
||||
[popImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(kRealValue(260));
|
||||
make.width.mas_equalTo(kScreenWidth - 47);
|
||||
make.centerX.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
UILabel * titLabel = [[UILabel alloc] init];
|
||||
titLabel.text = @"提示";
|
||||
titLabel.textColor = CFontColor1;
|
||||
titLabel.font = BOLDSYSTEMFONT(16);
|
||||
titLabel.textAlignment = NSTextAlignmentCenter;
|
||||
[popImageView addSubview:titLabel];
|
||||
|
||||
[titLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(kRealValue(107));
|
||||
make.width.mas_equalTo(popImageView);
|
||||
make.centerX.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
UILabel * detailLabel = [[UILabel alloc] init];
|
||||
detailLabel.text = @"本人郑重承诺,认真履行自主防疫责任,填报相关内容全部属实";
|
||||
detailLabel.textColor = CFontColor1;
|
||||
detailLabel.font = BOLDSYSTEMFONT(16);
|
||||
detailLabel.numberOfLines = 2;
|
||||
detailLabel.textAlignment = NSTextAlignmentCenter;
|
||||
[popImageView addSubview:detailLabel];
|
||||
|
||||
[detailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(titLabel.mas_bottom).offset(20);
|
||||
make.height.mas_equalTo(40);
|
||||
make.left.mas_equalTo(popImageView.mas_left).offset(50.5);
|
||||
make.right.mas_equalTo(popImageView.mas_right).offset(-40.5);
|
||||
}];
|
||||
|
||||
UIButton * cancalBtn = [[UIButton alloc] init];
|
||||
[cancalBtn setTitle:@"取消" forState:UIControlStateNormal];
|
||||
[cancalBtn setTitleColor:UIColorHex(#394356) forState:UIControlStateNormal];
|
||||
[cancalBtn addTarget:self action:@selector(cancelClick) forControlEvents: UIControlEventTouchUpInside];
|
||||
[popImageView addSubview:cancalBtn];
|
||||
|
||||
[cancalBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(@0);
|
||||
make.left.mas_equalTo(popImageView.mas_left).offset(35);
|
||||
make.height.mas_equalTo(50);
|
||||
make.width.mas_equalTo((popImageView.width-20)/2);
|
||||
}];
|
||||
|
||||
|
||||
UIButton * sureBtn = [[UIButton alloc] init];
|
||||
[sureBtn setTitleColor:UIColorHex(#77849E) forState:UIControlStateNormal];
|
||||
sureBtn.titleLabel.font = SYSTEMFONT(17);
|
||||
[popImageView addSubview:sureBtn];
|
||||
|
||||
[sureBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(@0);
|
||||
make.left.mas_equalTo(cancalBtn.mas_right);
|
||||
make.height.mas_equalTo(50);
|
||||
make.width.mas_equalTo(cancalBtn);
|
||||
}];
|
||||
|
||||
|
||||
|
||||
|
||||
__block int timeout=3; //倒计时时间
|
||||
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
|
||||
dispatch_source_t _timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0,queue);
|
||||
dispatch_source_set_timer(_timer,dispatch_walltime(NULL, 0),1.0*NSEC_PER_SEC, 0); //每秒执行
|
||||
dispatch_source_set_event_handler(_timer, ^{
|
||||
if(timeout<=0){ //倒计时结束,关闭
|
||||
dispatch_source_cancel(_timer);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
//设置界面的按钮显示 根据自己需求设置
|
||||
[sureBtn setTitleColor:UIColorMain forState:UIControlStateNormal];
|
||||
[sureBtn setTitle:@"确定" forState:UIControlStateNormal];
|
||||
[sureBtn addTarget:self action:@selector(cancelClick) forControlEvents:UIControlEventTouchUpInside];
|
||||
sureBtn.userInteractionEnabled = YES;
|
||||
});
|
||||
}else{
|
||||
int seconds = timeout;
|
||||
NSString *strTime = [NSString stringWithFormat:@"%.2d", seconds];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
//让按钮变为不可点击的灰色
|
||||
sureBtn.userInteractionEnabled = NO;
|
||||
//设置界面的按钮显示 根据自己需求设置
|
||||
[UIView beginAnimations:nil context:nil];
|
||||
[UIView setAnimationDuration:1];
|
||||
[sureBtn setTitle:[NSString stringWithFormat:@"%@秒后点击确认",strTime] forState:UIControlStateNormal];
|
||||
[UIView commitAnimations];
|
||||
});
|
||||
timeout--;
|
||||
}
|
||||
});
|
||||
dispatch_resume(_timer);
|
||||
}
|
||||
|
||||
- (void)cancelClick {
|
||||
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// YXDownToolsManager.h
|
||||
// DoctorXinjiang
|
||||
//
|
||||
// Created by 仁康信息 on 2023/12/1.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "ReaderViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXDownToolsManager : NSObject <ReaderViewControllerDelegate>
|
||||
|
||||
+ (void)downLoadReportWithURL:(NSString *)PDFURL withFileName:(NSString *)fileName;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-103
@@ -1,103 +0,0 @@
|
||||
//
|
||||
// YXDownToolsManager.m
|
||||
// DoctorXinjiang
|
||||
//
|
||||
// Created by 仁康信息 on 2023/12/1.
|
||||
//
|
||||
|
||||
#import "YXDownToolsManager.h"
|
||||
@implementation YXDownToolsManager
|
||||
|
||||
+ (void)downLoadReportWithURL:(NSString *)PDFURL withFileName:(NSString *)fileName
|
||||
{
|
||||
|
||||
[self downLoadPdfFileByUrl:PDFURL fileName:[NSString stringWithFormat:@"%@.pdf",fileName]];
|
||||
|
||||
}
|
||||
|
||||
+(__kindof NSURLSessionTask *)downloadWithURL:(NSString *)URL
|
||||
fileDir:(NSString *)fileDir
|
||||
progress:(void(^)(NSProgress *progress))progress
|
||||
success:(void(^)(NSString *filePath))success
|
||||
failure:(void(^)(NSError *error))failure{
|
||||
|
||||
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
|
||||
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:URL]];
|
||||
NSURLSessionDownloadTask *downloadTask = [manager downloadTaskWithRequest:request progress:^(NSProgress * _Nonnull downloadProgress) {
|
||||
//下载进度
|
||||
progress ? progress(downloadProgress) : nil;
|
||||
NSLog(@"下载进度:%.2f%%",100.0*downloadProgress.completedUnitCount/downloadProgress.totalUnitCount);
|
||||
} destination:^NSURL * _Nonnull(NSURL * _Nonnull targetPath, NSURLResponse * _Nonnull response) {
|
||||
|
||||
//拼接缓存目录
|
||||
NSString *downloadStr = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] ;
|
||||
|
||||
//拼接文件路径
|
||||
NSString *filePath = [downloadStr stringByAppendingPathComponent:fileDir];
|
||||
|
||||
NSLog(@"downloadStr = %@",downloadStr);
|
||||
return [NSURL fileURLWithPath:filePath];
|
||||
|
||||
} completionHandler:^(NSURLResponse * _Nonnull response, NSURL * _Nullable filePath, NSError * _Nullable error) {
|
||||
NSLog(@"%@---%@", filePath, filePath.absoluteString);
|
||||
success ? success(filePath.absoluteString /** NSURL->NSString*/) : nil;
|
||||
failure && error ? failure(error) : nil;
|
||||
}];
|
||||
//开始下载
|
||||
[downloadTask resume];
|
||||
return downloadTask;
|
||||
|
||||
}
|
||||
|
||||
//下载pdf文件
|
||||
+(void)downLoadPdfFileByUrl:(NSString *)url fileName:(NSString *)fileName
|
||||
{
|
||||
//如果存在直接打开
|
||||
if ([self isFileExist:fileName]) {
|
||||
//获取路径
|
||||
NSString *documentsPath = [ReaderDocument documentsPath];
|
||||
//可根据路径command + shift + G查看该路径下的所有的pdf文件
|
||||
NSLog(@"%@", documentsPath);
|
||||
NSString *filePath = [documentsPath stringByAppendingPathComponent:fileName];
|
||||
ReaderDocument *document = [ReaderDocument withDocumentFilePath:filePath password:nil];
|
||||
if (document != nil)
|
||||
{
|
||||
ReaderViewController *readerViewController = [[ReaderViewController alloc] initWithReaderDocument:document];
|
||||
|
||||
readerViewController.delegate = self;
|
||||
[[HQCommonUtils getCurrentVC] presentViewController:readerViewController animated:YES completion:nil];
|
||||
}
|
||||
}else{
|
||||
|
||||
[self downloadWithURL:url fileDir:fileName progress:^(NSProgress *progress) {
|
||||
|
||||
} success:^(NSString *filePath) {
|
||||
NSLog(@"%@", filePath);
|
||||
//下载完成直接打开
|
||||
[self downLoadPdfFileByUrl:url fileName:fileName];
|
||||
} failure:^(NSError *error) {
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
#pragma mark ReaderViewControllerDelegate因为PDF阅读器可能是push出来的,也可能是present出来的,为了更好的效果,这个代理方法可以实现很好的退出
|
||||
+ (void)dismissReaderViewController:(ReaderViewController *)viewController{
|
||||
[[HQCommonUtils getCurrentVC] dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma 判断文件是否存在
|
||||
+(BOOL)isFileExist:(NSString *)fileName
|
||||
{
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||
NSString *path = [paths objectAtIndex:0];
|
||||
NSString *filePath = [path stringByAppendingPathComponent:fileName];
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
BOOL result = [fileManager fileExistsAtPath:filePath];
|
||||
NSLog(@"这个文件已经存在:%@",result?@"是的":@"不存在");
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
-99
@@ -1,99 +0,0 @@
|
||||
//
|
||||
// YXHealthPhyReportModel.h
|
||||
// DoctorXinjiang
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/28.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
//新增影像报告
|
||||
|
||||
|
||||
@interface YXThirdResultResModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * third_tId;
|
||||
@property (nonatomic, copy) NSString * type;
|
||||
|
||||
@property (nonatomic, copy) NSString * userResultId;
|
||||
@property (nonatomic, copy) NSString * peItemName;
|
||||
@property (nonatomic, copy) NSString * uniItemId;
|
||||
@property (nonatomic, copy) NSString * printContext;
|
||||
@property (nonatomic, copy) NSString * peResult;
|
||||
@property (nonatomic, copy) NSString * unit;
|
||||
@property (nonatomic, copy) NSString * colour;
|
||||
@property (nonatomic, copy) NSString * textFlag;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface YXImageItemListModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * imageCheckName;
|
||||
@property (nonatomic, copy) NSString * imageShowUrl;
|
||||
@property (nonatomic, copy) NSString * imageClass;
|
||||
@property (nonatomic, copy) NSString * studyInsId;
|
||||
@property (nonatomic, copy) NSString * reportContent;
|
||||
@property (nonatomic, copy) NSString * reportUrl;
|
||||
@property (nonatomic, copy) NSString * reportDate;
|
||||
@property (nonatomic, copy) NSString * imageClassName;
|
||||
@property (nonatomic, assign) CGFloat textHeight;
|
||||
@property (nonatomic, assign) CGFloat cellHeight;
|
||||
|
||||
@end
|
||||
|
||||
@interface YXSenResultResModel : NSObject
|
||||
@property (nonatomic, copy) NSString * uniItemClassId;
|
||||
@property (nonatomic, copy) NSString * uniItemClassName;
|
||||
@property (nonatomic, strong) NSArray<YXThirdResultResModel *> * thirdResultRes;
|
||||
|
||||
@end
|
||||
|
||||
@interface YXResultItemResListModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * analysisId;
|
||||
@property (nonatomic, copy) NSString * analysisName;
|
||||
@property (nonatomic, copy) NSString * empBirthday;
|
||||
@property (nonatomic, copy) NSString * medicalYear;
|
||||
@property (nonatomic, assign) NSInteger rowNumber;
|
||||
@property (nonatomic, strong) NSArray<YXSenResultResModel *> * senResultRes;
|
||||
@property (nonatomic, strong) NSArray<YXThirdResultResModel *> * allResultArray;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@interface YXHealthPhyReportModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * report_id;
|
||||
@property (nonatomic, copy) NSString * userId;
|
||||
@property (nonatomic, copy) NSString * userName;
|
||||
@property (nonatomic, copy) NSString * sex;
|
||||
@property (nonatomic, copy) NSString * sex_dictText;
|
||||
@property (nonatomic, copy) NSString * age;
|
||||
@property (nonatomic, copy) NSString * card;
|
||||
@property (nonatomic, copy) NSString * mobilePhone;
|
||||
@property (nonatomic, copy) NSString * peQueueDate;
|
||||
@property (nonatomic, copy) NSString * empBirthday;
|
||||
@property (nonatomic, copy) NSString * medicalYear;
|
||||
@property (nonatomic, copy) NSString * suggest;
|
||||
@property (nonatomic, copy) NSString * conclusion;
|
||||
@property (nonatomic, copy) NSString * email;
|
||||
@property (nonatomic, copy) NSString * empNativeplace;
|
||||
@property (nonatomic, copy) NSString * hospitalName;
|
||||
|
||||
|
||||
@property (nonatomic, assign) BOOL zhangkaiSug;
|
||||
@property (nonatomic, assign) BOOL zhangkaiCon;
|
||||
|
||||
|
||||
|
||||
@property (nonatomic, strong) NSArray<YXResultItemResListModel *> * resultItemResList;
|
||||
|
||||
@property (nonatomic, strong) NSArray<YXImageItemListModel *> * imageItemList;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-80
@@ -1,80 +0,0 @@
|
||||
//
|
||||
// YXHealthPhyReportModel.m
|
||||
// DoctorXinjiang
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/28.
|
||||
//
|
||||
|
||||
#import "YXHealthPhyReportModel.h"
|
||||
|
||||
@implementation YXThirdResultResModel
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
NSDictionary * dic =@{@"third_tId" :@"id"};
|
||||
return dic;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXImageItemListModel
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXSenResultResModel
|
||||
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass
|
||||
{
|
||||
|
||||
return @{
|
||||
|
||||
@"thirdResultRes":[YXThirdResultResModel class]
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation YXResultItemResListModel
|
||||
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass
|
||||
{
|
||||
|
||||
return @{
|
||||
@"senResultRes":[YXSenResultResModel class],
|
||||
@"allResultArray":[YXThirdResultResModel class]
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXHealthPhyReportModel
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
NSDictionary * dic =@{@"report_id" :@"id"};
|
||||
return dic;
|
||||
}
|
||||
|
||||
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass
|
||||
{
|
||||
|
||||
return @{
|
||||
@"resultItemResList":[YXResultItemResListModel class],
|
||||
@"imageItemList":[YXImageItemListModel class]
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// YXLookReportImageViewController.h
|
||||
// DoctorXinjiang
|
||||
//
|
||||
// Created by Apple on 2024/2/26.
|
||||
//
|
||||
|
||||
#import <WebKit/WebKit.h>
|
||||
#import <JavaScriptCore/JavaScriptCore.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXLookReportImageViewController : YXBaseViewController
|
||||
|
||||
@property (nonatomic, strong) NSString * webTitle;
|
||||
|
||||
@property (nonatomic, strong) NSString * webUrl;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-173
@@ -1,173 +0,0 @@
|
||||
//
|
||||
// YXLookReportImageViewController.m
|
||||
// DoctorXinjiang
|
||||
//
|
||||
// Created by Apple on 2024/2/26.
|
||||
//
|
||||
|
||||
#import "YXLookReportImageViewController.h"
|
||||
|
||||
@interface YXLookReportImageViewController ()<UINavigationControllerDelegate, UIImagePickerControllerDelegate>
|
||||
|
||||
@property (nonatomic, strong)NSURL *originalUrl;
|
||||
@property (nonatomic, copy)NSString *videoUrl;
|
||||
@property (nonatomic, copy)NSString *messageType;
|
||||
@property (nonatomic, strong) WKWebView * wkWebView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXLookReportImageViewController
|
||||
|
||||
|
||||
#pragma mark - LifeCycle
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
self.isHidenNaviBar = false;
|
||||
[self addNavigationItemWithImageNames:@[@"whiteBack_icon"] isLeft:YES target:self action:@selector(backVC) tags:@[@""]];
|
||||
|
||||
if (self.webTitle) {
|
||||
self.navigationItem.title = self.webTitle;
|
||||
}
|
||||
[self.view addSubview:self.wkWebView];
|
||||
[self webViewRequest];
|
||||
}
|
||||
|
||||
- (void)backVC {
|
||||
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated{
|
||||
[super viewWillDisappear:animated];
|
||||
_wkWebView.navigationDelegate = nil;
|
||||
_wkWebView.UIDelegate = nil;
|
||||
//清除cookies
|
||||
NSHTTPCookie *cookie;
|
||||
NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
|
||||
for (cookie in [storage cookies]) {
|
||||
[storage deleteCookie:cookie];
|
||||
}
|
||||
[[NSURLCache sharedURLCache] removeAllCachedResponses];
|
||||
[self clearWebViewCache];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark 懒加载
|
||||
-(WKWebView *)wkWebView{
|
||||
if (!_wkWebView) {
|
||||
|
||||
NSString *jScript = @"var meta = document.createElement('meta'); meta.setAttribute('name', 'viewport'); meta.setAttribute('content', 'width=device-width,initial-scale=1,minimum-scale=0.25,maximum-scale=2,user-scalable=yes'); document.getElementsByTagName('head')[0].appendChild(meta); var imgs = document.getElementsByTagName('img');for (var i in imgs){imgs[i].style.maxWidth='100%';imgs[i].style.height='auto';}";
|
||||
|
||||
|
||||
WKUserScript *wkUScript = [[WKUserScript alloc] initWithSource:jScript injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:YES];
|
||||
WKUserContentController *wkUController = [[WKUserContentController alloc] init];
|
||||
[wkUController addUserScript:wkUScript];
|
||||
WKWebViewConfiguration *wkWebConfig = [[WKWebViewConfiguration alloc] init];
|
||||
wkWebConfig.userContentController = wkUController;
|
||||
|
||||
_wkWebView = [[WKWebView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) configuration:wkWebConfig];
|
||||
_wkWebView.allowsBackForwardNavigationGestures = true;
|
||||
}
|
||||
return _wkWebView;
|
||||
}
|
||||
|
||||
|
||||
- (void)webViewRequest{
|
||||
NSString *urlString = self.webUrl;
|
||||
[self hiddenAllMBProgressHUD];
|
||||
if (urlString.length > 0) {
|
||||
[self showMBProgressHUDOnlyWithString:@"加载中"];
|
||||
NSURL *url = [NSURL URLWithString:urlString];
|
||||
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url];
|
||||
if (self.wkWebView) {
|
||||
[self.wkWebView loadRequest:urlRequest];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#pragma mark - WKNavigationDelegate
|
||||
- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message{
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - WKScriptMessageHandler
|
||||
- (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
if (!navigationAction.targetFrame.isMainFrame) {
|
||||
[webView loadRequest:navigationAction.request];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation{
|
||||
if (!self.webTitle) {
|
||||
self.title = @"加载中...";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation{
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
if (!self.webTitle) {
|
||||
self.title = webView.title;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(nonnull NSError *)error{
|
||||
[self hiddenAllMBProgressHUD];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - 自定义
|
||||
- (void)onBackClicked{
|
||||
if ( self.wkWebView.canGoBack){
|
||||
[self.wkWebView goBack];
|
||||
} else {
|
||||
[self clearWebViewCache];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)clearWebViewCache{
|
||||
if (iOS9Later) {
|
||||
NSSet *websiteDataTypes = [WKWebsiteDataStore allWebsiteDataTypes];
|
||||
NSDate *dateFrom = [NSDate dateWithTimeIntervalSince1970:0];
|
||||
[[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:websiteDataTypes modifiedSince:dateFrom completionHandler:^{
|
||||
NSLog(@"-----clear webView cache success------");
|
||||
}];
|
||||
} else {
|
||||
NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0];
|
||||
NSString *cookiesFolderPath = [libraryPath stringByAppendingString:@"/Cookies"];
|
||||
NSError *errors;
|
||||
[[NSFileManager defaultManager] removeItemAtPath:cookiesFolderPath error:&errors];
|
||||
if (!errors) {
|
||||
NSLog(@"-----clear wkWebView cache success------");
|
||||
}
|
||||
}
|
||||
}
|
||||
- (NSString *)URLEncodedString:(NSString *)urlString{
|
||||
NSString *encodePath ;
|
||||
if (!IOS7) {
|
||||
encodePath = [urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||
}else{
|
||||
encodePath = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
||||
}return encodePath;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - SETTER
|
||||
|
||||
- (void)setWebUrl:(NSString *)webUrl{
|
||||
_webUrl = webUrl;
|
||||
[self webViewRequest];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
//
|
||||
// YXQuestionDetailViewController.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/27.
|
||||
//
|
||||
|
||||
#import "YXBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXQuestionDetailViewController : YXBaseViewController
|
||||
|
||||
@property (nonatomic, copy) NSString * question_id;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-744
@@ -1,744 +0,0 @@
|
||||
//
|
||||
// YXQuestionDetailViewController.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/27.
|
||||
//
|
||||
|
||||
#import "YXQuestionDetailViewController.h"
|
||||
#import "DetailUserInfoView.h"
|
||||
#import "DetailTitleView.h"
|
||||
#import "QuestionAppointmentTimeView.h"
|
||||
#import "QuestionFileDataView.h"
|
||||
#import "QuestionHealthInfoView.h"
|
||||
#import "QuestionReportView.h"
|
||||
#import "YXRecoredListDetailModel.h"
|
||||
#import "YXQuestionBodyReportModel.h"
|
||||
#import "RefuseQuestionPopView.h"
|
||||
#import "YXCancelReasonModel.h"
|
||||
#import "XJDFileDataDetailViewController.h"
|
||||
#import "YXDTTestView.h"
|
||||
#import "TUIConversationListBaseDataProvider.h"
|
||||
|
||||
#import <ImSDK_Plus/ImSDK_Plus.h>
|
||||
#import <TIMCommon/TIMDefine.h>
|
||||
#import <TUICore/TUICore.h>
|
||||
#import <TUICore/TUILogin.h>
|
||||
#import "TUIConversationCellData.h"
|
||||
@interface YXQuestionDetailViewController ()<TUICallObserver>
|
||||
|
||||
@property (nonatomic, strong) UIScrollView * mainScrollView;
|
||||
|
||||
@property (nonatomic, strong) DetailTitleView * titleview;
|
||||
|
||||
@property (nonatomic, strong) DetailUserInfoView * infoView;
|
||||
|
||||
@property (nonatomic, strong) QuestionAppointmentTimeView * timeView;
|
||||
|
||||
@property (nonatomic, strong) QuestionFileDataView * fileView;
|
||||
|
||||
@property (nonatomic, strong) QuestionReportView * reportView;
|
||||
|
||||
@property (nonatomic, strong) QuestionHealthInfoView * healthView;
|
||||
|
||||
@property (nonatomic, strong) UIView * questionStartView;
|
||||
|
||||
@property (nonatomic, strong) UIButton * cancelBtn;
|
||||
|
||||
@property (nonatomic, strong) UIButton * acceptBtn;
|
||||
|
||||
@property (nonatomic, strong) UIButton * sendVideBtn;
|
||||
|
||||
@property (nonatomic, strong) RefuseQuestionPopView * popView;
|
||||
|
||||
@property (nonatomic, copy) NSString * conSession_id;
|
||||
|
||||
@property (nonatomic, copy) NSString * record_id;
|
||||
|
||||
@property (nonatomic, copy) NSString * idNo;
|
||||
|
||||
@property (nonatomic, copy) NSString * starTimeString;
|
||||
|
||||
@property (nonatomic, copy) NSString * endTimeString;
|
||||
|
||||
@property (nonatomic, strong) UILabel * questionStartLabel;
|
||||
|
||||
@property (nonatomic, copy) NSString * imId;
|
||||
|
||||
|
||||
@property (nonatomic, copy) NSString * endPhoneID;
|
||||
|
||||
@property (nonatomic, strong) YXRecoredDetailConsessionModel * timeModel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXQuestionDetailViewController
|
||||
|
||||
- (RefuseQuestionPopView *)popView {
|
||||
|
||||
if (!_popView) {
|
||||
MJWeakSelf
|
||||
_popView = [[RefuseQuestionPopView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
|
||||
_popView.upBlock = ^{
|
||||
|
||||
};
|
||||
|
||||
_popView.popBlock = ^(NSString * _Nonnull beizhuString, NSString * _Nonnull reasourString) {
|
||||
//拒绝提交
|
||||
[weakSelf cancelReasourSubmit:beizhuString withReasonType:reasourString];
|
||||
|
||||
};
|
||||
_popView.alpha = 0;
|
||||
|
||||
}
|
||||
return _popView;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.isHidenNaviBar = false;
|
||||
self.navigationItem.title = @"视频咨询";
|
||||
self.view.backgroundColor = UIColorHex(#E0E0E0);
|
||||
// Do any additional setup after loading the view.
|
||||
[self createUI];
|
||||
[self createData];
|
||||
[self getCancelReasourData];
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
UIImageView * topImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 200)];
|
||||
topImage.image = [UIImage imageNamed:@"questionDetailBack"];
|
||||
[self.view addSubview:topImage];
|
||||
|
||||
|
||||
|
||||
self.mainScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, kScreenWidth - kRealValue(30), kScreenHeight - kTopHeight - SafetyAreaHeight)];
|
||||
self.mainScrollView.showsVerticalScrollIndicator = false;
|
||||
self.mainScrollView.showsHorizontalScrollIndicator = false;
|
||||
self.mainScrollView.layer.cornerRadius = 8.0;
|
||||
self.mainScrollView.layer.masksToBounds = true;
|
||||
self.mainScrollView.backgroundColor = KClearColor;
|
||||
[self.view addSubview:self.mainScrollView];
|
||||
|
||||
DetailTitleView * titleview = [[DetailTitleView alloc] initWithFrame:CGRectMake(0, 0, self.mainScrollView.width, 33)];
|
||||
self.titleview = titleview;
|
||||
[self.mainScrollView addSubview:titleview];
|
||||
|
||||
//个人信息
|
||||
DetailUserInfoView * infoView = [[DetailUserInfoView alloc] initWithFrame:CGRectMake(0, titleview.bottom, kScreenWidth - kRealValue(30), kRealValue(103))];
|
||||
infoView.backgroundColor = KWhiteColor;
|
||||
self.infoView = infoView;
|
||||
[self.mainScrollView addSubview:infoView];
|
||||
|
||||
//预约时间
|
||||
QuestionAppointmentTimeView * timeView = [[QuestionAppointmentTimeView alloc] initWithFrame:CGRectMake(0, infoView.bottom + 1, kScreenWidth - kRealValue(30), kRealValue(64))];
|
||||
timeView.backgroundColor = KWhiteColor;
|
||||
self.timeView = timeView;
|
||||
[self.mainScrollView addSubview:timeView];
|
||||
//档案
|
||||
QuestionFileDataView * fileView = [[QuestionFileDataView alloc] initWithFrame:CGRectMake(0, timeView.bottom, kScreenWidth - kRealValue(30), kRealValue(64))];
|
||||
fileView.backgroundColor = KWhiteColor;
|
||||
fileView.height = fileView.fileHeight;
|
||||
self.fileView = fileView;
|
||||
fileView.fileBlock = ^{
|
||||
[self lookFileDetail];
|
||||
};
|
||||
[self.mainScrollView addSubview:fileView];
|
||||
//基本健康信息
|
||||
QuestionHealthInfoView * healthView = [[QuestionHealthInfoView alloc] initWithFrame:CGRectMake(0, fileView.bottom +1, kScreenWidth - kRealValue(30), kRealValue(1))];
|
||||
healthView.backgroundColor = KWhiteColor;
|
||||
self.healthView = healthView;
|
||||
self.questionStartView.layer.cornerRadius = 10.0;
|
||||
[self.mainScrollView addSubview:healthView];
|
||||
//体检报告
|
||||
QuestionReportView * reportView = [[QuestionReportView alloc] initWithFrame:CGRectMake(0, healthView.bottom +1, kScreenWidth - kRealValue(30), kRealValue(100))];
|
||||
reportView.backgroundColor = KWhiteColor;
|
||||
self.reportView = reportView;
|
||||
self.reportView.layer.cornerRadius = 10.0;
|
||||
self.reportView.layer.masksToBounds = true;
|
||||
// reportView.baogaoBlock = ^(YXPhyscialReportListModel * _Nonnull reportModel) {
|
||||
//
|
||||
// YXPhyReportDetailViewController * yearVC = [[YXPhyReportDetailViewController alloc] init];
|
||||
// yearVC.navTitle = reportModel.medicalYear;
|
||||
// yearVC.yearString = reportModel.report_id;
|
||||
// [self.navigationController pushViewController:yearVC animated:YES];
|
||||
//
|
||||
// };
|
||||
[self.mainScrollView addSubview:reportView];
|
||||
|
||||
//咨询开始时间
|
||||
self.questionStartView = [[UIView alloc] initWithFrame:CGRectMake(0, reportView.bottom, kScreenWidth - kRealValue(30), 1)];
|
||||
self.questionStartView.backgroundColor = KWhiteColor;
|
||||
self.questionStartView.layer.cornerRadius = 10.0;
|
||||
self.questionStartView.layer.masksToBounds = true;
|
||||
self.questionStartView.hidden = true;
|
||||
[self.mainScrollView addSubview:self.questionStartView];
|
||||
//
|
||||
UILabel * startLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(22), 100, 14)];
|
||||
startLabel.text = @"咨询开始时间";
|
||||
startLabel.font = BOLDSYSTEMFONT(13);
|
||||
startLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self.questionStartView addSubview:startLabel];
|
||||
|
||||
self.questionStartLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), startLabel.bottom + kRealValue(17), self.questionStartView.width - kRealValue(36), 13)];
|
||||
self.questionStartLabel.text = @"";
|
||||
self.questionStartLabel.font = BOLDSYSTEMFONT(13);
|
||||
self.questionStartLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self.questionStartView addSubview:self.questionStartLabel];
|
||||
|
||||
self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), reportView.bottom + kTopHeight);
|
||||
|
||||
UIButton * cancelBtn = [[UIButton alloc] initWithFrame:CGRectMake( self.mainScrollView.width/2 - kRealValue(155) , kScreenHeight - kTopHeight - 60 - SafetyAreaHeight , kRealValue(150), 40)];
|
||||
[cancelBtn setTitle:@"拒绝" forState:UIControlStateNormal];
|
||||
[cancelBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||
cancelBtn.titleLabel.font = SYSTEMFONT(18);
|
||||
cancelBtn.backgroundColor = KWhiteColor;
|
||||
cancelBtn.layer.cornerRadius = 18;
|
||||
cancelBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor;
|
||||
[cancelBtn addTarget:self action:@selector(cancelQuestionAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
cancelBtn.layer.masksToBounds = true;
|
||||
self.cancelBtn = cancelBtn;
|
||||
self.cancelBtn.hidden = YES;
|
||||
[self.mainScrollView addSubview:cancelBtn];
|
||||
|
||||
UIButton * acceptBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.mainScrollView.width/2 + kRealValue(5), cancelBtn.top , kRealValue(150), 40)];
|
||||
[acceptBtn setTitle:@"接受" forState:UIControlStateNormal];
|
||||
[acceptBtn setTitleColor:KWhiteColor forState:UIControlStateNormal];
|
||||
[acceptBtn addTarget:self action:@selector(waitAcceptAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
acceptBtn.titleLabel.font = SYSTEMFONT(18);
|
||||
acceptBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||
acceptBtn.layer.cornerRadius = 18;
|
||||
acceptBtn.layer.masksToBounds = true;
|
||||
self.acceptBtn = acceptBtn;
|
||||
self.acceptBtn.hidden = YES;
|
||||
[self.mainScrollView addSubview:acceptBtn];
|
||||
|
||||
//
|
||||
UIButton * videoBtn = [[UIButton alloc] initWithFrame:CGRectMake(kScreenWidth/2 + kRealValue(5), kScreenHeight - kTopHeight - 40 - SafetyAreaHeight , kRealValue(150), 40)];
|
||||
[videoBtn setTitle:@"视频通话" forState:UIControlStateNormal];
|
||||
[videoBtn setImage:[UIImage imageNamed:@"sendVideo_icon"] forState:UIControlStateNormal];
|
||||
[videoBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||
videoBtn.titleLabel.font = SYSTEMFONT(18);
|
||||
videoBtn.backgroundColor = KWhiteColor;
|
||||
videoBtn.layer.cornerRadius = 18;
|
||||
videoBtn.layer.masksToBounds = true;
|
||||
videoBtn.centerX = self.mainScrollView.centerX;
|
||||
self.sendVideBtn = videoBtn;
|
||||
[self.sendVideBtn addTarget:self action:@selector(sendVideoAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
self.sendVideBtn.hidden = YES;
|
||||
[self.mainScrollView addSubview:videoBtn];
|
||||
|
||||
self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), reportView.bottom + 35);
|
||||
}
|
||||
|
||||
- (void) createData {
|
||||
|
||||
[self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:NO];
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject:self.question_id forKey:@"id"];
|
||||
|
||||
YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"DeatilAPI" NeedToken:@""];
|
||||
|
||||
[detailApi GetRecoredQuestionDetail:parmDic];
|
||||
}
|
||||
|
||||
- (void)getCancelReasourData {
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
|
||||
YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"REASOURAPI" NeedToken:@""];
|
||||
|
||||
[detailApi GetCancelReasourData:parmDic];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||
{
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||
{
|
||||
|
||||
if ([tag isEqualToString:@"DeatilAPI"]) {
|
||||
|
||||
[self hiddenAllMBProgressHUD];
|
||||
NSDictionary * dic = response;
|
||||
|
||||
YXRecoredListDetailModel * model = [YXRecoredListDetailModel modelWithDictionary:dic];
|
||||
|
||||
YXReocrdconFamilyMembersDO * infoModel = [YXReocrdconFamilyMembersDO modelWithDictionary:model.conFamilyMembersDO];
|
||||
|
||||
YXRecoredDetailConsessionModel * timeModel = [YXRecoredDetailConsessionModel modelWithDictionary:model.conSession];
|
||||
self.timeModel = timeModel;
|
||||
YXRecoredconMedicalRecordsListDO * medicalModel = [YXRecoredconMedicalRecordsListDO modelWithDictionary:model.conMedicalRecordsListDO];
|
||||
//总的ID
|
||||
self.conSession_id = timeModel.consession_id;
|
||||
self.record_id = medicalModel.dangan_id;
|
||||
self.imId = infoModel.groupId;
|
||||
//个人信息
|
||||
self.infoView.userInfo = infoModel;
|
||||
//顶部时间
|
||||
self.titleview.createTime = timeModel.createTime;
|
||||
//预约时间
|
||||
self.timeView.model = model;
|
||||
//顶部时间高度
|
||||
self.timeView.height = self.timeView.doctorinfoHeight;
|
||||
//档案
|
||||
self.fileView.model = medicalModel;
|
||||
self.fileView.top = self.timeView.bottom;
|
||||
|
||||
//健康信息
|
||||
if (model.answer.count <= 0) {
|
||||
|
||||
self.healthView.hidden = YES;
|
||||
self.healthView.height = 1;
|
||||
|
||||
UIBezierPath * maskPath = [UIBezierPath bezierPathWithRoundedRect:self.fileView.bounds byRoundingCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight cornerRadii:CGSizeMake(10, 10)];
|
||||
|
||||
CAShapeLayer * maskLayer = [[CAShapeLayer alloc]init];
|
||||
|
||||
maskLayer.frame = self.fileView.bounds;
|
||||
|
||||
maskLayer.path = maskPath.CGPath;
|
||||
|
||||
self.fileView.layer.mask = maskLayer;
|
||||
|
||||
|
||||
}else
|
||||
{
|
||||
self.healthView.hidden = false;
|
||||
self.healthView.questionArray = model.answer;
|
||||
self.healthView.height = self.healthView.healthHeight;
|
||||
|
||||
UIBezierPath * maskPath = [UIBezierPath bezierPathWithRoundedRect:self.healthView.bounds byRoundingCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight cornerRadii:CGSizeMake(10, 10)];
|
||||
|
||||
CAShapeLayer * maskLayer = [[CAShapeLayer alloc]init];
|
||||
|
||||
maskLayer.frame = self.healthView.bounds;
|
||||
|
||||
maskLayer.path = maskPath.CGPath;
|
||||
|
||||
self.healthView.layer.mask = maskLayer;
|
||||
|
||||
}
|
||||
|
||||
// self.endTimeString = info
|
||||
self.idNo = model.idNo;
|
||||
|
||||
//是否体检报告
|
||||
if ([medicalModel.tfPermission integerValue] == 1) { //有体检报告
|
||||
// self.reportView.hidden = false;
|
||||
[self getBodyInfoReport:timeModel.fromAccount];
|
||||
// self.reportView.height = self.reportView.reportHeight;
|
||||
// self.reportView.top = self.healthView.bottom - 10;
|
||||
|
||||
}else
|
||||
{
|
||||
self.reportView.hidden = YES;
|
||||
self.reportView.height = 1;
|
||||
[self updateUI];
|
||||
|
||||
}
|
||||
// [self updateUI];
|
||||
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"BodyApi"]) {
|
||||
|
||||
// NSArray * dataArray = response;
|
||||
//
|
||||
// self.reportView.dataArray = dataArray;
|
||||
// self.reportView.top= self.healthView.bottom;
|
||||
// self.reportView.height = self.reportView.reportHeight;
|
||||
// self.mainScrollView.height = self.reportView.bottom + 35;
|
||||
// self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.reportView.bottom + 35);
|
||||
[self hiddenAllMBProgressHUD];
|
||||
NSDictionary * dic = response;
|
||||
|
||||
if (ValidDict(dic)) {
|
||||
|
||||
// YXPhyscialReportListModel * model = [YXPhyscialReportListModel modelWithDictionary:dic];
|
||||
// self.reportView.bodyModel =model;
|
||||
self.reportView.height = self.reportView.reportHeight;
|
||||
self.questionStartView.top = self.reportView.bottom + kRealValue(15);
|
||||
// [self updateFocusIfNeeded];
|
||||
// if (self.cancelBtn.hidden == false) {
|
||||
// self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.cancelBtn.bottom + 35);
|
||||
// }
|
||||
// if (self.sendVideBtn.hidden == false) {
|
||||
// self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.sendVideBtn.bottom + 35);
|
||||
// }
|
||||
// if (self.questionStartView.hidden == false) {
|
||||
// self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.questionStartView.bottom + 35);
|
||||
// }
|
||||
[self updateUI];
|
||||
}else
|
||||
{
|
||||
self.reportView.height = 1;
|
||||
self.reportView.hidden = true;
|
||||
[self updateUI];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"REASOURAPI"]) {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
NSArray * array = response;
|
||||
|
||||
NSMutableArray * dataArray = [[NSMutableArray alloc] init];
|
||||
|
||||
for (NSDictionary * reasourDic in array) {
|
||||
|
||||
YXCancelReasonModel * model = [YXCancelReasonModel modelWithDictionary:reasourDic];
|
||||
|
||||
[dataArray addObject:model];
|
||||
|
||||
}
|
||||
self.popView.dataArray = dataArray;
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"SUBMITREASOUR"]) {
|
||||
|
||||
[self.popView removeFromSuperview];
|
||||
[self hiddenAllMBProgressHUD];
|
||||
[self createData];
|
||||
}
|
||||
if([tag isEqualToString:@"ACCEPTQUESTION"]) {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
[self createData];
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"ENDPICTUREAPI"]) {
|
||||
|
||||
[self createData];
|
||||
}
|
||||
if ([tag isEqualToString:@"AgainQuestion"]) {
|
||||
|
||||
[self createData];
|
||||
[self hiddenAllMBProgressHUD];
|
||||
}
|
||||
if ([tag isEqualToString:@"IMAPI"]) {
|
||||
|
||||
NSDictionary * pamrDic = response;
|
||||
|
||||
IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:pamrDic];
|
||||
|
||||
IMUserInfoModel * iminfoModel = [[IMUserInfoModel alloc] init];
|
||||
iminfoModel.IMInfo = pamrDic;
|
||||
[HQCommonUtils keyedArchiverWithData:iminfoModel key:IMLoginUserInfo];
|
||||
|
||||
// 1. 从即时通信 IM 控制台获取应用 SDKAppID。
|
||||
// 2. 初始化 config 对象
|
||||
V2TIMSDKConfig *config = [[V2TIMSDKConfig alloc] init];
|
||||
// 3. 指定 log 输出级别。
|
||||
config.logLevel = V2TIM_LOG_INFO;
|
||||
// 4. 添加 V2TIMSDKListener 的事件监听器,self 是 id<V2TIMSDKListener> 的实现类,如果您不需要监听 IM SDK 的事件,这个步骤可以忽略。
|
||||
// 5. 初始化 IM SDK,调用这个接口后,可以立即调用登录接口。
|
||||
[[V2TIMManager sharedInstance] initSDK:[model.sdkAppId intValue] config:config];
|
||||
[ESCTUIManager loginInitTUISDKAppidWith:[model.sdkAppId intValue] UserID:model.userId userSig:model.userSig];
|
||||
[[TUICallEngine createInstance] init:[model.sdkAppId intValue] userId:model.userId userSig:model.userSig succ:^{
|
||||
|
||||
} fail:^(int code, NSString * _Nullable errMsg) {
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"STARSENDVIDE"]) {
|
||||
|
||||
[self hiddenAllMBProgressHUD];
|
||||
NSDictionary * dic = response;
|
||||
|
||||
NSString * groupId ;
|
||||
|
||||
if ([dic.allKeys containsObject:@"groupId"]) {
|
||||
|
||||
NSArray * memberArray = [dic objectForKey:@"member"];
|
||||
|
||||
[[TUICallEngine createInstance] addObserver:self];
|
||||
|
||||
[[TUICallKit createInstance] groupCall:[dic objectForKey:@"groupId"] userIdList:memberArray callMediaType:TUICallMediaTypeVideo];
|
||||
|
||||
[self hiddenAllMBProgressHUD];
|
||||
}
|
||||
|
||||
if ([ESCTUIManager TUIUserStatus] == false) {
|
||||
|
||||
|
||||
[self loginImAccount];
|
||||
return;
|
||||
}else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ([tag isEqualToString:@"ENDVideo"]) {
|
||||
[self createData];
|
||||
|
||||
}
|
||||
|
||||
if ([tag isEqualToString:@"beginVideo"]) {
|
||||
|
||||
self.endPhoneID = [NSString stringWithFormat:@"%@",response];
|
||||
[self createData];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateUI {
|
||||
|
||||
//健康信息布局
|
||||
self.healthView.top = self.fileView.bottom;
|
||||
// 体检信息布局
|
||||
self.reportView.top = self.healthView.bottom - 10;
|
||||
//开始视图布局
|
||||
self.questionStartView.top = self.healthView.bottom + kRealValue(15);
|
||||
//底部按钮布局
|
||||
self.cancelBtn.top = self.reportView.bottom + kRealValue(30);
|
||||
self.acceptBtn.top = self.reportView.bottom + kRealValue(30);
|
||||
self.sendVideBtn.top = self.reportView.bottom + kRealValue(30);
|
||||
|
||||
// 预约状态 1待确认 2待开始 3已开始 4待评价 5已完成
|
||||
// 6 拒绝 7取消 8 超时
|
||||
|
||||
|
||||
if ([self.timeModel.contentStatus intValue] == 1) {
|
||||
self.acceptBtn.hidden = false;
|
||||
self.cancelBtn.hidden = false;
|
||||
self.sendVideBtn.hidden = YES;
|
||||
self.questionStartView.hidden = true; //视图开始时间隐藏
|
||||
self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.cancelBtn.bottom + 60);
|
||||
|
||||
}
|
||||
if ([self.timeModel.contentStatus intValue] == 2 || [self.timeModel.contentStatus intValue] == 3) {
|
||||
self.acceptBtn.hidden = YES;
|
||||
self.cancelBtn.hidden = YES;
|
||||
self.sendVideBtn.hidden = false;
|
||||
self.questionStartView.hidden = false;
|
||||
NSTimeInterval starTimeInterval = [self.timeModel.doctorStartTimeLong longLongValue];
|
||||
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
||||
[formatter setDateFormat:@"yyyy年MM月dd HH:mm"];
|
||||
NSDate *date = [NSDate dateWithTimeIntervalSince1970:starTimeInterval/1000];
|
||||
NSString *timeString = [formatter stringFromDate:date];
|
||||
|
||||
NSTimeInterval endTimeInterval = [self.timeModel.doctorEndTimeLong longLongValue];
|
||||
NSDateFormatter * endformatter = [[NSDateFormatter alloc] init];
|
||||
[endformatter setDateFormat:@"HH:mm"];
|
||||
NSDate * enddate = [NSDate dateWithTimeIntervalSince1970:endTimeInterval/1000];
|
||||
NSString * endTimeString = [endformatter stringFromDate:enddate];
|
||||
self.questionStartView.height = kRealValue(100);
|
||||
self.questionStartLabel.text = [NSString stringWithFormat:@"%@~%@",timeString,endTimeString];
|
||||
self.questionStartView.top = self.reportView.bottom + kRealValue(15);
|
||||
self.sendVideBtn.top = self.questionStartView.bottom + kRealValue(30);
|
||||
self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.sendVideBtn.bottom + 35);
|
||||
|
||||
|
||||
}
|
||||
if ([self.timeModel.contentStatus intValue] >= 4 ) { //待评价 已完成
|
||||
self.acceptBtn.hidden = true;
|
||||
self.cancelBtn.hidden = true;
|
||||
self.sendVideBtn.hidden = true;
|
||||
NSTimeInterval starTimeInterval = [self.timeModel.doctorStartTimeLong longLongValue];
|
||||
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
||||
[formatter setDateFormat:@"yyyy年MM月dd HH:mm"];
|
||||
NSDate *date = [NSDate dateWithTimeIntervalSince1970:starTimeInterval/1000];
|
||||
NSString *timeString = [formatter stringFromDate:date];
|
||||
|
||||
NSTimeInterval endTimeInterval = [self.timeModel.doctorEndTimeLong longLongValue];
|
||||
NSDateFormatter * endformatter = [[NSDateFormatter alloc] init];
|
||||
[endformatter setDateFormat:@"HH:mm"];
|
||||
NSDate * enddate = [NSDate dateWithTimeIntervalSince1970:endTimeInterval/1000];
|
||||
NSString * endTimeString = [endformatter stringFromDate:enddate];
|
||||
|
||||
self.questionStartLabel.text = [NSString stringWithFormat:@"%@~%@",timeString,endTimeString];
|
||||
self.questionStartView.top = self.reportView.bottom + kRealValue(15);
|
||||
self.questionStartView.height = CGFLOAT_MIN;
|
||||
self.mainScrollView.contentSize = CGSizeMake(kScreenWidth - kRealValue(30), self.questionStartView.bottom + 60);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
- (void)loginImAccount {
|
||||
|
||||
|
||||
YXNetAPI * proctocolApi = [[YXNetAPI alloc] init:self tag:@"IMAPI" NeedToken:nil];
|
||||
[proctocolApi GetIMLoginAccount:nil];
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//请求体检信息
|
||||
- (void)getBodyInfoReport:(NSString *)byID {
|
||||
|
||||
|
||||
// NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
//
|
||||
// [parmDic setObject:byID forKey:@"sfzh"];
|
||||
//
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
|
||||
[parmDic setObject:byID forKey:@"userId"];
|
||||
|
||||
YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"BodyApi" NeedToken:@""];
|
||||
|
||||
[detailApi getBodyReportDeatil:parmDic];
|
||||
|
||||
|
||||
}
|
||||
|
||||
//拒绝
|
||||
- (void)cancelQuestionAction {
|
||||
|
||||
|
||||
[kApplication.keyWindow addSubview:self.popView];
|
||||
|
||||
[UIView animateWithDuration:0.5
|
||||
animations:^{
|
||||
self.popView.alpha = 1;
|
||||
}];
|
||||
}
|
||||
//发起视频通话
|
||||
- (void)sendVideoAction {
|
||||
|
||||
[self showMBProgressHUDWithString:@"视频通话请求中..." autoHidden:NO];
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject:self.question_id forKey:@"sessionId"];
|
||||
YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"STARSENDVIDE" NeedToken:@""];
|
||||
[detailApi getSendVideoStart:parmDic];
|
||||
}
|
||||
|
||||
|
||||
//提交拒绝原因
|
||||
- (void)cancelReasourSubmit:(NSString *)rejectReason withReasonType:(NSString *)reasonType {
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject: self.conSession_id forKey:@"id"];
|
||||
[parmDic setObject:rejectReason forKey:@"rejectReason"];
|
||||
[parmDic setObject:reasonType forKey:@"reasonType"];
|
||||
|
||||
YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"SUBMITREASOUR" NeedToken:@""];
|
||||
|
||||
[detailApi submitCancelreasourData:parmDic];
|
||||
|
||||
}
|
||||
|
||||
//接受请求
|
||||
- (void)waitAcceptAction {
|
||||
YXDTTestView *vi = [[YXDTTestView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
|
||||
[kAppWindow addSubview:vi];
|
||||
vi.returnBlock = ^(NSString *startTime, NSString *endTime) {
|
||||
NSLog(@"开始时间 = %@", startTime);
|
||||
NSLog(@"结束时间 = %@", endTime);
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject: self.conSession_id forKey:@"id"];
|
||||
[parmDic setObject:startTime forKey:@"startTime"];
|
||||
[parmDic setObject:endTime forKey:@"endTime"];
|
||||
|
||||
YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"ACCEPTQUESTION" NeedToken:@""];
|
||||
|
||||
[detailApi getAcceptQuestion:parmDic];
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
//点否 下次预约
|
||||
-(void)againSendVideoTime {
|
||||
|
||||
YXDTTestView *vi = [[YXDTTestView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
|
||||
[kAppWindow addSubview:vi];
|
||||
vi.returnBlock = ^(NSString *startTime, NSString *endTime) {
|
||||
NSLog(@"开始时间 = %@", startTime);
|
||||
NSLog(@"结束时间 = %@", endTime);
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject: self.conSession_id forKey:@"id"];
|
||||
[parmDic setObject:startTime forKey:@"startTime"];
|
||||
[parmDic setObject:endTime forKey:@"endTime"];
|
||||
[parmDic setObject:@(1) forKey:@"type"];
|
||||
[self showMBProgressHUDWithString:@"重新预约中" autoHidden:false];
|
||||
YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"AgainQuestion" NeedToken:@""];
|
||||
[detailApi getAgainSessionReservationDate:parmDic];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
//查看详情
|
||||
- (void)lookFileDetail {
|
||||
|
||||
XJDFileDataDetailViewController * detalVC = [[XJDFileDataDetailViewController alloc] init];
|
||||
detalVC.record_id = self.record_id;
|
||||
[self.navigationController pushViewController:detalVC animated:YES];
|
||||
|
||||
}
|
||||
|
||||
//开始通话
|
||||
- (void)onCallBegin:(TUIRoomId *)roomId callMediaType:(TUICallMediaType)callMediaType callRole:(TUICallRole)callRole {
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject: self.conSession_id forKey:@"id"];
|
||||
[parmDic setObject:@"" forKey:@"startTime"];
|
||||
[parmDic setObject:@"" forKey:@"endTime"];
|
||||
[parmDic setObject:@(2) forKey:@"type"];
|
||||
YXNetAPI * detailApi = [[YXNetAPI alloc] init:self tag:@"beginVideo" NeedToken:@""];
|
||||
[detailApi getAgainSessionReservationDate:parmDic];
|
||||
|
||||
}
|
||||
|
||||
//结束通话
|
||||
- (void)onCallEnd:(TUIRoomId *)roomId callMediaType:(TUICallMediaType)callMediaType callRole:(TUICallRole)callRole totalTime:(float)totalTime {
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject:self.endPhoneID forKey:@"id"];
|
||||
YXNetAPI * endApi = [[YXNetAPI alloc] init:self tag:@"ENDVideo" NeedToken:@""];
|
||||
[endApi getendVideoReportById:parmDic];
|
||||
|
||||
|
||||
|
||||
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"温馨提示" message:@"本次咨询是否已完成?" preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"否" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
|
||||
[self againSendVideoTime];
|
||||
|
||||
}];
|
||||
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"完成" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
||||
|
||||
[self endQuestionSelected];
|
||||
|
||||
}];
|
||||
[alertController addAction:cancelAction];
|
||||
[alertController addAction:sureAction];
|
||||
// 确保在主线程上显示 UIAlertController
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self presentViewController:alertController animated:YES completion:nil];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//结束本次咨询
|
||||
- (void)endQuestionSelected {
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject:self.question_id forKey:@"id"];
|
||||
YXNetAPI * endApi = [[YXNetAPI alloc] init:self tag:@"ENDPICTUREAPI" NeedToken:@""];
|
||||
[endApi GetEndPictureEndIMQuestion:parmDic];
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
#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
|
||||
-221
@@ -1,221 +0,0 @@
|
||||
//
|
||||
// YXSickNameSubTableViewCell.m
|
||||
// DoctorXinjiang
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/29.
|
||||
//
|
||||
|
||||
#import "YXSickNameSubTableViewCell.h"
|
||||
|
||||
|
||||
@interface YXSickNameSubTableViewCell ()
|
||||
|
||||
@property (nonatomic, strong) UILabel * nameLabel;
|
||||
@property (nonatomic, strong) UILabel * resultLabel;
|
||||
@property (nonatomic, strong) UILabel * danweiLabel;
|
||||
@property (nonatomic, strong) UILabel * caokaoLabel;
|
||||
@property (nonatomic, strong) UIButton * detailBtn;
|
||||
@property (nonatomic, strong) UIView * popbackView;
|
||||
@end
|
||||
|
||||
@implementation YXSickNameSubTableViewCell
|
||||
|
||||
- (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 {
|
||||
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
|
||||
|
||||
UIView * headView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, kScreenWidth - kRealValue(30), kRealValue(40))];
|
||||
headView.backgroundColor =KWhiteColor;
|
||||
[self.contentView addSubview:headView];
|
||||
|
||||
|
||||
|
||||
UILabel * nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, kRealValue(127), kRealValue(40))];
|
||||
nameLabel.text = @"";
|
||||
nameLabel.textAlignment = NSTextAlignmentCenter;
|
||||
nameLabel.font = SYSTEMFONT(13);
|
||||
nameLabel.numberOfLines = 2;
|
||||
self.nameLabel = nameLabel;
|
||||
[headView addSubview:nameLabel];
|
||||
|
||||
CGFloat tabWidth = (kScreenWidth - kRealValue(30) - kRealValue(127) - 4)/3;
|
||||
|
||||
UIView * lin_left = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, nameLabel.height)];
|
||||
lin_left.backgroundColor = CLineColor;
|
||||
[headView addSubview:lin_left];
|
||||
|
||||
UIView * linName = [[UIView alloc] initWithFrame:CGRectMake(nameLabel.right, 0, 1, nameLabel.height)];
|
||||
linName.backgroundColor = CLineColor;
|
||||
[headView addSubview:linName];
|
||||
|
||||
UILabel * reslutLabel = [[UILabel alloc] initWithFrame:CGRectMake(linName.right , 0, tabWidth, kRealValue(40))];
|
||||
reslutLabel.text = @"";
|
||||
reslutLabel.textAlignment = NSTextAlignmentCenter;
|
||||
reslutLabel.font = SYSTEMFONT(13);
|
||||
reslutLabel.textColor = UIColorHex(#333333);
|
||||
self.resultLabel = reslutLabel;
|
||||
reslutLabel.userInteractionEnabled = true;
|
||||
[headView addSubview:reslutLabel];
|
||||
|
||||
self.detailBtn = [[UIButton alloc] initWithFrame:CGRectMake(10, 10, tabWidth - 20, 20)];
|
||||
[self.detailBtn setTitle:@"详情" forState:UIControlStateNormal];
|
||||
[self.detailBtn setTitleColor:KWhiteColor forState:UIControlStateNormal];
|
||||
self.detailBtn.titleLabel.font = MEDIUMFONT(13);
|
||||
self.detailBtn.layer.cornerRadius = 5;
|
||||
self.detailBtn.backgroundColor = RGBA(33, 190, 189, 0.5);
|
||||
[self.detailBtn addTarget:self action:@selector(showResultDetail) forControlEvents:UIControlEventTouchUpInside];
|
||||
[reslutLabel addSubview:self.detailBtn];
|
||||
|
||||
UIView * resName = [[UIView alloc] initWithFrame:CGRectMake(reslutLabel.right, 0, 1, nameLabel.height)];
|
||||
resName.backgroundColor = CLineColor;
|
||||
[headView addSubview:resName];
|
||||
|
||||
UILabel * danweiLabel = [[UILabel alloc] initWithFrame:CGRectMake(resName.right, 0, tabWidth, kRealValue(40))];
|
||||
danweiLabel.text = @"";
|
||||
danweiLabel.textAlignment = NSTextAlignmentCenter;
|
||||
danweiLabel.font = SYSTEMFONT(13);
|
||||
danweiLabel.textColor = UIColorHex(#333333);
|
||||
self.danweiLabel = danweiLabel;
|
||||
[headView addSubview:danweiLabel];
|
||||
|
||||
UIView * danweiLine = [[UIView alloc] initWithFrame:CGRectMake(danweiLabel.right, 0, 1, nameLabel.height)];
|
||||
danweiLine.backgroundColor = CLineColor;
|
||||
[headView addSubview:danweiLine];
|
||||
|
||||
UILabel * zhiLabel = [[UILabel alloc] initWithFrame:CGRectMake(danweiLine.right, 0, tabWidth, kRealValue(40))];
|
||||
zhiLabel.text = @"";
|
||||
zhiLabel.textAlignment = NSTextAlignmentCenter;
|
||||
zhiLabel.textColor = UIColorHex(#333333);
|
||||
zhiLabel.font = SYSTEMFONT(13);
|
||||
self.caokaoLabel = zhiLabel;
|
||||
[headView addSubview:zhiLabel];
|
||||
|
||||
UIView * lin_right = [[UIView alloc] initWithFrame:CGRectMake(zhiLabel.right, 0, 1, nameLabel.height)];
|
||||
lin_right.backgroundColor = CLineColor;
|
||||
[headView addSubview:lin_right];
|
||||
|
||||
UIView * lin_bottom = [[UIView alloc] initWithFrame:CGRectMake(0, zhiLabel.bottom - 1, kScreenWidth - kRealValue(30), 1)];
|
||||
lin_bottom.backgroundColor = CLineColor;
|
||||
[headView addSubview:lin_bottom];
|
||||
}
|
||||
|
||||
- (void)setModel:(YXThirdResultResModel *)model {
|
||||
|
||||
_model = model;
|
||||
|
||||
if (ValidStr(_model.peResult)) {
|
||||
_model.peResult = @"/";
|
||||
}
|
||||
if (ValidStr(_model.unit)) {
|
||||
_model.unit = @"/";
|
||||
}
|
||||
if (ValidStr(_model.printContext)) {
|
||||
_model.printContext = @"/";
|
||||
}
|
||||
if (ValidStr(_model.peItemName)) {
|
||||
_model.peItemName = @"/";
|
||||
}
|
||||
self.nameLabel.text = _model.peItemName;
|
||||
|
||||
|
||||
if (_model.peResult.length >= 5) {
|
||||
|
||||
self.resultLabel.text =@"";
|
||||
self.detailBtn.hidden = false;
|
||||
}else
|
||||
{
|
||||
self.resultLabel.text = _model.peResult;
|
||||
self.detailBtn.hidden = true;
|
||||
}
|
||||
self.danweiLabel.text = _model.unit;
|
||||
self.caokaoLabel.text = _model.printContext;
|
||||
|
||||
|
||||
if ([_model.colour integerValue] == 1) {
|
||||
|
||||
self.nameLabel.textColor = UIColorHex(#DA180F);
|
||||
self.resultLabel.textColor = UIColorHex(#DA180F);
|
||||
self.danweiLabel.textColor = UIColorHex(#DA180F);
|
||||
self.caokaoLabel.textColor = UIColorHex(#DA180F);
|
||||
}else
|
||||
{
|
||||
self.nameLabel.textColor = UIColorHex(#333333);
|
||||
self.resultLabel.textColor = UIColorHex(#333333);
|
||||
self.danweiLabel.textColor = UIColorHex(#333333);
|
||||
self.caokaoLabel.textColor = UIColorHex(#333333);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)showResultDetail {
|
||||
|
||||
|
||||
UIView * popbackView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
|
||||
self.popbackView = popbackView;
|
||||
popbackView.backgroundColor = RGBA(0, 0, 0, 0.5);
|
||||
|
||||
|
||||
|
||||
UIScrollView * centerView = [[UIScrollView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(154), kScreenWidth - kRealValue(30), 200)];
|
||||
centerView.backgroundColor = KWhiteColor;
|
||||
centerView.layer.cornerRadius = 10.0;
|
||||
[popbackView addSubview:centerView];
|
||||
|
||||
UILabel * connteLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 20, centerView.width - 20, 50)];
|
||||
connteLabel.text = [NSString stringWithFormat:@"%@",self.model.peResult] ;
|
||||
connteLabel.numberOfLines = 0;
|
||||
connteLabel.font = SYSTEMFONT(14);
|
||||
connteLabel.textAlignment = NSTextAlignmentLeft;
|
||||
connteLabel.textColor = CFontColor1;
|
||||
[centerView addSubview:connteLabel];
|
||||
|
||||
CGFloat h = [HQCommonUtils getSpaceLabelHeight:connteLabel AndLeftisTrue:true withStr:connteLabel.text withFont:[UIFont systemFontOfSize:14] withWidth:connteLabel.width withLineSpacing:5];
|
||||
|
||||
connteLabel.height = h;
|
||||
|
||||
centerView.height = h + 69;
|
||||
|
||||
if (h > kScreenHeight - kRealValue(180)) {
|
||||
|
||||
centerView.height = kRealValue(450);
|
||||
centerView.contentSize = CGSizeMake(centerView.width, h);
|
||||
}
|
||||
|
||||
UIButton * sureBtn = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(15), centerView.bottom- 15, kScreenWidth - kRealValue(30), 49)];
|
||||
[sureBtn setTitle:@"确定" forState:UIControlStateNormal];
|
||||
sureBtn.titleLabel.font = SYSTEMFONT(13);
|
||||
sureBtn.backgroundColor = KWhiteColor;
|
||||
sureBtn.layer.cornerRadius = 10;
|
||||
[sureBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||
[sureBtn addTarget:self action:@selector(sureAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
[popbackView addSubview:sureBtn];
|
||||
|
||||
|
||||
[kAppWindow addSubview:popbackView];
|
||||
}
|
||||
|
||||
- (void)sureAction {
|
||||
|
||||
[self.popbackView removeFromSuperview];
|
||||
}
|
||||
@end
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
//
|
||||
// YXSickNameTopTableViewCell.h
|
||||
// DoctorXinjiang
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/29.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "YXHealthPhyReportModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void(^onekeyQuestionBlock)(NSString * itemID);
|
||||
|
||||
@interface YXSickNameTopTableViewCell : UITableViewCell
|
||||
|
||||
@property (nonatomic, strong) YXThirdResultResModel * model;
|
||||
@property (nonatomic, copy) onekeyQuestionBlock itemBlock;
|
||||
@property (nonatomic, copy) NSString * uniItemClassId;
|
||||
@property (nonatomic, assign) NSInteger questionType;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-134
@@ -1,134 +0,0 @@
|
||||
//
|
||||
// SickNameTopTableViewCell.m
|
||||
// DoctorXinjiang
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/29.
|
||||
//
|
||||
|
||||
#import "YXSickNameTopTableViewCell.h"
|
||||
|
||||
@interface YXSickNameTopTableViewCell ()
|
||||
|
||||
@property (nonatomic, strong ) UILabel * sickNameLabel;
|
||||
@property (nonatomic, strong ) YYLabel * oneKeyLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXSickNameTopTableViewCell
|
||||
|
||||
- (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 {
|
||||
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
UIView * linV = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(15), 2, kRealValue(13))];
|
||||
linV.backgroundColor = UIColorHex(#21BEBD);
|
||||
[self.contentView addSubview:linV];
|
||||
|
||||
self.sickNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(linV.right + kRealValue(10), kRealValue(15), 100, 16)];
|
||||
self.sickNameLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.sickNameLabel.font = BOLDSYSTEMFONT(15);
|
||||
self.sickNameLabel.textColor = CFontColor1;
|
||||
[self.contentView addSubview:self.sickNameLabel];
|
||||
|
||||
self.oneKeyLabel = [[YYLabel alloc] initWithFrame:CGRectMake(kScreenWidth - kRealValue(15) - 130 , kRealValue(15), 130, 16)];
|
||||
self.oneKeyLabel.textAlignment = NSTextAlignmentRight;
|
||||
self.oneKeyLabel.font = BOLDSYSTEMFONT(13);
|
||||
self.oneKeyLabel.textColor = KRedColor;
|
||||
self.oneKeyLabel.text = @"专家库一键咨询 >";
|
||||
self.oneKeyLabel.hidden = true;
|
||||
[self.oneKeyLabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
[self doctorQuestion];
|
||||
}];
|
||||
[self.contentView addSubview:self.oneKeyLabel];
|
||||
|
||||
UIView * headView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.sickNameLabel.bottom + kRealValue(12), kScreenWidth - kRealValue(30), kRealValue(40))];
|
||||
headView.backgroundColor = RGBA(33, 190, 189, 0.5);
|
||||
[self.contentView addSubview:headView];
|
||||
|
||||
UILabel * nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, kRealValue(127), kRealValue(40))];
|
||||
nameLabel.text = @"名称";
|
||||
nameLabel.textAlignment = NSTextAlignmentCenter;
|
||||
nameLabel.font = SYSTEMFONT(13);
|
||||
[headView addSubview:nameLabel];
|
||||
|
||||
CGFloat tabWidth = (kScreenWidth - kRealValue(30) - kRealValue(127) - 4)/3;
|
||||
|
||||
UIView * linName = [[UIView alloc] initWithFrame:CGRectMake(nameLabel.right, 0, 1, nameLabel.height)];
|
||||
linName.backgroundColor = CLineColor;
|
||||
[headView addSubview:linName];
|
||||
|
||||
UILabel * reslutLabel = [[UILabel alloc] initWithFrame:CGRectMake(linName.right , 0, tabWidth, kRealValue(40))];
|
||||
reslutLabel.text = @"结果";
|
||||
reslutLabel.textAlignment = NSTextAlignmentCenter;
|
||||
reslutLabel.font = SYSTEMFONT(13);
|
||||
[headView addSubview:reslutLabel];
|
||||
|
||||
UIView * resName = [[UIView alloc] initWithFrame:CGRectMake(reslutLabel.right, 0, 1, nameLabel.height)];
|
||||
resName.backgroundColor = CLineColor;
|
||||
[headView addSubview:resName];
|
||||
|
||||
UILabel * danweiLabel = [[UILabel alloc] initWithFrame:CGRectMake(resName.right, 0, tabWidth, kRealValue(40))];
|
||||
danweiLabel.text = @"单位";
|
||||
danweiLabel.textAlignment = NSTextAlignmentCenter;
|
||||
danweiLabel.font = SYSTEMFONT(13);
|
||||
[headView addSubview:danweiLabel];
|
||||
|
||||
UIView * danweiLine = [[UIView alloc] initWithFrame:CGRectMake(danweiLabel.right, 0, 1, nameLabel.height)];
|
||||
danweiLine.backgroundColor = CLineColor;
|
||||
[headView addSubview:danweiLine];
|
||||
|
||||
UILabel * zhiLabel = [[UILabel alloc] initWithFrame:CGRectMake(danweiLine.right, 0, tabWidth, kRealValue(40))];
|
||||
zhiLabel.text = @"参考值";
|
||||
zhiLabel.textAlignment = NSTextAlignmentCenter;
|
||||
zhiLabel.font = SYSTEMFONT(13);
|
||||
[headView addSubview:zhiLabel];
|
||||
}
|
||||
|
||||
- (void)setModel:(YXThirdResultResModel *)model {
|
||||
|
||||
_model = model;
|
||||
|
||||
self.sickNameLabel.text = _model.peItemName;
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (void)doctorQuestion {
|
||||
|
||||
if (self.itemBlock) {
|
||||
|
||||
self.itemBlock(self.model.third_tId);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setQuestionType:(NSInteger)questionType {
|
||||
|
||||
_questionType = questionType;
|
||||
|
||||
if (_questionType == 2) {
|
||||
self.oneKeyLabel.hidden = false;
|
||||
}else
|
||||
{
|
||||
self.oneKeyLabel.hidden = true;
|
||||
}
|
||||
|
||||
}
|
||||
@end
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// YXimageReportTableViewCell.h
|
||||
// DoctorXinjiang
|
||||
//
|
||||
// Created by Apple on 2024/2/23.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "YXHealthPhyReportModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void(^lookUserReport)(NSString * lookUrl);
|
||||
|
||||
@interface YXimageReportTableViewCell : UITableViewCell
|
||||
|
||||
@property (nonatomic, strong) YXImageItemListModel * model;
|
||||
|
||||
@property (nonatomic, copy) lookUserReport lookBlock;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-235
@@ -1,235 +0,0 @@
|
||||
//
|
||||
// imageReportTableViewCell.m
|
||||
// DoctorXinjiang
|
||||
//
|
||||
// Created by Apple on 2024/2/23.
|
||||
//
|
||||
|
||||
#import "YXimageReportTableViewCell.h"
|
||||
|
||||
@interface YXimageReportTableViewCell ()
|
||||
|
||||
@property (nonatomic, strong) UILabel * reportLabel;
|
||||
|
||||
@property (nonatomic, strong) UIView * reportConetView;
|
||||
|
||||
@property (nonatomic, strong) UILabel * resultLabel;
|
||||
|
||||
@property (nonatomic, strong) UIView * conteLineView;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * buttonArray;
|
||||
@property (nonatomic, strong) NSMutableArray * reportArray;
|
||||
@property (nonatomic, strong) NSMutableArray * imageArray;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXimageReportTableViewCell
|
||||
|
||||
- (NSMutableArray *)buttonArray {
|
||||
|
||||
if (!_buttonArray) {
|
||||
|
||||
_buttonArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _buttonArray;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)reportArray {
|
||||
|
||||
if (!_reportArray) {
|
||||
|
||||
_reportArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _reportArray;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)imnageArray {
|
||||
|
||||
if (!_imageArray) {
|
||||
|
||||
_imageArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _imageArray;
|
||||
}
|
||||
- (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 {
|
||||
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
UIView * linV = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(15), 2, kRealValue(13))];
|
||||
linV.backgroundColor = UIColorHex(#21BEBD);
|
||||
[self.contentView addSubview:linV];
|
||||
|
||||
self.reportLabel = [[UILabel alloc] initWithFrame:CGRectMake(linV.right + kRealValue(10), kRealValue(15), kScreenWidth - kRealValue(20), 16)];
|
||||
self.reportLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.reportLabel.font = BOLDSYSTEMFONT(15);
|
||||
self.reportLabel.textColor = CFontColor1;
|
||||
self.reportLabel.text = @"--";
|
||||
[self.contentView addSubview:self.reportLabel];
|
||||
|
||||
self.reportConetView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15),self.reportLabel.bottom + kRealValue(15), kScreenWidth - kRealValue(30), kRealValue(13))];
|
||||
self.reportConetView.backgroundColor = RGBA(245, 247, 251, 1);
|
||||
[self.contentView addSubview:self.reportConetView];
|
||||
|
||||
self.resultLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(16), kRealValue(15), self.reportConetView.width - kRealValue(32), 13)];
|
||||
self.resultLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.resultLabel.font = MEDIUMFONT(13);
|
||||
self.resultLabel.textColor = CFontColor1;
|
||||
self.resultLabel.numberOfLines = 0;
|
||||
self.resultLabel.text = @"--";
|
||||
[self.reportConetView addSubview:self.resultLabel];
|
||||
|
||||
self.conteLineView = [[UIView alloc] initWithFrame:CGRectMake(0,self.resultLabel.bottom + kRealValue(38), self.reportConetView.width, kRealValue(1))];
|
||||
self.conteLineView.backgroundColor = UIColorHex(#E7EAF2);
|
||||
[self.reportConetView addSubview:self.conteLineView];
|
||||
|
||||
}
|
||||
|
||||
- (void)setModel:(YXImageItemListModel *)model {
|
||||
|
||||
_model = model;
|
||||
|
||||
self.reportLabel.text = _model.imageCheckName;
|
||||
|
||||
self.resultLabel.text = _model.reportContent;
|
||||
|
||||
self.resultLabel.height = _model.textHeight;
|
||||
|
||||
if (_model.textHeight < 13) {
|
||||
|
||||
self.conteLineView.top = self.resultLabel.bottom + kRealValue(38);
|
||||
self.reportConetView.height = kRealValue(15) + 13 + kRealValue(38) + kRealValue(44);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.conteLineView.top = self.resultLabel.bottom + kRealValue(18);
|
||||
self.reportConetView.height = kRealValue(15) + _model.textHeight + kRealValue(18) + kRealValue(44);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for (UIButton * toolsBtn in self.buttonArray) {
|
||||
[toolsBtn removeFromSuperview];
|
||||
}
|
||||
[self.buttonArray removeAllObjects];
|
||||
[self.imnageArray removeAllObjects];
|
||||
[self.reportArray removeAllObjects];
|
||||
|
||||
//原始报告
|
||||
CGFloat buttonW = (self.reportConetView.width - kRealValue(75) )/ 4; //1行最多4个
|
||||
|
||||
NSArray * yuanshiArray = [_model.reportUrl componentsSeparatedByString:@","];
|
||||
[self.reportArray addObjectsFromArray:yuanshiArray];
|
||||
CGFloat lastX = 0;
|
||||
for (int i = 0 ; i < yuanshiArray.count; i ++) {
|
||||
|
||||
UIButton * lookYuanshi = [[UIButton alloc] initWithFrame:CGRectMake(self.reportConetView.width - kRealValue(15) - (buttonW + kRealValue(15)) * i, self.conteLineView.bottom + kRealValue(6), kRealValue(80), kRealValue(30))];
|
||||
[lookYuanshi setTitle:@"原始报告" forState:UIControlStateNormal];
|
||||
lookYuanshi.titleLabel.font = SYSTEMFONT(13);
|
||||
lookYuanshi.layer.cornerRadius = 15.0;
|
||||
lookYuanshi.layer.borderWidth = 1.0;
|
||||
[lookYuanshi setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||
lookYuanshi.layer.borderColor = UIColorHex(#21BEBD).CGColor;
|
||||
lookYuanshi.layer.masksToBounds = true;
|
||||
lookYuanshi.tag = 2000+ i;
|
||||
[self.buttonArray addObject:lookYuanshi];
|
||||
|
||||
}
|
||||
//影像原片
|
||||
NSArray * yingxiangArray = [_model.imageShowUrl componentsSeparatedByString:@","];
|
||||
[self.imageArray addObjectsFromArray:yingxiangArray];
|
||||
for (int i = 0 ; i < yingxiangArray.count; i ++) {
|
||||
|
||||
UIButton * lookyingxiang = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(15) - (buttonW + kRealValue(15)) * i, self.conteLineView.bottom + kRealValue(6), kRealValue(80), kRealValue(30))];
|
||||
[lookyingxiang setTitle:@"影像原片" forState:UIControlStateNormal];
|
||||
lookyingxiang.titleLabel.font = SYSTEMFONT(13);
|
||||
lookyingxiang.layer.cornerRadius = 15.0;
|
||||
lookyingxiang.layer.borderWidth = 1.0;
|
||||
lookyingxiang.layer.borderColor = UIColorHex(#21BEBD).CGColor;
|
||||
lookyingxiang.layer.masksToBounds = true;
|
||||
[lookyingxiang setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||
|
||||
lookyingxiang.tag = 1000+ i;
|
||||
[self.buttonArray addObject:lookyingxiang];
|
||||
}
|
||||
|
||||
|
||||
|
||||
//布局多组按钮
|
||||
//一行的列数
|
||||
NSInteger cols = 4;
|
||||
//label大小
|
||||
CGFloat labW = buttonW ;
|
||||
CGFloat labH = kRealValue(30);
|
||||
CGFloat pading = kRealValue(15);
|
||||
//每一行的间距
|
||||
CGFloat rowMargin = kRealValue(15);
|
||||
for (int index = 0; index < self.buttonArray.count ; index ++) {
|
||||
//所在列
|
||||
NSInteger col = index % cols;
|
||||
//所在行
|
||||
NSInteger row = index / cols;
|
||||
|
||||
CGFloat shopX = col * (labW + rowMargin);
|
||||
CGFloat shopY = row * (labH + rowMargin);
|
||||
UIButton * toolsBtn = self.buttonArray[index];
|
||||
toolsBtn.frame = CGRectMake(self.reportConetView.width - shopX - pading - buttonW , self.conteLineView.bottom + kRealValue(6) + shopY, labW, labH);
|
||||
if (index == self.buttonArray.count - 1) {
|
||||
lastX = toolsBtn.bottom + kRealValue(7);
|
||||
}
|
||||
[toolsBtn addTarget:self action:@selector(lookImageReport:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self.reportConetView addSubview:toolsBtn];
|
||||
|
||||
}
|
||||
self.reportConetView.height = lastX;
|
||||
|
||||
}
|
||||
|
||||
- (void)lookImageReport:(UIButton *)lookBtn {
|
||||
|
||||
NSLog(@"%d",lookBtn.tag);
|
||||
//影片原像
|
||||
if (lookBtn.tag < 2000) {
|
||||
|
||||
if (self.lookBlock) {
|
||||
self.lookBlock(self.imageArray[lookBtn.tag - 1000]);
|
||||
}
|
||||
|
||||
}else //原始报告
|
||||
{
|
||||
if (self.lookBlock) {
|
||||
self.lookBlock(self.reportArray[lookBtn.tag - 2000]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// YXAudioVideoRecordViewController.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/28.
|
||||
//
|
||||
|
||||
#import "YXBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXAudioVideoRecordViewController : YXBaseViewController
|
||||
|
||||
@property (nonatomic, assign) NSInteger questionType;
|
||||
@property (nonatomic, assign) NSInteger questionStatus; //待回复10 进行中20 已完成30 (时间充裕可优化枚举类型)
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-286
@@ -1,286 +0,0 @@
|
||||
//
|
||||
// YXAudioVideoRecordViewController.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/28.
|
||||
//
|
||||
|
||||
#import "YXAudioVideoRecordViewController.h"
|
||||
#import "QuestionRecoredTable.h"
|
||||
#import "YXQuestionDetailViewController.h"
|
||||
#import "LYEmptyView.h"
|
||||
#import "LYEmptyViewHeader.h"
|
||||
@interface YXAudioVideoRecordViewController ()
|
||||
|
||||
@property (nonatomic, strong) QuestionRecoredTable * homeTable;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * buttonArray;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * dataArray;
|
||||
|
||||
@property (nonatomic, assign) NSInteger pageNo;
|
||||
|
||||
@property (nonatomic, copy) NSString * status;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXAudioVideoRecordViewController
|
||||
|
||||
- (NSMutableArray *)dataArray {
|
||||
|
||||
if (!_dataArray) {
|
||||
|
||||
_dataArray = [[NSMutableArray alloc] init];
|
||||
|
||||
}
|
||||
return _dataArray;
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (NSMutableArray *)buttonArray {
|
||||
|
||||
if (!_buttonArray) {
|
||||
|
||||
_buttonArray = [[NSMutableArray alloc] init];
|
||||
|
||||
}
|
||||
return _buttonArray;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
self.isHidenNaviBar = false;
|
||||
self.navigationItem.title = @"视频咨询";
|
||||
[self createUI];
|
||||
[self createData];
|
||||
}
|
||||
|
||||
- (void)createData {
|
||||
|
||||
[self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:NO];
|
||||
YXNetAPI * listApi = [[YXNetAPI alloc] init:self tag:@"LIST" NeedToken:@""];
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject:@(self.pageNo) forKey:@"pageNo"];
|
||||
[parmDic setObject:@(10) forKey:@"pageSize"];
|
||||
[parmDic setObject:@"2" forKey:@"type"];
|
||||
[parmDic setObject:self.status forKey:@"status"];
|
||||
[listApi GetQuestionRecoredList:parmDic];
|
||||
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
|
||||
[super viewWillAppear:animated];
|
||||
[self.homeTable.mj_header beginRefreshing];
|
||||
|
||||
|
||||
}
|
||||
- (void)createUI {
|
||||
|
||||
NSArray * array = @[@"待确认",@"进行中",@"已完成"];
|
||||
[self.buttonArray removeAllObjects];
|
||||
CGFloat w = kRealValue(66);
|
||||
for (int index = 0; index < array.count; index ++) {
|
||||
|
||||
UIButton * listBtn = [[UIButton alloc] init];
|
||||
|
||||
listBtn.frame = CGRectMake(kRealValue(15) + (w + kRealValue(13)) * index , kRealValue(15), w, 27);
|
||||
[listBtn setTitle:array[index] forState:UIControlStateNormal];
|
||||
[listBtn setTitleColor:KWhiteColor forState:UIControlStateSelected];
|
||||
[listBtn setTitleColor:CFontColor1 forState:UIControlStateNormal];
|
||||
[listBtn addTarget:self action:@selector(statusChange:) forControlEvents:UIControlEventTouchUpInside];
|
||||
listBtn.titleLabel.font = SYSTEMFONT(13);
|
||||
listBtn.layer.cornerRadius = 14.0;
|
||||
listBtn.layer.masksToBounds = true;
|
||||
[self.view addSubview:listBtn];
|
||||
listBtn.tag = 100 + index;
|
||||
[self.buttonArray addObject:listBtn];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
self.homeTable = [[QuestionRecoredTable alloc] initWithFrame:CGRectMake(0, 50, kScreenWidth, kScreenHeight - kTopHeight - kRealValue(15) + 27 - SafetyAreaHeight - kRealValue(48)) style:UITableViewStyleGrouped];
|
||||
MJWeakSelf
|
||||
self.homeTable.videoBlock = ^(YXRecordIMListDateModel * _Nonnull model) {
|
||||
|
||||
YXQuestionDetailViewController * detailVC = [[YXQuestionDetailViewController alloc] init];
|
||||
detailVC.question_id = model.Record_id;
|
||||
[weakSelf.navigationController pushViewController:detailVC animated:YES];
|
||||
|
||||
};
|
||||
[self.view addSubview:self.homeTable];
|
||||
|
||||
|
||||
self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||
weakSelf.pageNo = 1;
|
||||
[self createData];
|
||||
|
||||
}];
|
||||
self.homeTable.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
|
||||
weakSelf.pageNo ++;
|
||||
[self createData];
|
||||
|
||||
}];
|
||||
|
||||
//初始化一个emptyView
|
||||
|
||||
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImage:[UIImage imageNamed:@"nodataPicture"] titleStr:@"暂无数据" detailStr:@""];
|
||||
|
||||
// LYEmptyView *emptyView = [LYEmptyView emptyActionViewWithImageStr:@"nodataPicture"
|
||||
// titleStr:@"无数据"
|
||||
// detailStr:@"请稍后再试!"
|
||||
// btnTitleStr:@"重新加载"
|
||||
// btnClickBlock:^{
|
||||
// [self createData];
|
||||
// }];
|
||||
//元素竖直方向的间距
|
||||
emptyView.subViewMargin = 20.f;
|
||||
//标题颜色
|
||||
emptyView.titleLabTextColor = UIColorHex(#666666);
|
||||
//描述字体
|
||||
emptyView.detailLabFont = [UIFont systemFontOfSize:16];
|
||||
//按钮背景色
|
||||
emptyView.imageSize = CGSizeMake(kRealValue(210), kRealValue(183));
|
||||
emptyView.contentViewY = kRealValue(160);
|
||||
//设置空内容占位图
|
||||
self.homeTable.ly_emptyView = emptyView;
|
||||
}
|
||||
|
||||
-(void)setQuestionStatus:(NSInteger)questionStatus {
|
||||
|
||||
_questionStatus = questionStatus;
|
||||
|
||||
|
||||
|
||||
switch (_questionStatus) {
|
||||
case 10:
|
||||
for (UIButton * seleBtn in self.buttonArray) {
|
||||
if (seleBtn.tag == 100) {
|
||||
seleBtn.selected = YES;
|
||||
seleBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||
}else
|
||||
{
|
||||
seleBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||
}
|
||||
}
|
||||
self.status = @"1";
|
||||
[self createData];
|
||||
break;
|
||||
case 20:
|
||||
for (UIButton * seleBtn in self.buttonArray) {
|
||||
if (seleBtn.tag == 101) {
|
||||
seleBtn.selected = YES;
|
||||
seleBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||
}else
|
||||
{
|
||||
seleBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||
}
|
||||
|
||||
}
|
||||
self.status = @"2";
|
||||
[self createData];
|
||||
break;
|
||||
case 30:
|
||||
for (UIButton * seleBtn in self.buttonArray) {
|
||||
if (seleBtn.tag == 102) {
|
||||
seleBtn.selected = YES;
|
||||
seleBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||
}else
|
||||
{
|
||||
seleBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||
}
|
||||
}
|
||||
self.status = @"3";
|
||||
[self createData];
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||
{
|
||||
|
||||
[self.homeTable.mj_footer endRefreshing];
|
||||
[self.homeTable.mj_header endRefreshing];
|
||||
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||
{
|
||||
[self.homeTable.mj_footer endRefreshing];
|
||||
[self.homeTable.mj_header endRefreshing];
|
||||
|
||||
if ([tag isEqualToString:@"LIST"]) {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
if (self.pageNo == 1) {
|
||||
[self.dataArray removeAllObjects];
|
||||
}
|
||||
NSArray * array = response ;
|
||||
|
||||
for (NSDictionary * dic in array) {
|
||||
|
||||
YXRecordIMListDateModel * model = [YXRecordIMListDateModel modelWithDictionary:dic];
|
||||
|
||||
[self.dataArray addObject:model];
|
||||
}
|
||||
self.homeTable.dataArray = self.dataArray;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (void)statusChange:(UIButton *)statusBtn {
|
||||
[self.dataArray removeAllObjects];
|
||||
if (statusBtn.tag == 100) {
|
||||
self.status = @"1";
|
||||
}
|
||||
if (statusBtn.tag == 101) {
|
||||
self.status = @"2";
|
||||
|
||||
}
|
||||
if (statusBtn.tag == 102) {
|
||||
self.status = @"3";
|
||||
|
||||
}
|
||||
[self createData];
|
||||
for (UIButton * titBtn in self.buttonArray) {
|
||||
|
||||
if (titBtn == statusBtn) {
|
||||
|
||||
titBtn.selected = YES;
|
||||
titBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||
|
||||
}else
|
||||
{
|
||||
titBtn.selected = NO;
|
||||
titBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
#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
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// YXPictureRecordViewController.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/28.
|
||||
//
|
||||
|
||||
#import "YXBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXPictureRecordViewController : YXBaseViewController
|
||||
|
||||
@property (nonatomic, assign) NSInteger questionType;
|
||||
@property (nonatomic, assign) NSInteger questionStatus; //待回复10 进行中20 已完成30 (时间充裕可优化枚举类型)
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-588
@@ -1,588 +0,0 @@
|
||||
//
|
||||
// YXPictureRecordViewController.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/28.
|
||||
//
|
||||
|
||||
#import "YXPictureRecordViewController.h"
|
||||
#import "QuestionRecoredTable.h"
|
||||
#import "YXQuestionRecordModel.h"
|
||||
#import "YXRecordIMListDateModel.h"
|
||||
#import "ChatViewController.h"
|
||||
|
||||
#import "TUIConversationListBaseDataProvider.h"
|
||||
|
||||
#import <ImSDK_Plus/ImSDK_Plus.h>
|
||||
#import <TIMCommon/TIMDefine.h>
|
||||
#import <TUICore/TUICore.h>
|
||||
#import <TUICore/TUILogin.h>
|
||||
#import "TUIConversationCellData.h"
|
||||
#import "LYEmptyView.h"
|
||||
#import "LYEmptyViewHeader.h"
|
||||
@interface YXPictureRecordViewController ()<V2TIMSDKListener,V2TIMConversationListener>
|
||||
|
||||
@property (nonatomic, strong) QuestionRecoredTable * homeTable;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * buttonArray;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * dataArray;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * IMDataArray;
|
||||
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * groupIDArray;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * jingxingArray;
|
||||
|
||||
@property (nonatomic, assign) NSInteger pageNo;
|
||||
|
||||
@property (nonatomic, copy) NSString * status;
|
||||
|
||||
@property (nonatomic, assign) NSInteger tfReply;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXPictureRecordViewController
|
||||
|
||||
- (NSMutableArray *)buttonArray {
|
||||
|
||||
if (!_buttonArray) {
|
||||
|
||||
_buttonArray = [[NSMutableArray alloc] init];
|
||||
|
||||
}
|
||||
return _buttonArray;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)groupIDArray {
|
||||
|
||||
if (!_groupIDArray) {
|
||||
|
||||
_groupIDArray = [[NSMutableArray alloc] init];
|
||||
|
||||
}
|
||||
return _groupIDArray;
|
||||
|
||||
}
|
||||
|
||||
- (NSMutableArray *)jingxingArray {
|
||||
|
||||
if (!_jingxingArray) {
|
||||
|
||||
_jingxingArray = [[NSMutableArray alloc] init];
|
||||
|
||||
}
|
||||
return _jingxingArray;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (NSMutableArray *)dataArray {
|
||||
|
||||
if (!_dataArray) {
|
||||
|
||||
_dataArray = [[NSMutableArray alloc] init];
|
||||
|
||||
}
|
||||
return _dataArray;
|
||||
|
||||
}
|
||||
|
||||
- (NSMutableArray *)IMDataArray {
|
||||
|
||||
if (!_IMDataArray) {
|
||||
_IMDataArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _IMDataArray;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
self.isHidenNaviBar = false;
|
||||
self.navigationItem.title = @"图文咨询";
|
||||
self.pageNo = 1;
|
||||
[self loginImAccount];
|
||||
[self createUI];
|
||||
// self 为 id<V2TIMConversationListener> 类型
|
||||
[[V2TIMManager sharedInstance] addConversationListener:self];
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
NSArray * array = @[@"待回复",@"进行中",@"已完成"];
|
||||
[self.buttonArray removeAllObjects];
|
||||
CGFloat w = kRealValue(66);
|
||||
for (int index = 0; index < array.count; index ++) {
|
||||
|
||||
UIButton * listBtn = [[UIButton alloc] init];
|
||||
|
||||
listBtn.frame = CGRectMake(kRealValue(15) + (w + kRealValue(13)) * index , kRealValue(15), w, 27);
|
||||
[listBtn setTitle:array[index] forState:UIControlStateNormal];
|
||||
[listBtn setTitleColor:KWhiteColor forState:UIControlStateSelected];
|
||||
[listBtn setTitleColor:CFontColor1 forState:UIControlStateNormal];
|
||||
[listBtn addTarget:self action:@selector(statusChange:) forControlEvents:UIControlEventTouchUpInside];
|
||||
listBtn.titleLabel.font = SYSTEMFONT(13);
|
||||
listBtn.layer.cornerRadius = 14.0;
|
||||
listBtn.layer.masksToBounds = true;
|
||||
listBtn.tag = 100 + index;
|
||||
[self.view addSubview:listBtn];
|
||||
[self.buttonArray addObject:listBtn];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
self.homeTable = [[QuestionRecoredTable alloc] initWithFrame:CGRectMake(0, 50, kScreenWidth, kScreenHeight - kTopHeight - kRealValue(15) + 27 - SafetyAreaHeight - kRealValue(48)) style:UITableViewStyleGrouped];
|
||||
self.homeTable.recordBlock = ^(YXRecordIMListDateModel * _Nonnull model) {
|
||||
|
||||
if ([ESCTUIManager TUIUserStatus] == false) {
|
||||
|
||||
|
||||
[self loginImAccount];
|
||||
return;
|
||||
}
|
||||
|
||||
ChatViewController * chatVC = [[ChatViewController alloc] init];
|
||||
chatVC.isGroupID = YES;
|
||||
chatVC.chatID = model.imId;
|
||||
chatVC.isVideo = false;
|
||||
chatVC.eableSendReport = YES;
|
||||
chatVC.eableMapTools = false;
|
||||
chatVC.eableMapTools = false;
|
||||
chatVC.navTitle = model.memberName;
|
||||
chatVC.eablehaveHelathData = YES;
|
||||
chatVC.pictureEnd_id = model.Record_id;
|
||||
chatVC.questionType = 2;
|
||||
chatVC.memberSex = model.memberSex;
|
||||
if ([model.contentStatus intValue] >= 4)
|
||||
{
|
||||
chatVC.isHideKeyBord = true;
|
||||
}
|
||||
[self.navigationController pushViewController:chatVC animated:YES];
|
||||
|
||||
|
||||
|
||||
};
|
||||
[self.view addSubview:self.homeTable];
|
||||
|
||||
|
||||
|
||||
__weak __typeof(self) weakSelf = self;
|
||||
self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||
weakSelf.pageNo = 1;
|
||||
if ([self.status intValue] == 0) {
|
||||
[self waitReplayTUIList];
|
||||
}
|
||||
if ([self.status intValue] == 1) {
|
||||
[self getChatList];
|
||||
}
|
||||
if ([self.status intValue] == 2) {
|
||||
[self createData];
|
||||
}
|
||||
|
||||
|
||||
|
||||
}];
|
||||
self.homeTable.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
|
||||
weakSelf.pageNo ++;
|
||||
if ([self.status intValue] == 0) {
|
||||
[self waitReplayTUIList];
|
||||
}
|
||||
if ([self.status intValue] == 1) {
|
||||
[self getChatList];
|
||||
}
|
||||
if ([self.status intValue] == 2) {
|
||||
[self createData];
|
||||
}
|
||||
|
||||
}];
|
||||
|
||||
//初始化一个emptyView
|
||||
|
||||
LYEmptyView *emptyView = [LYEmptyView emptyViewWithImage:[UIImage imageNamed:@"nodataPicture"] titleStr:@"暂无数据" detailStr:@""];
|
||||
|
||||
// LYEmptyView *emptyView = [LYEmptyView emptyActionViewWithImageStr:@"nodataPicture"
|
||||
// titleStr:@"无数据"
|
||||
// detailStr:@"请稍后再试!"
|
||||
// btnTitleStr:@"重新加载"
|
||||
// btnClickBlock:^{
|
||||
// [self createData];
|
||||
// }];
|
||||
//元素竖直方向的间距
|
||||
emptyView.subViewMargin = 20.f;
|
||||
//标题颜色
|
||||
emptyView.titleLabTextColor = UIColorHex(#666666);
|
||||
//描述字体
|
||||
emptyView.detailLabFont = [UIFont systemFontOfSize:16];
|
||||
//按钮背景色
|
||||
emptyView.imageSize = CGSizeMake(kRealValue(210), kRealValue(183));
|
||||
emptyView.contentViewY = kRealValue(160);
|
||||
//设置空内容占位图
|
||||
self.homeTable.ly_emptyView = emptyView;
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
[self.homeTable.mj_header beginRefreshing];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)createData {
|
||||
|
||||
[self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:false];
|
||||
YXNetAPI * listApi = [[YXNetAPI alloc] init:self tag:@"LIST" NeedToken:@""];
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject:@(self.pageNo) forKey:@"pageNo"];
|
||||
[parmDic setObject:@(10) forKey:@"pageSize"];
|
||||
[parmDic setObject:@"1" forKey:@"type"];
|
||||
[parmDic setObject:self.status forKey:@"status"];
|
||||
[listApi GetQuestionRecoredList:parmDic];
|
||||
|
||||
}
|
||||
|
||||
//待回复
|
||||
- (void)waitReplayTUIList {
|
||||
|
||||
V2TIMConversationListFilter *filter = [[V2TIMConversationListFilter alloc] init];
|
||||
filter.hasUnreadCount = NO;
|
||||
[[V2TIMManager sharedInstance] getConversationListByFilter:filter nextSeq:self.pageNo - 1 count:100 succ:^(NSArray<V2TIMConversation *> *list, uint64_t nextSeq, BOOL isFinished) {
|
||||
// 获取会话列表成功,list 为会话列表
|
||||
[self.groupIDArray removeAllObjects];
|
||||
[self.IMDataArray removeAllObjects];
|
||||
for (V2TIMConversation * v2Model in list) {
|
||||
if ( !ValidStr(v2Model.groupID)) {
|
||||
[self.groupIDArray addObject: v2Model.groupID];
|
||||
}
|
||||
[self.IMDataArray addObject:v2Model];
|
||||
|
||||
}
|
||||
[self postGroupArray:self.groupIDArray];
|
||||
} fail:^(int code, NSString *desc) {
|
||||
// 获取会话列表失败
|
||||
[self loginImAccount];
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
//获取腾讯im会话列表
|
||||
- (void)getChatList {
|
||||
|
||||
|
||||
V2TIMConversationListFilter *filter = [[V2TIMConversationListFilter alloc] init];
|
||||
// filter.type = V2TIM_C2C; //拉取单聊会话
|
||||
filter.type = V2TIM_GROUP; //拉取群聊会话
|
||||
[[V2TIMManager sharedInstance] getConversationListByFilter:filter nextSeq:self.pageNo - 1 count:50 succ:^(NSArray<V2TIMConversation *> *list, uint64_t nextSeq, BOOL isFinished) {
|
||||
// 获取会话列表成功,list 为会话列表
|
||||
[self.groupIDArray removeAllObjects];
|
||||
[self.IMDataArray removeAllObjects];
|
||||
DLog(@"%@",list);
|
||||
for (V2TIMConversation * v2Model in list) {
|
||||
[self.groupIDArray addObject: [NSString stringWithFormat:@"%@",v2Model.groupID] ];
|
||||
[self.IMDataArray addObject:v2Model];
|
||||
}
|
||||
[self postIngGroupArray:self.groupIDArray];
|
||||
} fail:^(int code, NSString *desc) {
|
||||
// 获取会话列表失败
|
||||
[self loginImAccount];
|
||||
}];
|
||||
|
||||
|
||||
}
|
||||
|
||||
#pragma mark:上传id数组
|
||||
- (void)postGroupArray:(NSArray *)array {
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
|
||||
//tfReply : 待回复0 进行中1
|
||||
[parmDic setObject:array forKey:@"imIds"];
|
||||
[parmDic setObject:@"0" forKey:@"tfReply"];
|
||||
|
||||
[self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:false];
|
||||
YXNetAPI * recordApi = [[YXNetAPI alloc] init:self tag:@"GROUPID" NeedToken:@""];
|
||||
[recordApi PostGroupIDArray:parmDic];
|
||||
}
|
||||
|
||||
|
||||
- (void)postIngGroupArray:(NSArray *)array {
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
|
||||
//tfReply : 待回复0 进行中1
|
||||
[parmDic setObject:array forKey:@"imIds"];
|
||||
[parmDic setObject:@"1" forKey:@"tfReply"];
|
||||
|
||||
[self showMBProgressHUDWithString:@"数据加载中,请稍候..." autoHidden:false];
|
||||
YXNetAPI * recordApi = [[YXNetAPI alloc] init:self tag:@"GROUPIDING" NeedToken:@""];
|
||||
[recordApi PostGroupIDArray:parmDic];
|
||||
}
|
||||
|
||||
|
||||
-(void)setQuestionStatus:(NSInteger)questionStatus {
|
||||
|
||||
_questionStatus = questionStatus;
|
||||
|
||||
|
||||
|
||||
switch (_questionStatus) {
|
||||
case 10:
|
||||
for (UIButton * seleBtn in self.buttonArray) {
|
||||
if (seleBtn.tag == 100) {
|
||||
seleBtn.selected = YES;
|
||||
seleBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||
}else
|
||||
{
|
||||
seleBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||
}
|
||||
}
|
||||
self.status = @"0";
|
||||
[self waitReplayTUIList];
|
||||
break;
|
||||
case 20:
|
||||
for (UIButton * seleBtn in self.buttonArray) {
|
||||
if (seleBtn.tag == 101) {
|
||||
seleBtn.selected = YES;
|
||||
seleBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||
}else
|
||||
{
|
||||
seleBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||
}
|
||||
|
||||
}
|
||||
self.status = @"1";
|
||||
[self getChatList];
|
||||
break;
|
||||
case 30:
|
||||
for (UIButton * seleBtn in self.buttonArray) {
|
||||
if (seleBtn.tag == 102) {
|
||||
seleBtn.selected = YES;
|
||||
seleBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||
}else
|
||||
{
|
||||
seleBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||
}
|
||||
}
|
||||
self.status = @"2";
|
||||
[self createData];
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||
{
|
||||
|
||||
[self.homeTable.mj_footer endRefreshing];
|
||||
[self.homeTable.mj_header endRefreshing];
|
||||
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||
{
|
||||
[self.homeTable.mj_footer endRefreshing];
|
||||
[self.homeTable.mj_header endRefreshing];
|
||||
|
||||
if ([tag isEqualToString:@"LIST"]) {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
if (self.pageNo == 1) {
|
||||
[self.dataArray removeAllObjects];
|
||||
}
|
||||
NSArray * array = response ;
|
||||
|
||||
for (NSDictionary * dic in array) {
|
||||
|
||||
YXRecordIMListDateModel * model = [YXRecordIMListDateModel modelWithDictionary:dic];
|
||||
|
||||
[self.dataArray addObject:model];
|
||||
}
|
||||
self.homeTable.dataArray = self.dataArray;
|
||||
|
||||
}
|
||||
|
||||
if ([tag isEqualToString:@"IMAPI"]) {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
NSDictionary * pamrDic = response;
|
||||
|
||||
IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:pamrDic];
|
||||
|
||||
IMUserInfoModel * iminfoModel = [[IMUserInfoModel alloc] init];
|
||||
iminfoModel.IMInfo = pamrDic;
|
||||
[HQCommonUtils keyedArchiverWithData:iminfoModel key:IMLoginUserInfo];
|
||||
|
||||
// 1. 从即时通信 IM 控制台获取应用 SDKAppID。
|
||||
// 2. 初始化 config 对象
|
||||
V2TIMSDKConfig *config = [[V2TIMSDKConfig alloc] init];
|
||||
// 3. 指定 log 输出级别。
|
||||
config.logLevel = V2TIM_LOG_INFO;
|
||||
// 4. 添加 V2TIMSDKListener 的事件监听器,self 是 id<V2TIMSDKListener> 的实现类,如果您不需要监听 IM SDK 的事件,这个步骤可以忽略。
|
||||
// 5. 初始化 IM SDK,调用这个接口后,可以立即调用登录接口。
|
||||
[[V2TIMManager sharedInstance] initSDK:[model.sdkAppId intValue] config:config];
|
||||
[ESCTUIManager loginInitTUISDKAppidWith:[model.sdkAppId intValue] UserID:model.userId userSig:model.userSig];
|
||||
if ([self.status intValue] == 0) {
|
||||
[self waitReplayTUIList];
|
||||
}
|
||||
if ([self.status intValue] == 1) {
|
||||
[self getChatList];
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"GROUPID"]) {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
NSArray * array = response;
|
||||
[self.jingxingArray removeAllObjects];
|
||||
// for ( V2TIMConversation * v2Model in self.IMDataArray) {
|
||||
|
||||
for (NSDictionary * parmDic in array) {
|
||||
|
||||
YXRecordIMListDateModel * model = [ YXRecordIMListDateModel modelWithDictionary:parmDic];
|
||||
for ( V2TIMConversation * v2Model in self.IMDataArray) {
|
||||
if ([model.imId isEqualToString:v2Model.groupID]) {
|
||||
DLog(@"------------%d",v2Model.unreadCount);
|
||||
model.unRedMessage = [NSString stringWithFormat:@"%d",v2Model.unreadCount];
|
||||
}
|
||||
}
|
||||
[self.jingxingArray addObject:model];
|
||||
}
|
||||
// }
|
||||
|
||||
self.homeTable.dataArray = self.jingxingArray;
|
||||
}
|
||||
if ([tag isEqualToString:@"GROUPIDING"]) {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
NSArray * array = response;
|
||||
[self.jingxingArray removeAllObjects];
|
||||
// for ( V2TIMConversation * v2Model in self.IMDataArray) {
|
||||
|
||||
for (NSDictionary * parmDic in array) {
|
||||
|
||||
YXRecordIMListDateModel * model = [ YXRecordIMListDateModel modelWithDictionary:parmDic];
|
||||
for ( V2TIMConversation * v2Model in self.IMDataArray) {
|
||||
if ([model.imId isEqualToString:v2Model.groupID]) {
|
||||
DLog(@"------------%d",v2Model.unreadCount);
|
||||
model.unRedMessage = [NSString stringWithFormat:@"%d",v2Model.unreadCount];
|
||||
}
|
||||
}
|
||||
[self.jingxingArray addObject:model];
|
||||
}
|
||||
// }
|
||||
|
||||
self.homeTable.dataArray = self.jingxingArray;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (void)statusChange:(UIButton *)statusBtn {
|
||||
|
||||
if (statusBtn.tag == 100) {
|
||||
self.status = @"0";
|
||||
self.tfReply = 0;
|
||||
[self waitReplayTUIList];
|
||||
}
|
||||
if (statusBtn.tag == 101) {
|
||||
self.status = @"1";
|
||||
self.tfReply = 1;
|
||||
[self getChatList];
|
||||
|
||||
}
|
||||
if (statusBtn.tag == 102) {
|
||||
self.status = @"2";
|
||||
[self createData];
|
||||
}
|
||||
|
||||
for (UIButton * titBtn in self.buttonArray) {
|
||||
|
||||
if (titBtn == statusBtn) {
|
||||
|
||||
titBtn.selected = YES;
|
||||
titBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||
|
||||
}else
|
||||
{
|
||||
titBtn.selected = NO;
|
||||
titBtn.backgroundColor = UIColorHex(#DDDDDD);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loginImAccount {
|
||||
|
||||
|
||||
YXNetAPI * proctocolApi = [[YXNetAPI alloc] init:self tag:@"IMAPI" NeedToken:nil];
|
||||
[proctocolApi GetIMLoginAccount:nil];
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)onNewConversation:(NSArray<V2TIMConversation*> *)conversationList {
|
||||
// 收到会话新增通知,conversationList 为新增的会话
|
||||
[self updateConversation:conversationList];
|
||||
}
|
||||
|
||||
|
||||
- (void)onConversationChanged:(NSArray<V2TIMConversation*> *)conversationList {
|
||||
// 收到会话变更通知,conversationList 中为变更后的会话对象
|
||||
[self updateConversation:conversationList];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- (void)onConversationDeleted:(NSArray<NSString *> *)conversationIDList {
|
||||
// 会话被删除
|
||||
}
|
||||
|
||||
|
||||
- (void)onTotalUnreadMessageCountChanged:(UInt64) totalUnreadCount {
|
||||
// 会话未读总数变化
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- (void)onUnreadMessageCountChangedByFilter:(V2TIMConversationListFilter *)filter totalUnreadCount:(UInt64)totalUnreadCount {
|
||||
// 过滤条件下的会话未读总数变化
|
||||
}
|
||||
|
||||
|
||||
- (void)updateConversation:(NSArray *)convList {
|
||||
// 更新 UI 会话列表,如果 UI 会话列表已经存在该新增/变更的会话,就替换之;如果没有,就新增一个会话对象
|
||||
[self.homeTable.mj_header beginRefreshing];
|
||||
}
|
||||
|
||||
|
||||
|
||||
//- (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView
|
||||
//{
|
||||
// return -self.homeTable.frame.size.height;
|
||||
//}
|
||||
/*
|
||||
#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
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// YXQustionRecordViewController.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/28.
|
||||
//
|
||||
|
||||
#import "YXBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@interface YXQustionRecordViewController : YXBaseViewController
|
||||
|
||||
@property (nonatomic, assign) NSInteger questionType;
|
||||
@property (nonatomic, assign) NSInteger questionStatus; //待回复10 进行中20 已完成30 (时间充裕可优化枚举类型)
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-255
@@ -1,255 +0,0 @@
|
||||
//
|
||||
// QustionRecordViewController.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/28.
|
||||
//
|
||||
|
||||
#import "YXQustionRecordViewController.h"
|
||||
#import "YXAudioVideoRecordViewController.h"
|
||||
#import "YXPictureRecordViewController.h"
|
||||
|
||||
@interface YXQustionRecordViewController ()<UICollectionViewDataSource,UICollectionViewDelegate>
|
||||
|
||||
/** 顶部控件*/
|
||||
@property (nonatomic, weak) UIScrollView *topView;
|
||||
/** 下划线 */
|
||||
@property (nonatomic, weak) UIView *lineView;
|
||||
/** 滚动视图 */
|
||||
@property (nonatomic, weak) UICollectionView *collectionView;
|
||||
/** 当前选中的按钮 */
|
||||
@property (nonatomic, weak) UIButton *selectButton;
|
||||
/** 按钮数组 */
|
||||
@property (nonatomic, strong) NSMutableArray *titleButtons;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXQustionRecordViewController
|
||||
|
||||
#pragma mark - 懒加载
|
||||
- (NSMutableArray *)titleButtons {
|
||||
if (_titleButtons==nil) {
|
||||
_titleButtons = [NSMutableArray array];
|
||||
}
|
||||
return _titleButtons;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
self.isHidenNaviBar = NO;
|
||||
self.title = @"咨询记录";
|
||||
self.view.backgroundColor = UIColorBackground;
|
||||
[self createUI];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark:返回
|
||||
- (void)popVc
|
||||
{
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
- (void)createUI
|
||||
{
|
||||
[self setupNavgationBar];
|
||||
|
||||
// 添加底部内容view
|
||||
[self setupBottomContentView];
|
||||
|
||||
// 添加所有子控制器
|
||||
[self setupAllChildViewController];
|
||||
|
||||
[self setupAllTitle];
|
||||
|
||||
// 不添加额外滚动区域
|
||||
self.automaticallyAdjustsScrollViewInsets = NO;
|
||||
}
|
||||
|
||||
#pragma mark - 添加所有的子控制器
|
||||
- (void)setupAllChildViewController {
|
||||
//questionStatus //待回复10 进行中20 已完成30 (时间充裕可优化枚举类型)
|
||||
YXPictureRecordViewController * pictureVc = [[YXPictureRecordViewController alloc] init];
|
||||
pictureVc.view.backgroundColor = UIColorBackground;
|
||||
pictureVc.navigationItem.title = @"图文咨询";
|
||||
pictureVc.questionStatus = self.questionStatus;
|
||||
[self addChildViewController:pictureVc];
|
||||
|
||||
//
|
||||
YXAudioVideoRecordViewController * videoVc = [[YXAudioVideoRecordViewController alloc] init];
|
||||
videoVc.view.backgroundColor = UIColorBackground;
|
||||
videoVc.navigationItem.title = @"视频咨询";
|
||||
videoVc.questionStatus = self.questionStatus;
|
||||
[self addChildViewController:videoVc];
|
||||
}
|
||||
|
||||
#pragma mark - 设置导航条内容
|
||||
- (void)setupNavgationBar {
|
||||
UIScrollView *topView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 1, kScreenHeight, kRealValue(48))];
|
||||
topView.backgroundColor = [UIColor whiteColor];
|
||||
_topView = topView;
|
||||
[self.view addSubview:topView];
|
||||
}
|
||||
|
||||
#pragma mark - 按钮被点击
|
||||
- (void)titleClick:(UIButton *)titleButton{
|
||||
|
||||
NSInteger i = titleButton.tag;
|
||||
// 重复点击标题按钮的时候,刷新当前界面
|
||||
if (titleButton == _selectButton) {
|
||||
}
|
||||
|
||||
[self selButton:titleButton];
|
||||
|
||||
//滚动collectionView 修改偏移量
|
||||
CGFloat offsetX = i * kScreenWidth;
|
||||
_collectionView.contentOffset = CGPointMake(offsetX, 0);
|
||||
}
|
||||
|
||||
#pragma mark - 选中标题按钮
|
||||
- (void)selButton:(UIButton *)titleButton{
|
||||
|
||||
_selectButton.selected = NO;
|
||||
titleButton.selected = YES;
|
||||
_selectButton = titleButton;
|
||||
|
||||
// 移动下划线的位置
|
||||
[UIView animateWithDuration:0.25 animations:^{
|
||||
_lineView.centerX = titleButton.centerX;
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - 添加标题
|
||||
- (void)setupAllTitle{
|
||||
|
||||
NSUInteger count = self.childViewControllers.count;
|
||||
CGFloat btnX = 0;
|
||||
CGFloat btnW = kScreenWidth/count;
|
||||
CGFloat btnH = _topView.height;
|
||||
for (int i = 0; i < count; i++) {
|
||||
UIButton *titleButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
titleButton.tag = i;
|
||||
|
||||
UIViewController *vc = self.childViewControllers[i];
|
||||
[titleButton setTitle:vc.navigationItem.title forState:UIControlStateNormal];
|
||||
// 设置标题颜色
|
||||
[titleButton setTitleColor:RGBA(34, 34, 34, 1) forState:UIControlStateSelected];
|
||||
[titleButton setTitleColor:RGBA(102, 102, 102, 1) forState:UIControlStateNormal];
|
||||
|
||||
// 设置标题字体
|
||||
titleButton.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
|
||||
btnX = i * btnW;
|
||||
|
||||
titleButton.frame = CGRectMake(btnX, 0, btnW, btnH);
|
||||
|
||||
// 监听按钮点击
|
||||
[titleButton addTarget:self action:@selector(titleClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
[_topView addSubview:titleButton];
|
||||
if (i == self.questionType - 1) {
|
||||
// 添加下划线
|
||||
// 下划线宽度 = 按钮文字宽度
|
||||
// 下划线中心点x = 按钮中心点x
|
||||
CGFloat h = 3;
|
||||
CGFloat y = kRealValue(46) ;
|
||||
UIView *lineView =[[UIView alloc] init];
|
||||
// 位置和尺寸
|
||||
lineView.height = h;
|
||||
// 先计算文字尺寸,在给label去赋值
|
||||
[titleButton.titleLabel sizeToFit];
|
||||
lineView.width = kScreenWidth/2 - 30;
|
||||
lineView.centerX = titleButton.centerX;
|
||||
lineView.mj_y = y;
|
||||
lineView.backgroundColor = UIColorHex(#21BEBD);
|
||||
_lineView = lineView;
|
||||
[_topView addSubview:lineView];
|
||||
|
||||
[self titleClick:titleButton];
|
||||
}
|
||||
|
||||
[self.titleButtons addObject:titleButton];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - 添加底部内容view
|
||||
- (void)setupBottomContentView
|
||||
{
|
||||
// 创建一个流水布局
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.itemSize = CGSizeMake(kScreenWidth, kScreenHeight-44);
|
||||
|
||||
// 设置水平滚动方向
|
||||
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||
layout.minimumInteritemSpacing = 0;
|
||||
layout.minimumLineSpacing = 0;
|
||||
|
||||
// 创建UICollectionView
|
||||
UICollectionView *collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0,kRealValue(48), kScreenWidth, kScreenHeight - kRealValue(48) ) collectionViewLayout:layout];
|
||||
collectionView.backgroundColor = [UIColor whiteColor];
|
||||
[self.view addSubview:collectionView];
|
||||
_collectionView = collectionView;
|
||||
collectionView.scrollsToTop = NO;
|
||||
collectionView.scrollEnabled = YES;
|
||||
// 开启分页
|
||||
collectionView.pagingEnabled = YES;
|
||||
collectionView.showsHorizontalScrollIndicator = NO;
|
||||
collectionView.bounces = YES;
|
||||
|
||||
// 展示cell
|
||||
collectionView.dataSource = self;
|
||||
collectionView.delegate = self;
|
||||
|
||||
// 注册cell
|
||||
[collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"COUPCELLID"];
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDelegate
|
||||
// 滚动完成的时候就会调用
|
||||
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{
|
||||
// 获取角标
|
||||
NSInteger i = scrollView.contentOffset.x / kScreenWidth;
|
||||
|
||||
// 获取选中标题
|
||||
UIButton *selButton = self.titleButtons[i];
|
||||
|
||||
// 选中标题
|
||||
[self selButton:selButton];
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDataSource
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
|
||||
return self.childViewControllers.count;
|
||||
}
|
||||
|
||||
// 只要有新的cell出现的时候才会调用
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"COUPCELLID" forIndexPath:indexPath];
|
||||
|
||||
// 移除之前子控制器view
|
||||
[cell.contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
|
||||
|
||||
// 取出对应的子控制器添加到对应cell上
|
||||
UIViewController *vc = self.childViewControllers[indexPath.row];
|
||||
|
||||
[cell.contentView addSubview:vc.view];
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
#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
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// YXQuestionStatisticsViewController.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/26.
|
||||
//
|
||||
|
||||
#import "YXBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXQuestionStatisticsViewController : YXBaseViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-514
@@ -1,514 +0,0 @@
|
||||
//
|
||||
// YXQuestionStatisticsViewController.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/26.
|
||||
//
|
||||
|
||||
#import "YXQuestionStatisticsViewController.h"
|
||||
#import "AAOptions.h"
|
||||
#import "AAChartView.h"
|
||||
#import "NSDate+Calendar.h"
|
||||
#import "BRDatePickerView.h"
|
||||
#import "YXQuestionStaticsModel.h"
|
||||
#import "XJDBillViewController.h"
|
||||
@interface YXQuestionStatisticsViewController ()<AAChartViewEventDelegate>
|
||||
|
||||
@property (nonatomic, strong) AAChartView * aaChartView;
|
||||
|
||||
@property (nonatomic, strong) UILabel * moneyLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * leftMoneyLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * rightMoneyLabel;
|
||||
|
||||
@property (nonatomic, strong) YYLabel * monthLabel;
|
||||
|
||||
@property (nonatomic, copy) NSString * quesDate;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * dataArray;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXQuestionStatisticsViewController
|
||||
|
||||
- (NSMutableArray *)dataArray {
|
||||
if(!_dataArray) {
|
||||
|
||||
_dataArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _dataArray;
|
||||
|
||||
}
|
||||
|
||||
//- (AAChartModel *)configurePieChart {
|
||||
// return AAChartModel.new
|
||||
// .chartTypeSet(AAChartTypePie)
|
||||
// .marginSet(@[@0,@0,@0,@60])
|
||||
// .colorsThemeSet(@[@"#407FFF",@"#A682E6"])
|
||||
// .dataLabelsEnabledSet(true)//是否直接显示扇形图数据
|
||||
// .seriesSet(@[
|
||||
// AASeriesElement.new
|
||||
// .innerSizeSet(@"60%")//内部圆环半径大小占比
|
||||
// .sizeSet(@150)//尺寸大小
|
||||
// .nameSet(@"人数")
|
||||
// .borderWidthSet(@0)//描边的宽度
|
||||
// .allowPointSelectSet(true)//是否允许在点击数据点标记(扇形图点击选中的块发生位移)
|
||||
// .statesSet(AAStates.new
|
||||
// .hoverSet(AAHover.new
|
||||
// .enabledSet(false)//禁用点击区块之后出现的半透明遮罩层
|
||||
// )
|
||||
//
|
||||
//
|
||||
// )
|
||||
// .dataSet(@[
|
||||
// @[@"图文咨询", @50],
|
||||
// @{@"sliced": @true,
|
||||
// @"selected": @true,
|
||||
// @"name": @"音视频咨询",
|
||||
// @"y": @50, },
|
||||
//
|
||||
//// @[@"Safari", @88.5],
|
||||
//// @[@"Opera", @46.0],
|
||||
//// @[@"Others", @223.0],
|
||||
// ])]);
|
||||
//}
|
||||
- (AAOptions *)adjustPieChartTitleAndDataLabelFontStyle {
|
||||
AAOptions *aaOptions = AAOptions.new
|
||||
.chartSet(AAChart.new.typeSet(AAChartTypePie))
|
||||
.titleSet(AATitle.new
|
||||
.useHTMLSet(true)
|
||||
.textSet(@"<span style=""color:#1E90FF;font-weight:thin;font-size:15px""> 170 </span> <br>\
|
||||
<span style=""color:#A9A9A9;font-weight:thin;font-size:10px""> 咨询方式 </span>")//标题文本内容
|
||||
.alignSet(AAChartAlignTypeCenter)//标题水平居中
|
||||
.verticalAlignSet(AAChartVerticalAlignTypeMiddle)//标题垂直居中
|
||||
.ySet(@0)//标题相对于垂直对齐的偏移量,取值范围:图表的上边距(chart.spacingTop )到图表的下边距(chart.spacingBottom),可以是负值,单位是px。默认值和字体大小有关。
|
||||
)
|
||||
.colorsSet(@[@"#407FFF",@"#A682E6"])//设置颜色主题
|
||||
.seriesSet(@[
|
||||
AASeriesElement.new
|
||||
.nameSet(@"人数")
|
||||
.sizeSet(@150)//环形图的半径大小
|
||||
.innerSizeSet(@"60%")//内部圆环半径大小占比
|
||||
.allowPointSelectSet(false)//是否允许在点击数据点标记(扇形图点击选中的块发生位移)
|
||||
.dataLabelsSet(AADataLabels.new
|
||||
.enabledSet(true)
|
||||
.useHTMLSet(true)
|
||||
.distanceSet(@20)//扇形图百分比线的长度
|
||||
.formatSet(@"<b>{point.name} {point.y}</b>")
|
||||
)
|
||||
|
||||
.dataSet(@[
|
||||
@[@"图文咨询", @110],
|
||||
@[@"视频咨询", @10],
|
||||
]),
|
||||
]);
|
||||
return aaOptions;
|
||||
}
|
||||
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
self.isHidenNaviBar = false;
|
||||
self.navigationItem.title = @"咨询统计";
|
||||
self.view.backgroundColor = UIColorHex(#EFEFEF);
|
||||
[self createUI];
|
||||
[self createData];
|
||||
[self createEarmingsData];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
UIScrollView * mainScrollview = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
|
||||
mainScrollview.backgroundColor = UIColorHex(#EEEEEE);
|
||||
[self.view addSubview:mainScrollview];
|
||||
//顶部背景收益
|
||||
UIImageView * moneyImg = [[UIImageView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(10), kScreenWidth - kRealValue(30), kRealValue(150))];
|
||||
moneyImg.userInteractionEnabled = YES;
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapGesture:)];
|
||||
[moneyImg addGestureRecognizer:tap];
|
||||
moneyImg.image = [UIImage imageNamed:@"statusticBackImg"];
|
||||
[mainScrollview addSubview:moneyImg];
|
||||
|
||||
UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(12), 300, 12)];
|
||||
titleLabel.text = @"未结算收益";
|
||||
titleLabel.textColor = KWhiteColor;
|
||||
titleLabel.textAlignment = NSTextAlignmentLeft;
|
||||
titleLabel.font = MEDIUMFONT(12);
|
||||
[moneyImg addSubview:titleLabel];
|
||||
|
||||
self.moneyLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,titleLabel.bottom + kRealValue(23), moneyImg.width, 18)];
|
||||
self.moneyLabel.text = @"¥7900";
|
||||
self.moneyLabel.textColor = KWhiteColor;
|
||||
self.moneyLabel.textAlignment = NSTextAlignmentCenter;
|
||||
self.moneyLabel.font = MEDIUMFONT(23);
|
||||
[moneyImg addSubview:self.moneyLabel];
|
||||
|
||||
UIView * linView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(22),self.moneyLabel.bottom + kRealValue(24), moneyImg.width - kRealValue(44), 1)];
|
||||
linView.backgroundColor = KWhiteColor;
|
||||
[moneyImg addSubview:linView];
|
||||
|
||||
UILabel * leijiLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(22),linView.bottom + kRealValue(10), moneyImg.width/2, 11)];
|
||||
leijiLabel.text = @"累计总收益(税前)";
|
||||
leijiLabel.textColor = KWhiteColor;
|
||||
leijiLabel.textAlignment = NSTextAlignmentLeft;
|
||||
leijiLabel.font = MEDIUMFONT(11);
|
||||
[moneyImg addSubview:leijiLabel];
|
||||
|
||||
self.leftMoneyLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(22),leijiLabel.bottom + kRealValue(10), moneyImg.width/2, 11)];
|
||||
self.leftMoneyLabel.text = @"¥--";
|
||||
self.leftMoneyLabel.textColor = KWhiteColor;
|
||||
self.leftMoneyLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.leftMoneyLabel.font = BOLDSYSTEMFONT(16);
|
||||
[moneyImg addSubview:self.leftMoneyLabel];
|
||||
|
||||
|
||||
UILabel * leijiRightLabel = [[UILabel alloc] initWithFrame:CGRectMake(moneyImg.width/2 ,linView.bottom + kRealValue(10), moneyImg.width/2 - kRealValue(40) , 11)];
|
||||
leijiRightLabel.text = @"已结算(税前)";
|
||||
leijiRightLabel.textColor = KWhiteColor;
|
||||
leijiRightLabel.textAlignment = NSTextAlignmentRight;
|
||||
leijiRightLabel.font = MEDIUMFONT(11);
|
||||
[moneyImg addSubview:leijiRightLabel];
|
||||
|
||||
self.rightMoneyLabel = [[UILabel alloc] initWithFrame:CGRectMake(moneyImg.width/2,leijiLabel.bottom + kRealValue(10), moneyImg.width/2 - kRealValue(40), 16)];
|
||||
self.rightMoneyLabel.text = @"¥--0";
|
||||
self.rightMoneyLabel.textColor = KWhiteColor;
|
||||
self.rightMoneyLabel.textAlignment = NSTextAlignmentRight;
|
||||
self.rightMoneyLabel.font = BOLDSYSTEMFONT(16);
|
||||
[moneyImg addSubview:self.rightMoneyLabel];
|
||||
|
||||
//月份选择
|
||||
UIView * topView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), moneyImg.bottom + kRealValue(15), kScreenWidth - kRealValue(30), kRealValue(44))];
|
||||
topView.backgroundColor = KWhiteColor;
|
||||
topView.layer.cornerRadius = 10.0f;
|
||||
topView.layer.masksToBounds = true;
|
||||
[mainScrollview addSubview:topView];
|
||||
|
||||
UIImageView * sattisImg = [[UIImageView alloc] initWithFrame:CGRectMake(kRealValue(17), kRealValue(15), kRealValue(14), kRealValue(14))];
|
||||
sattisImg.image = IMAGE_NAMED(@"smallStatis_icon");
|
||||
[topView addSubview:sattisImg];
|
||||
|
||||
UILabel * monthsLabel = [[UILabel alloc] initWithFrame:CGRectMake(sattisImg.right + kRealValue(9),0, moneyImg.width/2, kRealValue(44))];
|
||||
monthsLabel.text = @"月度统计";
|
||||
monthsLabel.textColor = CFontColor1;
|
||||
monthsLabel.textAlignment = NSTextAlignmentLeft;
|
||||
monthsLabel.font = BOLDSYSTEMFONT(15);
|
||||
[topView addSubview:monthsLabel];
|
||||
|
||||
NSDate * currentDate = [NSDate date];
|
||||
YYLabel * monthLabel = [[YYLabel alloc]initWithFrame:CGRectMake(topView.width - 190, 0, 160, kRealValue(44))];
|
||||
self.quesDate = [NSString stringWithFormat:@"%ld-%02ld",currentDate.year,currentDate.month];
|
||||
monthLabel.text = [NSString stringWithFormat:@"%ld年%ld月 ",currentDate.year,currentDate.month];
|
||||
monthLabel.textColor = UIColorHex(#999999);
|
||||
self.monthLabel = monthLabel;
|
||||
[topView addSubview:monthLabel];
|
||||
|
||||
UIImage * image = [UIImage imageNamed:@"garyDown"];
|
||||
|
||||
NSMutableAttributedString * roomAttri = [[NSMutableAttributedString alloc] initWithString:monthLabel.text];
|
||||
|
||||
NSMutableAttributedString * roomAttachText = [NSMutableAttributedString attachmentStringWithContent:image contentMode:UIViewContentModeCenter attachmentSize:CGSizeMake(10, 10) alignToFont:[UIFont boldSystemFontOfSize:13] alignment:YYTextVerticalAlignmentCenter]; //content:内容 size:图片尺寸 alignToFont:字符串内字体的格式
|
||||
[roomAttri appendAttributedString:roomAttachText];
|
||||
|
||||
monthLabel.attributedText = roomAttri;
|
||||
|
||||
monthLabel.textAlignment = NSTextAlignmentRight;
|
||||
|
||||
[monthLabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
|
||||
[self selectedMonth];
|
||||
}];
|
||||
|
||||
//统计图
|
||||
UIView * chatView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), topView.bottom + kRealValue(8), kScreenWidth - kRealValue(30), kRealValue(300))];
|
||||
chatView.backgroundColor = KWhiteColor;
|
||||
chatView.layer.cornerRadius = 10;
|
||||
chatView.layer.masksToBounds = true;
|
||||
[mainScrollview addSubview:chatView];
|
||||
|
||||
UILabel * chatTopLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15),kRealValue(16), 200, kRealValue(15))];
|
||||
chatTopLabel.text = @"分类统计";
|
||||
chatTopLabel.textColor = CFontColor1;
|
||||
chatTopLabel.textAlignment = NSTextAlignmentLeft;
|
||||
chatTopLabel.font = BOLDSYSTEMFONT(15);
|
||||
[chatView addSubview:chatTopLabel];
|
||||
|
||||
self.aaChartView = [[AAChartView alloc]init];
|
||||
self.aaChartView.delegate = self;
|
||||
self.aaChartView.frame = CGRectMake(0, chatTopLabel.bottom, chatView.width, chatView.height - kRealValue(30));
|
||||
////禁用 AAChartView 滚动效果(默认不禁用)
|
||||
self.aaChartView.scrollEnabled = NO;
|
||||
[chatView addSubview:self.aaChartView];
|
||||
// [_aaChartView aa_drawChartWithOptions:self.adjustPieChartTitleAndDataLabelFontStyle];
|
||||
//列表统计
|
||||
//统计图
|
||||
UIView * bottomView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), chatView.bottom + kRealValue(8), kScreenWidth - kRealValue(30), kRealValue(175))];
|
||||
bottomView.backgroundColor = KWhiteColor;
|
||||
bottomView.layer.cornerRadius = 10;
|
||||
bottomView.layer.masksToBounds = true;
|
||||
[mainScrollview addSubview:bottomView];
|
||||
|
||||
UILabel * bottomLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15),0, moneyImg.width/2, kRealValue(44))];
|
||||
bottomLabel.text = @"分类统计";
|
||||
bottomLabel.textColor = CFontColor1;
|
||||
bottomLabel.textAlignment = NSTextAlignmentLeft;
|
||||
bottomLabel.font = BOLDSYSTEMFONT(15);
|
||||
[bottomView addSubview:bottomLabel];
|
||||
|
||||
// YYLabel * lookLabel = [[YYLabel alloc]initWithFrame:CGRectMake(topView.width - 170, 0, 160, kRealValue(44))];
|
||||
// lookLabel.text = @"查看明细 >";
|
||||
// lookLabel.textColor = UIColorHex(#3390FF);
|
||||
// lookLabel.font = MEDIUMFONT(11);
|
||||
// lookLabel.textAlignment = NSTextAlignmentRight;
|
||||
// [bottomView addSubview:lookLabel];
|
||||
//
|
||||
// [lookLabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
//
|
||||
// [self selectedMonth];
|
||||
// }];
|
||||
UIView * conView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(17), bottomLabel.bottom + kRealValue(15), bottomView.width - kRealValue(34), 90)];
|
||||
conView.layer.borderWidth = 1.0;
|
||||
conView.layer.borderColor = UIColorHex(#E0E0E0).CGColor;
|
||||
[bottomView addSubview:conView];
|
||||
|
||||
UIView * tabTitleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, bottomView.width - kRealValue(34), 30)];
|
||||
tabTitleView.backgroundColor = UIColorHex(#EFEFEF);
|
||||
[conView addSubview:tabTitleView];
|
||||
|
||||
NSArray * array = @[@"类别",@"进行中",@"已完成",@"合计"];
|
||||
for (int i = 0; i < 4; i ++) {
|
||||
|
||||
UILabel * conteLabel = [[UILabel alloc] init];
|
||||
conteLabel.frame = CGRectMake( tabTitleView.width/4 * i, 0 , tabTitleView.width/4,tabTitleView.height);
|
||||
conteLabel.text = array[i];
|
||||
conteLabel.textColor = CFontColor1;
|
||||
conteLabel.textAlignment = NSTextAlignmentCenter;
|
||||
conteLabel.font = SYSTEMFONT(10);
|
||||
[tabTitleView addSubview:conteLabel];
|
||||
}
|
||||
|
||||
UIView * tabLineView = [[UIView alloc] initWithFrame:CGRectMake(0, 60, conView.width, 1)];
|
||||
tabLineView.backgroundColor = UIColorHex(#E0E0E0);
|
||||
[conView addSubview:tabLineView];
|
||||
|
||||
NSArray * dataArray =@[@[@"图文咨询",@"2",@"8",@"10"],@[@"视频咨询",@"2",@"5",@"7"]];
|
||||
|
||||
for (int i = 0; i < dataArray.count; i ++) {
|
||||
|
||||
UIView * tab = [self createTabconteWithFrame:CGRectMake(0, tabTitleView.bottom + i * 30, tabTitleView.width, 30) withArray:dataArray[i] withTag:100 + i * 10];
|
||||
[conView addSubview:tab];
|
||||
|
||||
}
|
||||
mainScrollview.contentSize = CGSizeMake(kScreenWidth , bottomView.bottom + 100);
|
||||
}
|
||||
|
||||
|
||||
- (void)selectedMonth {
|
||||
|
||||
BRDatePickerView *datePickerView = [[BRDatePickerView alloc]init];
|
||||
// 2.设置属性
|
||||
datePickerView.pickerMode = BRDatePickerModeYM;
|
||||
datePickerView.title = @"选择月份";
|
||||
// datePickerView.selectValue = @"2019-10-30";
|
||||
datePickerView.minDate = [NSDate br_setYear:1949 month:3 day:12];
|
||||
datePickerView.maxDate = [NSDate date];
|
||||
datePickerView.isAutoSelect = YES;
|
||||
datePickerView.showUnitType = BRShowUnitTypeOnlyCenter;
|
||||
datePickerView.resultBlock = ^(NSDate *selectDate, NSString *selectValue) {
|
||||
NSLog(@"选择的值:%@", selectValue);
|
||||
self.quesDate = [NSString stringWithFormat:@"%ld-%02ld",selectDate.year,selectDate.month];
|
||||
self.monthLabel.text = [NSString stringWithFormat:@"%@ ",selectValue];
|
||||
UIImage * image = [UIImage imageNamed:@"garyDown"];
|
||||
NSMutableAttributedString * roomAttri = [[NSMutableAttributedString alloc] initWithString:self.monthLabel.text];
|
||||
|
||||
NSMutableAttributedString * roomAttachText = [NSMutableAttributedString attachmentStringWithContent:image contentMode:UIViewContentModeCenter attachmentSize:CGSizeMake(10, 10) alignToFont:[UIFont boldSystemFontOfSize:13] alignment:YYTextVerticalAlignmentCenter]; //content:内容 size:图片尺寸 alignToFont:字符串内字体的格式
|
||||
[roomAttri appendAttributedString:roomAttachText];
|
||||
|
||||
self.monthLabel.attributedText = roomAttri;
|
||||
|
||||
self.monthLabel.textAlignment = NSTextAlignmentRight;
|
||||
[self createData];
|
||||
};
|
||||
|
||||
datePickerView.pickerStyle = [BRPickerStyle pickerStyleWithThemeColor:UIColorHex(#21BEBD)];
|
||||
// 3.显示
|
||||
[datePickerView show];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (UIView *)createTabconteWithFrame:(CGRect)frame
|
||||
withArray:(NSArray *)conteArray
|
||||
withTag:(NSInteger)labTag
|
||||
{
|
||||
|
||||
UIView * connteView = [[UIView alloc] initWithFrame:frame];
|
||||
|
||||
for (int i = 0 ; i < conteArray.count; i ++) {
|
||||
//100 110
|
||||
UILabel * conteLabel = [[UILabel alloc] init];
|
||||
conteLabel.frame = CGRectMake(connteView.width/4 * i, 0,connteView.width/4 , connteView.height);
|
||||
conteLabel.text = conteArray[i];
|
||||
conteLabel.textColor = CFontColor1;
|
||||
conteLabel.font = SYSTEMFONT(12);
|
||||
conteLabel.textAlignment = NSTextAlignmentCenter;
|
||||
conteLabel.tag = labTag + 10 + i ;
|
||||
DLog(@"------------%@----------%ld",conteLabel.text, conteLabel.tag);
|
||||
[connteView addSubview:conteLabel];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return connteView;
|
||||
|
||||
}
|
||||
|
||||
- (void)aaChartView:(AAChartView *)aaChartView moveOverEventWithMessage:(AAMoveOverEventMessageModel *)message {
|
||||
|
||||
NSDictionary *messageDic = @{
|
||||
@"category":message.category,
|
||||
@"index":@(message.index),
|
||||
@"name":message.name,
|
||||
@"offset":message.offset,
|
||||
@"x":message.x,
|
||||
@"y":message.y
|
||||
};
|
||||
|
||||
NSNumber *plotX = message.offset[@"plotX"];
|
||||
|
||||
// self.tipLab.hidden = NO;
|
||||
// self.tipLab.text = [NSString stringWithFormat:@"%f",[message.y floatValue]];
|
||||
// self.tipLab.centerX = [plotX floatValue]+6+50;
|
||||
//
|
||||
NSLog(@"mes:%@", messageDic);
|
||||
}
|
||||
|
||||
|
||||
- (void)createData {
|
||||
|
||||
YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"QUSTIONAPI" NeedToken:@""];
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject: self.quesDate forKey:@"date"];
|
||||
[workApi GetQuestionStatistics:parmDic];
|
||||
|
||||
}
|
||||
|
||||
- (void)createEarmingsData {
|
||||
|
||||
YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"EARNINGAPI" NeedToken:@""];
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[workApi GetStatisticsEarnings:parmDic];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||
{
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||
{
|
||||
[self hiddenAllMBProgressHUD];
|
||||
if ([tag isEqualToString:@"QUSTIONAPI"]) {
|
||||
|
||||
NSArray * array = response;
|
||||
[self.dataArray removeAllObjects];
|
||||
for (NSDictionary * dic in array) {
|
||||
|
||||
YXQuestionStaticsModel * model = [YXQuestionStaticsModel modelWithDictionary:dic];
|
||||
[self.dataArray addObject:model];
|
||||
}
|
||||
NSInteger pictureNum;
|
||||
NSInteger videoNum;
|
||||
NSInteger allNumber;
|
||||
YXQuestionStaticsModel * picmodel;
|
||||
YXQuestionStaticsModel * videomodel;
|
||||
if (self.dataArray.count>=2) {
|
||||
picmodel = self.dataArray[0];
|
||||
pictureNum = [picmodel.total integerValue];
|
||||
videomodel = self.dataArray[1];
|
||||
videoNum = [videomodel.total integerValue];
|
||||
}
|
||||
|
||||
NSString *str2 = @"</span> <span style=""color:#333333;text-align:center;font-weight:normal;font-size:15px""> 咨询方式 </span>";
|
||||
AAOptions *aaOptions = AAOptions.new
|
||||
.chartSet(AAChart.new.typeSet(AAChartTypePie))
|
||||
.titleSet(AATitle.new
|
||||
.useHTMLSet(true)
|
||||
.textSet(str2)//标题文本内容
|
||||
.alignSet(AAChartAlignTypeCenter)//标题水平居中
|
||||
.verticalAlignSet(AAChartVerticalAlignTypeMiddle)//标题垂直居中
|
||||
.ySet(@0)//标题相对于垂直对齐的偏移量,取值范围:图表的上边距(chart.spacingTop )到图表的下边距(chart.spacingBottom),可以是负值,单位是px。默认值和字体大小有关。
|
||||
)
|
||||
.colorsSet(@[@"#407FFF",@"#A682E6"])//设置颜色主题
|
||||
.seriesSet(@[
|
||||
AASeriesElement.new
|
||||
.nameSet(@"人数")
|
||||
.sizeSet(@150)//环形图的半径大小
|
||||
.innerSizeSet(@"60%")//内部圆环半径大小占比
|
||||
.allowPointSelectSet(false)//是否允许在点击数据点标记(扇形图点击选中的块发生位移)
|
||||
.dataLabelsSet(AADataLabels.new
|
||||
.enabledSet(true)
|
||||
.useHTMLSet(true)
|
||||
.distanceSet(@20)//扇形图百分比线的长度
|
||||
.formatSet(@"<b>{point.name} {point.y}</b>")
|
||||
)
|
||||
|
||||
.dataSet(@[
|
||||
@[@"图文咨询", @(pictureNum)],
|
||||
@[@"视频咨询", @(videoNum)],
|
||||
]),
|
||||
]);
|
||||
[self.aaChartView aa_drawChartWithOptions:aaOptions];
|
||||
// / 110 111 112 113 114
|
||||
|
||||
// 120 121 122 123 124
|
||||
UILabel * videoLabel = [self.view viewWithTag:111];
|
||||
videoLabel.text = [NSString stringWithFormat:@"%@",picmodel.inProgress];
|
||||
UILabel * videoReplyLabel = [self.view viewWithTag:112];
|
||||
videoReplyLabel.text = [NSString stringWithFormat:@"%@",picmodel.completed];
|
||||
UILabel * videoComplLabel = [self.view viewWithTag:113];
|
||||
videoComplLabel.text = [NSString stringWithFormat:@"%@",picmodel.total];
|
||||
|
||||
UILabel * picLabel = [self.view viewWithTag:121];
|
||||
picLabel.text = [NSString stringWithFormat:@"%@",videomodel.inProgress];
|
||||
UILabel * picReplyLabel = [self.view viewWithTag:122];
|
||||
picReplyLabel.text = [NSString stringWithFormat:@"%@",videomodel.completed];
|
||||
UILabel * pciCompLabel = [self.view viewWithTag:123];
|
||||
pciCompLabel.text = [NSString stringWithFormat:@"%@",videomodel.total];
|
||||
}
|
||||
if ([tag isEqualToString:@"EARNINGAPI"]) {
|
||||
NSDictionary * responDic = response;
|
||||
|
||||
self.moneyLabel.text = [NSString stringWithFormat:@"¥%.2f",[[responDic objectForKey:@"unsettled"] floatValue]];
|
||||
self.leftMoneyLabel.text = [NSString stringWithFormat:@"¥%.2f",[[responDic objectForKey:@"sumIncome"] floatValue]];
|
||||
self.rightMoneyLabel.text = [NSString stringWithFormat:@"¥%.2f",[[responDic objectForKey:@"sumPaymentMoney"] floatValue]];
|
||||
|
||||
}
|
||||
}
|
||||
//咨询收益
|
||||
- (void)handleTapGesture:(id)sender {
|
||||
|
||||
XJDBillViewController * billVC = [[XJDBillViewController alloc] init];
|
||||
|
||||
[self.navigationController pushViewController:billVC animated:YES];
|
||||
|
||||
|
||||
}
|
||||
#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
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
//
|
||||
// YXStopAnnouncementViewController.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/5.
|
||||
//
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXStopAnnouncementViewController : YXBaseViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-387
@@ -1,387 +0,0 @@
|
||||
//
|
||||
// YXStopAnnouncementViewController.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/5.
|
||||
//
|
||||
|
||||
#import "YXStopAnnouncementViewController.h"
|
||||
#import "ZHTagListView.h"
|
||||
#import "BRDatePickerView.h"
|
||||
#import "NSDate+Calendar.h"
|
||||
#import "UIPlaceHolderTextView.h"
|
||||
#import "YXStopReasonModel.h"
|
||||
#import "StopQuestionPopView.h"
|
||||
|
||||
@interface YXStopAnnouncementViewController ()
|
||||
|
||||
@property (nonatomic, strong) UIView * announceView;
|
||||
|
||||
@property (nonatomic, strong) YYLabel * starLabel;
|
||||
|
||||
@property (nonatomic, strong) YYLabel * endLabel;
|
||||
|
||||
@property (nonatomic, strong) UIPlaceHolderTextView * textView;
|
||||
|
||||
@property (nonatomic, strong) ZHTagListView *tagList;
|
||||
|
||||
@property (nonatomic, strong) UILabel * timeLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * centerLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * gonggaoLabel;
|
||||
|
||||
@property (nonatomic, copy) NSString * reasonString;
|
||||
|
||||
@property (nonatomic, strong) NSDate * starDate;
|
||||
@property (nonatomic, strong) NSDate * endDate;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * reasonArray;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXStopAnnouncementViewController
|
||||
|
||||
- (NSMutableArray *)reasonArray {
|
||||
|
||||
if (!_reasonArray) {
|
||||
_reasonArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _reasonArray;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
self.view.backgroundColor = UIColorHex(#EEEEEE);
|
||||
self.isHidenNaviBar = false;
|
||||
self.navigationItem.title = @"暂停服务公告";
|
||||
[self createUI];
|
||||
[self getReasonData];
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
UIView * announceView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(10), kScreenWidth - kRealValue(30), kRealValue(388))];
|
||||
announceView.layer.cornerRadius = 10;
|
||||
announceView.backgroundColor = KWhiteColor;
|
||||
announceView.layer.masksToBounds = true;
|
||||
self.announceView = announceView;
|
||||
[self.view addSubview:announceView];
|
||||
|
||||
UILabel * resouLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(20), 60, 13)];
|
||||
resouLabel.textColor = CFontColor1;
|
||||
resouLabel.font = MEDIUMFONT(14);
|
||||
resouLabel.text = @"暂停原因";
|
||||
[announceView addSubview:resouLabel];
|
||||
|
||||
|
||||
NSMutableArray *_dataSource = @[@" ",@" ",@" ",@" "].mutableCopy;
|
||||
|
||||
ZHTagListConfiguration *config = [ZHTagListConfiguration defaultConfiguration];
|
||||
config.tagTextColor = CFontColor1;
|
||||
config.tagTextMargin = 11;
|
||||
config.tagHeight = 27;
|
||||
config.tagTextFont = SYSTEMFONT(13);
|
||||
config.tagListViewInset = UIEdgeInsetsMake(15, 15, 15, 10);
|
||||
|
||||
ZHTagListView *tagList = [[ZHTagListView alloc] initWithFrame:CGRectMake(resouLabel.right, 0, announceView.width - resouLabel.right - kRealValue(10), 0) configuration:config tagTexts:_dataSource];
|
||||
tagList.backgroundColor = KWhiteColor;
|
||||
[announceView addSubview:tagList];
|
||||
self.tagList = tagList;
|
||||
[tagList.tagButtonList enumerateObjectsUsingBlock:^(UIButton * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
// [obj setBackgroundColor:KRedColor];
|
||||
|
||||
}];
|
||||
[tagList setTagClickHandler:^(ZHTagListView *tagListView, NSString *tagText, NSUInteger index) {
|
||||
UIButton * btn = tagListView.tagButtonList[index];
|
||||
self.reasonString = tagText;
|
||||
for (UIButton * selectBtn in tagListView.tagButtonList) {
|
||||
if (selectBtn == btn ) {
|
||||
selectBtn.backgroundColor = UIColorHex(#21BEBD);
|
||||
[selectBtn setTitleColor:KWhiteColor forState:UIControlStateNormal];
|
||||
}else
|
||||
{
|
||||
selectBtn.backgroundColor = KClearColor;
|
||||
[selectBtn setTitleColor:CFontColor1 forState:UIControlStateNormal];
|
||||
}
|
||||
}
|
||||
}];
|
||||
|
||||
UILabel * timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15),tagList.bottom + kRealValue(15), 60, 13)];
|
||||
timeLabel.textColor = CFontColor1;
|
||||
timeLabel.font = MEDIUMFONT(14);
|
||||
timeLabel.text = @"暂停时间";
|
||||
self.timeLabel = timeLabel;
|
||||
[announceView addSubview:timeLabel];
|
||||
|
||||
NSDateFormatter *formater = [[ NSDateFormatter alloc] init];
|
||||
[formater setDateFormat:@"yyyy-MM-dd"];// 时间格式
|
||||
NSDate *currentDate = [NSDate date];//获取当前日期
|
||||
NSString *currentDateStr = [formater stringFromDate:currentDate];
|
||||
self.starDate = currentDate;
|
||||
self.endDate = currentDate;
|
||||
self.starLabel = [[YYLabel alloc] initWithFrame:CGRectMake(timeLabel.right + kRealValue(15),tagList.bottom + kRealValue(12), 102, 30)];
|
||||
self.starLabel.textColor = CFontColor1;
|
||||
self.starLabel.font = MEDIUMFONT(14);
|
||||
self.starLabel.text = currentDateStr;
|
||||
self.starLabel.layer.cornerRadius = 5;
|
||||
self.starLabel.layer.borderWidth = 1.0f;
|
||||
self.starLabel.layer.borderColor = UIColorHex(#CCCCCC).CGColor;
|
||||
self.starLabel.textAlignment = NSTextAlignmentCenter;
|
||||
MJWeakSelf
|
||||
[self.starLabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
[weakSelf selectStarOnclick];
|
||||
}];
|
||||
[announceView addSubview:self.starLabel];
|
||||
|
||||
UILabel * centerLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.starLabel.right ,tagList.bottom + kRealValue(12), 44, 30)];
|
||||
centerLabel.textColor = CFontColor1;
|
||||
centerLabel.font = MEDIUMFONT(14);
|
||||
centerLabel.text = @"至";
|
||||
self.centerLabel = centerLabel;
|
||||
centerLabel.textAlignment = NSTextAlignmentCenter;
|
||||
[announceView addSubview:centerLabel];
|
||||
|
||||
self.endLabel = [[YYLabel alloc] initWithFrame:CGRectMake(centerLabel.right,tagList.bottom + kRealValue(12), self.starLabel.width, self.starLabel.height)];
|
||||
self.endLabel.textColor = CFontColor1;
|
||||
self.endLabel.font = MEDIUMFONT(14);
|
||||
self.endLabel.text = currentDateStr;
|
||||
self.endLabel.layer.cornerRadius = 5;
|
||||
self.endLabel.layer.borderWidth = 1.0f;
|
||||
self.endLabel.layer.borderColor = UIColorHex(#CCCCCC).CGColor;
|
||||
self.endLabel.textAlignment = NSTextAlignmentCenter;
|
||||
|
||||
[self.endLabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
[weakSelf selectEndOnclick];
|
||||
}];
|
||||
[announceView addSubview:self.endLabel];
|
||||
|
||||
UILabel * gonggaoLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15),self.endLabel.bottom + kRealValue(23), 60, 13)];
|
||||
gonggaoLabel.textColor = CFontColor1;
|
||||
gonggaoLabel.font = MEDIUMFONT(14);
|
||||
gonggaoLabel.text = @"暂停公告";
|
||||
self.gonggaoLabel = gonggaoLabel;
|
||||
[announceView addSubview:gonggaoLabel];
|
||||
|
||||
self.textView = [[UIPlaceHolderTextView alloc] initWithFrame:CGRectMake(kRealValue(15), gonggaoLabel.bottom + kRealValue(15), announceView.width - kRealValue(30), kRealValue(179))];
|
||||
self.textView.placeholder = @"请输入暂停公告";
|
||||
self.textView.font = SYSTEMFONT(14);
|
||||
self.textView.layer.cornerRadius = 5;
|
||||
self.textView.layer.masksToBounds = true;
|
||||
self.textView.backgroundColor = UIColorHex(#EFEFEF);
|
||||
[announceView addSubview:self.textView];
|
||||
|
||||
UIButton * publishBtn = [[UIButton alloc] initWithFrame:CGRectMake(kRealValue(111), kScreenHeight - kTopHeight - SafetyAreaHeight - kRealValue(56), kScreenWidth - kRealValue(222), kRealValue(35))];
|
||||
[publishBtn setTitle:@"发布" forState:UIControlStateNormal];
|
||||
[publishBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||
publishBtn.titleLabel.font = SYSTEMFONT(14);
|
||||
publishBtn.layer.cornerRadius = 18;
|
||||
publishBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor;
|
||||
publishBtn.layer.borderWidth = 1.0;
|
||||
publishBtn.layer.masksToBounds = true;
|
||||
publishBtn.backgroundColor = KWhiteColor;
|
||||
[publishBtn addTarget:self action:@selector(publishAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self.view addSubview:publishBtn];
|
||||
}
|
||||
|
||||
- (void)getReasonData {
|
||||
|
||||
YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"ReasonAPI" NeedToken:@""];
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject:@"doctor_stop_reason_type" forKey:@"dictKey"];
|
||||
[workApi GetPublishServerReason:parmDic];
|
||||
|
||||
}
|
||||
|
||||
- (void)selectStarOnclick {
|
||||
self.starLabel.layer.borderColor = UIColorHex(#21BEBD).CGColor;
|
||||
// 1.创建日期选择器
|
||||
BRDatePickerView *datePickerView = [[BRDatePickerView alloc]init];
|
||||
// 2.设置属性
|
||||
datePickerView.pickerMode = BRDatePickerModeYMD;
|
||||
datePickerView.title = @"选择暂停日期";
|
||||
// datePickerView.selectValue = @"2019-10-30";
|
||||
datePickerView.minDate = [NSDate br_setYear:2003 month:3 day:12];
|
||||
datePickerView.maxDate = [NSDate br_setYear:2050 month:3 day:12];
|
||||
datePickerView.isAutoSelect = YES;
|
||||
datePickerView.showUnitType = BRShowUnitTypeOnlyCenter;
|
||||
datePickerView.resultBlock = ^(NSDate *selectDate, NSString *selectValue) {
|
||||
NSLog(@"选择的值:%@", selectValue);
|
||||
self.starDate = selectDate;
|
||||
self.starLabel.text = selectValue;
|
||||
};
|
||||
|
||||
datePickerView.pickerStyle = [BRPickerStyle pickerStyleWithThemeColor:UIColorHex(#21BEBD)];
|
||||
// 3.显示
|
||||
[datePickerView show];
|
||||
}
|
||||
|
||||
- (void)selectEndOnclick {
|
||||
self.endLabel.layer.borderColor = UIColorHex(#21BEBD).CGColor;
|
||||
|
||||
// 1.创建日期选择器
|
||||
BRDatePickerView *datePickerView = [[BRDatePickerView alloc]init];
|
||||
// 2.设置属性
|
||||
datePickerView.pickerMode = BRDatePickerModeYMD;
|
||||
datePickerView.title = @"选择暂停日期";
|
||||
// datePickerView.selectValue = @"2019-10-30";
|
||||
datePickerView.minDate = [NSDate br_setYear:2003 month:3 day:12];
|
||||
datePickerView.maxDate = [NSDate br_setYear:2050 month:3 day:12];
|
||||
datePickerView.isAutoSelect = YES;
|
||||
datePickerView.showUnitType = BRShowUnitTypeOnlyCenter;
|
||||
datePickerView.resultBlock = ^(NSDate *selectDate, NSString *selectValue) {
|
||||
NSLog(@"选择的值:%@", selectValue);
|
||||
self.endDate = selectDate;
|
||||
self.endLabel.text = selectValue;
|
||||
};
|
||||
|
||||
datePickerView.pickerStyle = [BRPickerStyle pickerStyleWithThemeColor:UIColorHex(#21BEBD)];
|
||||
// 3.显示
|
||||
[datePickerView show];
|
||||
}
|
||||
|
||||
#pragma mark:发布
|
||||
|
||||
- (void)publishAction {
|
||||
if (ValidStr(self.reasonString)) {
|
||||
|
||||
[MBProgressHUD showErrorMessage:@"请选择暂停原因"];
|
||||
return;
|
||||
}
|
||||
if (ValidStr(self.textView.text)) {
|
||||
|
||||
[MBProgressHUD showErrorMessage:@"请输入公告"];
|
||||
return;
|
||||
}
|
||||
|
||||
//查询当前咨询
|
||||
[self showMBProgressHUDWithString:@"发布中,请稍候..." autoHidden:false];
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
|
||||
NSTimeInterval starLong =[self.starDate timeIntervalSince1970]*1000; // *1000 是精确到毫秒,不乘就是精确到秒
|
||||
NSString * starString = [NSString stringWithFormat:@"%.0f", starLong]; //转为字符型
|
||||
|
||||
NSTimeInterval endLong =[self.endDate timeIntervalSince1970]*1000; // *1000 是精确到毫秒,不乘就是精确到秒
|
||||
NSString * endString = [NSString stringWithFormat:@"%.0f", endLong]; //转为字符型
|
||||
|
||||
[parmDic setObject:starString forKey:@"startTime"];
|
||||
[parmDic setObject:endString forKey:@"endTime"];
|
||||
YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"CURRENTAPI" NeedToken:@""];
|
||||
[workApi GetCurrentServerNumber:parmDic];
|
||||
//
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)addPublishDate {
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
|
||||
NSTimeInterval starLong =[self.starDate timeIntervalSince1970]*1000; // *1000 是精确到毫秒,不乘就是精确到秒
|
||||
NSString * startDayLong = [NSString stringWithFormat:@"%.0f", starLong]; //转为字符型
|
||||
|
||||
NSTimeInterval endLong =[self.endDate timeIntervalSince1970]*1000; // *1000 是精确到毫秒,不乘就是精确到秒
|
||||
NSString * endDayLong = [NSString stringWithFormat:@"%.0f", endLong]; //转为字符型
|
||||
|
||||
NSDateFormatter *formater = [[ NSDateFormatter alloc] init];
|
||||
[formater setDateFormat:@"yyyy-MM-dd"];// 时间格式
|
||||
|
||||
if (endLong < starLong) {
|
||||
|
||||
[EasyTextView showErrorText:@"结束时间小于开始时间,请重新选择"];
|
||||
return;
|
||||
}
|
||||
|
||||
NSString *starDateStr = [formater stringFromDate:self.starDate];
|
||||
NSString *endDateStr = [formater stringFromDate:self.endDate];
|
||||
|
||||
[parmDic setObject:self.reasonString forKey:@"stopReason"];
|
||||
[parmDic setObject:startDayLong forKey:@"startDayLong"];
|
||||
[parmDic setObject:endDayLong forKey:@"endDayLong"];
|
||||
[parmDic setObject:self.textView.text forKey:@"notice"];
|
||||
[parmDic setObject:@"" forKey:@"doctorId"];
|
||||
[parmDic setObject:endDateStr forKey:@"endDay"];
|
||||
[parmDic setObject:starDateStr forKey:@"startDay"];
|
||||
|
||||
|
||||
YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"ADDAPI" NeedToken:@""];
|
||||
[workApi PostStopPublishServer:parmDic];
|
||||
|
||||
|
||||
|
||||
}
|
||||
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||
{
|
||||
[EasyTextView showErrorText:message];
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||
{
|
||||
|
||||
if ([tag isEqualToString:@"ReasonAPI"]) {
|
||||
NSArray * resArray = response;
|
||||
NSMutableArray * textArray = [[NSMutableArray alloc] init];
|
||||
for (NSDictionary * resDic in resArray) {
|
||||
|
||||
YXStopReasonModel * model = [YXStopReasonModel modelWithDictionary:resDic];
|
||||
[textArray addObject:model.text];
|
||||
[self.reasonArray addObject:model];
|
||||
}
|
||||
self.tagList.tags = textArray;
|
||||
//布局
|
||||
self.starLabel.top = self.tagList.bottom + kRealValue(12);
|
||||
self.centerLabel.top = self.starLabel.top;
|
||||
self.endLabel.top = self.starLabel.top;
|
||||
self.gonggaoLabel.top = self.endLabel.bottom + kRealValue(23);
|
||||
self.textView.top = self.gonggaoLabel.bottom + kRealValue(15);
|
||||
self.announceView.bottom = self.textView.bottom + kRealValue(20);
|
||||
self.announceView.top = kRealValue(15);
|
||||
self.timeLabel.top = self.tagList.bottom + kRealValue(15);
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"CURRENTAPI"]) {
|
||||
[self addPublishDate];
|
||||
//转换为时间戳
|
||||
// NSString * resString = response;
|
||||
//
|
||||
// if ([resString integerValue] == 0 ) {
|
||||
// [self addPublishDate];
|
||||
//
|
||||
// }else
|
||||
// {
|
||||
//
|
||||
// StopQuestionPopView * popview = [[StopQuestionPopView alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||
// popview.questionNumber = resString;
|
||||
// popview.publisBlock = ^{
|
||||
// [self addPublishDate];
|
||||
// };
|
||||
// [[UIApplication sharedApplication].keyWindow addSubview:popview];
|
||||
// popview.alpha = 0;
|
||||
// [UIView animateWithDuration:0.5 animations:^{
|
||||
// popview.alpha = 1;
|
||||
// } completion:^(BOOL finished) {
|
||||
// }];
|
||||
// }
|
||||
}
|
||||
if ([tag isEqualToString:@"ADDAPI"]) {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
#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
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// YXStopQuestionCauseViewController.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/30.
|
||||
//
|
||||
|
||||
#import "YXBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXStopQuestionCauseViewController : YXBaseViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
//
|
||||
// YXStopQuestionCauseViewController.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/30.
|
||||
//
|
||||
|
||||
#import "YXStopQuestionCauseViewController.h"
|
||||
|
||||
@interface YXStopQuestionCauseViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXStopQuestionCauseViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
self.isHidenNaviBar = false;
|
||||
self.navigationItem.title = @"暂停服务";
|
||||
[self createUI];
|
||||
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
|
||||
|
||||
}
|
||||
/*
|
||||
#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
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// YXStopQuestionSettingVC.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/29.
|
||||
//
|
||||
|
||||
#import "YXBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXStopQuestionSettingVC : YXBaseViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-185
@@ -1,185 +0,0 @@
|
||||
//
|
||||
// YXStopQuestionSettingVC.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/29.
|
||||
//
|
||||
|
||||
#import "YXStopQuestionSettingVC.h"
|
||||
#import "StopQuestionTableView.h"
|
||||
#import "StopQuestionPopView.h"
|
||||
#import "YXStopServiceModel.h"
|
||||
#import "YXStopAnnouncementViewController.h"
|
||||
@interface YXStopQuestionSettingVC ()
|
||||
|
||||
@property (nonatomic, strong) StopQuestionTableView * homeTable;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * dataArray;
|
||||
|
||||
@property (nonatomic, assign) NSInteger pageNo;
|
||||
|
||||
@property (nonatomic, assign) NSInteger pageSize;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXStopQuestionSettingVC
|
||||
|
||||
|
||||
- (NSMutableArray *)dataArray {
|
||||
|
||||
if (!_dataArray) {
|
||||
_dataArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _dataArray;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
self.isHidenNaviBar = false;
|
||||
self.view.backgroundColor = UIColorHex(#EFEFEF);
|
||||
self.navigationItem.title = @"暂停服务";
|
||||
self.pageNo = 0;
|
||||
self.pageSize = 10;
|
||||
[self createUI];
|
||||
[self createData];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
|
||||
[super viewWillAppear:animated] ;
|
||||
|
||||
[self.homeTable.mj_header beginRefreshing];
|
||||
|
||||
}
|
||||
- (void)createUI {
|
||||
|
||||
|
||||
UIButton * stopPublish = [[UIButton alloc] init];
|
||||
[stopPublish setTitle:@"发布暂停公告" forState:UIControlStateNormal];
|
||||
[stopPublish setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||
[stopPublish addTarget:self action:@selector(publishAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
stopPublish.layer.borderColor = UIColorHex(#21BEBD).CGColor;
|
||||
stopPublish.layer.borderWidth = 1.0;
|
||||
stopPublish.layer.cornerRadius = 17;
|
||||
[self.view addSubview:stopPublish];
|
||||
|
||||
[stopPublish mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_offset(150);
|
||||
make.bottom.mas_offset(-30);
|
||||
make.height.mas_offset(36);
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
}];
|
||||
|
||||
self.homeTable = [[StopQuestionTableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
|
||||
self.homeTable.changeBlock = ^(NSString * _Nullable record_id) {
|
||||
DLog(@"%@",record_id);
|
||||
[self chageServiceStatus:record_id];
|
||||
};
|
||||
[self.view addSubview:self.homeTable];
|
||||
|
||||
[self.homeTable mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.left.right.mas_offset(0);
|
||||
make.bottom.mas_equalTo(stopPublish.mas_top).offset(-10);
|
||||
}];
|
||||
|
||||
__weak __typeof(self) weakSelf = self;
|
||||
self.homeTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||
weakSelf.pageNo = 1;
|
||||
|
||||
[weakSelf createData];
|
||||
|
||||
|
||||
}];
|
||||
self.homeTable.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
|
||||
weakSelf.pageNo ++;
|
||||
|
||||
[weakSelf createData];
|
||||
}];
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)publishAction {
|
||||
|
||||
|
||||
|
||||
YXStopAnnouncementViewController * publishVC = [[YXStopAnnouncementViewController alloc] init];
|
||||
|
||||
[self.navigationController pushViewController:publishVC animated:YES];
|
||||
}
|
||||
|
||||
- (void)createData {
|
||||
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
|
||||
[parmDic setObject:@(self.pageNo) forKey:@"pageNo"];
|
||||
[parmDic setObject:@(self.pageSize) forKey:@"pageSize"];
|
||||
|
||||
YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"RECORDAPI" NeedToken:@""];
|
||||
|
||||
[workApi GetSPublishServerRecored:parmDic];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (void)chageServiceStatus:(NSString *)recordID {
|
||||
[self showMBProgressHUDWithString:@"恢复中,请稍候" autoHidden:false];
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[parmDic setObject:recordID forKey:@"id"];
|
||||
[parmDic setObject:@"1" forKey:@"serviceStatus"];
|
||||
|
||||
YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"CHAGEAPI" NeedToken:@""];
|
||||
[workApi GetChangePublishServer:parmDic];
|
||||
|
||||
}
|
||||
|
||||
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||
{
|
||||
|
||||
[self.homeTable.mj_header endRefreshing];
|
||||
[self.homeTable.mj_footer endRefreshing];
|
||||
[self hiddenAllMBProgressHUD];
|
||||
}
|
||||
|
||||
|
||||
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||
{
|
||||
|
||||
[self.homeTable.mj_header endRefreshing];
|
||||
[self.homeTable.mj_footer endRefreshing];
|
||||
if ([tag isEqualToString:@"RECORDAPI"]) {
|
||||
NSDictionary * resDic = response;
|
||||
if (self.pageNo == 1) {
|
||||
|
||||
[self.dataArray removeAllObjects];
|
||||
}
|
||||
YXStopServiceModel * model = [YXStopServiceModel modelWithDictionary:resDic];
|
||||
|
||||
for (YXStopServiceListModel * listModel in model.records ) {
|
||||
|
||||
[self.dataArray addObject:listModel];
|
||||
}
|
||||
self.homeTable.dataArray = self.dataArray;
|
||||
}
|
||||
if ([tag isEqualToString:@"CHAGEAPI"]) {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
[self.homeTable.mj_header beginRefreshing];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
#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
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// BasicHealthInfoViewController.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/4.
|
||||
//
|
||||
|
||||
#import "YXBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXBasicHealthInfoViewController : YXBaseViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
//
|
||||
// BasicHealthInfoViewController.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/4.
|
||||
//
|
||||
|
||||
#import "YXBasicHealthInfoViewController.h"
|
||||
#import "BasicHealthInfoView.h"
|
||||
|
||||
|
||||
@interface YXBasicHealthInfoViewController ()
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXBasicHealthInfoViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.isHidenNaviBar = false;
|
||||
self.title = @"基本健康信息";
|
||||
self.view.backgroundColor = UIColorHex(#EEEEEE);
|
||||
[self createUI];
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
BasicHealthInfoView * infoView = [[BasicHealthInfoView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(15), kScreenWidth - kRealValue(30), kRealValue(286))];
|
||||
infoView.backgroundColor = [UIColor whiteColor];
|
||||
infoView.layer.cornerRadius = 10.0;
|
||||
infoView.layer.masksToBounds = true;
|
||||
[self.view addSubview:infoView];
|
||||
}
|
||||
|
||||
/*
|
||||
#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
|
||||
@@ -1,18 +0,0 @@
|
||||
//
|
||||
// YXHomePageViewController.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by xulei on 2022/8/17.
|
||||
//
|
||||
|
||||
#import "YXBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXHomePageViewController : YXBaseViewController
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,774 +0,0 @@
|
||||
//
|
||||
// YXHomePageViewController.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by xulei on 2022/8/17.
|
||||
//
|
||||
|
||||
#import "YXHomePageViewController.h"
|
||||
#import "YXQuestionDetailViewController.h"
|
||||
#import "YXHomePageModel.h"
|
||||
#import "ChatViewController.h"
|
||||
#import "MJRefresh.h"
|
||||
#import "HQShowPromptPopView.h"
|
||||
#import "YXQuestionStatisticsViewController.h"
|
||||
#import "YXQustionRecordViewController.h"
|
||||
#import "YXStopQuestionSettingVC.h"
|
||||
#import "YXBasicHealthInfoViewController.h"
|
||||
#import "RefuseQuestionPopView.h"
|
||||
#import "XJDHistoricalRecordViewController.h"
|
||||
#import "XJDFileDataDetailViewController.h"
|
||||
#import "YXStopAnnouncementViewController.h"
|
||||
#import "XJDBillDetailViewController.h"
|
||||
#import "TUIC2CChatViewController.h"
|
||||
#import "YXDoctorInfoModel.h"
|
||||
#import "PSAppInfo.h"
|
||||
#import "PSCheckVersion.h"
|
||||
@interface YXHomePageViewController ()<V2TIMSimpleMsgListener,V2TIMSDKListener,TUIMessageCellDelegate,TUIBaseMessageControllerDelegate,TUICallObserver>
|
||||
|
||||
@property (nonatomic, strong) UIScrollView * mainScrollView;
|
||||
|
||||
@property (nonatomic, strong) UILabel * nameLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * workLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * hospatilLabel;
|
||||
|
||||
@property (nonatomic, strong) UIImageView * heardImage;
|
||||
|
||||
@property (nonatomic, strong) UILabel * messageLabel;
|
||||
@property (nonatomic, copy) NSString * smallGroup;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXHomePageViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
|
||||
[super viewDidLoad];
|
||||
[self createUI];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(updateHomeDate)
|
||||
name:KNotificAgreeMapDelegate
|
||||
object:nil];
|
||||
|
||||
//前缀请求
|
||||
[self chageUrlService];
|
||||
[[V2TIMManager sharedInstance] addSimpleMsgListener:self];
|
||||
[[TUICallEngine createInstance] addObserver:self];
|
||||
|
||||
self.isHidenNaviBar = false;
|
||||
self.StatusBarStyle = UIStatusBarStyleDefault;
|
||||
self.view.backgroundColor = CViewBgColor;
|
||||
self.navigationItem.title = @"健康专家库";
|
||||
|
||||
[self docotrUserInfo];
|
||||
[self creatSmallHelpNumber];
|
||||
[PSCheckVersion checkVersionCompulsoryUpdate];
|
||||
|
||||
}
|
||||
|
||||
- (void)updateHomeDate {
|
||||
|
||||
[self docotrUserInfo];
|
||||
[self creatSmallHelpNumber];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark:请求前缀
|
||||
- (void)chageUrlService {
|
||||
|
||||
AFHTTPSessionManager *session=[AFHTTPSessionManager manager];
|
||||
// AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
|
||||
|
||||
session.responseSerializer.acceptableContentTypes=[NSSet setWithObjects:@"application/json",@"text/json",@"text/javascript",@"text/html",@"text/plain", nil];
|
||||
//超时时间
|
||||
|
||||
session.requestSerializer.timeoutInterval= 30.f;
|
||||
session.responseSerializer = [AFHTTPResponseSerializer serializer];
|
||||
|
||||
session.requestSerializer = [AFJSONRequestSerializer serializer];
|
||||
|
||||
session.securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone];
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
|
||||
// 获取应用的版本号
|
||||
NSString * version = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
|
||||
// 将版本号按照点(.)分割成数组
|
||||
NSArray * components = [version componentsSeparatedByString:@"."];
|
||||
|
||||
// 获取数组中的最后一个元素
|
||||
NSString * lastComponent = [components lastObject];
|
||||
// 如果需要将其转换为整数
|
||||
NSInteger lastNumber = [lastComponent integerValue];
|
||||
|
||||
[parmDic setObject:@(lastNumber) forKey:@"version"];
|
||||
[parmDic setObject:@"health.Employees.tools" forKey:@"pkg"];
|
||||
|
||||
|
||||
[session GET:@"https://base.icdat.cn/v2/url" parameters:parmDic headers:nil progress:^(NSProgress * _Nonnull downloadProgress) {
|
||||
|
||||
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||
|
||||
NSString * dataString = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
|
||||
DLog(@"response\n%@\n",dataString);
|
||||
NSData *requestData = [dataString dataUsingEncoding:NSUTF8StringEncoding];
|
||||
|
||||
id myResult = [NSJSONSerialization JSONObjectWithData:requestData options:NSJSONReadingMutableContainers error:nil];
|
||||
//判断是否为字典
|
||||
if ([myResult isKindOfClass:[NSDictionary class]]) {
|
||||
|
||||
NSDictionary *response = (NSDictionary *)myResult;
|
||||
if ([response.allKeys containsObject:@"result"]) {
|
||||
NSDictionary * resultDic = [response objectForKey:@"result"];
|
||||
|
||||
if ([resultDic.allKeys containsObject:@"api"]) {
|
||||
[[NSUserDefaults standardUserDefaults] setObject:[resultDic objectForKey:@"api"] forKey:@"HTTPS"];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
if ([resultDic.allKeys containsObject:@"h5"]) {
|
||||
[[NSUserDefaults standardUserDefaults] setObject:[resultDic objectForKey:@"h5"] forKey:@"IntervenH5"];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
if ([resultDic.allKeys containsObject:@"h5Host"]) {
|
||||
[[NSUserDefaults standardUserDefaults] setObject:[resultDic objectForKey:@"h5Host"] forKey:@"H5DevHost"];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
if ([resultDic.allKeys containsObject:@"health"]) {
|
||||
[[NSUserDefaults standardUserDefaults] setObject:[resultDic objectForKey:@"health"] forKey:@"BASEURL"];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
||||
NSString * statusCode = [error.userInfo objectForKey:@"NSLocalizedDescription"];
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
|
||||
[super viewWillAppear:animated];
|
||||
[self.mainScrollView.mj_header beginRefreshing];
|
||||
|
||||
}
|
||||
- (void)createUI {
|
||||
|
||||
self.mainScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - kTopHeight)];
|
||||
[self.view addSubview:self.mainScrollView];
|
||||
|
||||
UIView * linV = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 0.5)];
|
||||
[self.mainScrollView addSubview:linV];
|
||||
|
||||
YXUserInfo * user = [HQCommonUtils keyedUnarchiverWithKey:LoginUserInfo];
|
||||
|
||||
UIView * topBack = [[UIView alloc] initWithFrame:CGRectMake(0, linV.bottom, kScreenWidth, kRealValue(130))];
|
||||
topBack.backgroundColor = UIColorHex(#21BEBD);
|
||||
[self.mainScrollView addSubview:topBack];
|
||||
|
||||
self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(16), kRealValue(19), 100, 20)];
|
||||
self.nameLabel.textColor = KWhiteColor;
|
||||
self.nameLabel.font = SYSTEMFONT(21);
|
||||
self.nameLabel.text = user.realname;
|
||||
CGFloat w = [HQCommonUtils getLengthFromText:self.nameLabel.text andFontSize:21];
|
||||
self.nameLabel.width = w;
|
||||
self.nameLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[topBack addSubview:self.nameLabel];
|
||||
|
||||
self.workLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.nameLabel.right + kRealValue(12), kRealValue(25), 100, 13)];
|
||||
self.workLabel.textColor = KWhiteColor;
|
||||
self.workLabel.font = SYSTEMFONT(13);
|
||||
self.workLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[topBack addSubview:self.workLabel];
|
||||
|
||||
self.hospatilLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), self.nameLabel.bottom + kRealValue(17), kScreenWidth - kRealValue(65), 20)];
|
||||
self.hospatilLabel.textColor = KWhiteColor;
|
||||
self.hospatilLabel.font = SYSTEMFONT(13);
|
||||
// self.hospatilLabel.text = [NSString stringWithFormat:@"%@ %@",user.phone,user.sex_dictText];
|
||||
self.hospatilLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[topBack addSubview:self.hospatilLabel];
|
||||
|
||||
self.heardImage = [[UIImageView alloc] initWithFrame:CGRectMake(kScreenWidth - kRealValue(24) - 60, kRealValue(10), 60, 60)];
|
||||
self.heardImage.backgroundColor = KWhiteColor;
|
||||
self.heardImage.layer.cornerRadius = 30.0;
|
||||
self.heardImage.layer.masksToBounds = true;
|
||||
[topBack addSubview:self.heardImage];
|
||||
|
||||
|
||||
|
||||
// UIView * questionView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.heardImage.bottom + kRealValue(23), kScreenWidth - kRealValue(30), kRealValue(132) * 2 + kRealValue(10))];
|
||||
// questionView.backgroundColor = KRedColor;
|
||||
// questionView.layer.cornerRadius = 10.0;
|
||||
//// [HQCommonUtils addShadowToView:questionView];
|
||||
// [self.view addSubview:questionView];
|
||||
|
||||
NSArray * array = @[@[@"图文咨询",@"通过图片、文字的形式进行咨询"],@[@"视频咨询",@"通过语音视频电话的形式进行咨询"]];
|
||||
NSArray * timearray = @[@[@"0",@"0"],@[@"0",@"0"]];
|
||||
NSArray * TagArray = @[@"100",@"200"];
|
||||
UIView * lastView;
|
||||
for (int i = 0; i < 2 ; i ++) {
|
||||
|
||||
UIView * listView = [self createQuestionFrame:CGRectMake(kRealValue(15) , self.heardImage.bottom + kRealValue(23) + 10 * i + kRealValue(132) * i, kScreenWidth - kRealValue(30), kRealValue(132)) Image:@"" withTitle:array[i][0] withDesTitle:array[i][1] withTime:timearray[i][0] numberCount:timearray[i][1] withTag:[TagArray[i] intValue]];
|
||||
listView.backgroundColor = KWhiteColor;
|
||||
if (i == 1) {
|
||||
lastView = listView;
|
||||
}
|
||||
|
||||
UIButton * topBackbtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, listView.width, listView.height - 46)];
|
||||
topBackbtn.tag = 1000 + i;
|
||||
[topBackbtn addTarget:self action:@selector(topAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[listView addSubview:topBackbtn];
|
||||
[self.mainScrollView addSubview:listView];
|
||||
}
|
||||
|
||||
UIView * smallView= [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), lastView.bottom + kRealValue(10), kScreenWidth - kRealValue(30), kRealValue(80))];
|
||||
smallView.backgroundColor = KWhiteColor;
|
||||
smallView.layer.cornerRadius = 10.0;
|
||||
smallView.layer.masksToBounds = YES;
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapGesture:)];
|
||||
[smallView addGestureRecognizer:tap];
|
||||
[self.mainScrollView addSubview:smallView];
|
||||
|
||||
UIImageView * leftImg = [[UIImageView alloc] initWithFrame:CGRectMake(24, 24, 40, 40)];
|
||||
leftImg.layer.cornerRadius = 20.0f;
|
||||
leftImg.layer.masksToBounds = true;
|
||||
leftImg.image = [UIImage imageNamed:@"home_small"] ;
|
||||
[smallView addSubview:leftImg];
|
||||
|
||||
UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftImg.right + kRealValue(15), kRealValue(28), kScreenWidth - kRealValue(65), 14)];
|
||||
titleLabel.textColor = UIColorHex(#333333);
|
||||
titleLabel.font = BOLDSYSTEMFONT(14);
|
||||
titleLabel.text = @"小助手";
|
||||
titleLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[smallView addSubview:titleLabel];
|
||||
|
||||
UILabel * desLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftImg.right + kRealValue(15), titleLabel.bottom + kRealValue(10), kScreenWidth - kRealValue(65), 11)];
|
||||
desLabel.textColor = UIColorHex(#666666);
|
||||
desLabel.font = SYSTEMFONT(11);
|
||||
desLabel.text = @"联系小助手获取相关帮助和支持";
|
||||
desLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[smallView addSubview:desLabel];
|
||||
|
||||
UILabel * dayLabel = [[UILabel alloc] initWithFrame:CGRectMake(smallView.width - kRealValue(11) - 100, kRealValue(23), 100, 11)];
|
||||
dayLabel.textColor = UIColorHex(#999999);
|
||||
dayLabel.font = SYSTEMFONT(11);
|
||||
dayLabel.text = @"";
|
||||
dayLabel.textAlignment = NSTextAlignmentRight;
|
||||
self.messageLabel = dayLabel;
|
||||
[smallView addSubview:dayLabel];
|
||||
|
||||
// UILabel * messageLabel = [[UILabel alloc] initWithFrame:CGRectMake(smallView.width - kRealValue(20) - 12 ,dayLabel.bottom + kRealValue(12) ,14, 14)];
|
||||
// messageLabel.textColor = KWhiteColor;
|
||||
// messageLabel.font = SYSTEMFONT(10);
|
||||
// messageLabel.text = @"-";
|
||||
// messageLabel.textAlignment = NSTextAlignmentCenter;
|
||||
// messageLabel.layer.cornerRadius = 7;
|
||||
// messageLabel.layer.masksToBounds = true;
|
||||
// messageLabel.backgroundColor = UIColorHex(#21BEBD);
|
||||
|
||||
// [smallView addSubview:messageLabel];
|
||||
MJWeakSelf
|
||||
self.mainScrollView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||
// 进入刷新状态后会自动调用这个block
|
||||
[weakSelf createMessageNumber];
|
||||
[weakSelf creatSmallHelpNumber];
|
||||
|
||||
}];
|
||||
|
||||
// 马上进入刷新状态
|
||||
// 拉取群聊历史消息
|
||||
// 首次拉取,lastMsg 设置为 null
|
||||
// 再次拉取时,lastMsg 可以使用返回的消息列表中的最后一条消息
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)createMessageNumber {
|
||||
|
||||
YXNetAPI * homeApi = [[YXNetAPI alloc] init:self tag:@"HOMEAPI" NeedToken:@""];
|
||||
|
||||
[homeApi getHomeData:nil];
|
||||
|
||||
}
|
||||
|
||||
- (void)docotrUserInfo {
|
||||
|
||||
YXNetAPI * homeApi = [[YXNetAPI alloc] init:self tag:@"DoctorINFO" NeedToken:@""];
|
||||
|
||||
[homeApi GetInquireDoctorInfo:nil];
|
||||
|
||||
}
|
||||
|
||||
- (void)handleTapGesture:(id)sender {
|
||||
|
||||
if ([ESCTUIManager TUIUserStatus] == false) {
|
||||
|
||||
|
||||
[self loginImAccount];
|
||||
}
|
||||
[self showMBProgressHUDWithString:@"加载中..." autoHidden:false];
|
||||
YXNetAPI * homeApi = [[YXNetAPI alloc] init:self tag:@"FOUNDSMALLAPI" NeedToken:@""];
|
||||
|
||||
[homeApi getHomeFoundSmallHelpData:nil];
|
||||
|
||||
}
|
||||
|
||||
- (void)creatSmallHelpNumber {
|
||||
|
||||
YXNetAPI * homeApi = [[YXNetAPI alloc] init:self tag:@"SMALLAPI" NeedToken:@""];
|
||||
|
||||
[homeApi getHomeSmallData:nil];
|
||||
|
||||
}
|
||||
|
||||
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||
{
|
||||
[self hiddenAllMBProgressHUD];
|
||||
[self.mainScrollView.mj_header endRefreshing];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||
{
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
|
||||
if ([tag isEqualToString:@"HOMEAPI"]) {
|
||||
[self.mainScrollView.mj_header endRefreshing];
|
||||
NSDictionary * dic = response ;
|
||||
|
||||
// 图文咨询:pictureUnReply 待回复 pictureIng进行中 pictureFinish已完成 视频咨询: videoUnReply待确认 videoIng进行中 videoFinish已完成
|
||||
|
||||
UILabel * pictur_wait = [self.view viewWithTag:100];
|
||||
if ([dic.allKeys containsObject:@"pictureUnReply"]) {
|
||||
if ([[dic objectForKey:@"pictureUnReply"] intValue] == 0) {
|
||||
pictur_wait.hidden = YES;
|
||||
}else
|
||||
{
|
||||
pictur_wait.hidden = false;
|
||||
pictur_wait.text = [NSString stringWithFormat:@"%@",[dic objectForKey:@"pictureUnReply"]];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
UILabel * pictur_ing = [self.view viewWithTag:110];
|
||||
|
||||
if ([dic.allKeys containsObject:@"pictureIng"]) {
|
||||
if ([[dic objectForKey:@"pictureIng"] intValue] == 0) {
|
||||
pictur_ing.hidden = YES;
|
||||
}else
|
||||
{
|
||||
pictur_ing.hidden = false;
|
||||
pictur_ing.text = [NSString stringWithFormat:@"%@",[dic objectForKey:@"pictureIng"]];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
UILabel * pictur_end = [self.view viewWithTag:120];
|
||||
|
||||
if ([dic.allKeys containsObject:@"pictureFinish"]) {
|
||||
if ([[dic objectForKey:@"pictureFinish"] intValue] == 0) {
|
||||
pictur_end.hidden = YES;
|
||||
}else
|
||||
{
|
||||
pictur_end.hidden = false;
|
||||
pictur_end.text = [NSString stringWithFormat:@"%@",[dic objectForKey:@"pictureFinish"]];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
UILabel * video_wait = [self.view viewWithTag:200];
|
||||
if ([dic.allKeys containsObject:@"videoUnReply"]) {
|
||||
if ([[dic objectForKey:@"videoUnReply"] intValue] == 0) {
|
||||
video_wait.hidden = YES;
|
||||
}else
|
||||
{
|
||||
video_wait.hidden = false;
|
||||
video_wait.text = [NSString stringWithFormat:@"%@",[dic objectForKey:@"videoUnReply"]];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
UILabel * video_ing = [self.view viewWithTag:210];
|
||||
|
||||
if ([dic.allKeys containsObject:@"videoIng"]) {
|
||||
if ([[dic objectForKey:@"videoIng"] intValue] == 0) {
|
||||
video_ing.hidden = YES;
|
||||
}else
|
||||
{
|
||||
video_ing.hidden = false;
|
||||
video_ing.text = [NSString stringWithFormat:@"%@",[dic objectForKey:@"videoIng"]];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
UILabel * video_end = [self.view viewWithTag:220];
|
||||
|
||||
if ([dic.allKeys containsObject:@"videoFinish"]) {
|
||||
if ([[dic objectForKey:@"videoFinish"] intValue] == 0) {
|
||||
video_end.hidden = YES;
|
||||
}else
|
||||
{
|
||||
video_end.hidden = false;
|
||||
video_end.text = [NSString stringWithFormat:@"%@",[dic objectForKey:@"videoFinish"]];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"SMALLAPI"]) {
|
||||
[self.mainScrollView.mj_header endRefreshing];
|
||||
NSString * result = response;
|
||||
if (!ValidStr(result)) {
|
||||
self.smallGroup = result;
|
||||
[self loginImAccount];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"FOUNDSMALLAPI"]) {
|
||||
|
||||
NSDictionary * responDic = response;
|
||||
|
||||
YXZJSmallHelpModel * helpModel = [YXZJSmallHelpModel modelWithDictionary:responDic];
|
||||
|
||||
if ([ESCTUIManager TUIUserStatus] == false) {
|
||||
|
||||
|
||||
[self loginImAccount];
|
||||
return;
|
||||
}
|
||||
|
||||
ChatViewController * chatVC = [[ChatViewController alloc] init];
|
||||
chatVC.isGroupID = false;
|
||||
chatVC.chatID = helpModel.groupId;
|
||||
chatVC.smallHelp_id = helpModel.help_Id;
|
||||
chatVC.member = helpModel.member;
|
||||
chatVC.isVideo = false;
|
||||
chatVC.eableSendReport = YES;
|
||||
chatVC.eableMapTools = false;
|
||||
chatVC.navTitle = @"小助手";
|
||||
chatVC.eablehaveHelathData = YES;
|
||||
chatVC.questionType = 1;
|
||||
chatVC.memberSex = @"2";
|
||||
[self hiddenAllMBProgressHUD];
|
||||
[self.navigationController pushViewController:chatVC animated:YES];
|
||||
|
||||
|
||||
}
|
||||
if ([tag isEqualToString:@"loginIMAPI"]) {
|
||||
|
||||
NSDictionary * pamrDic = response;
|
||||
|
||||
IMUserInfoModel * model = [IMUserInfoModel modelWithDictionary:pamrDic];
|
||||
|
||||
IMUserInfoModel * iminfoModel = [[IMUserInfoModel alloc] init];
|
||||
iminfoModel.IMInfo = pamrDic;
|
||||
[HQCommonUtils keyedArchiverWithData:iminfoModel key:IMLoginUserInfo];
|
||||
|
||||
// 1. 从即时通信 IM 控制台获取应用 SDKAppID。
|
||||
// 2. 初始化 config 对象
|
||||
V2TIMSDKConfig *config = [[V2TIMSDKConfig alloc] init];
|
||||
// 3. 指定 log 输出级别。
|
||||
config.logLevel = V2TIM_LOG_INFO;
|
||||
// 4. 添加 V2TIMSDKListener 的事件监听器,self 是 id<V2TIMSDKListener> 的实现类,如果您不需要监听 IM SDK 的事件,这个步骤可以忽略。
|
||||
[[V2TIMManager sharedInstance] addIMSDKListener:self];
|
||||
// 5. 初始化 IM SDK,调用这个接口后,可以立即调用登录接口。
|
||||
[[V2TIMManager sharedInstance] initSDK:[model.sdkAppId intValue] config:config];
|
||||
|
||||
[ESCTUIManager loginInitTUISDKAppidWith:[model.sdkAppId intValue] UserID:model.userId userSig:model.userSig];
|
||||
|
||||
[V2TIMManager.sharedInstance getGroupHistoryMessageList:[NSString stringWithFormat:@"%@",self.smallGroup] count:20 lastMsg:nil succ:^(NSArray<V2TIMMessage *> *msgs) {
|
||||
// 记录下次拉取的 lastMsg,用于下次拉取
|
||||
V2TIMMessage *lastMsg = msgs.lastObject;
|
||||
NSLog(@"success, %@", msgs);
|
||||
|
||||
NSDateFormatter *date = [[NSDateFormatter alloc]init];
|
||||
[date setDateFormat:@"HH:mm:ss"];
|
||||
NSString *dateString = [date stringFromDate:lastMsg.timestamp];
|
||||
|
||||
if (!ValidStr(dateString)) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.messageLabel.text = [NSString stringWithFormat:@"%@",dateString];
|
||||
});
|
||||
}else
|
||||
{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.messageLabel.text = @"";
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
} fail:^(int code, NSString *desc) {
|
||||
NSLog(@"fail, %d, %@", code, desc);
|
||||
}];
|
||||
}
|
||||
|
||||
if ([tag isEqualToString:@"DoctorINFO"]) {
|
||||
|
||||
NSDictionary * parDic = response;
|
||||
|
||||
YXDoctorInfoModel * model = [YXDoctorInfoModel modelWithDictionary:parDic];
|
||||
self.nameLabel.text = model.doctorName;
|
||||
self.workLabel.text = [NSString stringWithFormat:@"%@",model.doctorTitle] ;
|
||||
CGFloat workW = [HQCommonUtils getLengthFromText:self.workLabel.text andFontSize:13];
|
||||
self.workLabel.width = workW;
|
||||
self.hospatilLabel.text = [NSString stringWithFormat:@"%@ %@",model.resourceName,model.departmentName];
|
||||
|
||||
NSString * photo = [NSString stringWithFormat:@"%@%@",ResourceAddress,model.photo];
|
||||
|
||||
NSString * str1 = @"\\";
|
||||
|
||||
photo = [photo stringByReplacingOccurrencesOfString:str1 withString:@"/"];
|
||||
|
||||
NSString *encodedString3 = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)photo, (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL, kCFStringEncodingUTF8));
|
||||
|
||||
[self.heardImage sd_setImageWithURL:[NSURL URLWithString:encodedString3] placeholderImage:[UIImage imageNamed:@"doctorNoImage"]];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)topAction:(UIButton *)btn {
|
||||
|
||||
|
||||
YXQustionRecordViewController * recoredVC = [[YXQustionRecordViewController alloc] init];
|
||||
//图文待回复
|
||||
if (btn.tag == 1000) {
|
||||
|
||||
recoredVC.questionType = 1;
|
||||
|
||||
}
|
||||
//视频待确认
|
||||
if (btn.tag == 1001) {
|
||||
|
||||
recoredVC.questionType = 2;
|
||||
|
||||
}
|
||||
recoredVC.questionStatus = 10;
|
||||
[self.navigationController pushViewController:recoredVC animated:YES];
|
||||
}
|
||||
- (void)loginImAccount {
|
||||
|
||||
YXNetAPI * proctocolApi = [[YXNetAPI alloc] init:self tag:@"loginIMAPI" NeedToken:nil];
|
||||
[proctocolApi GetIMLoginAccount:nil];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (UIView *)createQuestionFrame:(CGRect)frame
|
||||
Image:(NSString *)imageName
|
||||
withTitle:(NSString *)title
|
||||
withDesTitle:(NSString *)desTitle
|
||||
withTime:(NSString *)time
|
||||
numberCount:(NSString *)number
|
||||
withTag:(NSInteger)NumberTag{
|
||||
|
||||
UIView * view = [[UIView alloc] initWithFrame:frame];
|
||||
view.layer.cornerRadius = 10.0;
|
||||
view.backgroundColor = KWhiteColor;
|
||||
view.layer.masksToBounds = YES;
|
||||
|
||||
UIImageView * leftImg = [[UIImageView alloc] initWithFrame:CGRectMake(24, 24, 40, 40)];
|
||||
leftImg.layer.cornerRadius = 20.0f;
|
||||
leftImg.layer.masksToBounds = true;
|
||||
if ([title isEqualToString:@"图文咨询"]) {
|
||||
leftImg.image = [UIImage imageNamed:@"home_PictureQustion"];
|
||||
}
|
||||
if ([title isEqualToString:@"视频咨询"]) {
|
||||
leftImg.image = [UIImage imageNamed:@"home_VideoQustion"];
|
||||
}
|
||||
if ([title isEqualToString:@"小助手"]) {
|
||||
leftImg.image = [UIImage imageNamed:@"home_small"];
|
||||
}
|
||||
leftImg.backgroundColor = [UIColor greenColor];
|
||||
[view addSubview:leftImg];
|
||||
|
||||
UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftImg.right + kRealValue(15), kRealValue(28), kScreenWidth - kRealValue(65), 14)];
|
||||
titleLabel.textColor = UIColorHex(#333333);
|
||||
titleLabel.font = BOLDSYSTEMFONT(14);
|
||||
titleLabel.text = title;
|
||||
titleLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[view addSubview:titleLabel];
|
||||
|
||||
UILabel * desLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftImg.right + kRealValue(15), titleLabel.bottom + kRealValue(10), kScreenWidth - kRealValue(65), 11)];
|
||||
desLabel.textColor = UIColorHex(#666666);
|
||||
desLabel.font = SYSTEMFONT(11);
|
||||
desLabel.text = desTitle;
|
||||
desLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[view addSubview:desLabel];
|
||||
|
||||
UIView * linView = [[UIView alloc] initWithFrame:CGRectMake(0, desLabel.bottom + kRealValue(26), view.width, 1)];
|
||||
linView.backgroundColor = UIColorHex(#E0E0E0);
|
||||
[view addSubview:linView];
|
||||
|
||||
UIView * cowView = [[UIView alloc] initWithFrame:CGRectMake(view.width/3, linView.bottom + kRealValue(8), 1, 28)];
|
||||
cowView.backgroundColor = UIColorHex(#E0E0E0);
|
||||
[view addSubview:cowView];
|
||||
|
||||
UIView * cowTwoView = [[UIView alloc] initWithFrame:CGRectMake(view.width/3 * 2, linView.bottom + kRealValue(8), 1, 28)];
|
||||
cowTwoView.backgroundColor = UIColorHex(#E0E0E0);
|
||||
[view addSubview:cowTwoView];
|
||||
|
||||
//待回复
|
||||
UIButton * replayBtn = [[UIButton alloc] initWithFrame:CGRectMake(0 , linView.bottom ,view.width/3 , 45)];
|
||||
|
||||
if ([title isEqualToString:@"图文咨询"]) {
|
||||
[replayBtn setTitle:@"待回复" forState:UIControlStateNormal];
|
||||
|
||||
}
|
||||
if ([title isEqualToString:@"视频咨询"]) {
|
||||
[replayBtn setTitle:@"待确认" forState:UIControlStateNormal];
|
||||
|
||||
}
|
||||
[replayBtn setTitleColor:CFontColor1 forState:UIControlStateNormal];
|
||||
replayBtn.titleLabel.font = SYSTEMFONT(13);
|
||||
replayBtn.tag = NumberTag + 1000;
|
||||
[replayBtn addTarget:self action:@selector(daihuifuAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[view addSubview:replayBtn];
|
||||
|
||||
|
||||
|
||||
UILabel * numLabel = [[UILabel alloc] initWithFrame:CGRectMake(replayBtn.width - kRealValue(22) - 12 ,kRealValue(15) ,12, 12)];
|
||||
numLabel.textColor = KWhiteColor;
|
||||
numLabel.font = SYSTEMFONT(10);
|
||||
numLabel.text = number;
|
||||
numLabel.textAlignment = NSTextAlignmentCenter;
|
||||
numLabel.layer.cornerRadius = 6;
|
||||
numLabel.layer.masksToBounds = true;
|
||||
numLabel.backgroundColor = UIColorHex(#21BEBD);
|
||||
numLabel.tag = NumberTag;
|
||||
[replayBtn addSubview:numLabel];
|
||||
//进行中
|
||||
UIButton * qustionBtn = [[UIButton alloc] initWithFrame:CGRectMake(view.width/3 , linView.bottom ,view.width/3 , 45)];
|
||||
[qustionBtn setTitle:@"进行中" forState:UIControlStateNormal];
|
||||
[qustionBtn setTitleColor:CFontColor1 forState:UIControlStateNormal];
|
||||
qustionBtn.titleLabel.font = SYSTEMFONT(13);
|
||||
qustionBtn.tag = NumberTag + 1001;
|
||||
[qustionBtn addTarget:self action:@selector(jingxingAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
[view addSubview:qustionBtn];
|
||||
|
||||
UILabel * jingxingLabel = [[UILabel alloc] initWithFrame:CGRectMake(qustionBtn.width - kRealValue(22) - 12 ,kRealValue(15) ,12, 12)];
|
||||
jingxingLabel.textColor = KWhiteColor;
|
||||
jingxingLabel.font = SYSTEMFONT(10);
|
||||
jingxingLabel.text = number;
|
||||
jingxingLabel.textAlignment = NSTextAlignmentCenter;
|
||||
jingxingLabel.layer.cornerRadius = 6;
|
||||
jingxingLabel.layer.masksToBounds = true;
|
||||
jingxingLabel.backgroundColor = UIColorHex(#21BEBD);
|
||||
jingxingLabel.tag = NumberTag + 10;
|
||||
[qustionBtn addSubview:jingxingLabel];
|
||||
|
||||
//完成
|
||||
UIButton * wanchengBtn = [[UIButton alloc] initWithFrame:CGRectMake(view.width/3 * 2 , linView.bottom ,view.width/3 , 45)];
|
||||
[wanchengBtn setTitle:@"已完成" forState:UIControlStateNormal];
|
||||
[wanchengBtn setTitleColor:CFontColor1 forState:UIControlStateNormal];
|
||||
wanchengBtn.titleLabel.font = SYSTEMFONT(13);
|
||||
wanchengBtn.tag = NumberTag + 1002;
|
||||
[wanchengBtn addTarget:self action:@selector(wanchengAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[view addSubview:wanchengBtn];
|
||||
|
||||
UILabel * wanchengLabel = [[UILabel alloc] initWithFrame:CGRectMake(qustionBtn.width - kRealValue(22) - 12 ,kRealValue(15) ,14, 14)];
|
||||
wanchengLabel.textColor = KWhiteColor;
|
||||
wanchengLabel.font = SYSTEMFONT(10);
|
||||
wanchengLabel.text = number;
|
||||
wanchengLabel.textAlignment = NSTextAlignmentCenter;
|
||||
wanchengLabel.layer.cornerRadius = 7;
|
||||
wanchengLabel.layer.masksToBounds = true;
|
||||
wanchengLabel.backgroundColor = UIColorHex(#21BEBD);
|
||||
wanchengLabel.tag = NumberTag + 20;
|
||||
[wanchengBtn addSubview:wanchengLabel];
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
#pragma mark:待回复
|
||||
- (void)daihuifuAction:(UIButton *)daihuifuBtn {
|
||||
YXQustionRecordViewController * recoredVC = [[YXQustionRecordViewController alloc] init];
|
||||
//图文待回复
|
||||
if (daihuifuBtn.tag == 1100) {
|
||||
|
||||
recoredVC.questionType = 1;
|
||||
|
||||
}
|
||||
//音视频待回复
|
||||
if (daihuifuBtn.tag == 1200) {
|
||||
|
||||
recoredVC.questionType = 2;
|
||||
}
|
||||
recoredVC.questionStatus = 10;
|
||||
[self.navigationController pushViewController:recoredVC animated:YES];
|
||||
}
|
||||
#pragma mark:进行中
|
||||
- (void)jingxingAction:(UIButton *)jingxingBtn {
|
||||
YXQustionRecordViewController * recoredVC = [[YXQustionRecordViewController alloc] init];
|
||||
//图文待回复
|
||||
if (jingxingBtn.tag == 1101) {
|
||||
|
||||
recoredVC.questionType = 1;
|
||||
|
||||
}
|
||||
//视频待确认
|
||||
if (jingxingBtn.tag == 1201) {
|
||||
|
||||
recoredVC.questionType = 2;
|
||||
|
||||
}
|
||||
recoredVC.questionStatus = 20;
|
||||
[self.navigationController pushViewController:recoredVC animated:YES];
|
||||
}
|
||||
#pragma mark:已完成
|
||||
- (void)wanchengAction:(UIButton *)wancgengBtn {
|
||||
|
||||
YXQustionRecordViewController * recoredVC = [[YXQustionRecordViewController alloc] init];
|
||||
//图文待回复
|
||||
if (wancgengBtn.tag == 1102) {
|
||||
|
||||
recoredVC.questionType = 1;
|
||||
|
||||
}
|
||||
//音视频待回复
|
||||
if (wancgengBtn.tag == 1202) {
|
||||
|
||||
recoredVC.questionType = 2;
|
||||
}
|
||||
recoredVC.questionStatus = 30;
|
||||
[self.navigationController pushViewController:recoredVC animated:YES];
|
||||
}
|
||||
|
||||
- (void)pictureQuestionAction {
|
||||
|
||||
YXStopQuestionSettingVC * detailVC = [[YXStopQuestionSettingVC alloc] init];
|
||||
|
||||
[self.navigationController pushViewController:detailVC animated:YES];
|
||||
}
|
||||
|
||||
|
||||
//在线时票据过期:此时您需要生成新的 userSig,并再次重新调用初始化。
|
||||
- (void)onKickedOffline {
|
||||
|
||||
[HQCommonUtils keyedArchiverWithData:nil key:LoginUserInfo];
|
||||
[ESCTUIManager outLoginTUISDK];
|
||||
KPostNotification(KNotificationLoginStateChange, @NO);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
#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
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// YXworkSetingViewController.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/6.
|
||||
//
|
||||
|
||||
#import "YXBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXworkSetingViewController : YXBaseViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-490
@@ -1,490 +0,0 @@
|
||||
//
|
||||
// YXworkSetingViewController.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/6.
|
||||
//
|
||||
|
||||
#import "YXworkSetingViewController.h"
|
||||
#import "YXWorkSettingModel.h"
|
||||
#import "YXCustomSchedulingViewController.h"
|
||||
|
||||
|
||||
@interface YXworkSetingViewController ()
|
||||
|
||||
@property (nonatomic, strong) UIScrollView * mainScrollview;
|
||||
|
||||
@property (nonatomic, strong) UISwitch * rightSlider;
|
||||
|
||||
@property (nonatomic, strong) UIView * workView;
|
||||
|
||||
@property (nonatomic, strong) UIView * jumpView;
|
||||
|
||||
@property (nonatomic, strong) UISwitch * jumpSwithch;
|
||||
|
||||
@property (nonatomic, strong) UIButton * submitBtn;
|
||||
|
||||
@property (nonatomic, strong) UIButton * customBtn;
|
||||
|
||||
|
||||
@property (nonatomic, assign) BOOL isVideo;
|
||||
|
||||
@property (nonatomic, assign) BOOL isJump;
|
||||
|
||||
//7个id
|
||||
@property (nonatomic, copy) NSString * oneID;
|
||||
@property (nonatomic, copy) NSString * twoID;
|
||||
@property (nonatomic, copy) NSString * threeID;
|
||||
@property (nonatomic, copy) NSString * fourID;
|
||||
@property (nonatomic, copy) NSString * fiveID;
|
||||
@property (nonatomic, copy) NSString * sixID;
|
||||
@property (nonatomic, copy) NSString * sevenID;
|
||||
@property (nonatomic, copy) NSArray * peopleArray;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXworkSetingViewController
|
||||
|
||||
#pragma mark:懒加载
|
||||
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
self.isHidenNaviBar = false;
|
||||
self.navigationItem.title = @"视频排班";
|
||||
[self createUI];
|
||||
[self createData];
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
self.mainScrollview = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
|
||||
self.mainScrollview.backgroundColor = CViewBgColor;
|
||||
[self.view addSubview:self.mainScrollview];
|
||||
|
||||
UIView * workView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(12), kScreenWidth - kRealValue(30), kRealValue(382))];
|
||||
workView.layer.cornerRadius = 10;
|
||||
workView.layer.masksToBounds = YES;
|
||||
self.workView = workView;
|
||||
workView.backgroundColor = KWhiteColor;
|
||||
[self.mainScrollview addSubview:workView];
|
||||
|
||||
|
||||
NSArray * array = @[@"周一",@"周二",@"周三",@"周四",@"周五",@"周六",@"周天"];
|
||||
|
||||
CGFloat viewW = self.workView.width - kRealValue(30);
|
||||
|
||||
for (int i = 0; i < array.count; i++) {
|
||||
|
||||
UIView * weekView = [self createWorkView:CGRectMake(kRealValue(15), kRealValue(40) + 15 + kRealValue(45) * i, viewW, kRealValue(35)) withWeek:array[i] withAmTag:100 +i withPmTag:200 + i];
|
||||
[self.workView addSubview:weekView];
|
||||
|
||||
}
|
||||
|
||||
UILabel * questionTitle = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), kRealValue(18),200, 15)];
|
||||
questionTitle.textAlignment = NSTextAlignmentLeft;
|
||||
questionTitle.textColor = UIColorHex(#333333);
|
||||
questionTitle.font = BOLDSYSTEMFONT(15);
|
||||
questionTitle.text = @"视频咨询";
|
||||
[workView addSubview:questionTitle];
|
||||
|
||||
|
||||
self.rightSlider = [[UISwitch alloc] initWithFrame:CGRectMake(workView.width - kRealValue(52), kRealValue(11), kRealValue(40), 30)];
|
||||
[self.rightSlider setOn:NO animated:YES];
|
||||
[self.rightSlider setOnTintColor: UIColorHex(#59D5D4)];
|
||||
self.rightSlider.transform = CGAffineTransformMakeScale(0.6, 0.6);
|
||||
self.isVideo = false;
|
||||
[self.rightSlider addTarget:self action:@selector(switchChange:) forControlEvents:UIControlEventValueChanged];
|
||||
[workView addSubview:self.rightSlider];
|
||||
|
||||
|
||||
|
||||
|
||||
UIView * jumpView = [[UIView alloc] initWithFrame:CGRectMake(workView.left, workView.bottom + kRealValue(10), workView.width, kRealValue(44))];
|
||||
jumpView.layer.cornerRadius = 10.0;
|
||||
jumpView.layer.masksToBounds = YES;
|
||||
jumpView.backgroundColor = KWhiteColor;
|
||||
self.jumpView = jumpView;
|
||||
[self.mainScrollview addSubview:jumpView];
|
||||
|
||||
|
||||
UILabel * jumpLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), 0, 200, kRealValue(44))];
|
||||
jumpLabel.textColor = CFontColor1;
|
||||
jumpLabel.text = @"自动跳过法定节假日?";
|
||||
jumpLabel.font = MEDIUMFONT(14);
|
||||
jumpLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[jumpView addSubview:jumpLabel];
|
||||
|
||||
|
||||
|
||||
self.jumpSwithch = [[UISwitch alloc] initWithFrame:CGRectMake(jumpView.width - kRealValue(52), kRealValue(9), kRealValue(40), 30)];
|
||||
[self.jumpSwithch setOn:NO animated:YES];
|
||||
[self.jumpSwithch setOnTintColor: UIColorHex(#59D5D4)];
|
||||
self.jumpSwithch.transform = CGAffineTransformMakeScale(0.6, 0.6);
|
||||
self.isJump = false;
|
||||
[self.jumpSwithch addTarget:self action:@selector(jumpChange:) forControlEvents:UIControlEventValueChanged];
|
||||
[jumpView addSubview:self.jumpSwithch];
|
||||
|
||||
UIButton * submitBtn = [[UIButton alloc] initWithFrame:CGRectMake(20, jumpView.bottom + kRealValue(98), 160, 35)];
|
||||
submitBtn.backgroundColor = KWhiteColor;
|
||||
submitBtn.layer.cornerRadius = 20;
|
||||
submitBtn.layer.borderColor = UIColorHex(#21BEBD).CGColor;
|
||||
submitBtn.layer.borderWidth = 1.0f;
|
||||
[submitBtn setTitle:@"生成排班" forState:UIControlStateNormal];
|
||||
[submitBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||
submitBtn.centerX = self.view.centerX;
|
||||
[submitBtn addTarget:self action:@selector(submitTimeAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
submitBtn.titleLabel.font = SYSTEMFONT(14);
|
||||
self.submitBtn = submitBtn;
|
||||
[self.mainScrollview addSubview:submitBtn];
|
||||
|
||||
// UIButton * customBtn = [[UIButton alloc] initWithFrame:CGRectMake(20, submitBtn.bottom + kRealValue(10), 160, 35)];
|
||||
// customBtn.centerX = self.view.centerX;
|
||||
// customBtn.titleLabel.font = SYSTEMFONT(14);
|
||||
// customBtn.backgroundColor = KClearColor;
|
||||
// [customBtn setTitle:@"自定义排班" forState:UIControlStateNormal];
|
||||
// [customBtn setTitleColor:UIColorHex(#21BEBD) forState:UIControlStateNormal];
|
||||
// [customBtn addTarget:self action:@selector(customAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
// [self.view addSubview:customBtn];
|
||||
// self.customBtn = customBtn;
|
||||
// [self.mainScrollview addSubview:submitBtn];
|
||||
|
||||
self.mainScrollview.contentSize = CGSizeMake(kScreenWidth, submitBtn.bottom + kRealValue(22));
|
||||
}
|
||||
|
||||
|
||||
- (void)createData {
|
||||
|
||||
YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"WEEKAPI" NeedToken:@""];
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
[workApi GetDoctorWorkSetting:parmDic];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (UIView *)createWorkView:(CGRect)frame withWeek:(NSString *)week withAmTag:(NSInteger)amTag withPmTag:(NSInteger)pmTag {
|
||||
|
||||
UIView * view = [[UIView alloc] initWithFrame:frame];
|
||||
view.layer.cornerRadius = 18;
|
||||
view.backgroundColor = UIColorHex(#E0E0E0);
|
||||
view.layer.masksToBounds = YES;
|
||||
|
||||
UILabel * weekLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(26), 0, kRealValue(63), view.height)];
|
||||
weekLabel.textAlignment = NSTextAlignmentLeft;
|
||||
weekLabel.textColor = UIColorHex(#333333);
|
||||
weekLabel.font = SYSTEMFONT(13);
|
||||
weekLabel.text = week;
|
||||
[view addSubview:weekLabel];
|
||||
CGFloat amWidth = [HQCommonUtils getLengthFromText:@"上午" andFontSize:13];
|
||||
UILabel * amLabel = [[UILabel alloc] initWithFrame:CGRectMake(weekLabel.right, 0, amWidth, view.height)];
|
||||
amLabel.text = @"上午";
|
||||
amLabel.textAlignment = NSTextAlignmentLeft;
|
||||
amLabel.textColor = UIColorHex(#333333);
|
||||
amLabel.font = SYSTEMFONT(13);
|
||||
[view addSubview:amLabel];
|
||||
|
||||
UITextField * pepleField = [[UITextField alloc] initWithFrame:CGRectMake(amLabel.right +5 , 5, 38, view.height - 10)];
|
||||
pepleField.backgroundColor = KWhiteColor;
|
||||
pepleField.layer.cornerRadius = 5.0;
|
||||
pepleField.layer.masksToBounds = YES;
|
||||
pepleField.textAlignment = NSTextAlignmentCenter;
|
||||
pepleField.font = SYSTEMFONT(13);
|
||||
pepleField.keyboardType = UIKeyboardTypeNumberPad;
|
||||
pepleField.tag = amTag;
|
||||
[view addSubview:pepleField];
|
||||
|
||||
CGFloat peoWidth = [HQCommonUtils getLengthFromText:@"人" andFontSize:13];
|
||||
UILabel * peoLabel = [[UILabel alloc] initWithFrame:CGRectMake(pepleField.right + 5, 0, peoWidth, view.height)];
|
||||
peoLabel.text = @"人";
|
||||
peoLabel.textAlignment = NSTextAlignmentLeft;
|
||||
peoLabel.textColor = UIColorHex(#333333);
|
||||
peoLabel.font = SYSTEMFONT(13);
|
||||
[view addSubview:peoLabel];
|
||||
|
||||
UILabel * rightPeoLabel = [[UILabel alloc] initWithFrame:CGRectMake(view.width - kRealValue(23) - peoWidth, 0, peoWidth, view.height)];
|
||||
rightPeoLabel.text = @"人";
|
||||
rightPeoLabel.textAlignment = NSTextAlignmentLeft;
|
||||
rightPeoLabel.textColor = UIColorHex(#333333);
|
||||
rightPeoLabel.font = SYSTEMFONT(13);
|
||||
|
||||
[view addSubview:rightPeoLabel];
|
||||
|
||||
UITextField * pmField = [[UITextField alloc] initWithFrame:CGRectMake(rightPeoLabel.left - 5 - 38 , 5, 38, view.height - 10)];
|
||||
pmField.backgroundColor = KWhiteColor;
|
||||
pmField.layer.cornerRadius = 5.0;
|
||||
pmField.textAlignment = NSTextAlignmentCenter;
|
||||
pmField.font = SYSTEMFONT(13);
|
||||
pmField.layer.masksToBounds = YES;
|
||||
pmField.tag = pmTag;
|
||||
pmField.keyboardType = UIKeyboardTypeNumberPad;
|
||||
[view addSubview:pmField];
|
||||
|
||||
UILabel * pmLabel = [[UILabel alloc] initWithFrame:CGRectMake(pmField.left - amWidth - 5, 0, amWidth, view.height)];
|
||||
pmLabel.text = @"下午";
|
||||
pmLabel.textAlignment = NSTextAlignmentLeft;
|
||||
pmLabel.textColor = UIColorHex(#333333);
|
||||
pmLabel.font = SYSTEMFONT(13);
|
||||
[view addSubview:pmLabel];
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
- (void) switchChange:(UISwitch*)sw {
|
||||
|
||||
self.isVideo = sw.on;
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)jumpChange:(UISwitch*)sw {
|
||||
|
||||
self.isJump = sw.on;
|
||||
}
|
||||
|
||||
|
||||
- (void)submitTimeAction {
|
||||
|
||||
NSMutableDictionary * parmDic = [[NSMutableDictionary alloc] init];
|
||||
NSMutableArray * dataArray = [[NSMutableArray alloc] init];
|
||||
|
||||
if (self.isVideo == true) {
|
||||
//有时间用模型吧
|
||||
|
||||
//周一
|
||||
UITextField * oneAmField = [self.view viewWithTag:100];
|
||||
UITextField * onePmField = [self.view viewWithTag:200];
|
||||
if ([oneAmField.text integerValue] > 0 ||[onePmField.text integerValue] > 0 ) {
|
||||
NSString * oneDic = [self createSubmitData:oneAmField.text PMtext:onePmField.text Withweek:@"1" withWeekID:self.oneID];
|
||||
[dataArray addObject:oneDic];
|
||||
}
|
||||
//周二
|
||||
UITextField * twoAmField = [self.view viewWithTag:101];
|
||||
UITextField * twoPmField = [self.view viewWithTag:201];
|
||||
if ([twoAmField.text integerValue] > 0 ||[twoPmField.text integerValue] > 0 ) {
|
||||
NSString * twoDic = [self createSubmitData:twoAmField.text PMtext:twoPmField.text Withweek:@"2" withWeekID:self.twoID];
|
||||
[dataArray addObject:twoDic];
|
||||
}
|
||||
//周三
|
||||
UITextField * threeAmField = [self.view viewWithTag:102];
|
||||
UITextField * threePmField = [self.view viewWithTag:202];
|
||||
if ([threeAmField.text integerValue] > 0 ||[threePmField.text integerValue] > 0 ) {
|
||||
NSString * threeDic = [self createSubmitData:threeAmField.text PMtext:threePmField.text Withweek:@"3" withWeekID:self.threeID];
|
||||
[dataArray addObject:threeDic];
|
||||
}
|
||||
//周四
|
||||
UITextField * fourAmField = [self.view viewWithTag:103];
|
||||
UITextField * fourPmField = [self.view viewWithTag:203];
|
||||
if ([fourAmField.text integerValue] > 0 ||[fourPmField.text integerValue] > 0 ) {
|
||||
NSString * fourDic = [self createSubmitData:fourAmField.text PMtext:fourPmField.text Withweek:@"4" withWeekID:self.fourID];
|
||||
[dataArray addObject:fourDic];
|
||||
}
|
||||
//周五
|
||||
UITextField * fiveAmField = [self.view viewWithTag:104];
|
||||
UITextField * fivePmField = [self.view viewWithTag:204];
|
||||
if ([fiveAmField.text integerValue] > 0 ||[fivePmField.text integerValue] > 0 ) {
|
||||
NSString * fiveDic = [self createSubmitData:fiveAmField.text PMtext:fivePmField.text Withweek:@"5" withWeekID:self.fiveID];
|
||||
[dataArray addObject:fiveDic];
|
||||
}
|
||||
//周六
|
||||
UITextField * sixAmField = [self.view viewWithTag:105];
|
||||
UITextField * sixPmField = [self.view viewWithTag:205];
|
||||
if ([sixAmField.text integerValue] > 0 ||[sixPmField.text integerValue] > 0 ) {
|
||||
NSString * sixDic = [self createSubmitData:sixAmField.text PMtext:sixPmField.text Withweek:@"6" withWeekID:self.sixID];
|
||||
[dataArray addObject:sixDic];
|
||||
}
|
||||
//周天
|
||||
UITextField * sevenAmField = [self.view viewWithTag:106];
|
||||
UITextField * sevenPmField = [self.view viewWithTag:206];
|
||||
if ([sevenAmField.text integerValue] > 0 ||[sevenPmField.text integerValue] > 0 ) {
|
||||
NSString * sevenDic = [self createSubmitData:sevenAmField.text PMtext:sevenPmField.text Withweek:@"7" withWeekID:self.sevenID];
|
||||
[dataArray addObject:sevenDic];
|
||||
}
|
||||
|
||||
if (dataArray.count == 0) {
|
||||
[EasyTextView showErrorText:@"请输入就诊人数"];
|
||||
return;
|
||||
}
|
||||
// 创建一个包含对象的数组
|
||||
[parmDic setObject:dataArray forKey:@"list"];
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
NSArray * array = [NSArray modelArrayWithClass:[YXWorkTimeModel class] json:self.peopleArray];
|
||||
|
||||
for (YXWorkTimeModel * model in self.peopleArray) {
|
||||
NSString * jsonString = [model modelToJSONObject];
|
||||
[dataArray addObject:jsonString];
|
||||
}
|
||||
[parmDic setObject:dataArray forKey:@"list"];
|
||||
}
|
||||
// //是否开启音视频
|
||||
// self.isVideo;
|
||||
// //是否自动跳过节假日
|
||||
// self.isJump;
|
||||
// tfDefault 自排班已去掉
|
||||
[parmDic setObject:@(1) forKey:@"audioStatus"];
|
||||
|
||||
if (self.isVideo == true) {
|
||||
[parmDic setObject:@(1) forKey:@"audioStatus"];
|
||||
|
||||
}else if (self.isVideo == false) {
|
||||
[parmDic setObject:@(0) forKey:@"audioStatus"];
|
||||
}
|
||||
|
||||
|
||||
if (self.isJump == true) {
|
||||
[parmDic setObject:@(1) forKey:@"tfJumpHoliday"];
|
||||
|
||||
}else if (self.isJump == false) {
|
||||
[parmDic setObject:@(0) forKey:@"tfJumpHoliday"];
|
||||
}
|
||||
|
||||
[parmDic setObject:@(0) forKey:@"tfDefault"];
|
||||
|
||||
[self showMBProgressHUDWithString:@"正在设置" autoHidden:false];
|
||||
YXNetAPI * workApi = [[YXNetAPI alloc] init:self tag:@"WorkAPI" NeedToken:@""];
|
||||
|
||||
|
||||
|
||||
[workApi PostDoctorWorkTime:parmDic];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (NSString *)createSubmitData:(NSString *)amText
|
||||
PMtext:(NSString *)pmText
|
||||
Withweek:(NSString *)week
|
||||
withWeekID:(NSString *)weekID{
|
||||
|
||||
NSMutableDictionary * dic = [[NSMutableDictionary alloc] init];
|
||||
NSInteger type = 0;
|
||||
if ([amText integerValue] > 0 || [pmText intValue] > 0) {
|
||||
|
||||
if ([amText integerValue] > 0) {
|
||||
[dic setObject:[NSString stringWithFormat:@"%@",amText] forKey:@"amNum"];
|
||||
type = 0;
|
||||
}
|
||||
if ([pmText integerValue] > 0) {
|
||||
[dic setObject:[NSString stringWithFormat:@"%@",pmText] forKey:@"pmNum"];
|
||||
type = 1;
|
||||
}
|
||||
if ([amText integerValue] > 0 && [pmText intValue] > 0) {
|
||||
type = 2;
|
||||
}
|
||||
[dic setObject:[NSString stringWithFormat:@"%@",weekID] forKey:@"id"];
|
||||
[dic setObject:@(type) forKey:@"type"];
|
||||
[dic setObject:week forKey:@"week"];
|
||||
[dic setObject:@(self.isJump) forKey:@"tfJumpHoliday"];
|
||||
[dic setObject:@(self.isVideo) forKey:@"audioStatus"];
|
||||
|
||||
}
|
||||
YXWorkTimeModel * model = [YXWorkTimeModel modelWithDictionary:dic];
|
||||
NSString * jsonString = [model modelToJSONObject];
|
||||
return jsonString;
|
||||
}
|
||||
|
||||
- (void)Failed:(NSString*)message tag:(NSString*)tag
|
||||
{
|
||||
[self hiddenAllMBProgressHUD];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (void)Sucess:(id)response tag:(NSString*)tag
|
||||
{
|
||||
[self hiddenAllMBProgressHUD];
|
||||
if ([tag isEqualToString:@"WorkAPI"]) {
|
||||
[self hiddenAllMBProgressHUD];
|
||||
[self showMBProgressHUDOnlyWithString:response];
|
||||
}
|
||||
if ([tag isEqualToString:@"WEEKAPI"]) {
|
||||
|
||||
NSDictionary * resDic = response;
|
||||
|
||||
YXWorkSettingModel * model = [YXWorkSettingModel modelWithDictionary:resDic];
|
||||
|
||||
[self.jumpSwithch setOn:[model.tfJumpHoliday boolValue] animated:YES];
|
||||
[self.rightSlider setOn:[model.audioStatus boolValue] animated:YES];
|
||||
|
||||
[self switchChange:self.rightSlider];
|
||||
self.peopleArray = model.list;
|
||||
for (YXWorkTimeModel * timeModel in model.list) {
|
||||
|
||||
//周一
|
||||
[self haveDoctorWorkTime:timeModel];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)haveDoctorWorkTime:(YXWorkTimeModel *)timeModel {
|
||||
|
||||
if ([timeModel.week intValue] == 1) {
|
||||
self.oneID = timeModel.work_id;
|
||||
UITextField * oneAmField = [self.view viewWithTag:100];
|
||||
UITextField * onePmField = [self.view viewWithTag:200];
|
||||
oneAmField.text = timeModel.amNum;
|
||||
onePmField.text = timeModel.pmNum;
|
||||
}
|
||||
if ([timeModel.week intValue] == 2) {
|
||||
self.twoID = timeModel.work_id;
|
||||
UITextField * twoAmField = [self.view viewWithTag:101];
|
||||
UITextField * twoPmField = [self.view viewWithTag:201];
|
||||
twoAmField.text = timeModel.amNum;
|
||||
twoPmField.text = timeModel.pmNum;
|
||||
}
|
||||
if ([timeModel.week intValue] == 3) {
|
||||
self.threeID = timeModel.work_id;
|
||||
UITextField * threeAmField = [self.view viewWithTag:102];
|
||||
UITextField * threePmField = [self.view viewWithTag:202];
|
||||
threeAmField.text = timeModel.amNum;
|
||||
threePmField.text = timeModel.pmNum;
|
||||
}
|
||||
if ([timeModel.week intValue] == 4) {
|
||||
self.fourID = timeModel.work_id;
|
||||
UITextField * fourAmField = [self.view viewWithTag:103];
|
||||
UITextField * fourPmField = [self.view viewWithTag:203];
|
||||
fourAmField.text = timeModel.amNum;
|
||||
fourPmField.text = timeModel.pmNum;
|
||||
}
|
||||
if ([timeModel.week intValue] == 5) {
|
||||
self.fiveID = timeModel.work_id;
|
||||
UITextField * fiveAmField = [self.view viewWithTag:104];
|
||||
UITextField * fivePmField = [self.view viewWithTag:204];
|
||||
fiveAmField.text = timeModel.amNum;
|
||||
fivePmField.text = timeModel.pmNum;
|
||||
}
|
||||
if ([timeModel.week intValue] == 6) {
|
||||
self.sixID = timeModel.work_id;
|
||||
UITextField * sixAmField = [self.view viewWithTag:105];
|
||||
UITextField * sixPmField = [self.view viewWithTag:205];
|
||||
sixAmField.text = timeModel.amNum;
|
||||
sixPmField.text = timeModel.pmNum;
|
||||
}
|
||||
if ([timeModel.week intValue] == 7) {
|
||||
self.sevenID = timeModel.work_id;
|
||||
UITextField * sevenAmField = [self.view viewWithTag:106];
|
||||
UITextField * sevenPmField = [self.view viewWithTag:206];
|
||||
sevenAmField.text = timeModel.amNum;
|
||||
sevenPmField.text = timeModel.pmNum;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)customAction {
|
||||
|
||||
YXCustomSchedulingViewController * customvc = [[YXCustomSchedulingViewController alloc] init];
|
||||
|
||||
[self.navigationController pushViewController:customvc animated:YES];
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,74 +0,0 @@
|
||||
//
|
||||
// YXDoctorInfoModel.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/4.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
|
||||
@interface YXDoctorGoodSicknessModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * sicks_id;
|
||||
|
||||
@property (nonatomic, copy) NSString * sicksName;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface YXDoctorInfoModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * doctor_Id;
|
||||
|
||||
@property (nonatomic, copy) NSString * sex;
|
||||
|
||||
@property (nonatomic, strong) NSArray<YXDoctorGoodSicknessModel *> * goodAtSicknessName;
|
||||
|
||||
@property (nonatomic, copy) NSString * doctorJob_dictText;
|
||||
|
||||
@property (nonatomic, copy) NSString * doctorName;
|
||||
|
||||
@property (nonatomic, copy) NSString * photo;
|
||||
|
||||
@property (nonatomic, copy) NSString * doctorTitle;
|
||||
|
||||
@property (nonatomic, copy) NSString * doctorStatus_dictText;
|
||||
|
||||
@property (nonatomic, copy) NSString * resourceName;
|
||||
|
||||
@property (nonatomic, copy) NSString * goodAtSymptom;
|
||||
|
||||
@property (nonatomic, copy) NSString * departmentName;
|
||||
|
||||
@property (nonatomic, copy) NSString * introduction;
|
||||
|
||||
@property (nonatomic, copy) NSString * goodAt;
|
||||
|
||||
@property (nonatomic, copy) NSString * userScore;
|
||||
|
||||
@property (nonatomic, copy) NSString * replyNum;
|
||||
|
||||
@property (nonatomic, copy) NSString * tfShowFire;
|
||||
|
||||
@property (nonatomic, copy) NSString * audioVideo;
|
||||
|
||||
@property (nonatomic, copy) NSString * audioStatus;
|
||||
|
||||
@property (nonatomic, copy) NSString * status;
|
||||
|
||||
@property (nonatomic, copy) NSString * resourceId;
|
||||
|
||||
@property (nonatomic, copy) NSString * experience;
|
||||
|
||||
@property (nonatomic, copy) NSString * doctorStatus;
|
||||
|
||||
@property (nonatomic, copy) NSString * departmentId;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// YXQuestionStaticsModel.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/8.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXQuestionStaticsModel : NSObject
|
||||
|
||||
|
||||
@property (nonatomic, copy) NSString * total;
|
||||
@property (nonatomic, copy) NSString * content_type;
|
||||
@property (nonatomic, copy) NSString * inProgress;
|
||||
@property (nonatomic, copy) NSString * completed;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// YXCancelReasonModel.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/17.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXCancelReasonModel : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSString * value;
|
||||
@property (nonatomic, strong) NSString * text;
|
||||
@property (nonatomic, strong) NSString * label;
|
||||
@property (nonatomic, strong) NSString * title;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,42 +0,0 @@
|
||||
//
|
||||
// YXDoctorInfoModel.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/4.
|
||||
//
|
||||
|
||||
#import "YXDoctorInfoModel.h"
|
||||
|
||||
|
||||
@implementation YXDoctorGoodSicknessModel
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
NSDictionary * dic =@{@"sicks_id" :@"id"};
|
||||
return dic;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXDoctorInfoModel
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
NSDictionary * dic =@{@"doctor_Id" :@"id"};
|
||||
return dic;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass
|
||||
{
|
||||
|
||||
|
||||
return @{@"goodAtSicknessName":[YXDoctorGoodSicknessModel class],
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,49 +0,0 @@
|
||||
//
|
||||
// YXHomePageModel.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2022/9/9.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXHomePageModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * imageName;
|
||||
|
||||
@property (nonatomic, copy) NSString * projectName;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface YXProjectModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * imageName;
|
||||
|
||||
@property (nonatomic, copy) NSString * projectName;
|
||||
|
||||
@property (nonatomic, copy) NSString * price;
|
||||
|
||||
@property (nonatomic, assign) BOOL isSelected;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface YXZJSmallHelpModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * groupId;
|
||||
|
||||
@property (nonatomic, strong) NSArray * member;
|
||||
|
||||
@property (nonatomic, copy) NSString * userId;
|
||||
|
||||
@property (nonatomic, copy) NSString * tfNew;
|
||||
|
||||
@property (nonatomic, copy) NSString * help_Id;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,32 +0,0 @@
|
||||
//
|
||||
// YXHomePageModel.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2022/9/9.
|
||||
//
|
||||
|
||||
#import "YXHomePageModel.h"
|
||||
|
||||
@implementation YXHomePageModel
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@implementation YXProjectModel
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation YXZJSmallHelpModel
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
NSDictionary * dic =@{@"help_Id" :@"id"};
|
||||
return dic;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
//
|
||||
// YXHospitalModel.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2022/9/19.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXHospitalModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * hospitalName;
|
||||
|
||||
@property (nonatomic, copy) NSString * hospitalImage;
|
||||
|
||||
@property (nonatomic, copy) NSString * hospitalId;
|
||||
|
||||
@property (nonatomic, assign) BOOL isChoose;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,18 +0,0 @@
|
||||
//
|
||||
// YXHospitalModel.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2022/9/19.
|
||||
//
|
||||
|
||||
#import "YXHospitalModel.h"
|
||||
|
||||
@implementation YXHospitalModel
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
NSDictionary * dic =@{@"hospitalId" :@"id"};
|
||||
return dic;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,33 +0,0 @@
|
||||
//
|
||||
// YXProjectListModel.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2022/10/12.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXSubProjectListModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * imageName;
|
||||
|
||||
@property (nonatomic, copy) NSString * projectName;
|
||||
|
||||
@end
|
||||
|
||||
@interface YXProjectListModel : NSObject
|
||||
|
||||
@property (nonatomic, assign) BOOL isShow;
|
||||
|
||||
@property (nonatomic, assign) BOOL isSelected;
|
||||
|
||||
@property (nonatomic, copy) NSString * projectName;
|
||||
|
||||
@property (nonatomic, strong) NSArray<YXSubProjectListModel *>* subData;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,27 +0,0 @@
|
||||
//
|
||||
// YXProjectListModel.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2022/10/12.
|
||||
//
|
||||
|
||||
#import "YXProjectListModel.h"
|
||||
|
||||
@implementation YXSubProjectListModel
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@implementation YXProjectListModel
|
||||
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass
|
||||
{
|
||||
|
||||
|
||||
return @{@"subData":[YXSubProjectListModel class],
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// YXQuestionBodyReportModel.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/16.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXQuestionBodyReportModel : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSString * insertdate;
|
||||
@property (nonatomic, strong) NSString * tjrq;
|
||||
@property (nonatomic, strong) NSString * name;
|
||||
@property (nonatomic, strong) NSString * yymc;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,42 +0,0 @@
|
||||
//
|
||||
// YXQuestionRecordModel.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/15.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXQuestionRecordModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * record_id;
|
||||
@property (nonatomic, copy) NSString * memberId;
|
||||
@property (nonatomic, copy) NSString * toAccount;
|
||||
@property (nonatomic, copy) NSString * memberName;
|
||||
@property (nonatomic, copy) NSString * memberSex;
|
||||
@property (nonatomic, copy) NSString * memberAge;
|
||||
@property (nonatomic, copy) NSString * imId;
|
||||
@property (nonatomic, copy) NSString * image;
|
||||
@property (nonatomic, copy) NSString * rejectReason;
|
||||
@property (nonatomic, copy) NSString * doctorStartTime;
|
||||
@property (nonatomic, copy) NSString * doctorEndTime;
|
||||
@property (nonatomic, copy) NSString * contentStatus;
|
||||
@property (nonatomic, copy) NSString * contentType;
|
||||
@property (nonatomic, copy) NSString * medicalRecordsId;
|
||||
@property (nonatomic, copy) NSString * schedulingDateId;
|
||||
@property (nonatomic, copy) NSString * createTime;
|
||||
@property (nonatomic, copy) NSString * sessionDate;
|
||||
@property (nonatomic, copy) NSString * week;
|
||||
@property (nonatomic, copy) NSString * amPm;
|
||||
@property (nonatomic, copy) NSString * reasonType;
|
||||
@property (nonatomic, copy) NSString * toAccountHead;
|
||||
@property (nonatomic, copy) NSString * toAccountTitle;
|
||||
@property (nonatomic, copy) NSString * departmentName;
|
||||
@property (nonatomic, copy) NSString * hospitalLevel;
|
||||
@property (nonatomic, copy) NSString * toAccountName;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// YXQuestionRecordModel.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/15.
|
||||
//
|
||||
|
||||
#import "YXQuestionRecordModel.h"
|
||||
|
||||
@implementation YXQuestionRecordModel
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
NSDictionary * dic =@{@"record_id" :@"id"};
|
||||
return dic;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,50 +0,0 @@
|
||||
//
|
||||
// RecordIMListDateModel.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/15.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXRecordIMListDateModel : NSObject
|
||||
@property (nonatomic, strong) NSString * Record_id;
|
||||
@property (nonatomic, strong) NSString * rejectReason;
|
||||
@property (nonatomic, strong) NSString * fromAccount;
|
||||
@property (nonatomic, strong) NSString * memberName;
|
||||
@property (nonatomic, strong) NSString * hospitalLevel;
|
||||
@property (nonatomic, strong) NSString * contentStatus;
|
||||
@property (nonatomic, strong) NSString * schedulingDateId;
|
||||
@property (nonatomic, strong) NSString * amPm;
|
||||
@property (nonatomic, strong) NSString * toAccountName;
|
||||
@property (nonatomic, strong) NSString * memberSex;
|
||||
@property (nonatomic, strong) NSString * contentType;
|
||||
@property (nonatomic, strong) NSString * reasonType;
|
||||
|
||||
@property (nonatomic, strong) NSString * week;
|
||||
@property (nonatomic, strong) NSString * toAccount;
|
||||
@property (nonatomic, strong) NSString * sessionType;
|
||||
@property (nonatomic, strong) NSString * medicalRecordsId;
|
||||
@property (nonatomic, strong) NSString * toAccountHead;
|
||||
@property (nonatomic, strong) NSString * toAccountTitle;
|
||||
@property (nonatomic, strong) NSString * createTimeLong;
|
||||
@property (nonatomic, strong) NSString * tfOwn;
|
||||
@property (nonatomic, strong) NSString * memberId;
|
||||
|
||||
@property (nonatomic, strong) NSString * doctorStartTime;
|
||||
@property (nonatomic, strong) NSString * departmentName;
|
||||
@property (nonatomic, strong) NSString * tfReply;
|
||||
@property (nonatomic, strong) NSString * doctorEndTimeLong;
|
||||
@property (nonatomic, strong) NSString * sessionDate;
|
||||
@property (nonatomic, strong) NSString * imId;
|
||||
@property (nonatomic, strong) NSString * createTime;
|
||||
@property (nonatomic, strong) NSString * memberAge;
|
||||
@property (nonatomic, strong) NSString * resourceName;
|
||||
|
||||
@property (nonatomic, strong) NSString * unRedMessage;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// YXRecordIMListDateModel.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/15.
|
||||
//
|
||||
|
||||
#import "YXRecordIMListDateModel.h"
|
||||
|
||||
@implementation YXRecordIMListDateModel
|
||||
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
NSDictionary * dic =@{@"Record_id" :@"id"};
|
||||
return dic;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,142 +0,0 @@
|
||||
//
|
||||
// YXRecoredListDetailModel.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/16.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXRecoredDetailConsessionModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * consession_id;
|
||||
|
||||
@property (nonatomic, copy) NSString * memberId;
|
||||
|
||||
@property (nonatomic, copy) NSString * toAccount;
|
||||
|
||||
@property (nonatomic, copy) NSString * fromAccount;
|
||||
|
||||
@property (nonatomic, copy) NSString * memberName;
|
||||
|
||||
@property (nonatomic, copy) NSString * memberSex;
|
||||
|
||||
@property (nonatomic, copy) NSString * memberAge;
|
||||
|
||||
@property (nonatomic, copy) NSString * createTime;
|
||||
|
||||
@property (nonatomic, copy) NSString * sessionDate;
|
||||
|
||||
@property (nonatomic, copy) NSString * week;
|
||||
|
||||
@property (nonatomic, copy) NSString * amPm;
|
||||
|
||||
@property (nonatomic, copy) NSString * sessionType;
|
||||
|
||||
@property (nonatomic, copy) NSString * weight;
|
||||
|
||||
@property (nonatomic, copy) NSString * contentStatus;
|
||||
|
||||
@property (nonatomic, copy) NSString * reasonType;
|
||||
|
||||
@property (nonatomic, copy) NSString * rejectReason;
|
||||
|
||||
@property (nonatomic, copy) NSString * imId;
|
||||
|
||||
@property (nonatomic, copy) NSString * doctorStartTimeLong;
|
||||
|
||||
@property (nonatomic, copy) NSString * doctorEndTimeLong;
|
||||
@property (nonatomic, copy) NSString * sessionDateLong;
|
||||
@property (nonatomic, copy) NSString * contentType;
|
||||
@property (nonatomic, copy) NSString * doctorStartTime;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface YXRecoredconMedicalRecordsListDO : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * dangan_id;
|
||||
@property (nonatomic, copy) NSString * recordsName;
|
||||
@property (nonatomic, copy) NSString * medicalDescribe;
|
||||
@property (nonatomic, copy) NSString * tfPermission;
|
||||
@property (nonatomic, copy) NSString * image;
|
||||
@property (nonatomic, copy) NSString * createTime;
|
||||
@property (nonatomic, copy) NSString * haveTimeValue;
|
||||
@property (nonatomic, copy) NSString * tfLookValue;
|
||||
@property (nonatomic, copy) NSString * tfLook;
|
||||
@property (nonatomic, copy) NSString * desire;
|
||||
@property (nonatomic, copy) NSString * lookOffice;
|
||||
@property (nonatomic, copy) NSString * lookMedicalName;
|
||||
|
||||
@end
|
||||
|
||||
@interface YXRecoredDetailHealthModel : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSString * answerValue;
|
||||
@property (nonatomic, strong) NSString * answerKey;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface YXRecoredDetailIMListModel : NSObject
|
||||
|
||||
|
||||
@property (nonatomic, copy) NSString * endTime;
|
||||
|
||||
@property (nonatomic, copy) NSString * startTime;
|
||||
|
||||
@property (nonatomic, copy) NSString * endTimeLong;
|
||||
|
||||
@property (nonatomic, copy) NSString * startTimLong;
|
||||
|
||||
@property (nonatomic, copy) NSString * type; // 1约定时间 2通话时长
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@interface YXRecoredListDetailModel : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSArray<YXRecoredDetailIMListModel *> * imList;
|
||||
|
||||
@property (nonatomic, strong) NSArray<YXRecoredDetailHealthModel *> * answer;
|
||||
|
||||
@property (nonatomic, strong) NSDictionary * conSession;
|
||||
|
||||
@property (nonatomic, strong) NSDictionary * conFamilyMembersDO;
|
||||
|
||||
@property (nonatomic, strong) NSDictionary * conMedicalRecordsListDO;
|
||||
|
||||
@property (nonatomic, strong) NSDictionary * conMedicalRecordsDO;
|
||||
|
||||
@property (nonatomic, copy) NSString * idNo;
|
||||
|
||||
@property (nonatomic, copy) NSString * conEvaluateDO;
|
||||
|
||||
@property (nonatomic, copy) NSString * createTime;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface YXReocrdconFamilyMembersDO : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * name;
|
||||
|
||||
@property (nonatomic, copy) NSString * gender;
|
||||
|
||||
@property (nonatomic, copy) NSString * height;
|
||||
|
||||
@property (nonatomic, copy) NSString * weight;
|
||||
|
||||
@property (nonatomic, copy) NSString * familyRelation;
|
||||
|
||||
@property (nonatomic, copy) NSString * groupId;
|
||||
|
||||
@property (nonatomic, copy) NSString * age;
|
||||
|
||||
@property (nonatomic, copy) NSString * family_id;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,86 +0,0 @@
|
||||
//
|
||||
// YXRecoredListDetailModel.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/16.
|
||||
//
|
||||
|
||||
#import "YXRecoredListDetailModel.h"
|
||||
|
||||
@implementation YXRecoredDetailConsessionModel
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
NSDictionary * dic =@{@"consession_id" :@"id"};
|
||||
return dic;
|
||||
}
|
||||
|
||||
@end
|
||||
//
|
||||
@implementation YXRecoredconMedicalRecordsListDO
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
NSDictionary * dic =@{@"dangan_id" :@"id"};
|
||||
return dic;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation YXRecoredDetailHealthModel
|
||||
|
||||
//+ (NSDictionary *)modelContainerPropertyGenericClass
|
||||
//{
|
||||
//
|
||||
// return @{
|
||||
// @"childList":[QuestionOptionChildListModel class],
|
||||
//
|
||||
// };
|
||||
//}
|
||||
//
|
||||
//+ (NSDictionary *)modelCustomPropertyMapper
|
||||
//{
|
||||
// NSDictionary * dic =@{@"option_id" :@"id"};
|
||||
// return dic;
|
||||
//}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation YXRecoredDetailIMListModel
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation YXRecoredListDetailModel
|
||||
|
||||
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass
|
||||
{
|
||||
|
||||
|
||||
return @{@"imList":[YXRecoredDetailIMListModel class],
|
||||
@"answer":[YXRecoredDetailHealthModel class],
|
||||
};
|
||||
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation YXReocrdconFamilyMembersDO
|
||||
|
||||
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
NSDictionary * dic =@{@"family_id" :@"id"};
|
||||
return dic;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
//
|
||||
// YXStopReasonModel.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/9.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXStopReasonModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * value;
|
||||
|
||||
@property (nonatomic, copy) NSString * label;
|
||||
|
||||
@property (nonatomic, copy) NSString * title;
|
||||
|
||||
@property (nonatomic, copy) NSString * text;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,53 +0,0 @@
|
||||
//
|
||||
// YXStopServiceModel.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/9.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXStopServiceListModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * record_id;
|
||||
|
||||
@property (nonatomic, copy) NSString * notice;
|
||||
|
||||
@property (nonatomic, assign) NSInteger delFlag;
|
||||
|
||||
|
||||
@property (nonatomic, copy) NSString * createBy;
|
||||
|
||||
@property (nonatomic, copy) NSString * startDay;
|
||||
|
||||
@property (nonatomic, copy) NSString * endDay;
|
||||
|
||||
@property (nonatomic, copy) NSString * stopReason;
|
||||
|
||||
@property (nonatomic, copy) NSString * doctorId;
|
||||
|
||||
@property (nonatomic, copy) NSString * createTime;
|
||||
|
||||
@property (nonatomic, assign) NSInteger serviceStatus;
|
||||
|
||||
@property (nonatomic, assign) NSInteger status;
|
||||
|
||||
@end
|
||||
|
||||
@interface YXStopServiceModel : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSArray * orders;
|
||||
|
||||
@property (nonatomic, assign) NSInteger pages;
|
||||
|
||||
@property (nonatomic, assign) NSInteger current;
|
||||
|
||||
@property (nonatomic, assign) NSInteger total;
|
||||
|
||||
@property (nonatomic, strong) NSArray<YXStopServiceListModel *> * records;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,33 +0,0 @@
|
||||
//
|
||||
// YXStopServiceModel.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/9.
|
||||
//
|
||||
|
||||
#import "YXStopServiceModel.h"
|
||||
|
||||
@implementation YXStopServiceListModel
|
||||
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
NSDictionary * dic =@{@"record_id" :@"id"};
|
||||
return dic;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXStopServiceModel
|
||||
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass
|
||||
{
|
||||
|
||||
|
||||
return @{@"records":[YXStopServiceListModel class],
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// YXToolsModel.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2022/9/28.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXToolsModel : NSObject
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *title;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,13 +0,0 @@
|
||||
//
|
||||
// YXToolsModel.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2022/9/28.
|
||||
//
|
||||
|
||||
#import "YXToolsModel.h"
|
||||
|
||||
@implementation YXToolsModel
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,50 +0,0 @@
|
||||
//
|
||||
// YXWorkSettingModel.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/7.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXWorkTimeModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * amNum;
|
||||
|
||||
@property (nonatomic, copy) NSString * pmNum;
|
||||
|
||||
@property (nonatomic, copy) NSString * week;
|
||||
|
||||
@property (nonatomic, copy) NSString * checked;
|
||||
|
||||
@property (nonatomic, copy) NSString * consultSwitchOn;
|
||||
|
||||
@property (nonatomic, copy) NSString * itemType;
|
||||
|
||||
@property (nonatomic, copy) NSString * tfDefault;
|
||||
|
||||
@property (nonatomic, copy) NSString * tfJumpHoliday;
|
||||
|
||||
@property (nonatomic, copy) NSString * type;
|
||||
|
||||
@property (nonatomic, copy) NSString * timePeriod;
|
||||
|
||||
@property (nonatomic, copy) NSString * work_id;
|
||||
|
||||
@end
|
||||
|
||||
@interface YXWorkSettingModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * tfDefault;
|
||||
|
||||
@property (nonatomic, copy) NSString * audioStatus;
|
||||
|
||||
@property (nonatomic, copy) NSString * tfJumpHoliday;
|
||||
|
||||
@property (nonatomic, strong) NSArray<YXWorkTimeModel *> * list;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,35 +0,0 @@
|
||||
//
|
||||
// YXWorkSettingModel.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/7.
|
||||
//
|
||||
|
||||
#import "YXWorkSettingModel.h"
|
||||
|
||||
|
||||
@implementation YXWorkTimeModel
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
NSDictionary * dic =@{@"work_id" :@"id"};
|
||||
return dic;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation YXWorkSettingModel
|
||||
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass
|
||||
{
|
||||
|
||||
|
||||
return @{@"list":[YXWorkTimeModel class],
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,47 +0,0 @@
|
||||
//
|
||||
// withDrawDetailModel.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/18.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YXwithDrawDetailModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString * wraw_Id;
|
||||
@property (nonatomic, copy) NSString * sessionId;
|
||||
@property (nonatomic, copy) NSString * userId;
|
||||
@property (nonatomic, copy) NSString * userName;
|
||||
@property (nonatomic, copy) NSString * operateType;//操作类型1图文咨询2视频咨询3电话咨询4通讯费5提现 操作类型0收益1图文咨询2视频咨询3电话咨询4通讯费5提现
|
||||
@property (nonatomic, copy) NSString * operateId;
|
||||
@property (nonatomic, copy) NSString * operateName;
|
||||
@property (nonatomic, copy) NSString * incomeTime;
|
||||
@property (nonatomic, copy) NSString * withdrawalName;
|
||||
@property (nonatomic, copy) NSString * remarks;
|
||||
@property (nonatomic, copy) NSString * withdraw;
|
||||
@property (nonatomic, copy) NSString * paymentAccount;
|
||||
@property (nonatomic, copy) NSString * paymentName;
|
||||
@property (nonatomic, copy) NSString * paymentMoney;
|
||||
@property (nonatomic, copy) NSString * realityMoney;
|
||||
@property (nonatomic, copy) NSString * accountMoney;
|
||||
@property (nonatomic, copy) NSString * paymentTime;
|
||||
@property (nonatomic, copy) NSString * charDate;
|
||||
@property (nonatomic, assign) NSInteger status;//状态(1-正常,2-冻结)
|
||||
@property (nonatomic, assign) NSInteger delFlag;
|
||||
@property (nonatomic, copy) NSString * createBy;
|
||||
|
||||
@property (nonatomic, copy) NSString * createTime;
|
||||
@property (nonatomic, copy) NSString * updateBy;
|
||||
@property (nonatomic, copy) NSString * updateTime;
|
||||
@property (nonatomic, copy) NSString * memo;
|
||||
@property (nonatomic, copy) NSString * income;//操作类型1图文咨询2视频咨询3电话咨询4通讯费5提现 操作类型0收益1图文咨询2视频咨询3电话咨询4通讯费5提现
|
||||
@property (nonatomic, copy) NSString * sumIncome;
|
||||
@property (nonatomic, copy) NSString * sumPaymentMoney;
|
||||
@property (nonatomic, copy) NSString * waterType;
|
||||
@property (nonatomic, copy) NSString * operateTypeName;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// withDrawDetailModel.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/8/18.
|
||||
//
|
||||
|
||||
#import "YXwithDrawDetailModel.h"
|
||||
|
||||
@implementation YXwithDrawDetailModel
|
||||
|
||||
|
||||
+ (NSDictionary *)modelCustomPropertyMapper
|
||||
{
|
||||
NSDictionary * dic =@{@"wraw_Id" :@"id"};
|
||||
return dic;
|
||||
}
|
||||
|
||||
@end
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// BasicHealthInfoView.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/4.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BasicHealthInfoView : UIView
|
||||
|
||||
@property (nonatomic, strong) NSArray * dataArray;
|
||||
|
||||
@property (nonatomic, assign) CGFloat healthHeight;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-135
@@ -1,135 +0,0 @@
|
||||
//
|
||||
// BasicHealthInfoView.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/4.
|
||||
//
|
||||
|
||||
#import "BasicHealthInfoView.h"
|
||||
#import "YXRecoredListDetailModel.h"
|
||||
|
||||
@interface BasicHealthInfoView ()
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * leftArray;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * rightArray;
|
||||
|
||||
@property (nonatomic, strong) UILabel * lastLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation BasicHealthInfoView
|
||||
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
// An empty implementation adversely affects performance during animation.
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
// Drawing code
|
||||
}
|
||||
*/
|
||||
|
||||
- (NSMutableArray *)leftArray {
|
||||
|
||||
if (!_leftArray) {
|
||||
_leftArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _leftArray;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)rightArray {
|
||||
|
||||
if (!_rightArray) {
|
||||
|
||||
_rightArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _rightArray;
|
||||
}
|
||||
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
self.backgroundColor = KWhiteColor;
|
||||
[self createUI];
|
||||
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
|
||||
NSArray * leftArray = @[@"饮食习惯:",@"烟酒习惯:",@"既往史:",@"家族史:",@"过敏史:",@"用药史:"];
|
||||
NSArray * rightArray = @[@"",@"",@"",@"",@"",@""];
|
||||
|
||||
for (int i = 0; i < leftArray.count; i ++) {
|
||||
|
||||
|
||||
UILabel * leftLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(20) + 47 * i, 100, 13)];
|
||||
leftLabel.text =leftArray[i];
|
||||
leftLabel.font = MEDIUMFONT(13);
|
||||
leftLabel.textAlignment = NSTextAlignmentLeft;
|
||||
leftLabel.textColor = UIColorHex(#666666);
|
||||
CGFloat w = [HQCommonUtils getLengthFromText:leftLabel.text andFontSize:13];
|
||||
leftLabel.width = w;
|
||||
[self addSubview:leftLabel];
|
||||
[self.leftArray addObject:leftLabel];
|
||||
|
||||
UILabel * rightLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftLabel.right, leftLabel.top, self.width - leftLabel.right, 13)];
|
||||
rightLabel.text =rightArray[i];
|
||||
rightLabel.font = MEDIUMFONT(13);
|
||||
rightLabel.textAlignment = NSTextAlignmentLeft;
|
||||
rightLabel.textColor = UIColorHex(#333333);
|
||||
[self addSubview:rightLabel];
|
||||
|
||||
[self.rightArray addObject:rightLabel];
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)setDataArray:(NSArray *)dataArray {
|
||||
|
||||
_dataArray = dataArray;
|
||||
for (UILabel * leftLabel in self.leftArray) {
|
||||
[leftLabel removeFromSuperview];
|
||||
}
|
||||
for (UILabel * rightLabel in self.rightArray) {
|
||||
[rightLabel removeFromSuperview];
|
||||
}
|
||||
[self.leftArray removeAllObjects];
|
||||
[self.rightArray removeAllObjects];
|
||||
|
||||
for (int i = 0; i < _dataArray.count; i ++) {
|
||||
|
||||
YXRecoredDetailHealthModel * model = _dataArray[i];
|
||||
|
||||
UILabel * leftLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(20) + 14 + 30 * i, 100, 13)];
|
||||
leftLabel.text = model.answerKey;
|
||||
leftLabel.font = MEDIUMFONT(13);
|
||||
leftLabel.textAlignment = NSTextAlignmentLeft;
|
||||
leftLabel.textColor = UIColorHex(#666666);
|
||||
[self addSubview:leftLabel];
|
||||
|
||||
|
||||
UILabel * rightLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftLabel.right, leftLabel.top, self.width - leftLabel.right, 13)];
|
||||
rightLabel.text = model.answerValue;
|
||||
rightLabel.font = MEDIUMFONT(13);
|
||||
rightLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self addSubview:rightLabel];
|
||||
[self.leftArray addObject:leftLabel];
|
||||
[self.rightArray addObject:rightLabel];
|
||||
|
||||
if (i == _dataArray.count - 1) {
|
||||
self.lastLabel = rightLabel;
|
||||
}
|
||||
}
|
||||
self.healthHeight = self.lastLabel.bottom + kRealValue(20);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// BillDetailTableViewCell.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/5.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BillDetailTableViewCell : UITableViewCell
|
||||
|
||||
@property (nonatomic, copy) NSString * leftString;
|
||||
|
||||
@property (nonatomic, copy) NSString * rightString;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-90
@@ -1,90 +0,0 @@
|
||||
//
|
||||
// BillDetailTableViewCell.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/5.
|
||||
//
|
||||
|
||||
#import "BillDetailTableViewCell.h"
|
||||
|
||||
@interface BillDetailTableViewCell ()
|
||||
|
||||
@property (nonatomic, strong) UILabel * leftLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * rightLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation BillDetailTableViewCell
|
||||
|
||||
- (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 {
|
||||
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self createUI];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
self.leftLabel = [[UILabel alloc] init];
|
||||
self.leftLabel.textColor = UIColorHex(#666666);
|
||||
self.leftLabel.font = BOLDSYSTEMFONT(14);
|
||||
self.leftLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self.contentView addSubview:self.leftLabel];
|
||||
|
||||
[self.leftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_offset(15);
|
||||
make.top.mas_offset(kRealValue(30));
|
||||
make.height.mas_offset(13);
|
||||
}];
|
||||
[self.leftLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
|
||||
self.rightLabel = [[UILabel alloc] init];
|
||||
self.rightLabel.textColor = UIColorHex(#333333);
|
||||
self.rightLabel.font = BOLDSYSTEMFONT(13);
|
||||
self.rightLabel.numberOfLines = 0;
|
||||
self.rightLabel.textAlignment = NSTextAlignmentRight;
|
||||
[self.contentView addSubview:self.rightLabel];
|
||||
|
||||
[self layoutIfNeeded];
|
||||
[self.rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_offset(-18);
|
||||
make.left.mas_equalTo(self.leftLabel.mas_right).offset(8);
|
||||
make.top.mas_equalTo(self.leftLabel);
|
||||
make.bottom.mas_offset(-5);
|
||||
}];
|
||||
[self.rightLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)setLeftString:(NSString *)leftString {
|
||||
_leftString = leftString;
|
||||
|
||||
self.leftLabel.text = _leftString;
|
||||
|
||||
}
|
||||
|
||||
- (void)setRightString:(NSString *)rightString {
|
||||
|
||||
_rightString = rightString;
|
||||
|
||||
self.rightLabel.text = rightString;
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// BillDtailTable.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/5.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "YXwithDrawDetailModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BillDtailTable : UITableView
|
||||
|
||||
@property (nonatomic, strong) NSDictionary * dic;
|
||||
|
||||
@property (nonatomic, strong) YXwithDrawDetailModel * model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-126
@@ -1,126 +0,0 @@
|
||||
//
|
||||
// BillDtailTable.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/5.
|
||||
//
|
||||
|
||||
#import "BillDtailTable.h"
|
||||
#import "BillDetailTableViewCell.h"
|
||||
|
||||
@interface BillDtailTable ()<UITableViewDelegate,UITableViewDataSource>
|
||||
|
||||
@end
|
||||
|
||||
@implementation BillDtailTable
|
||||
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style {
|
||||
|
||||
if (self = [super initWithFrame:frame style:style]) {
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
self.delegate = self;
|
||||
self.dataSource = self;
|
||||
self.backgroundColor = UIColor.whiteColor;
|
||||
self.showsVerticalScrollIndicator = false;
|
||||
self.showsHorizontalScrollIndicator = false;
|
||||
self.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
self.estimatedRowHeight = 60;
|
||||
self.rowHeight = UITableViewAutomaticDimension;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)setModel:(YXwithDrawDetailModel *)model {
|
||||
|
||||
_model = model;
|
||||
[self reloadData];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - tableview的代理方法
|
||||
//组数
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
//每组多少行
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return 9;
|
||||
}
|
||||
//注册cell
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
NSArray * array;
|
||||
|
||||
|
||||
BillDetailTableViewCell * cell = [self dequeueReusableCellWithIdentifier:@"BILLCELL"];
|
||||
|
||||
if (!cell) {
|
||||
|
||||
cell = [[BillDetailTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"BILLCELL"];
|
||||
}
|
||||
if (self.model) {
|
||||
array = @[@[@"流水号:",[NSString stringWithFormat:@"%@",self.model.wraw_Id] ],@[@"提现方:",self.model.withdrawalName],@[@"提现方式:",self.model.withdraw],@[@"收款账号:",self.model.paymentAccount],@[@"提现金额:",[NSString stringWithFormat:@"%@",self.model.paymentMoney]],@[@"实际到账金额:",[NSString stringWithFormat:@"%@",self.model.realityMoney]],@[@"提现说明:",self.model.remarks],@[@"账户金额:",[NSString stringWithFormat:@"%@",self.model.accountMoney]],@[@"提现时间",[NSString stringWithFormat:@"%@",self.model.paymentTime]]];
|
||||
cell.leftString= array[indexPath.row][0];
|
||||
cell.rightString= array[indexPath.row][1];
|
||||
}
|
||||
|
||||
cell.backgroundColor = KWhiteColor;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
return cell;
|
||||
|
||||
}
|
||||
|
||||
- (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];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
|
||||
|
||||
|
||||
|
||||
UIView * videoView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(10))];
|
||||
|
||||
return videoView;
|
||||
|
||||
}
|
||||
////cell点击事件
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// BillListTable.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/5.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void(^lookBillDetail)(NSString * billString);
|
||||
|
||||
@interface BillListTable : UITableView
|
||||
|
||||
@property (nonatomic, strong) NSArray * dataArray;
|
||||
|
||||
@property (nonatomic, copy) lookBillDetail detailBlock;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-125
@@ -1,125 +0,0 @@
|
||||
//
|
||||
// BillListTable.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/5.
|
||||
//
|
||||
|
||||
#import "BillListTable.h"
|
||||
#import "BillListTableViewCell.h"
|
||||
|
||||
|
||||
@interface BillListTable ()<UITableViewDelegate,UITableViewDataSource>
|
||||
|
||||
@end
|
||||
|
||||
@implementation BillListTable
|
||||
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style {
|
||||
|
||||
if (self = [super initWithFrame:frame style:style]) {
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
self.delegate = self;
|
||||
self.dataSource = self;
|
||||
self.backgroundColor = UIColor.clearColor;
|
||||
self.showsVerticalScrollIndicator = false;
|
||||
self.showsHorizontalScrollIndicator = false;
|
||||
self.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
self.estimatedRowHeight = 60;
|
||||
self.rowHeight = UITableViewAutomaticDimension;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)setDataArray:(NSArray *)dataArray {
|
||||
|
||||
_dataArray = dataArray;
|
||||
|
||||
[self reloadData];
|
||||
}
|
||||
|
||||
#pragma mark - tableview的代理方法
|
||||
//组数
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
{
|
||||
return self.dataArray.count;
|
||||
}
|
||||
//每组多少行
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
//注册cell
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
|
||||
BillListTableViewCell * cell = [self dequeueReusableCellWithIdentifier:@"BILLCELL"];
|
||||
|
||||
if (!cell) {
|
||||
|
||||
cell = [[BillListTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"BILLCELL"];
|
||||
}
|
||||
cell.backgroundColor = KWhiteColor;
|
||||
cell.layer.cornerRadius = 10.0;
|
||||
cell.layer.masksToBounds = true;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
cell.model = self.dataArray[indexPath.section];
|
||||
return cell;
|
||||
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
|
||||
|
||||
return kRealValue(10);
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
|
||||
|
||||
return CGFLOAT_MIN;
|
||||
}
|
||||
|
||||
//组头 --- 组尾
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
|
||||
|
||||
|
||||
return [UIView new];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
|
||||
|
||||
|
||||
|
||||
UIView * videoView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(10))];
|
||||
|
||||
return videoView;
|
||||
|
||||
}
|
||||
////cell点击事件
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
YXBillListDetailModel * model = self.dataArray[indexPath.section];
|
||||
|
||||
if (self.detailBlock) {
|
||||
|
||||
self.detailBlock(model.bill_id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
//
|
||||
// BillListTableViewCell.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/5.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "YXBillListModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BillListTableViewCell : UITableViewCell
|
||||
|
||||
@property (nonatomic, strong) YXBillListDetailModel * model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-115
@@ -1,115 +0,0 @@
|
||||
//
|
||||
// BillListTableViewCell.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/5.
|
||||
//
|
||||
|
||||
#import "BillListTableViewCell.h"
|
||||
|
||||
@interface BillListTableViewCell ()
|
||||
|
||||
@property (nonatomic, strong) UILabel * typeLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * timeLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * moneyLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * billLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation BillListTableViewCell
|
||||
|
||||
- (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 {
|
||||
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
|
||||
self.typeLabel = [[UILabel alloc] init];
|
||||
self.typeLabel.text = @"";
|
||||
self.typeLabel.textColor = CFontColor1;
|
||||
self.typeLabel.font = BOLDSYSTEMFONT(14);
|
||||
self.typeLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self.contentView addSubview:self.typeLabel];
|
||||
|
||||
[self.typeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_offset(18);
|
||||
make.top.mas_offset(15);
|
||||
make.height.mas_offset(14);
|
||||
make.width.mas_offset(90);
|
||||
}];
|
||||
|
||||
self.moneyLabel = [[UILabel alloc] init];
|
||||
self.moneyLabel.text = @"";
|
||||
self.moneyLabel.textColor = UIColorHex(#21BEBD);
|
||||
self.moneyLabel.font = BOLDSYSTEMFONT(16);
|
||||
self.moneyLabel.textAlignment = NSTextAlignmentRight;
|
||||
[self.contentView addSubview:self.moneyLabel];
|
||||
|
||||
[self.moneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_offset(-18);
|
||||
make.top.mas_offset(19);
|
||||
make.height.mas_offset(13);
|
||||
make.width.mas_offset(200);
|
||||
}];
|
||||
|
||||
self.timeLabel = [[UILabel alloc] init];
|
||||
|
||||
self.timeLabel.textColor = UIColorHex(#999999);
|
||||
self.timeLabel.font = BOLDSYSTEMFONT(12);
|
||||
self.timeLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self.contentView addSubview:self.timeLabel];
|
||||
|
||||
[self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_offset(18);
|
||||
make.top.mas_equalTo(self.typeLabel.mas_bottom).offset(10);
|
||||
make.height.mas_offset(13);
|
||||
make.bottom.mas_offset(-16);
|
||||
}];
|
||||
[self.timeLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
|
||||
self.billLabel = [[UILabel alloc] init];
|
||||
|
||||
self.billLabel.textColor = UIColorHex(#333333);
|
||||
self.billLabel.font = MEDIUMFONT(12);
|
||||
self.billLabel.textAlignment = NSTextAlignmentRight;
|
||||
[self.contentView addSubview:self.billLabel];
|
||||
|
||||
[self.billLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_offset(-18);
|
||||
make.top.mas_equalTo(self.typeLabel.mas_bottom).offset(10);
|
||||
make.height.mas_offset(13);
|
||||
make.bottom.mas_offset(-16);
|
||||
}];
|
||||
[self.billLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
}
|
||||
|
||||
- (void)setModel:(YXBillListDetailModel *)model {
|
||||
|
||||
_model = model;
|
||||
self.typeLabel.text = _model.operateType_dictText;
|
||||
self.moneyLabel.text = [NSString stringWithFormat:@"%.2f",[_model.income floatValue]];
|
||||
self.timeLabel.text = _model.createTime;
|
||||
self.billLabel.text = [NSString stringWithFormat:@"余额:%.2f",[_model.accountMoney floatValue]];
|
||||
}
|
||||
@end
|
||||
-66
@@ -1,66 +0,0 @@
|
||||
//
|
||||
// DetailTitleView.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/27.
|
||||
//
|
||||
|
||||
#import "DetailTitleView.h"
|
||||
|
||||
@interface DetailTitleView ()
|
||||
|
||||
@property (nonatomic, strong) UILabel * timeLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation DetailTitleView
|
||||
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
// An empty implementation adversely affects performance during animation.
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
// Drawing code
|
||||
}
|
||||
*/
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
|
||||
UIImageView * headImg = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.width, 33)];
|
||||
headImg.image = IMAGE_NAMED(@"userinfoTitleImg");
|
||||
[self addSubview:headImg];
|
||||
|
||||
UIImageView * leftImg = [[UIImageView alloc] initWithFrame:CGRectMake(kRealValue(16), 10, 15, 15)];
|
||||
leftImg.image = IMAGE_NAMED(@"questionLeft_icon");
|
||||
[headImg addSubview:leftImg];
|
||||
|
||||
UILabel * titleLabel = [[UILabel alloc] init];
|
||||
titleLabel.frame = CGRectMake(leftImg.right + kRealValue(7),10 , 80, 14);
|
||||
titleLabel.textAlignment = NSTextAlignmentLeft;
|
||||
titleLabel.text = @"咨询人信息";
|
||||
titleLabel.font = BOLDSYSTEMFONT(14);
|
||||
[self addSubview:titleLabel];
|
||||
|
||||
self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake( headImg.width/2 - kRealValue(10) , 8 , headImg.width/2 -kRealValue(10) , 15)];
|
||||
self.timeLabel.text = @"--";
|
||||
self.timeLabel.font = SYSTEMFONT(10);
|
||||
self.timeLabel.textAlignment = NSTextAlignmentRight;
|
||||
self.timeLabel.textColor = KWhiteColor;
|
||||
[headImg addSubview:self.timeLabel];
|
||||
|
||||
}
|
||||
|
||||
- (void)setCreateTime:(NSString *)createTime {
|
||||
_createTime = createTime;
|
||||
self.timeLabel.text = [NSString stringWithFormat:@"生成时间:%@",_createTime];
|
||||
}
|
||||
|
||||
@end
|
||||
-114
@@ -1,114 +0,0 @@
|
||||
//
|
||||
// DetailUserInfoView.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/27.
|
||||
//
|
||||
|
||||
#import "DetailUserInfoView.h"
|
||||
|
||||
@interface DetailUserInfoView ()
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation DetailUserInfoView
|
||||
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
// An empty implementation adversely affects performance during animation.
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
// Drawing code
|
||||
}
|
||||
*/
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
|
||||
[self createUI];
|
||||
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
|
||||
//一行的列数
|
||||
NSInteger cols = 3;
|
||||
//label大小
|
||||
CGFloat labW = (self.width - kRealValue(46) ) / 3 ;
|
||||
CGFloat labH = 13;
|
||||
CGFloat pading = 0;
|
||||
//每一行的间距
|
||||
CGFloat rowMargin = kRealValue(20);
|
||||
for (int i = 0; i < 5; i ++) {
|
||||
//所在列
|
||||
NSInteger col = i % cols;
|
||||
//所在行
|
||||
NSInteger row = i / cols;
|
||||
|
||||
CGFloat shopX = col * (labW );
|
||||
CGFloat shopY = row * (labH + rowMargin);
|
||||
UILabel * nameLabel = [[UILabel alloc] init];
|
||||
nameLabel.frame = CGRectMake( kRealValue(18) + shopX,kRealValue(23) + shopY, labW, labH);
|
||||
nameLabel.textAlignment = NSTextAlignmentLeft;
|
||||
nameLabel.text = @"";
|
||||
nameLabel.font = SYSTEMFONT(13);
|
||||
nameLabel.tag = 100 + i;
|
||||
[self addSubview:nameLabel];
|
||||
|
||||
}
|
||||
UIView * lineV = [[UIView alloc] initWithFrame:CGRectMake(0, self.height, self.width, 1)];
|
||||
lineV.backgroundColor = UIColorHex(#E0E0E0);
|
||||
[self addSubview:lineV];
|
||||
}
|
||||
|
||||
- (void)setUserInfo:(YXReocrdconFamilyMembersDO *)userInfo {
|
||||
|
||||
_userInfo = userInfo;
|
||||
|
||||
UILabel * nameLabel = [self viewWithTag:100];
|
||||
|
||||
nameLabel.text = [NSString stringWithFormat:@"姓名:%@",_userInfo.name];
|
||||
|
||||
NSString * sexString = [_userInfo.gender integerValue] == 1 ? @"女":@"男";
|
||||
|
||||
UILabel * sexLabel = [self viewWithTag:101];
|
||||
|
||||
sexLabel.text = [NSString stringWithFormat:@"性别:%@",sexString];
|
||||
|
||||
UILabel * ageLabel = [self viewWithTag:102];
|
||||
|
||||
ageLabel.text = [NSString stringWithFormat:@"年龄:%@",_userInfo.age];
|
||||
|
||||
|
||||
UILabel * shengaoLabel = [self viewWithTag:103];
|
||||
|
||||
NSString * heightString ;
|
||||
if (ValidStr(_userInfo.height)) {
|
||||
heightString = @"--";
|
||||
}
|
||||
else
|
||||
{
|
||||
heightString = _userInfo.height;
|
||||
}
|
||||
shengaoLabel.text = [NSString stringWithFormat:@"身高:%@cm",heightString];
|
||||
|
||||
NSString * weightString ;
|
||||
if (ValidStr(_userInfo.height)) {
|
||||
weightString = @"--";
|
||||
}
|
||||
else
|
||||
{
|
||||
weightString = _userInfo.weight;
|
||||
}
|
||||
UILabel * weightLabel = [self viewWithTag:104];
|
||||
|
||||
weightLabel.text = [NSString stringWithFormat:@"体重:%@kg",weightString];
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
//
|
||||
// QuestionAppointmentTimeView.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/27.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "YXRecoredListDetailModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QuestionAppointmentTimeView : UIView
|
||||
|
||||
//@property (nonatomic, assign) BOOL ishide;
|
||||
//
|
||||
//@property (nonatomic, strong) YXRecoredListDetailModel * model;
|
||||
//
|
||||
//@property (nonatomic, strong) NSArray * imList;
|
||||
//
|
||||
//@property (nonatomic, assign) CGFloat timeHeight;
|
||||
//@property (nonatomic, strong) DoctorReportDoctorInfoModel * doctorModel;
|
||||
//@property (nonatomic, strong) DoctorReportConSessionModel * sessionModel;
|
||||
@property (nonatomic, strong) YXRecoredListDetailModel * model;
|
||||
|
||||
@property (nonatomic, assign) CGFloat doctorinfoHeight;
|
||||
|
||||
@property (nonatomic, assign) bool isJujue;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-401
@@ -1,401 +0,0 @@
|
||||
//
|
||||
// QuestionAppointmentTimeView.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/27.
|
||||
//
|
||||
|
||||
#import "QuestionAppointmentTimeView.h"
|
||||
#import "NSDate+BRPickerView.h"
|
||||
@interface QuestionAppointmentTimeView ()
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * labsArray;
|
||||
|
||||
@property (nonatomic, strong) UILabel * timeLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * questionTypeLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * starTimeLabel;
|
||||
|
||||
@property (nonatomic, strong) UIButton * collectBtn;
|
||||
|
||||
@property (nonatomic, strong) UIView * starTimeView ; //开始时间视图
|
||||
@property (nonatomic, strong) UIView * jujueView ; //拒绝视图
|
||||
@property (nonatomic, strong) UIView * cancelQuestionView ; //取消视图
|
||||
@property (nonatomic, strong) UIView * questionRecordView ; //咨询记录
|
||||
|
||||
|
||||
@property (nonatomic, strong) UILabel * jujueyuanyinLab ; //拒绝原因
|
||||
@property (nonatomic, strong) UILabel * jujueBeizhuLab ; //拒绝备注
|
||||
@property (nonatomic, strong) UILabel * beizhuLabel ; //拒绝备注
|
||||
@property (nonatomic, strong) UILabel * cancelTimeLabel ; //取消时间
|
||||
@property (nonatomic, strong) UILabel * recordStarLabel ; //取消时间
|
||||
|
||||
@end
|
||||
|
||||
@implementation QuestionAppointmentTimeView
|
||||
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
// An empty implementation adversely affects performance during animation.
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
// Drawing code
|
||||
}
|
||||
*/
|
||||
|
||||
#pragma mark:懒加载
|
||||
- (NSMutableArray *)labsArray {
|
||||
|
||||
if (!_labsArray) {
|
||||
|
||||
_labsArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _labsArray;
|
||||
}
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
|
||||
[self createUI];
|
||||
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
|
||||
UIView * lineV = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, self.width - kRealValue(30), 0.1)];
|
||||
lineV.backgroundColor = UIColorHex(#E0E0E0);
|
||||
[self addSubview:lineV];
|
||||
|
||||
UILabel * leftTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15),lineV.bottom + kRealValue(20), 100, 14)];
|
||||
leftTimeLabel.text = @"预约时间";
|
||||
leftTimeLabel.font = MEDIUMFONT(14);
|
||||
leftTimeLabel.textColor = CFontColor1;
|
||||
leftTimeLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self addSubview:leftTimeLabel];
|
||||
|
||||
self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.width - 300 - 19,lineV.bottom + kRealValue(20), 300, 14)];
|
||||
self.timeLabel.text = @"";
|
||||
self.timeLabel.font = [UIFont systemFontOfSize:13];
|
||||
self.timeLabel.textColor = CFontColor1;
|
||||
self.timeLabel.textAlignment = NSTextAlignmentRight;
|
||||
[self addSubview:self.timeLabel];
|
||||
|
||||
|
||||
//从这里开始不一样
|
||||
|
||||
UIView * starTimeView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.timeLabel.bottom + kRealValue(20), self.width- kRealValue(30) , 30)];
|
||||
self.starTimeView = starTimeView;
|
||||
starTimeView.hidden = YES;
|
||||
[self addSubview:starTimeView];
|
||||
|
||||
UILabel * starLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, kRealValue(14), 100, 14)];
|
||||
starLabel.text = @"开始时间";
|
||||
starLabel.font = MEDIUMFONT(14);
|
||||
starLabel.textColor = CFontColor1;
|
||||
starLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[starTimeView addSubview:starLabel];
|
||||
|
||||
self.starTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(starTimeView.width - 300 , kRealValue(14), 300, 14)];
|
||||
self.starTimeLabel.text = @"";
|
||||
self.starTimeLabel.font = [UIFont systemFontOfSize:13];;
|
||||
self.starTimeLabel.textColor = CFontColor1;
|
||||
self.starTimeLabel.textAlignment = NSTextAlignmentRight;
|
||||
[starTimeView addSubview:self.starTimeLabel];
|
||||
starTimeView.height = starLabel.bottom + kRealValue(10);
|
||||
self.starTimeView.hidden = YES;
|
||||
// 1 拒绝
|
||||
|
||||
UIView * jujueView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.timeLabel.bottom + kRealValue(20), self.width - kRealValue(30), 30)];
|
||||
self.jujueView = jujueView;
|
||||
jujueView.hidden = true;
|
||||
[self addSubview:jujueView];
|
||||
|
||||
UILabel * jujueLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,0, 100, 14)];
|
||||
jujueLabel.text = @"拒绝原因";
|
||||
jujueLabel.font = MEDIUMFONT(14);
|
||||
jujueLabel.textColor = CFontColor1;
|
||||
jujueLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[jujueView addSubview:jujueLabel];
|
||||
|
||||
UILabel * jujueyuanyinLab = [[UILabel alloc] initWithFrame:CGRectMake(jujueLabel.right + 10, 0, jujueView.width - 100 -15 , 15)];
|
||||
jujueyuanyinLab.text = @"";
|
||||
jujueyuanyinLab.font = [UIFont systemFontOfSize:13];
|
||||
self.jujueyuanyinLab = jujueyuanyinLab;
|
||||
self.jujueyuanyinLab.numberOfLines = 0;
|
||||
jujueyuanyinLab.textColor = CFontColor1;
|
||||
jujueyuanyinLab.textAlignment = NSTextAlignmentRight;
|
||||
[jujueView addSubview:jujueyuanyinLab];
|
||||
|
||||
|
||||
UILabel * beizhuLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,jujueLabel.bottom + kRealValue(20), 100, 14)];
|
||||
beizhuLabel.text = @"拒绝备注";
|
||||
beizhuLabel.font = MEDIUMFONT(14);
|
||||
beizhuLabel.textColor = CFontColor1;
|
||||
beizhuLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.beizhuLabel = beizhuLabel;
|
||||
[jujueView addSubview:beizhuLabel];
|
||||
|
||||
self.jujueBeizhuLab = [[UILabel alloc] initWithFrame:CGRectMake(beizhuLabel.right + 10, jujueLabel.bottom + kRealValue(20), jujueView.width - 15 - jujueLabel.width, 22)];
|
||||
self.jujueBeizhuLab.text = @"";
|
||||
self.jujueBeizhuLab.font = [UIFont systemFontOfSize:13];
|
||||
self.jujueBeizhuLab.numberOfLines = 0;
|
||||
self.jujueBeizhuLab.textColor = CFontColor1;
|
||||
self.jujueBeizhuLab.textAlignment = NSTextAlignmentRight;
|
||||
[jujueView addSubview:self.jujueBeizhuLab];
|
||||
//
|
||||
|
||||
// 取消
|
||||
self.cancelQuestionView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.timeLabel.bottom + kRealValue(16), self.width - kRealValue(30), 30)];
|
||||
[self addSubview:self.cancelQuestionView];
|
||||
|
||||
// UIView * cancellineType = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), 0, self.width - kRealValue(30), 1)];
|
||||
// cancellineType.backgroundColor = UIColorHex(#E0E0E0);
|
||||
// [self.cancelQuestionView addSubview:cancellineType];
|
||||
|
||||
UILabel * cancelStarLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,kRealValue(14), 100, 14)];
|
||||
cancelStarLabel.text = @"预计开始时间";
|
||||
cancelStarLabel.font = MEDIUMFONT(14);
|
||||
cancelStarLabel.textColor = CFontColor1;
|
||||
cancelStarLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self.cancelQuestionView addSubview:cancelStarLabel];
|
||||
|
||||
UILabel * openLabel = [[UILabel alloc] initWithFrame:CGRectMake(0,cancelStarLabel.bottom + kRealValue(13), 150, 12)];
|
||||
openLabel.text = @"请打开APP并保证网络流畅";
|
||||
openLabel.font = MEDIUMFONT(11);
|
||||
openLabel.textColor = UIColorHex(#999999);
|
||||
openLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self.cancelQuestionView addSubview:openLabel];
|
||||
|
||||
self.cancelTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.width - 300 - 19, kRealValue(14), 300, 22)];
|
||||
self.cancelTimeLabel.text = @"";
|
||||
self.cancelTimeLabel.font = BOLDSYSTEMFONT(13);
|
||||
self.cancelTimeLabel.textColor = UIColorHex(#999999);
|
||||
self.cancelTimeLabel.textAlignment = NSTextAlignmentRight;
|
||||
[self.cancelQuestionView addSubview:self.cancelTimeLabel];
|
||||
//中划线
|
||||
NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};
|
||||
NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString: self.cancelTimeLabel.text attributes:attribtDic];
|
||||
// 赋值
|
||||
self.cancelTimeLabel.attributedText = attribtStr;
|
||||
|
||||
self.cancelQuestionView.height = openLabel.bottom + kRealValue(10);
|
||||
|
||||
//咨询记录
|
||||
|
||||
self.questionRecordView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(15), self.starTimeView.bottom + kRealValue(10), self.width - kRealValue(30), 30)];
|
||||
self.questionRecordView.backgroundColor = KWhiteColor;
|
||||
[self addSubview:self.questionRecordView];
|
||||
|
||||
|
||||
UILabel * recordStarLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, kRealValue(14), 100, 14)];
|
||||
recordStarLabel.text = @"咨询记录";
|
||||
recordStarLabel.font = MEDIUMFONT(14);
|
||||
recordStarLabel.textColor = CFontColor1;
|
||||
recordStarLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.recordStarLabel = recordStarLabel;
|
||||
[self.questionRecordView addSubview:recordStarLabel];
|
||||
|
||||
// 赋值
|
||||
self.questionRecordView.height = recordStarLabel.bottom + kRealValue(10);
|
||||
|
||||
|
||||
|
||||
self.doctorinfoHeight = self.cancelQuestionView.bottom + kRealValue(15);
|
||||
}
|
||||
|
||||
|
||||
- (void)setModel:(YXRecoredListDetailModel *)model {
|
||||
_model = model;
|
||||
|
||||
|
||||
YXRecoredDetailConsessionModel * sessionModel = [YXRecoredDetailConsessionModel modelWithDictionary:_model.conSession];
|
||||
|
||||
|
||||
//状态数据
|
||||
NSString * timeString = [HQCommonUtils getTimeFromTimestamp:[sessionModel.sessionDateLong integerValue] andDateFormat:@"YYYY年MM月dd日"];
|
||||
NSString * weekString;
|
||||
NSArray * weekArray = @[@"周一",@"周二",@"周三",@"周四",@"周五",@"周六",@"周天"];
|
||||
NSString * amString = [sessionModel.amPm integerValue] == 1 ? @"下午":@"上午";
|
||||
if ( [sessionModel.week integerValue] >= 1) {
|
||||
weekString = weekArray[[sessionModel.week integerValue] - 1];
|
||||
}
|
||||
self.timeLabel.text = [NSString stringWithFormat:@"%@ %@ %@",timeString,weekString,amString];
|
||||
|
||||
|
||||
|
||||
//预约状态 1待确认 2待开始 3已开始 4待评价 5已完成
|
||||
// 6 拒绝 7取消 8 超时
|
||||
if ( [sessionModel.contentStatus integerValue] == 6) { //拒绝
|
||||
|
||||
self.jujueView.hidden = false;
|
||||
self.starTimeView.hidden = true;
|
||||
self.cancelQuestionView.hidden = true;
|
||||
self.jujueyuanyinLab.text = sessionModel.reasonType;
|
||||
self.jujueBeizhuLab.text = sessionModel.rejectReason;
|
||||
CGFloat labH = [HQCommonUtils getSpaceLabelHeight: self.jujueyuanyinLab AndLeftisTrue:false withStr:self.jujueyuanyinLab.text withFont:[UIFont systemFontOfSize:14] withWidth: self.jujueyuanyinLab.width withLineSpacing:2];
|
||||
|
||||
CGFloat beizhulabH = [HQCommonUtils getSpaceLabelHeight: self.jujueBeizhuLab AndLeftisTrue:false withStr:self.jujueBeizhuLab.text withFont:[UIFont systemFontOfSize:14] withWidth: self.jujueyuanyinLab.width withLineSpacing:2];
|
||||
|
||||
//布局
|
||||
self.questionRecordView.height = 0;
|
||||
self.jujueView.top = self.timeLabel.bottom + kRealValue(16);
|
||||
self.jujueyuanyinLab.top = 1;
|
||||
self.jujueBeizhuLab.height = beizhulabH;
|
||||
self.jujueBeizhuLab.top = self.jujueyuanyinLab.bottom + kRealValue(16);
|
||||
self.beizhuLabel.top = self.jujueyuanyinLab.bottom + kRealValue(16);
|
||||
self.jujueView.height = self.beizhuLabel.bottom+ 15;
|
||||
self.questionRecordView.top = self.jujueView.bottom;
|
||||
self.doctorinfoHeight = self.questionRecordView.bottom + kRealValue(12);
|
||||
self.recordStarLabel.hidden = true;
|
||||
|
||||
// NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};
|
||||
// NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString: self.timeLabel.text attributes:attribtDic];
|
||||
// // 类型
|
||||
NSDictionary * typeattribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};
|
||||
NSMutableAttributedString * typeattribtStr = [[NSMutableAttributedString alloc]initWithString: self.timeLabel.text attributes:typeattribtDic];
|
||||
self.timeLabel.attributedText = typeattribtStr;
|
||||
// self.doctorinfoHeight = self.questionTypeLabel.bottom + kRealValue(15);
|
||||
}
|
||||
if ( [sessionModel.contentStatus integerValue] == 1 || [sessionModel.contentStatus integerValue] == 2) { //待确认
|
||||
|
||||
self.jujueView.hidden = true ;
|
||||
self.starTimeView.hidden = true;
|
||||
self.cancelQuestionView.hidden = true;
|
||||
self.questionRecordView.hidden = YES;
|
||||
if ( ValidStr(sessionModel.doctorStartTime)) { //如果医生开始时间为空 那么不显示
|
||||
|
||||
self.starTimeView.hidden = true;
|
||||
}else
|
||||
{
|
||||
self.starTimeView.hidden = false;
|
||||
self.starTimeLabel.text = [HQCommonUtils getTimeFromTimestamp:[sessionModel.sessionDateLong integerValue] andDateFormat:@"YYYY年MM月dd日 HH:mm"];
|
||||
}
|
||||
|
||||
self.doctorinfoHeight = self.timeLabel.bottom + kRealValue(20);
|
||||
}
|
||||
if ( [sessionModel.contentStatus integerValue] == 7) { //取消
|
||||
|
||||
self.jujueView.hidden = YES;
|
||||
self.starTimeView.hidden = YES;
|
||||
self.cancelQuestionView.hidden = false;
|
||||
self.questionRecordView.hidden = YES;
|
||||
self.jujueyuanyinLab.text = sessionModel.reasonType;
|
||||
CGFloat labH = [HQCommonUtils getSpaceLabelHeight: self.jujueyuanyinLab AndLeftisTrue:true withStr:self.jujueyuanyinLab.text withFont:[UIFont systemFontOfSize:14 weight:UIFontWeightMedium] withWidth: self.jujueyuanyinLab.width withLineSpacing:5];
|
||||
self.jujueyuanyinLab.height = labH;
|
||||
self.jujueView.hidden = YES;
|
||||
self.doctorinfoHeight = self.timeLabel.bottom + kRealValue(20);
|
||||
}
|
||||
if ( [sessionModel.contentStatus integerValue] == 3 || [sessionModel.contentStatus integerValue] == 4 || [sessionModel.contentStatus integerValue] == 5) { //在线咨询
|
||||
for (UILabel * currentlab in self.labsArray) {
|
||||
|
||||
[currentlab removeFromSuperview];
|
||||
}
|
||||
[self.labsArray removeAllObjects];
|
||||
|
||||
self.jujueView.hidden = true ;
|
||||
self.starTimeView.hidden = false;
|
||||
self.cancelQuestionView.hidden = true;
|
||||
self.questionRecordView.hidden = false;
|
||||
if ( ValidStr(sessionModel.doctorStartTime)) { //如果医生开始时间为空 那么不显示
|
||||
|
||||
self.starTimeView.hidden = true;
|
||||
}else
|
||||
{
|
||||
self.starTimeView.hidden = false;
|
||||
NSString * doctorStar = [HQCommonUtils getTimeFromTimestamp:[sessionModel.doctorStartTimeLong integerValue] andDateFormat:@"YYYY年MM月dd日 HH:mm"];
|
||||
NSString * doctorend = [HQCommonUtils getTimeFromTimestamp:[sessionModel.doctorEndTimeLong integerValue] andDateFormat:@"HH:mm"];
|
||||
|
||||
self.starTimeLabel.text = [NSString stringWithFormat:@"%@~%@",doctorStar,doctorend];
|
||||
}
|
||||
|
||||
NSArray * recordArray = _model.imList;
|
||||
CGFloat height = 30;
|
||||
for (int i = 0 ; i < recordArray.count; i ++) {
|
||||
|
||||
YXRecoredDetailIMListModel * imModel = recordArray[i];
|
||||
|
||||
|
||||
UILabel * recordLabel = [[UILabel alloc] initWithFrame:CGRectMake(14, 45 + 25 * i, self.questionRecordView.width -14, 20)];
|
||||
recordLabel.textAlignment = NSTextAlignmentLeft;
|
||||
recordLabel.font = SYSTEMFONT(15);
|
||||
NSString * questionType = @"";
|
||||
NSString * timeString;
|
||||
if (ValidStr(imModel.startTime) || ValidStr(imModel.endTime)) {
|
||||
|
||||
timeString = @"时长:--";
|
||||
}else
|
||||
{
|
||||
timeString = [self dateTimeDifferenceWithStartTime:imModel.startTime endTime:imModel.endTime];
|
||||
}
|
||||
if ([imModel.type intValue] == 2) {
|
||||
questionType = @"视频咨询";
|
||||
recordLabel.text = [NSString stringWithFormat:@"%@:%@ %@",questionType,imModel.startTime,timeString];
|
||||
}else
|
||||
{
|
||||
questionType = @"约定时间";
|
||||
NSString * doctorStar = [HQCommonUtils getTimeFromTimestamp:[imModel.startTimLong integerValue] andDateFormat:@"YYYY-MM-dd HH:mm"];
|
||||
NSString * doctorend = [HQCommonUtils getTimeFromTimestamp:[imModel.endTimeLong integerValue] andDateFormat:@"HH:mm"];
|
||||
recordLabel.text = [NSString stringWithFormat:@"%@:%@~%@",questionType,doctorStar,doctorend];
|
||||
}
|
||||
recordLabel.textColor = CFontColor1;
|
||||
|
||||
|
||||
|
||||
|
||||
if (i == recordArray.count - 1) {
|
||||
|
||||
height = recordLabel.bottom;
|
||||
self.questionRecordView.height = kRealValue(14) + height;
|
||||
}
|
||||
[self.questionRecordView addSubview:recordLabel];
|
||||
[self.labsArray addObject:recordLabel];
|
||||
}
|
||||
|
||||
|
||||
self.doctorinfoHeight = self.questionRecordView.bottom + kRealValue(10);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(NSString *)dateTimeDifferenceWithStartTime:(NSString *)startTime endTime:(NSString *)endTime{
|
||||
NSDateFormatter *date = [[NSDateFormatter alloc]init];
|
||||
[date setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
|
||||
NSDate *startD =[date dateFromString:startTime];
|
||||
NSDate *endD = [date dateFromString:endTime];
|
||||
NSTimeInterval start = [startD timeIntervalSince1970]*1;
|
||||
NSTimeInterval end = [endD timeIntervalSince1970]*1;
|
||||
NSTimeInterval value = end - start;
|
||||
int second = (int)value %60;//秒
|
||||
int minute = (int)value /60%60;
|
||||
int house = (int)value % (24 * 3600)/3600;
|
||||
int day = (int)value / (24 * 3600);
|
||||
NSString *str;
|
||||
if (day != 0) {
|
||||
str = [NSString stringWithFormat:@"时长:%d天%d小时%d分%d秒",day,house,minute,second];
|
||||
}else if (day==0 && house != 0) {
|
||||
str = [NSString stringWithFormat:@"时长:%d小时%d分%d秒",house,minute,second];
|
||||
}else if (day== 0 && house== 0 && minute!=0) {
|
||||
str = [NSString stringWithFormat:@"时长:%d分%d秒",minute,second];
|
||||
}else{
|
||||
str = [NSString stringWithFormat:@"时长:%d秒",second];
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
///将时间戳转为日期时间
|
||||
|
||||
/// @param timestamp 时间戳
|
||||
|
||||
/// @param dateFormat 日期样式 YYYY-MM-dd HH:mm:ss
|
||||
|
||||
|
||||
@end
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
//
|
||||
// QuestionFileDataView.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/28.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "YXRecoredListDetailModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void(^lookDetailBlock)();
|
||||
|
||||
@interface QuestionFileDataView : UIView
|
||||
|
||||
@property (nonatomic, assign) CGFloat fileHeight;
|
||||
|
||||
@property (nonatomic, copy) lookDetailBlock fileBlock;
|
||||
|
||||
@property (nonatomic, strong) YXRecoredconMedicalRecordsListDO * model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-103
@@ -1,103 +0,0 @@
|
||||
//
|
||||
// QuestionFileDataView.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/28.
|
||||
//
|
||||
|
||||
#import "QuestionFileDataView.h"
|
||||
|
||||
@interface QuestionFileDataView ()
|
||||
|
||||
@property (nonatomic, strong) UILabel * timeLabel;
|
||||
@property (nonatomic, strong) UILabel * fileLabel;
|
||||
@end
|
||||
|
||||
@implementation QuestionFileDataView
|
||||
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
// An empty implementation adversely affects performance during animation.
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
// Drawing code
|
||||
}
|
||||
*/
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
UIView * timelineV = [[UIView alloc] initWithFrame:CGRectMake(0, 1, self.width , 1)];
|
||||
timelineV.backgroundColor = UIColorHex(#E0E0E0);
|
||||
[self addSubview:timelineV];
|
||||
|
||||
UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(15), 100, 14)];
|
||||
titleLabel.text = @"档案";
|
||||
titleLabel.font = BOLDSYSTEMFONT(13);
|
||||
titleLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self addSubview:titleLabel];
|
||||
|
||||
UILabel * timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(15), self.width - kRealValue(33), 14)];
|
||||
self.timeLabel = timeLabel;
|
||||
timeLabel.text = @"生成时间:2020年05月05日 周四 上午";
|
||||
timeLabel.font = MEDIUMFONT(11);
|
||||
timeLabel.textColor = UIColorHex(#999999);
|
||||
timeLabel.textAlignment = NSTextAlignmentRight;
|
||||
[self addSubview:timeLabel];
|
||||
|
||||
UILabel * fileLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18),titleLabel.bottom+ kRealValue(25), self.width - kRealValue(36), 34)];
|
||||
fileLabel.text = @"";
|
||||
fileLabel.numberOfLines = 2;
|
||||
fileLabel.font = MEDIUMFONT(13);
|
||||
fileLabel.textColor = UIColorHex(#333333);
|
||||
fileLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.fileLabel = fileLabel;
|
||||
[self addSubview:fileLabel];
|
||||
|
||||
// CGFloat fileHeight = [HQCommonUtils getSpaceLabelHeight:fileLabel withStr:fileLabel.text withFont:[UIFont systemFontOfSize:13 weight:UIFontWeightMedium] withWidth:fileLabel.width withLineSpacing:5];
|
||||
// fileLabel.height = fileHeight;
|
||||
|
||||
YYLabel * detailLabel = [[YYLabel alloc] initWithFrame:CGRectMake(self.width - 100 - kRealValue(18), fileLabel.bottom + kRealValue(11), 100, 12)];
|
||||
detailLabel.text = @"查看详情 >";
|
||||
detailLabel.textColor = UIColorHex(#3390FF);
|
||||
detailLabel.font = MEDIUMFONT(11);
|
||||
detailLabel.textAlignment = NSTextAlignmentRight;
|
||||
[self addSubview:detailLabel];
|
||||
|
||||
[detailLabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
[self lookMDetail];
|
||||
}];
|
||||
|
||||
UIView * lineV = [[UIView alloc] initWithFrame:CGRectMake(0, detailLabel.bottom, kScreenWidth - kRealValue(30), 14)];
|
||||
lineV.backgroundColor = KWhiteColor;
|
||||
[self addSubview:lineV];
|
||||
|
||||
self.fileHeight = lineV.bottom;
|
||||
}
|
||||
|
||||
- (void)lookMDetail {
|
||||
|
||||
if (self.fileBlock) {
|
||||
|
||||
self.fileBlock();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)setModel:(YXRecoredconMedicalRecordsListDO *)model {
|
||||
|
||||
_model = model;
|
||||
|
||||
self.fileLabel.text = [NSString stringWithFormat:@"问题描述:%@",_model.medicalDescribe] ;
|
||||
self.timeLabel.text = [NSString stringWithFormat:@"更新时间:%@",_model.createTime];
|
||||
|
||||
}
|
||||
@end
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// QuestionHealthInfoView.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/28.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QuestionHealthInfoView : UIView
|
||||
|
||||
@property (nonatomic, strong) NSArray * questionArray;
|
||||
|
||||
@property (nonatomic, assign) CGFloat healthHeight;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-140
@@ -1,140 +0,0 @@
|
||||
//
|
||||
// QuestionHealthInfoView.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/28.
|
||||
//
|
||||
|
||||
#import "QuestionHealthInfoView.h"
|
||||
#import "YXRecoredListDetailModel.h"
|
||||
@interface QuestionHealthInfoView ()
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * leftArray;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * rightArray;
|
||||
|
||||
@property (nonatomic, strong) UILabel * lastLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation QuestionHealthInfoView
|
||||
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
// An empty implementation adversely affects performance during animation.
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
// Drawing code
|
||||
}
|
||||
*/
|
||||
- (NSMutableArray *)leftArray {
|
||||
|
||||
if (!_leftArray) {
|
||||
_leftArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _leftArray;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)rightArray {
|
||||
|
||||
if (!_rightArray) {
|
||||
|
||||
_rightArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _rightArray;
|
||||
}
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
|
||||
[self createUI];
|
||||
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
|
||||
UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(22), 100, 14)];
|
||||
titleLabel.text = @"基本健康信息";
|
||||
titleLabel.font = BOLDSYSTEMFONT(13);
|
||||
titleLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self addSubview:titleLabel];
|
||||
|
||||
NSArray * leftArray = @[@"饮食习惯:",@"烟酒习惯:",@"既往史:",@"家族史:",@"过敏史:",@"用药史:"];
|
||||
NSArray * rightArray = @[@"",@"",@"",@"",@"",@""];
|
||||
|
||||
for (int i = 0; i < leftArray.count; i ++) {
|
||||
|
||||
|
||||
UILabel * leftLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), titleLabel.bottom + kRealValue(20) + 30 * i, 100, 13)];
|
||||
leftLabel.text =leftArray[i];
|
||||
leftLabel.font = MEDIUMFONT(13);
|
||||
leftLabel.textAlignment = NSTextAlignmentLeft;
|
||||
leftLabel.textColor = UIColorHex(#666666);
|
||||
CGFloat w = [HQCommonUtils getLengthFromText:titleLabel.text andFontSize:13];
|
||||
leftLabel.width = w;
|
||||
[self addSubview:leftLabel];
|
||||
|
||||
|
||||
UILabel * rightLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftLabel.right, leftLabel.top, self.width - leftLabel.right, 13)];
|
||||
rightLabel.text =rightArray[i];
|
||||
rightLabel.font = MEDIUMFONT(13);
|
||||
rightLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self addSubview:rightLabel];
|
||||
|
||||
[self.leftArray addObject:leftLabel];
|
||||
[self.rightArray addObject:rightLabel];
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)setQuestionArray:(NSArray *)questionArray {
|
||||
_questionArray = questionArray;
|
||||
|
||||
|
||||
for (UILabel * leftLabel in self.leftArray) {
|
||||
[leftLabel removeFromSuperview];
|
||||
}
|
||||
for (UILabel * rightLabel in self.rightArray) {
|
||||
[rightLabel removeFromSuperview];
|
||||
}
|
||||
[self.leftArray removeAllObjects];
|
||||
[self.rightArray removeAllObjects];
|
||||
|
||||
for (int i = 0; i < _questionArray.count; i ++) {
|
||||
|
||||
// NSDictionary * dic = _questionArray[i];
|
||||
YXRecoredDetailHealthModel * model = _questionArray[i];
|
||||
|
||||
UILabel * leftLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(42) + 14 + 30 * i, 100, 13)];
|
||||
leftLabel.text = [NSString stringWithFormat:@"%@:",model.answerKey] ;
|
||||
leftLabel.font = MEDIUMFONT(13);
|
||||
leftLabel.textAlignment = NSTextAlignmentLeft;
|
||||
leftLabel.textColor = UIColorHex(#666666);
|
||||
CGFloat w = [HQCommonUtils getLengthFromText:leftLabel.text andFontSize:13];
|
||||
[self addSubview:leftLabel];
|
||||
|
||||
|
||||
UILabel * rightLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftLabel.right + kRealValue(25), leftLabel.top, self.width - leftLabel.right - kRealValue(25), 13)];
|
||||
rightLabel.text = model.answerValue;
|
||||
rightLabel.font = MEDIUMFONT(13);
|
||||
rightLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self addSubview:rightLabel];
|
||||
|
||||
[self.leftArray addObject:leftLabel];
|
||||
[self.rightArray addObject:rightLabel];
|
||||
|
||||
if (i == _questionArray.count - 1) {
|
||||
self.lastLabel = rightLabel;
|
||||
}
|
||||
}
|
||||
self.healthHeight = self.lastLabel.bottom + kRealValue(30);
|
||||
|
||||
}
|
||||
@end
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// QuestionReportView.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/28.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@interface QuestionReportView : UIView
|
||||
|
||||
@property (nonatomic, strong) NSArray * dataArray;
|
||||
|
||||
@property (nonatomic, assign) CGFloat reportHeight;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-91
@@ -1,91 +0,0 @@
|
||||
//
|
||||
// QuestionReportView.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/28.
|
||||
//
|
||||
|
||||
#import "QuestionReportView.h"
|
||||
|
||||
@interface QuestionReportView ()
|
||||
|
||||
@property (nonatomic, strong) UILabel * timeLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * hospatilLabel;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation QuestionReportView
|
||||
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
// An empty implementation adversely affects performance during animation.
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
// Drawing code
|
||||
}
|
||||
*/
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(24), 100, 14)];
|
||||
titleLabel.text = @"体检报告";
|
||||
titleLabel.font = BOLDSYSTEMFONT(13);
|
||||
titleLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self addSubview:titleLabel];
|
||||
|
||||
UILabel * timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), kRealValue(25), self.width - kRealValue(33), 14)];
|
||||
self.timeLabel = timeLabel;
|
||||
timeLabel.text = @"生成时间:--";
|
||||
timeLabel.font = MEDIUMFONT(10);
|
||||
timeLabel.textColor = UIColorHex(#999999);
|
||||
timeLabel.textAlignment = NSTextAlignmentRight;
|
||||
[self addSubview:timeLabel];
|
||||
|
||||
self.hospatilLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(18), titleLabel.bottom + kRealValue(17), self.width - kRealValue(36), 13)];
|
||||
self.hospatilLabel.text = @"";
|
||||
self.hospatilLabel.font = BOLDSYSTEMFONT(13);
|
||||
self.hospatilLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self addSubview:self.hospatilLabel];
|
||||
//
|
||||
YYLabel * detailLabel = [[YYLabel alloc] initWithFrame:CGRectMake(self.width - 100 - kRealValue(18), titleLabel.bottom + kRealValue(17), 100, 12)];
|
||||
detailLabel.text = @"查看详情 >";
|
||||
detailLabel.textColor = UIColorHex(#3390FF);
|
||||
detailLabel.font = MEDIUMFONT(11);
|
||||
detailLabel.textAlignment = NSTextAlignmentRight;
|
||||
[self addSubview:detailLabel];
|
||||
|
||||
[detailLabel setTextTapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
// [self lookMDetail];
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
//- (void)lookMDetail{
|
||||
//
|
||||
// if (self.baogaoBlock) {
|
||||
// self.baogaoBlock(self.bodyModel);
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//
|
||||
//- (void)setBodyModel:(YXPhyscialReportListModel *)bodyModel {
|
||||
//
|
||||
// _bodyModel = bodyModel;
|
||||
//
|
||||
// self.timeLabel.text = [NSString stringWithFormat:@"上传时间:%@年",_bodyModel.medicalYear];
|
||||
// self.hospatilLabel.text = [NSString stringWithFormat:@"%@ %@",_bodyModel.medicalYear,_bodyModel.hospitalName];
|
||||
// self.reportHeight = self.hospatilLabel.bottom + kRealValue(20);
|
||||
//}
|
||||
//
|
||||
|
||||
@end
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// FileDataDeatilCenterView.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/4.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "YXRecoredListDetailModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface FileDataDeatilCenterView : UIView
|
||||
|
||||
@property (nonatomic, assign) CGFloat questionH;
|
||||
|
||||
@property (nonatomic, strong) YXRecoredconMedicalRecordsListDO * medicalModel;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-318
@@ -1,318 +0,0 @@
|
||||
//
|
||||
// FileDataDeatilCenterView.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/4.
|
||||
//
|
||||
|
||||
#import "FileDataDeatilCenterView.h"
|
||||
#import "XLPhotoBrowser.h"
|
||||
|
||||
@interface FileDataDeatilCenterView ()<XLPhotoBrowserDelegate>
|
||||
|
||||
@property (nonatomic, strong) UILabel * firstQuestionLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * firstAnswerLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * secendQuestionLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * secendAnswerLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * thirdQuestionLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * thirdAnswerLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * fourthQuestionLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * fourthAnswerLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * fifthQuestionLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * fifthAnswerLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * thirdQuestionTitleLabel;
|
||||
|
||||
@property (nonatomic, strong) UIView * hospatilView;
|
||||
|
||||
@property (nonatomic, strong) UILabel * roomLabel;
|
||||
|
||||
@property (nonatomic, strong) UILabel * disNameLabel;
|
||||
|
||||
@property (nonatomic, strong) UIView * pictureView;
|
||||
|
||||
@property (nonatomic, strong) UIView * twoView;
|
||||
|
||||
@property (nonatomic, strong) UIView * thirdView;
|
||||
|
||||
@property (nonatomic, strong) UIView * fourView;
|
||||
|
||||
@property (nonatomic, strong) UILabel * numberLabel;
|
||||
|
||||
@property (nonatomic, strong) UIScrollView * pictScrollView;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray * pictureArray;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation FileDataDeatilCenterView
|
||||
|
||||
- (NSMutableArray *)pictureArray {
|
||||
|
||||
if (!_pictureArray) {
|
||||
_pictureArray = [[NSMutableArray alloc] init];
|
||||
}
|
||||
return _pictureArray;
|
||||
}
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
|
||||
[self createUI];
|
||||
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
self.backgroundColor = KWhiteColor;
|
||||
//第一个问题
|
||||
self.firstQuestionLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(20), kRealValue(24), self.width - kRealValue(30), 14)];
|
||||
self.firstQuestionLabel.text = @"1.本次问题持续多久了?";
|
||||
self.firstQuestionLabel.font = BOLDSYSTEMFONT(14);
|
||||
self.firstQuestionLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.firstQuestionLabel.textColor = UIColorHex(#333333);
|
||||
[self addSubview:self.firstQuestionLabel];
|
||||
|
||||
UIView * firstView = [[UIView alloc] initWithFrame:CGRectMake(0, self.firstQuestionLabel.bottom + kRealValue(15), self.width, 35)];
|
||||
firstView.backgroundColor = UIColorHex(#EFEFEF);
|
||||
[self addSubview:firstView];
|
||||
|
||||
UIView * lineOne = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 3, 35)];
|
||||
lineOne.backgroundColor = UIColorHex(#809999);
|
||||
[firstView addSubview:lineOne];
|
||||
|
||||
self.firstAnswerLabel = [[UILabel alloc] initWithFrame:CGRectMake(lineOne.right + kRealValue(18), 0, self.width - kRealValue(48), 35)];
|
||||
self.firstAnswerLabel.text = @"--";
|
||||
self.firstAnswerLabel.font = MEDIUMFONT(12);
|
||||
self.firstAnswerLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.firstAnswerLabel.textColor = UIColorHex(#333333);
|
||||
[firstView addSubview:self.firstAnswerLabel];
|
||||
|
||||
//第二个问题
|
||||
self.secendQuestionLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(20), firstView.bottom + kRealValue(15), self.width - kRealValue(30), 14)];
|
||||
self.secendQuestionLabel.text = @"2.咨询人的问题";
|
||||
self.secendQuestionLabel.font = BOLDSYSTEMFONT(14);
|
||||
self.secendQuestionLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.secendQuestionLabel.textColor = UIColorHex(#333333);
|
||||
[self addSubview:self.secendQuestionLabel];
|
||||
|
||||
UIView * twoView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(10), self.secendQuestionLabel.bottom + kRealValue(15), self.width - kRealValue(20), 70)];
|
||||
twoView.backgroundColor = UIColorHex(#EFEFEF);
|
||||
twoView.layer.cornerRadius = 10;
|
||||
self.twoView = twoView;
|
||||
twoView.layer.masksToBounds = true;
|
||||
[self addSubview:twoView];
|
||||
|
||||
self.secendAnswerLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), 11, twoView.width - kRealValue(50), 35)];
|
||||
self.secendAnswerLabel.text = @"";
|
||||
self.secendAnswerLabel.numberOfLines = 0;
|
||||
self.secendAnswerLabel.font = MEDIUMFONT(12);
|
||||
self.secendAnswerLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.secendAnswerLabel.textColor = UIColorHex(#333333);
|
||||
self.secendAnswerLabel.height = [HQCommonUtils getSpaceLabelHeight:self.secendAnswerLabel AndLeftisTrue:true withStr:self.secendAnswerLabel.text withFont:[UIFont systemFontOfSize:12 weight:UIFontWeightMedium] withWidth:twoView.width - kRealValue(50) withLineSpacing:5];
|
||||
[twoView addSubview:self.secendAnswerLabel];
|
||||
//图片
|
||||
self.pictureView = [[UIView alloc] initWithFrame:CGRectMake(0, twoView.bottom + kRealValue(12), self.width, 110)];
|
||||
[self addSubview: self.pictureView];
|
||||
|
||||
UILabel * pictureLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(10), 0, 140, 35)];
|
||||
pictureLabel.text = @"上传报告或者患处照片";
|
||||
pictureLabel.font = MEDIUMFONT(12);
|
||||
pictureLabel.textAlignment = NSTextAlignmentLeft;
|
||||
pictureLabel.textColor = UIColorHex(#666666);
|
||||
[self.pictureView addSubview:pictureLabel];
|
||||
|
||||
UILabel * showLabel = [[UILabel alloc] initWithFrame:CGRectMake(140, 0, 100, 35)];
|
||||
showLabel.text = @"(仅自己和医生可见)";
|
||||
showLabel.font = MEDIUMFONT(11);
|
||||
showLabel.textAlignment = NSTextAlignmentLeft;
|
||||
showLabel.textColor = UIColorHex(#333333);
|
||||
[self.pictureView addSubview:showLabel];
|
||||
|
||||
UILabel * numberLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.width - 10 - 50, 0, 50, 35)];
|
||||
numberLabel.text = @"-/8";
|
||||
numberLabel.font = MEDIUMFONT(11);
|
||||
numberLabel.textAlignment = NSTextAlignmentRight;
|
||||
numberLabel.textColor = UIColorHex(#333333);
|
||||
self.numberLabel = numberLabel;
|
||||
[self.pictureView addSubview:numberLabel];
|
||||
|
||||
UIScrollView * pictScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(pictureLabel.left, pictureLabel.bottom, self.width - kRealValue(20), 62)];
|
||||
self.pictScrollView = pictScrollView;
|
||||
[self.pictureView addSubview:pictScrollView];
|
||||
|
||||
//第三个问题
|
||||
self.thirdQuestionTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(20),self.pictureView.bottom + kRealValue(10), self.width - kRealValue(30), 14)];
|
||||
self.thirdQuestionTitleLabel.text = @"3.咨询人是否去医院就诊过?";
|
||||
self.thirdQuestionTitleLabel.font = BOLDSYSTEMFONT(14);
|
||||
self.thirdQuestionTitleLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.thirdQuestionTitleLabel.textColor = UIColorHex(#333333);
|
||||
[self addSubview:self.thirdQuestionTitleLabel];
|
||||
|
||||
UIView * thirdView = [[UIView alloc] initWithFrame:CGRectMake(0, self.thirdQuestionTitleLabel.bottom + kRealValue(15), self.width, 35)];
|
||||
thirdView.backgroundColor = UIColorHex(#EFEFEF);
|
||||
self.thirdView = thirdView;
|
||||
[self addSubview:thirdView];
|
||||
|
||||
UIView * linethird = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 3, 35)];
|
||||
linethird.backgroundColor = UIColorHex(#809999);
|
||||
[thirdView addSubview:linethird];
|
||||
|
||||
self.thirdQuestionLabel = [[UILabel alloc] initWithFrame:CGRectMake(lineOne.right + kRealValue(18), 0, self.width - kRealValue(48), 35)];
|
||||
self.thirdQuestionLabel.text = @"A 就诊过";
|
||||
self.thirdQuestionLabel.font = MEDIUMFONT(12);
|
||||
self.thirdQuestionLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.thirdQuestionLabel.textColor = UIColorHex(#333333);
|
||||
[thirdView addSubview:self.thirdQuestionLabel];
|
||||
|
||||
self.hospatilView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(8), thirdView.bottom + kRealValue(16), self.width - kRealValue(16), 67)];
|
||||
self.hospatilView.backgroundColor = UIColorHex(#EFEFEF);
|
||||
self.hospatilView.layer.cornerRadius = 10;
|
||||
self.hospatilView.layer.masksToBounds = true;
|
||||
[self addSubview:self.hospatilView];
|
||||
|
||||
self.roomLabel = [[UILabel alloc] initWithFrame:CGRectMake(lineOne.right + kRealValue(16), kRealValue(12), self.hospatilView.width - kRealValue(20), 13)];
|
||||
self.roomLabel.text = @"就诊医院及科室:--";
|
||||
self.roomLabel.font = MEDIUMFONT(12);
|
||||
self.roomLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.roomLabel.textColor = UIColorHex(#333333);
|
||||
[self.hospatilView addSubview:self.roomLabel];
|
||||
|
||||
self.disNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(lineOne.right + kRealValue(16), self.roomLabel.bottom + kRealValue(17) , self.hospatilView.width - kRealValue(20), 13)];
|
||||
self.disNameLabel.text = @"诊断结果:--";
|
||||
self.disNameLabel.font = MEDIUMFONT(12);
|
||||
self.disNameLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.disNameLabel.textColor = UIColorHex(#333333);
|
||||
[self.hospatilView addSubview:self.disNameLabel];
|
||||
//第4个问题
|
||||
self.fourthQuestionLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(20), self.hospatilView.bottom + kRealValue(21), self.width - kRealValue(30), 14)];
|
||||
self.fourthQuestionLabel.text = @"4.咨询人期望得到的帮助?";
|
||||
self.fourthQuestionLabel.font = BOLDSYSTEMFONT(14);
|
||||
self.fourthQuestionLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.fourthQuestionLabel.textColor = UIColorHex(#333333);
|
||||
[self addSubview:self.fourthQuestionLabel];
|
||||
|
||||
UIView *fourView = [[UIView alloc] initWithFrame:CGRectMake(kRealValue(10), self.fourthQuestionLabel.bottom + kRealValue(15), self.width - kRealValue(20), 70)];
|
||||
fourView.backgroundColor = UIColorHex(#EFEFEF);
|
||||
fourView.layer.cornerRadius = 10;
|
||||
fourView.layer.masksToBounds = true;
|
||||
self.fourView = fourView;
|
||||
[self addSubview:fourView];
|
||||
|
||||
self.fourthAnswerLabel = [[UILabel alloc] initWithFrame:CGRectMake(kRealValue(15), 11, fourView.width - kRealValue(50), 35)];
|
||||
self.fourthAnswerLabel.text = @"";
|
||||
self.fourthAnswerLabel.numberOfLines = 0;
|
||||
self.fourthAnswerLabel.font = MEDIUMFONT(12);
|
||||
self.fourthAnswerLabel.textAlignment = NSTextAlignmentLeft;
|
||||
self.fourthAnswerLabel.textColor = UIColorHex(#333333);
|
||||
self.fourthAnswerLabel.height = [HQCommonUtils getSpaceLabelHeight:self.fourthAnswerLabel AndLeftisTrue:true withStr:self.fourthAnswerLabel.text withFont:[UIFont systemFontOfSize:12 weight:UIFontWeightMedium] withWidth:twoView.width - kRealValue(50) withLineSpacing:5];
|
||||
[fourView addSubview:self.fourthAnswerLabel];
|
||||
|
||||
self.questionH = fourView.bottom + kRealValue(20);
|
||||
}
|
||||
|
||||
|
||||
- (void)setMedicalModel:(YXRecoredconMedicalRecordsListDO *)medicalModel {
|
||||
|
||||
_medicalModel = medicalModel;
|
||||
[self.pictureArray removeAllObjects];
|
||||
self.firstAnswerLabel.text = _medicalModel.haveTimeValue;
|
||||
self.secendAnswerLabel.text = _medicalModel.medicalDescribe;
|
||||
self.secendAnswerLabel.height = [HQCommonUtils getSpaceLabelHeight:self.secendAnswerLabel AndLeftisTrue:true withStr:self.secendAnswerLabel.text withFont:[UIFont systemFontOfSize:12 weight:UIFontWeightMedium] withWidth: self.width - kRealValue(20) - kRealValue(50) withLineSpacing:5];
|
||||
self.twoView.height = self.secendAnswerLabel.bottom + kRealValue(25);
|
||||
if (!ValidStr(_medicalModel.image)) {
|
||||
NSArray * array = [_medicalModel.image componentsSeparatedByString:@","];
|
||||
self.numberLabel.text = [NSString stringWithFormat:@"%d/9",array.count];
|
||||
for (int i = 0 ; i < array.count; i ++) {
|
||||
|
||||
self.pictureView.top = self.twoView.bottom + kRealValue(15);
|
||||
|
||||
NSString * photo = [NSString stringWithFormat:@"%@%@",ResourceAddress,array[i]];
|
||||
|
||||
NSString * str1 = @"\\";
|
||||
|
||||
photo = [photo stringByReplacingOccurrencesOfString:str1 withString:@"/"];
|
||||
|
||||
NSString *encodedString3 = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)photo, (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL, kCFStringEncodingUTF8));
|
||||
|
||||
[self.pictureArray addObject:encodedString3];
|
||||
|
||||
UIImageView * picView = [[UIImageView alloc] initWithFrame:CGRectMake(66 * i, 0 , 60, 60)];
|
||||
picView.backgroundColor = [UIColor grayColor];
|
||||
picView.layer.cornerRadius = 5.0;
|
||||
picView.layer.masksToBounds = true;
|
||||
picView.userInteractionEnabled = true;
|
||||
[picView sd_setImageWithURL:[NSURL URLWithString:encodedString3] placeholderImage:PLACEHOLD_IMG];
|
||||
|
||||
UIButton * imgbtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, picView.width, picView.height)];
|
||||
[imgbtn addTarget:self action:@selector(lookPicture:) forControlEvents:UIControlEventTouchUpInside];
|
||||
imgbtn.tag = 100 + i;
|
||||
[picView addSubview:imgbtn];
|
||||
[self.pictScrollView addSubview:picView];
|
||||
|
||||
|
||||
}
|
||||
|
||||
}else
|
||||
{
|
||||
self.pictureView.hidden = YES;
|
||||
self.thirdQuestionTitleLabel.top = self.twoView.bottom + kRealValue(10);
|
||||
self.thirdView.top = self.thirdQuestionTitleLabel.bottom + kRealValue(15);
|
||||
}
|
||||
|
||||
self.thirdQuestionLabel.text = _medicalModel.tfLookValue;
|
||||
|
||||
if ([_medicalModel.tfLook integerValue] == 0) {
|
||||
self.hospatilView.hidden = YES;
|
||||
self.fourthQuestionLabel.top = self.thirdView.bottom + kRealValue(16);
|
||||
self.fourView.top = self.fourthQuestionLabel.bottom + kRealValue(15);
|
||||
|
||||
}
|
||||
if ([_medicalModel.tfLook integerValue] == 1) {
|
||||
self.hospatilView.hidden = false;
|
||||
self.roomLabel.text = [NSString stringWithFormat:@"就诊医院及科室:%@",_medicalModel.lookOffice] ;
|
||||
self.disNameLabel.text = [NSString stringWithFormat:@"诊断结果:%@",_medicalModel.lookMedicalName];
|
||||
self.fourthQuestionLabel.top = self.hospatilView.bottom + kRealValue(16);
|
||||
self.fourView.top = self.fourthQuestionLabel.bottom + kRealValue(15);
|
||||
|
||||
}
|
||||
|
||||
self.fourthAnswerLabel.text = _medicalModel.desire;
|
||||
|
||||
self.fourthAnswerLabel.height = [HQCommonUtils getSpaceLabelHeight:self.fourthAnswerLabel AndLeftisTrue:true withStr:self.fourthAnswerLabel.text withFont:[UIFont systemFontOfSize:12 weight:UIFontWeightMedium] withWidth: self.width - kRealValue(20) - kRealValue(50) withLineSpacing:5];
|
||||
self.fourView.height = self.fourthAnswerLabel.bottom + kRealValue(25);
|
||||
self.questionH = self.fourView.bottom + kRealValue(20);
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)lookPicture:(UIButton *)indexBtn {
|
||||
|
||||
XLPhotoBrowser *browser = [XLPhotoBrowser showPhotoBrowserWithImages:self.pictureArray currentImageIndex:indexBtn.tag - 100];
|
||||
|
||||
browser.browserStyle = XLPhotoBrowserStyleSimple; // 微博样式
|
||||
|
||||
// 自定义pageControl的一些属性
|
||||
browser.pageDotColor = [UIColor purpleColor]; ///< 此属性针对动画样式的pagecontrol无效
|
||||
browser.currentPageDotColor = [UIColor greenColor];
|
||||
browser.pageControlStyle = XLPhotoBrowserPageControlStyleClassic;///< 修改底部pagecontrol的样式为系统样式,默认是弹性动画的样式
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
//
|
||||
// HQSearchView.h
|
||||
// DoctorXinjiang
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/13.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void(^searchOnclick)(NSString * fieldtext);
|
||||
|
||||
@interface HQSearchView : UIView
|
||||
|
||||
@property (nonatomic, strong) NSString * searchPlacehold;
|
||||
|
||||
@property (nonatomic, strong) UITextField * searchField;
|
||||
|
||||
@property (nonatomic, copy) searchOnclick searchBlock;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-97
@@ -1,97 +0,0 @@
|
||||
//
|
||||
// HQSearchView.m
|
||||
// DoctorXinjiang
|
||||
//
|
||||
// Created by 仁康信息 on 2023/4/13.
|
||||
//
|
||||
|
||||
#import "HQSearchView.h"
|
||||
|
||||
@interface HQSearchView ()<UITextFieldDelegate>
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation HQSearchView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
self.searchField = [[UITextField alloc] initWithFrame:CGRectMake(kRealValue(15), 0, kScreenWidth - kRealValue(65), 35)];
|
||||
self.searchField.returnKeyType = UIReturnKeySearch;
|
||||
self.searchField.delegate = self;
|
||||
self.searchField.layer.cornerRadius = 18.0f;
|
||||
self.searchField.layer.masksToBounds = true;
|
||||
self.searchField.backgroundColor = UIColorHex(#F1F1F1);
|
||||
//搜索图标
|
||||
|
||||
UIView * leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 37, 35)];
|
||||
|
||||
UIImageView *view = [[UIImageView alloc] init];
|
||||
//设置图片控制器的的图片
|
||||
view.image = [UIImage imageNamed:@"searchLeftIcon"];
|
||||
//设置图片的frame
|
||||
view.width = 15;
|
||||
view.height = 15;
|
||||
view.center= leftView.center;
|
||||
//左边搜索图标的模式
|
||||
view.contentMode = UIViewContentModeCenter;
|
||||
[leftView addSubview:view];
|
||||
self.searchField.leftView = leftView;
|
||||
//左边搜索图标总是显示
|
||||
self.searchField.leftViewMode = UITextFieldViewModeAlways;
|
||||
//右边删除所有图标
|
||||
self.searchField.clearButtonMode = UITextFieldViewModeAlways;
|
||||
|
||||
[self addSubview:self.searchField];
|
||||
|
||||
UIButton * seachBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.searchField.right, 0, 50, 35)];
|
||||
[seachBtn setTitle:@"搜索" forState:UIControlStateNormal];
|
||||
seachBtn.titleLabel.font = SYSTEMFONT(13);
|
||||
[seachBtn setTitleColor:CFontColor2 forState:UIControlStateNormal];
|
||||
[seachBtn addTarget:self action:@selector(searchAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self addSubview:seachBtn];
|
||||
|
||||
}
|
||||
|
||||
- (void)setSearchPlacehold:(NSString *)searchPlacehold {
|
||||
|
||||
_searchPlacehold = searchPlacehold;
|
||||
|
||||
NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:_searchPlacehold attributes:
|
||||
@{NSForegroundColorAttributeName:[UIColor grayColor],
|
||||
NSFontAttributeName:SYSTEMFONT(13)}
|
||||
];
|
||||
self.searchField.attributedPlaceholder = attrString;
|
||||
|
||||
}
|
||||
|
||||
- (BOOL)textFieldShouldReturn:(UITextField*)theTextField {
|
||||
|
||||
[theTextField resignFirstResponder];
|
||||
|
||||
if (self.searchBlock) {
|
||||
|
||||
self.searchBlock(theTextField.text);
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)searchAction {
|
||||
|
||||
if (self.searchBlock) {
|
||||
|
||||
self.searchBlock(self.searchField.text);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
//
|
||||
// HistoryRecordTable.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/4.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface HistoryRecordTable : UITableView
|
||||
|
||||
@property (nonatomic, strong) NSArray * dataArray;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-118
@@ -1,118 +0,0 @@
|
||||
//
|
||||
// HistoryRecordTable.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/4.
|
||||
//
|
||||
|
||||
#import "HistoryRecordTable.h"
|
||||
#import "HistoryRecordTableViewCell.h"
|
||||
|
||||
@interface HistoryRecordTable ()<UITableViewDelegate,UITableViewDataSource>
|
||||
|
||||
@end
|
||||
|
||||
@implementation HistoryRecordTable
|
||||
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style {
|
||||
|
||||
if (self = [super initWithFrame:frame style:style]) {
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
self.delegate = self;
|
||||
self.dataSource = self;
|
||||
self.backgroundColor = UIColor.clearColor;
|
||||
self.showsVerticalScrollIndicator = false;
|
||||
self.showsHorizontalScrollIndicator = false;
|
||||
self.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
self.estimatedRowHeight = 60;
|
||||
self.rowHeight = UITableViewAutomaticDimension;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)setDataArray:(NSArray *)dataArray {
|
||||
|
||||
_dataArray = dataArray;
|
||||
|
||||
[self reloadData];
|
||||
}
|
||||
|
||||
#pragma mark - tableview的代理方法
|
||||
//组数
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
//每组多少行
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
//注册cell
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
|
||||
HistoryRecordTableViewCell * cell = [self dequeueReusableCellWithIdentifier:@"VIDEOCELL"];
|
||||
|
||||
if (!cell) {
|
||||
|
||||
cell = [[HistoryRecordTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"VIDEOCELL"];
|
||||
}
|
||||
cell.backgroundColor = KWhiteColor;
|
||||
cell.layer.cornerRadius = 10.0;
|
||||
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
return cell;
|
||||
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
|
||||
|
||||
return kRealValue(12);
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
|
||||
|
||||
return CGFLOAT_MIN;
|
||||
}
|
||||
|
||||
//组头 --- 组尾
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
|
||||
|
||||
|
||||
return [UIView new];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
|
||||
|
||||
|
||||
|
||||
UIView * videoView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kRealValue(12))];
|
||||
|
||||
return videoView;
|
||||
|
||||
}
|
||||
////cell点击事件
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// HistoryRecordTableViewCell.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/4.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface HistoryRecordTableViewCell : UITableViewCell
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-153
@@ -1,153 +0,0 @@
|
||||
//
|
||||
// HistoryRecordTableViewCell.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2023/5/4.
|
||||
//
|
||||
|
||||
#import "HistoryRecordTableViewCell.h"
|
||||
|
||||
|
||||
@interface HistoryRecordTableViewCell ()
|
||||
|
||||
|
||||
@property (nonatomic, strong) UILabel * typeLabel;
|
||||
@property (nonatomic, strong) UILabel * statusLabel;
|
||||
@property (nonatomic, strong) UILabel * nameLabel;
|
||||
@property (nonatomic, strong) UILabel * ageLabel;
|
||||
@property (nonatomic, strong) UILabel * timeLabel;
|
||||
@property (nonatomic, strong) UILabel * cardLabel;
|
||||
@property (nonatomic, strong) UILabel * canisLabel;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation HistoryRecordTableViewCell
|
||||
|
||||
- (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 {
|
||||
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
self.typeLabel = [[UILabel alloc] init];
|
||||
self.typeLabel.text = @" 视频咨询 ";
|
||||
self.typeLabel.layer.cornerRadius = 5.0;
|
||||
self.typeLabel.layer.masksToBounds = true;
|
||||
self.typeLabel.layer.borderColor = UIColorHex(#21BEBD).CGColor;
|
||||
self.typeLabel.layer.borderWidth = 1.0f;
|
||||
self.typeLabel.textColor = UIColorHex(#21BEBD);
|
||||
self.typeLabel.font = SYSTEMFONT(11);
|
||||
[self.contentView addSubview:self.typeLabel];
|
||||
|
||||
[self.typeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_offset(10);
|
||||
make.top.mas_offset(12);
|
||||
make.height.mas_offset(21);
|
||||
}];
|
||||
[self.typeLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
|
||||
self.nameLabel = [[UILabel alloc] init];
|
||||
self.nameLabel.text = @"张三";
|
||||
self.nameLabel.textColor = CFontColor1;
|
||||
self.nameLabel.font = BOLDSYSTEMFONT(14);
|
||||
[self.contentView addSubview:self.nameLabel];
|
||||
|
||||
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.typeLabel.mas_right).offset(5);
|
||||
make.top.mas_offset(16);
|
||||
make.height.mas_offset(14);
|
||||
}];
|
||||
[self.nameLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
|
||||
self.ageLabel = [[UILabel alloc] init];
|
||||
self.ageLabel.text = @"(男/38岁)";
|
||||
self.ageLabel.textColor = CFontColor2;
|
||||
self.ageLabel.font = BOLDSYSTEMFONT(14);
|
||||
[self.contentView addSubview:self.ageLabel];
|
||||
|
||||
[self.ageLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.nameLabel.mas_right);
|
||||
make.top.mas_offset(16);
|
||||
make.height.mas_offset(14);
|
||||
}];
|
||||
[self.ageLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
|
||||
self.timeLabel = [[UILabel alloc] init];
|
||||
self.timeLabel.text = @"2023-01-05 14:23:56";
|
||||
self.timeLabel.textColor = UIColorHex(#999999);
|
||||
self.timeLabel.font = BOLDSYSTEMFONT(14);
|
||||
self.timeLabel.textAlignment = NSTextAlignmentRight;
|
||||
[self.contentView addSubview:self.timeLabel];
|
||||
|
||||
[self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(@-15);
|
||||
make.top.mas_offset(12);
|
||||
make.height.mas_offset(11);
|
||||
}];
|
||||
[self.timeLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
|
||||
self.cardLabel = [[UILabel alloc] init];
|
||||
self.cardLabel.text = @"610456198905167894";
|
||||
self.cardLabel.textColor = UIColorHex(#999999);
|
||||
self.cardLabel.font = MEDIUMFONT(13);
|
||||
[self.contentView addSubview:self.cardLabel];
|
||||
|
||||
[self.cardLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(@15);
|
||||
make.top.mas_equalTo(self.typeLabel.mas_bottom).offset(12);
|
||||
make.height.mas_offset(11);
|
||||
}];
|
||||
[self.cardLabel setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
|
||||
|
||||
self.statusLabel = [[UILabel alloc] init];
|
||||
self.statusLabel.text = @"已完成";
|
||||
self.statusLabel.textColor = UIColorHex(#16C716);
|
||||
self.statusLabel.font = BOLDSYSTEMFONT(14);
|
||||
self.statusLabel.textAlignment = NSTextAlignmentRight;
|
||||
[self.contentView addSubview:self.statusLabel];
|
||||
|
||||
[self.statusLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(@-15);
|
||||
make.top.mas_equalTo(self.timeLabel.mas_bottom).offset(24);
|
||||
make.height.mas_offset(14);
|
||||
make.width.mas_offset(90);
|
||||
}];
|
||||
|
||||
self.canisLabel = [[UILabel alloc] init];
|
||||
self.canisLabel.text = @"症状:高血压、糖尿病 肾结石";
|
||||
self.canisLabel.textColor = CFontColor1;
|
||||
self.canisLabel.font = MEDIUMFONT(14);
|
||||
self.canisLabel.textAlignment = NSTextAlignmentLeft;
|
||||
[self.contentView addSubview:self.canisLabel];
|
||||
|
||||
[self.canisLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(@14);
|
||||
make.top.mas_equalTo(self.cardLabel.mas_bottom).offset(10);
|
||||
make.height.mas_offset (18);
|
||||
make.bottom.mas_offset(-18);
|
||||
make.right.mas_offset(-15);
|
||||
|
||||
}];
|
||||
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
-97
@@ -1,97 +0,0 @@
|
||||
//
|
||||
// HospitalSelectedTableViewCell.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2022/9/19.
|
||||
//
|
||||
|
||||
#import "HospitalSelectedTableViewCell.h"
|
||||
|
||||
@interface HospitalSelectedTableViewCell ( )
|
||||
|
||||
@property (nonatomic, strong) UIImageView * hospitalImage;
|
||||
|
||||
@property (nonatomic, strong) UILabel * hospitalName;
|
||||
|
||||
@property (nonatomic, strong) UIButton * sureButton;
|
||||
|
||||
@end
|
||||
|
||||
@implementation HospitalSelectedTableViewCell
|
||||
|
||||
- (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 {
|
||||
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
self.hospitalImage = [[UIImageView alloc] init];
|
||||
self.hospitalImage.backgroundColor = [UIColor orangeColor];
|
||||
[self.contentView addSubview:self.hospitalImage];
|
||||
|
||||
self.hospitalName = [[UILabel alloc] init];
|
||||
self.hospitalName.textAlignment = NSTextAlignmentLeft;
|
||||
self.hospitalName.font = SYSTEMFONT(15);
|
||||
self.hospitalName.textColor = CFontColor1;
|
||||
[self.contentView addSubview:self.hospitalName];
|
||||
|
||||
self.sureButton = [[UIButton alloc] init];
|
||||
[self.sureButton setImage:IMAGE_NAMED(@"chooseCircle") forState:UIControlStateNormal];
|
||||
[self.sureButton setImage:IMAGE_NAMED(@"closeImage") forState:UIControlStateSelected];
|
||||
[self.sureButton addTarget:self action:@selector(hospitalChoose) forControlEvents:UIControlEventTouchUpInside];
|
||||
self.sureButton.selected = true;
|
||||
self.sureButton.userInteractionEnabled = true;
|
||||
[self.contentView addSubview:self.sureButton];
|
||||
|
||||
|
||||
[self.hospitalImage mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(@20);
|
||||
make.top.mas_equalTo(@0);
|
||||
make.width.height.mas_equalTo(44);
|
||||
}];
|
||||
|
||||
[self.sureButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(@-17);
|
||||
make.width.height.mas_equalTo(@25);
|
||||
make.centerY.mas_equalTo(self.hospitalImage);
|
||||
}];
|
||||
|
||||
[self.hospitalName mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.hospitalImage.mas_right).offset(12);
|
||||
make.right.mas_equalTo(self.sureButton.mas_left).offset(-10);
|
||||
make.top.mas_equalTo(@15);
|
||||
make.height.mas_equalTo(@16);
|
||||
}];
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (void)hospitalChoose {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)setModel:(YXHospitalModel *)model {
|
||||
_model = model;
|
||||
self.hospitalName.text = [NSString stringWithFormat:@"%@",_model.hospitalName];
|
||||
self.sureButton.selected = model.isChoose;
|
||||
}
|
||||
@end
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
//
|
||||
// HospitalSelectedView.h
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2022/9/19.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "HospitalSelectedTableViewCell.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void(^hospotalSelectBlock)(NSString * hospalalName);
|
||||
|
||||
@interface HospitalSelectedView : UIView
|
||||
|
||||
@property (nonatomic, strong) NSArray * dataArray;
|
||||
|
||||
@property (nonatomic, copy) hospotalSelectBlock hospatlBlcok;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
-206
@@ -1,206 +0,0 @@
|
||||
//
|
||||
// HospitalSelectedView.m
|
||||
// healthQuestion
|
||||
//
|
||||
// Created by 仁康信息 on 2022/9/19.
|
||||
//
|
||||
|
||||
#import "HospitalSelectedView.h"
|
||||
|
||||
@interface HospitalSelectedView ()<UITableViewDelegate,UITableViewDataSource>
|
||||
|
||||
@property (nonatomic,strong)UITableView * tableView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation HospitalSelectedView
|
||||
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
|
||||
self.backgroundColor = RGBA(51, 59, 66,0.7);
|
||||
[self createUI];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
|
||||
UIView * centerView = [[UIView alloc] init];
|
||||
centerView.layer.masksToBounds = true;
|
||||
centerView.layer.cornerRadius = 4;
|
||||
centerView.backgroundColor = [UIColor whiteColor];
|
||||
[self addSubview:centerView];
|
||||
|
||||
UIView * headView = [[UIView alloc] init];
|
||||
headView.backgroundColor = KWhiteColor;
|
||||
[centerView addSubview:headView];
|
||||
|
||||
UILabel * headLabel = [[UILabel alloc] init];
|
||||
headLabel.text = @"选择医院";
|
||||
headLabel.textColor = CFontColor1;
|
||||
headLabel.font = BOLDSYSTEMFONT(16);
|
||||
headLabel.textAlignment = NSTextAlignmentCenter;
|
||||
[headView addSubview:headLabel];
|
||||
|
||||
|
||||
self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
self.tableView.backgroundColor = KWhiteColor;
|
||||
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
[centerView addSubview:self.tableView];
|
||||
|
||||
UIButton * bottomBtn = [[UIButton alloc] init];
|
||||
[bottomBtn setBackgroundColor:UIColorHex(#BD130B)];
|
||||
[bottomBtn setTitle:@"确定" forState:UIControlStateNormal];
|
||||
[bottomBtn setTitleColor:KWhiteColor forState:UIControlStateNormal];
|
||||
[centerView addSubview:bottomBtn];
|
||||
|
||||
UIButton * closeBtn = [[UIButton alloc] init];
|
||||
[closeBtn setImage:IMAGE_NAMED(@"closeImage") forState:UIControlStateNormal];
|
||||
[closeBtn addTarget:self action:@selector(closePopView) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self addSubview:closeBtn];
|
||||
|
||||
[centerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kScreenWidth -30);
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.height.mas_equalTo(@376);
|
||||
make.top.mas_equalTo(@172);
|
||||
}];
|
||||
|
||||
[headView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(@50);
|
||||
make.width.top.mas_equalTo(centerView);
|
||||
}];
|
||||
|
||||
[headLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(0);
|
||||
make.top.mas_equalTo(@17);
|
||||
make.height.mas_equalTo(@16);
|
||||
}];
|
||||
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(0);
|
||||
make.top.mas_equalTo(headView.mas_bottom).offset(18);
|
||||
make.bottom.mas_equalTo(bottomBtn.mas_top).offset(-20);
|
||||
}];
|
||||
|
||||
[bottomBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(@290);
|
||||
make.centerX.mas_equalTo(centerView);
|
||||
make.bottom.mas_equalTo(@-20);
|
||||
}];
|
||||
|
||||
[closeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.top.mas_equalTo(centerView.mas_bottom).offset(26);
|
||||
make.height.width.mas_equalTo(@32);
|
||||
}];
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)setDataArray:(NSArray *)dataArray {
|
||||
_dataArray = dataArray;
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - tableview的代理方法
|
||||
//组数
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
//每组多少行
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return self.dataArray.count;
|
||||
}
|
||||
//注册cell
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
|
||||
HospitalSelectedTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"HospitalCELL"];
|
||||
if (!cell) {
|
||||
|
||||
cell = [[HospitalSelectedTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"HospitalCELL"];
|
||||
}
|
||||
cell.backgroundColor = KWhiteColor;
|
||||
cell.model = self.dataArray[indexPath.row];
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
return cell;
|
||||
|
||||
}
|
||||
//每行高度
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
|
||||
|
||||
return kRealValue(55);
|
||||
}
|
||||
|
||||
- (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];
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
|
||||
|
||||
|
||||
return [UIView new];
|
||||
|
||||
}
|
||||
////cell点击事件
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
|
||||
YXHospitalModel * model = self.dataArray[indexPath.row];
|
||||
|
||||
for (YXHospitalModel * subModel in self.dataArray) {
|
||||
|
||||
if (subModel == model) {
|
||||
subModel.isChoose = true;
|
||||
}else
|
||||
{
|
||||
subModel.isChoose = false;
|
||||
}
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
if (self.hospatlBlcok) {
|
||||
|
||||
self.hospatlBlcok(@"西安市中医院");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)closePopView {
|
||||
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
//
|
||||
// SYLIfeManagerFooterView.h
|
||||
// shan
|
||||
//
|
||||
// Created by aDu on 2016/12/7.
|
||||
// Copyright © 2016年 DuKaiShun. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface SYLIfeManagerFooterView : UICollectionReusableView
|
||||
|
||||
@end
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// SYLIfeManagerFooterView.m
|
||||
// shan
|
||||
//
|
||||
// Created by aDu on 2016/12/7.
|
||||
// Copyright © 2016年 DuKaiShun. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SYLIfeManagerFooterView.h"
|
||||
|
||||
@implementation SYLIfeManagerFooterView
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
self.backgroundColor = [UIColor grayColor];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user