|
@@ -120,7 +120,7 @@
|
|
|
<div class="multiple-model-wrap" v-if="infoForm.Model===2">
|
|
|
<!-- 相关性矩阵表格 -->
|
|
|
<div class="relevant-matrix-table-box" v-if="factorTableData.length">
|
|
|
- <el-table style="width: 100%;" height="100%" :data="factorTableData" :row-class-name="getTableRowClassname">
|
|
|
+ <el-table style="width: 100%;" height="100%" :data="factorTableData" :row-class-name="getTableRowClassname" @sort-change="sortChange">
|
|
|
<el-table-column
|
|
|
fixed
|
|
|
:label="$t('StatisticAnalysis.ChartRelevance.multiple_table_head_01')"
|
|
@@ -154,7 +154,7 @@
|
|
|
:label="LeadLabelName">
|
|
|
<el-table-column v-for="(num,index) in SortedArray" :key="num"
|
|
|
min-width="45px"
|
|
|
- sortable
|
|
|
+ sortable="custom"
|
|
|
prop="LeadValue"
|
|
|
align="center"
|
|
|
class-name="zip-cell"
|
|
@@ -268,6 +268,7 @@ export default {
|
|
|
SeriesList:[],//多因子系列列表,编辑时有值
|
|
|
SortedArray:[],//多因子-领先期数数组 ±N
|
|
|
factorTableData:[],//多因子-相关性矩阵表格
|
|
|
+ factorTableDataSortCopy:[],//复制一份,用于还原排序
|
|
|
multipleChartData:_.cloneDeep(baseChartInfo),//多因子图表信息
|
|
|
showMultipleChart:false,//是否显示多因子相关性图表
|
|
|
|
|
@@ -345,6 +346,25 @@ export default {
|
|
|
if(!this.$route.query.code){
|
|
|
this.multipleChartData.SourcesFrom.isShow = this.SourcesFromVisable
|
|
|
}
|
|
|
+ },
|
|
|
+ sortChange({column,prop,order}){
|
|
|
+ const {label} = column
|
|
|
+ this.factorTableData.sort((a,b)=>{
|
|
|
+ if(order==='ascending'){
|
|
|
+ return a.dataList[label] - b.dataList[label]
|
|
|
+ }else{
|
|
|
+ return b.dataList[label] - a.dataList[label]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //取消order 排序还原为factorTableDataSortCopy的顺序
|
|
|
+ if(!order){
|
|
|
+ const table = this.factorTableDataSortCopy.map(copyItem=>{
|
|
|
+ return this.factorTableData.find(i=>i.EdbInfoId===copyItem.EdbInfoId&&i.SeriesId===copyItem.SeriesId)
|
|
|
+ })
|
|
|
+ this.factorTableData = table
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
//禁用表格行的样式
|
|
|
getTableRowClassname({row}){
|
|
@@ -362,6 +382,7 @@ export default {
|
|
|
this.infoForm = _.cloneDeep(baseForm)
|
|
|
this.chartBatchData = null
|
|
|
this.factorTableData = []
|
|
|
+ this.factorTableDataSortCopy=[]
|
|
|
this.showMultipleChart = false
|
|
|
this.infoForm.Model = this.typeModel
|
|
|
this.typeModel = 0
|
|
@@ -500,6 +521,7 @@ export default {
|
|
|
const SeriesIds = this.$refs.multipleIndForm.factorList.map(i=>i.SeriesId)
|
|
|
//清空表格和图表
|
|
|
this.factorTableData = []
|
|
|
+ this.factorTableDataSortCopy=[]
|
|
|
this.multipleChartData.YDataList=[]
|
|
|
this.showMultipleChart = false
|
|
|
chartRelevanceApi.getCorrelationMatrix({
|
|
@@ -533,6 +555,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.factorTableData = [...SuccessList,...FailList]
|
|
|
+ this.factorTableDataSortCopy = _.cloneDeep(this.factorTableData)
|
|
|
//获取分析周期,生成±分析周期的数组
|
|
|
const {LeadValue,LeadUnit,CalculateUnit,CalculateValue} = this.infoForm.Correlation
|
|
|
this.SortedArray = generateSortedArray(LeadValue)
|
|
@@ -757,6 +780,7 @@ export default {
|
|
|
dataList:i.Values.map(v=>v.YData)
|
|
|
}
|
|
|
})
|
|
|
+ this.factorTableDataSortCopy = _.cloneDeep(this.factorTableData)
|
|
|
this.SortedArray = generateSortedArray(LeadValue)
|
|
|
})
|
|
|
},
|