merge code
@ -116,7 +116,7 @@ class LoginViewModel @Inject constructor(
|
|||||||
//文件夹初始化
|
//文件夹初始化
|
||||||
try {
|
try {
|
||||||
loginStatus.postValue(LoginStatus.LOGIN_STATUS_FOLDER_INIT)
|
loginStatus.postValue(LoginStatus.LOGIN_STATUS_FOLDER_INIT)
|
||||||
createUserFolder(context, "1")
|
createUserFolder(context, "02911")
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
loginStatus.postValue(LoginStatus.LOGIN_STATUS_FOLDER_FAILURE)
|
loginStatus.postValue(LoginStatus.LOGIN_STATUS_FOLDER_FAILURE)
|
||||||
}
|
}
|
||||||
|
@ -313,6 +313,7 @@ class EvaluationResultViewModel @Inject constructor(
|
|||||||
fun saveData() {
|
fun saveData() {
|
||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
val realm = Realm.getDefaultInstance()
|
val realm = Realm.getDefaultInstance()
|
||||||
|
liveDataQsRecordBean.value!!.checkTime = DateTimeUtil.getDataTime()
|
||||||
realm.executeTransaction {
|
realm.executeTransaction {
|
||||||
it.copyToRealmOrUpdate(liveDataQsRecordBean.value)
|
it.copyToRealmOrUpdate(liveDataQsRecordBean.value)
|
||||||
}
|
}
|
||||||
|
@ -51,14 +51,18 @@ class QsRecordListAdapter(
|
|||||||
holder.itemView.setOnClickListener {
|
holder.itemView.setOnClickListener {
|
||||||
itemClickListener!!.onItemClickListener(position)
|
itemClickListener!!.onItemClickListener(position)
|
||||||
}
|
}
|
||||||
changeViews(binding, qsRecordBean)
|
changeViews(position, binding, qsRecordBean)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun changeViews(binding: AdapterQsRecordListBinding, qsRecordBean: QsRecordBean) {
|
private fun changeViews(position: Int,binding: AdapterQsRecordListBinding, qsRecordBean: QsRecordBean) {
|
||||||
|
if(position<99)
|
||||||
|
binding.qsRecordIndex.text = (position+1).toString()
|
||||||
|
else
|
||||||
|
binding.qsRecordIndex.text = "99."
|
||||||
binding.qsRecordClassType.text = qsRecordBean.classType
|
binding.qsRecordClassType.text = qsRecordBean.classType
|
||||||
binding.qsRecordProblemType.text = qsRecordBean.problemType
|
binding.qsRecordProblemType.text = qsRecordBean.problemType
|
||||||
binding.qsRecordPhenomenon.text = qsRecordBean.phenomenon
|
binding.qsRecordPhenomenon.text = qsRecordBean.phenomenon
|
||||||
binding.qsRecordProblemLink.text = qsRecordBean.problemLink
|
binding.qsRecordTime.text = qsRecordBean.checkTime
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemViewRes(position: Int): Int {
|
override fun getItemViewRes(position: Int): Int {
|
||||||
|
@ -44,6 +44,7 @@ class QsRecordListFragment : BaseFragment(){
|
|||||||
binding.qsRecyclerview.adapter = adapter
|
binding.qsRecyclerview.adapter = adapter
|
||||||
viewModel.liveDataQSList.observe(viewLifecycleOwner) {
|
viewModel.liveDataQSList.observe(viewLifecycleOwner) {
|
||||||
adapter.refreshData(it)
|
adapter.refreshData(it)
|
||||||
|
binding.tvTitleCount.text = "共"+adapter.data.size+"条"
|
||||||
}
|
}
|
||||||
val itemDecoration = DividerItemDecoration(context, DividerItemDecoration.VERTICAL)
|
val itemDecoration = DividerItemDecoration(context, DividerItemDecoration.VERTICAL)
|
||||||
itemDecoration.setDrawable(resources.getDrawable(R.drawable.separator))
|
itemDecoration.setDrawable(resources.getDrawable(R.drawable.separator))
|
||||||
@ -57,7 +58,7 @@ class QsRecordListFragment : BaseFragment(){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
binding.recordBack.setOnClickListener{
|
binding.imgBack.setOnClickListener{
|
||||||
findNavController().navigateUp()
|
findNavController().navigateUp()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import androidx.lifecycle.MutableLiveData
|
|||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import com.navinfo.collect.library.map.NIMapController
|
import com.navinfo.collect.library.map.NIMapController
|
||||||
|
import com.navinfo.omqs.Constant
|
||||||
import com.navinfo.omqs.bean.TaskBean
|
import com.navinfo.omqs.bean.TaskBean
|
||||||
import com.navinfo.omqs.http.NetResult
|
import com.navinfo.omqs.http.NetResult
|
||||||
import com.navinfo.omqs.http.NetworkService
|
import com.navinfo.omqs.http.NetworkService
|
||||||
@ -35,7 +36,7 @@ class TaskListViewModel @Inject constructor(
|
|||||||
viewModelScope.launch(Dispatchers.IO) {
|
viewModelScope.launch(Dispatchers.IO) {
|
||||||
|
|
||||||
var taskList: List<TaskBean> = mutableListOf()
|
var taskList: List<TaskBean> = mutableListOf()
|
||||||
when (val result = networkService.getTaskList("02911")) {
|
when (val result = networkService.getTaskList(Constant.USER_ID)) {
|
||||||
is NetResult.Success -> {
|
is NetResult.Success -> {
|
||||||
if (result.data != null) {
|
if (result.data != null) {
|
||||||
val realm = Realm.getDefaultInstance()
|
val realm = Realm.getDefaultInstance()
|
||||||
|
BIN
app/src/main/res/drawable-xhdpi/icon_filter.png
Normal file
After Width: | Height: | Size: 643 B |
BIN
app/src/main/res/drawable-xhdpi/icon_order.png
Normal file
After Width: | Height: | Size: 235 B |
BIN
app/src/main/res/drawable-xhdpi/icon_refrush.png
Normal file
After Width: | Height: | Size: 697 B |
BIN
app/src/main/res/drawable-xxhdpi/icon_filter.png
Normal file
After Width: | Height: | Size: 913 B |
BIN
app/src/main/res/drawable-xxhdpi/icon_order.png
Normal file
After Width: | Height: | Size: 423 B |
BIN
app/src/main/res/drawable-xxhdpi/icon_refrush.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
@ -2,8 +2,8 @@
|
|||||||
android:shape="line">
|
android:shape="line">
|
||||||
<size android:height="2dp"/>
|
<size android:height="2dp"/>
|
||||||
<stroke
|
<stroke
|
||||||
android:color="@color/skyblue"
|
android:color="@color/bg_gray2"
|
||||||
android:dashWidth="2px"
|
android:dashWidth="1px"
|
||||||
android:dashGap="2px"
|
android:dashGap="1px"
|
||||||
android:width="1dp"/>
|
android:width="1dp"/>
|
||||||
</shape>
|
</shape>
|
@ -1,53 +1,63 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout 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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/ivory"
|
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:paddingRight="10dp"
|
android:paddingRight="10dp"
|
||||||
android:paddingTop="5dp"
|
android:paddingTop="5dp"
|
||||||
android:paddingBottom="5dp"
|
android:paddingBottom="5dp"
|
||||||
tools:context="com.navinfo.omqs.ui.fragment.qsrecordlist.QsRecordListAdapter">
|
tools:context="com.navinfo.omqs.ui.fragment.qsrecordlist.QsRecordListAdapter">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/qs_record_index"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:drawableLeft="@mipmap/marker"
|
||||||
|
android:maxLength="3"
|
||||||
|
android:text=""
|
||||||
|
android:layout_marginRight="@dimen/default_widget_padding"
|
||||||
|
style="@style/content_font_default_size_13sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/qs_record_classType"
|
android:id="@+id/qs_record_classType"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:drawableLeft="@mipmap/point_blue"
|
|
||||||
android:text="问题分类"
|
|
||||||
style="@style/content_font_default"
|
|
||||||
android:textSize="@dimen/default_font_size" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/qs_record_problemLink"
|
|
||||||
style="@style/content_font_default"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_toRightOf="@id/qs_record_classType"
|
|
||||||
android:drawableLeft="@mipmap/point_blue"
|
|
||||||
android:layout_marginLeft="@dimen/default_widget_padding"
|
|
||||||
android:text="问题环节" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/qs_record_problem_type"
|
|
||||||
style="@style/content_font_default_size_13sp"
|
style="@style/content_font_default_size_13sp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:maxEms="6"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:layout_toRightOf="@id/qs_record_index"
|
||||||
|
android:text="问题分类" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/qs_record_time"
|
||||||
|
style="@style/content_font_default_size_13sp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/default_widget_padding"
|
||||||
|
android:layout_toRightOf="@id/qs_record_classType"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/qs_record_problem_type"
|
||||||
|
style="@style/content_font_default_size_10sp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/qs_record_classType"
|
android:layout_below="@id/qs_record_classType"
|
||||||
android:drawableLeft="@mipmap/point_blue"
|
android:layout_toRightOf="@id/qs_record_index"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:text="问题类型" />
|
android:text="问题类型" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/qs_record_phenomenon"
|
android:id="@+id/qs_record_phenomenon"
|
||||||
style="@style/content_font_default_size_13sp"
|
style="@style/content_font_default_size_10sp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_toRightOf="@id/qs_record_problem_type"
|
android:layout_toRightOf="@id/qs_record_problem_type"
|
||||||
|
android:maxLines="2"
|
||||||
android:layout_below="@id/qs_record_classType"
|
android:layout_below="@id/qs_record_classType"
|
||||||
android:drawableLeft="@mipmap/point_blue"
|
|
||||||
android:layout_marginLeft="@dimen/default_widget_padding"
|
android:layout_marginLeft="@dimen/default_widget_padding"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:text="问题现象" />
|
android:text="问题现象" />
|
||||||
|
@ -13,30 +13,85 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
style="@style/left_pannel_title_layout">
|
style="@style/left_pannel_title_layout">
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/record_back"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
android:background="@drawable/selector_bg_round_button"
|
|
||||||
android:foreground="@drawable/ripple_btn_press"
|
|
||||||
style="@style/btn_round"
|
|
||||||
android:src="@drawable/ic_baseline_keyboard_arrow_left_24"></androidx.appcompat.widget.AppCompatImageView>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/record_title"
|
android:id="@+id/evaluation_appbar_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_back"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="@dimen/left_pannel_title_font"
|
android:padding="@dimen/eight"
|
||||||
android:textStyle="bold"
|
android:layout_alignParentLeft="true"
|
||||||
android:text="我的数据"
|
android:layout_centerInParent="true"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
android:src="@drawable/btn_back_xml" />
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
<TextView
|
||||||
app:layout_constraintBottom_toBottomOf="parent"></androidx.appcompat.widget.AppCompatTextView>
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:paddingTop="@dimen/ten"
|
||||||
|
android:paddingBottom="@dimen/five"
|
||||||
|
android:text="测评结果"
|
||||||
|
android:textColor="@color/highFontColor"
|
||||||
|
android:textSize="@dimen/default_font_size" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_title_count"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/tv_title"
|
||||||
|
android:paddingLeft="@dimen/ten"
|
||||||
|
android:layout_alignStart="@+id/tv_title"
|
||||||
|
android:paddingBottom="@dimen/ten"
|
||||||
|
android:textSize="@dimen/card_title_font_3size"
|
||||||
|
android:text="(共0个)"
|
||||||
|
android:textColor="@color/cv_gray_153" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_refrush"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:padding="@dimen/eight"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_marginRight="@dimen/eight"
|
||||||
|
android:background="@drawable/icon_refrush" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_order"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:padding="@dimen/eight"
|
||||||
|
android:layout_marginRight="@dimen/eight"
|
||||||
|
android:layout_toLeftOf="@+id/img_refrush"
|
||||||
|
android:background="@drawable/icon_order" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_filter"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:padding="@dimen/eight"
|
||||||
|
android:layout_marginRight="@dimen/eight"
|
||||||
|
android:layout_toLeftOf="@+id/img_order"
|
||||||
|
android:background="@drawable/icon_filter" />
|
||||||
|
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
|
25
app/src/main/res/menu/evaluation_list_bar_mean.xml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/filter"
|
||||||
|
android:contentDescription="筛选"
|
||||||
|
android:icon="@drawable/icon_filter"
|
||||||
|
android:title="筛选"
|
||||||
|
app:showAsAction="ifRoom" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/order"
|
||||||
|
android:contentDescription="排序"
|
||||||
|
android:icon="@drawable/icon_order"
|
||||||
|
android:title="排序"
|
||||||
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/refrush"
|
||||||
|
android:contentDescription="刷新"
|
||||||
|
android:icon="@drawable/icon_refrush"
|
||||||
|
android:title="刷新"
|
||||||
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
|
</menu>
|
@ -39,7 +39,7 @@
|
|||||||
<item
|
<item
|
||||||
android:id="@+id/personal_center_menu_qs_record_list"
|
android:id="@+id/personal_center_menu_qs_record_list"
|
||||||
android:icon="@drawable/baseline_person_24"
|
android:icon="@drawable/baseline_person_24"
|
||||||
android:title="我的数据" />
|
android:title="测评结果" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/personal_center_menu_layer_manager"
|
android:id="@+id/personal_center_menu_layer_manager"
|
||||||
android:icon="@drawable/baseline_person_24"
|
android:icon="@drawable/baseline_person_24"
|
||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 355 B |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 332 B |
@ -63,6 +63,15 @@
|
|||||||
<item name="android:layout_height">wrap_content</item>
|
<item name="android:layout_height">wrap_content</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!-- 默认字体 -->
|
||||||
|
<style name="content_font_default_size_10sp">
|
||||||
|
<item name="android:gravity">center_vertical</item>
|
||||||
|
<item name="android:textSize">@dimen/card_title_font_3size</item>
|
||||||
|
<item name="android:textColor">@color/black</item>
|
||||||
|
<item name="android:layout_width">wrap_content</item>
|
||||||
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<!-- 输入框基本样式 -->
|
<!-- 输入框基本样式 -->
|
||||||
<style name="input_blue_type" parent="content_font_default">
|
<style name="input_blue_type" parent="content_font_default">
|
||||||
<item name="android:textSize">16sp</item>
|
<item name="android:textSize">16sp</item>
|
||||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.3 KiB |