|
@@ -60,7 +60,7 @@ export default {
|
|
|
JumpYear:0, //是否跨年
|
|
|
},
|
|
|
// 横坐标显示范围回显 - 季节性图
|
|
|
- xAxisRange:["01-01","12-31"],
|
|
|
+ // xAxisRange:["01-01","12-31"],
|
|
|
// 是否跨过一年
|
|
|
isSpanYear:false,
|
|
|
isSpanYearDisable:false,
|
|
@@ -642,9 +642,9 @@ export default {
|
|
|
let latestYear = parseInt(this.latestDate.substring(0,4))
|
|
|
|
|
|
this.season_year=[`${latestYear-this.count_year+1}-01-01`,`${latestYear}-12-31`]
|
|
|
- this.xAxisRange = ['01-01','12-31']
|
|
|
- this.SeasonExtraConfig.XStartDate = this.xAxisRange[0]
|
|
|
- this.SeasonExtraConfig.XEndDate = this.xAxisRange[1]
|
|
|
+ // this.xAxisRange = ['01-01','12-31']
|
|
|
+ this.SeasonExtraConfig.XStartDate = '01-01'
|
|
|
+ this.SeasonExtraConfig.XEndDate = '12-31'
|
|
|
this.isSpanYear=false
|
|
|
this.isSpanYearDisable=false
|
|
|
this.SeasonExtraConfig.ChartLegend=[]
|
|
@@ -658,22 +658,40 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 横轴显示范围改变
|
|
|
- xAxisRangeChange(date){
|
|
|
- if(date && date.length>0){
|
|
|
- // console.log(date[0],date[1]);
|
|
|
- let xStartDate = date[0]
|
|
|
- let xEndDate = date[1]
|
|
|
- if(new Date(`2023-${xStartDate}`) > new Date(`2023-${xEndDate}`) ||
|
|
|
- new Date(`2023-${xStartDate}`) == new Date(`2023-${xEndDate}`)){
|
|
|
+ // xAxisRangeChange(date){
|
|
|
+ // console.log(date);
|
|
|
+ // if(date && date.length>0){
|
|
|
+ // // console.log(date[0],date[1]);
|
|
|
+ // let xStartDate = date[0]
|
|
|
+ // let xEndDate = date[1]
|
|
|
+ // if(new Date(`2023-${xStartDate}`) > new Date(`2023-${xEndDate}`) ||
|
|
|
+ // new Date(`2023-${xStartDate}`) == new Date(`2023-${xEndDate}`)){
|
|
|
+ // // 开始日期 >= 结束日期 跨年
|
|
|
+ // this.isSpanYear=true
|
|
|
+ // this.isSpanYearDisable=true
|
|
|
+ // }else{
|
|
|
+ // this.isSpanYearDisable=false
|
|
|
+ // }
|
|
|
+ // // this.xAxisRange = [xStartDate,xEndDate]
|
|
|
+ // this.SeasonExtraConfig.XStartDate = xStartDate
|
|
|
+ // this.SeasonExtraConfig.XEndDate = xEndDate
|
|
|
+ // this.SeasonExtraConfig.JumpYear = this.isSpanYear?1:0
|
|
|
+ // this.getPreviewSplineInfo()
|
|
|
+ // }else{
|
|
|
+ // this.isSpanYearDisable=false
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // 横轴显示范围改变
|
|
|
+ xAxisChange(date){
|
|
|
+ if(this.SeasonExtraConfig.XStartDate && this.SeasonExtraConfig.XEndDate){
|
|
|
+ if(new Date(`2023-${this.SeasonExtraConfig.XStartDate}`) > new Date(`2023-${this.SeasonExtraConfig.XEndDate}`) ||
|
|
|
+ new Date(`2023-${this.SeasonExtraConfig.XStartDate}`) == new Date(`2023-${this.SeasonExtraConfig.XEndDate}`)){
|
|
|
// 开始日期 >= 结束日期 跨年
|
|
|
this.isSpanYear=true
|
|
|
this.isSpanYearDisable=true
|
|
|
}else{
|
|
|
this.isSpanYearDisable=false
|
|
|
}
|
|
|
- this.xAxisRange = [xStartDate,xEndDate]
|
|
|
- this.SeasonExtraConfig.XStartDate = xStartDate
|
|
|
- this.SeasonExtraConfig.XEndDate = xEndDate
|
|
|
this.SeasonExtraConfig.JumpYear = this.isSpanYear?1:0
|
|
|
this.getPreviewSplineInfo()
|
|
|
}else{
|