|
|
@@ -12,6 +12,7 @@ import com.grkj.iscs.model.vo.ticket.LotoMapRespVO
|
|
|
import com.grkj.iscs.model.vo.ticket.StepDetailRespVO
|
|
|
import com.grkj.iscs.util.log.LogUtil
|
|
|
import com.grkj.iscs.view.base.BaseMvpFragment
|
|
|
+import com.grkj.iscs.view.dialog.TipDialog
|
|
|
import com.grkj.iscs.view.iview.IStepView
|
|
|
import com.grkj.iscs.view.presenter.StepPresenter
|
|
|
import com.zhy.adapter.recyclerview.CommonAdapter
|
|
|
@@ -28,11 +29,13 @@ class StepFragment(val goBack: () -> Unit, val changePage: (PageChangeBO) -> Uni
|
|
|
private var mChangePage: PageChangeBO? = null
|
|
|
private var mMachineryDetail: MachineryDetailRespVO? = null
|
|
|
private var mStep: Int = 0
|
|
|
+ private lateinit var mTipDialog: TipDialog
|
|
|
|
|
|
override val viewBinding: FragmentStepBinding
|
|
|
get() = FragmentStepBinding.inflate(layoutInflater)
|
|
|
|
|
|
override fun initView() {
|
|
|
+ mTipDialog = TipDialog(requireActivity())
|
|
|
mStepList = mutableListOf(
|
|
|
StepBO(R.mipmap.step1, getString(R.string.recognize_work_content), 1, "①"),
|
|
|
StepBO(R.mipmap.step2, getString(R.string.power_isolation_way), 2, "②"),
|
|
|
@@ -153,9 +156,28 @@ class StepFragment(val goBack: () -> Unit, val changePage: (PageChangeBO) -> Uni
|
|
|
3 -> {
|
|
|
changePage(PageChangeBO(1, mChangePage?.workstationId, mChangePage?.ticketId, mChangePage?.machineryId, mChangePage?.machineryName))
|
|
|
}
|
|
|
+ 4 -> {
|
|
|
+ if (mStep == 0) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ mTipDialog.setTip(getString(R.string.action_confirm_shut_down))
|
|
|
+ mTipDialog.setConfirmListener {
|
|
|
+ presenter?.updateStep(mStepList[2].stepDetail?.stepId!!, "1") {
|
|
|
+ presenter?.updateStep(mStepList[3].stepDetail?.stepId!!, "1") {
|
|
|
+ refreshPage(mChangePage!!)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ mTipDialog.show()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ override fun onPause() {
|
|
|
+ super.onPause()
|
|
|
+ mStep = 0
|
|
|
+ }
|
|
|
+
|
|
|
override fun initPresenter(): StepPresenter {
|
|
|
return StepPresenter()
|
|
|
}
|