refactor(tuichat): 重构添加成员页面UI和交互逻辑
- 将顶部标题栏改为白底黑字风格,调整返回按钮颜色 - 移除原有的Tab标签页,改为搜索框配合分段Tab布局 - 添加搜索框右侧"搜索"文字按钮功能 - 重新设计底部确认按钮为全宽度样式 - 调整导航面板宽度从220dp增加到280dp - 新增多个颜色值和图形资源用于支持新UI样式 - 更新通话图标和分隔线样式 - 修改应急救援相关API接口和数据模型 - 调整患者信息展示逻辑和界面元素可见性控制
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.xjjk.healthyclients.bean.emergency
|
||||
|
||||
data class GroupInfo(
|
||||
val orderId: String,
|
||||
val sessionId: String,
|
||||
val salvageUserName: String,
|
||||
val salvageUserSex: String,
|
||||
val salvageUserAvatar: String,
|
||||
val salvageUserAge: Int,
|
||||
val salvageUserMobile: String,
|
||||
val orgName: String,
|
||||
val deptName: String,
|
||||
val orderStatus: String,
|
||||
val initTime: String
|
||||
)
|
||||
@@ -66,8 +66,8 @@ data class ProposalBean(
|
||||
val sexCode: String?,
|
||||
val workUnit: String?,
|
||||
val careLiaisonName: String?,
|
||||
val idNo: String,
|
||||
val phone: String,
|
||||
val idNo: String?,
|
||||
val phone: String?,
|
||||
val careStatus: String,
|
||||
val dataLevel: Int,
|
||||
val negativeList: String,
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.xjjk.healthyclients.bean.emergency.BigDiseaseBean
|
||||
import com.xjjk.healthyclients.bean.emergency.BigDiseaseDetailsBean
|
||||
import com.xjjk.healthyclients.bean.emergency.EmergencyGroupInfo
|
||||
import com.xjjk.healthyclients.bean.emergency.GetOrderBySessionIdBean
|
||||
import com.xjjk.healthyclients.bean.emergency.GroupInfo
|
||||
import com.xjjk.healthyclients.bean.emergency.HospitalBean
|
||||
import com.xjjk.healthyclients.bean.emergency.LocationResourceBean
|
||||
import com.xjjk.healthyclients.bean.emergency.OrderThroughBean
|
||||
@@ -128,4 +129,10 @@ interface EmergencyApi {
|
||||
*/
|
||||
@GET("/health-emergency/emergency/LargeScreenNew/isLiaisonUser")
|
||||
suspend fun isLiaisonUser(): ApiResponse<Boolean>
|
||||
|
||||
/**
|
||||
* 当前登录人参与的应急工单列表
|
||||
*/
|
||||
@GET("/health-emergency/api/emergency/order/myParticipatedOrders")
|
||||
suspend fun getParticipatedOrders (): ApiResponse<PageBean<GroupInfo>>
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.xjjk.healthyclients.data.bean
|
||||
|
||||
/**
|
||||
* 通用分页数据包装类
|
||||
*
|
||||
* 用于后端返回 MyBatis-Plus 风格的分页结构,实际列表数据位于 [records] 字段中。
|
||||
*
|
||||
* @param T 列表元素类型
|
||||
*/
|
||||
data class PageBean<T>(
|
||||
/** 数据列表 */
|
||||
val records: List<T>?,
|
||||
/** 总记录数 */
|
||||
val total: Int = 0,
|
||||
/** 每页大小 */
|
||||
val size: Int = 0,
|
||||
/** 当前页码 */
|
||||
val current: Int = 0,
|
||||
/** 总页数 */
|
||||
val pages: Int = 0
|
||||
)
|
||||
@@ -10,6 +10,7 @@ import com.xjjk.healthyclients.bean.emergency.BigDiseaseBean
|
||||
import com.xjjk.healthyclients.bean.emergency.BigDiseaseDetailsBean
|
||||
import com.xjjk.healthyclients.bean.emergency.EmergencyGroupInfo
|
||||
import com.xjjk.healthyclients.bean.emergency.GetOrderBySessionIdBean
|
||||
import com.xjjk.healthyclients.bean.emergency.GroupInfo
|
||||
import com.xjjk.healthyclients.bean.emergency.HospitalBean
|
||||
import com.xjjk.healthyclients.bean.emergency.LocationResourceBean
|
||||
import com.xjjk.healthyclients.bean.emergency.OrderThroughBean
|
||||
@@ -181,4 +182,8 @@ object EmergencyRepository : BaseRepository() {
|
||||
suspend fun isLiaisonUser(): ApiResponse<Boolean> {
|
||||
return apiCall { service.isLiaisonUser() }
|
||||
}
|
||||
|
||||
suspend fun getParticipatedOrders(): ApiResponse<PageBean<GroupInfo>> {
|
||||
return apiCall { service.getParticipatedOrders() }
|
||||
}
|
||||
}
|
||||
@@ -87,7 +87,6 @@ class EmergencyFragment :
|
||||
)
|
||||
var mListener: LocationSource.OnLocationChangedListener? = null
|
||||
|
||||
|
||||
private val paramedicOperateListener = object : OnParamedicOperateListener {
|
||||
override fun addGroupUser(
|
||||
groupId: String,
|
||||
@@ -233,6 +232,8 @@ class EmergencyFragment :
|
||||
|
||||
// }
|
||||
}
|
||||
titleId = mHeadType[0].value
|
||||
mViewModel.getEmergencyData(mHeadType[0].value, mCurrentLat, mCurrentLon)
|
||||
}
|
||||
|
||||
override fun createObserve() {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.xjjk.healthyclients.ui.activity
|
||||
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.lifecycle.Lifecycle
|
||||
@@ -28,6 +29,7 @@ class ProposalActivity :
|
||||
// 加载健康档案数据
|
||||
|
||||
}
|
||||
|
||||
override fun createObserve() {
|
||||
super.createObserve()
|
||||
lifecycleScope.launch {
|
||||
@@ -38,43 +40,52 @@ class ProposalActivity :
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setProposalInfo(proposalBean: ProposalBean?) {
|
||||
proposalBean?.let {
|
||||
// 患者信息
|
||||
mBinding.tvPatientName.text = it.name
|
||||
mBinding.tvPatientGenderAge.text = it.sexCode + " · " + it.age
|
||||
mBinding.tvDocumentStatus.text = it.careStatus
|
||||
mBinding.tvPatientCompany.text = it.workUnit
|
||||
mBinding.tvIdNumber.text = it.idNo
|
||||
mBinding.tvPhone.text = it.phone
|
||||
mBinding.tvPatientGenderAge.text = formatNullString(it.sexCode) + " · " + it.age + "岁"
|
||||
//mBinding.tvDocumentStatus.text = it.careStatus
|
||||
mBinding.tvPatientCompany.text = formatNullString(it.workUnit)
|
||||
mBinding.tvIdNumber.text = formatNullString(it.idNo)
|
||||
mBinding.tvPhone.text = formatNullString(it.phone)
|
||||
|
||||
// 关爱管理信息
|
||||
mBinding.tvLevel.text = it.dataLevel.toString()
|
||||
mBinding.tvLiaisonName.text = it.careLiaisonName
|
||||
mBinding.tvNegativeList.text = it.negativeList
|
||||
//mBinding.tvLevel.text = it.dataLevel.toString()
|
||||
mBinding.tvLiaisonName.text = formatNullString(it.careLiaisonName)
|
||||
mBinding.tvNegativeList.text = formatNullString(it.negativeList)
|
||||
|
||||
|
||||
// 档案与标签
|
||||
mBinding.tvFlagFat.text = it.flagFat.toString()
|
||||
mBinding.tvWeight.text = it.weight
|
||||
mBinding.tvHeight.text = it.height
|
||||
mBinding.tvBmi.text = it.bmiCurrent
|
||||
mBinding.tvStandardWeight.text = it.targetWeight
|
||||
if (it.flagFat != 1) {
|
||||
mBinding.llFatTag.visibility = View.INVISIBLE
|
||||
}
|
||||
mBinding.tvWeight.text = formatNullString(it.weight)
|
||||
mBinding.tvHeight.text = formatNullString(it.height)
|
||||
mBinding.tvBmi.text = formatNullString(it.bmiCurrent)
|
||||
mBinding.tvStandardWeight.text = formatNullString(it.targetWeight)
|
||||
|
||||
// 心血管健康
|
||||
mBinding.tvBloodPressure.text = it.hypertension.toString()
|
||||
mBinding.tvSystolicAvg.text = it.systolicPressureAvg
|
||||
mBinding.tvSystolicTarget.text = it.systolicPressureTarget
|
||||
mBinding.tvSystolic.text = it.systolicPressureAvg
|
||||
mBinding.tvDiastolicAvg.text = it.diastolicPressureAvg
|
||||
mBinding.tvDiastolicTarget.text = it.diastolicPressureTarget
|
||||
mBinding.tvDiastolic.text = it.diastolicPressureAvg
|
||||
if (it.hypertension != 1) {
|
||||
mBinding.llHighPressureTag.visibility = View.INVISIBLE
|
||||
}
|
||||
mBinding.tvSystolicAvg.text = formatNullString(it.systolicPressureAvg)
|
||||
mBinding.tvSystolicTarget.text = formatNullString(it.systolicPressureTarget)
|
||||
mBinding.tvSystolic.text = formatNullString(it.systolicPressureAvg)
|
||||
mBinding.tvDiastolicAvg.text = formatNullString(it.diastolicPressureAvg)
|
||||
mBinding.tvDiastolicTarget.text = formatNullString(it.diastolicPressureTarget)
|
||||
mBinding.tvDiastolic.text = formatNullString(it.diastolicPressureAvg)
|
||||
|
||||
// 代谢指标
|
||||
mBinding.tvDiabetes.text = it.diabetes.toString()
|
||||
// 心血管健康
|
||||
if (it.diabetes != 1) {
|
||||
mBinding.llDiabetesTag.visibility = View.INVISIBLE
|
||||
}
|
||||
mBinding.llDiabetesTag.visibility = if (it.diabetes != 0) View.VISIBLE else View.GONE
|
||||
mBinding.tvFbsValue.text = it.glu
|
||||
mBinding.tvFbsTarget.text = it.bloodSugarTarget
|
||||
mBinding.tvFbsCurrent.text = it.glu
|
||||
mBinding.tvFbsValue.text = formatNullString(it.glu)
|
||||
mBinding.tvFbsTarget.text = formatNullString(it.bloodSugarTarget)
|
||||
mBinding.tvFbsCurrent.text = formatNullString(it.glu)
|
||||
|
||||
// 血脂四项
|
||||
mBinding.tvTcValue.text = it.tc
|
||||
@@ -98,6 +109,7 @@ class ProposalActivity :
|
||||
mBinding.tvHcyCurrent.text = it.homocysteine
|
||||
|
||||
// 医疗意见与记录
|
||||
mBinding.tvCabinOpinion.text = it.cabinOpinion
|
||||
mBinding.tvCabinTime.text = it.cabinOpinionTime
|
||||
mBinding.tvCabinReporter.text = it.cabinOpinionUserName
|
||||
mBinding.tvDoctorTime.text = it.expertOpinionTime
|
||||
@@ -105,6 +117,12 @@ class ProposalActivity :
|
||||
}
|
||||
}
|
||||
|
||||
fun formatNullString(input: String?): String {
|
||||
return input?.ifEmpty {
|
||||
"--"
|
||||
} ?: "--"
|
||||
}
|
||||
|
||||
override fun bindEvent() {
|
||||
// 绑定事件
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 渐变下划线装饰:白色 → 主题青色,用于医疗意见章节标题下方 -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:startColor="#FFFFFF"
|
||||
android:endColor="#2EB8B2"
|
||||
android:angle="0" />
|
||||
<size android:height="2dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 渐变下划线装饰:白色 → 主题青色,用于医疗意见章节标题下方 -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:startColor="#2EB8B2"
|
||||
android:endColor="#FFFFFF"
|
||||
android:angle="0" />
|
||||
<size android:height="2dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 渐变下划线装饰:白色 → 主题青色,用于医疗意见章节标题下方 -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:startColor="#FFFFFF"
|
||||
android:endColor="#5ABDBA"
|
||||
android:centerColor="#FFFFFF"
|
||||
android:centerY="0.5"
|
||||
android:angle="270" />
|
||||
<size android:height="2dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 灰色圆角背景 #F5F7FB radius 12dp -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#F5F7FB" />
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#F5F7FB" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 患者信息卡片浅绿渐变头部 #DEFFFC → #FFFFFF -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:startColor="#DEFFFC"
|
||||
android:endColor="#FFFFFF"
|
||||
android:angle="270" />
|
||||
<corners
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#F24439" />
|
||||
<size
|
||||
android:width="6dp"
|
||||
android:height="6dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 表格数据单元格:白色背景 + 浅灰边框 -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#FFFFFF" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#E6E6EA" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 表格表头单元格:灰色背景 + 浅灰边框 -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#F5F7FB" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#E6E6EA" />
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#1A2EB8B2" />
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:startColor="#DEFFFC"
|
||||
android:endColor="#FFFFFF"
|
||||
android:angle="270" />
|
||||
<!--<corners
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp" />-->
|
||||
</shape>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 青色标签背景 #2EB8B2 radius 12dp,用于"重点关爱"等标签 -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#2EB8B2" />
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/theme_color" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 卡片顶部青色细条,配合患者信息卡片使用 -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#2EB8B2" />
|
||||
<corners
|
||||
android:topLeftRadius="8dp"
|
||||
android:topRightRadius="8dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 青色标签背景 #2EB8B2 radius 4dp -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#2EB8B2" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 小号青色标签背景 #2EB8B2 radius 2dp,用于BMI"标准"标签 -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#2EB8B2" />
|
||||
<corners android:radius="2dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 卡片顶部青色细条,配合患者信息卡片使用 -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#2EB8B2" />
|
||||
<corners
|
||||
android:topLeftRadius="8dp"
|
||||
android:topRightRadius="8dp"
|
||||
android:bottomRightRadius="8dp"
|
||||
android:bottomLeftRadius="8dp"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/white" />
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.0 KiB |
File diff suppressed because it is too large
Load Diff
@@ -79,7 +79,7 @@
|
||||
android:layout_width="@dimen/dp_70"
|
||||
android:layout_height="@dimen/dp_70"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:src="@drawable/ic_emergency_120" />
|
||||
android:src="@drawable/ic_paramedic" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user