From 3013b813e5df6977c0be921928f73b1a3adde290 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期三, 02 七月 2025 15:52:04 +0800
Subject: [PATCH] ### 一、巡查模块相关
---
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuEvidenceActivity.kt | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuEvidenceActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuEvidenceActivity.kt
index bf1be53..1d9126a 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuEvidenceActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuEvidenceActivity.kt
@@ -17,8 +17,12 @@
import cn.flightfeather.thirdappmodule.module.base.BaseTakePicActivity
import cn.flightfeather.thirdappmodule.util.DateFormatter
import cn.flightfeather.thirdappmodule.util.Domain
+import cn.flightfeather.thirdappmodule.util.SystemServiceUtils
import cn.flightfeather.thirdappmodule.util.UUIDGenerator
import cn.flightfeather.thirdappmodule.util.file.FileUtil
+import cn.flightfeather.thirdappmodule.util.file.FileUtils
+import com.flightfeather.taizhang.common.utils.download.UpDownloadUtil
+import io.reactivex.Observable
import kotlinx.android.synthetic.main.dialog_take_evidence.*
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
@@ -26,6 +30,7 @@
import java.io.File
import java.io.IOException
import java.util.*
+import kotlin.collections.ArrayList
/**
* @author riku
@@ -47,6 +52,7 @@
var scene: Scense? = null
var lat = 0.0
var lng = 0.0
+ var picUrls: ArrayList<String>? = null
protected var submitTime = 0L//鎻愪氦鏃堕棿锛岄槻姝㈣繛缁彁浜わ紝澶氭璁板綍
@@ -61,7 +67,7 @@
getExtra()
initUI()
initObserver()
-
+ loadOnlinePic()
subTask?.let { t ->
scene?.let { s ->
viewModel.getLocationList(s.typeid.toInt())
@@ -77,6 +83,7 @@
scene = intent.getSerializableExtra("scene") as Scense?
lat = intent.getDoubleExtra("lat", 0.0)
lng = intent.getDoubleExtra("lng", 0.0)
+ picUrls = intent.getStringArrayListExtra("picUrls")
}
private fun initUI() {
@@ -172,6 +179,17 @@
}
+ private fun loadOnlinePic() {
+ picUrls?.forEach {
+ UpDownloadUtil.download(this, it, FileUtils.getFileName(it), {path ->
+ pathTempList.add(Pair(File(path), true))
+ refreshImageView()
+ }, {
+ toast("闂鍥剧墖涓嬭浇澶辫触")
+ })
+ }
+ }
+
protected fun updateUIByProblemType(visible: Int) {
sp_take_evidence_select_location.visibility = visible
et_take_evidence_location.visibility = visible
--
Gitblit v1.9.3