删除无用类

This commit is contained in:
zhanglei
2025-07-11 10:36:41 +08:00
parent cb29fd5678
commit f2026f63d6
18 changed files with 6 additions and 2172 deletions
@@ -1,39 +0,0 @@
//package com.btpj.lib_base.http.interceptor
//
//import com.btpj.lib_base.BaseApp.Companion.appContext
//import com.btpj.lib_base.utils.NetworkUtil
//import okhttp3.CacheControl
//import okhttp3.Interceptor
//import okhttp3.Response
//
///**
// * 缓存拦截器,用于无网情况下传递header直接拉取之前缓存的数据
// * @param day 缓存天数
// *
// * @author nanfeifei 2022/4/14
// */
//class CacheInterceptor(private var day: Int = 7) : Interceptor {
// override fun intercept(chain: Interceptor.Chain): Response {
// var request = chain.request()
// if (!NetworkUtil.isNetworkAvailable(appContext)) {
// request = request.newBuilder()
// .cacheControl(CacheControl.FORCE_CACHE)
// .build()
// }
// val response = chain.proceed(request)
// if (!NetworkUtil.isNetworkAvailable(appContext)) {
// val maxAge = 60 * 60
// response.newBuilder()
// .removeHeader("Pragma")
// .header("Cache-Control", "public, max-age=$maxAge")
// .build()
// } else {
// val maxStale = 60 * 60 * 24 * day
// response.newBuilder()
// .removeHeader("Pragma")
// .header("Cache-Control", "public, only-if-cached, max-stale=$maxStale")
// .build()
// }
// return response
// }
//}
@@ -1,63 +0,0 @@
//package com.xjjk.healthyclients.superfuntion
//
//import android.content.Context
//import android.content.Intent
//import android.net.Uri
//import com.xjjk.healthyclients.bean.emergency.LocationResourceBean
//import com.xjjk.healthyclients.view.WindowDialogView
//
//fun EmergencyActivity.getMarkerInfo(
// mLat: Double,
// mLon: Double,
// mMarkerList: MutableList<LocationResourceBean>
//): LocationResourceBean? {
// var bean: LocationResourceBean? = null
// for (index in 0 until mMarkerList.size) {
// var lat = mMarkerList[index].latitude
// var lon = mMarkerList[index].longitude
// if (lat == mLat && lon == mLon) {
// //设置卡片信息
// bean = mMarkerList[index]
// }
// }
// return bean
//}
//
//fun EmergencyActivity.goNavigation(mLat: Double, mLon: Double, context: Context) {
// WindowDialogView.WindowDialogView(context, object :
// WindowDialogView.windowDialogListener {
// override fun onSelectText(position: Int, str: String?) {
// when (str) {
// "百度地图" -> {
//// showToastTxt = "手机未安装百度地图APP"
// val intent = Intent()
// //导航界面
// intent.setData(Uri.parse("baidumap://map/direction?destination=latlng:${mLat},${mLon}|name:目的地&coord_type=bd09ll&mode=driving"))
// //由于没获取到目的地地址,所以跳到目的地界面
// //intent.setData(Uri.parse("baidumap://map/geocoder?location=${item?.la},${item?.lg}&src=andr.baidu.openAPIdemo"))
// context?.startActivity(intent)
//
// }
//
// "高德地图" -> {
//// showToastTxt = "手机未安装高德地图APP"
// val intent = Intent()
// intent.setPackage("com.autonavi.minimap")
// intent.setAction(Intent.ACTION_VIEW)
// intent.addCategory(Intent.CATEGORY_DEFAULT)
// val destination = MapUtils.gaoDeToLatLng(mLat, mLon);//转换坐标系
// intent.setData(
// Uri.parse(
// "androidamap://route?sourceApplication=${context?.getString(R.string.app_name)}&" +
// "dlat=" + destination.latitude + "&dlon=" + destination.longitude + "&dname=目的地" + "&dev=0&t=0"
// )
// )
// context?.startActivity(intent)
// }
// }
// }
//
// override fun onClose() {
// }
// }, MapUtils.isInstalled(context))
//}
@@ -101,11 +101,6 @@ class GuidanceNoticeActivity : BaseVMBActivity<GuidanceNoticeViewModel, Activity
override fun processClick(paramView: View?) {
when(paramView?.id){
R.id.hospital_detail_navigation -> {
mContext?.let{
}
}
}
}
@@ -1,70 +0,0 @@
package com.xjjk.healthyclients.ui.viewmodel
import com.xjjk.healthyclients.base.viewmodel.BaseViewModel
import com.xjjk.healthyclients.bean.CommonSettingMenuBean
import com.xjjk.healthyclients.bean.emergency.AddBigDiseaseSubmitBean
import com.xjjk.healthyclients.bean.emergency.HospitalBean
import com.xjjk.healthyclients.data.repository.EmergencyRepository
import com.xjjk.healthyclients.superfuntion.handleRequest
import com.xjjk.healthyclients.superfuntion.launch
import kotlinx.coroutines.flow.MutableStateFlow
class AddBigDiseaseViewModel : BaseViewModel() {
var messageList = MutableStateFlow(ArrayList<HospitalBean>())
var registerType = MutableStateFlow(mutableListOf<CommonSettingMenuBean>())
var isSubmit = MutableStateFlow(false)
override fun init() {
}
fun selectStationHospitalList() {
launch(tryBlock =
{
handleRequest(
EmergencyRepository.selectStationHospitalList(),
successBlock = {
it.result?.let {
messageList.emit(it)
}
})
}, finallyBlock = {
}
)
}
/**
* 新增大病就医
*/
fun appointmentSeeDoctor(bean: AddBigDiseaseSubmitBean) {
launch(tryBlock =
{
handleRequest(
EmergencyRepository.appointmentSeeDoctor(bean),
successBlock = {
if (it.code==200) {
isSubmit.emit(true)
}
})
}, finallyBlock = {
}
)
}
fun getCommonSettingMenuList() {
launch(tryBlock =
{
handleRequest(
EmergencyRepository.getCommonSettingMenuList(),
successBlock = {
it.result?.let {
registerType.emit(it)
}
})
}, finallyBlock = {
}
)
}
}
@@ -1,119 +0,0 @@
package com.xjjk.healthyclients.ui.viewmodel
import com.sw.healthyclients.bean.guidance.DiseaseBean
import com.xjjk.healthyclients.base.viewmodel.BaseViewModel
import com.xjjk.healthyclients.bean.guidance.DepartmentchildBean
import com.xjjk.healthyclients.bean.guidance.HospitalchildBean
import com.xjjk.healthyclients.bean.guidance.SearchDepartListBean
import com.xjjk.healthyclients.data.repository.GuidanceRepository
import com.xjjk.healthyclients.superfuntion.handleRequest
import com.xjjk.healthyclients.superfuntion.launch
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.MutableStateFlow
class DepartmentSearchViewModel: BaseViewModel() {
var pag=1
var pagNumber=100
var mDepartmentSoure=MutableStateFlow(arrayListOf<DepartmentchildBean>()) //科室列表
var mDepartmentSoureState = MutableSharedFlow<Boolean>()
var mDataSoure=MutableStateFlow(ArrayList<SearchDepartListBean>()) //医院
var mDiseaseSoure=MutableStateFlow(arrayListOf<DiseaseBean>()) //疾病
var mDiseaseSoureState = MutableSharedFlow<Boolean>()
var titleText = MutableStateFlow("")
var mHospitalSoure=MutableStateFlow(ArrayList<HospitalchildBean>()) //医院列表
override fun init() {
// selectDoctorRecommend()
}
/**
* 疾病搜索
*/
fun searchconSicksList(value:String){
launch(
{
handleRequest(
GuidanceRepository.searchconSicksList(value,pag,pagNumber),
successBlock = {
it.result?.let{ result ->
var disease= arrayListOf<DiseaseBean>()
for (index in 0 until result.size){
var bean= DiseaseBean(result[index].sicksName)
bean.id=result[index].id
disease.add(bean)
}
mDiseaseSoure.emit(disease)
if(disease.size==0){
mDiseaseSoureState.emit(false)
}else{
mDiseaseSoureState.emit(true)
}
}
})
}
)
}
/**
* 医院搜索
*/
fun searchConResource(value:String){
launch(
{
handleRequest(
GuidanceRepository.searchConResource(value,pag,pagNumber),
successBlock = {
it.result?.let{ result ->
//专家
var hospital= arrayListOf<HospitalchildBean>()
for (index in 0 until result.size){
var bean= HospitalchildBean()
bean.id=result[index].id
bean.img=result[index].img
bean.tag=result[index].level
bean.name=result[index].resourceName
bean.department=result[index].keyDepartments
bean.address=result[index].address
bean.lon=result[index].longitude
bean.lat=result[index].latitude
hospital.add(bean)
}
mHospitalSoure.emit(hospital)
}
})
}
)
}
/**
* 科室搜索
*/
fun searchConDepartment(value:String){
launch(
{
handleRequest(
GuidanceRepository.searchConDepartment(value,pag,pagNumber),
successBlock = {
it.result?.let{ result ->
//科室
var department= arrayListOf<DepartmentchildBean>()
for (index in 0 until result.size){
var bean= DepartmentchildBean()
bean.departmentId=result[index].id
bean.departmentImg=result[index].image
bean.doctorNum=result[index].doctorNum
bean.departmentName=result[index].departmentName
bean.hint=result[index].mark
department.add(bean)
}
mDepartmentSoure.emit(department)
if(department.size==0){
mDepartmentSoureState.emit(false)
}else{
mDepartmentSoureState.emit(true)
}
}
})
}
)
}
}
@@ -1,57 +0,0 @@
package com.xjjk.healthyclients.ui.viewmodel
import com.xjjk.healthyclients.base.viewmodel.BaseViewModel
import com.xjjk.healthyclients.bean.guidance.DoctorChildBean
import com.xjjk.healthyclients.data.repository.GuidanceRepository
import com.xjjk.healthyclients.superfuntion.handleRequest
import com.xjjk.healthyclients.superfuntion.launch
import kotlinx.coroutines.flow.MutableStateFlow
class DoctorsGuidanceViewModel: BaseViewModel() {
var mDoctorSoure=MutableStateFlow(arrayListOf<DoctorChildBean>()) //疾病
override fun init() {
}
fun selectDictListBySickAndDepartment(officeIds:ArrayList<String>,sicksIds:ArrayList<String>) {
launch(
{
handleRequest(
GuidanceRepository.selectDictListBySickAndDepartment(officeIds,sicksIds),
successBlock = {
it.result?.let{result ->
//疾病
var doctorList= arrayListOf<DoctorChildBean>()
for (index in 0 until result.size){
var doctorBean= DoctorChildBean()
doctorBean.id=result[index].id
doctorBean.icon=result[index].photo
doctorBean.name=result[index].doctorName
doctorBean.title="${result[index].doctorTitle} ${result[index].departmentName.orEmpty()}"
doctorBean.history="${result[index].type}"
doctorBean.tag="${result[index].hospitalLevel}"
doctorBean.hospitalName=result[index].resourceName
doctorBean.tfShowFire=result[index].tfShowFire
doctorBean.doctorStatus=result[index].doctorStatus
doctorBean.audioStatus=result[index].audioStatus
doctorBean.hint="擅长: ${result[index].goodAt}"
doctorBean.evaluate="${result[index].overallMerit}"
var Rate=result[index].responseRate
if (Rate==null) {
Rate="0.0"
}
doctorBean.reply="${Rate.toDouble()}%"
doctorBean.guidanceNumber="${result[index].messageNum}"
doctorList.add(doctorBean)
}
mDoctorSoure.emit(doctorList)
}
})
}
, finallyBlock = {
println("请求结束了")
})
}
}
@@ -1,263 +0,0 @@
package com.xjjk.healthyclients.ui.viewmodel
import com.xjjk.healthyclients.base.viewmodel.BaseViewModel
import com.xjjk.healthyclients.bean.guidance.DepartListBean
import com.xjjk.healthyclients.bean.guidance.DoctorChildBean
import com.xjjk.healthyclients.bean.guidance.FilterSearchBean
import com.xjjk.healthyclients.bean.guidance.SickListBean
import com.xjjk.healthyclients.bean.guidance.selectDictListByNHDSRequestBean
import com.xjjk.healthyclients.data.repository.GuidanceRepository
import com.xjjk.healthyclients.superfuntion.handleRequest
import com.xjjk.healthyclients.superfuntion.launch
import kotlinx.coroutines.flow.MutableStateFlow
class FilterSearchDoctorViewModel: BaseViewModel() {
var mHospitalSoure=MutableStateFlow(ArrayList<FilterSearchBean>()) //医院列表
var mDepartmentSoure=MutableStateFlow(arrayListOf<FilterSearchBean>()) //科室列表
var mDiseaseSoure=MutableStateFlow(arrayListOf<FilterSearchBean>()) //疾病
var mDoctorSoure=MutableStateFlow(arrayListOf<DoctorChildBean>()) //疾病
//科室
var mLeftSoure = MutableStateFlow(ArrayList<DepartListBean>()) //科室和疾病左侧列表
var mRightSoure = MutableStateFlow(arrayListOf<DepartListBean>()) //科室右侧列表
//疾病
var mLeftSickSoure = MutableStateFlow(ArrayList<DepartListBean>()) //疾病左侧列表
var mRightSickSoure = MutableStateFlow(arrayListOf<SickListBean>())//疾病右侧列表
var mCloseDialog = MutableStateFlow(false)//主动关闭dialog
var titleText = MutableStateFlow("")
override fun init() {
selectHospitalList()
}
fun selectHospitalList() {
launch(showDialog=false,
{
handleRequest(
GuidanceRepository.selectHospitalList(),
successBlock = {
it.result?.let{ result ->
// //疾病
// var sickList= arrayListOf<FilterSearchBean>()
// for (index in 0 until result.sickList.size){
// var bean=FilterSearchBean()
// bean.type=2
// bean.sickId=result.sickList[index].id
// bean.sicksName=result.sickList[index].sicksName
// bean.sickDepartmentId=result.sickList[index].departmentId
// sickList.add(bean)
// }
// mDiseaseSoure.emit(sickList)
//医院
var hospitalList= arrayListOf<FilterSearchBean>()
var bean=FilterSearchBean()
bean.type=0
bean.hospitalId=""
bean.hospitalName="全部医院"
hospitalList.add(bean)
for (index in 0 until result.hostitalList.size){
var bean=FilterSearchBean()
bean.type=0
bean.hospitalId=result.hostitalList[index].id
bean.hospitalName=result.hostitalList[index].resourceName
hospitalList.add(bean)
}
mHospitalSoure.emit(hospitalList)
// //科室
// var departList= arrayListOf<FilterSearchBean>()
// for (index in 0 until result.departList.size){
// var bean=FilterSearchBean()
// bean.type=1
// bean.departmentid=result.departList[index].id
// bean.departmentName=result.departList[index].departmentName
// departList.add(bean)
// }
// mDepartmentSoure.emit(departList)
}
})
}
)
}
fun selectDictListByNHDS(bean: selectDictListByNHDSRequestBean) {
launch(
{
handleRequest(
GuidanceRepository.selectDictListByNHDS(bean),
successBlock = {
it.result?.let{ result ->
//疾病
var doctorList= arrayListOf<DoctorChildBean>()
for (index in 0 until result.size){
var doctorBean= DoctorChildBean()
doctorBean.id=result[index].id
doctorBean.icon=result[index].photo
doctorBean.name=result[index].doctorName
doctorBean.title="${result[index].doctorTitle} ${result[index].departmentName.orEmpty()}"
doctorBean.history="${result[index].type}"
doctorBean.tag="${result[index].hospitalLevel}"
doctorBean.hospitalName=result[index].resourceName
doctorBean.tfShowFire=result[index].tfShowFire
doctorBean.doctorStatus=result[index].doctorStatus
doctorBean.audioStatus=result[index].audioStatus
doctorBean.hint="擅长: ${result[index].goodAt}"
doctorBean.evaluate="${result[index].overallMerit}"
var Rate=result[index].responseRate
if (Rate==null) {
Rate="0.0"
}
doctorBean.reply="${Rate.toDouble()}%"
doctorBean.guidanceNumber="${result[index].messageNum}"
doctorList.add(doctorBean)
}
mDoctorSoure.emit(doctorList)
}
})
}
, finallyBlock = {
println("请求结束了")
mCloseDialog.emit(true)
})
}
/**
* 科室一级科室
*/
fun selectDepartListByHospitalId(hospitalId: String,departmentId: String) {
launch(
{
handleRequest(
GuidanceRepository.selectDepartListByHospitalIdVersionTwo(hospitalId,departmentId),
successBlock = {
it.result?.let { result ->
if (departmentId=="0") {
var list = arrayListOf<DepartListBean>()
var bean = DepartListBean()
bean.id = "1"
bean.departmentName = "全部科室"
bean.secondDepartmentNum = result.list.size
list.add(bean)
list.addAll(result.list)
mLeftSoure.emit(list)
}else {
var list = arrayListOf<DepartListBean>()
var bean = DepartListBean()
bean.id = departmentId
// bean.departmentName = "全部医生(${result.doctorNum})"
bean.departmentName = "全部医生"
list.add(bean)
list.addAll(result.list)
mRightSoure.emit(list)
}
}
})
}
)
}
/**
* 二级科室
*/
fun selectDepartList(value: String) {
launch(
{
handleRequest(
GuidanceRepository.selectDepartListNew(value),
successBlock = {
it.result?.let { result ->
if (value == "") {
var list = arrayListOf<DepartListBean>()
var bean = DepartListBean()
bean.id = " "
bean.departmentName = "全部科室"
bean.secondDepartmentNum = 0
list.add(bean)
list.addAll(result.list)
mLeftSoure.emit(list)
} else {
var list = arrayListOf<DepartListBean>()
var bean = DepartListBean()
bean.id = value
// bean.departmentName = "全部医生(${result.doctorNum})"
bean.departmentName = "全部医生"
list.add(bean)
list.addAll(result.list)
mRightSoure.emit(list)
}
}
})
}
)
}
fun selectDepartListSick(value: String){
launch(
{
handleRequest(
GuidanceRepository.selectDepartListSick(value),
successBlock = {
it.result?.let { result ->
if (value == "0") {
var list2 = arrayListOf<DepartListBean>()
var bean2 = DepartListBean()
bean2.id = "0"
bean2.departmentName = "全部疾病"
bean2.secondDepartmentNum = 0
list2.add(bean2)
list2.addAll(result)
mLeftSickSoure.emit(list2)
} else {
var list = arrayListOf<DepartListBean>()
var bean = DepartListBean()
bean.id = value
bean.departmentName = "全部医生"
list.add(bean)
var doctor=0
for (index in 0 until result.size){
doctor += result[index].sickNum
var bean = DepartListBean()
bean.id=result[index].id
bean.departmentName=result[index].departmentName+"(${result[index].sickNum})"
list.add(bean)
}
if(list.size>0){
list[0].departmentName="全部(${doctor})"
}
// list.addAll(result)
mRightSoure.emit(list)
}
}
})
}
)
}
/**
* 二级疾病
*/
fun selectSickListByDepartmentId(value: String) {
launch(
{
handleRequest(
GuidanceRepository.selectSickListByDepartmentId(value),
successBlock = {
it.result?.let { result ->
var list = arrayListOf<SickListBean>()
if (value=="0"){
var sick = SickListBean()
sick.id = value
sick.sicksName = "全部(${result.size})"
list.add(sick)
}
list.addAll(result)
mRightSickSoure.emit(list)
}
})
}
)
}
}
@@ -1,269 +0,0 @@
package com.xjjk.healthyclients.ui.viewmodel
import com.sw.healthyclients.bean.guidance.DiseaseBean
import com.sw.healthyclients.utils.BigDecimalUtils
import com.xjjk.healthyclients.base.viewmodel.BaseViewModel
import com.xjjk.healthyclients.bean.guidance.DepartmentchildBean
import com.xjjk.healthyclients.bean.guidance.DoctorChildBean
import com.xjjk.healthyclients.bean.guidance.HospitalchildBean
import com.xjjk.healthyclients.data.repository.GuidanceRepository
import com.xjjk.healthyclients.superfuntion.handleRequest
import com.xjjk.healthyclients.superfuntion.launch
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.MutableStateFlow
import java.math.BigDecimal
class SeekDoctorSearchActivityViewModel: BaseViewModel() {
var pag=1
var pagNumber=100
var mHospitalSoure=MutableStateFlow(ArrayList<HospitalchildBean>()) //医院列表
var mHospitalSoureState = MutableSharedFlow<Boolean>()
var mAllState = MutableSharedFlow<Boolean>()
var mDepartmentSoure=MutableStateFlow(arrayListOf<DepartmentchildBean>()) //科室列表
var mDepartmentSoureState = MutableSharedFlow<Boolean>()
var mDiseaseSoure=MutableStateFlow(arrayListOf<DiseaseBean>()) //疾病
var mDiseaseSoureState = MutableSharedFlow<Boolean>()
var mDoctorSoure=MutableStateFlow(arrayListOf<DoctorChildBean>()) //专家
var mDoctorSoureState = MutableSharedFlow<Boolean>()
override fun init() {
}
/**
* 综合搜索
*/
fun searchComprehensive(value:String) {
launch(
{
handleRequest(
GuidanceRepository.searchComprehensive(value),
successBlock = {
it.result?.let{ result ->
//医院
var hospital= arrayListOf<HospitalchildBean>()
for (index in 0 until result.hospitalList.size){
var bean=HospitalchildBean()
bean.id=result.hospitalList[index].id
bean.img=result.hospitalList[index].img
bean.tag=result.hospitalList[index].level
bean.name=result.hospitalList[index].resourceName
bean.department=result.hospitalList[index].keyDepartments
bean.address=result.hospitalList[index].address
bean.lon=result.hospitalList[index].longitude
bean.lat=result.hospitalList[index].latitude
hospital.add(bean)
}
if(hospital.size==0){
mHospitalSoureState.emit(false)
}else{
mHospitalSoureState.emit(true)
}
mHospitalSoure.emit(hospital)
//科室
var department= arrayListOf<DepartmentchildBean>()
for (index in 0 until result.departmentList.size){
var bean=DepartmentchildBean()
bean.departmentId=result.departmentList[index].id
bean.departmentImg=result.departmentList[index].image
bean.departmentName=result.departmentList[index].departmentName
bean.doctorNum=result.departmentList[index].doctorNum
bean.hint=result.departmentList[index].mark
department.add(bean)
}
mDepartmentSoure.emit(department)
if(department.size==0){
mDepartmentSoureState.emit(false)
}else{
mDepartmentSoureState.emit(true)
}
//疾病
var disease= arrayListOf<DiseaseBean>()
for (index in 0 until result.sicksList.size){
var bean= DiseaseBean(result.sicksList[index].sicksName)
bean.id=result.sicksList[index].id
disease.add(bean)
}
mDiseaseSoure.emit(disease)
if(disease.size==0){
mDiseaseSoureState.emit(false)
}else{
mDiseaseSoureState.emit(true)
}
//专家
var doctor= arrayListOf<DoctorChildBean>()
for (index in 0 until result.doctorList.size){
var doctorBean=DoctorChildBean()
doctorBean.id=result.doctorList[index].id
doctorBean.icon=result.doctorList[index].photo
doctorBean.name=result.doctorList[index].doctorName
doctorBean.title="${result.doctorList[index].doctorTitle} ${result.doctorList[index].departmentName}"
doctorBean.history="${result.doctorList[index].type}"
doctorBean.tag="${result.doctorList[index].hospitalLevel}"
doctorBean.tfShowFire=result.doctorList[index].tfShowFire
doctorBean.hospitalName=result.doctorList[index].resourceName
doctorBean.hint="擅长: ${result.doctorList[index].goodAt}"
doctorBean.evaluate="${result.doctorList[index].overallMerit}"
doctorBean.doctorStatus="${result.doctorList[index].doctorStatus}"
doctorBean.audioStatus="${result.doctorList[index].audioStatus}"
var Rate=result.doctorList[index].responseRate.toDouble()
var tate2= BigDecimalUtils.multiply(Rate,100)
doctorBean.reply="${String.format("%.2f",tate2)}%"
doctorBean.guidanceNumber="${result.doctorList[index].messageNum}"
doctor.add(doctorBean)
}
mDoctorSoure.emit(doctor)
if(doctor.size==0){
mDoctorSoureState.emit(false)
}else{
mDoctorSoureState.emit(true)
}
if(hospital.size==0&&department.size==0&&disease.size==0&&doctor.size==0){
mAllState.emit(false)
}else{
mAllState.emit(true)
}
}
})
}
)
}
/**
* 专家搜索
*/
fun searchConDoctor(value:String){
launch(
{
handleRequest(
GuidanceRepository.searchConDoctor(value,pag,pagNumber),
successBlock = {
it.result?.let{ result ->
//专家
var doctor= arrayListOf<DoctorChildBean>()
for (index in 0 until result.size){
var doctorBean= DoctorChildBean()
doctorBean.icon=result[index].photo
doctorBean.name=result[index].doctorName
doctorBean.title="${result[index].doctorTitle} ${result[index].departmentName}"
doctorBean.history="${result[index].type}"
doctorBean.tag="${result[index].hospitalLevel}"
doctorBean.hospitalName=result[index].resourceName
doctorBean.id=result[index].id
doctorBean.doctorStatus=result[index].doctorStatus
doctorBean.audioStatus=result[index].audioStatus
doctorBean.tfShowFire=result[index].tfShowFire
doctorBean.hint="擅长: ${result[index].goodAt}"
doctorBean.evaluate="${result[index].overallMerit}"
var Rate=result[index].responseRate.toDouble()
doctorBean.reply="${Rate*100}%"
doctorBean.guidanceNumber="${result[index].messageNum}"
doctor.add(doctorBean)
}
mDoctorSoure.emit(doctor)
if(doctor.size==0){
mDoctorSoureState.emit(false)
}else{
mDoctorSoureState.emit(true)
}
}
})
}
)
}
/**
* 专家搜索
*/
fun searchConResource(value:String){
launch(
{
handleRequest(
GuidanceRepository.searchConResource(value,pag,pagNumber),
successBlock = {
it.result?.let{ result ->
//专家
var hospital= arrayListOf<HospitalchildBean>()
for (index in 0 until result.size){
var bean= HospitalchildBean()
bean.id=result[index].id
bean.img=result[index].img
bean.tag=result[index].level
bean.name=result[index].resourceName
bean.department=result[index].keyDepartments
bean.address=result[index].address
bean.lon=result[index].longitude
bean.lat=result[index].latitude
hospital.add(bean)
}
mHospitalSoure.emit(hospital)
if(hospital.size==0){
mHospitalSoureState.emit(false)
}else{
mHospitalSoureState.emit(true)
}
}
})
}
)
}
/**
* 专家搜索
*/
fun searchconSicksList(value:String){
launch(
{
handleRequest(
GuidanceRepository.searchconSicksList(value,pag,pagNumber),
successBlock = {
it.result?.let{ result ->
var disease= arrayListOf<DiseaseBean>()
for (index in 0 until result.size){
var bean= DiseaseBean(result[index].sicksName)
bean.id=result[index].id
disease.add(bean)
}
mDiseaseSoure.emit(disease)
if(disease.size==0){
mDiseaseSoureState.emit(false)
}else{
mDiseaseSoureState.emit(true)
}
}
})
}
)
}
/**
* 科室搜索
*/
fun searchConDepartment(value:String){
launch(
{
handleRequest(
GuidanceRepository.searchConDepartment(value,pag,pagNumber),
successBlock = {
it.result?.let{ result ->
//科室
var department= arrayListOf<DepartmentchildBean>()
for (index in 0 until result.size){
var bean= DepartmentchildBean()
bean.departmentId=result[index].id
bean.departmentImg=result[index].image
bean.departmentName=result[index].departmentName
bean.doctorNum=result[index].doctorNum
bean.hint=result[index].mark
department.add(bean)
}
mDepartmentSoure.emit(department)
if(department.size==0){
mDepartmentSoureState.emit(false)
}else{
mDepartmentSoureState.emit(true)
}
}
})
}
)
}
}
@@ -1,181 +0,0 @@
package com.xjjk.healthyclients.view
import android.content.Context
import android.graphics.Color
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import android.widget.RelativeLayout
import android.widget.TextView
import androidx.databinding.DataBindingUtil
import com.xjjk.healthyclients.R
import com.xjjk.healthyclients.bean.CvdRiskInfoBean
import com.xjjk.healthyclients.bean.MapDataBean
import com.xjjk.healthyclients.databinding.CustomCvdDiseaseWarningViewBinding
import com.xjjk.healthyclients.retrofit.UrlConfig
import com.xjjk.healthyclients.superfuntion.orEmptyDefault
import com.xjjk.healthyclients.superfuntion.startWebActivity
import com.xjjk.healthyclients.utils.UrlH5RouteUtils
class CustomCvdMainDiseaseWarningView : RelativeLayout {
var mContext:Context?=null
lateinit var mBinding: CustomCvdDiseaseWarningViewBinding
var mList = arrayListOf<MapDataBean>()
var mType=1
var mBean: CvdRiskInfoBean?=CvdRiskInfoBean()
constructor(context: Context?,attrs : AttributeSet?): super(context, attrs,0){
mContext=context
if(isInEditMode){
LayoutInflater.from(context).inflate(R.layout.custom_cvd_disease_warning_view, this, true)
}else{
mBinding = DataBindingUtil.inflate(
LayoutInflater.from(context),
R.layout.custom_cvd_disease_warning_view, this,true)
}
event()
noAnswer()
}
fun initView(type:Int){
mType=type
if(mType==1){
mBinding.viewChildTitle1.text="突发心梗风险"
mBinding.viewChildTitle2.text="突发猝死风险"
}else{
mBinding.viewChildTitle1.text="突发脑梗风险"
mBinding.viewChildTitle2.text="突发脑出血风险"
}
}
fun answerState(boolean: Boolean){
//初始化调用
if (boolean) {
noAnswer(true)
}else{
noAnswer()
}
// mBinding.viewNoAnswer.visibility=View.VISIBLE
// mBinding.viewAnswer.visibility=View.GONE
//调用接口检查是否填写问卷
}
fun noAnswer(answer : Boolean=false){
if (answer) {
mBinding.viewNoAnswer.visibility=View.GONE
mBinding.viewEditAnswer.visibility=View.VISIBLE
mBinding.viewAnswer.visibility=View.VISIBLE
}else{
mBinding.viewNoAnswer.visibility=View.VISIBLE
mBinding.viewEditAnswer.visibility=View.INVISIBLE
mBinding.viewAnswer.visibility=View.GONE
}
}
fun setRiskInfo(bean: CvdRiskInfoBean?){
//调用接口查询疾病信息
if(bean!=null){
copyData(bean)
//有数据进行填充
try {
if(mType==1){
//心梗
mBinding.viewTvLevel.setText(bean.riskMiValueName.orEmptyDefault())
mBinding.viewTvLevel.setTextColor(Color.parseColor(bean.riskMiValueColor))
mBinding.viewTvTime.setText(bean.warningData)
//猝死
mBinding.viewTvLevel2.setText(bean.riskSuddenDeathValueName.orEmptyDefault())
mBinding.viewTvLevel2.setTextColor(Color.parseColor(bean.riskSuddenDeathValueColor))
mBinding.viewTvTime2.setText(bean.warningData)
}else{
//脑梗
mBinding.viewTvLevel.setText(bean.riskCiValueName.orEmptyDefault())
mBinding.viewTvLevel.setTextColor(Color.parseColor(bean.riskCiValueColor))
mBinding.viewTvTime.setText(bean.warningData)
//脑出血
mBinding.viewTvLevel2.setText(bean.riskChValueName.orEmptyDefault())
mBinding.viewTvLevel2.setTextColor(Color.parseColor(bean.riskChValueColor))
mBinding.viewTvTime2.setText(bean.warningData)
}
} catch (e: Exception) {
}
}else{
mBinding.viewEmptyData1.visibility=View.VISIBLE
mBinding.viewEmptyData2.visibility=View.VISIBLE
}
}
private fun copyData(bean: CvdRiskInfoBean?) {
mBean?.id=bean?.id
mBean?.riskMiValueName=bean?.riskMiValueName
mBean?.riskMiValueColor=bean?.riskMiValueColor
mBean?.riskCiValueName=bean?.riskCiValueName
mBean?.riskCiValueColor=bean?.riskCiValueColor
mBean?.riskSuddenDeathValueName=bean?.riskSuddenDeathValueName
mBean?.riskSuddenDeathValueColor=bean?.riskSuddenDeathValueColor
mBean?.riskChValueName=bean?.riskChValueName
mBean?.riskChValueColor=bean?.riskChValueColor
}
fun event(){
mBinding.startAnswer.setOnClickListener {
//填写问卷
var map = mutableMapOf<String, Any?>()
map["heartType"] = mType
mContext?.startWebActivity(UrlConfig.getKnowledgeDetailUrl(UrlH5RouteUtils.HEART_ATTACK,map))
}
mBinding.viewEditAnswer.setOnClickListener {
//修改问卷
var map = mutableMapOf<String, Any?>()
map["heartType"] = mType
mContext?.startWebActivity(UrlConfig.getKnowledgeDetailUrl(UrlH5RouteUtils.HEART_ATTACK,map))
}
mBinding.viewRlOne.setOnClickListener {
var map = mutableMapOf<String, Any?>()
map["hriskId"] = mBean?.id
if (mType==1) {
map["hriskName"] = "突发心梗风险"
map["hriskType"] = "1"
map["hriskLevel"] = mBean?.riskMiValueName
map["hriskColor"] = mBean?.riskMiValueColor
}else{
map["hriskName"] = "突发脑梗风险"
map["hriskType"] = "3"
map["hriskLevel"] = mBean?.riskCiValueName
map["hriskColor"] = mBean?.riskCiValueColor
}
mContext?.startWebActivity(UrlConfig.getKnowledgeDetailUrl(UrlH5RouteUtils.HEART_FACTORS,map))
}
mBinding.viewRlTwo.setOnClickListener {
var map = mutableMapOf<String, Any?>()
map["hriskId"] = mBean?.id
if (mType==1) {
map["hriskName"] = "突发猝死风险"
map["hriskType"] = "2"
map["hriskLevel"] = mBean?.riskSuddenDeathValueName
map["hriskColor"] = mBean?.riskSuddenDeathValueColor
}else{
map["hriskName"] = "突发脑出血风险"
map["hriskType"] = "4"
map["hriskLevel"] = mBean?.riskChValueName
map["hriskColor"] = mBean?.riskChValueColor
}
mContext?.startWebActivity(UrlConfig.getKnowledgeDetailUrl(UrlH5RouteUtils.HEART_FACTORS,map))
}
}
fun setlevel(view :View){
if (view is TextView) {
}
}
}
@@ -1,97 +0,0 @@
package com.xjjk.healthyclients.view
import android.content.Context
import android.text.Editable
import android.text.TextUtils
import android.text.TextWatcher
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import android.view.inputmethod.EditorInfo
import android.widget.EditText
import android.widget.RelativeLayout
import androidx.databinding.DataBindingUtil
import com.sw.healthyclients.utils.KeyboardUtil.hideSoftInput
import com.xjjk.healthyclients.R
import com.xjjk.healthyclients.databinding.CustomSearchViewBinding
class CustomSearchView : RelativeLayout {
var mContext:Context?=null
lateinit var mBinding: CustomSearchViewBinding
constructor(context: Context?,attrs : AttributeSet?): super(context, attrs,0){
mContext=context
if(isInEditMode){
LayoutInflater.from(context).inflate(R.layout.custom_search_view, this, true)
}else{
mBinding = DataBindingUtil.inflate(
LayoutInflater.from(context),
R.layout.custom_search_view, this,true)
}
}
fun initView(hint:String){
mBinding.customSearchEt.hint="$hint"
}
fun initEtContext(value:String?){
mBinding.customSearchEt.setText(value)
}
fun setPerformClick(){
mBinding.customSearchTv.performClick()
}
fun setOnCustomClickListener(method: (searchContent: String) -> Unit): String {
mBinding.customSearchTv.setOnClickListener {
hideSoftInput(context, mBinding.customSearchEt)
var value = mBinding.customSearchEt.text.trim().toString()
method(value)
}
//输入内容为空时回调
mBinding.customSearchEt.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(
s: CharSequence?,
start: Int,
count: Int,
after: Int
) {
}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
if (TextUtils.isEmpty(s)) {
// method("")
mBinding.customSearchTv.performClick()
}
}
override fun afterTextChanged(s: Editable?) {
}
})
mBinding.customSearchEt.setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
//点击搜索的时候隐藏软键盘
hideSoftInput(context, v as EditText)
var value = mBinding.customSearchEt.text.trim().toString()
method(value)
}
false
}
return mBinding.customSearchEt.text.trim().toString()
}
fun setFocusListener(method: (hasFocus:Boolean) -> Unit){
mBinding.customSearchEt.setOnFocusChangeListener(object: OnFocusChangeListener{
override fun onFocusChange(v: View?, hasFocus: Boolean) {
method(hasFocus)
}
})
}
fun getInoputText():String{
return mBinding.customSearchEt.text.toString().trim()
}
}
@@ -1,41 +0,0 @@
package com.xjjk.healthyclients.view
import android.content.Context
import android.content.res.ColorStateList
import android.graphics.Color
import android.graphics.drawable.GradientDrawable
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import android.widget.RelativeLayout
import androidx.databinding.DataBindingUtil
import com.xjjk.healthyclients.R
import com.xjjk.healthyclients.databinding.CustomGuidanceImageTextBinding
class CustomguidanceImageText : RelativeLayout {
var mContext:Context?=null
var mBinding: CustomGuidanceImageTextBinding
@JvmOverloads
constructor(context: Context?,attrs : AttributeSet? = null,
defStyleAttr: Int = 0): super(context, attrs,defStyleAttr){
mContext=context
mBinding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.custom_guidance_image_text,this,true)
}
fun setStyleInfo(name:String,resource:Int,hint:String,color:Int){
mBinding.apply {
customGuidanceTypeName.text=name
customGuidanceTypeIcon.setImageResource(resource)
customGuidanceTypeHint.text=hint
customGuidanceTypeRootBg.backgroundTintList = ColorStateList.valueOf(color)
}
}
fun setRemind(){
mBinding?.apply {
customGuidanceTypeRemind.visibility=View.VISIBLE
}
}
}
@@ -1,49 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="viewModel"
type="com.xjjk.healthyclients.ui.viewmodel.DepartmentSearchViewModel" />
</data>
<LinearLayout
android:orientation="vertical"
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/lay_title_bar"
android:id="@+id/toolbar_lay"
app:title="@{viewModel.titleText}"
app:darkStyle="@{false}"/>
<com.xjjk.healthyclients.view.CustomSearchView
android:id="@+id/seek_doctor_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:layout_marginLeft="@dimen/dp_25"
android:layout_marginRight="@dimen/dp_25"
android:id="@+id/department_search_rv"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<TextView
android:id="@+id/tv_empty"
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:drawablePadding="36dp"
android:gravity="center"
android:text="@string/list_is_empty"
android:textColor="@color/text_black_66"
android:textSize="14sp"
app:drawableTopCompat="@drawable/image_default_empty" />
</RelativeLayout>
</LinearLayout>
</layout>
@@ -1,288 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
</data>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/toolbar_lay"
layout="@layout/lay_title_bar"
app:darkStyle="@{true}"
app:title="@{@string/title_Hospital_homepage}" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/hospital_info_root"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_136">
<RelativeLayout
android:background="#21BEBD"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_122">
<com.xjjk.healthyclients.view.CustomImageView
android:id="@+id/hospital_detail_icon"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_60"
android:scaleType="fitXY"
android:src="@drawable/ic_default"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginLeft="@dimen/dp_16"
/>
<RelativeLayout
android:id="@+id/hospital_rl_care_root"
android:layout_marginTop="@dimen/dp_30"
android:layout_marginRight="@dimen/dp_15"
android:layout_alignParentRight="true"
android:background="@drawable/bg_white_background_shap_radius12"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_26">
<ImageView
android:id="@+id/hospital_iv_care"
android:layout_width="@dimen/dp_12"
android:layout_height="@dimen/dp_11"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_10"
android:src="@drawable/ic_care"/>
<TextView
android:layout_toRightOf="@+id/hospital_iv_care"
android:id="@+id/hospital_tv_state"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="关注"
android:layout_marginLeft="@dimen/dp_4"
android:textColor="@color/text_green_BD"
android:textSize="@dimen/txt12"
android:layout_centerInParent="true"
/>
</RelativeLayout>
<TextView
android:layout_toRightOf="@+id/hospital_detail_icon"
android:id="@+id/hospital_detail_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_20"
android:textSize="@dimen/txt18"
android:textColor="@color/white"
android:text="北京大学第一医院"
android:textStyle="bold"
/>
<TextView
android:layout_toRightOf="@+id/hospital_detail_icon"
android:layout_below="@+id/hospital_detail_name"
android:id="@+id/hospital_detail_tag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginLeft="@dimen/dp_20"
android:paddingBottom="@dimen/dp_4"
android:paddingRight="@dimen/dp_8"
android:paddingLeft="@dimen/dp_8"
android:paddingTop="@dimen/dp_4"
android:textSize="@dimen/txt11"
android:textColor="@color/text_green_BD"
android:text="三甲"
android:background="@drawable/bg_white_background_shap"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/hospital_detail_address_root"
android:layout_marginTop="@dimen/dp_10"
android:background="@drawable/bg_card"
android:layout_marginLeft="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_12"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:minHeight="@dimen/dp_44"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/hospital_detail_address_icon"
android:layout_width="@dimen/dp_13"
android:layout_height="@dimen/dp_16"
android:src="@drawable/ic_local"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_5"
/>
<TextView
android:layout_toRightOf="@+id/hospital_detail_address_icon"
android:layout_alignBaseline="@+id/hospital_detail_address_icon"
android:layout_toLeftOf="@+id/hospital_detail_navigation"
android:id="@+id/hospital_detail_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginBottom="@dimen/dp_5"
android:textSize="@dimen/txt13"
android:textColor="@color/text_black_33"
android:layout_marginLeft="@dimen/dp_5"
/>
<TextView
android:id="@+id/hospital_detail_navigation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_5"
android:text="导航"
android:textColor="#3390FF"
android:textSize="@dimen/txt12"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_16"
/>
</RelativeLayout>
</RelativeLayout>
<androidx.core.widget.NestedScrollView
android:layout_below="@+id/hospital_info_root"
android:layout_marginTop="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_marginRight="@dimen/dp_13"
android:layout_marginLeft="@dimen/dp_12"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:background="@drawable/bg_card"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_143">
<TextView
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_black_33"
android:textSize="@dimen/txt16"
android:text="医院简介"
android:textStyle="bold"
/>
<TextView
android:id="@+id/hospital_detail_hint"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_14"
android:layout_marginRight="@dimen/dp_16"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="@dimen/txt13"
android:textColor="@color/text_black_33"
android:maxLines="3"
android:text=""
/>
</LinearLayout>
<RelativeLayout
android:id="@+id/hospital_detail_depart_root"
android:layout_marginTop="@dimen/dp_10"
android:background="@drawable/bg_card"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/hospital_detail_depart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="科室医生"
android:textSize="@dimen/txt16"
android:textColor="@color/text_black_33"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_20"
/>
<TextView
android:id="@+id/hospital_detail_depart_number"
android:layout_toRightOf="@+id/hospital_detail_depart"
android:layout_alignBaseline="@+id/hospital_detail_depart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/txt10"
android:textColor="@color/text_black_66"
android:text="(23个科室88位专家)"
/>
<TextView
android:id="@+id/hospital_detail_doctor_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="查看全部>"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/dp_24"
android:layout_marginRight="@dimen/dp_16"
android:textSize="@dimen/txt13"
android:textColor="@color/text_black_99"
/>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/hospital_detail_rv_doctor"
android:layout_below="@+id/hospital_detail_depart"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_15"
android:layout_marginBottom="@dimen/dp_26"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/hospital_detail_rate_root"
android:background="@drawable/bg_card"
android:layout_marginTop="@dimen/dp_10"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/hospital_detail_user_rate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_14"
android:layout_marginTop="@dimen/dp_20"
android:text="用户评价"
android:textSize="@dimen/txt16"
android:textColor="@color/text_black_33"
/>
<TextView
android:id="@+id/hospital_detail_user_rate_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dp_14"
android:layout_marginTop="@dimen/dp_20"
android:layout_alignParentRight="true"
android:text="更多评价>"
android:textSize="@dimen/txt13"
android:textColor="@color/text_black_99"
/>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/hospital_detail_rv_user_rate"
android:layout_below="@+id/hospital_detail_user_rate"
/>
</RelativeLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</RelativeLayout>
</LinearLayout>
</layout>
@@ -1,156 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
</data>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/toolbar_lay"
layout="@layout/lay_title_bar"
app:darkStyle="@{true}"
app:title="@{@string/title_Hospital_homepage}" />
<RelativeLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_136">
<RelativeLayout
android:background="#21BEBD"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_122">
<com.xjjk.healthyclients.view.CustomImageView
android:id="@+id/hospital_detail_icon"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_60"
android:scaleType="fitXY"
android:src="@drawable/ic_default"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginLeft="@dimen/dp_16"
/>
<TextView
android:layout_toRightOf="@+id/hospital_detail_icon"
android:id="@+id/hospital_detail_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_20"
android:textSize="@dimen/txt18"
android:textColor="@color/white"
android:text="北京大学第一医院"
android:textStyle="bold"
/>
<TextView
android:layout_toRightOf="@+id/hospital_detail_icon"
android:layout_below="@+id/hospital_detail_name"
android:id="@+id/hospital_detail_tag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginLeft="@dimen/dp_20"
android:paddingBottom="@dimen/dp_4"
android:paddingRight="@dimen/dp_8"
android:paddingLeft="@dimen/dp_8"
android:paddingTop="@dimen/dp_4"
android:textSize="@dimen/txt11"
android:textColor="@color/text_green_BD"
android:text="三甲"
android:background="@drawable/bg_white_background_shap"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/hospital_detail_address_root"
android:layout_marginTop="@dimen/dp_10"
android:background="@drawable/bg_card"
android:layout_marginLeft="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_12"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:minHeight="@dimen/dp_44"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/hospital_detail_address_icon"
android:layout_width="@dimen/dp_13"
android:layout_height="@dimen/dp_16"
android:src="@drawable/ic_local"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_5"
/>
<TextView
android:layout_toRightOf="@+id/hospital_detail_address_icon"
android:layout_toLeftOf="@+id/hospital_detail_navigation"
android:layout_marginRight="@dimen/dp_5"
android:id="@+id/hospital_detail_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/txt13"
android:textColor="@color/text_black_33"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginLeft="@dimen/dp_5"
android:layout_marginBottom="5dp"
/>
<TextView
android:id="@+id/hospital_detail_navigation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="导航"
android:textColor="#3390FF"
android:textSize="@dimen/txt12"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_16"
/>
</RelativeLayout>
</RelativeLayout>
<LinearLayout
android:layout_below="@+id/hospital_detail_address_root"
android:layout_marginTop="@dimen/dp_10"
android:background="@drawable/bg_card"
android:orientation="vertical"
android:layout_marginLeft="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_12"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginBottom="@dimen/dp_20"
android:text="医院简介"
android:textSize="@dimen/txt16"
android:textColor="@color/text_black_33"
android:textStyle="bold"
/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/hospital_detail_intro"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/text_black_33"
android:textSize="@dimen/txt13"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginRight="@dimen/dp_16"
android:layout_marginBottom="@dimen/dp_30"
/>
</ScrollView>
</LinearLayout>
</LinearLayout>
</layout>
@@ -1,276 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<RelativeLayout
android:background="@drawable/bg_food_white_background"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/view_tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="疾病预警"
android:textSize="@dimen/txt16"
android:layout_marginLeft="17dp"
android:layout_marginTop="24dp"
android:textColor="@color/text_black_33"
android:textStyle="bold"
/>
<TextView
android:id="@+id/view_edit_answer"
android:layout_alignBaseline="@+id/view_tv_title"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
android:text="修改问卷"
android:textColor="#21BEBD"
android:textSize="12dp"
android:drawablePadding="6dp"
android:drawableLeft="@drawable/ic_cvd_edit"
/>
<LinearLayout
android:id="@+id/view_no_answer"
android:layout_below="@+id/view_tv_title"
android:orientation="vertical"
android:visibility="visible"
android:layout_marginBottom="40dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="match_parent"
android:layout_height="170dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:src="@drawable/ic_cvd_default"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="请先完成基本信息问卷"
android:layout_gravity="center_horizontal"
android:textSize="14dp"
android:textColor="@color/text_black_99"
/>
<com.allen.library.shape.ShapeTextView
android:id="@+id/start_answer"
android:layout_width="120dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginTop="24dp"
android:gravity="center"
android:text="填写"
android:textColor="@color/colorWhite"
android:textSize="14sp"
app:shapeCornersRadius="18dp"
app:shapeSolidColor="@color/theme_color" />
</LinearLayout>
<LinearLayout
android:id="@+id/view_answer"
android:layout_below="@+id/view_tv_title"
android:layout_margin="15dp"
android:visibility="gone"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/view_rl_one"
android:background="@drawable/bg_frame_line2"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/view_child_title1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="突发心梗风险"
android:textSize="@dimen/txt15"
android:textColor="@color/text_black_33"
android:textStyle="bold"
android:layout_marginLeft="15dp"
android:layout_marginTop="18dp"
/>
<TextView
android:id="@+id/view_tv_level"
android:layout_alignBaseline="@+id/view_child_title1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15dp"
android:textStyle="bold"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
tools:text="--"
/>
<TextView
android:id="@+id/view_tv_risk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#21BEBD"
android:textSize="13dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="18dp"
android:layout_below="@+id/view_child_title1"
android:text="危险因素"
android:layout_marginBottom="18dp"
/>
<TextView
android:id="@+id/view_tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_black_66"
android:layout_alignParentRight="true"
android:textSize="13dp"
android:layout_alignBaseline="@+id/view_tv_risk"
android:layout_marginRight="15dp"
android:layout_below="@+id/view_child_title1"
android:text="--"
android:layout_marginBottom="18dp"
/>
<RelativeLayout
android:id="@+id/view_empty_data1"
android:layout_below="@+id/view_child_title1"
android:layout_width="match_parent"
android:background="@color/white"
android:layout_margin="5dp"
android:visibility="gone"
android:layout_marginBottom="10dp"
android:layout_height="120dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="120dp"
android:scaleType="fitXY"
android:src="@drawable/ic_cvd_no_data"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="暂未监测到异常数据"
android:textColor="@color/text_black_66"
android:textSize="14sp"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="10dp"
/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/view_rl_two"
android:layout_marginTop="15dp"
android:background="@drawable/bg_frame_line2"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/view_child_title2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="突发猝死风险"
android:textSize="@dimen/txt15"
android:textColor="@color/text_black_33"
android:textStyle="bold"
android:layout_marginLeft="15dp"
android:layout_marginTop="18dp"
/>
<TextView
android:id="@+id/view_tv_level2"
android:layout_alignBaseline="@+id/view_child_title2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15dp"
android:textStyle="bold"
android:layout_alignParentRight="true"
android:layout_marginRight="15dp"
tools:text="--"
/>
<TextView
android:id="@+id/view_tv_risk2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#21BEBD"
android:textSize="13dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="18dp"
android:layout_below="@+id/view_child_title2"
android:text="危险因素"
android:layout_marginBottom="18dp"
/>
<TextView
android:id="@+id/view_tv_time2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_black_66"
android:layout_alignParentRight="true"
android:textSize="13dp"
android:layout_alignBaseline="@+id/view_tv_risk2"
android:layout_marginRight="15dp"
android:layout_below="@+id/view_child_title2"
android:text="--"
android:layout_marginBottom="18dp"
/>
<RelativeLayout
android:id="@+id/view_empty_data2"
android:layout_below="@+id/view_child_title2"
android:layout_width="match_parent"
android:background="@color/white"
android:layout_margin="5dp"
android:visibility="gone"
android:layout_marginBottom="10dp"
android:layout_height="120dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="120dp"
android:scaleType="fitXY"
android:src="@drawable/ic_cvd_no_data"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="暂未监测到异常数据"
android:textColor="@color/text_black_66"
android:textSize="14sp"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="10dp"
/>
</RelativeLayout>
</RelativeLayout>
<LinearLayout
android:background="@drawable/bg_10_grey_background_shap_radius10"
android:layout_marginTop="15dp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_black_33"
android:textSize="@dimen/txt14"
android:textStyle="bold"
android:text="风险等级划分"
android:layout_marginLeft="15dp"
android:layout_marginTop="18dp"
/>
<TextView
android:layout_marginBottom="23dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_black_66"
android:textSize="@dimen/txt12"
android:lineSpacingExtra="3dp"
android:layout_marginTop="15dp"
android:layout_marginLeft="15dp"
android:text="风险值:0-3 低风险 \n风险值:3-6 中风险 \n风险值: >6 高风险"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</layout>
@@ -1,136 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/custom_filter_select_ll_root"
android:background="@color/white"
android:paddingLeft="@dimen/dp_15"
android:paddingRight="@dimen/dp_15"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/custom_filter_select_hospital"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_36"
android:maxEms="4"
android:singleLine="true"
android:ellipsize="end"
android:background="@drawable/bg_frame_line2"
android:text="全部医院"
android:textColor="@color/text_black_33"
android:textSize="@dimen/txt14"
android:gravity="center"
android:layout_marginRight="@dimen/dp_12"
android:drawableRight="@drawable/common_filter_arrow_down"
android:padding="@dimen/dp_10"
/>
<TextView
android:id="@+id/custom_filter_select_department"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_36"
android:background="@drawable/bg_frame_line2"
android:text="全部科室"
android:maxEms="4"
android:singleLine="true"
android:ellipsize="end"
android:textColor="@color/text_black_33"
android:textSize="@dimen/txt14"
android:layout_marginRight="@dimen/dp_12"
android:gravity="center"
android:drawableRight="@drawable/common_filter_arrow_down"
android:padding="@dimen/dp_10"
/>
<TextView
android:id="@+id/custom_filter_select_sick"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_36"
android:background="@drawable/bg_frame_line2"
android:text="全部疾病"
android:maxEms="4"
android:singleLine="true"
android:ellipsize="end"
android:textColor="@color/text_black_33"
android:textSize="@dimen/txt14"
android:gravity="center"
android:drawableRight="@drawable/common_filter_arrow_down"
android:padding="@dimen/dp_10"
/>
</LinearLayout>
<LinearLayout
android:layout_below="@+id/custom_filter_select_ll_root"
android:background="@color/white"
android:paddingTop="@dimen/dp_20"
android:orientation="horizontal"
android:paddingLeft="@dimen/dp_15"
android:paddingRight="@dimen/dp_15"
android:layout_width="match_parent"
android:paddingBottom="@dimen/dp_10"
android:layout_height="wrap_content">
<TextView
android:id="@+id/custom_filter_select_mark"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="好评优先"
android:gravity="center"
android:textSize="@dimen/txt14"
android:textColor="@color/text_black_33"
/>
<TextView
android:id="@+id/custom_filter_select_hot"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="热度优先"
android:gravity="center"
android:textSize="@dimen/txt14"
android:textColor="@color/text_black_33"
/>
<TextView
android:id="@+id/custom_filter_select_reply"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="回复率"
android:gravity="center"
android:textSize="@dimen/txt14"
android:textColor="@color/text_black_33"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/custom_filter_select_rv_root"
android:visibility="gone"
android:orientation="vertical"
android:layout_below="@+id/custom_filter_select_ll_root"
android:background="@color/grey15"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/custom_filter_select_rv"
android:layout_marginBottom="@dimen/dp_400"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<LinearLayout
android:id="@+id/custom_filter_select_depart"
android:orientation="horizontal"
android:background="@color/white"
android:layout_marginBottom="@dimen/dp_400"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/seek_doctor_department_list_left"
android:layout_width="0dp"
android:layout_weight="0.4"
android:layout_height="match_parent"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/seek_doctor_department_list_right"
android:layout_width="0dp"
android:layout_weight="0.6"
android:layout_height="match_parent"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</layout>
@@ -1,57 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_50"
android:background="@color/white">
<LinearLayout
android:id="@+id/custom_ll_search"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_35"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_18"
android:layout_toLeftOf="@+id/custom_search_tv"
android:background="@drawable/bg_search_shap_radius23">
<ImageView
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_15"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dp_17"
android:src="@mipmap/ic_search" />
<EditText
android:id="@+id/custom_search_et"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/dp_12"
android:background="@null"
android:longClickable="false"
android:gravity="center_vertical"
android:hint="@string/search_hint"
android:maxLines="1"
android:imeOptions="actionSearch"
android:singleLine="true"
android:textColor="@color/text_black_66"
android:textColorHint="@color/text_black_99"
android:textSize="@dimen/txt13" />
</LinearLayout>
<TextView
android:id="@+id/custom_search_tv"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_22"
android:gravity="center_vertical"
android:paddingLeft="@dimen/dp_10"
android:text="@string/search_submit"
android:textColor="@color/text_black_99"
android:textSize="@dimen/txt13" />
</RelativeLayout>
</layout>
@@ -4,32 +4,32 @@
android:layout_marginTop="@dimen/dp_15"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.sw.healthyclients.view.CustomEmergencyRelativeLayout
<com.xjjk.healthyclients.view.CustomEmergencyRelativeLayout
android:id="@+id/cerl_dispatch_time"
android:layout_marginTop="@dimen/dp_7"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<com.sw.healthyclients.view.CustomEmergencyRelativeLayout
<com.xjjk.healthyclients.view.CustomEmergencyRelativeLayout
android:id="@+id/cerl_dispatch_state"
android:layout_marginTop="@dimen/dp_7"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<com.sw.healthyclients.view.CustomEmergencyRelativeLayout
<com.xjjk.healthyclients.view.CustomEmergencyRelativeLayout
android:id="@+id/cerl_dispatch_business"
android:layout_marginTop="@dimen/dp_7"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<com.sw.healthyclients.view.CustomEmergencyRelativeLayout
<com.xjjk.healthyclients.view.CustomEmergencyRelativeLayout
android:id="@+id/cerl_dispatch_hospital"
android:layout_marginTop="@dimen/dp_7"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<com.sw.healthyclients.view.CustomEmergencyRelativeLayout
<com.xjjk.healthyclients.view.CustomEmergencyRelativeLayout
android:id="@+id/cerl_dispatch_resident_name"
android:layout_marginTop="@dimen/dp_7"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<com.sw.healthyclients.view.CustomEmergencyRelativeLayout
<com.xjjk.healthyclients.view.CustomEmergencyRelativeLayout
android:id="@+id/cerl_dispatch_transfer_order"
android:layout_marginTop="@dimen/dp_7"
android:layout_width="match_parent"