[fix]
[多弹框问题]
This commit is contained in:
yangyakun
2024-12-03 15:13:15 +08:00
parent 7a6f4f7589
commit aa172fc9e3

View File

@@ -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()
}
/**