修改数据上传
This commit is contained in:
parent
611385c145
commit
d3fd50f941
@ -17,8 +17,9 @@ class LayerConfigUtils {
|
|||||||
fun getLayerConfigList(): List<ImportConfig> {
|
fun getLayerConfigList(): List<ImportConfig> {
|
||||||
// 首先读取Shared文件,如果存在则直接返回,否则读取config文件
|
// 首先读取Shared文件,如果存在则直接返回,否则读取config文件
|
||||||
return SPStaticUtils.getString(Constant.EVENT_LAYER_MANAGER_CHANGE, null).let {
|
return SPStaticUtils.getString(Constant.EVENT_LAYER_MANAGER_CHANGE, null).let {
|
||||||
if (this!=null) {
|
if (it != null) {
|
||||||
val result: List<ImportConfig> = gson.fromJson(it, object : TypeToken<List<ImportConfig>>(){}.type)
|
val result: List<ImportConfig> =
|
||||||
|
gson.fromJson(it, object : TypeToken<List<ImportConfig>>() {}.type)
|
||||||
result
|
result
|
||||||
} else {
|
} else {
|
||||||
LayerConfigUtils.getLayerConfigListFromAssetsFile()
|
LayerConfigUtils.getLayerConfigListFromAssetsFile()
|
||||||
@ -35,7 +36,8 @@ class LayerConfigUtils {
|
|||||||
}
|
}
|
||||||
if (otherConfigFile.exists()) {
|
if (otherConfigFile.exists()) {
|
||||||
val otherConfiStr = FileIOUtils.readFile2String(otherConfigFile)
|
val otherConfiStr = FileIOUtils.readFile2String(otherConfigFile)
|
||||||
val otherConfig = gson.fromJson<ImportConfig>(otherConfiStr, ImportConfig::class.java)
|
val otherConfig =
|
||||||
|
gson.fromJson<ImportConfig>(otherConfiStr, ImportConfig::class.java)
|
||||||
resultList.add(otherConfig)
|
resultList.add(otherConfig)
|
||||||
}
|
}
|
||||||
return resultList
|
return resultList
|
||||||
|
@ -118,7 +118,7 @@ class EvaluationResultViewModel @Inject constructor(
|
|||||||
/**
|
/**
|
||||||
* 查询数据库,获取问题分类
|
* 查询数据库,获取问题分类
|
||||||
*/
|
*/
|
||||||
fun initNewData(bean: SignBean?,filePath: String) {
|
fun initNewData(bean: SignBean?, filePath: String) {
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
getClassTypeList()
|
getClassTypeList()
|
||||||
getProblemLinkList()
|
getProblemLinkList()
|
||||||
@ -171,6 +171,7 @@ class EvaluationResultViewModel @Inject constructor(
|
|||||||
it.linkId =
|
it.linkId =
|
||||||
linkList[0].properties[LinkTable.linkPid] ?: ""
|
linkList[0].properties[LinkTable.linkPid] ?: ""
|
||||||
mapController.lineHandler.showLine(linkList[0].geometry)
|
mapController.lineHandler.showLine(linkList[0].geometry)
|
||||||
|
Log.e("jingo", "捕捉到的linkId = ${it.linkId}")
|
||||||
} else {
|
} else {
|
||||||
it.linkId = ""
|
it.linkId = ""
|
||||||
mapController.lineHandler.removeLine()
|
mapController.lineHandler.removeLine()
|
||||||
@ -384,13 +385,13 @@ class EvaluationResultViewModel @Inject constructor(
|
|||||||
|
|
||||||
fun addChatMsgEntity(filePath: String) {
|
fun addChatMsgEntity(filePath: String) {
|
||||||
|
|
||||||
if(filePath.isNotEmpty()){
|
if (filePath.isNotEmpty()) {
|
||||||
var chatMsgEntityList: MutableList<ChatMsgEntity> = ArrayList()
|
var chatMsgEntityList: MutableList<ChatMsgEntity> = ArrayList()
|
||||||
if(listDataChatMsgEntityList.value?.isEmpty() == false){
|
if (listDataChatMsgEntityList.value?.isEmpty() == false) {
|
||||||
chatMsgEntityList = listDataChatMsgEntityList.value!!
|
chatMsgEntityList = listDataChatMsgEntityList.value!!
|
||||||
}
|
}
|
||||||
val chatMsgEntity = ChatMsgEntity()
|
val chatMsgEntity = ChatMsgEntity()
|
||||||
chatMsgEntity.name = filePath.replace(Constant.USER_DATA_ATTACHEMNT_PATH,"").toString()
|
chatMsgEntity.name = filePath.replace(Constant.USER_DATA_ATTACHEMNT_PATH, "").toString()
|
||||||
chatMsgEntity.voiceUri = Constant.USER_DATA_ATTACHEMNT_PATH
|
chatMsgEntity.voiceUri = Constant.USER_DATA_ATTACHEMNT_PATH
|
||||||
chatMsgEntityList.add(chatMsgEntity)
|
chatMsgEntityList.add(chatMsgEntity)
|
||||||
|
|
||||||
@ -398,7 +399,7 @@ class EvaluationResultViewModel @Inject constructor(
|
|||||||
var attachmentList: RealmList<AttachmentBean> = RealmList()
|
var attachmentList: RealmList<AttachmentBean> = RealmList()
|
||||||
|
|
||||||
//赋值处理
|
//赋值处理
|
||||||
if(liveDataQsRecordBean.value?.attachmentBeanList?.isEmpty() == false){
|
if (liveDataQsRecordBean.value?.attachmentBeanList?.isEmpty() == false) {
|
||||||
attachmentList = liveDataQsRecordBean.value?.attachmentBeanList!!
|
attachmentList = liveDataQsRecordBean.value?.attachmentBeanList!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -414,7 +415,7 @@ class EvaluationResultViewModel @Inject constructor(
|
|||||||
|
|
||||||
fun startSoundMetter(activity: Activity, v: View) {
|
fun startSoundMetter(activity: Activity, v: View) {
|
||||||
|
|
||||||
if(mSpeakMode==null){
|
if (mSpeakMode == null) {
|
||||||
mSpeakMode = SpeakMode(activity)
|
mSpeakMode = SpeakMode(activity)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -424,7 +425,8 @@ class EvaluationResultViewModel @Inject constructor(
|
|||||||
pop!!.width = ViewGroup.LayoutParams.MATCH_PARENT
|
pop!!.width = ViewGroup.LayoutParams.MATCH_PARENT
|
||||||
pop!!.height = ViewGroup.LayoutParams.WRAP_CONTENT
|
pop!!.height = ViewGroup.LayoutParams.WRAP_CONTENT
|
||||||
pop!!.setBackgroundDrawable(BitmapDrawable())
|
pop!!.setBackgroundDrawable(BitmapDrawable())
|
||||||
val view = View.inflate(activity as Context, R.layout.cv_card_voice_rcd_hint_window, null)
|
val view =
|
||||||
|
View.inflate(activity as Context, R.layout.cv_card_voice_rcd_hint_window, null)
|
||||||
pop!!.contentView = view
|
pop!!.contentView = view
|
||||||
volume = view.findViewById(R.id.volume)
|
volume = view.findViewById(R.id.volume)
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,9 @@ class LineHandler(context: AppCompatActivity, mapView: NIMapView) : BaseHandler(
|
|||||||
//绘制线 样式
|
//绘制线 样式
|
||||||
private val lineStyle: Style
|
private val lineStyle: Style
|
||||||
|
|
||||||
|
//高亮线绘制线 样式
|
||||||
|
private val defaultLineStyle: Style
|
||||||
|
|
||||||
//线型编辑时的样式
|
//线型编辑时的样式
|
||||||
private val editTempStyle: Style
|
private val editTempStyle: Style
|
||||||
|
|
||||||
@ -60,14 +63,16 @@ class LineHandler(context: AppCompatActivity, mapView: NIMapView) : BaseHandler(
|
|||||||
private val mDefaultPathLayer: PathLayer
|
private val mDefaultPathLayer: PathLayer
|
||||||
|
|
||||||
val omdbTaskLinkLayer by lazy {
|
val omdbTaskLinkLayer by lazy {
|
||||||
val omdbTaskLinkLayer = OmdbTaskLinkLayer(mMapView.vtmMap,
|
val omdbTaskLinkLayer = OmdbTaskLinkLayer(
|
||||||
|
mMapView.vtmMap,
|
||||||
Style.builder()
|
Style.builder()
|
||||||
// .stippleColor(context.resources.getColor(R.color.draw_line_red_color, null))
|
// .stippleColor(context.resources.getColor(R.color.draw_line_red_color, null))
|
||||||
.fillColor(context.resources.getColor(R.color.draw_line_red_color, null))
|
.fillColor(context.resources.getColor(R.color.draw_line_red_color, null))
|
||||||
.fillAlpha(0.5f)
|
.fillAlpha(0.5f)
|
||||||
.strokeColor(context.resources.getColor(R.color.draw_line_red_color, null))
|
.strokeColor(context.resources.getColor(R.color.draw_line_red_color, null))
|
||||||
.strokeWidth(4f)
|
.strokeWidth(4f)
|
||||||
.fixed(true).build())
|
.fixed(true).build()
|
||||||
|
)
|
||||||
addLayer(omdbTaskLinkLayer, NIMapView.LAYER_GROUPS.VECTOR)
|
addLayer(omdbTaskLinkLayer, NIMapView.LAYER_GROUPS.VECTOR)
|
||||||
omdbTaskLinkLayer
|
omdbTaskLinkLayer
|
||||||
}
|
}
|
||||||
@ -84,6 +89,15 @@ class LineHandler(context: AppCompatActivity, mapView: NIMapView) : BaseHandler(
|
|||||||
.strokeColor(context.resources.getColor(R.color.draw_line_blue2_color, null))
|
.strokeColor(context.resources.getColor(R.color.draw_line_blue2_color, null))
|
||||||
.fixed(true).build()
|
.fixed(true).build()
|
||||||
|
|
||||||
|
|
||||||
|
defaultLineStyle = Style.builder()
|
||||||
|
.stippleColor(context.resources.getColor(R.color.draw_line_blue2_color, null))
|
||||||
|
.strokeWidth(10f)
|
||||||
|
.fillColor(context.resources.getColor(R.color.teal_200, null))
|
||||||
|
.fillAlpha(0.5f)
|
||||||
|
.strokeColor(context.resources.getColor(R.color.teal_200, null))
|
||||||
|
.fixed(true).build()
|
||||||
|
|
||||||
newTempStyle =
|
newTempStyle =
|
||||||
Style.builder().stippleColor(context.resources.getColor(R.color.transparent, null))
|
Style.builder().stippleColor(context.resources.getColor(R.color.transparent, null))
|
||||||
.stipple(30).stippleWidth(30f).strokeWidth(4f)
|
.stipple(30).stippleWidth(30f).strokeWidth(4f)
|
||||||
@ -95,8 +109,8 @@ class LineHandler(context: AppCompatActivity, mapView: NIMapView) : BaseHandler(
|
|||||||
.stipple(30).stippleWidth(30f).strokeWidth(8f)
|
.stipple(30).stippleWidth(30f).strokeWidth(8f)
|
||||||
.strokeColor(context.resources.getColor(R.color.draw_line_red_color, null))
|
.strokeColor(context.resources.getColor(R.color.draw_line_red_color, null))
|
||||||
.fixed(true).randomOffset(false).build()
|
.fixed(true).randomOffset(false).build()
|
||||||
mDefaultPathLayer = PathLayer(mMapView.vtmMap, lineStyle)
|
mDefaultPathLayer = PathLayer(mMapView.vtmMap, defaultLineStyle)
|
||||||
addLayer(mDefaultPathLayer, NIMapView.LAYER_GROUPS.VECTOR)
|
addLayer(mDefaultPathLayer, NIMapView.LAYER_GROUPS.OPERATE)
|
||||||
mPathLayer = PathLayer(mMapView.vtmMap, lineStyle)
|
mPathLayer = PathLayer(mMapView.vtmMap, lineStyle)
|
||||||
// addLayer(mPathLayer, NIMapView.LAYER_GROUPS.OPERATE)
|
// addLayer(mPathLayer, NIMapView.LAYER_GROUPS.OPERATE)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user