中建365-二期开发-优化
parent
7902e124a6
commit
c1af609169
@ -0,0 +1,121 @@
|
||||
package com.zj365.health.act
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.xty.base.act.BaseListAct
|
||||
import com.xty.common.arouter.ARouterUrl
|
||||
import com.xty.common.util.CommonToastUtils
|
||||
import com.zj365.health.R
|
||||
import com.zj365.health.adapter.UricCalibrationListAdapter
|
||||
import com.zj365.health.databinding.ActUricCalibrationHistoryBinding
|
||||
|
||||
import com.zj365.health.vm.UricAcidVm
|
||||
|
||||
/**
|
||||
* 尿酸记录列表
|
||||
*/
|
||||
@Route(path = ARouterUrl.URIC_CALIBRATION_HISTORY)
|
||||
class UricCalibrationHistoryAct : BaseListAct<UricAcidVm>() {
|
||||
|
||||
private val binding by lazy { ActUricCalibrationHistoryBinding.inflate(layoutInflater) }
|
||||
override fun setLayout(): View = binding.root
|
||||
|
||||
var isManage = false
|
||||
var isEdit = false
|
||||
private var userId: String = ""
|
||||
val adapter by lazy { UricCalibrationListAdapter() }
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
|
||||
userId = intent.getStringExtra("userId").toString()
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
statusBar(binding.title.mView)
|
||||
binding.title.mIvBack.setOnClickListener { finish() }
|
||||
binding.title.mTvTitle.text = "校准记录"
|
||||
|
||||
binding.mTvManage.setOnClickListener {
|
||||
toManage(!isManage)
|
||||
}
|
||||
//退出管理
|
||||
binding.mTvExitManage.setOnClickListener {
|
||||
toManage(false)
|
||||
}
|
||||
//删除
|
||||
binding.mDelete.setOnClickListener {
|
||||
val selectData = adapter.getSelectData()
|
||||
if (selectData.isEmpty()) {
|
||||
CommonToastUtils.showToast("未勾选数据")
|
||||
return@setOnClickListener
|
||||
}
|
||||
deleteDialog.show()
|
||||
}
|
||||
}
|
||||
|
||||
override fun initAdapter() {
|
||||
binding.mRecycle.adapter = adapter
|
||||
binding.mRecycle.layoutManager = LinearLayoutManager(this)
|
||||
setRecycleRefresh(binding.mRecycle, binding.mRefresh, true)
|
||||
|
||||
adapter.setOnItemClickListener { _, view, position ->
|
||||
val bloodFatBean = adapter.data[position]
|
||||
if (isManage) {
|
||||
val findViewById = view.findViewById<ImageView>(R.id.ivSelected)
|
||||
findViewById.isSelected = !findViewById.isSelected
|
||||
bloodFatBean.isSelected = findViewById.isSelected
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
private fun toManage(isManager: Boolean) {
|
||||
isManage = isManager
|
||||
adapter.isSelect = isManager
|
||||
adapter.notifyDataSetChanged()
|
||||
if (isManager) {
|
||||
binding.mTvManage.visibility = View.GONE
|
||||
binding.mDelete.visibility = View.VISIBLE
|
||||
binding.mTvExitManage.visibility = View.VISIBLE
|
||||
isEdit = true
|
||||
} else {
|
||||
binding.mTvManage.visibility = View.VISIBLE
|
||||
binding.mDelete.visibility = View.GONE
|
||||
binding.mTvExitManage.visibility = View.GONE
|
||||
adapter.reset()
|
||||
isEdit = false
|
||||
}
|
||||
}
|
||||
|
||||
override fun deleteData() {
|
||||
super.deleteData()
|
||||
mViewModel.getUricCalibrationDeleteRequest(adapter.getSelectData())
|
||||
}
|
||||
|
||||
override fun loadData() {
|
||||
mViewModel.getUricCalibrationListRequest(page, userId)
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun liveObserver() {
|
||||
mViewModel.getUricCalibrationListLive.observe(this) {
|
||||
setDate(adapter, it.data.records)
|
||||
binding.title.mTvTitle.text = "校准记录(${it.data.total})"
|
||||
}
|
||||
//删除尿酸校准记录
|
||||
mViewModel.deteleUricCalibrationLive.observe(this) {
|
||||
if (it.code == 0) {
|
||||
page = 1
|
||||
loadData()
|
||||
CommonToastUtils.showSucceedToast("删除成功")
|
||||
} else {
|
||||
CommonToastUtils.showToast("删除失败:${it.msg}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,191 @@
|
||||
package com.zj365.health.act
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.EditText
|
||||
import android.widget.TextView
|
||||
import androidx.core.view.get
|
||||
import androidx.core.view.isVisible
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.tamsiree.rxkit.RxKeyboardTool
|
||||
import com.xty.base.act.BaseVmAct
|
||||
import com.xty.common.TimeSelect
|
||||
import com.xty.common.arouter.ARouterUrl
|
||||
import com.xty.common.arouter.RouteManager
|
||||
import com.xty.common.util.ChineseNumberAndNumberUtils
|
||||
import com.xty.common.util.CommonToastUtils
|
||||
import com.xty.common.util.PointLengthFilter
|
||||
import com.zj365.health.R
|
||||
import com.zj365.health.databinding.ActUricCalibrationSubmitBinding
|
||||
import com.zj365.health.model.UricCalibrationBean
|
||||
import com.zj365.health.vm.UricAcidVm
|
||||
|
||||
|
||||
/**
|
||||
* 尿酸校准提交
|
||||
*/
|
||||
@Route(path = ARouterUrl.URIC_CALIBRATION_SUBMIT)
|
||||
class UricCalibrationSubmitAct : BaseVmAct<UricAcidVm>() {
|
||||
|
||||
private val binding by lazy { ActUricCalibrationSubmitBinding.inflate(layoutInflater) }
|
||||
override fun setLayout(): View = binding.root
|
||||
|
||||
private var userId: String = ""
|
||||
private val MAX_LENGTH = 10
|
||||
private var recordNumber = 0
|
||||
|
||||
private val timSelect by lazy {
|
||||
TimeSelect(this) {
|
||||
}.apply {
|
||||
showHour = true
|
||||
showMin = true
|
||||
showSec = false
|
||||
}
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
addChildViews()
|
||||
userId = intent.getStringExtra("userId").toString()
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
statusBar(binding.title.mView)
|
||||
binding.title.mTvTitle.text = "尿酸校准"
|
||||
binding.title.mIvBack.setOnClickListener { finish() }
|
||||
|
||||
binding.mAdd.setOnClickListener {
|
||||
addChildViews()
|
||||
}
|
||||
|
||||
binding.mSubmit.isSelected = true
|
||||
binding.mSubmit.setOnClickListener {
|
||||
val bloods: MutableList<UricCalibrationBean> =
|
||||
getBloodLipidAdjustData() ?: return@setOnClickListener
|
||||
mViewModel.submitUricCalibrationRequest(bloods, userId)
|
||||
}
|
||||
|
||||
//尿酸校准记录
|
||||
binding.jiaozhijilu.setOnClickListener {
|
||||
bundle.clear()
|
||||
bundle.putString("userId", userId)
|
||||
RouteManager.goAct(ARouterUrl.URIC_CALIBRATION_HISTORY, bundle)
|
||||
}
|
||||
|
||||
//尿酸校准须知
|
||||
binding.mTip.setOnClickListener {
|
||||
val webUrl = ""
|
||||
bundle.clear()
|
||||
bundle.putString("title", "尿酸校准须知")
|
||||
bundle.putString("url", webUrl)
|
||||
RouteManager.goAct(ARouterUrl.WEB_ACT, bundle)
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n", "InflateParams", "MissingInflatedId")
|
||||
private fun addChildViews() {
|
||||
val viewIndex = binding.childLayout.childCount
|
||||
val viewNum = viewIndex + 1
|
||||
if (viewNum > MAX_LENGTH) {
|
||||
CommonToastUtils.showToast("尿酸校准最多添加" + MAX_LENGTH + "条")
|
||||
return
|
||||
}
|
||||
val childView = LayoutInflater.from(this).inflate(
|
||||
R.layout.item_uric_calibration_submit,
|
||||
null
|
||||
)
|
||||
childView.findViewById<TextView>(R.id.mTitle).text = "第${
|
||||
ChineseNumberAndNumberUtils.intToChinese(viewNum)
|
||||
}次"
|
||||
childView.findViewById<EditText>(R.id.edUricValue).filters = arrayOf(
|
||||
PointLengthFilter(2)
|
||||
)
|
||||
val mTvTimeView = childView.findViewById<TextView>(R.id.mVTimeView)
|
||||
mTvTimeView.tag = viewNum - 1
|
||||
mTvTimeView.setOnClickListener {
|
||||
RxKeyboardTool.hideSoftInput(this)
|
||||
timSelect.selectTime(it, "yyyy-MM-dd HH:mm")
|
||||
recordNumber = it.tag.toString().toInt()
|
||||
}
|
||||
childView.setPadding(0, 0, 0, dp2px(0))
|
||||
|
||||
binding.childLayout.addView(
|
||||
childView
|
||||
)
|
||||
}
|
||||
|
||||
private fun getBloodLipidAdjustData(): MutableList<UricCalibrationBean>? {
|
||||
val list: MutableList<UricCalibrationBean> = mutableListOf()
|
||||
for (i in 0 until binding.childLayout.childCount) {
|
||||
val uricCalibrationBean = UricCalibrationBean()
|
||||
uricCalibrationBean.bpTime = (getChildView(
|
||||
i,
|
||||
R.id.mVTimeView
|
||||
) as TextView).text.toString()
|
||||
uricCalibrationBean.uaValue = (getChildView(
|
||||
i,
|
||||
R.id.edUricValue
|
||||
) as TextView).text.toString()
|
||||
|
||||
if (uricCalibrationBean.bpTime.isNullOrEmpty()) {
|
||||
CommonToastUtils.showToast("请选择测量时间")
|
||||
return null
|
||||
}
|
||||
|
||||
if (uricCalibrationBean.uaValue.isNullOrEmpty()) {
|
||||
CommonToastUtils.showToast("请填写测量值")
|
||||
return null
|
||||
}
|
||||
|
||||
uricCalibrationBean.bpTime = "${uricCalibrationBean.bpTime}:00"
|
||||
list.add(uricCalibrationBean)
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
private fun getChildView(index: Int, childId: Int = 0): View {
|
||||
return if (childId == 0) {
|
||||
binding.childLayout[index]
|
||||
} else {
|
||||
binding.childLayout[index].findViewById(childId)
|
||||
}
|
||||
}
|
||||
|
||||
override fun liveObserver() {
|
||||
mViewModel.submitUricCalibrationLive.observe(this) {
|
||||
if (it.code == 0) {
|
||||
CommonToastUtils.showSucceedToast("提交成功")
|
||||
bundle.clear()
|
||||
bundle.putString("userId", userId)
|
||||
RouteManager.goAct(ARouterUrl.URIC_CALIBRATION_HISTORY, bundle)
|
||||
finish()
|
||||
} else {
|
||||
CommonToastUtils.showToast("提交失败:${it.msg}")
|
||||
}
|
||||
}
|
||||
|
||||
//获取尿酸检测数据
|
||||
mViewModel.getUricAcidMeasurementRecordLive.observe(this) {
|
||||
if (it.code == 0) {
|
||||
if (it.data != null) {
|
||||
val data = it.data
|
||||
val line = getChildView(recordNumber, R.id.vUricAcidLine)
|
||||
line.isVisible = false
|
||||
val lastLayout = getChildView(recordNumber, R.id.llUricAcidLyout)
|
||||
lastLayout.isVisible = true
|
||||
(getChildView(
|
||||
recordNumber,
|
||||
R.id.tvUricAcidLastValue
|
||||
) as TextView).text = data.uaValue.toString()
|
||||
} else {
|
||||
val line = getChildView(recordNumber, R.id.vUricAcidLine)
|
||||
line.isVisible = true
|
||||
val lastLayout = getChildView(recordNumber, R.id.llUricAcidLyout)
|
||||
lastLayout.isVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
package com.zj365.health.adapter
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.xty.base.adapter.BaseAdapter
|
||||
import com.xty.common.SizeUtil
|
||||
import com.xty.network.model.UricCalibrationListBean
|
||||
import com.zj365.health.R
|
||||
|
||||
class UricCalibrationListAdapter : BaseAdapter<UricCalibrationListBean>(
|
||||
R.layout.item_uric_calibration_list
|
||||
) {
|
||||
|
||||
var isSelect = false
|
||||
|
||||
val textColor by lazy {
|
||||
arrayOf(
|
||||
R.color.col_9BD,
|
||||
R.color.col_25C,
|
||||
R.color.col_FDA481
|
||||
)
|
||||
}
|
||||
val bg by lazy {
|
||||
arrayOf(
|
||||
R.drawable.shape_xya_status_yellow,
|
||||
R.drawable.shape_xya_status,
|
||||
R.drawable.shape_xya_status_orange
|
||||
)
|
||||
}
|
||||
|
||||
override fun convert(holder: BaseViewHolder, item: UricCalibrationListBean) {
|
||||
holder.setGone(R.id.ivSelected, !isSelect)
|
||||
val view = holder.getView<ImageView>(R.id.ivSelected)
|
||||
view.isSelected = item.isSelected
|
||||
|
||||
val colorIndex = when (item.upType) {
|
||||
1 -> 0
|
||||
2, 5 -> 1
|
||||
else -> 2
|
||||
}
|
||||
val result = when (item.upType) {
|
||||
1 -> "用户上传"
|
||||
2 -> "管家上传"
|
||||
3 -> "物联网上传"
|
||||
4 -> "管理员上传"
|
||||
else -> "家人上传"
|
||||
}
|
||||
holder.setBackgroundResource(R.id.tvStatus, bg[colorIndex])
|
||||
holder.setTextColor(
|
||||
R.id.tvStatus,
|
||||
ContextCompat.getColor(
|
||||
context,
|
||||
textColor[colorIndex]
|
||||
)
|
||||
)
|
||||
holder.getView<TextView>(R.id.tvStatus).apply {
|
||||
text = result
|
||||
setPadding(
|
||||
SizeUtil.dp2px(context, 10f),
|
||||
SizeUtil.dp2px(context, 5f),
|
||||
SizeUtil.dp2px(context, 10f),
|
||||
SizeUtil.dp2px(context, 5f)
|
||||
)
|
||||
}
|
||||
|
||||
holder.setText(R.id.tvCalibrationTime, "校准时间:${item.createTime}")
|
||||
holder.setText(R.id.tvUploadingName, "上传人:${item.upName}")
|
||||
holder.setText(R.id.tvMeasurementTime, "测量时间:${item.bpTime}")
|
||||
|
||||
holder.setText(R.id.tvMeasurementValue, "尿酸数值:${item.uaValue.toFloat().toInt()}μmol/L")
|
||||
|
||||
val sysValue = item.sysValue
|
||||
if (sysValue > 0) {
|
||||
holder.setGone(R.id.llLastValueLayout, false)
|
||||
holder.setText(R.id.tvItemLastUricAcidValue, "尿酸数值:${sysValue}μmol/L")
|
||||
} else {
|
||||
holder.setGone(R.id.llLastValueLayout, true)
|
||||
}
|
||||
}
|
||||
|
||||
fun getSelectData(): MutableList<UricCalibrationListBean> {
|
||||
val result = mutableListOf<UricCalibrationListBean>()
|
||||
for (datum in data) {
|
||||
if (datum.isSelected) {
|
||||
result.add(datum)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
fun reset() {
|
||||
for (datum in data) {
|
||||
datum.isSelected = false
|
||||
}
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package com.zj365.health.model
|
||||
|
||||
class UricCalibrationBean {
|
||||
var bpTime: String = ""
|
||||
var uaValue: String = ""
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/title"
|
||||
layout="@layout/title_white_bar" />
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/mRefresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.scwang.smart.refresh.header.ClassicsHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecycle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
<com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mTvExitManage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_ten_click"
|
||||
android:gravity="center"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
android:text="退出管理"
|
||||
android:textColor="@color/col_02c"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mDelete"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_btn_delete_bg"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="删除"
|
||||
android:textColor="@color/col_2628"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mTvManage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_btn_select_bg"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="管理"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
android:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/title"
|
||||
layout="@layout/title_white_bar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mTip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:drawableEnd="@mipmap/ic_data_none"
|
||||
android:drawablePadding="@dimen/dp_6"
|
||||
android:text="注:尿酸校准须知"
|
||||
android:textColor="@color/col_f23"
|
||||
android:visibility="gone"
|
||||
android:textSize="@dimen/sp_15"
|
||||
tools:ignore="HardcodedText,UseCompatTextViewDrawableXml" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/dp_50">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/childLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/mAdd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_14"
|
||||
android:layout_marginBottom="@dimen/dp_26"
|
||||
android:background="@drawable/shape_btn_select_bg_rad6"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:drawableStart="@mipmap/icon_add_1"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:gravity="center_vertical"
|
||||
android:text="添加"
|
||||
android:textColor="@color/col_02c"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="HardcodedText,UseCompatTextViewDrawableXml" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/jiaozhijilu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="@dimen/dp_10"
|
||||
android:layout_marginStart="@dimen/dp_25"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_btn_select_bg_25c"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="@string/blood_align_history"
|
||||
android:textColor="@color/col_02c"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 保存上传 -->
|
||||
<TextView
|
||||
android:id="@+id/mSubmit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="@dimen/dp_10"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_25"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_login_btn"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="提交"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,209 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:layout_marginEnd="@dimen/dp_14"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="@dimen/dp_10"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:drawableStart="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="UseCompatTextViewDrawableXml"
|
||||
tools:text="第一次" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lltime"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="测量时间"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_15"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mVTimeView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:drawableEnd="@mipmap/ic_next"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:gravity="end|center_vertical"
|
||||
android:hint="@string/please_select_time"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
android:textColor="@color/col_3a4"
|
||||
android:textColorHint="@color/col_c7c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
tools:ignore="UseCompatTextViewDrawableXml" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:text="测量值"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="@dimen/sp_17"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llEditCholesterol"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="尿酸数值"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_15"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edUricValue"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_6"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:gravity="end"
|
||||
android:hint="@string/please_input_gdbp"
|
||||
android:inputType="number"
|
||||
android:paddingVertical="@dimen/dp_10"
|
||||
android:textColor="@color/col_3a4"
|
||||
android:textColorHint="@color/col_c7c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintRight_toLeftOf="@+id/mUnit" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mUnit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="μmol/L"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/mEditGdbp"
|
||||
app:layout_constraintLeft_toRightOf="@+id/mEditGdbp"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/mEditGdbp"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/vUricAcidLine"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llUricAcidLyout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_marginBottom="@dimen/dp_28"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_0_5"
|
||||
android:background="@color/col_0F2" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_21"
|
||||
android:text="监测值"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="@dimen/sp_17"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_25">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:text="尿酸数值"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_15"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUricAcidLastValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_15"
|
||||
tools:text="345" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:text="μmol/L"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_15"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,28 @@
|
||||
package com.xty.network.model
|
||||
|
||||
data class BoodfatFatMeasurementRecordBean(
|
||||
var id: String,
|
||||
var userId: Long,
|
||||
|
||||
//血脂
|
||||
var tc: Float,
|
||||
var tg: Float,
|
||||
var hdl: Float,
|
||||
var ldl: Float,
|
||||
|
||||
//尿酸
|
||||
var uaValue: Int,
|
||||
|
||||
//血糖
|
||||
var bloodsugar: Float,
|
||||
|
||||
//血压
|
||||
var gdbp: Int,
|
||||
var ddbp: Int,
|
||||
|
||||
var time: String,
|
||||
var timeDay: String,
|
||||
var timeMonth: String,
|
||||
var timeYear: String,
|
||||
var createTime: String
|
||||
)
|
@ -0,0 +1,16 @@
|
||||
package com.xty.network.model
|
||||
|
||||
data class UricCalibrationListBean(
|
||||
val id: String,//记录ID
|
||||
val userId: String,//用户ID
|
||||
val sysValue: Int,//系统尿酸值
|
||||
val uaValue: String,//测量尿酸值
|
||||
val bpTime: String,//测量时间
|
||||
val remark: String,//备注
|
||||
val createTime: String,//上传时间
|
||||
val upType: Int,//上传类型
|
||||
val upName: String,//上传类型名
|
||||
val timeDay: String,//日期
|
||||
|
||||
var isSelected:Boolean
|
||||
)
|
Loading…
Reference in New Issue