Commit 6b87ce77 by 霍志良

feat:修改UI

parent 143ffbf3
...@@ -10,7 +10,7 @@ ext { ...@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.03", "m-fm" : "0.0.30.03",
"m-user-medical" : "0.0.62.14", "m-user-medical" : "0.0.62.14",
"m-home" : "0.0.22.70", "m-home" : "0.0.22.70",
"m-im-medical" : "0.0.21.47", "m-im-medical" : "0.0.21.51",
"m-dynamic" : "0.0.7.28", "m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
...@@ -33,7 +33,7 @@ ext { ...@@ -33,7 +33,7 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.41.61", "ydl-platform" : "0.0.41.63",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.57", "ydl-webview" : "0.0.38.57",
...@@ -94,7 +94,7 @@ ext { ...@@ -94,7 +94,7 @@ ext {
"m-fm" : "0.0.30.01", "m-fm" : "0.0.30.01",
"m-user-medical" : "0.0.62.14", "m-user-medical" : "0.0.62.14",
"m-home" : "0.0.22.70", "m-home" : "0.0.22.70",
"m-im-medical" : "0.0.21.47", "m-im-medical" : "0.0.21.51",
"m-dynamic" : "0.0.7.28", "m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.8", "m-article" : "0.0.0.8",
...@@ -116,7 +116,7 @@ ext { ...@@ -116,7 +116,7 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.41.61", "ydl-platform" : "0.0.41.63",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.57", "ydl-webview" : "0.0.38.57",
......
...@@ -54,9 +54,9 @@ android { ...@@ -54,9 +54,9 @@ android {
//Flavor 信息 //Flavor 信息
publishNonDefault true publishNonDefault true
productFlavors { // productFlavors {
medical{} // medical{}
} // }
sourceSets { sourceSets {
main { main {
......
...@@ -4,6 +4,8 @@ import android.widget.TextView ...@@ -4,6 +4,8 @@ import android.widget.TextView
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.ydl.webview.H5Params import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.base.config.HttpConfig.Companion.MEDICAL_H5URL
import com.ydl.ydlcommon.base.config.HttpConfig.Companion.MH5_URL import com.ydl.ydlcommon.base.config.HttpConfig.Companion.MH5_URL
import com.yidianling.im.R import com.yidianling.im.R
import com.yidianling.im.session.extension.CustomAttachmentPatientMedicineApply import com.yidianling.im.session.extension.CustomAttachmentPatientMedicineApply
...@@ -27,24 +29,31 @@ class MsgViewHolderPatientMedicineApply(adapter: BaseMultiItemFetchLoadAdapter<* ...@@ -27,24 +29,31 @@ class MsgViewHolderPatientMedicineApply(adapter: BaseMultiItemFetchLoadAdapter<*
override fun inflateContentView() { override fun inflateContentView() {
medicine_title = findViewById(R.id.medicine_title) medicine_title = findViewById(R.id.medicine_title)
medicine_list = findViewById(R.id.medicine_list) medicine_list = findViewById(R.id.medicine_list)
medicine_title.text = itemBean.title
adapterMedicine = AdapterMedicineApply()
medicine_list.layoutManager = LinearLayoutManager(context)
medicine_list.adapter = adapterMedicine
itemBean.medicinelist?.let { adapterMedicine.setTagData(it) }
} }
override fun bindContentView() { override fun bindContentView() {
itemBean = message.attachment as CustomAttachmentPatientMedicineApply itemBean = message.attachment as CustomAttachmentPatientMedicineApply
hideItemBg() medicine_title.text = "itemBean.title"
adapterMedicine = AdapterMedicineApply()
medicine_list.layoutManager = LinearLayoutManager(context)
medicine_list.adapter = adapterMedicine
if (itemBean.medicinelist.size > 2) {
itemBean.medicinelist?.let {
val subList = it.subList(0, 1)
adapterMedicine.setTagData(subList)
}
} else {
itemBean.medicinelist?.let { adapterMedicine.setTagData(it) }
}
} }
override fun onItemClick() { override fun onItemClick() {
//跳转开药详情页面 //跳转开药详情页面
val h5Params3 = H5Params( val h5Params3 = H5Params(
MH5_URL + "\n" + MEDICAL_H5URL + "\n" +
"ct/drug/apply/details?visitApplyNo=${itemBean.visitApplyNo}&hideNavBar=1", null "ct/drug/apply/details?visitApplyNo=${itemBean.visitApplyNo}&hideNavBar=1", null
) )
NewH5Activity.start(getActivity(), h5Params3) NewH5Activity.start(context, h5Params3)
} }
} }
\ No newline at end of file
...@@ -5,9 +5,8 @@ import android.view.LayoutInflater ...@@ -5,9 +5,8 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import com.ydl.ydl_image.module.GlideApp
import com.yidianling.im.R import com.yidianling.im.R
import com.yidianling.im.bean.MedicineBean import com.yidianling.im.bean.MedicineItemBean
/** /**
* @author huozhiliang * @author huozhiliang
...@@ -17,7 +16,7 @@ import com.yidianling.im.bean.MedicineBean ...@@ -17,7 +16,7 @@ import com.yidianling.im.bean.MedicineBean
* @date 2020/9/7 * @date 2020/9/7
*/ */
class AdapterMedicineApply : RecyclerView.Adapter<AdapterMedicineApply.ViewHolder>() { class AdapterMedicineApply : RecyclerView.Adapter<AdapterMedicineApply.ViewHolder>() {
private var medicineList: MutableList<MedicineBean>? = mutableListOf() private var medicineList: MutableList<MedicineItemBean>? = mutableListOf()
class ViewHolder(itemView: View) : class ViewHolder(itemView: View) :
RecyclerView.ViewHolder(itemView) { RecyclerView.ViewHolder(itemView) {
...@@ -42,11 +41,11 @@ class AdapterMedicineApply : RecyclerView.Adapter<AdapterMedicineApply.ViewHolde ...@@ -42,11 +41,11 @@ class AdapterMedicineApply : RecyclerView.Adapter<AdapterMedicineApply.ViewHolde
override fun onBindViewHolder(holder: ViewHolder, position: Int) { override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder.medicine_name.text = medicineList?.get(position)?.medicineName holder.medicine_name.text = medicineList?.get(position)?.medicineName
holder.medicine_spec.text = medicineList?.get(position)?.medicineSpec holder.medicine_spec.text = "规格:" + medicineList?.get(position)?.medicineSpec
holder.medicine_count.text = "X" + medicineList?.get(position)?.medicineApplyNumber holder.medicine_count.text = "x" + medicineList?.get(position)?.medicineApplyNumber
} }
fun setTagData(data: MutableList<MedicineBean>) { fun setTagData(data: MutableList<MedicineItemBean>) {
medicineList = data medicineList = data
notifyDataSetChanged() notifyDataSetChanged()
} }
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white" />
<stroke
android:width="0.5dp"
android:color="#e7ecf0" />
<corners android:topLeftRadius="8dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ecf5ff" />
<stroke
android:width="0.5dp"
android:color="#e7ecf0" />
<corners android:topLeftRadius="8dp" />
</shape>
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/platform_dp_12"> android:layout_marginBottom="@dimen/platform_dp_12">
<TextView <TextView
......
...@@ -3,13 +3,14 @@ ...@@ -3,13 +3,14 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="255dp" android:layout_width="255dp"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:background="@drawable/shape_solid_white_stroke_e7ecf0_top">
<View <View
android:id="@+id/back_top" android:id="@+id/back_top"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:background="#ecf5ff" android:background="@drawable/shape_solid_white_stroke_e7ecf0_top2"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
app:layout_constraintBottom_toBottomOf="@id/back_top" app:layout_constraintBottom_toBottomOf="@id/back_top"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:text="开药申请" /> android:text="开wwwww药申请" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/medicine_list" android:id="@+id/medicine_list"
...@@ -33,9 +34,9 @@ ...@@ -33,9 +34,9 @@
android:paddingStart="@dimen/platform_dp_16" android:paddingStart="@dimen/platform_dp_16"
android:layout_marginTop="@dimen/platform_dp_16" android:layout_marginTop="@dimen/platform_dp_16"
android:paddingEnd="@dimen/platform_dp_16" android:paddingEnd="@dimen/platform_dp_16"
app:layout_constraintTop_toBottomOf="@id/back_top"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/back_top"
tools:itemCount="2" /> tools:itemCount="2" />
<View <View
...@@ -56,7 +57,7 @@ ...@@ -56,7 +57,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="14dp" android:layout_marginTop="14dp"
android:layout_marginBottom="2dp" android:layout_marginBottom="14dp"
android:background="@drawable/medical_bg_3464ec_14dp" android:background="@drawable/medical_bg_3464ec_14dp"
android:text="申请详情" android:text="申请详情"
android:textColor="@color/medical_color_007aef" android:textColor="@color/medical_color_007aef"
......
...@@ -50,7 +50,7 @@ class ActionCountUtils { ...@@ -50,7 +50,7 @@ class ActionCountUtils {
appName = name appName = name
// 获取oaid // 获取oaid
UMConfigure.getOaid(BaseApp.instance) { UMConfigure.getOaid(BaseApp.instance) {
oaId = it it?.let { oaId = it }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment