|
|
@@ -29,7 +29,9 @@ import cn.muchinfo.rma.global.data.BannerData
|
|
|
import cn.muchinfo.rma.global.data.NoticeData
|
|
|
import cn.muchinfo.rma.global.data.WrGoodsPerformanceStepData
|
|
|
import cn.muchinfo.rma.global.data.account.loginQeruy.GoodsInfo
|
|
|
+import cn.muchinfo.rma.global.toShowTime
|
|
|
import cn.muchinfo.rma.global.toShowTime3
|
|
|
+import cn.muchinfo.rma.global.utils.TimeUtils
|
|
|
import cn.muchinfo.rma.lifecycle.bindOptional
|
|
|
import cn.muchinfo.rma.lifecycle.getAppCompatActivity
|
|
|
import cn.muchinfo.rma.view.autoWidget.*
|
|
|
@@ -56,6 +58,9 @@ import com.github.aachartmodel.aainfographics.aaoptionsmodel.AAScrollablePlotAre
|
|
|
import com.qmuiteam.qmui.util.QMUIDisplayHelper
|
|
|
import com.qmuiteam.qmui.widget.tab.QMUITabIndicator
|
|
|
import com.qmuiteam.qmui.widget.tab.QMUITabSegment
|
|
|
+import kotlinx.coroutines.Dispatchers
|
|
|
+import kotlinx.coroutines.GlobalScope
|
|
|
+import kotlinx.coroutines.launch
|
|
|
import mtp.polymer.com.autowidget.adapter.BaseAdapter
|
|
|
import mtp.polymer.com.information_management.hnstocks.message.MessageDetailsActivity
|
|
|
import org.greenrobot.eventbus.EventBus
|
|
|
@@ -91,6 +96,9 @@ class TjmdHomeFragment : BaseFragment<TjmdHomeViewModel>(){
|
|
|
|
|
|
lateinit var dataRecyclerview : RecyclerView
|
|
|
|
|
|
+ lateinit var chartView : AAChartView
|
|
|
+ lateinit var chartModel : AAChartModel
|
|
|
+
|
|
|
val thisTag by lazy {
|
|
|
"TjmdHomeFragment"
|
|
|
}
|
|
|
@@ -183,7 +191,11 @@ class TjmdHomeFragment : BaseFragment<TjmdHomeViewModel>(){
|
|
|
viewModel.getBanner()
|
|
|
|
|
|
viewModel.setDataList(thisTag){isCompleted, err ->
|
|
|
-
|
|
|
+ GlobalScope.launch(Dispatchers.Main) {
|
|
|
+ chartModel.yAxisMin(viewModel.wrAverageTradePriceMin)
|
|
|
+ chartModel.yAxisMax(viewModel.wrAverageTradePriceMax)
|
|
|
+ chartView.aa_drawChartWithChartModel(chartModel)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
viewModel.queryNotice()
|
|
|
@@ -519,11 +531,13 @@ class TjmdHomeFragment : BaseFragment<TjmdHomeViewModel>(){
|
|
|
}
|
|
|
|
|
|
chartview {
|
|
|
+ chartView = this
|
|
|
visibility = View.GONE
|
|
|
val aaChartModel = AAChartModel()
|
|
|
.chartType(AAChartType.Areaspline)
|
|
|
.title("")
|
|
|
.yAxisTitle("")
|
|
|
+ .yAxisAllowDecimals(true)
|
|
|
.legendEnabled(false)
|
|
|
.dataLabelsEnabled(false)
|
|
|
.yAxisGridLineWidth(0f)
|
|
|
@@ -547,12 +561,16 @@ class TjmdHomeFragment : BaseFragment<TjmdHomeViewModel>(){
|
|
|
val list = it
|
|
|
val totalexposureelement = AASeriesElement()
|
|
|
.lineWidth(2f)
|
|
|
- .name("成交均价")
|
|
|
+ .name("结算价")
|
|
|
.step(true)
|
|
|
.data(list?.map { it.s?.toDouble() ?: 0.0 }!!.toTypedArray())
|
|
|
- aaChartModel.categories(list.map { it.getTime() }.toTypedArray())
|
|
|
+ aaChartModel.categories(list.map {
|
|
|
+ // 时间格式化
|
|
|
+ TimeUtils.covnDate3(it.getTime())
|
|
|
+ }.toTypedArray())
|
|
|
aaChartModel.series(arrayOf(totalexposureelement))
|
|
|
- aa_drawChartWithChartModel(aaChartModel)
|
|
|
+ chartModel = aaChartModel
|
|
|
+ // aa_drawChartWithChartModel(aaChartModel)
|
|
|
}
|
|
|
|
|
|
}.lparams(matchParent, autoSize(380))
|
|
|
@@ -575,6 +593,4 @@ class TjmdHomeFragment : BaseFragment<TjmdHomeViewModel>(){
|
|
|
}
|
|
|
}.view
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|