From 17eb1d06e104bc1cd93498fe3a3eaecf14c9d734 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 12 十一月 2020 13:57:35 +0800
Subject: [PATCH] 1. 修复现场整改时,问题状态是‘问题审核通过’而不是“整改未审核”的问题; 2. 修改任意拍照界面的多图片展示方式为Glide,减少内存溢出的可能性; 3. 新增图片类型枚举类,罗列原有的图片类型,并新增“铭牌”和“监测设备”; 4. 修复导航功能可能导致空指针的问题; 5. 任意拍界面新增按分类拍摄功能; 6. 修复现场整改界面打开崩溃问题;
---
app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuProblemUpdateActivity.kt | 46 ++++++++++++++++++++++++++++++----------------
1 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuProblemUpdateActivity.kt b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuProblemUpdateActivity.kt
index c72805a..12f3f07 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuProblemUpdateActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdapp/module/inspection/MenuProblemUpdateActivity.kt
@@ -78,6 +78,36 @@
problemVo = intent.getSerializableExtra("problemlistVo") as ProblemlistVo
}
+ override fun onSuggestionLoaded() {
+ super.onSuggestionLoaded()
+ if (problemVo != null && viewModel.suggestionList.value?.isNotEmpty() == true) {
+ //鏁存敼寤鸿
+ var advice = problemVo!!.advise
+ var getSuggestion = false
+ for (i in viewModel.suggestionList.value?.indices ?: 0..0) {
+ val s = viewModel.suggestionList.value?.get(i)
+ if (s != null && advice.contains(s)) {
+ advice = advice.replace(s, "")
+ sp_take_evidence_select_suggestion.setSelection(i)
+ getSuggestion = true
+ break
+ }
+ }
+ //鏁存敼寤鸿澶囨敞
+ if (getSuggestion) {
+ var suggestionRemark = advice.removeRange(0, 1)//鍒犻櫎绗竴涓瓧绗︼紝鎷彿鈥滐紙鈥�
+ suggestionRemark = suggestionRemark.dropLast(1)//鍒犻櫎鏈�鍚庝竴涓瓧绗︼紝鎷彿鈥滐級鈥�
+ et_take_evidence_suggestion.setText(suggestionRemark)
+ }
+ }
+ sp_take_evidence_select_problem_type.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
+ override fun onNothingSelected(parent: AdapterView<*>?) = Unit
+ override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
+ onProblemTypeSelected(position)
+ }
+ }
+ }
+
override fun initObserver() {
super.initObserver()
viewModel.loadingOver.observe(this, Observer {
@@ -131,22 +161,6 @@
locationRemark = locationRemark.dropLast(1)//鍒犻櫎鏈�鍚庝竴涓瓧绗︼紝鎷彿鈥滐級鈥�
}
et_take_evidence_location.setText(locationRemark)
-
- //鏁存敼寤鸿
- var advice = problemVo!!.advise
- var suggestion = ""
- for (i in viewModel.suggestionList.value?.indices ?: 0..0) {
- val s = viewModel.suggestionList.value?.get(i)
- if (s != null && advice.contains(s)) {
- advice = advice.replace(s, "")
- sp_take_evidence_select_suggestion.setSelection(i)
- break
- }
- }
- //鏁存敼寤鸿澶囨敞
- var suggestionRemark = advice.removeRange(0, 1)//鍒犻櫎绗竴涓瓧绗︼紝鎷彿鈥滐紙鈥�
- suggestionRemark = suggestionRemark.dropLast(1)//鍒犻櫎鏈�鍚庝竴涓瓧绗︼紝鎷彿鈥滐級鈥�
- et_take_evidence_suggestion.setText(suggestionRemark)
}
})
--
Gitblit v1.9.3