riku
2025-10-31 1897c4ad5fa73b3f0a36e1aa0e1e9000302a6ace
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package cn.flightfeather.thirdappmodule.module.inspection
 
import android.arch.lifecycle.ViewModelProviders
import android.databinding.DataBindingUtil
import android.os.Bundle
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
 
/**
 * 场景历史情况提示界面
 * Date: 2025/10/27
 */
class MenuSceneHistoryActivity : 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_2
    override fun getLayoutId(): Int? = null
 
    lateinit var viewModel: SceneHistoryViewModel
 
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
 
        viewModel = ViewModelProviders.of(this).get(SceneHistoryViewModel::class.java)
 
        scene = intent.getSerializableExtra("scene") as Scense?
 
        // 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) }
//        }
    }
}