1、修改问题描述2、修改定位适配较低系统
This commit is contained in:
parent
2c9c20e913
commit
f6b4c7543a
@ -38,8 +38,8 @@ data class EvaluationInfo(
|
|||||||
@SerializedName("problemLink")
|
@SerializedName("problemLink")
|
||||||
val problemLink: String = "",//问题环节
|
val problemLink: String = "",//问题环节
|
||||||
|
|
||||||
@SerializedName("problemReason")
|
@SerializedName("preliminaryAnalysis")
|
||||||
val problemReason: String = "",//问题原因
|
val preliminaryAnalysis: String = "",//初步分析
|
||||||
|
|
||||||
@SerializedName("evaluatorName")
|
@SerializedName("evaluatorName")
|
||||||
val evaluatorName: String = "",//测评人名称
|
val evaluatorName: String = "",//测评人名称
|
||||||
|
@ -151,7 +151,7 @@ class TaskUploadScope(
|
|||||||
problemPhenomenon = it.phenomenon,
|
problemPhenomenon = it.phenomenon,
|
||||||
problemDesc = it.description,
|
problemDesc = it.description,
|
||||||
problemLink = it.problemLink,
|
problemLink = it.problemLink,
|
||||||
problemReason = it.cause,
|
preliminaryAnalysis = it.cause,
|
||||||
evaluatorName = it.checkUserId,
|
evaluatorName = it.checkUserId,
|
||||||
evaluationDate = it.checkTime,
|
evaluationDate = it.checkTime,
|
||||||
evaluationWay = evaluationWay,
|
evaluationWay = evaluationWay,
|
||||||
@ -178,7 +178,7 @@ class TaskUploadScope(
|
|||||||
problemPhenomenon = "",
|
problemPhenomenon = "",
|
||||||
problemDesc = "",
|
problemDesc = "",
|
||||||
problemLink = "",
|
problemLink = "",
|
||||||
problemReason = "",
|
preliminaryAnalysis = "",
|
||||||
evaluatorName = "",
|
evaluatorName = "",
|
||||||
evaluationDate = "",
|
evaluationDate = "",
|
||||||
evaluationWay = 2,
|
evaluationWay = 2,
|
||||||
|
@ -4,6 +4,7 @@ import android.content.Context
|
|||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
import androidx.annotation.RequiresApi
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
@ -95,18 +96,21 @@ class TaskViewModel @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
is NetResult.Error<*> -> {
|
is NetResult.Error<*> -> {
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
Toast.makeText(context, "${result.exception.message}", Toast.LENGTH_SHORT)
|
Toast.makeText(context, "${result.exception.message}", Toast.LENGTH_SHORT)
|
||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
is NetResult.Failure<*> -> {
|
is NetResult.Failure<*> -> {
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
Toast.makeText(context, "${result.code}:${result.msg}", Toast.LENGTH_SHORT)
|
Toast.makeText(context, "${result.code}:${result.msg}", Toast.LENGTH_SHORT)
|
||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
is NetResult.Loading -> {}
|
is NetResult.Loading -> {}
|
||||||
}
|
}
|
||||||
val realm = Realm.getDefaultInstance()
|
val realm = Realm.getDefaultInstance()
|
||||||
@ -139,41 +143,42 @@ class TaskViewModel @Inject constructor(
|
|||||||
/**
|
/**
|
||||||
* 设置当前选择的任务,并高亮当前任务的所有link
|
* 设置当前选择的任务,并高亮当前任务的所有link
|
||||||
*/
|
*/
|
||||||
|
@RequiresApi(Build.VERSION_CODES.M)
|
||||||
fun setSelectTaskBean(taskBean: TaskBean) {
|
fun setSelectTaskBean(taskBean: TaskBean) {
|
||||||
currentSelectTaskBean = taskBean
|
currentSelectTaskBean = taskBean
|
||||||
|
|
||||||
liveDataTaskLinks.value = taskBean.hadLinkDvoList
|
liveDataTaskLinks.value = taskBean.hadLinkDvoList
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
||||||
mapController.lineHandler.omdbTaskLinkLayer.removeAll()
|
mapController.lineHandler.omdbTaskLinkLayer.removeAll()
|
||||||
if(taskBean.hadLinkDvoList.isNotEmpty()){
|
if (taskBean.hadLinkDvoList.isNotEmpty()) {
|
||||||
mapController.lineHandler.omdbTaskLinkLayer.addLineList(taskBean.hadLinkDvoList)
|
mapController.lineHandler.omdbTaskLinkLayer.addLineList(taskBean.hadLinkDvoList)
|
||||||
var maxX = 0.0
|
var maxX = 0.0
|
||||||
var maxY = 0.0
|
var maxY = 0.0
|
||||||
var minX = 0.0
|
var minX = 0.0
|
||||||
var minY = 0.0
|
var minY = 0.0
|
||||||
for (item in taskBean.hadLinkDvoList) {
|
for (item in taskBean.hadLinkDvoList) {
|
||||||
val geometry = GeometryTools.createGeometry(item.geometry)
|
val geometry = GeometryTools.createGeometry(item.geometry)
|
||||||
if(geometry!=null){
|
if (geometry != null) {
|
||||||
val envelope = geometry.envelopeInternal
|
val envelope = geometry.envelopeInternal
|
||||||
if (envelope.maxX > maxX) {
|
if (envelope.maxX > maxX) {
|
||||||
maxX = envelope.maxX
|
maxX = envelope.maxX
|
||||||
}
|
}
|
||||||
if (envelope.maxY > maxY) {
|
if (envelope.maxY > maxY) {
|
||||||
maxY = envelope.maxY
|
maxY = envelope.maxY
|
||||||
}
|
}
|
||||||
if (envelope.minX < minX || minX == 0.0) {
|
if (envelope.minX < minX || minX == 0.0) {
|
||||||
minX = envelope.minX
|
minX = envelope.minX
|
||||||
}
|
}
|
||||||
if (envelope.minY < minY || minY == 0.0) {
|
if (envelope.minY < minY || minY == 0.0) {
|
||||||
minY = envelope.minY
|
minY = envelope.minY
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//增加异常数据判断
|
}
|
||||||
if(maxX!=0.0&&maxY!=0.0&&minX!=0.0&&minY!=0.0){
|
//增加异常数据判断
|
||||||
mapController.animationHandler.animateToBox(
|
if (maxX != 0.0 && maxY != 0.0 && minX != 0.0 && minY != 0.0) {
|
||||||
maxX = maxX, maxY = maxY, minX = minX, minY = minY
|
mapController.animationHandler.animateToBox(
|
||||||
)
|
maxX = maxX, maxY = maxY, minX = minX, minY = minY
|
||||||
}
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -181,20 +186,20 @@ class TaskViewModel @Inject constructor(
|
|||||||
/**
|
/**
|
||||||
* 高亮当前选中的link
|
* 高亮当前选中的link
|
||||||
*/
|
*/
|
||||||
|
@RequiresApi(Build.VERSION_CODES.M)
|
||||||
fun showCurrentLink(link: HadLinkDvoBean) {
|
fun showCurrentLink(link: HadLinkDvoBean) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
mapController.lineHandler.omdbTaskLinkLayer.showSelectLine(link)
|
||||||
mapController.lineHandler.omdbTaskLinkLayer.showSelectLine(link)
|
val geometry = GeometryTools.createGeometry(link.geometry)
|
||||||
val geometry = GeometryTools.createGeometry(link.geometry)
|
if (geometry != null) {
|
||||||
if(geometry!=null){
|
val envelope = geometry.envelopeInternal
|
||||||
val envelope = geometry.envelopeInternal
|
mapController.animationHandler.animateToBox(
|
||||||
mapController.animationHandler.animateToBox(
|
maxX = envelope.maxX,
|
||||||
maxX = envelope.maxX,
|
maxY = envelope.maxY,
|
||||||
maxY = envelope.maxY,
|
minX = envelope.minX,
|
||||||
minX = envelope.minX,
|
minY = envelope.minY
|
||||||
minY = envelope.minY
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCleared() {
|
override fun onCleared() {
|
||||||
|
@ -167,7 +167,7 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/evaluation_fragment_title_text_style"
|
style="@style/evaluation_fragment_title_text_style"
|
||||||
android:text="问题原因" />
|
android:text="初步分析" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/evaluation_cause"
|
android:id="@+id/evaluation_cause"
|
||||||
|
@ -50,6 +50,7 @@ open class QsRecordBean @JvmOverloads constructor(
|
|||||||
* 问题环节
|
* 问题环节
|
||||||
*/
|
*/
|
||||||
var problemLink: String = "",
|
var problemLink: String = "",
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 问题原因
|
* 问题原因
|
||||||
* 根本原因(RCA)
|
* 根本原因(RCA)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user