| | |
| | | super.onResume() |
| | | viewModel.getInfo() |
| | | viewModel.querySchedule() |
| | | viewModel.getMyCruiseCheckInMissionInfo() |
| | | } |
| | | |
| | | @SuppressLint("UseKtx") |
| | |
| | | |
| | | binding.nav.setOnClickListener { |
| | | viewModel.clockModel.value?.let { |
| | | if ((it.xpCheckLocation?.locationLat ?: 0.0) != 0.0 && (it.xpCheckLocation?.locationLon ?: 0.0) != 0.0) { |
| | | if ((it.xpCheckLocation?.locationLat |
| | | ?: 0.0) != 0.0 && (it.xpCheckLocation?.locationLon ?: 0.0) != 0.0 |
| | | ) { |
| | | navigate( |
| | | end = LatLng( |
| | | it.xpCheckLocation?.locationLat!!, |
| | |
| | | binding.status.setTextColor(getResColor(com.xw.common.R.color.orange_5)) |
| | | binding.status.setBackgroundResource(R.drawable.shape_orange_1_bg_4) |
| | | } |
| | | |
| | | 2 -> { |
| | | binding.status.text = "上班中" |
| | | binding.status.setTextColor(getResColor(com.xw.common.R.color.green_5)) |
| | | binding.status.setBackgroundResource(R.drawable.shape_green_1_bg_4) |
| | | } |
| | | |
| | | 3 -> { |
| | | binding.status.text = "休息" |
| | | binding.status.setTextColor(getResColor(com.xw.common.R.color.gray_9)) |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | viewModel.cruiseCheckInMissionInfo.observe(this) { |
| | | binding.tvMissionTime.text = viewModel.getFormateCruiseCheckInMissionTime() |
| | | binding.cpvProgress.setProgress(viewModel.getCruiseCheckInProgress(), true) |
| | | binding.tvMissionPointCount.text = it.checkInPointCount.toString() |
| | | binding.tvHadReportNum.text = it.checkInPointFinishCount.toString() |
| | | binding.tvNotReportNum.text = it.checkInPointUnFinishCount.toString() |
| | | } |
| | | } |
| | | |
| | | } |