|
@@ -545,12 +545,14 @@ export default {
|
|
|
|
|
|
this.tableData.forEach((item) => {
|
|
|
let edbData = EdbInfoList.find(_ => _.EdbInfoId===item.EdbInfoId);
|
|
|
- item.DataList = edbData.DataList;
|
|
|
- //更新起始时间和最近更新时间
|
|
|
- item.StartDate = edbData.StartDate;
|
|
|
- item.ModifyTime = edbData.ModifyTime;
|
|
|
-
|
|
|
- if(edbData.EdbInfoCategoryType===1) item.MoveLatestDate = edbData.MoveLatestDate;
|
|
|
+ if(edbData){
|
|
|
+ item.DataList = edbData.DataList;
|
|
|
+ //更新起始时间和最近更新时间
|
|
|
+ item.StartDate = edbData.StartDate;
|
|
|
+ item.ModifyTime = edbData.ModifyTime;
|
|
|
+ if(edbData.EdbInfoCategoryType===1) item.MoveLatestDate = edbData.MoveLatestDate;
|
|
|
+ }
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
|
|
@@ -1090,49 +1092,62 @@ export default {
|
|
|
? chartTypeMap[this.chartInfo.ChartType]()
|
|
|
: this.setChartOptionHandle(this.tableData);
|
|
|
},
|
|
|
- //更新季节性图(不重新获取数据)
|
|
|
+ //更新季节性图额外配置显示隐藏(不重新获取数据)
|
|
|
updateSeasonChart({SeasonAverageConfig,SeasonRightEdbConfig}){
|
|
|
if(this.chartInfo.SeasonAverageConfig){
|
|
|
const {MaxMinLimits,SamePeriodAverage,SamePeriodStandardDeviation} = SeasonAverageConfig
|
|
|
this.chartInfo.SeasonAverageConfig.MaxMinLimits.IsShow = MaxMinLimits.IsShow||false
|
|
|
this.chartInfo.SeasonAverageConfig.SamePeriodAverage.IsShow = SamePeriodAverage.IsShow||false
|
|
|
this.chartInfo.SeasonAverageConfig.SamePeriodStandardDeviation.IsShow = SamePeriodStandardDeviation.IsShow||false
|
|
|
-
|
|
|
- this.reLoadChartOption()
|
|
|
}
|
|
|
+ if(this.chartInfo.SearonRightConfig){
|
|
|
+ this.chartInfo.SearonRightConfig.IsShow = SeasonRightEdbConfig.IsShow||false
|
|
|
+ }
|
|
|
+ this.reLoadChartOption()
|
|
|
},
|
|
|
//预览季节性图(请求接口)
|
|
|
- previewSeasonChart({SeasonAverageConfig,SeasonRightEdbConfig}){
|
|
|
- let db_arr = this.tableData.map(item => ({
|
|
|
- ChartColor: item.ChartColor,
|
|
|
- PredictChartColor: item.PredictChartColor,
|
|
|
- ChartStyle: item.ChartStyle,
|
|
|
- ChartWidth: Number(item.ChartWidth),
|
|
|
- EdbInfoId: item.EdbInfoId,
|
|
|
- EdbAliasName: item.EdbAliasName,
|
|
|
- EdbInfoType: item.EdbInfoType,
|
|
|
- IsAxis: item.IsAxis,
|
|
|
- IsOrder: item.IsOrder,
|
|
|
- LeadUnit: item.EdbInfoType ? '' : item.LeadUnit,
|
|
|
- LeadValue: item.EdbInfoType ? 0 : Number(item.LeadValue),
|
|
|
- MaxData: Number(item.MaxData),
|
|
|
- MinData: Number(item.MinData)
|
|
|
- }))
|
|
|
- const ChartEdbInfoList = db_arr
|
|
|
+ previewSeasonChart({SeasonAverageConfig,SeasonRightEdbConfig={IndicatorType:1}}){
|
|
|
+ let db_arr = this.tableData.map((_,index) => {
|
|
|
+ const {IsConvert,ConvertType,ConvertValue,ConvertUnit,ConvertEnUnit} = this.updateData[index]
|
|
|
+ return {
|
|
|
+ EdbInfoId: _.EdbInfoId,
|
|
|
+ EdbInfoType: _.EdbInfoType,
|
|
|
+ LeadValue: _.EdbInfoType ? 0 : Number(_.LeadValue),
|
|
|
+ LeadUnit: _.EdbInfoType ? '' : _.LeadUnit,
|
|
|
+ IsConvert:Number(IsConvert),
|
|
|
+ ConvertType,
|
|
|
+ ConvertValue:Number(ConvertValue),
|
|
|
+ ConvertUnit:IsConvert?ConvertUnit:'',
|
|
|
+ ConvertEnUnit:IsConvert?ConvertEnUnit:''
|
|
|
+ }
|
|
|
+ })
|
|
|
+ const params = {
|
|
|
+ ChartType:this.chartInfo.ChartType,
|
|
|
+ DateType:this.year_select,
|
|
|
+ StartDate:[5 , 6].includes(this.year_select)? dateArray[0]: '',
|
|
|
+ EndDate:this.year_select === 5 ? dateArray[1]: '',
|
|
|
+ Calendar: this.calendar_type,
|
|
|
+ StartYear:this.count_year || 0,
|
|
|
+ ChartEdbInfoList:SeasonRightEdbConfig.IndicatorType===1?db_arr[0]:db_arr,//如果右轴为左轴同比,则只取第一个
|
|
|
+ }
|
|
|
const {MaxMinLimits,SamePeriodAverage,SamePeriodStandardDeviation} = SeasonAverageConfig
|
|
|
const SeasonExtraConfig = {
|
|
|
...this.SeasonExtraConfig,
|
|
|
MaxMinLimits:MaxMinLimits.IsAdd?SeasonAverageConfig.MaxMinLimits:{},
|
|
|
SamePeriodAverage:SamePeriodAverage.IsAdd?SamePeriodAverage:{},
|
|
|
- SamePeriodStandardDeviation:SamePeriodStandardDeviation.IsAdd?SamePeriodStandardDeviation:{}
|
|
|
+ SamePeriodStandardDeviation:SamePeriodStandardDeviation.IsAdd?SamePeriodStandardDeviation:{},
|
|
|
+ RightAxis:SeasonRightEdbConfig.IsAdd?SeasonRightEdbConfig:{}
|
|
|
+ //右轴的具体配置
|
|
|
}
|
|
|
- dataBaseInterface.seasonPreviewData({ChartEdbInfoList,SeasonExtraConfig}).then(res=>{
|
|
|
+ params.SeasonExtraConfig = SeasonExtraConfig
|
|
|
+ dataBaseInterface.getSplinePreviewData(params).then(res=>{
|
|
|
if(res.Ret!==200) return
|
|
|
const {DataResp} = res.Data
|
|
|
- const {MaxMinLimits,SamePeriodAverage,SamePeriodStandardDeviation} = DataResp
|
|
|
+ const {MaxMinLimits,SamePeriodAverage,SamePeriodStandardDeviation,RightAxis} = DataResp
|
|
|
this.chartInfo.SeasonAverageConfig = {
|
|
|
MaxMinLimits,SamePeriodAverage,SamePeriodStandardDeviation
|
|
|
}
|
|
|
+ this.chartInfo.SearonRightConfig = RightAxis
|
|
|
this.reLoadChartOption()
|
|
|
})
|
|
|
|
|
@@ -1149,7 +1164,9 @@ export default {
|
|
|
}else{
|
|
|
this.delTarget(tableData)
|
|
|
}
|
|
|
- this.reLoadChartOption()
|
|
|
+ //mock
|
|
|
+ //this.reLoadChartOption()
|
|
|
+ this.previewSeasonChart({SeasonAverageConfig:this.chartInfo.SeasonAverageConfig,SeasonRightEdbConfig:rightConfig})
|
|
|
},
|
|
|
//获取图表全局设置
|
|
|
async getChartBaseSetting(){
|