回采新增详情修改、合并我的数据拉取和推送到新数据同步页面
This commit is contained in:
@@ -59,6 +59,9 @@
|
|||||||
<activity android:name=".ui.mining.activity.MiningFaceDetailActivity" />
|
<activity android:name=".ui.mining.activity.MiningFaceDetailActivity" />
|
||||||
<activity android:name=".ui.mining.activity.AddMiningFaceActivity"
|
<activity android:name=".ui.mining.activity.AddMiningFaceActivity"
|
||||||
android:windowSoftInputMode="adjustPan" />
|
android:windowSoftInputMode="adjustPan" />
|
||||||
|
<activity android:name=".ui.mining.activity.MiningFaceRecordActivity"
|
||||||
|
android:windowSoftInputMode="adjustPan" />
|
||||||
|
<activity android:name=".ui.user.activity.DataSyncActivity" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.zmkg.coaloperation.adapter
|
||||||
|
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
|
import com.zmkg.coaloperation.R
|
||||||
|
import com.zmkg.coaloperation.bean.DataSyncItem
|
||||||
|
import com.zmkg.coaloperation.databinding.ListItemDataSyncBinding
|
||||||
|
import com.zmkg.coaloperation.utils.gone
|
||||||
|
import com.zmkg.coaloperation.utils.visible
|
||||||
|
|
||||||
|
class DataSyncAdapter(list: MutableList<DataSyncItem>):
|
||||||
|
BaseQuickAdapter<DataSyncItem, DataSyncAdapter.VH>(R.layout.list_item_data_sync, list) {
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): VH {
|
||||||
|
val binding = ListItemDataSyncBinding.inflate(
|
||||||
|
LayoutInflater.from(context), parent, false
|
||||||
|
)
|
||||||
|
return VH(binding).also {
|
||||||
|
bindViewClickListener(it, viewType)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun convert(
|
||||||
|
holder: VH,
|
||||||
|
item: DataSyncItem
|
||||||
|
) {
|
||||||
|
holder.binding.let {
|
||||||
|
it.tvItemUnit.text = item.funcName
|
||||||
|
// it.divider.run {
|
||||||
|
// if (holder.layoutPosition == data.size - 1) gone() else visible()
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class VH(var binding: ListItemDataSyncBinding): BaseViewHolder(binding.root)
|
||||||
|
|
||||||
|
}
|
||||||
+50
@@ -0,0 +1,50 @@
|
|||||||
|
package com.zmkg.coaloperation.adapter
|
||||||
|
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.core.widget.addTextChangedListener
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
|
import com.zmkg.coaloperation.R
|
||||||
|
import com.zmkg.coaloperation.bean.AddMiningFaceItem
|
||||||
|
import com.zmkg.coaloperation.databinding.ListItemMiningRecordBaseDataBinding
|
||||||
|
|
||||||
|
class MiningRecordBaseDataAdapter(list: MutableList<AddMiningFaceItem>) :
|
||||||
|
BaseQuickAdapter<AddMiningFaceItem, MiningRecordBaseDataAdapter.VH>(
|
||||||
|
R.layout.list_item_mining_record_base_data,
|
||||||
|
list
|
||||||
|
) {
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(
|
||||||
|
parent: ViewGroup,
|
||||||
|
viewType: Int
|
||||||
|
): VH {
|
||||||
|
val binding = ListItemMiningRecordBaseDataBinding.inflate(
|
||||||
|
LayoutInflater.from(context), parent, false
|
||||||
|
)
|
||||||
|
return VH(binding).also {
|
||||||
|
bindViewClickListener(it, viewType)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun convert(
|
||||||
|
holder: VH,
|
||||||
|
item: AddMiningFaceItem
|
||||||
|
) {
|
||||||
|
val binding = holder.binding
|
||||||
|
binding.tvItemName.run {
|
||||||
|
addTextChangedListener(onTextChanged = { text, start, before, count ->
|
||||||
|
item.funcName = text.toString().trim()
|
||||||
|
})
|
||||||
|
text = item.funcName
|
||||||
|
}
|
||||||
|
binding.etItemValue.run {
|
||||||
|
addTextChangedListener(onTextChanged = { text, start, before, count ->
|
||||||
|
item.funcValue = text.toString().trim()
|
||||||
|
})
|
||||||
|
setText(item.funcValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class VH(var binding: ListItemMiningRecordBaseDataBinding) : BaseViewHolder(binding.root)
|
||||||
|
}
|
||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
package com.zmkg.coaloperation.adapter
|
||||||
|
|
||||||
|
import android.text.Html
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.core.widget.addTextChangedListener
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
|
import com.zmkg.coaloperation.R
|
||||||
|
import com.zmkg.coaloperation.bean.CoalThicknessItem
|
||||||
|
import com.zmkg.coaloperation.databinding.ListItemMiningRecordCoalThicknessBinding
|
||||||
|
import com.zmkg.coaloperation.utils.gone
|
||||||
|
import com.zmkg.coaloperation.utils.visible
|
||||||
|
|
||||||
|
class MiningRecordCoalThicknessAdapter(list: MutableList<CoalThicknessItem>):
|
||||||
|
BaseQuickAdapter<CoalThicknessItem,MiningRecordCoalThicknessAdapter.VH>(R.layout.list_item_mining_record_coal_thickness,list){
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): VH {
|
||||||
|
val binding = ListItemMiningRecordCoalThicknessBinding.inflate(
|
||||||
|
LayoutInflater.from(context), parent, false
|
||||||
|
)
|
||||||
|
return VH(binding).also {
|
||||||
|
bindViewClickListener(it, viewType)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun convert(holder: VH, item: CoalThicknessItem) {
|
||||||
|
val position = holder.layoutPosition
|
||||||
|
val binding = holder.binding
|
||||||
|
binding.divider.run {
|
||||||
|
if (position == data.size - 1) gone() else visible()
|
||||||
|
}
|
||||||
|
binding.btnAddPoint.run {
|
||||||
|
if (position == data.size - 1) visible() else gone()
|
||||||
|
}
|
||||||
|
binding.tvNameUnit.text = Html.fromHtml("<sup>#</sup>架", Html.FROM_HTML_MODE_LEGACY)
|
||||||
|
binding.etItemName.run {
|
||||||
|
addTextChangedListener(onTextChanged = { text, start, before, count ->
|
||||||
|
item.supportNo = text.toString().trim()
|
||||||
|
})
|
||||||
|
setText(item.supportNo)
|
||||||
|
}
|
||||||
|
binding.etItemValue.run {
|
||||||
|
addTextChangedListener(onTextChanged = { text, start, before, count ->
|
||||||
|
item.thicknessValue = text.toString().trim()
|
||||||
|
})
|
||||||
|
setText(item.thicknessValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class VH(var binding: ListItemMiningRecordCoalThicknessBinding): BaseViewHolder(binding.root)
|
||||||
|
}
|
||||||
+13
-11
@@ -15,6 +15,7 @@ import com.zmkg.coaloperation.R
|
|||||||
import com.zmkg.coaloperation.databinding.ListItemTunnelWorkingFaceBinding
|
import com.zmkg.coaloperation.databinding.ListItemTunnelWorkingFaceBinding
|
||||||
import com.zmkg.coaloperation.db.entity.mining.MiningWorkingFaceEntity
|
import com.zmkg.coaloperation.db.entity.mining.MiningWorkingFaceEntity
|
||||||
import com.zmkg.coaloperation.ui.mining.activity.MiningActivity
|
import com.zmkg.coaloperation.ui.mining.activity.MiningActivity
|
||||||
|
import com.zmkg.coaloperation.ui.mining.activity.MiningFaceRecordActivity
|
||||||
import com.zmkg.coaloperation.utils.ScreenUtil
|
import com.zmkg.coaloperation.utils.ScreenUtil
|
||||||
import com.zmkg.coaloperation.utils.gone
|
import com.zmkg.coaloperation.utils.gone
|
||||||
import com.zmkg.coaloperation.utils.toJsonString
|
import com.zmkg.coaloperation.utils.toJsonString
|
||||||
@@ -81,17 +82,18 @@ class MiningWorkingFaceAdapter(var list: MutableList<MiningWorkingFaceEntity>) :
|
|||||||
// return@setOnItemClickListener
|
// return@setOnItemClickListener
|
||||||
// }
|
// }
|
||||||
Log.d(TAG, "convert: ${item.records!![recordPosition].toJsonString()}")
|
Log.d(TAG, "convert: ${item.records!![recordPosition].toJsonString()}")
|
||||||
// context.let { ctx ->
|
context.let { ctx ->
|
||||||
// if (ctx is MiningActivity) {
|
if (ctx is MiningActivity) {
|
||||||
// ctx.toActivity(WorkingFaceRecordActivity::class.java, Bundle().apply {
|
ctx.toActivity(MiningFaceRecordActivity::class.java, Bundle().apply {
|
||||||
// putString(WorkingFaceRecordActivity.FACE_NAME, item.surfaceName)
|
putString(MiningFaceRecordActivity.WORK_RECORD_TYPE, MiningFaceRecordActivity.WorkRecordType.SEE.name)
|
||||||
// putParcelable(
|
putString(MiningFaceRecordActivity.FACE_NAME, item.surfaceName)
|
||||||
// WorkingFaceRecordActivity.FACE_RECORD,
|
putParcelable(
|
||||||
// item.records!![recordPosition]
|
MiningFaceRecordActivity.FACE_RECORD,
|
||||||
// )
|
item.records!![recordPosition]
|
||||||
// })
|
)
|
||||||
// }
|
})
|
||||||
// }
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ import com.zmkg.coaloperation.base.viewmodel.BaseViewModel.Companion.LOADING_STA
|
|||||||
import com.zmkg.coaloperation.superfuntion.hideLoading
|
import com.zmkg.coaloperation.superfuntion.hideLoading
|
||||||
import com.zmkg.coaloperation.superfuntion.showLoading
|
import com.zmkg.coaloperation.superfuntion.showLoading
|
||||||
import com.zmkg.coaloperation.utils.StatusbarUtil
|
import com.zmkg.coaloperation.utils.StatusbarUtil
|
||||||
|
import com.zmkg.coaloperation.utils.formatDecimalString
|
||||||
|
import com.zmkg.coaloperation.utils.roundedOneDecimalPlace
|
||||||
import com.zmkg.coaloperation.view.CustomToast
|
import com.zmkg.coaloperation.view.CustomToast
|
||||||
import com.zmkg.coaloperation.view.LoadingDialog
|
import com.zmkg.coaloperation.view.LoadingDialog
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@@ -432,4 +434,17 @@ abstract class BaseVMBActivity<VM : BaseViewModel, B : ViewDataBinding>(private
|
|||||||
configuration.fontScale = 1f
|
configuration.fontScale = 1f
|
||||||
return context.createConfigurationContext(configuration)
|
return context.createConfigurationContext(configuration)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getShowNum2(num:String?):String {
|
||||||
|
return num?.formatDecimalString()?:""
|
||||||
|
}
|
||||||
|
fun getShowNum(num:String?):String {
|
||||||
|
if (num.isNullOrBlank()) return "0"
|
||||||
|
try {
|
||||||
|
val showNum = num.toDouble().roundedOneDecimalPlace()
|
||||||
|
return "$showNum"
|
||||||
|
} catch (e: Exception) {
|
||||||
|
return "0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -8,11 +8,22 @@ data class UserMenuBean(
|
|||||||
)
|
)
|
||||||
|
|
||||||
data class AddMiningFaceItem(
|
data class AddMiningFaceItem(
|
||||||
//0-输入框,1-选择弹窗
|
//0-输入框,1-选择弹窗, 2-显示文本TextView
|
||||||
var funcType: Int = 0,
|
var funcType: Int = 0,
|
||||||
var funcName: String = "",
|
var funcName: String = "",
|
||||||
var funcValue: String = "",
|
var funcValue: String = "",
|
||||||
var funcId: String = "",
|
var funcId: String = "",
|
||||||
var isShowArrowDown: Boolean = false,
|
var isShowArrowDown: Boolean = false,
|
||||||
var onClick: () -> Unit = {}
|
var onClick: () -> Unit = {}
|
||||||
|
)
|
||||||
|
|
||||||
|
data class CoalThicknessItem(
|
||||||
|
var supportNo: String = "",
|
||||||
|
var thicknessValue: String = "",
|
||||||
|
)
|
||||||
|
|
||||||
|
data class DataSyncItem(
|
||||||
|
var funcName:String,
|
||||||
|
var onDataPull: () -> Unit = {},
|
||||||
|
var onDataPush: () -> Unit = {},
|
||||||
)
|
)
|
||||||
@@ -1,10 +1,13 @@
|
|||||||
package com.zmkg.coaloperation.data.api
|
package com.zmkg.coaloperation.data.api
|
||||||
|
|
||||||
|
import com.zmkg.coaloperation.bean.TunnelSubmitData
|
||||||
import com.zmkg.coaloperation.data.bean.ApiResponse
|
import com.zmkg.coaloperation.data.bean.ApiResponse
|
||||||
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
import com.zmkg.coaloperation.retorfit.UrlConfig
|
import com.zmkg.coaloperation.retorfit.UrlConfig
|
||||||
import com.zmkg.coaloperation.ui.home.bean.WaterLedgerBean
|
import com.zmkg.coaloperation.ui.home.bean.WaterLedgerBean
|
||||||
|
import retrofit2.http.Body
|
||||||
import retrofit2.http.GET
|
import retrofit2.http.GET
|
||||||
|
import retrofit2.http.POST
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页
|
* 首页
|
||||||
@@ -48,4 +51,7 @@ interface HomeApi {
|
|||||||
@GET("/api/mine/tunnelling/dictionaries")
|
@GET("/api/mine/tunnelling/dictionaries")
|
||||||
suspend fun getTunnelAllDict(): ApiResponse<Any?>
|
suspend fun getTunnelAllDict(): ApiResponse<Any?>
|
||||||
|
|
||||||
|
@POST("/api/mine/tunnelling/data/push")
|
||||||
|
suspend fun tunnelDataPush(@Body data: TunnelSubmitData): ApiResponse<Any?>
|
||||||
|
|
||||||
}
|
}
|
||||||
+11
-4
@@ -1,6 +1,7 @@
|
|||||||
package com.zmkg.coaloperation.data.repository
|
package com.zmkg.coaloperation.data.repository
|
||||||
|
|
||||||
import com.zmkg.coaloperation.base.repository.BaseRepository
|
import com.zmkg.coaloperation.base.repository.BaseRepository
|
||||||
|
import com.zmkg.coaloperation.bean.TunnelSubmitData
|
||||||
import com.zmkg.coaloperation.data.api.HomeApi
|
import com.zmkg.coaloperation.data.api.HomeApi
|
||||||
import com.zmkg.coaloperation.data.bean.ApiResponse
|
import com.zmkg.coaloperation.data.bean.ApiResponse
|
||||||
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
@@ -8,7 +9,7 @@ import com.zmkg.coaloperation.retorfit.RetrofitManager
|
|||||||
import com.zmkg.coaloperation.ui.home.bean.WaterLedgerBean
|
import com.zmkg.coaloperation.ui.home.bean.WaterLedgerBean
|
||||||
|
|
||||||
|
|
||||||
object HomeRepository : BaseRepository(){
|
object HomeRepository : BaseRepository() {
|
||||||
|
|
||||||
private val service by lazy { RetrofitManager.getService(HomeApi::class.java) }
|
private val service by lazy { RetrofitManager.getService(HomeApi::class.java) }
|
||||||
|
|
||||||
@@ -33,7 +34,7 @@ object HomeRepository : BaseRepository(){
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * 掘进-首页-工作面记录列表
|
// * 掘进-首页-工作面记录列表
|
||||||
// */
|
// */
|
||||||
// suspend fun getTunnelingHomeItemData(surfaceId: String?): ApiResponse<MutableList<TunnelingHomeItemBean>> {
|
// suspend fun getTunnelingHomeItemData(surfaceId: String?): ApiResponse<MutableList<TunnelingHomeItemBean>> {
|
||||||
@@ -61,16 +62,22 @@ object HomeRepository : BaseRepository(){
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
suspend fun getTunnelHomeList() : ApiResponse<MutableList<TunnelWorkingFaceEntity>?> {
|
suspend fun getTunnelHomeList(): ApiResponse<MutableList<TunnelWorkingFaceEntity>?> {
|
||||||
return apiCall {
|
return apiCall {
|
||||||
service.getTunnelHomeList()
|
service.getTunnelHomeList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun getTunnelAllDict() : ApiResponse<Any?> {
|
suspend fun getTunnelAllDict(): ApiResponse<Any?> {
|
||||||
return apiCall {
|
return apiCall {
|
||||||
service.getTunnelAllDict()
|
service.getTunnelAllDict()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
suspend fun tunnelDataPush(data: TunnelSubmitData): ApiResponse<Any?> {
|
||||||
|
return apiCall {
|
||||||
|
service.tunnelDataPush(data)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+2
@@ -25,6 +25,7 @@ import com.zmkg.coaloperation.superfuntion.toJson
|
|||||||
import com.zmkg.coaloperation.ui.home.adapter.HomeMenuAdapter
|
import com.zmkg.coaloperation.ui.home.adapter.HomeMenuAdapter
|
||||||
import com.zmkg.coaloperation.ui.home.bean.HomeMenuBean
|
import com.zmkg.coaloperation.ui.home.bean.HomeMenuBean
|
||||||
import com.zmkg.coaloperation.ui.home.viewmodel.HomeViewModel
|
import com.zmkg.coaloperation.ui.home.viewmodel.HomeViewModel
|
||||||
|
import com.zmkg.coaloperation.utils.DictUtils
|
||||||
import kotlinx.coroutines.flow.collectLatest
|
import kotlinx.coroutines.flow.collectLatest
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
@@ -80,6 +81,7 @@ class HomeFragment :
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun initData() {
|
override fun initData() {
|
||||||
|
DictUtils.initData()
|
||||||
// mViewModel.getWaterLedgerData()
|
// mViewModel.getWaterLedgerData()
|
||||||
|
|
||||||
val titleNameList = mutableListOf(
|
val titleNameList = mutableListOf(
|
||||||
|
|||||||
+12
-11
@@ -51,17 +51,18 @@ class MiningActivity :
|
|||||||
return@setOnItemChildClickListener
|
return@setOnItemChildClickListener
|
||||||
}
|
}
|
||||||
if (view.id == R.id.start_record) {
|
if (view.id == R.id.start_record) {
|
||||||
// toActivity(AddWorkingFaceRecordActivity::class.java, Bundle().apply {
|
toActivity(MiningFaceRecordActivity::class.java, Bundle().apply {
|
||||||
// putLong(
|
putString(MiningFaceRecordActivity.WORK_RECORD_TYPE, MiningFaceRecordActivity.WorkRecordType.ADD.name)
|
||||||
// AddWorkingFaceRecordActivity.FACE_ID,
|
putLong(
|
||||||
// workingFaceList[position].surfaceId
|
MiningFaceRecordActivity.FACE_ID,
|
||||||
// )
|
workingFaceList[position].surfaceId
|
||||||
// putString(
|
)
|
||||||
// AddWorkingFaceRecordActivity.FACE_NAME,
|
putString(
|
||||||
// workingFaceList[position].surfaceName
|
MiningFaceRecordActivity.FACE_NAME,
|
||||||
// )
|
workingFaceList[position].surfaceName
|
||||||
// putInt(AddWorkingFaceRecordActivity.SHOW_TYPE, 0)
|
)
|
||||||
// })
|
putInt(AddWorkingFaceRecordActivity.SHOW_TYPE, 0)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+184
@@ -0,0 +1,184 @@
|
|||||||
|
package com.zmkg.coaloperation.ui.mining.activity
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.text.TextUtils
|
||||||
|
import android.view.View
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.zmkg.coaloperation.R
|
||||||
|
import com.zmkg.coaloperation.adapter.MiningRecordBaseDataAdapter
|
||||||
|
import com.zmkg.coaloperation.adapter.MiningRecordCoalThicknessAdapter
|
||||||
|
import com.zmkg.coaloperation.base.BaseVMBActivity
|
||||||
|
import com.zmkg.coaloperation.base.viewmodel.TestViewModel
|
||||||
|
import com.zmkg.coaloperation.bean.AddMiningFaceItem
|
||||||
|
import com.zmkg.coaloperation.bean.CoalThicknessItem
|
||||||
|
import com.zmkg.coaloperation.bean.WorkOption
|
||||||
|
import com.zmkg.coaloperation.databinding.ActivityMiningFaceRecordBinding
|
||||||
|
import com.zmkg.coaloperation.utils.PickerUtil
|
||||||
|
import com.zmkg.coaloperation.utils.gone
|
||||||
|
import com.zmkg.coaloperation.utils.visible
|
||||||
|
|
||||||
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
|
class MiningFaceRecordActivity :
|
||||||
|
BaseVMBActivity<TestViewModel, ActivityMiningFaceRecordBinding>(R.layout.activity_mining_face_record) {
|
||||||
|
companion object {
|
||||||
|
const val TAG = "MiningFaceRecordActivity"
|
||||||
|
const val SHOW_TYPE = "showType"
|
||||||
|
const val WORK_RECORD_TYPE = "workRecordType"
|
||||||
|
const val FACE_NAME = "faceName"
|
||||||
|
const val FACE_ID = "faceId"
|
||||||
|
const val FACE_RECORD = "faceRecord"
|
||||||
|
}
|
||||||
|
|
||||||
|
enum class WorkRecordType {
|
||||||
|
ADD,//新增
|
||||||
|
|
||||||
|
EDIT,//修改
|
||||||
|
|
||||||
|
SEE//查看
|
||||||
|
}
|
||||||
|
|
||||||
|
private var currentRecordType = WorkRecordType.ADD
|
||||||
|
private val baseDataList: MutableList<AddMiningFaceItem> = mutableListOf()
|
||||||
|
private val coalThicknessList: MutableList<CoalThicknessItem> = mutableListOf()
|
||||||
|
|
||||||
|
private val baseDataAdapter by lazy {
|
||||||
|
MiningRecordBaseDataAdapter(baseDataList)
|
||||||
|
}
|
||||||
|
|
||||||
|
private val coalThicknessAdapter by lazy {
|
||||||
|
MiningRecordCoalThicknessAdapter(coalThicknessList).apply {
|
||||||
|
addChildClickViewIds(R.id.btnAddPoint)
|
||||||
|
setOnItemChildClickListener { adapter, view, position ->
|
||||||
|
if (view.id == R.id.btnAddPoint) {
|
||||||
|
coalThicknessList.add(CoalThicknessItem())
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initView(savedInstanceState: Bundle?) {
|
||||||
|
mBinding.rvBaseData.let {
|
||||||
|
it.layoutManager = LinearLayoutManager(this)
|
||||||
|
it.adapter = baseDataAdapter
|
||||||
|
}
|
||||||
|
mBinding.rvCoalThickness.let {
|
||||||
|
it.layoutManager = LinearLayoutManager(this)
|
||||||
|
it.adapter = coalThicknessAdapter
|
||||||
|
}
|
||||||
|
val stringExtra = intent.getStringExtra(WORK_RECORD_TYPE)
|
||||||
|
if (TextUtils.isEmpty(stringExtra)) {
|
||||||
|
stringExtra == AddMiningFaceActivity.WorkFaceType.ADD.name
|
||||||
|
}
|
||||||
|
when (stringExtra) {
|
||||||
|
WorkRecordType.ADD.name -> {
|
||||||
|
currentRecordType = WorkRecordType.ADD
|
||||||
|
mBinding.toolbarLay.title = "开始记录"
|
||||||
|
mBinding.btnSaveRecord.text = "保存"
|
||||||
|
mBinding.btnSaveRecord.visible()
|
||||||
|
initAddRecord()
|
||||||
|
}
|
||||||
|
|
||||||
|
WorkRecordType.EDIT.name -> {
|
||||||
|
currentRecordType = WorkRecordType.EDIT
|
||||||
|
mBinding.toolbarLay.title = "修改记录"
|
||||||
|
mBinding.btnSaveRecord.text = "修改"
|
||||||
|
mBinding.btnSaveRecord.visible()
|
||||||
|
// detail =
|
||||||
|
// intent.getParcelableExtra(WorkingFaceDetailActivity.Companion.FACE_WORK_DETAIL_DATA) as MiningWorkingFaceEntity?
|
||||||
|
// if (faceDetail == null) {
|
||||||
|
// showToast("未查询到记录数据")
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
initEditRecord()
|
||||||
|
}
|
||||||
|
|
||||||
|
WorkRecordType.SEE.name -> {
|
||||||
|
currentRecordType = WorkRecordType.SEE
|
||||||
|
mBinding.toolbarLay.title = "查看详情"
|
||||||
|
mBinding.toolbarLay.rightText = "修改"
|
||||||
|
mBinding.toolbarLay.titleTvRight.setOnClickListener {
|
||||||
|
toActivity(MiningFaceRecordActivity::class.java, Bundle().apply {
|
||||||
|
putString(WORK_RECORD_TYPE, WorkRecordType.EDIT.name)
|
||||||
|
// putParcelable(FACE_RECORD, faceRecord)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
mBinding.btnSaveRecord.gone()
|
||||||
|
initRecordDetail()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initData() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun bindEvent() {
|
||||||
|
val waterOutflowList: MutableList<WorkOption> = mutableListOf()
|
||||||
|
waterOutflowList.add(WorkOption(id = "0", name = "是"))
|
||||||
|
waterOutflowList.add(WorkOption(id = "1", name = "否"))
|
||||||
|
val tvWaterOutflow = mBinding.tvWaterOutflow
|
||||||
|
tvWaterOutflow.setOnClickListener { v ->
|
||||||
|
PickerUtil.showOptionPicker(this, "请选择是否出水", waterOutflowList) { option ->
|
||||||
|
tvWaterOutflow.text = option.name
|
||||||
|
tvWaterOutflow.tag = option.id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun processClick(v: View?) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initAddRecord() {
|
||||||
|
baseDataList.run {
|
||||||
|
add(AddMiningFaceItem(funcName = "当班进尺"))
|
||||||
|
add(AddMiningFaceItem(funcName = "胶运巷回采位置"))
|
||||||
|
add(AddMiningFaceItem(funcName = "回风巷回采位置"))
|
||||||
|
add(AddMiningFaceItem(funcName = "出煤量"))
|
||||||
|
}
|
||||||
|
baseDataAdapter.notifyDataSetChanged()
|
||||||
|
|
||||||
|
coalThicknessList.run {
|
||||||
|
add(CoalThicknessItem())
|
||||||
|
add(CoalThicknessItem())
|
||||||
|
add(CoalThicknessItem())
|
||||||
|
}
|
||||||
|
coalThicknessAdapter.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initEditRecord() {
|
||||||
|
baseDataList.run {
|
||||||
|
add(AddMiningFaceItem(funcName = "当班进尺"))
|
||||||
|
add(AddMiningFaceItem(funcName = "胶运巷回采位置"))
|
||||||
|
add(AddMiningFaceItem(funcName = "回风巷回采位置"))
|
||||||
|
add(AddMiningFaceItem(funcName = "出煤量"))
|
||||||
|
}
|
||||||
|
baseDataAdapter.notifyDataSetChanged()
|
||||||
|
|
||||||
|
coalThicknessList.run {
|
||||||
|
add(CoalThicknessItem())
|
||||||
|
add(CoalThicknessItem())
|
||||||
|
add(CoalThicknessItem())
|
||||||
|
}
|
||||||
|
coalThicknessAdapter.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initRecordDetail() {
|
||||||
|
baseDataList.run {
|
||||||
|
add(AddMiningFaceItem(funcName = "当班进尺"))
|
||||||
|
add(AddMiningFaceItem(funcName = "胶运巷回采位置"))
|
||||||
|
add(AddMiningFaceItem(funcName = "回风巷回采位置"))
|
||||||
|
add(AddMiningFaceItem(funcName = "出煤量"))
|
||||||
|
}
|
||||||
|
baseDataAdapter.notifyDataSetChanged()
|
||||||
|
|
||||||
|
coalThicknessList.run {
|
||||||
|
add(CoalThicknessItem())
|
||||||
|
add(CoalThicknessItem())
|
||||||
|
add(CoalThicknessItem())
|
||||||
|
}
|
||||||
|
coalThicknessAdapter.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
-3
@@ -193,6 +193,7 @@ class AddWorkingFaceRecordActivity :
|
|||||||
it.workingFootage = mBinding.etWorkingFootage.text.toString().trim().formatDecimalString()
|
it.workingFootage = mBinding.etWorkingFootage.text.toString().trim().formatDecimalString()
|
||||||
it.seamDip = mBinding.etSeamDip.text.toString().trim().formatDecimalString()
|
it.seamDip = mBinding.etSeamDip.text.toString().trim().formatDecimalString()
|
||||||
it.seamHeight = mBinding.etSeamHeight.text.toString().trim().formatDecimalString()
|
it.seamHeight = mBinding.etSeamHeight.text.toString().trim().formatDecimalString()
|
||||||
|
it.waterYield = mBinding.etWaterYield.text.toString().trim().formatDecimalString()
|
||||||
it.recordPerson = mBinding.etRecordPerson.text.toString().trim()
|
it.recordPerson = mBinding.etRecordPerson.text.toString().trim()
|
||||||
|
|
||||||
it.createTime = DateTimeUtil.formatDateTime(LocalDateTime.now())
|
it.createTime = DateTimeUtil.formatDateTime(LocalDateTime.now())
|
||||||
@@ -218,9 +219,10 @@ class AddWorkingFaceRecordActivity :
|
|||||||
mBinding.tvWorkTeam.tag = it.teamId
|
mBinding.tvWorkTeam.tag = it.teamId
|
||||||
|
|
||||||
mBinding.etTeamLeader.setText(it.teamLeader)
|
mBinding.etTeamLeader.setText(it.teamLeader)
|
||||||
mBinding.etWorkingFootage.setText(it.workingFootage)
|
mBinding.etWorkingFootage.setText(getShowNum2(it.workingFootage))
|
||||||
mBinding.etSeamDip.setText(it.seamDip)
|
mBinding.etSeamDip.setText(getShowNum2(it.seamDip))
|
||||||
mBinding.etSeamHeight.setText(it.seamHeight)
|
mBinding.etSeamHeight.setText(getShowNum2(it.seamHeight))
|
||||||
|
mBinding.etWaterYield.setText(getShowNum2(it.waterYield))
|
||||||
mBinding.etRecordPerson.setText(it.recordPerson)
|
mBinding.etRecordPerson.setText(it.recordPerson)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -238,6 +240,7 @@ class AddWorkingFaceRecordActivity :
|
|||||||
it.workingFootage = mBinding.etWorkingFootage.text.toString().trim().formatDecimalString()
|
it.workingFootage = mBinding.etWorkingFootage.text.toString().trim().formatDecimalString()
|
||||||
it.seamDip = mBinding.etSeamDip.text.toString().trim().formatDecimalString()
|
it.seamDip = mBinding.etSeamDip.text.toString().trim().formatDecimalString()
|
||||||
it.seamHeight = mBinding.etSeamHeight.text.toString().trim().formatDecimalString()
|
it.seamHeight = mBinding.etSeamHeight.text.toString().trim().formatDecimalString()
|
||||||
|
it.waterYield = mBinding.etWaterYield.text.toString().trim().formatDecimalString()
|
||||||
it.recordPerson = mBinding.etRecordPerson.text.toString().trim()
|
it.recordPerson = mBinding.etRecordPerson.text.toString().trim()
|
||||||
|
|
||||||
it.createTime = DateTimeUtil.formatDateTime(LocalDateTime.now())
|
it.createTime = DateTimeUtil.formatDateTime(LocalDateTime.now())
|
||||||
@@ -311,6 +314,13 @@ class AddWorkingFaceRecordActivity :
|
|||||||
}
|
}
|
||||||
list.add(TunnelWorkingItem(name = "煤层高", value = seamHeight))
|
list.add(TunnelWorkingItem(name = "煤层高", value = seamHeight))
|
||||||
|
|
||||||
|
val waterYield = mBinding.etWaterYield.text.toString().trim().formatDecimalString()
|
||||||
|
if (waterYield.isBlank()) {
|
||||||
|
showToast("请输入涌水量")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
list.add(TunnelWorkingItem(name = "涌水量", value = waterYield))
|
||||||
|
|
||||||
val recordPerson = mBinding.etRecordPerson.text.toString().trim()
|
val recordPerson = mBinding.etRecordPerson.text.toString().trim()
|
||||||
if (recordPerson.isBlank()) {
|
if (recordPerson.isBlank()) {
|
||||||
showToast("请输入填写人")
|
showToast("请输入填写人")
|
||||||
|
|||||||
-1
@@ -86,7 +86,6 @@ class TunnelingActivity :
|
|||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
override fun initData() {
|
override fun initData() {
|
||||||
DictUtils.initData()
|
|
||||||
val userId = SpTool.getString(SpTool.USER_ID)
|
val userId = SpTool.getString(SpTool.USER_ID)
|
||||||
workingFaceViewModel.getEntityListByUserId(userId) { it ->
|
workingFaceViewModel.getEntityListByUserId(userId) { it ->
|
||||||
if (it.isNullOrEmpty()) {
|
if (it.isNullOrEmpty()) {
|
||||||
|
|||||||
+6
-3
@@ -16,6 +16,7 @@ import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceRecordEntity
|
|||||||
import com.zmkg.coaloperation.db.viewmodel.TunnelRoofLithologyViewModel
|
import com.zmkg.coaloperation.db.viewmodel.TunnelRoofLithologyViewModel
|
||||||
import com.zmkg.coaloperation.utils.DictUtils
|
import com.zmkg.coaloperation.utils.DictUtils
|
||||||
import com.zmkg.coaloperation.utils.formatDecimalString
|
import com.zmkg.coaloperation.utils.formatDecimalString
|
||||||
|
import com.zmkg.coaloperation.utils.roundedOneDecimalPlace
|
||||||
import com.zmkg.coaloperation.utils.toJsonString
|
import com.zmkg.coaloperation.utils.toJsonString
|
||||||
import org.greenrobot.eventbus.Subscribe
|
import org.greenrobot.eventbus.Subscribe
|
||||||
import org.greenrobot.eventbus.ThreadMode
|
import org.greenrobot.eventbus.ThreadMode
|
||||||
@@ -83,14 +84,15 @@ class WorkingFaceRecordActivity :
|
|||||||
)
|
)
|
||||||
list.add(TunnelWorkingItem(pageType = 1, name = "施工队伍", value = it.teamName))
|
list.add(TunnelWorkingItem(pageType = 1, name = "施工队伍", value = it.teamName))
|
||||||
list.add(TunnelWorkingItem(pageType = 1, name = "带班队长", value = it.teamLeader))
|
list.add(TunnelWorkingItem(pageType = 1, name = "带班队长", value = it.teamLeader))
|
||||||
list.add(TunnelWorkingItem(pageType = 1, name = "本班进尺", value = "${it.workingFootage?.formatDecimalString()}m"))
|
list.add(TunnelWorkingItem(pageType = 1, name = "本班进尺", value = "${getShowNum2(it.workingFootage)}m"))
|
||||||
|
|
||||||
// val rockList = mutableListOf<TunnelRoofLithologyEntity>()
|
// val rockList = mutableListOf<TunnelRoofLithologyEntity>()
|
||||||
// rockList.add(RockItem(startLen = 0, endLen = 1, rockType = "泥"))
|
// rockList.add(RockItem(startLen = 0, endLen = 1, rockType = "泥"))
|
||||||
// rockList.add(RockItem(startLen = 0, endLen = 1, rockType = "砂"))
|
// rockList.add(RockItem(startLen = 0, endLen = 1, rockType = "砂"))
|
||||||
list.add(TunnelWorkingItem(pageType = 1, name = "顶板岩性", value = "", items = null))
|
list.add(TunnelWorkingItem(pageType = 1, name = "顶板岩性", value = "", items = null))
|
||||||
list.add(TunnelWorkingItem(pageType = 1, name = "煤层倾角", value = "${it.seamDip?.formatDecimalString()}°"))
|
list.add(TunnelWorkingItem(pageType = 1, name = "煤层倾角", value = "${getShowNum2(it.seamDip)}°"))
|
||||||
list.add(TunnelWorkingItem(pageType = 1, name = "煤层高", value = "${it.seamHeight?.formatDecimalString()}m"))
|
list.add(TunnelWorkingItem(pageType = 1, name = "煤层高", value = "${getShowNum2(it.seamHeight)}m"))
|
||||||
|
list.add(TunnelWorkingItem(pageType = 1, name = "涌水量", value = "${getShowNum2(it.waterYield)}m³/h"))
|
||||||
list.add(TunnelWorkingItem(pageType = 1, name = "记录人", value = it.recordPerson))
|
list.add(TunnelWorkingItem(pageType = 1, name = "记录人", value = it.recordPerson))
|
||||||
|
|
||||||
adapter.notifyDataSetChanged()
|
adapter.notifyDataSetChanged()
|
||||||
@@ -102,6 +104,7 @@ class WorkingFaceRecordActivity :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun bindEvent() {
|
override fun bindEvent() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+15
@@ -1,6 +1,7 @@
|
|||||||
package com.zmkg.coaloperation.ui.tunneling.viewmodel
|
package com.zmkg.coaloperation.ui.tunneling.viewmodel
|
||||||
|
|
||||||
import com.zmkg.coaloperation.base.viewmodel.BaseViewModel
|
import com.zmkg.coaloperation.base.viewmodel.BaseViewModel
|
||||||
|
import com.zmkg.coaloperation.bean.TunnelSubmitData
|
||||||
import com.zmkg.coaloperation.data.repository.HomeRepository
|
import com.zmkg.coaloperation.data.repository.HomeRepository
|
||||||
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
import com.zmkg.coaloperation.db.entity.tunnel.TunnelWorkingFaceEntity
|
||||||
import com.zmkg.coaloperation.superfuntion.handleRequest
|
import com.zmkg.coaloperation.superfuntion.handleRequest
|
||||||
@@ -104,4 +105,18 @@ class TunnelingViewModel : BaseViewModel() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var tunnelDataPush = MutableSharedFlow<Any?>()
|
||||||
|
|
||||||
|
fun tunnelDataPush(data:TunnelSubmitData) {
|
||||||
|
launch(
|
||||||
|
{
|
||||||
|
handleRequest(
|
||||||
|
HomeRepository.tunnelDataPush(data),
|
||||||
|
successBlock = {
|
||||||
|
tunnelDataPush.emit(it.data)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
-1
@@ -23,5 +23,4 @@ class AboutUsActivity : BaseVMBActivity<TestViewModel,ActivityAboutUsBinding>(R.
|
|||||||
override fun processClick(v: View?) {
|
override fun processClick(v: View?) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
+221
@@ -0,0 +1,221 @@
|
|||||||
|
package com.zmkg.coaloperation.ui.user.activity
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.util.Log
|
||||||
|
import android.view.View
|
||||||
|
import androidx.lifecycle.Lifecycle
|
||||||
|
import androidx.lifecycle.ViewModelProvider
|
||||||
|
import androidx.lifecycle.lifecycleScope
|
||||||
|
import androidx.lifecycle.repeatOnLifecycle
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.zmkg.coaloperation.R
|
||||||
|
import com.zmkg.coaloperation.adapter.DataSyncAdapter
|
||||||
|
import com.zmkg.coaloperation.base.BaseVMBActivity
|
||||||
|
import com.zmkg.coaloperation.bean.DataSyncItem
|
||||||
|
import com.zmkg.coaloperation.bean.TunnelSubmitData
|
||||||
|
import com.zmkg.coaloperation.databinding.ActivityDataSyncBinding
|
||||||
|
import com.zmkg.coaloperation.db.viewmodel.TunnelRoofLithologyViewModel
|
||||||
|
import com.zmkg.coaloperation.db.viewmodel.TunnelWorkingFaceRecordViewModel
|
||||||
|
import com.zmkg.coaloperation.db.viewmodel.TunnelWorkingFaceViewModel
|
||||||
|
import com.zmkg.coaloperation.superfuntion.hideLoading
|
||||||
|
import com.zmkg.coaloperation.superfuntion.showLoading
|
||||||
|
import com.zmkg.coaloperation.ui.tunneling.viewmodel.TunnelingViewModel
|
||||||
|
import com.zmkg.coaloperation.utils.DictUtils
|
||||||
|
import com.zmkg.coaloperation.utils.SpTool
|
||||||
|
import com.zmkg.coaloperation.utils.toJsonString
|
||||||
|
import kotlinx.coroutines.flow.collectLatest
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
import kotlin.collections.isNotEmpty
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关于我们
|
||||||
|
*/
|
||||||
|
class DataSyncActivity :
|
||||||
|
BaseVMBActivity<TunnelingViewModel, ActivityDataSyncBinding>(R.layout.activity_data_sync) {
|
||||||
|
|
||||||
|
private val TAG = "DataSyncActivity"
|
||||||
|
|
||||||
|
private val workingFaceViewModel: TunnelWorkingFaceViewModel by lazy {
|
||||||
|
ViewModelProvider(this)[TunnelWorkingFaceViewModel::class.java]
|
||||||
|
}
|
||||||
|
|
||||||
|
private val workingFaceRecordViewModel: TunnelWorkingFaceRecordViewModel by lazy {
|
||||||
|
ViewModelProvider(this)[TunnelWorkingFaceRecordViewModel::class.java]
|
||||||
|
}
|
||||||
|
|
||||||
|
private val roofLithologyViewModel: TunnelRoofLithologyViewModel by lazy {
|
||||||
|
ViewModelProvider(this)[TunnelRoofLithologyViewModel::class.java]
|
||||||
|
}
|
||||||
|
private val list = mutableListOf(
|
||||||
|
DataSyncItem("涌水量观测"),
|
||||||
|
DataSyncItem("导线测量"),
|
||||||
|
DataSyncItem("瓦斯巡检"),
|
||||||
|
DataSyncItem("防灭火检查"),
|
||||||
|
DataSyncItem("通风巡检"),
|
||||||
|
DataSyncItem("地质编录"),
|
||||||
|
DataSyncItem("水文地质编录"),
|
||||||
|
DataSyncItem("隐蔽致灾"),
|
||||||
|
DataSyncItem("地物查询"),
|
||||||
|
DataSyncItem("回采"),
|
||||||
|
DataSyncItem(funcName = "掘进", onDataPull = { tunnelDataPull() }, onDataPush = { tunnelDataPush() })
|
||||||
|
)
|
||||||
|
private val adapter by lazy {
|
||||||
|
DataSyncAdapter(list).apply {
|
||||||
|
setOnItemClickListener { _, _, position ->
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initView(savedInstanceState: Bundle?) {
|
||||||
|
mBinding.toolbarLay.title = "数据同步"
|
||||||
|
mBinding.rvFuncList.let {
|
||||||
|
it.layoutManager = LinearLayoutManager(this)
|
||||||
|
it.adapter = adapter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initData() {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun bindEvent() {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun processClick(v: View?) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun createObserve() {
|
||||||
|
super.createObserve()
|
||||||
|
lifecycleScope.launch {
|
||||||
|
repeatOnLifecycle(Lifecycle.State.CREATED) {
|
||||||
|
launch {
|
||||||
|
getFaceAndRecordList()
|
||||||
|
}
|
||||||
|
launch {
|
||||||
|
getTunnelAllDict()
|
||||||
|
}
|
||||||
|
launch {
|
||||||
|
dataPushSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private suspend fun dataPushSuccess() {
|
||||||
|
mViewModel.tunnelDataPush.collectLatest {
|
||||||
|
showToast("数据推送成功")
|
||||||
|
// TODO: 清除本地所有数据,并从接口拉取最新数据
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private suspend fun getFaceAndRecordList() {
|
||||||
|
mViewModel.tunnelFaceAndRecordList.collectLatest { dataList ->
|
||||||
|
Log.d(TAG, "getFaceAndRecordList: ${dataList.toJsonString()}")
|
||||||
|
dataList?.let { list ->
|
||||||
|
//保存工作面数据
|
||||||
|
list.forEach { it.userId = SpTool.getString(SpTool.USER_ID) }
|
||||||
|
workingFaceViewModel.insertList(list) {}
|
||||||
|
list.forEach { faceEntity ->
|
||||||
|
faceEntity.records?.let { recordList ->
|
||||||
|
val lastRecordId = faceEntity.latestRecord?.recordId
|
||||||
|
val record = recordList.firstOrNull { it.recordId == lastRecordId }
|
||||||
|
record?.latestRecordState = "1"
|
||||||
|
|
||||||
|
//保存工作面记录数据
|
||||||
|
workingFaceRecordViewModel.insertList(recordList)
|
||||||
|
recordList.forEach { recordEntity ->
|
||||||
|
recordEntity.mineWorkingLithologyList?.let { lithologyList ->
|
||||||
|
//保存工作面记录顶板岩性数据
|
||||||
|
roofLithologyViewModel.insertList(lithologyList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private suspend fun getTunnelAllDict() {
|
||||||
|
mViewModel.tunnelAllDict.collectLatest {
|
||||||
|
val dictJson = it.toJsonString()
|
||||||
|
Log.d(TAG, "getTunnelAllDict: $dictJson")
|
||||||
|
SpTool.put(SpTool.DICT_JSON, dictJson)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查数据状态
|
||||||
|
* @param block 入参true-有待提交数据,false-无待提交数据
|
||||||
|
*/
|
||||||
|
private fun checkDataState(block: (Boolean) -> Unit) {
|
||||||
|
workingFaceViewModel.getEntityListByState("1") { faceList ->
|
||||||
|
if (faceList != null && faceList.isNotEmpty()) {
|
||||||
|
block(true)
|
||||||
|
return@getEntityListByState
|
||||||
|
}
|
||||||
|
workingFaceRecordViewModel.getEntityListByState("1") { recordList ->
|
||||||
|
if (recordList != null && recordList.isNotEmpty()) {
|
||||||
|
block(true)
|
||||||
|
return@getEntityListByState
|
||||||
|
}
|
||||||
|
roofLithologyViewModel.getEntityListByState("1") { lithologyList ->
|
||||||
|
if (lithologyList != null && lithologyList.isNotEmpty()) {
|
||||||
|
block(true)
|
||||||
|
return@getEntityListByState
|
||||||
|
}
|
||||||
|
block(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun tunnelDataPull() {
|
||||||
|
checkDataState { state ->
|
||||||
|
if (state) {
|
||||||
|
showToast("本地存在待提交的数据")
|
||||||
|
return@checkDataState
|
||||||
|
}
|
||||||
|
showLoading("加载中")
|
||||||
|
workingFaceViewModel.deleteAll {
|
||||||
|
workingFaceRecordViewModel.deleteAll {
|
||||||
|
roofLithologyViewModel.deleteAll {
|
||||||
|
mViewModel.getTunnelFaceAndRecordList()
|
||||||
|
mViewModel.getTunnelAllDict()
|
||||||
|
mBinding.root.postDelayed({
|
||||||
|
hideLoading()
|
||||||
|
}, 3000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun tunnelDataPush() {
|
||||||
|
showLoading()
|
||||||
|
val submitData = TunnelSubmitData()
|
||||||
|
workingFaceViewModel.getEntityListByState("1") { faceList ->
|
||||||
|
submitData.faceList = faceList
|
||||||
|
workingFaceRecordViewModel.getEntityListByState("1") { recordList ->
|
||||||
|
submitData.recordList = recordList
|
||||||
|
roofLithologyViewModel.getEntityListByState("1") { lithologyList ->
|
||||||
|
hideLoading()
|
||||||
|
submitData.lithologyList = lithologyList
|
||||||
|
if (submitData.faceList.isNullOrEmpty() ||
|
||||||
|
submitData.recordList.isNullOrEmpty() ||
|
||||||
|
submitData.lithologyList.isNullOrEmpty()
|
||||||
|
) {
|
||||||
|
showToast("暂无推送数据")
|
||||||
|
return@getEntityListByState
|
||||||
|
}
|
||||||
|
submitData.recordList?.forEach { entity ->
|
||||||
|
entity.teamShift = DictUtils.getTeamShiftId(entity.teamShift)
|
||||||
|
}
|
||||||
|
Log.d(TAG, "dataPush: ${submitData.toJsonString()}")
|
||||||
|
mViewModel.tunnelDataPush(submitData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+7
-138
@@ -24,7 +24,9 @@ import com.zmkg.coaloperation.superfuntion.startLoginActivity
|
|||||||
import com.zmkg.coaloperation.ui.tunneling.viewmodel.TunnelingViewModel
|
import com.zmkg.coaloperation.ui.tunneling.viewmodel.TunnelingViewModel
|
||||||
import com.zmkg.coaloperation.ui.user.activity.AboutUsActivity
|
import com.zmkg.coaloperation.ui.user.activity.AboutUsActivity
|
||||||
import com.zmkg.coaloperation.ui.user.activity.CacheManageActivity
|
import com.zmkg.coaloperation.ui.user.activity.CacheManageActivity
|
||||||
|
import com.zmkg.coaloperation.ui.user.activity.DataSyncActivity
|
||||||
import com.zmkg.coaloperation.ui.user.activity.NetworkConfigActivity
|
import com.zmkg.coaloperation.ui.user.activity.NetworkConfigActivity
|
||||||
|
import com.zmkg.coaloperation.utils.DictUtils
|
||||||
import com.zmkg.coaloperation.utils.SpTool
|
import com.zmkg.coaloperation.utils.SpTool
|
||||||
import com.zmkg.coaloperation.utils.toJsonString
|
import com.zmkg.coaloperation.utils.toJsonString
|
||||||
import com.zmkg.coaloperation.view.CommonDialog
|
import com.zmkg.coaloperation.view.CommonDialog
|
||||||
@@ -38,18 +40,6 @@ class UserFragment :
|
|||||||
const val TAG = "UserFragment"
|
const val TAG = "UserFragment"
|
||||||
}
|
}
|
||||||
|
|
||||||
private val workingFaceViewModel: TunnelWorkingFaceViewModel by lazy {
|
|
||||||
ViewModelProvider(this)[TunnelWorkingFaceViewModel::class.java]
|
|
||||||
}
|
|
||||||
|
|
||||||
private val workingFaceRecordViewModel: TunnelWorkingFaceRecordViewModel by lazy {
|
|
||||||
ViewModelProvider(this)[TunnelWorkingFaceRecordViewModel::class.java]
|
|
||||||
}
|
|
||||||
|
|
||||||
private val roofLithologyViewModel: TunnelRoofLithologyViewModel by lazy {
|
|
||||||
ViewModelProvider(this)[TunnelRoofLithologyViewModel::class.java]
|
|
||||||
}
|
|
||||||
|
|
||||||
private val updateDialog: CommonDialog by lazy {
|
private val updateDialog: CommonDialog by lazy {
|
||||||
CommonDialog(requireContext(), R.layout.dialog_common_view) {
|
CommonDialog(requireContext(), R.layout.dialog_common_view) {
|
||||||
|
|
||||||
@@ -92,100 +82,6 @@ class UserFragment :
|
|||||||
|
|
||||||
override fun createObserve() {
|
override fun createObserve() {
|
||||||
super.createObserve()
|
super.createObserve()
|
||||||
lifecycleScope.launch {
|
|
||||||
repeatOnLifecycle(Lifecycle.State.CREATED) {
|
|
||||||
launch {
|
|
||||||
getFaceAndRecordList()
|
|
||||||
}
|
|
||||||
launch {
|
|
||||||
getTunnelAllDict()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private suspend fun getFaceAndRecordList() {
|
|
||||||
mViewModel.tunnelFaceAndRecordList.collectLatest { dataList ->
|
|
||||||
Log.d(TAG, "getFaceAndRecordList: ${dataList.toJsonString()}")
|
|
||||||
dataList?.let { list ->
|
|
||||||
//保存工作面数据
|
|
||||||
list.forEach { it.userId = SpTool.getString(SpTool.USER_ID) }
|
|
||||||
workingFaceViewModel.insertList(list) {}
|
|
||||||
list.forEach { faceEntity ->
|
|
||||||
faceEntity.records?.let { recordList ->
|
|
||||||
val lastRecordId = faceEntity.latestRecord?.recordId
|
|
||||||
val record = recordList.firstOrNull { it.recordId == lastRecordId }
|
|
||||||
record?.latestRecordState = "1"
|
|
||||||
|
|
||||||
//保存工作面记录数据
|
|
||||||
workingFaceRecordViewModel.insertList(recordList)
|
|
||||||
recordList.forEach { recordEntity ->
|
|
||||||
recordEntity.mineWorkingLithologyList?.let { lithologyList ->
|
|
||||||
//保存工作面记录顶板岩性数据
|
|
||||||
roofLithologyViewModel.insertList(lithologyList)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private suspend fun getTunnelAllDict() {
|
|
||||||
mViewModel.tunnelAllDict.collectLatest {
|
|
||||||
val dictJson = it.toJsonString()
|
|
||||||
Log.d(TAG, "getTunnelAllDict: $dictJson")
|
|
||||||
SpTool.put(SpTool.DICT_JSON, dictJson)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查数据状态
|
|
||||||
* @param block 入参true-有待提交数据,false-无待提交数据
|
|
||||||
*/
|
|
||||||
private fun checkDataState(block: (Boolean) -> Unit) {
|
|
||||||
workingFaceViewModel.getEntityListByState("1") { faceList ->
|
|
||||||
if (faceList != null && faceList.isNotEmpty()) {
|
|
||||||
block(true)
|
|
||||||
return@getEntityListByState
|
|
||||||
}
|
|
||||||
workingFaceRecordViewModel.getEntityListByState("1") { recordList ->
|
|
||||||
if (recordList != null && recordList.isNotEmpty()) {
|
|
||||||
block(true)
|
|
||||||
return@getEntityListByState
|
|
||||||
}
|
|
||||||
roofLithologyViewModel.getEntityListByState("1") { lithologyList ->
|
|
||||||
if (lithologyList != null && lithologyList.isNotEmpty()) {
|
|
||||||
block(true)
|
|
||||||
return@getEntityListByState
|
|
||||||
}
|
|
||||||
block(false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun dataPush() {
|
|
||||||
showLoading()
|
|
||||||
val submitData = TunnelSubmitData()
|
|
||||||
workingFaceViewModel.getEntityListByState("1") { faceList ->
|
|
||||||
submitData.faceList = faceList
|
|
||||||
workingFaceRecordViewModel.getEntityListByState("1") { recordList ->
|
|
||||||
submitData.recordList = recordList
|
|
||||||
roofLithologyViewModel.getEntityListByState("1") { lithologyList ->
|
|
||||||
hideLoading()
|
|
||||||
submitData.lithologyList = lithologyList
|
|
||||||
if (submitData.faceList.isNullOrEmpty() ||
|
|
||||||
submitData.recordList.isNullOrEmpty() ||
|
|
||||||
submitData.lithologyList.isNullOrEmpty()
|
|
||||||
) {
|
|
||||||
showToast("暂无推送数据")
|
|
||||||
return@getEntityListByState
|
|
||||||
}
|
|
||||||
Log.d(TAG, "dataPush: ${submitData.toJsonString()}")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initMenuList() {
|
private fun initMenuList() {
|
||||||
@@ -202,18 +98,12 @@ class UserFragment :
|
|||||||
)
|
)
|
||||||
userMenuList.add(
|
userMenuList.add(
|
||||||
UserMenuBean(
|
UserMenuBean(
|
||||||
menuName = "数据拉取",
|
menuName = "数据同步",
|
||||||
iconResId = R.drawable.ic_data_pull,
|
iconResId = R.drawable.ic_data_sync,
|
||||||
iconBgResId = R.drawable.bg_icon_data_pull,
|
iconBgResId = R.drawable.bg_icon_data_pull,
|
||||||
click = { dataPull() }
|
click = {
|
||||||
)
|
toActivity(DataSyncActivity::class.java)
|
||||||
)
|
}
|
||||||
userMenuList.add(
|
|
||||||
UserMenuBean(
|
|
||||||
menuName = "数据推送",
|
|
||||||
iconResId = R.drawable.ic_data_push,
|
|
||||||
iconBgResId = R.drawable.bg_icon_data_push,
|
|
||||||
click = { dataPush() }
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
userMenuList.add(
|
userMenuList.add(
|
||||||
@@ -258,25 +148,4 @@ class UserFragment :
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun dataPull() {
|
|
||||||
checkDataState { state ->
|
|
||||||
if (state) {
|
|
||||||
showToast("本地存在待提交的数据")
|
|
||||||
return@checkDataState
|
|
||||||
}
|
|
||||||
showLoading("加载中")
|
|
||||||
workingFaceViewModel.deleteAll {
|
|
||||||
workingFaceRecordViewModel.deleteAll {
|
|
||||||
roofLithologyViewModel.deleteAll {
|
|
||||||
mViewModel.getTunnelFaceAndRecordList()
|
|
||||||
mViewModel.getTunnelAllDict()
|
|
||||||
mBinding.root.postDelayed({
|
|
||||||
hideLoading()
|
|
||||||
}, 3000)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ object DictUtils {
|
|||||||
areaMap.put(it.key, tempList)
|
areaMap.put(it.key, tempList)
|
||||||
}
|
}
|
||||||
val seamId: LazilyParsedNumber = it.value?.get("seamId") as LazilyParsedNumber
|
val seamId: LazilyParsedNumber = it.value?.get("seamId") as LazilyParsedNumber
|
||||||
//Log.d("DictUtils", "initData: idType= ${seamId?.javaClass?.name}, id=${seamId.toInt()},name=${it.value?.get("areaName")}")
|
//Log.d("DictUtils", "initData: idType= ${seamId?.javaClass?.name}, id=${seamId.toInt(aa)},name=${it.value?.get("areaName")}")
|
||||||
tempList?.add(WorkOption(id = ""+ seamId.toInt(), ""+ it.value?.get("areaName")))
|
tempList?.add(WorkOption(id = ""+ seamId.toInt(), ""+ it.value?.get("areaName")))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -55,5 +55,8 @@ object DictUtils {
|
|||||||
if (shift == null) return ""
|
if (shift == null) return ""
|
||||||
return workShiftList.firstOrNull { it.id == shift }?.name ?: shift
|
return workShiftList.firstOrNull { it.id == shift }?.name ?: shift
|
||||||
}
|
}
|
||||||
|
fun getTeamShiftId(shift: String?): String {
|
||||||
|
if (shift == null) return ""
|
||||||
|
return workShiftList.firstOrNull { it.name == shift }?.id ?: shift
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,8 @@ object ExcelExportUtils {
|
|||||||
subTitleList.forEachIndexed { index, subTitle ->
|
subTitleList.forEachIndexed { index, subTitle ->
|
||||||
subHeader.createCell(list.size - 1 + index).setCellValue(subTitle)
|
subHeader.createCell(list.size - 1 + index).setCellValue(subTitle)
|
||||||
}
|
}
|
||||||
sheet.addMergedRegion(CellRangeAddress(0, 0, 9, 11))
|
// sheet.addMergedRegion(CellRangeAddress(0, 0, 9, 11))
|
||||||
|
sheet.addMergedRegion(CellRangeAddress(0, 0, 10, 12))
|
||||||
for (i in 0 until list.size - 1) {
|
for (i in 0 until list.size - 1) {
|
||||||
sheet.addMergedRegion(CellRangeAddress(0, 1, i, i))
|
sheet.addMergedRegion(CellRangeAddress(0, 1, i, i))
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
@@ -11,7 +11,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/black"
|
android:background="@color/black_bg"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<include
|
<include
|
||||||
@@ -30,10 +30,10 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="20dp"
|
android:layout_marginHorizontal="20dp"
|
||||||
tools:itemCount="6"
|
android:background="@drawable/bg_stroke_gray"
|
||||||
android:overScrollMode="never"
|
android:overScrollMode="never"
|
||||||
tools:listitem="@layout/list_item_add_mining_face"
|
tools:itemCount="6"
|
||||||
android:background="@drawable/bg_stroke_gray"/>
|
tools:listitem="@layout/list_item_add_mining_face" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.allen.library.shape.ShapeTextView
|
<com.allen.library.shape.ShapeTextView
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/black"
|
android:background="@color/black_bg"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<include
|
<include
|
||||||
|
|||||||
@@ -335,11 +335,12 @@
|
|||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="20dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:gravity="center_vertical|end"
|
android:gravity="center_vertical|end"
|
||||||
android:includeFontPadding="false"
|
android:includeFontPadding="false"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
android:text="°"
|
android:text="°"
|
||||||
android:textColor="#6A6F87"
|
android:textColor="#6A6F87"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
@@ -382,12 +383,61 @@
|
|||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="20dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:gravity="center_vertical|end"
|
android:gravity="center_vertical|end"
|
||||||
android:includeFontPadding="false"
|
android:includeFontPadding="false"
|
||||||
android:text="m"
|
android:text="m"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:textColor="#6A6F87"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:background="@drawable/bottom_border"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="15dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="涌水量"
|
||||||
|
android:textColor="#6A6F87"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etWaterYield"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="center_vertical|end"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:background="@drawable/bg_solid_black"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:hint="请输入"
|
||||||
|
android:maxWidth="100dp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:minWidth="60dp"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textColorHint="#6A6F87"
|
||||||
|
android:textCursorDrawable="@drawable/cursor_white"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:gravity="center_vertical|end"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:text="m³/h"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
android:textColor="#6A6F87"
|
android:textColor="#6A6F87"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/toolbar_lay"
|
android:layout_below="@+id/toolbar_lay"
|
||||||
android:background="@color/black"
|
android:background="@color/black_bg"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<com.allen.library.shape.ShapeLinearLayout
|
<com.allen.library.shape.ShapeLinearLayout
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?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:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/black_bg"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbar_lay"
|
||||||
|
layout="@layout/lay_title_right_bar" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rvFuncList"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
tools:listitem="@layout/list_item_data_sync"
|
||||||
|
android:overScrollMode="never" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</layout>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/black"
|
android:background="@color/black_bg"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<include
|
<include
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/black"
|
android:background="@color/black_bg"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<include
|
<include
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/black">
|
android:background="@color/black_bg">
|
||||||
|
|
||||||
<com.allen.library.shape.ShapeFrameLayout
|
<com.allen.library.shape.ShapeFrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="58dp"
|
android:layout_height="58dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:background="@color/black"
|
android:background="@color/black_bg"
|
||||||
app:config_file_name="tab.json"
|
app:config_file_name="tab.json"
|
||||||
app:container_id="@id/main_content_layout" />
|
app:container_id="@id/main_content_layout" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
@@ -0,0 +1,158 @@
|
|||||||
|
<?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"
|
||||||
|
tools:ignore="HardcodedText,Autofill,TextFields" >
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/black_bg"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbar_lay"
|
||||||
|
layout="@layout/lay_title_right_bar" />
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.zmkg.coaloperation.view.NestedRecyclerView
|
||||||
|
android:id="@+id/rvBaseData"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
android:background="@drawable/bg_stroke_gray"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
tools:listitem="@layout/list_item_mining_record_base_data"
|
||||||
|
tools:itemCount="4"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:drawablePadding="5dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="实测煤厚"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
app:drawableStartCompat="@drawable/line_green"/>
|
||||||
|
|
||||||
|
<com.zmkg.coaloperation.view.NestedRecyclerView
|
||||||
|
android:id="@+id/rvCoalThickness"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
tools:listitem="@layout/list_item_mining_record_coal_thickness"
|
||||||
|
tools:itemCount="4"
|
||||||
|
android:background="@drawable/bg_stroke_gray" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@drawable/bg_stroke_gray">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_gravity="start"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="是否出水"
|
||||||
|
android:textColor="#FF6A6F87"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvWaterOutflow"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginEnd="15dp"
|
||||||
|
android:drawablePadding="2dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:text="请选择"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:drawableEndCompat="@drawable/ic_arrow_down_white" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:background="@drawable/bg_stroke_gray">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_gravity="start"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="回采工作面涌水量"
|
||||||
|
android:textColor="#FF6A6F87"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etInputValue"
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:background="@drawable/rectangle_stroke_grey_corner8"
|
||||||
|
android:hint="请输入"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textColorHint="#757B8C"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginEnd="15dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="m³/h"
|
||||||
|
android:textColor="#FF6A6F87"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
<com.allen.library.shape.ShapeTextView
|
||||||
|
android:id="@+id/btnSaveRecord"
|
||||||
|
android:layout_width="250dp"
|
||||||
|
android:layout_height="52dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginBottom="20dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="保存"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="18sp"
|
||||||
|
app:shapeCornersRadius="30dp"
|
||||||
|
app:shapeSolidColor="#21A69A" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@+id/toolbar_lay"
|
android:layout_below="@+id/toolbar_lay"
|
||||||
android:background="@color/black"
|
android:background="@color/black_bg"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<com.allen.library.shape.ShapeLinearLayout
|
<com.allen.library.shape.ShapeLinearLayout
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/black">
|
android:background="@color/black_bg">
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/black"
|
android:background="@color/black_bg"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<include
|
<include
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/black"
|
android:background="@color/black_bg"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<include
|
<include
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:background="@{transparentBg?@color/transparent:@color/black}"
|
android:background="@{transparentBg?@color/transparent:@color/black}"
|
||||||
tools:background="@color/black">
|
tools:background="@color/black_bg">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/title_iv_back"
|
android:id="@+id/title_iv_back"
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<!-- android:background="#0C0D0E"-->
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvFuncName"
|
android:id="@+id/tvFuncName"
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:background="@drawable/bg_stroke_gray"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvItemUnit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16sp"
|
||||||
|
tools:text="m" />
|
||||||
|
|
||||||
|
<!-- <com.google.android.material.divider.MaterialDivider-->
|
||||||
|
<!-- android:id="@+id/divider"-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="1dp"-->
|
||||||
|
<!-- app:dividerColor="#282C38" />-->
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</layout>
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<com.google.android.material.divider.MaterialDivider
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
app:dividerColor="#282C38"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvItemName"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="#FF6A6F87"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
tools:text="长度" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvItemUnit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginEnd="15dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:maxLines="1"
|
||||||
|
tools:text="m"
|
||||||
|
android:textColor="#FF6A6F87"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etItemValue"
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/tvItemUnit"
|
||||||
|
android:theme="@style/Theme.AppCompat.DayNight"
|
||||||
|
android:background="@drawable/rectangle_stroke_grey_corner8"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:hint="请输入"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textColorHint="#757B8C"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
tools:background="@color/black_bg"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etItemName"
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:background="@drawable/rectangle_stroke_grey_corner8"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:hint="请输入"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textColorHint="#757B8C"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:theme="@style/Theme.AppCompat.DayNight"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<com.google.android.material.divider.MaterialDivider
|
||||||
|
android:id="@+id/divider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
app:dividerColor="#282C38"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/etItemName" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvNameUnit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="28dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="#架"
|
||||||
|
android:textColor="#FF6A6F87"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/etItemName"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/etItemName"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/etItemName" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvValueUnit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginEnd="15dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="#FF6A6F87"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/etItemName"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/etItemName"
|
||||||
|
tools:text="m" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etItemValue"
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:background="@drawable/rectangle_stroke_grey_corner8"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:hint="请输入"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textColorHint="#757B8C"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:theme="@style/Theme.AppCompat.DayNight"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/etItemName"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/tvValueUnit"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/etItemName" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/dash_line"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/etItemName"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/etItemValue"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tvNameUnit"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/etItemName" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnAddPoint"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:drawablePadding="7dp"
|
||||||
|
android:paddingStart="5dp"
|
||||||
|
android:paddingEnd="5dp"
|
||||||
|
android:text="新增支架号"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:drawableStartCompat="@drawable/ic_add_point"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/etItemName" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
Reference in New Issue
Block a user