|
@@ -628,6 +628,8 @@ export default {
|
|
|
};
|
|
|
this.tableData = EdbInfoList;
|
|
|
|
|
|
+ this.calendar_type = this.chartInfo.Calendar; //日历类型
|
|
|
+
|
|
|
this.$nextTick(()=>{
|
|
|
this.setDefaultDateSelect(); //设置默认的日期选中
|
|
|
this.setDefaultPreviewOption() // 设置配置项
|
|
@@ -650,19 +652,28 @@ export default {
|
|
|
setDefaultDateSelect() {
|
|
|
this.year_select = this.chartInfo.DateType;
|
|
|
this.select_date = [this.chartInfo.StartDate, this.chartInfo.EndDate];
|
|
|
- this.calendar_type = this.chartInfo.Calendar; //日历类型
|
|
|
- this.season_year = [
|
|
|
- this.chartInfo.SeasonStartDate,
|
|
|
- this.chartInfo.SeasonEndDate,
|
|
|
- ];
|
|
|
+ this.count_year = this.chartInfo.StartYear;
|
|
|
+ // this.calendar_type = this.chartInfo.Calendar; //日历类型
|
|
|
+
|
|
|
+ if(this.chartInfo.ChartType==2){
|
|
|
+ if(this.year_select==20){
|
|
|
+ let latestYear = parseInt(this.tableData[0].LatestDate.substring(0,4))
|
|
|
+ this.season_year=[`${latestYear-this.count_year+1}-01-01`,`${latestYear}-12-31`]
|
|
|
+ }else if(this.year_select==6){
|
|
|
+ this.season_year = [this.chartInfo.SeasonStartDate,this.tableData[0].LatestDate];
|
|
|
+ }else{
|
|
|
+ this.season_year = [this.chartInfo.SeasonStartDate,this.chartInfo.SeasonEndDate]
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
this.dateTip =
|
|
|
this.chartInfo.DateType === 5
|
|
|
? `${this.chartInfo.StartDate}~${this.chartInfo.EndDate}`
|
|
|
: this.chartInfo.DateType === 6
|
|
|
? `${this.chartInfo.StartDate}~至今`
|
|
|
- : this.chartInfo.DateType === 20
|
|
|
- ?'最近5年'
|
|
|
- : '请选择时间段';
|
|
|
+ : this.chartInfo.DateType === 20
|
|
|
+ ?`最近${this.chartInfo.StartYear}年`
|
|
|
+ :'请选择时间段';
|
|
|
|
|
|
},
|
|
|
// 设置配置项
|