Эх сурвалжийг харах

fix ppt内插入相关性图表显示不正确

cxmo 10 сар өмнө
parent
commit
16e3ed0c87

+ 15 - 11
src/views/ppt_manage/mixins/pptMixins.js

@@ -306,17 +306,21 @@ export default {
       }else if([3].includes(this.chartInfo.Source)){//相关性
         this.relevanceChartData={
             ChartInfo:res.Data.ChartInfo,
-						EdbInfoList:res.Data.EdbInfoList,
-						XEdbIdValue:this.chartInfo.Source === 3 ? res.Data.XEdbIdValue : res.Data.DataResp.XDateTimeValue,
-						CorrelationChartInfo:res.Data.CorrelationChartInfo,
-						YDataList:[
-							{
-								Value:this.chartInfo.Source === 3 ? res.Data.YDataList[0].Value : res.Data.DataResp.YDataList[0].Value,
-								Color:'#00f',
-								Name:res.Data.ChartInfo.ChartName,
-								NameEn:res.Data.ChartInfo.ChartNameEn
-							}
-						]
+            EdbInfoList:res.Data.EdbInfoList,
+            XEdbIdValue:this.chartInfo.Source === 3 ? res.Data.XEdbIdValue : res.Data.DataResp.XDateTimeValue,
+            CorrelationChartInfo:res.Data.CorrelationChartInfo,
+            YDataList:[
+                {
+                    Value:this.chartInfo.Source === 3 ? res.Data.YDataList[0].Value : res.Data.DataResp.YDataList[0].Value,
+                    Color:res.Data.YDataList[0].Color||'#00f',
+                    Name:res.Data.YDataList[0].Name||res.Data.ChartInfo.ChartName,
+                    NameEn:res.Data.YDataList[0].NameEn||res.Data.ChartInfo.ChartNameEn
+                }
+            ]
+        }
+        //多因子重新赋值YDataList
+        if(res.Data.CorrelationChartInfo.AnalysisMode===1){
+            this.relevanceChartData.YDataList = res.Data.YDataList
         }
         this.initRelevanceChartData()
         this.changeRelevanceOptions(currentLang)