|
@@ -37,6 +37,7 @@
|
|
|
v-if="infoForm.Model===2"
|
|
|
ref="multipleIndForm"
|
|
|
:info-form="infoForm"
|
|
|
+ :isMultipleChartAdd="isMultipleChartAdd"
|
|
|
:chart-info-data="chartInfoData"
|
|
|
:SeriesList="SeriesList"
|
|
|
@selectTarget="handleSelectTarget"
|
|
@@ -270,6 +271,7 @@ export default {
|
|
|
factorTableData:[],//多因子-相关性矩阵表格
|
|
|
factorTableDataSortCopy:[],//复制一份,用于还原排序
|
|
|
multipleChartData:_.cloneDeep(baseChartInfo),//多因子图表信息
|
|
|
+ IndTarget:{},//存储标的指标信息
|
|
|
showMultipleChart:false,//是否显示多因子相关性图表
|
|
|
|
|
|
isSaveChartToBase:false,
|
|
@@ -404,7 +406,9 @@ export default {
|
|
|
this.infoForm[type] = target.EdbInfoId||''
|
|
|
const {max,min,data} = await this.getEdbDetail(target)
|
|
|
if(type==='IndTarget'){
|
|
|
- this.multipleChartData.ChartInfo = data
|
|
|
+ this.IndTarget = data
|
|
|
+ //点计算时,才真正赋值ChartInfo
|
|
|
+ //this.multipleChartData.ChartInfo = data
|
|
|
}
|
|
|
//若为单因子,选择AB指标后预览曲线图
|
|
|
if(!['EdbInfoIdA','EdbInfoIdB'].includes(type)) return
|
|
@@ -456,6 +460,16 @@ export default {
|
|
|
this.infoForm.MultipleGraphConfigId = MultipleGraphConfigId;
|
|
|
this.previewSingleChart({})
|
|
|
}else{
|
|
|
+ //已添加指标后重新计算
|
|
|
+ if(this.isMultipleChartAdd){
|
|
|
+ const {ChartInfoId,UniqueCode,ClassifyId} = this.multipleChartData.ChartInfo
|
|
|
+ this.multipleChartData.ChartInfo = this.IndTarget
|
|
|
+ this.multipleChartData.ChartInfo.ChartInfoId = ChartInfoId
|
|
|
+ this.multipleChartData.ChartInfo.UniqueCode = UniqueCode
|
|
|
+ this.multipleChartData.ChartInfo.ClassifyId = ClassifyId
|
|
|
+ }else{
|
|
|
+ this.multipleChartData.ChartInfo = this.IndTarget
|
|
|
+ }
|
|
|
//多因子:根据分析周期生成相关性矩阵,在未添加曲线前不生成图表
|
|
|
this.previewMultipleTable()
|
|
|
}
|
|
@@ -786,7 +800,7 @@ export default {
|
|
|
},
|
|
|
//多因子-保存/更新/另存为图表
|
|
|
async saveMultipleChart({ChartName,ClassifyId,type}){
|
|
|
- const {IndTarget,Correlation} = this.infoForm
|
|
|
+ const {/* IndTarget, */Correlation} = this.infoForm
|
|
|
const {SourcesFrom,YDataList} = this.multipleChartData
|
|
|
const SeriesEdb = YDataList.map(i=>{
|
|
|
return {
|
|
@@ -794,6 +808,8 @@ export default {
|
|
|
EdbInfoId:i.Id
|
|
|
}
|
|
|
})
|
|
|
+ //BaseEdbInfoId取当前图表中的Id 不取form里的
|
|
|
+ const BaseEdbInfoId = this.multipleChartData.ChartInfo.EdbInfoId
|
|
|
const SeriesIds = this.$refs.multipleIndForm.factorList.map(i=>i.SeriesId)
|
|
|
const LegendConfig = YDataList.map(i=>{
|
|
|
return {
|
|
@@ -806,7 +822,7 @@ export default {
|
|
|
let params = {
|
|
|
ChartName,ClassifyId,
|
|
|
AnalysisMode:1,
|
|
|
- BaseEdbInfoId:IndTarget,
|
|
|
+ BaseEdbInfoId:BaseEdbInfoId/* IndTarget */,
|
|
|
FactorCorrelation:{
|
|
|
...Correlation,
|
|
|
SeriesEdb,
|