[6.8.0]
[fix] [多弹框问题]
This commit is contained in:
@@ -57,6 +57,8 @@ class RoutingRunningView: ConstraintLayout, RoutingRunningModel.RoutingRuningCal
|
||||
private var viewModel: RoutingRunningModel?=null
|
||||
private var swtichViewModel: RoutingSwitchModel?=null
|
||||
|
||||
private var closeRouting: CommonDialogStatus?=null
|
||||
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.unmanned_routing_running, this, true)
|
||||
@@ -83,31 +85,38 @@ class RoutingRunningView: ConstraintLayout, RoutingRunningModel.RoutingRuningCal
|
||||
|
||||
private fun showFeedbackDialog(grayId: Long) {
|
||||
val occurrenceTime = System.currentTimeMillis()
|
||||
CommonDialogStatus
|
||||
.Builder()
|
||||
.title("路线验证结束")
|
||||
.tips("请点击按钮反馈验证结果")
|
||||
.showClose(true)
|
||||
.cancelTextColor(R.color.taxi_color_FF4E41)
|
||||
.cancelStr("线路不可用")
|
||||
.confirmStr("线路可用")
|
||||
.status(CommonDialogStatus.Status.success)
|
||||
.clickListener(object :CommonDialogStatus.ClickListener{
|
||||
override fun confirm() {
|
||||
swtichViewModel?.showLoading()
|
||||
viewModel?.endGrayTask( grayId,
|
||||
EndGrayTaskFeedbackType.USABLE_YES,
|
||||
occurrenceTime)
|
||||
}
|
||||
if(closeRouting==null) {
|
||||
closeRouting = CommonDialogStatus
|
||||
.Builder()
|
||||
.title("路线验证结束")
|
||||
.tips("请点击按钮反馈验证结果")
|
||||
.showClose(true)
|
||||
.cancelTextColor(R.color.taxi_color_FF4E41)
|
||||
.cancelStr("线路不可用")
|
||||
.confirmStr("线路可用")
|
||||
.status(CommonDialogStatus.Status.success)
|
||||
.build(context)
|
||||
}
|
||||
closeRouting?.setClickListener(object : CommonDialogStatus.ClickListener {
|
||||
override fun confirm() {
|
||||
swtichViewModel?.showLoading()
|
||||
viewModel?.endGrayTask(
|
||||
grayId,
|
||||
EndGrayTaskFeedbackType.USABLE_YES,
|
||||
occurrenceTime
|
||||
)
|
||||
}
|
||||
|
||||
override fun cancel() {
|
||||
swtichViewModel?.showLoading()
|
||||
viewModel?.endGrayTask( grayId,
|
||||
EndGrayTaskFeedbackType.USABLE_NO,
|
||||
occurrenceTime)
|
||||
}
|
||||
})
|
||||
.build(context).show()
|
||||
override fun cancel() {
|
||||
swtichViewModel?.showLoading()
|
||||
viewModel?.endGrayTask(
|
||||
grayId,
|
||||
EndGrayTaskFeedbackType.USABLE_NO,
|
||||
occurrenceTime
|
||||
)
|
||||
}
|
||||
})
|
||||
closeRouting?.show()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user