From 1897c4ad5fa73b3f0a36e1aa0e1e9000302a6ace Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 31 十月 2025 17:35:09 +0800
Subject: [PATCH] 2025.10.31 1. 新增巡查场景历史详情相关数据逻辑(待完成);
---
.idea/libraries/Gradle__com_android_databinding_library_4_2_0_aar.xml | 13
app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseActivity.kt | 4
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuSceneHistoryActivity_backup.kt | 136 +++++++++
.idea/libraries/Gradle__com_squareup_okio_okio_1_13_0.xml | 13
app/src/main/java/cn/flightfeather/thirdappmodule/databinding/SceneHistoryViewModel.kt | 67 ++++
.idea/libraries/Gradle__com_android_databinding_adapters_4_2_0_aar.xml | 13
app/src/main/java/cn/flightfeather/thirdappmodule/util/DateUtil.kt | 8
app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/DataProdSingleSceneService.kt | 2
.idea/misc.xml | 1
/dev/null | 151 ----------
.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_3_8_0.xml | 13
app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuSceneHistoryActivity.kt | 114 ------
.idea/libraries/Gradle__com_android_databinding_viewbinding_4_2_0_aar.xml | 13
app/src/main/java/cn/flightfeather/thirdappmodule/repository/DataProdSingleSceneRepository.kt | 6
app/src/main/res/layout/dialog_scene_history_2.xml | 313 +++++++++++---------
.idea/libraries/Gradle__com_android_databinding_baseLibrary_4_2_0.xml | 13
16 files changed, 469 insertions(+), 411 deletions(-)
diff --git a/.idea/libraries/Gradle__com_android_databinding_adapters_4_2_0_aar.xml b/.idea/libraries/Gradle__com_android_databinding_adapters_4_2_0_aar.xml
new file mode 100644
index 0000000..6fad20c
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_databinding_adapters_4_2_0_aar.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Gradle: com.android.databinding:adapters:4.2.0@aar">
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/caches/transforms-3/77362f090f3736827f6496ac41c054b9/transformed/adapters-4.2.0/jars/classes.jar!/" />
+ <root url="file://$USER_HOME$/.gradle/caches/transforms-3/77362f090f3736827f6496ac41c054b9/transformed/adapters-4.2.0/res" />
+ <root url="file://$USER_HOME$/.gradle/caches/transforms-3/77362f090f3736827f6496ac41c054b9/transformed/adapters-4.2.0/AndroidManifest.xml" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.databinding/adapters/4.2.0/57135f758b69caf36461e12e37a9437899ac9681/adapters-4.2.0-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_databinding_baseLibrary_4_2_0.xml b/.idea/libraries/Gradle__com_android_databinding_baseLibrary_4_2_0.xml
new file mode 100644
index 0000000..9711c47
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_databinding_baseLibrary_4_2_0.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Gradle: com.android.databinding:baseLibrary:4.2.0">
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.databinding/baseLibrary/4.2.0/60a87775da182d9d6156d6e0fd7da74a9aced2ed/baseLibrary-4.2.0.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.databinding/baseLibrary/4.2.0/721f959dffa8f516abc493e31a2416821d52e041/baseLibrary-4.2.0-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.databinding/baseLibrary/4.2.0/f719fafa4a07e0cf70dc4f868214a4b14c22ca3a/baseLibrary-4.2.0-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_databinding_library_4_2_0_aar.xml b/.idea/libraries/Gradle__com_android_databinding_library_4_2_0_aar.xml
new file mode 100644
index 0000000..435420f
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_databinding_library_4_2_0_aar.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Gradle: com.android.databinding:library:4.2.0@aar">
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/caches/transforms-3/515aec787bd894183db38a3d7db71513/transformed/library-4.2.0/jars/classes.jar!/" />
+ <root url="file://$USER_HOME$/.gradle/caches/transforms-3/515aec787bd894183db38a3d7db71513/transformed/library-4.2.0/res" />
+ <root url="file://$USER_HOME$/.gradle/caches/transforms-3/515aec787bd894183db38a3d7db71513/transformed/library-4.2.0/AndroidManifest.xml" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.databinding/library/4.2.0/539bf2f876e2165951cfa398bafe2b01c46fdb35/library-4.2.0-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_databinding_viewbinding_4_2_0_aar.xml b/.idea/libraries/Gradle__com_android_databinding_viewbinding_4_2_0_aar.xml
new file mode 100644
index 0000000..3b59794
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_databinding_viewbinding_4_2_0_aar.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Gradle: com.android.databinding:viewbinding:4.2.0@aar">
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/caches/transforms-3/ff08e615976def9f0c8d9eb7219771c6/transformed/viewbinding-4.2.0/jars/classes.jar!/" />
+ <root url="file://$USER_HOME$/.gradle/caches/transforms-3/ff08e615976def9f0c8d9eb7219771c6/transformed/viewbinding-4.2.0/res" />
+ <root url="file://$USER_HOME$/.gradle/caches/transforms-3/ff08e615976def9f0c8d9eb7219771c6/transformed/viewbinding-4.2.0/AndroidManifest.xml" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.android.databinding/viewbinding/4.2.0/d152d79d617c68782e49416ebab745215327e5fc/viewbinding-4.2.0-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_3_8_0.xml b/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_3_8_0.xml
new file mode 100644
index 0000000..093005f
--- /dev/null
+++ b/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_3_8_0.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Gradle: com.squareup.okhttp3:okhttp:3.8.0">
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.8.0/5a11f020cce2d11eb71ba916700600e18c4547e7/okhttp-3.8.0.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.8.0/4b6ef933f65760047e694e1495a9853ca594a695/okhttp-3.8.0-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.8.0/db21293949e200f08d5325e8a8eefdcc9134b752/okhttp-3.8.0-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_squareup_okio_okio_1_13_0.xml b/.idea/libraries/Gradle__com_squareup_okio_okio_1_13_0.xml
new file mode 100644
index 0000000..913412c
--- /dev/null
+++ b/.idea/libraries/Gradle__com_squareup_okio_okio_1_13_0.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Gradle: com.squareup.okio:okio:1.13.0">
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.13.0/d4275e004f2d6e405f3ad866cc64131a17e3b60e/okio-1.13.0-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.13.0/f4c91e12121af963e3ef76e81c82aa75ba6e8533/okio-1.13.0-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 33de404..5a0a38f 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -141,6 +141,7 @@
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_night_work_empty.xml" value="0.3338541666666667" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_recycler_view_refresh.xml" value="0.3338541666666667" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_scene_history.xml" value="0.3338541666666667" />
+ <entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_scenseinfo.xml" value="0.3338541666666667" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_search.xml" value="0.21145833333333333" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_search_2.xml" value="0.5" />
<entry key="..\:/AndroidStudioProjects/supervision_online/branches/customer_pollution_scene/app/src/main/res/layout/layout_search_bar.xml" value="0.21145833333333333" />
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/databinding/SceneHistoryViewModel.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/databinding/SceneHistoryViewModel.kt
index 1c81e5c..165d72c 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/databinding/SceneHistoryViewModel.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/databinding/SceneHistoryViewModel.kt
@@ -1,7 +1,9 @@
package cn.flightfeather.thirdappmodule.databinding
import android.arch.lifecycle.MutableLiveData
+import android.view.View
import cn.flightfeather.thirdappmodule.bean.vo.DPChangeInfo
+import cn.flightfeather.thirdappmodule.bean.vo.DPProblemRecurrence
import cn.flightfeather.thirdappmodule.bean.vo.QueryOptSingle
import cn.flightfeather.thirdappmodule.common.net.ResultCallBack
import cn.flightfeather.thirdappmodule.module.base.BaseViewModel
@@ -9,6 +11,7 @@
import cn.flightfeather.thirdappmodule.util.DateUtil
import org.jetbrains.anko.toast
import java.util.*
+import kotlin.math.round
/**
* 鍦烘櫙鍘嗗彶鎯呭喌
@@ -16,16 +19,40 @@
* Date: 2025/10/30
*/
class SceneHistoryViewModel : BaseViewModel() {
+
+ companion object {
+ const val CHANGE_PER = 0.8
+ }
+
private val dataProdSingleSceneRepository = DataProdSingleSceneRepository.instance
// 涓婁釜鏈堟暣鏀圭巼鏈�宸殑鎯呭喌
var worstChangeInfo = MutableLiveData<DPChangeInfo>()
- fun getChangeInfoList(sceneId: String) {
+ var changeInfoTxt = MutableLiveData<String>()
+ var changeEfficiencyTxt = MutableLiveData<String>()
+
+ // 闂澶嶅彂鎯呭喌
+// var problemRecurrenceList = MutableLiveData<List<DPProblemRecurrence>>()
+ var worstProblemRecurrence = MutableLiveData<DPProblemRecurrence>()
+
+ //
+ fun fetchChangeInfoList(sceneId: String) {
val queryOpts = getQueryOptSingleList(sceneId)
dataProdSingleSceneRepository.getChangeInfoList(queryOpts, object : ResultCallBack<List<DPChangeInfo>> {
override fun onSuccess(result: List<DPChangeInfo>?) {
if (!result.isNullOrEmpty()) {
+ changeInfoTxt.value = result.mapIndexed { i, info ->
+ // 绛涢�夊瓨鍦ㄩ棶棰橈紝骞朵笖鏁存敼鐜囧皬浜�80%鐨勬湀浠�
+ if (info.subTasks.isNullOrEmpty() && info.changePer >= CHANGE_PER) {
+ ""
+ } else {
+ val time = DateUtil.parseYearMonth(queryOpts[i].startTime) ?: return@mapIndexed ""
+ val cal = Calendar.getInstance().apply { setTime(time) }
+ "${cal.get(Calendar.MONTH) + 1}鏈堟暣鏀圭巼涓�${round(info.changePer * 100)}%"
+ }
+ }.filter { it.isNotBlank() }.joinToString("锛�") + "锛屾暣鏀圭巼杈冧綆锛岄渶鍔犲己鐩戠銆�"
+
worstChangeInfo.value = result[0]
}
}
@@ -36,6 +63,44 @@
})
}
+ fun fetchProblemRecurrence(sceneId:String) {
+ // 鑾峰彇鍓嶄笁涓湀鐨勫唴鐨勮褰�
+ val queryOpt = QueryOptSingle().apply {
+ this.sceneId = sceneId
+ val now = Calendar.getInstance().apply {
+ set(Calendar.DAY_OF_MONTH, 1)
+ set(Calendar.HOUR_OF_DAY, 0)
+ set(Calendar.MINUTE, 0)
+ set(Calendar.SECOND, 0)
+ }
+ // 寰楀埌涓婃湀鏈�鍚庝竴澶�
+ now.add(Calendar.SECOND, -1)
+ endTime = DateUtil.getDateStr(now.time)
+ // 寰楀埌鍓�4涓湀绗竴澶�
+ now.apply {
+ set(Calendar.DAY_OF_MONTH, 1)
+ set(Calendar.HOUR_OF_DAY, 0)
+ set(Calendar.MINUTE, 0)
+ set(Calendar.SECOND, 0)
+ }
+ now.add(Calendar.MONTH, 2)
+ startTime = DateUtil.getDateStr(now.time)
+ }
+ dataProdSingleSceneRepository.getProblemRecurrence(queryOpt, object : ResultCallBack<List<DPProblemRecurrence>> {
+ override fun onSuccess(result: List<DPProblemRecurrence>?) {
+ if (!result.isNullOrEmpty()) {
+ worstProblemRecurrence.value = result[0]
+ }
+ }
+
+ override fun onFailure() {
+ application.toast("鑾峰彇闂澶嶅彂鎯呭喌澶辫触")
+ }
+ })
+ }
+
+
+
private fun getQueryOptSingleList(sceneId: String): List<QueryOptSingle> {
val queryOpts = mutableListOf<QueryOptSingle>()
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/DataProdSingleSceneService.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/DataProdSingleSceneService.kt
index 4b75dbb..f303116 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/DataProdSingleSceneService.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/httpservice/DataProdSingleSceneService.kt
@@ -37,5 +37,5 @@
@POST("dataProd/singleScene/problemRecurrence/get")
fun getProblemRecurrence(
@Body queryOptSingle: QueryOptSingle
- ): Observable<Response<BaseResponse<DPProblemRecurrence>>>
+ ): Observable<Response<BaseResponse<List<DPProblemRecurrence>>>>
}
\ No newline at end of file
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseActivity.kt
index 9b8234e..7f54b48 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/base/BaseActivity.kt
@@ -40,7 +40,7 @@
} catch (e: Exception) {
e.printStackTrace()
}
- setContentView(getLayoutId())
+ getLayoutId()?.let { setContentView(it) }
rootView = findViewById<ViewGroup>(android.R.id.content).getChildAt(0) as ViewGroup
}
@@ -62,7 +62,7 @@
}
- abstract fun getLayoutId(): Int
+ abstract fun getLayoutId(): Int?
/**
* 鎷撳睍activity涓嚜鍔ㄦ樉绀鸿蒋閿洏鐨勬柟娉�
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuSceneHistoryActivity.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuSceneHistoryActivity.kt
index 9cc8097..f95c5b4 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuSceneHistoryActivity.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuSceneHistoryActivity.kt
@@ -1,16 +1,15 @@
package cn.flightfeather.thirdappmodule.module.inspection
-import android.arch.lifecycle.Observer
import android.arch.lifecycle.ViewModelProviders
+import android.databinding.DataBindingUtil
import android.os.Bundle
-import android.support.v4.content.ContextCompat
import android.view.View
import android.widget.TextView
import cn.flightfeather.thirdappmodule.R
import cn.flightfeather.thirdappmodule.bean.entity.Scense
+import cn.flightfeather.thirdappmodule.databinding.DialogSceneHistory2Binding
+import cn.flightfeather.thirdappmodule.databinding.SceneHistoryViewModel
import cn.flightfeather.thirdappmodule.module.base.BaseActivity
-import kotlinx.android.synthetic.main.dialog_scene_history.*
-import kotlinx.android.synthetic.main.fragment_analysis_over_view.*
/**
* 鍦烘櫙鍘嗗彶鎯呭喌鎻愮ず鐣岄潰
@@ -22,115 +21,26 @@
// 浼犲叆鐨勫満鏅璞�
private var scene: Scense? = null
- override fun getLayoutId(): Int = R.layout.dialog_scene_history
+// override fun getLayoutId(): Int = R.layout.dialog_scene_history_2
+ override fun getLayoutId(): Int? = null
- lateinit var viewModel: MenuSceneHistoryViewModel
+ lateinit var viewModel: SceneHistoryViewModel
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- viewModel = ViewModelProviders.of(this).get(MenuSceneHistoryViewModel::class.java)
+ viewModel = ViewModelProviders.of(this).get(SceneHistoryViewModel::class.java)
scene = intent.getSerializableExtra("scene") as Scense?
- initUI()
- initObserver()
- initListener()
+ // 2025.10.31 鍦烘櫙椋庨櫓鎻愮ず
+ val dialogSceneHistory2Binding = DataBindingUtil.setContentView<DialogSceneHistory2Binding>(this, R.layout.dialog_scene_history_2)
+ dialogSceneHistory2Binding.viewModel = viewModel
+ dialogSceneHistory2Binding.fabClose.setOnClickListener { this.finish() }
+
// viewModel.getSceneStatus {
// scene?.let { viewModel.getSceneDetail(it) }
// }
- }
-
- private fun initUI() {
- // 缁熻椤圭洰
- val itemList = listOf(
- HistoryItemView("鐜板満璇勫垎", true, cl_1, tv_title_1),
- HistoryItemView("鍏稿瀷宸ュ湴", true, cl_2, tv_title_2),
- HistoryItemView("閲嶇偣鍖哄煙", true, cl_3, tv_title_3),
- HistoryItemView("鑱斿悎鎵ф硶", true, cl_4, tv_title_4),
- HistoryItemView("鏁存敼鏁堢巼", true, cl_5, tv_title_5),
- HistoryItemView("闂澶嶅彂", true, cl_6, tv_title_6),
- HistoryItemView("鏂藉伐闃舵", true, cl_7, tv_title_7),
- HistoryItemView("鐩戞祴鏁版嵁", true, cl_8, tv_title_8),
- HistoryItemView("搴旀�ュ贰鏌�", false, cl_9, tv_title_9)
- )
-
- // 鏄剧ず 鍔犺浇鍥炬爣
- view_waiting.visibility = View.GONE
-
- // 鏍规嵁閰嶇疆鏄剧ず瀵瑰簲鐨勯」鐩紝骞惰嚜鍔ㄥ尮閰嶅簭鍙�
- var index = 1
- itemList.forEach { item ->
- if (item.show) {
- val title = "${index}. ${item.title}"
- item.parentView.visibility = View.VISIBLE
- item.titleView.text = title
- index++
- } else {
- item.parentView.visibility = View.GONE
- }
- }
-
- // 鏄剧ず 鍦烘櫙鍚嶇О
- scene?.let {
- tv_title.text = it.name
- }
- }
-
- private fun initObserver() {
- // 鍘嗗彶璇勪及鎯呭喌
- viewModel.evaluationList.observe(this, Observer {
-
- })
-
- // 鍏稿瀷鍦烘櫙鎯呭喌
- viewModel.typicalScene.observe(this, Observer {
-
- })
- tv_title_2.setTextColor(ContextCompat.getColor(this, R.color.red_btn_bg_color))
- // 閲嶇偣鍖哄煙锛堝湪鍥芥帶鐐广�佸競鎺х偣鍛ㄨ竟锛�
- viewModel.keyArea.observe(this, Observer {
-
- })
- tv_title_3.setTextColor(ContextCompat.getColor(this, R.color.red_btn_bg_color))
- // 鑱斿悎鎵ф硶
- viewModel.jointLawEnforcement.observe(this, Observer {
-
- })
- tv_title_4.setTextColor(ContextCompat.getColor(this, R.color.main_color_3))
- tv_summary_4.setTextColor(ContextCompat.getColor(this, R.color.main_color_3))
- // 鏁存敼鏁堢巼
- viewModel.changeRate.observe(this, Observer {
-
- })
- tv_title_5.setTextColor(ContextCompat.getColor(this, R.color.red_btn_bg_color))
- // 闂澶嶅彂
- viewModel.problemRecurrence.observe(this, Observer {
-
- })
- tv_title_6.setTextColor(ContextCompat.getColor(this, R.color.red_btn_bg_color))
- // 鏂藉伐闃舵
- viewModel.constructionPhase.observe(this, Observer {
-
- })
- tv_title_7.setTextColor(ContextCompat.getColor(this, R.color.main_color_2))
- // 鍦ㄧ嚎鐩戞祴鏁版嵁
- viewModel.monitorData.observe(this, Observer {
-
- })
- tv_title_8.setTextColor(ContextCompat.getColor(this, R.color.main_color_3))
- tv_summary_8.setTextColor(ContextCompat.getColor(this, R.color.main_color_3))
- // 搴旀�ュ贰鏌�
- viewModel.emergencyInspection.observe(this, Observer {
-
- })
- tv_title_9.setTextColor(ContextCompat.getColor(this, R.color.main_color_3))
- }
-
- private fun initListener() {
- fab_close.setOnClickListener {
- this.finish()
- }
}
}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuSceneHistoryActivity_backup.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuSceneHistoryActivity_backup.kt
new file mode 100644
index 0000000..00dbd6c
--- /dev/null
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/module/inspection/MenuSceneHistoryActivity_backup.kt
@@ -0,0 +1,136 @@
+package cn.flightfeather.thirdappmodule.module.inspection
+
+import android.arch.lifecycle.Observer
+import android.arch.lifecycle.ViewModelProviders
+import android.os.Bundle
+import android.support.v4.content.ContextCompat
+import android.view.View
+import android.widget.TextView
+import cn.flightfeather.thirdappmodule.R
+import cn.flightfeather.thirdappmodule.bean.entity.Scense
+import cn.flightfeather.thirdappmodule.module.base.BaseActivity
+import kotlinx.android.synthetic.main.dialog_scene_history.*
+import kotlinx.android.synthetic.main.fragment_analysis_over_view.*
+
+/**
+ * 鍦烘櫙鍘嗗彶鎯呭喌鎻愮ず鐣岄潰
+ * Date: 2025/10/27
+ */
+class MenuSceneHistoryActivity_backup : BaseActivity() {
+ inner class HistoryItemView(val title: String, val show: Boolean, val parentView: View, val titleView: TextView)
+
+ // 浼犲叆鐨勫満鏅璞�
+ private var scene: Scense? = null
+
+ override fun getLayoutId(): Int = R.layout.dialog_scene_history
+
+ lateinit var viewModel: MenuSceneHistoryViewModel
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+
+ viewModel = ViewModelProviders.of(this).get(MenuSceneHistoryViewModel::class.java)
+
+ scene = intent.getSerializableExtra("scene") as Scense?
+
+ initUI()
+ initObserver()
+ initListener()
+
+// viewModel.getSceneStatus {
+// scene?.let { viewModel.getSceneDetail(it) }
+// }
+ }
+
+ private fun initUI() {
+ // 缁熻椤圭洰
+ val itemList = listOf(
+ HistoryItemView("鐜板満璇勫垎", true, cl_1, tv_title_1),
+ HistoryItemView("鍏稿瀷宸ュ湴", true, cl_2, tv_title_2),
+ HistoryItemView("閲嶇偣鍖哄煙", true, cl_3, tv_title_3),
+ HistoryItemView("鑱斿悎鎵ф硶", true, cl_4, tv_title_4),
+ HistoryItemView("鏁存敼鏁堢巼", true, cl_5, tv_title_5),
+ HistoryItemView("闂澶嶅彂", true, cl_6, tv_title_6),
+ HistoryItemView("鏂藉伐闃舵", true, cl_7, tv_title_7),
+ HistoryItemView("鐩戞祴鏁版嵁", true, cl_8, tv_title_8),
+ HistoryItemView("搴旀�ュ贰鏌�", false, cl_9, tv_title_9)
+ )
+
+ // 鏄剧ず 鍔犺浇鍥炬爣
+ view_waiting.visibility = View.GONE
+
+ // 鏍规嵁閰嶇疆鏄剧ず瀵瑰簲鐨勯」鐩紝骞惰嚜鍔ㄥ尮閰嶅簭鍙�
+ var index = 1
+ itemList.forEach { item ->
+ if (item.show) {
+ val title = "${index}. ${item.title}"
+ item.parentView.visibility = View.VISIBLE
+ item.titleView.text = title
+ index++
+ } else {
+ item.parentView.visibility = View.GONE
+ }
+ }
+
+ // 鏄剧ず 鍦烘櫙鍚嶇О
+ scene?.let {
+ tv_title.text = it.name
+ }
+ }
+
+ private fun initObserver() {
+ // 鍘嗗彶璇勪及鎯呭喌
+ viewModel.evaluationList.observe(this, Observer {
+
+ })
+
+ // 鍏稿瀷鍦烘櫙鎯呭喌
+ viewModel.typicalScene.observe(this, Observer {
+
+ })
+ tv_title_2.setTextColor(ContextCompat.getColor(this, R.color.red_btn_bg_color))
+ // 閲嶇偣鍖哄煙锛堝湪鍥芥帶鐐广�佸競鎺х偣鍛ㄨ竟锛�
+ viewModel.keyArea.observe(this, Observer {
+
+ })
+ tv_title_3.setTextColor(ContextCompat.getColor(this, R.color.red_btn_bg_color))
+ // 鑱斿悎鎵ф硶
+ viewModel.jointLawEnforcement.observe(this, Observer {
+
+ })
+ tv_title_4.setTextColor(ContextCompat.getColor(this, R.color.main_color_3))
+ tv_summary_4.setTextColor(ContextCompat.getColor(this, R.color.main_color_3))
+ // 鏁存敼鏁堢巼
+ viewModel.changeRate.observe(this, Observer {
+
+ })
+ tv_title_5.setTextColor(ContextCompat.getColor(this, R.color.red_btn_bg_color))
+ // 闂澶嶅彂
+ viewModel.problemRecurrence.observe(this, Observer {
+
+ })
+ tv_title_6.setTextColor(ContextCompat.getColor(this, R.color.red_btn_bg_color))
+ // 鏂藉伐闃舵
+ viewModel.constructionPhase.observe(this, Observer {
+
+ })
+ tv_title_7.setTextColor(ContextCompat.getColor(this, R.color.main_color_2))
+ // 鍦ㄧ嚎鐩戞祴鏁版嵁
+ viewModel.monitorData.observe(this, Observer {
+
+ })
+ tv_title_8.setTextColor(ContextCompat.getColor(this, R.color.main_color_3))
+ tv_summary_8.setTextColor(ContextCompat.getColor(this, R.color.main_color_3))
+ // 搴旀�ュ贰鏌�
+ viewModel.emergencyInspection.observe(this, Observer {
+
+ })
+ tv_title_9.setTextColor(ContextCompat.getColor(this, R.color.main_color_3))
+ }
+
+ private fun initListener() {
+ fab_close.setOnClickListener {
+ this.finish()
+ }
+ }
+}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/repository/DataProdSingleSceneRepository.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/repository/DataProdSingleSceneRepository.kt
index ce32d6d..106dfaf 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/repository/DataProdSingleSceneRepository.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/repository/DataProdSingleSceneRepository.kt
@@ -60,12 +60,12 @@
/**
* 闂閲嶅鎯呭喌
*/
- fun getProblemRecurrence(queryOptSingle: QueryOptSingle, resultCallBack: ResultCallBack<DPProblemRecurrence>) {
+ fun getProblemRecurrence(queryOptSingle: QueryOptSingle, resultCallBack: ResultCallBack<List<DPProblemRecurrence>>) {
val service = retrofit.create(DataProdSingleSceneService::class.java).getProblemRecurrence(queryOptSingle)
- RetrofitFactory.executeResult(service, object : ResultObserver<BaseResponse<DPProblemRecurrence>>() {
- override fun onSuccess(result: BaseResponse<DPProblemRecurrence>?) {
+ RetrofitFactory.executeResult(service, object : ResultObserver<BaseResponse<List<DPProblemRecurrence>>>() {
+ override fun onSuccess(result: BaseResponse<List<DPProblemRecurrence>>?) {
resultCallBack.onSuccess(result?.data)
}
diff --git a/app/src/main/java/cn/flightfeather/thirdappmodule/util/DateUtil.kt b/app/src/main/java/cn/flightfeather/thirdappmodule/util/DateUtil.kt
index 47028f3..f1ba566 100644
--- a/app/src/main/java/cn/flightfeather/thirdappmodule/util/DateUtil.kt
+++ b/app/src/main/java/cn/flightfeather/thirdappmodule/util/DateUtil.kt
@@ -151,13 +151,13 @@
return weekDays[index]
}
- fun parseYearMonth(str: String): Date {
- try {
- return SimpleDateFormat("yyyy-MM", Locale.getDefault()).parse(str)
+ fun parseYearMonth(str: String?): Date? {
+ return try {
+ SimpleDateFormat("yyyy-MM", Locale.getDefault()).parse(str)
} catch (e: Exception) {
e.printStackTrace()
+ null
}
- return Date()
}
fun parseYearToMin(str: String): Date {
diff --git a/app/src/main/res/layout/dialog_scene_history_2.xml b/app/src/main/res/layout/dialog_scene_history_2.xml
index 05fe7dc..e4ec0d4 100644
--- a/app/src/main/res/layout/dialog_scene_history_2.xml
+++ b/app/src/main/res/layout/dialog_scene_history_2.xml
@@ -1,167 +1,186 @@
<?xml version="1.0" encoding="utf-8"?>
-<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
+ xmlns:tools="http://schemas.android.com/tools">
- <android.support.v7.widget.CardView
- android:id="@+id/cv_dialog_main"
+ <data >
+ <import type="android.view.View" alias="View"/>
+ <variable
+ name="viewModel"
+ type="cn.flightfeather.thirdappmodule.databinding.SceneHistoryViewModel" />
+ </data>
+
+ <android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginLeft="12dp"
- android:layout_marginTop="30dp"
- android:layout_marginRight="12dp"
- android:layout_marginBottom="40dp"
- app:cardCornerRadius="6dp"
- app:cardElevation="7dp">
+ android:orientation="vertical">
- <ScrollView
+ <android.support.v7.widget.CardView
+ android:id="@+id/cv_dialog_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginBottom="30dp">
- <LinearLayout
+ android:layout_marginLeft="12dp"
+ android:layout_marginTop="30dp"
+ android:layout_marginRight="12dp"
+ android:layout_marginBottom="40dp"
+ app:cardCornerRadius="6dp"
+ app:cardElevation="7dp">
+
+ <ScrollView
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
+ android:layout_height="match_parent"
+ android:layout_marginBottom="30dp">
-
-
- <android.support.constraint.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="@dimen/dimen16">
- <ImageView
- android:id="@+id/img_risk_warn"
- android:layout_width="20dp"
- android:layout_height="20dp"
- android:src="@drawable/icon_task_alert"
- android:layout_marginBottom="@dimen/dimen4"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="@id/tv_risk_warn"
- app:layout_constraintBottom_toBottomOf="@id/tv_risk_warn"
- android:contentDescription="椋庨櫓鎻愮ず" />
-
- <TextView
- android:id="@+id/tv_risk_warn"
- android:layout_width="0dp"
- android:layout_height="30dp"
- android:textColor="@color/red_btn_bg_color"
- android:textSize="@dimen/textSize_18"
- android:textStyle="bold"
- app:layout_constraintStart_toEndOf="@id/img_risk_warn"
- app:layout_constraintTop_toTopOf="parent"
- android:text="椋庨櫓鎻愮ず" />
-
- <TextView
- android:id="@+id/tv_change_rate"
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textColor="@color/main_color_1"
- android:textSize="@dimen/textSize_16"
- android:paddingStart="20dp"
- android:paddingEnd="0dp"
- tools:text="鏁存敼鐜囨儏鍐碉紝濡傛灉鏁存敼鐜囪緝浣庯紝鍒欎綔涓洪闄╂彁绀哄睍绀�"
- app:layout_constraintTop_toBottomOf="@id/tv_risk_warn"/>
- <TextView
- android:id="@+id/tv_change_efficiency"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textColor="@color/main_color_1"
- android:textSize="@dimen/textSize_16"
- android:paddingStart="20dp"
- android:paddingEnd="0dp"
- tools:text="鏁存敼鏁堢巼鎯呭喌锛屾暣鏀规晥鐜囦负瑕佹眰鏁存敼鐨勬湡闄愶紙澶╂暟锛夐櫎浠ュ疄闄呮暣鏀圭殑鐢ㄦ椂锛堝ぉ鏁帮級锛屽鏋滄晥鐜囦綆浜�60%锛屽垯浣滀负椋庨櫓鎻愮ず灞曠ず"
- app:layout_constraintTop_toBottomOf="@id/tv_change_rate"/>
- <TextView
- android:id="@+id/tv_problem_recurrence"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textColor="@color/main_color_1"
- android:textSize="@dimen/textSize_16"
- android:paddingStart="20dp"
- android:paddingEnd="0dp"
- tools:text="闂澶嶅彂鎯呭喌锛岃嫢鍓嶄笁涓湀鍐呮湁鐩稿悓绫诲瀷鐨勯棶棰樺嚭鐜颁袱娆″強浠ヤ笂鏃讹紝鎻愰啋灞曠ず锛屽苟缁欏嚭瀵瑰簲鐨勬暣鏀圭巼"
- app:layout_constraintTop_toBottomOf="@id/tv_change_efficiency"/>
+ android:orientation="vertical">
- </android.support.constraint.ConstraintLayout>
- <android.support.constraint.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="@dimen/dimen16">
- <ImageView
- android:id="@+id/img_inspection_key_point"
- android:layout_width="20dp"
- android:layout_height="20dp"
- android:src="@drawable/icon_consult"
- android:layout_marginBottom="@dimen/dimen4"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="@id/tv_risk_warn"
- app:layout_constraintBottom_toBottomOf="@id/tv_inspection_key_point"
- android:contentDescription="宸℃煡瑕佺偣" />
- <TextView
- android:id="@+id/tv_inspection_key_point"
- android:layout_width="0dp"
- android:layout_height="30dp"
- android:textColor="@color/primary_text"
- android:textSize="@dimen/textSize_18"
- app:layout_constraintStart_toEndOf="@id/img_inspection_key_point"
- app:layout_constraintTop_toTopOf="parent"
- android:text="宸℃煡瑕佺偣" />
+ <android.support.constraint.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:visibility="@{viewModel.worstChangeInfo == null ? View.GONE : View.VISIBLE}"
+ android:padding="@dimen/dimen16">
- <TextView
- android:id="@+id/tv_change_rate"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textColor="@color/main_color_1"
- android:textSize="@dimen/textSize_16"
- android:paddingStart="20dp"
- android:paddingEnd="0dp"
- tools:text="宸℃煡瑕佺偣锛屾敞鎰忛渶瑕佹鏌ョ殑浣嶇疆銆佽澶囧拰闂绛�"
- app:layout_constraintTop_toBottomOf="@id/img_inspection_key_point"/>
+ <ImageView
+ android:id="@+id/img_risk_warn"
+ android:layout_width="20dp"
+ android:layout_height="20dp"
+ android:layout_marginBottom="@dimen/dimen4"
+ android:contentDescription="椋庨櫓鎻愮ず"
+ android:src="@drawable/icon_task_alert"
+ app:layout_constraintBottom_toBottomOf="@id/tv_risk_warn"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="@id/tv_risk_warn" />
- </android.support.constraint.ConstraintLayout>
- <android.support.constraint.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="@dimen/dimen16">
- <ImageView
- android:id="@+id/img_risk_warn"
- android:layout_width="20dp"
- android:layout_height="20dp"
- android:src="@drawable/ic_emergency"
- android:layout_marginBottom="@dimen/dimen4"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="@id/tv_risk_warn"
- app:layout_constraintBottom_toBottomOf="@id/tv_risk_warn"
- android:contentDescription="搴旀�ュ贰鏌�" />
+ <TextView
+ android:id="@+id/tv_risk_warn"
+ android:layout_width="0dp"
+ android:layout_height="30dp"
+ android:text="椋庨櫓鎻愮ず"
+ android:textColor="@color/red_btn_bg_color"
+ android:textSize="@dimen/textSize_18"
+ android:textStyle="bold"
+ app:layout_constraintStart_toEndOf="@id/img_risk_warn"
+ app:layout_constraintTop_toTopOf="parent" />
- <TextView
- android:id="@+id/tv_risk_warn"
- android:layout_width="0dp"
- android:layout_height="30dp"
- android:textColor="@color/primary_text"
- android:textSize="@dimen/textSize_18"
- app:layout_constraintStart_toEndOf="@id/img_risk_warn"
- app:layout_constraintTop_toTopOf="parent"
- android:text="搴旀�ュ贰鏌�" />
+ <TextView
+ android:id="@+id/tv_change_rate"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="20dp"
+ android:paddingEnd="0dp"
+ android:textColor="@color/main_color_1"
+ android:textSize="@dimen/textSize_16"
+ app:layout_constraintTop_toBottomOf="@id/tv_risk_warn"
+ android:text="@{viewModel.changeInfoTxt}"
+ tools:text="鏁存敼鐜囨儏鍐碉紝濡傛灉鏁存敼鐜囪緝浣庯紝鍒欎綔涓洪闄╂彁绀哄睍绀�" />
- </android.support.constraint.ConstraintLayout>
- </LinearLayout>
- </ScrollView>
- </android.support.v7.widget.CardView>
+ <TextView
+ android:id="@+id/tv_change_efficiency"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="20dp"
+ android:paddingEnd="0dp"
+ android:textColor="@color/main_color_1"
+ android:textSize="@dimen/textSize_16"
+ app:layout_constraintTop_toBottomOf="@id/tv_change_rate"
+ tools:text="鏁存敼鏁堢巼鎯呭喌锛屾暣鏀规晥鐜囦负瑕佹眰鏁存敼鐨勬湡闄愶紙澶╂暟锛夐櫎浠ュ疄闄呮暣鏀圭殑鐢ㄦ椂锛堝ぉ鏁帮級锛屽鏋滄晥鐜囦綆浜�60%锛屽垯浣滀负椋庨櫓鎻愮ず灞曠ず" />
- <android.support.design.widget.FloatingActionButton
- android:id="@+id/fab_close"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:contentDescription="@string/cancel"
- android:src="@drawable/icon_close_white"
- app:elevation="8dp"
- app:fabSize="normal"
- app:layout_anchor="@id/cv_dialog_main"
- app:layout_anchorGravity="bottom|center" />
+ <TextView
+ android:id="@+id/tv_problem_recurrence"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="20dp"
+ android:paddingEnd="0dp"
+ android:textColor="@color/main_color_1"
+ android:textSize="@dimen/textSize_16"
+ app:layout_constraintTop_toBottomOf="@id/tv_change_efficiency"
+ tools:text="闂澶嶅彂鎯呭喌锛岃嫢鍓嶄笁涓湀鍐呮湁鐩稿悓绫诲瀷鐨勯棶棰樺嚭鐜颁袱娆″強浠ヤ笂鏃讹紝鎻愰啋灞曠ず锛屽苟缁欏嚭瀵瑰簲鐨勬暣鏀圭巼" />
-</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
+ </android.support.constraint.ConstraintLayout>
+
+ <android.support.constraint.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="@dimen/dimen16">
+
+ <ImageView
+ android:id="@+id/img_inspection_key_point"
+ android:layout_width="20dp"
+ android:layout_height="20dp"
+ android:layout_marginBottom="@dimen/dimen4"
+ android:contentDescription="宸℃煡瑕佺偣"
+ android:src="@drawable/icon_consult"
+ app:layout_constraintBottom_toBottomOf="@id/tv_inspection_key_point"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="@id/tv_risk_warn" />
+
+ <TextView
+ android:id="@+id/tv_inspection_key_point"
+ android:layout_width="0dp"
+ android:layout_height="30dp"
+ android:text="宸℃煡瑕佺偣"
+ android:textColor="@color/primary_text"
+ android:textSize="@dimen/textSize_18"
+ app:layout_constraintStart_toEndOf="@id/img_inspection_key_point"
+ app:layout_constraintTop_toTopOf="parent" />
+
+ <TextView
+ android:id="@+id/tv_key_point"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="20dp"
+ android:paddingEnd="0dp"
+ android:textColor="@color/main_color_1"
+ android:textSize="@dimen/textSize_16"
+ app:layout_constraintTop_toBottomOf="@id/img_inspection_key_point"
+ tools:text="宸℃煡瑕佺偣锛屾敞鎰忛渶瑕佹鏌ョ殑浣嶇疆銆佽澶囧拰闂绛�" />
+
+ </android.support.constraint.ConstraintLayout>
+
+ <android.support.constraint.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="@dimen/dimen16">
+
+ <ImageView
+ android:id="@+id/img_temp_inspection"
+ android:layout_width="20dp"
+ android:layout_height="20dp"
+ android:layout_marginBottom="@dimen/dimen4"
+ android:contentDescription="搴旀�ュ贰鏌�"
+ android:src="@drawable/ic_emergency"
+ app:layout_constraintBottom_toBottomOf="@id/tv_risk_warn"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="@id/tv_risk_warn" />
+
+ <TextView
+ android:id="@+id/tv_temp_inspection"
+ android:layout_width="0dp"
+ android:layout_height="30dp"
+ android:text="搴旀�ュ贰鏌�"
+ android:textColor="@color/primary_text"
+ android:textSize="@dimen/textSize_18"
+ app:layout_constraintStart_toEndOf="@id/img_temp_inspection"
+ app:layout_constraintTop_toTopOf="parent" />
+
+ </android.support.constraint.ConstraintLayout>
+ </LinearLayout>
+ </ScrollView>
+ </android.support.v7.widget.CardView>
+
+ <android.support.design.widget.FloatingActionButton
+ android:id="@+id/fab_close"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:contentDescription="@string/cancel"
+ android:src="@drawable/icon_close_white"
+ app:elevation="8dp"
+ app:fabSize="normal"
+ app:layout_anchor="@id/cv_dialog_main"
+ app:layout_anchorGravity="bottom|center" />
+
+ </android.support.design.widget.CoordinatorLayout>
+</layout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout_scene_history.xml b/app/src/main/res/layout/layout_scene_history.xml
deleted file mode 100644
index 9103ff4..0000000
--- a/app/src/main/res/layout/layout_scene_history.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <ScrollView
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginBottom="30dp">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
-
- <android.support.constraint.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="@dimen/dimen16">
-
- <ImageView
- android:id="@+id/img_risk_warn"
- android:layout_width="20dp"
- android:layout_height="20dp"
- android:layout_marginBottom="@dimen/dimen4"
- android:contentDescription="椋庨櫓鎻愮ず"
- android:src="@drawable/icon_task_alert"
- app:layout_constraintBottom_toBottomOf="@id/tv_risk_warn"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="@id/tv_risk_warn" />
-
- <TextView
- android:id="@+id/tv_risk_warn"
- android:layout_width="0dp"
- android:layout_height="30dp"
- android:text="椋庨櫓鎻愮ず"
- android:textColor="@color/red_btn_bg_color"
- android:textSize="@dimen/textSize_18"
- android:textStyle="bold"
- app:layout_constraintStart_toEndOf="@id/img_risk_warn"
- app:layout_constraintTop_toTopOf="parent" />
-
- <TextView
- android:id="@+id/tv_change_rate"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingStart="20dp"
- android:paddingEnd="0dp"
- android:textColor="@color/main_color_1"
- android:textSize="@dimen/textSize_16"
- app:layout_constraintTop_toBottomOf="@id/tv_risk_warn"
- tools:text="鏁存敼鐜囨儏鍐碉紝濡傛灉鏁存敼鐜囪緝浣庯紝鍒欎綔涓洪闄╂彁绀哄睍绀�" />
-
- <TextView
- android:id="@+id/tv_change_efficiency"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingStart="20dp"
- android:paddingEnd="0dp"
- android:textColor="@color/main_color_1"
- android:textSize="@dimen/textSize_16"
- app:layout_constraintTop_toBottomOf="@id/tv_change_rate"
- tools:text="鏁存敼鏁堢巼鎯呭喌锛屾暣鏀规晥鐜囦负瑕佹眰鏁存敼鐨勬湡闄愶紙澶╂暟锛夐櫎浠ュ疄闄呮暣鏀圭殑鐢ㄦ椂锛堝ぉ鏁帮級锛屽鏋滄晥鐜囦綆浜�60%锛屽垯浣滀负椋庨櫓鎻愮ず灞曠ず" />
-
- <TextView
- android:id="@+id/tv_problem_recurrence"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingStart="20dp"
- android:paddingEnd="0dp"
- android:textColor="@color/main_color_1"
- android:textSize="@dimen/textSize_16"
- app:layout_constraintTop_toBottomOf="@id/tv_change_efficiency"
- tools:text="闂澶嶅彂鎯呭喌锛岃嫢鍓嶄笁涓湀鍐呮湁鐩稿悓绫诲瀷鐨勯棶棰樺嚭鐜颁袱娆″強浠ヤ笂鏃讹紝鎻愰啋灞曠ず锛屽苟缁欏嚭瀵瑰簲鐨勬暣鏀圭巼" />
-
- </android.support.constraint.ConstraintLayout>
-
- <android.support.constraint.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="@dimen/dimen16">
-
- <ImageView
- android:id="@+id/img_inspection_key_point"
- android:layout_width="20dp"
- android:layout_height="20dp"
- android:layout_marginBottom="@dimen/dimen4"
- android:contentDescription="宸℃煡瑕佺偣"
- android:src="@drawable/icon_consult"
- app:layout_constraintBottom_toBottomOf="@id/tv_inspection_key_point"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="@id/tv_risk_warn" />
-
- <TextView
- android:id="@+id/tv_inspection_key_point"
- android:layout_width="0dp"
- android:layout_height="30dp"
- android:text="宸℃煡瑕佺偣"
- android:textColor="@color/primary_text"
- android:textSize="@dimen/textSize_18"
- app:layout_constraintStart_toEndOf="@id/img_inspection_key_point"
- app:layout_constraintTop_toTopOf="parent" />
-
- <TextView
- android:id="@+id/tv_change_rate"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingStart="20dp"
- android:paddingEnd="0dp"
- android:textColor="@color/main_color_1"
- android:textSize="@dimen/textSize_16"
- app:layout_constraintTop_toBottomOf="@id/tv_inspection_key_point"
- tools:text="宸℃煡瑕佺偣锛屾敞鎰忛渶瑕佹鏌ョ殑浣嶇疆銆佽澶囧拰闂绛�" />
-
- </android.support.constraint.ConstraintLayout>
-
- <android.support.constraint.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="@dimen/dimen16">
-
- <ImageView
- android:id="@+id/img_risk_warn"
- android:layout_width="20dp"
- android:layout_height="20dp"
- android:layout_marginBottom="@dimen/dimen4"
- android:contentDescription="搴旀�ュ贰鏌�"
- android:src="@drawable/ic_emergency"
- app:layout_constraintBottom_toBottomOf="@id/tv_risk_warn"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="@id/tv_risk_warn" />
-
- <TextView
- android:id="@+id/tv_risk_warn"
- android:layout_width="0dp"
- android:layout_height="30dp"
- android:text="搴旀�ュ贰鏌�"
- android:textColor="@color/primary_text"
- android:textSize="@dimen/textSize_18"
- app:layout_constraintStart_toEndOf="@id/img_risk_warn"
- app:layout_constraintTop_toTopOf="parent" />
-
- </android.support.constraint.ConstraintLayout>
- </LinearLayout>
- </ScrollView>
-
-</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
--
Gitblit v1.9.3