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