|
@@ -440,15 +440,25 @@ export default {
|
|
return checkBool
|
|
return checkBool
|
|
},
|
|
},
|
|
//预览单因子图表 初始化 chartBatchData
|
|
//预览单因子图表 初始化 chartBatchData
|
|
- async previewSingleChart(){
|
|
|
|
|
|
+ async previewSingleChart(initConfig=null){
|
|
const res = await chartRelevanceApi.previewChartBatch({...this.infoForm});
|
|
const res = await chartRelevanceApi.previewChartBatch({...this.infoForm});
|
|
if(res.Ret !== 200) return
|
|
if(res.Ret !== 200) return
|
|
this.chartBatchData = res.Data;
|
|
this.chartBatchData = res.Data;
|
|
- const SourcesFrom = this.chartBatchData.CorrelationData.ChartInfo.SourcesFrom
|
|
|
|
- try{
|
|
|
|
- this.chartBatchData.SourcesFrom = SourcesFrom?JSON.parse(SourcesFrom):baseSourcesFrom
|
|
|
|
- }catch(e){
|
|
|
|
- this.chartBatchData.SourcesFrom = baseSourcesFrom
|
|
|
|
|
|
+ //第一次初始化时,需初始化图例和数据来源信息
|
|
|
|
+ if(initConfig){
|
|
|
|
+ const {CorrelationExtraConfig,SourcesFrom} = initConfig
|
|
|
|
+ try{
|
|
|
|
+ this.chartBatchData.SourcesFrom = SourcesFrom?JSON.parse(SourcesFrom):baseSourcesFrom
|
|
|
|
+ }catch(e){
|
|
|
|
+ this.chartBatchData.SourcesFrom = baseSourcesFrom
|
|
|
|
+ }
|
|
|
|
+ try{
|
|
|
|
+ const {LegendConfig} = CorrelationExtraConfig?JSON.parse(CorrelationExtraConfig):{LegendConfig:[]}
|
|
|
|
+ this.chartBatchData.CorrelationData.YDataList[0].Color = LegendConfig[0].Color
|
|
|
|
+ this.chartBatchData.CorrelationData.YDataList[0].Name = LegendConfig[0].Legendlame
|
|
|
|
+ }catch(e){
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//预览多因子矩阵 初始化 factorTableData
|
|
//预览多因子矩阵 初始化 factorTableData
|
|
@@ -631,7 +641,9 @@ export default {
|
|
isRollEdbTwoAdd: res.Data.EdbMappingList.some(_ => _.MultipleLocationSource===4)
|
|
isRollEdbTwoAdd: res.Data.EdbMappingList.some(_ => _.MultipleLocationSource===4)
|
|
}
|
|
}
|
|
//初始化chartBatch
|
|
//初始化chartBatch
|
|
- this.previewSingleChart()
|
|
|
|
|
|
+ const RelevanceInfo = res.Data.ChartMappingList.find(_=>_.MultipleLocationSource===2)
|
|
|
|
+ const {CorrelationExtraConfig,SourcesFrom} = RelevanceInfo
|
|
|
|
+ this.previewSingleChart({CorrelationExtraConfig,SourcesFrom})
|
|
},
|
|
},
|
|
//获取多因子图表详情
|
|
//获取多因子图表详情
|
|
getMultiplyDetail(){
|
|
getMultiplyDetail(){
|