Browse Source

ETA1.0.5提测

hbchen 1 year ago
parent
commit
182da1cbd4

+ 1 - 0
config/index.js

@@ -38,6 +38,7 @@ module.exports = {
     proxyTable:{
 		'/adminapi': {
       target: "http://8.136.199.33:7778",
+      // target: "http://192.168.20.49:8605",
 			// secure:false,  // 如果是https接口,需要配置这个参数
 			changeOrigin:true, // 如果接口跨域,需要进行这个参数配置
 			pathRewrite:{

+ 8 - 7
src/views/dataEntry_manage/addChart.vue

@@ -126,7 +126,7 @@
 						@change="xAxisRangeChange"
 						></el-date-picker>
 					<el-checkbox label="跨年" v-model="isSpanYear" :disabled="isSpanYearDisable"
-					style="margin-top: 12px;"></el-checkbox>
+					style="margin-top: 12px;" @change="changeIsSpanYear"></el-checkbox>
 					<div class="legend-set-text" @click="openLegendEditDia">
 						<span>图例名称设置</span>
 						<img src="~@/assets/img/icons/edit-blue.png" />
@@ -519,7 +519,7 @@
 		<!-- 季节性 图例设置 -->
 		<LegendEditDia
       :isEditLegend="legendEditDiaShow"
-			:legendList="legendList"
+			:legendList="SeasonExtraConfig.ChartLegend"
       @cancel="legendEditDiaShow = false"
       @saveLegend="saveLegend"
     />
@@ -652,6 +652,7 @@ export default {
 						? {
 								...public_param,
 								DateType: this.year_select,
+								StartYear: this.count_year || 0,
 								StartDate:
 										[5,6].includes(this.year_select)
 											? this.select_date[0]
@@ -659,11 +660,11 @@ export default {
 								EndDate: this.year_select === 5 ? this.select_date[1] : '',
 							} 
 						: typePrams
-					console.log(params);
-					// dataBaseInterface.chartAdd(params).then(res => {
-					// 	if(res.Ret !== 200) return;
-					// 		this.setChartImage(res.Data);
-					// })
+					// console.log(params);
+					dataBaseInterface.chartAdd(params).then(res => {
+						if(res.Ret !== 200) return;
+							this.setChartImage(res.Data);
+					})
 				}
 			})
 		},

+ 73 - 21
src/views/dataEntry_manage/chartSetting.vue

@@ -1541,6 +1541,7 @@ export default {
       this.setExtremumDate()
 
       this.setDefaultDateSelect(); //设置默认的日期选中
+      this.setDefaultPreviewOption(); //设置默认预览配置项
 
       sessionStorage.setItem('defaultArr',JSON.stringify(res.Data.EdbInfoList));
 
@@ -1559,33 +1560,62 @@ export default {
 
     /* 设置默认时间选中项 */
     setDefaultDateSelect() {
+      // console.log(this.chartInfo,'chartInfo');
+      // console.log(this.latestDate,'chartInfo');
+      // console.log();
       this.year_select = this.chartInfo.DateType;
+      this.count_year = this.chartInfo.StartYear;
       this.select_date = [this.chartInfo.StartDate, this.chartInfo.EndDate];
       this.calendar_type = this.chartInfo.Calendar; //日历类型
-      this.season_year = [
-        this.chartInfo.SeasonStartDate,
-        this.chartInfo.SeasonEndDate,
-      ];
+      
+      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
+          ?`最近${this.chartInfo.StartYear}年`
+          :'请选择时间段';
+
+    },
+    // 设置默认预览配置项
+    setDefaultPreviewOption(){
+      if(this.chartInfo.ChartType==2){
+        if(this.chartInfo.SeasonExtraConfig){
+          this.SeasonExtraConfig = JSON.parse(this.chartInfo.SeasonExtraConfig)
+        }
+      }
     },
 
     /* 获取图表详情信息  type为refresh刷新指标不存储时间 */
     async getPreviewChartInfo(type) {
+      let dateArray=this.chartInfo.ChartType==2?this.season_year:this.select_date
+
       let params = {
         ChartType: this.chartInfo.ChartType,
         DateType: this.year_select,
-        StartDate: [5, 6].includes(this.year_select)
-          ? this.select_date[0]
+        StartDate: [5 , 6].includes(this.year_select)
+          ? dateArray[0]
           : '',
-        EndDate: this.year_select === 5 ? this.select_date[1] : '',
+        EndDate: this.year_select === 5 ? dateArray[1] : '',
         Calendar: this.calendar_type,
-        SeasonStartDate: this.season_year ? this.season_year[0] : '',
-        SeasonEndDate: this.season_year ? this.season_year[1] : '',
+        // ETA1.0.5 去除了这两个入参
+        // SeasonStartDate: this.season_year ? this.season_year[0] : '',
+        // SeasonEndDate: this.season_year ? this.season_year[1] : '',
+        SeasonExtraConfig:this.SeasonExtraConfig,
+        StartYear:this.count_year || 0,
         ChartEdbInfoList: this.tableData.map(_ => ({
           EdbInfoId: _.EdbInfoId,
           EdbInfoType: _.EdbInfoType,
@@ -1760,9 +1790,11 @@ export default {
           case 2:
             typeChartParam = {
               ...public_param,
+              DateType: this.year_select,
+              StartYear:this.count_year || 0,
               Calendar: this.calendar_type,
-              SeasonStartDate: this.season_year ? this.season_year[0] : '',
-              SeasonEndDate: this.season_year ? this.season_year[1] : '',
+              StartDate: this.season_year ? this.season_year[0] : '',
+              EndDate: this.season_year ? this.season_year[1] : '',
             }
             break
           case 7:
@@ -1791,6 +1823,7 @@ export default {
           ? {
               ...public_param,
               DateType: this.year_select,
+              StartYear:this.count_year || 0,
               StartDate:
                 this.year_select === 5 || this.year_select === 6
                   ? this.select_date[0]
@@ -1972,21 +2005,24 @@ export default {
       this.select_date = '';
       this.dateTip = '请选择时间段';
       //保存表格配置和上下限 曲线图需要保存表格配置 季节图就不用了
-      this.saveNowOptions();
+      // this.saveNowOptions();
       // 图表已存在
       this.selected_chartid && this.getPreviewChartInfo();
     },
     /* 打开时间段弹窗 */
     openDateDia() {
       // 自定义时间段回显
+			let selectDateStart = this.chartInfo.ChartType === 2?this.season_year[0]:this.select_date[0]
+			let selectDateEnd = this.chartInfo.ChartType === 2?this.season_year[1]:this.select_date[1]
+
       this.dateForm = {
         date_type: this.year_select,
         start_date:
           this.year_select === 5 || this.year_select === 6
-            ? this.select_date[0]
+            ? selectDateStart
             : '',
-        end_date: this.year_select === 5 ? this.select_date[1] : '',
-        count_year: this.year_select === 100 ? this.count_year : ''
+        end_date: this.year_select === 5 ? selectDateEnd : '',
+        count_year: this.year_select === 20 ? this.count_year : ''
       };
       this.isDateDia = true;
     },
@@ -1997,11 +2033,27 @@ export default {
       this.isDateDia = false;
       this.select_date = [data.start_date, data.end_date];
       this.count_year = data.count_year
-      if(chartInfo.ChartType === 2){
+
+      let dateStart = data.start_date
+			let dateEnd = data.end_date
+			let latestYear = parseInt(this.latestDate.substring(0,4))
+			if(data.dateType==20){
+				dateStart = `${latestYear-data.count_year+1}-01-01`
+				dateEnd = `${latestYear}-12-31`
+			}
+
+      if(this.chartInfo.ChartType === 2){
         // 季节性图
-        this.season_year[0]
+				if(data.dateType==6){
+					dateEnd = this.$moment(new Date()).format("YYYY-MM-DD")
+				}
+				this.season_year = [dateStart, dateEnd];
+				// 因为原本季节性图不支持 DateType为5和6的 所以季节性也将StartDate和EndDate传过去
+				this.select_date = [dateStart, dateEnd];
       }else{
-        if(data.dateType==100){
+				this.select_date = [dateStart, dateEnd];
+
+        if(data.dateType==20){
           this.dateTip = `最近${data.count_year}年`
         }else if (data.dateType === 5) {
           this.dateTip = `${data.start_date}~${data.end_date}`;
@@ -2011,7 +2063,7 @@ export default {
       }
 
       // this.saveNowOptions();
-      // this.getPreviewChartInfo();
+      this.getPreviewChartInfo();
     },
 
     /* 编辑图表 跳转 */
@@ -2159,7 +2211,7 @@ export default {
     },
     /* 季节图切换年份  保持当前配置 */
     seasonYearChange() {
-      this.saveNowOptions();
+      // this.saveNowOptions();
       this.getPreviewChartInfo();
     },
     /* 一键刷新 超长等待..*/

+ 2 - 2
src/views/dataEntry_manage/components/DateChooseDia.vue

@@ -117,13 +117,13 @@ export default {
 				this.$message.warning('请输入正确的数字')
 				return 
 			}
-			console.log(this.radioType,this.dateType,this.start_date,this.end_date,this.dates,this.count_year);
+			// console.log(this.radioType,this.dateType,this.start_date,this.end_date,this.dates,this.count_year);
 
 			if(this.radioType == 2 && (!this.start_date || (!this.end_date && this.dateType === 2))) {
 				this.$message.warning('请选择正确的时间段')
 			}else {
 				this.$emit('dateBack',{
-					dateType: this.radioType==1?100:this.dateType === 1 ? 6 : 5,
+					dateType: this.radioType==1?20:this.dateType === 1 ? 6 : 5,
 					start_date: this.start_date,
 					end_date: this.dateType === 1 ? '' : this.end_date,
 					count_year:this.count_year

+ 2 - 2
src/views/dataEntry_manage/components/LegendEditDia.vue

@@ -9,9 +9,9 @@
   v-dialogDrag 
   width="600px">
     <div class="dialog-legend">
-      <div v-for="(item,index) in legendListCopy" key="index" class="legend-item">
+      <div v-for="(item,index) in legendListCopy" :key="item.Name" class="legend-item">
         <div class="legend-item-color" :style="{backgroundColor:seasonColor[index]}"></div>
-        <el-input v-model="item.legendName" placeholder="请输入图例名称" style="width: 295px;"></el-input>
+        <el-input v-model="item.Value" placeholder="请输入图例名称" style="width: 295px;"></el-input>
       </div>
       <div class="legend-box-hint">默认取该曲线第一个数据年份作为图例名称,手动编辑为其他格式,则不再自动更新</div>
     </div>

+ 153 - 100
src/views/dataEntry_manage/databaseComponents/createChart.vue

@@ -33,17 +33,19 @@
 				<el-button type="text" class="btn-sty" @click="showOnChart('toggle')" v-if="!isOnlyShowBaseChart">{{ isShowOnyearData ? '隐藏同比图' : '展示同比图'}}</el-button>
 			</template>
 			<!-- 季节图时间选择 -->
-			<template v-else-if="chart_type===2">
-				<date-picker
+			<!-- <template v-else-if="chart_type===2"> -->
+				<!-- <date-picker
 						v-model="season_year"
 						type="month"
 						value-type="format"
 						range
 						placeholder="年份日期选择"
 						@change="getDataByPath"
-				/>
-			</template>
-
+				/> -->
+			<!-- </template> -->
+			<div v-else-if="chart_type === 2" @click="openDateDia" class="date-setting">
+				{{ season_year && season_year.length>0 ? season_year[0]+'~'+season_year[1]:"年份日期选择" }}
+			</div>
 			<span class="change-chart-btn" @click="chartTypeChange" v-if="!isOnlyShowBaseChart">切换{{chart_type==1?'季节性图':'曲线图'}}</span>
 		</div>
 		<div class="min-wrapper">
@@ -183,6 +185,8 @@ export default {
 				MinValue: 0,
 				MaxValue: 0
 			},
+			// 最近几年
+			count_year:'',
 		};
 	},
 	methods: {
@@ -201,6 +205,7 @@ export default {
 			let params = {
 				EdbInfoId: this.edbid,
 				DateType: this.year_select,
+				StartYear:this.count_year || 0,
 				StartDate: this.select_date[0] || '',
 				EndDate: this.select_date[1] || ''
 			}
@@ -209,7 +214,9 @@ export default {
 				? await dataBaseInterface.ebd_data(params)
 				: await dataBaseInterface.ebdSeasonData({
 						EdbInfoId: this.edbid,
+						DateType: this.year_select,
 						Calendar: this.calendar_type,
+						StartYear:this.count_year || 0,
 						StartDate: this.season_year[0] || '',
 						EndDate: this.season_year[1] || '',
 					})
@@ -222,7 +229,10 @@ export default {
 						...this.oldOptions
 					} : EdbInfo;
 					this.tableData = DataList || [];
-
+					if(this.chart_type==2){
+						let latestYear = parseInt(this.chartInfo.LatestDate.substring(0,4))
+						this.season_year = [`${latestYear-this.count_year+1}-01-01`,`${latestYear}-12-31`];
+					}
 					this.chart_type === 1 ? this.setOptions() : this.setSeasonOptions();
 					this.showChart = true;
 		},
@@ -232,6 +242,7 @@ export default {
 			let params = {
 				VarietyEdbId: this.edbid,
 				DateType: this.year_select,
+				StartYear:this.count_year || 0,
 				StartDate: this.select_date[0] || '',
 				EndDate: this.select_date[1] || ''
 			}
@@ -240,7 +251,9 @@ export default {
 				? await supplyApi.getEdbDetailData(params)
 				: await supplyApi.getEdbSeasonData({
 						VarietyEdbId: this.edbid,
+						DateType: this.year_select,
 						Calendar: this.calendar_type,
+						StartYear:this.count_year || 0,
 						StartDate: this.season_year[0] || '',
 						EndDate: this.season_year[1] || '',
 					})
@@ -254,6 +267,11 @@ export default {
 					} : EdbInfo;
 					this.tableData = DataList || [];
 
+					if(this.chart_type==2){
+						let latestYear = parseInt(this.chartInfo.LatestDate.substring(0,4))
+						this.season_year = [`${latestYear-this.count_year+1}-01-01`,`${latestYear}-12-31`];
+					}
+
 					this.chart_type === 1 ? this.setOptions() : this.setSeasonOptions();
 					this.showChart = true;
 		},
@@ -275,13 +293,17 @@ export default {
 		/* 打开时间段弹窗 */
     openDateDia() {
       // 自定义时间段回显
+
+			let selectDateStart = this.chart_type === 2?this.season_year[0]:this.select_date[0]
+			let selectDateEnd = this.chart_type === 2?this.season_year[1]:this.select_date[1]
       this.dateForm = {
         date_type: this.year_select,
         start_date:
           this.year_select === 5 || this.year_select === 6
-            ? this.select_date[0]
+            ? selectDateStart
             : '',
-        end_date: this.year_select === 5 ? this.select_date[1] : '',
+        end_date: this.year_select === 5 ? selectDateEnd : '',
+        count_year: this.year_select === 20 ? this.count_year : ''
       };
       this.isDateDia = true;
     },
@@ -291,12 +313,26 @@ export default {
       this.year_select = data.dateType;
       this.isDateDia = false;
       this.select_date = [data.start_date, data.end_date];
+      this.count_year = data.count_year
 
       this.dateTip =
         data.dateType === 5
           ? `${data.start_date}~${data.end_date}`
-          : `${data.start_date}~至今`;
-
+          : data.dateType === 6
+					?`${data.start_date}~至今`
+					:`最近${this.count_year}年`
+			if(this.chart_type === 2){
+				let latestYear = parseInt(this.chartInfo.LatestDate.substring(0,4))
+				let dateStart = data.start_date
+				let dateEnd = data.end_date
+				if(data.dateType==20){
+					dateStart = `${latestYear-this.count_year+1}-01-01`
+					dateEnd = `${latestYear}-12-31`
+				}else if(data.dateType==6){
+					dateEnd = this.chartInfo.LatestDate
+				}
+				this.season_year = [dateStart, dateEnd];
+			}
 			const { MinValue,MaxValue } = this.chartInfo;
 			this.oldOptions = {
 				MinValue,
@@ -328,6 +364,7 @@ export default {
 
 			let params = {
 				DateType: this.year_select,
+				StartYear:this.count_year || 0,
 				StartDate: this.select_date[0] || '',
 				EndDate: this.select_date[1] || ''
 			}
@@ -481,26 +518,31 @@ export default {
 		setSeasonOptions() {
 			console.log(this.tableData)
       const chartData = _.cloneDeep(this.tableData);
+
+			// 农历数据需要去除第一项 在ETA1.0.5之后,除了这里 农历和公历处理逻辑一样
+			const chartDataHandle=this.calendar_type === '农历'?
+												chartData.filter((item, index) => index > 0):
+												chartData
       let seasonYdata = [],
         seasonData = [];
 
         /* 公历数据处理 处理数据列 y轴 */
-        if (this.calendar_type === '公历')
-        for (let j of chartData) {
+        // if (this.calendar_type === '公历')
+        for (let j of chartDataHandle) {
           
           let serie_item = {
             data: [],
             type: 'spline',
             yAxis: 0,
-            name: j.Year,
+            name: j.ChartLegend,
           };
           const data_array = _.cloneDeep(j.DataList);
           data_array &&
             data_array.forEach((item) => {
               serie_item.data.push([item.DataTimestamp, item.Value]);
             });
-          const index = chartData.findIndex(
-            (item) => item.Year === j.Year
+          const index = chartDataHandle.findIndex(
+            (item) => item.ChartLegend === j.ChartLegend
           );
           const s_yItem = {
             labels: {
@@ -527,48 +569,48 @@ export default {
         }
 
       /* 农历数据处理  */
-      let filterArr =
-        this.calendar_type === '农历'
-          ? chartData.List.filter((item, index) => index > 0)
-          : [];
-      if (this.calendar_type === '农历')
-        for (let j of filterArr) {
-
-          let serie_item = {
-            data: [],
-            type: 'spline',
-            yAxis: 0,
-            name: j.Year
-          };
-          const data_array = _.cloneDeep(j.Items);
-          data_array &&
-            data_array.forEach((item) => {
-              serie_item.data.push([item.DataTimestamp, item.Value]);
-            });
-          const index = filterArr.findIndex((item) => item.Year === j.Year);
-          const s_yItem = {
-            labels: {
-              formatter: function () {
-                let val = this.value;
-                return index !== 0 ? '' : val;
-              },
-              align: 'center',
-            },
-            title: {
-              text:  this.chartLang=='ch'?this.chartInfo.Unit:
-							!this.chartInfo.UnitEn && this.chartInfo.Unit && this.chartInfo.Unit!='无' ? '英文单位':this.chartInfo.UnitEn,
-              align: 'high',
-              rotation: 0,
-              y: -15,
-              offset: -(12 * this.chartInfo.Unit.length),
-            },
-            max: Number(this.chartInfo.MaxValue),
-            min: Number(this.chartInfo.MinValue),
-            ...seasonOptions.yAxis,
-          };
-          seasonData.push(serie_item);
-          seasonYdata.push(s_yItem);
-        }
+      // let filterArr =
+      //   this.calendar_type === '农历'
+      //     ? chartData.List.filter((item, index) => index > 0)
+      //     : [];
+      // if (this.calendar_type === '农历')
+      //   for (let j of filterArr) {
+
+      //     let serie_item = {
+      //       data: [],
+      //       type: 'spline',
+      //       yAxis: 0,
+      //       name: j.Year
+      //     };
+      //     const data_array = _.cloneDeep(j.Items);
+      //     data_array &&
+      //       data_array.forEach((item) => {
+      //         serie_item.data.push([item.DataTimestamp, item.Value]);
+      //       });
+      //     const index = filterArr.findIndex((item) => item.Year === j.Year);
+      //     const s_yItem = {
+      //       labels: {
+      //         formatter: function () {
+      //           let val = this.value;
+      //           return index !== 0 ? '' : val;
+      //         },
+      //         align: 'center',
+      //       },
+      //       title: {
+      //         text:  this.chartLang=='ch'?this.chartInfo.Unit:
+			// 				!this.chartInfo.UnitEn && this.chartInfo.Unit && this.chartInfo.Unit!='无' ? '英文单位':this.chartInfo.UnitEn,
+      //         align: 'high',
+      //         rotation: 0,
+      //         y: -15,
+      //         offset: -(12 * this.chartInfo.Unit.length),
+      //       },
+      //       max: Number(this.chartInfo.MaxValue),
+      //       min: Number(this.chartInfo.MinValue),
+      //       ...seasonOptions.yAxis,
+      //     };
+      //     seasonData.push(serie_item);
+      //     seasonYdata.push(s_yItem);
+      //   }
 
       /* x轴显示月日  提示框显示月日*/
       defaultOpts.xAxis.labels = {
@@ -588,52 +630,49 @@ export default {
         },
         xDateFormat: '%m/%d',
       }
-      let rangeSelector =
-        this.calendar_type === '农历'
-          ? {
-              enabled: true,
-              selected: 0,
-              inputStyle: {
-                display: 'none',
-              },
-              labelStyle: {
-                display: 'none',
-              },
-              buttonTheme: {
-                style: {
-                  display: 'none',
-                },
-              },
-              buttons: [
-                {
-                  type: 'month',
-                  count: 12,
-                  text: '12月',
-                },
-                {
-                  type: 'month',
-                  count: 15,
-                  text: '15月',
-                },
-                {
-                  type: 'all',
-                  text: '全部',
-                  type: 'all',
-                },
-              ],
-            }
-          : {
-              enabled: false,
-            };
+      // let rangeSelector =
+      //   this.calendar_type === '农历'
+      //     ? {
+      //         enabled: true,
+      //         selected: 0,
+      //         inputStyle: {
+      //           display: 'none',
+      //         },
+      //         labelStyle: {
+      //           display: 'none',
+      //         },
+      //         buttonTheme: {
+      //           style: {
+      //             display: 'none',
+      //           },
+      //         },
+      //         buttons: [
+      //           {
+      //             type: 'month',
+      //             count: 12,
+      //             text: '12月',
+      //           },
+      //           {
+      //             type: 'month',
+      //             count: 15,
+      //             text: '15月',
+      //           },
+      //           {
+      //             type: 'all',
+      //             text: '全部',
+      //             type: 'all',
+      //           },
+      //         ],
+      //       }
+      //     : {
+      //         enabled: false,
+      //       };
 
       this.options = {
-        colors:
-          this.calendar_type === '公历'
-            ? seasonOptions.colors.slice(-chartData.length)
-            : seasonOptions.colors.slice(-filterArr.length),
+        colors:seasonOptions.colors.slice(-chartDataHandle.length),
         series: seasonData,
         yAxis: seasonYdata,
-        rangeSelector,
+        // rangeSelector,
         tooltip
       };
 			console.log(this.options)
@@ -663,8 +702,11 @@ export default {
 
 		init(type='') {
 			if(type!=='no_reset') this.chart_type = 1;
+
 			this.isShowOnyearData = false;
-			this.year_select = 10;
+			this.year_select = this.chart_type==1 ? 10 : 20;
+			// 季节性图默认展示最近5年数据
+			this.count_year=5
 			this.select_date = [];
 			this.options = {};
 			this.dateTip = '请选择时间段';
@@ -744,6 +786,17 @@ export default {
 			padding: 10px;
 			border: 1px solid #409eff;
 		}
+		.date-setting{
+			width: 210px;
+			// height: 40px;
+			padding: 10px;
+			border: 1px solid #DCDFE6;
+			border-radius: 4px;
+			cursor: pointer;
+			font-size: 14px;
+			color: #333333;
+			box-sizing: border-box;
+		}
 		.change-chart-btn{
 				float: right;
 				color: #409eff;

+ 43 - 5
src/views/dataEntry_manage/editChart.vue

@@ -135,7 +135,7 @@
 						@change="xAxisRangeChange"
 					></el-date-picker>
 					<el-checkbox label="跨年" v-model="isSpanYear" :disabled="isSpanYearDisable"
-					style="margin-top: 12px;"></el-checkbox>
+					style="margin-top: 12px;" @change="changeIsSpanYear"></el-checkbox>
 					<div class="legend-set-text" @click="openLegendEditDia">
 						<span>图例名称设置</span>
 						<img src="~@/assets/img/icons/edit-blue.png" />
@@ -520,6 +520,14 @@
       @dateBack="dataChangeBack"
     />
 
+		<!-- 季节性 图例设置 -->
+		<LegendEditDia
+      :isEditLegend="legendEditDiaShow"
+			:legendList="SeasonExtraConfig.ChartLegend"
+      @cancel="legendEditDiaShow = false"
+      @saveLegend="saveLegend"
+    />
+
 		<!-- 图表另存 -->
     <SaveChartOther 
       :show.sync="isShowSaveOther" 
@@ -538,8 +546,10 @@ import DateChooseDia from './components/DateChooseDia';
 import SaveChartOther from './components/SaveChartOther';
 import barOption from './components/barOptionSection.vue';
 import sectionalScatterOption from './components/sectionalScatterOption.vue';
+import LegendEditDia from './components/LegendEditDia.vue';
+
 export default {
-  components: { Chart,DateChooseDia,SaveChartOther,barOption,sectionalScatterOption },
+  components: { Chart,DateChooseDia,SaveChartOther,barOption,sectionalScatterOption,LegendEditDia },
 	directives: {
     drag(el, bindings) {
       el.onmousedown = function (e) {
@@ -617,8 +627,13 @@ export default {
 						Unit: BarChartInfo ? BarChartInfo.Unit : ''
 					};
           this.tableData = EdbInfoList;
-          this.setDefaultDateSelect(); //设置默认的日期选中
-					
+
+					this.$nextTick(()=>{
+						this.setDefaultDateSelect(); //设置默认的日期选中
+						this.setDefaultPreviewOption() // 设置配置项
+					})
+
+
 					if(this.chartInfo.ChartType === 7) {
 						//特殊柱形图数据
 						this.initBarData(res.Data)
@@ -645,9 +660,31 @@ export default {
           ? `${this.chartInfo.StartDate}~${this.chartInfo.EndDate}`
           : this.chartInfo.DateType === 6
           ? `${this.chartInfo.StartDate}~至今`
+					: this.chartInfo.DateType === 20
+          ?'最近5年'
           : '请选择时间段';
+			
+    },
+    // 设置配置项
+    setDefaultPreviewOption(){
+      if(this.chartInfo.ChartType==2){
+				this.count_year = this.chartInfo.StartYear
+				if(!(this.chartInfo.SeasonEndDate && this.chartInfo.SeasonStartDate)){
+					// 获取最近日期的年
+					let latestYear = parseInt(this.latestDate.substring(0,4))
+					this.season_year=[`${latestYear-this.count_year+1}-01-01`,`${latestYear}-12-31`]
+				}
+        if(this.chartInfo.SeasonExtraConfig){
+          this.SeasonExtraConfig = JSON.parse(this.chartInfo.SeasonExtraConfig)
+					// console.log(this.SeasonExtraConfig);
+					this.xAxisRange = [this.SeasonExtraConfig.XStartDate,this.SeasonExtraConfig.XEndDate]
+					this.isSpanYear=!!this.SeasonExtraConfig.JumpYear
+					this.isSpanYearDisable=
+					!!(new Date(`2023-${this.SeasonExtraConfig.XStartDate}`) > new Date(`2023-${this.SeasonExtraConfig.XEndDate}`) || 
+					new Date(`2023-${this.SeasonExtraConfig.XStartDate}`) == new Date(`2023-${this.SeasonExtraConfig.XEndDate}`))
+        }
+      }
     },
-
 		 /* 保存 */
 		saveHandle() {
 			if(!this.tableData.length) return this.$message.warning('暂未选择指标');
@@ -692,6 +729,7 @@ export default {
 					? {
 							...public_param,
 							DateType: this.year_select,
+							StartYear: this.count_year || 0,
 							StartDate:
 									[5,6].includes(this.year_select)
 										? this.select_date[0]

+ 127 - 84
src/views/dataEntry_manage/mixins/addOreditMixin.js

@@ -52,15 +52,19 @@ export default {
 			search_have_more: true,
 			search_page: 1,
 			current_search:'',
-			// 横坐标显示范围 - 季节性图
-			xAxisRange:[],
+			// 季节性图和额外配置
+			SeasonExtraConfig:{
+				ChartLegend:[], // 图例名称数组
+				XStartDate:"01-01", // 横坐标显示范围 - 开始
+				XEndDate:"12-31", // 横坐标显示范围-结束
+				JumpYear:0, //是否跨年
+			},
+			// 横坐标显示范围回显 - 季节性图
+			xAxisRange:["01-01","12-31"],
 			// 是否跨过一年
 			isSpanYear:false,
 			isSpanYearDisable:false,
 			legendEditDiaShow:false,
-			legendList:[],
-			// 用于还原
-			legendListResetUse:[]
 		}
 	},
 	computed: {
@@ -140,31 +144,50 @@ export default {
 
 			/* 正常图获取指标数据 柱形图不获取 */
 			if(this.chartInfo.ChartType !== 7) {
-				let params = this.sameOptionType.includes(this.chartInfo.ChartType) 
-					? {
-						EdbInfoId: item.EdbInfoId,
-						ChartType: this.chartInfo.ChartType,
-						DateType: this.year_select,
-						StartDate:
-							this.year_select === 5 || this.year_select === 6
-								? this.select_date[0]
-								: '',
-						EndDate: this.year_select === 5 ? this.select_date[1] : '',
-					} 
-					: {
-						EdbInfoId: item.EdbInfoId,
-						ChartType: this.chartInfo.ChartType,
-						Calendar: this.calendar_type,
-						SeasonStartDate: this.season_year ? this.season_year[0] : '',
-						SeasonEndDate: this.season_year ? this.season_year[1] : '',
-					};
+				// let params = this.sameOptionType.includes(this.chartInfo.ChartType) 
+				// 	? {
+				// 		EdbInfoId: item.EdbInfoId,
+				// 		ChartType: this.chartInfo.ChartType,
+				// 		DateType: this.year_select,
+				// 		StartDate:
+				// 			this.year_select === 5 || this.year_select === 6
+				// 				? this.select_date[0]
+				// 				: '',
+				// 		EndDate: this.year_select === 5 ? this.select_date[1] : '',
+				// 	} 
+				// 	: {
+				// 		EdbInfoId: item.EdbInfoId,
+				// 		ChartType: this.chartInfo.ChartType,
+				// 		Calendar: this.calendar_type,
+				// 		SeasonStartDate: '',
+				// 		SeasonEndDate: '',
+				// 	};
+				let dateArray=this.chartInfo.ChartType==2?this.season_year:this.select_date
+
+				let params = {
+					EdbInfoId: item.EdbInfoId,
+					ChartType: this.chartInfo.ChartType,
+					Calendar: this.chartInfo.ChartType===2?this.calendar_type:undefined,
+					DateType: this.year_select,
+					StartYear:this.count_year,
+					StartDate:
+						this.year_select === 5 || this.year_select === 6
+							? dateArray[0]
+							: '',
+					EndDate: this.year_select === 5 ? dateArray[1] : '',
+				} 
 				dataBaseInterface.chartInfo(params).then((res) => {
 					if(res.Ret !== 200) return;
 						let [ tableItem ] = res.Data.EdbInfoList;
-	
 						// 同一指标切换图表类型
 						if(type) {
 							this.tableData = [ tableItem ];
+
+							this.$nextTick(()=>{
+								// 等待 tableData的 监听里面的获取到 起始时间和最近日期
+								this.setChartDefault()
+							})
+
 							return
 						};
 						//检查添加指标是否已存在
@@ -246,16 +269,20 @@ export default {
 
 		/* 曲线图切换筛选项时请求数据 */
 		async getPreviewSplineInfo() {
+			let dateArray=this.chartInfo.ChartType==2?this.season_year:this.select_date
 			let params = {
         ChartType: this.chartInfo.ChartType,
         DateType: this.year_select,
-        StartDate: [5, 6].includes(this.year_select)
-          ? this.select_date[0]
+        StartDate: [5 , 6].includes(this.year_select)
+          ? dateArray[0]
           : '',
-        EndDate: this.year_select === 5 ? this.select_date[1] : '',
+        EndDate: this.year_select === 5 ? dateArray[1]: '',
         Calendar: this.calendar_type,
-        SeasonStartDate: this.season_year ? this.season_year[0] : '',
-        SeasonEndDate: this.season_year ? this.season_year[1] : '',
+				StartYear:this.count_year || 0,
+				// ETA1.0.5 去除了这两个入参
+        // SeasonStartDate: this.season_year ? this.season_year[0] : '',
+        // SeasonEndDate: this.season_year ? this.season_year[1] : '',
+				SeasonExtraConfig:this.SeasonExtraConfig,
         ChartEdbInfoList: this.tableData.map(_ => ({
           EdbInfoId: _.EdbInfoId,
           EdbInfoType: _.EdbInfoType,
@@ -270,6 +297,18 @@ export default {
 
       const { EdbInfoList } = res.Data;
 
+			if(this.chartInfo.ChartType == 2){
+				const chartDataHandle = this.calendar_type === "农历"?
+															EdbInfoList[0].DataList.filter((item, index) => index > 0):
+															EdbInfoList[0].DataList
+
+				// 季节性图例回显
+				this.SeasonExtraConfig.ChartLegend = []
+				chartDataHandle.map(item =>{
+					this.SeasonExtraConfig.ChartLegend.push({Name:item.Years,Value:item.ChartLegend})
+				})
+			}
+
       this.tableData.forEach((item) => {
         let edbData = EdbInfoList.find(_ => _.EdbInfoId===item.EdbInfoId);
         item.DataList = edbData.DataList;
@@ -299,7 +338,7 @@ export default {
 						? selectDateStart
 						: '',
 				end_date: this.year_select === 5 ? selectDateEnd : '',
-				count_year: this.year_select === 100 ? this.count_year : ''
+				count_year: this.year_select === 20 ? this.count_year : ''
 			};
 			this.isDateDia = true;
 		},
@@ -308,39 +347,35 @@ export default {
 			this.year_select = data.dateType;
 			this.isDateDia = false;
       this.count_year = data.count_year
+
+			let dateStart = data.start_date
+			let dateEnd = data.end_date
+			let latestYear = parseInt(this.latestDate.substring(0,4))
+			if(data.dateType==20){
+				dateStart = `${latestYear-data.count_year+1}-01-01`
+				dateEnd = `${latestYear}-12-31`
+			}
+
 			if(this.chartInfo.ChartType === 2){
-				this.season_year = [data.start_date, data.end_date];
-				/*
-					根据区间更新 横坐标显示范围的值
-					根据选择的时间长度和指标数据区间交集,取最新数据所在年份,修改横坐标显示范围的年份
-				*/
-				// console.log(data.start_date,this.latestDate);
-				// if(new Date(data.start_date) > new Date(this.latestDate)){
-				// 	let latestYear = parseInt(this.latestDate.substring(0,4))
-				// 	this.xAxisRange=[`${latestYear}-01-01`,`${latestYear}-12-31`]
-				// }else if(new Date(data.end_date) > new Date(this.latestDate)){
-				// 	let latestYear = parseInt(this.latestDate.substring(0,4))
-				// 	let startMonthAndDate = this.xAxisRange[0].substring(4)
-				// 	let endMonthAndDate = this.xAxisRange[1].substring(4)
-				// 	this.xAxisRange=[latestYear+startMonthAndDate,latestYear+endMonthAndDate]
-				// }else{
-				// 	let latestYear = parseInt(data.end_date.substring(0,4))
-				// 	let startMonthAndDate = this.xAxisRange[0].substring(4)
-				// 	let endMonthAndDate = this.xAxisRange[1].substring(4)
-				// 	this.xAxisRange=[latestYear+startMonthAndDate,latestYear+endMonthAndDate]
-				// }
-			}else{
-				this.select_date = [data.start_date, data.end_date];
-				if(data.dateType==100){
-					this.dateTip = `最近${data.count_year}年`
-				}else if (data.dateType === 5) {
-					this.dateTip = `${data.start_date}~${data.end_date}`;
-				} else {
-					this.dateTip = `${data.start_date}~至今`;
+				if(data.dateType==6){
+					// 回显
+					dateEnd = this.$moment(new Date()).format("YYYY-MM-DD")
 				}
 			}
 
-			// this.getPreviewSplineInfo();
+			this.season_year = [dateStart, dateEnd];
+			// 因为原本季节性图不支持 DateType为5和6的 所以季节性也将StartDate和EndDate传过去
+			this.select_date = [dateStart, dateEnd];
+
+			if(data.dateType==20){
+				this.dateTip = `最近${data.count_year}年`
+			}else if (data.dateType === 5) {
+				this.dateTip = `${data.start_date}~${data.end_date}`;
+			} else {
+				this.dateTip = `${data.start_date}~至今`;
+			}
+
+			this.getPreviewSplineInfo();
 		},
 
 			/* 季节图切换年份  保持当前配置 */
@@ -350,7 +385,7 @@ export default {
 
 		/* 切换图重置状态 */
 		initStatus() {
-			this.year_select = 3;
+			this.year_select = this.chartInfo.ChartType === 2?20:3;
 			this.select_date = '';
 			this.isSetExtremeValue = true;
 			this.calendar_type = '公历';
@@ -515,9 +550,11 @@ export default {
 					return {
 						...public_param,
 						Calendar: this.calendar_type,
-						CountYear: this.count_year,
-						SeasonStartDate: this.season_year ? this.season_year[0] : '',
-						SeasonEndDate: this.season_year ? this.season_year[1] : '',
+						DateType: this.year_select,
+						StartYear: this.count_year || 0,
+						StartDate: this.season_year ? this.season_year[0] : '',
+						EndDate: this.season_year ? this.season_year[1] : '',
+						SeasonExtraConfig:this.SeasonExtraConfig
 					}
 				case 7:
 					return {
@@ -548,8 +585,6 @@ export default {
 						StartDate: "",
 						EndDate: "",
 						Calendar: "公历",
-						SeasonStartDate: "",
-						SeasonEndDate: "",
 						ExtraConfig: JSON.stringify({
 							XName: this.$refs.SectionScatterOptRef.seriesArr[0].x_title,
 							YName: this.$refs.SectionScatterOptRef.seriesArr[0].y_title,
@@ -597,18 +632,29 @@ export default {
 		},
 		// 设置图表的默认值
 		setChartDefault(){
-			console.log(this.latestDate,this.earliestDate,'earliestDate');
+			// console.log(this.latestDate,this.earliestDate,'earliestDate');
 			if(!(this.tableData && this.tableData.length>0)) return 
 			if(this.chartInfo.ChartType === 2){
 				// 季节性图默认选择最近5年
-				this.year_select = 100
+				this.year_select = 20
 				this.count_year = 5	
 				// 获取最近日期的年
 				let latestYear = parseInt(this.latestDate.substring(0,4))
-				this.season_year=[`${latestYear-4}-01-01`,`${latestYear}-12-31`]
+
+				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.isSpanYear=false
 				this.isSpanYearDisable=false
+				this.SeasonExtraConfig.ChartLegend=[]
+
+				const chartDataHandle = this.calendar_type === "农历"?
+														this.tableData[0].DataList.filter((item, index) => index > 0):
+														this.tableData[0].DataList
+				chartDataHandle.map(item =>{
+					this.SeasonExtraConfig.ChartLegend.push({Name:item.Years,Value:item.ChartLegend})
+				})
 			}
 		},
 		// 横轴显示范围改变
@@ -617,39 +663,36 @@ export default {
 				// console.log(date[0],date[1]);
 				let xStartDate = date[0]
 				let xEndDate = date[1]
-				if(new Date(`2013-${xStartDate}`) > new Date(`2013-${xEndDate}`) || 
-				new Date(`2013-${xStartDate}`) == new Date(`2013-${xEndDate}`)){
+				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
 			}
 		},
+		changeIsSpanYear(value){
+			this.SeasonExtraConfig.JumpYear = value?1:0
+			this.getPreviewSplineInfo()
+		},
 		// 打开图例编辑窗口
 		openLegendEditDia(){
 			this.legendEditDiaShow=true
-			console.log(this.tableData);
-			if(!(this.legendListResetUse && this.legendListResetUse.length>0)){
-				// 由于季节性只有一个指标列
-				this.tableData[0].DataList.map((item,index) => {
-					this.legendListResetUse.push({legendId:index+1,legendName:item.Year+''})
-					this.legendList.push({legendId:index+1,legendName:item.Year+''})
-				})
-			}else{
-				let len = this.legendList.length
-				let resetUseLen = this.legendListResetUse.length
-
-			}
-			console.log(this.legendList,'legendList');
 		},
 		// 图例编辑接口保存
 		saveLegend(copyList){
 			if(copyList && copyList.length>0){
-				this.legendList = copyList
+				this.SeasonExtraConfig.ChartLegend = copyList
+				this.getPreviewSplineInfo()
 				this.legendEditDiaShow=false
 			}
 		}

+ 116 - 101
src/views/dataEntry_manage/mixins/chartPublic.js

@@ -40,11 +40,17 @@ const basicYAxis = {
 export const chartSetMixin = {
 	data() {
 		return {
-			year_select: yearSelector[0].value, //默认区间15年至今 值等于 5、6、100 是自定义时间段
+      /**
+       * 默认区间15年至今 值等于 5、6、20 是自定义时间段
+       * 20代表最近几年 季节性图默认 最近5年
+       * 6代表至今 只需要选择开始日期
+       * 5代表范围 需要选择开始日期和结束日期
+       */
+			year_select: yearSelector[0].value,
       sameOptionType:[1,3,4,5,6],// 头部一样 配置一样的图表类型 曲线 散点 柱状 面积 组合
       yearSelector, //年份按钮组
       select_date: '', //自定义时间段
-      count_year: '', //最近年数
+      count_year: 0, //最近年数
       isDateDia: false, // 时间段弹窗
       earliestDate:'', // 最早的日期 - 起始日期
       latestDate:'', //最晚日期 - 最新日期
@@ -160,7 +166,14 @@ export const chartSetMixin = {
       },
 
       /* 统计频率图 */
-      statisticFrequencyData: {}
+      statisticFrequencyData: {},
+      // 季节性图和额外配置 这里为了预览
+			SeasonExtraConfig:{
+				ChartLegend:[], // 图例名称数组
+				XStartDate:"01-01", // 横坐标显示范围 - 开始
+				XEndDate:"12-31", // 横坐标显示范围-结束
+				JumpYear:0, //是否跨年
+			},
 		}
 	},
   watch: {
@@ -742,11 +755,16 @@ export const chartSetMixin = {
       this.rightIndex = -1;
       this.rightTwoIndex = -1;
       const chartData = newval[0];
+      // 农历数据需要去除第一项 在ETA1.0.5之后,除了这里 农历和公历处理逻辑一样
+      const chartDataHandle=this.calendar_type === '农历'?
+                            chartData.DataList.filter((item, index) => index > 0):
+                            chartData.DataList
+
       let seasonYdata = [],
         seasonData = [];
         /* 公历数据处理 处理数据列 y轴 */
-        if (this.calendar_type === '公历')
-        for (let j of chartData.DataList) {
+        // if (this.calendar_type === '公历')
+        for (let j of chartDataHandle) {
           //预测指标配置
           let predict_params =  chartData.EdbInfoCategoryType === 1 ? this.getSeasonPredictParams(j.CuttingDataTimestamp) : {};
           
@@ -754,7 +772,7 @@ export const chartSetMixin = {
             data: [],
             type: chartData.ChartStyle,
             yAxis: 0,
-            name: j.Year,
+            name: j.ChartLegend,
             ...predict_params
           };
           const data_array = _.cloneDeep(j.DataList);
@@ -762,8 +780,8 @@ export const chartSetMixin = {
             data_array.forEach((item) => {
               serie_item.data.push([item.DataTimestamp, item.Value]);
             });
-          const index = chartData.DataList.findIndex(
-            (item) => item.Year === j.Year
+          const index = chartDataHandle.findIndex(
+            (item) => item.ChartLegend === j.ChartLegend
           );
           const s_yItem = {
             labels: {
@@ -794,57 +812,56 @@ export const chartSetMixin = {
           seasonYdata.push(s_yItem);
         }
 
-      /* 农历数据处理  */
-      let filterArr =
-        this.calendar_type === '农历'
-          ? chartData.DataList.List.filter((item, index) => index > 0)
-          : [];
-      if (this.calendar_type === '农历')
-        for (let j of filterArr) {
-           //预测指标配置
-          let predict_params =  chartData.EdbInfoCategoryType === 1 ? this.getSeasonPredictParams(j.CuttingDataTimestamp) : {};
-
-          let serie_item = {
-            data: [],
-            type: chartData.ChartStyle,
-            yAxis: 0,
-            name: j.Year,
-            ...predict_params
-          };
-          const data_array = _.cloneDeep(j.Items);
-          data_array &&
-            data_array.forEach((item) => {
-              serie_item.data.push([item.DataTimestamp, item.Value]);
-            });
-          const index = filterArr.findIndex((item) => item.Year === j.Year);
-          const s_yItem = {
-            labels: {
-              formatter: function () {
-                let val = this.value;
-                return index !== 0 ? '' : val;
-              },
-              align: 'center',
-            },
-            title: {
-              text:  `${chartData.Unit}`,
-              textCh:chartData.Unit, // 中文
-              // 中文不存在,无论英文有无都显示空
-              textEn:chartData.UnitEn||chartData.Unit, // 英文
-              styleEn:{}, // 英文样式
-              // text:  null,
-              align: 'high',
-              rotation: 0,
-              y: -15,
-              offset: -(12 * chartData.Unit.length),
-            },
-            max: Number(chartData.MaxData),
-            min: Number(chartData.MinData),
-            ...seasonOptions.yAxis,
-          };
-          seasonData.push(serie_item);
-          seasonYdata.push(s_yItem);
-        }
-
+      // /* 农历数据处理  */
+      // let filterArr =
+      //   this.calendar_type === '农历'
+      //     ? chartData.DataList.filter((item, index) => index > 0)
+      //     : [];
+      // if (this.calendar_type === '农历')
+      //   for (let j of filterArr) {
+      //      //预测指标配置
+      //     let predict_params =  chartData.EdbInfoCategoryType === 1 ? this.getSeasonPredictParams(j.CuttingDataTimestamp) : {};
+
+      //     let serie_item = {
+      //       data: [],
+      //       type: chartData.ChartStyle,
+      //       yAxis: 0,
+      //       name: j.ChartLegend,
+      //       ...predict_params
+      //     };
+      //     const data_array = _.cloneDeep(j.DataList);
+      //     data_array &&
+      //       data_array.forEach((item) => {
+      //         serie_item.data.push([item.DataTimestamp, item.Value]);
+      //       });
+      //     const index = filterArr.findIndex((item) => item.ChartLegend === j.ChartLegend);
+      //     const s_yItem = {
+      //       labels: {
+      //         formatter: function () {
+      //           let val = this.value;
+      //           return index !== 0 ? '' : val;
+      //         },
+      //         align: 'center',
+      //       },
+      //       title: {
+      //         text:  `${chartData.Unit}`,
+      //         textCh:chartData.Unit, // 中文
+      //         // 中文不存在,无论英文有无都显示空
+      //         textEn:chartData.UnitEn||chartData.Unit, // 英文
+      //         styleEn:{}, // 英文样式
+      //         // text:  null,
+      //         align: 'high',
+      //         rotation: 0,
+      //         y: -15,
+      //         offset: -(12 * chartData.Unit.length),
+      //       },
+      //       max: Number(chartData.MaxData),
+      //       min: Number(chartData.MinData),
+      //       ...seasonOptions.yAxis,
+      //     };
+      //     seasonData.push(serie_item);
+      //     seasonYdata.push(s_yItem);
+      //   }
       /* x轴显示月日  提示框显示月日*/
       defaultOpts.xAxis.labels = {
         formatter: function () {
@@ -863,52 +880,49 @@ export const chartSetMixin = {
         },
         xDateFormat: '%m/%d',
       }
-      let rangeSelector =
-        this.calendar_type === '农历'
-          ? {
-              enabled: true,
-              selected: 0,
-              inputStyle: {
-                display: 'none',
-              },
-              labelStyle: {
-                display: 'none',
-              },
-              buttonTheme: {
-                style: {
-                  display: 'none',
-                },
-              },
-              buttons: [
-                {
-                  type: 'month',
-                  count: 12,
-                  text: '12月',
-                },
-                {
-                  type: 'month',
-                  count: 15,
-                  text: '15月',
-                },
-                {
-                  type: 'all',
-                  text: '全部',
-                  type: 'all',
-                },
-              ],
-            }
-          : {
-              enabled: false,
-            };
+      // let rangeSelector =
+      //   this.calendar_type === '农历'
+      //     ? {
+      //         enabled: true,
+      //         selected: 0,
+      //         inputStyle: {
+      //           display: 'none',
+      //         },
+      //         labelStyle: {
+      //           display: 'none',
+      //         },
+      //         buttonTheme: {
+      //           style: {
+      //             display: 'none',
+      //           },
+      //         },
+      //         buttons: [
+      //           {
+      //             type: 'month',
+      //             count: 12,
+      //             text: '12月',
+      //           },
+      //           {
+      //             type: 'month',
+      //             count: 15,
+      //             text: '15月',
+      //           },
+      //           {
+      //             type: 'all',
+      //             text: '全部',
+      //             type: 'all',
+      //           },
+      //         ],
+      //       }
+      //     : {
+      //         enabled: false,
+      //       };
 
       this.options = {
-        colors:
-          this.calendar_type === '公历'
-            ? seasonOptions.colors.slice(-chartData.DataList.length)
-            : seasonOptions.colors.slice(-filterArr.length),
+        colors:seasonOptions.colors.slice(-chartDataHandle.length),
         series: seasonData,
         yAxis: seasonYdata,
-        rangeSelector,
+        // rangeSelector,
         tooltip
       };
       if(this.currentLang=='en') this.changeOptions()
@@ -2055,6 +2069,7 @@ export const chartSetMixin = {
                                       .filter(Boolean)
                                       .sort((a,b)=> new Date(b).getTime() - new Date(a).getTime())
       this.latestDate = endDateList[0]
+      console.log(this.earliestDate,this.latestDate,'this.latestDate');
     }
 	}
 }

+ 84 - 25
src/views/mychart_manage/components/chartDetailDia.vue

@@ -41,7 +41,7 @@
               }}</el-button>
             </template>
             <!-- 季节性图选择年份区间 -->
-            <date-picker
+            <!-- <date-picker
               v-else-if="chartInfo.ChartType === 2"
               v-model="season_year"
               type="month"
@@ -49,7 +49,10 @@
               range
               placeholder="年份日期选择"
               @change="seasonYearChange"
-            />
+            /> -->
+            <div v-else-if="chartInfo.ChartType === 2" @click="openDateDia" class="date-setting">
+              {{ season_year && season_year.length>0 ? season_year[0]+'~'+season_year[1]:"年份日期选择" }}
+            </div>
           </div>
           <div class="top-right" v-if="chartInfo.Button">
             <span v-permission="permissionBtn.myETAPermission.myChart_move"
@@ -652,7 +655,7 @@ export default {
 
       /* 查看历史弹窗 */
 			isLookHistory: false,
-			lookEdbId: 0,
+			lookEdbId: 0
     };
   },
   methods: {
@@ -730,33 +733,48 @@ export default {
     /* 设置默认时间选中项 */
     setDefaultDateSelect() {
       this.year_select = this.chartInfo.DateType;
+      this.count_year = this.chartInfo.StartYear;
       this.select_date = [this.chartInfo.StartDate, this.chartInfo.EndDate];
       this.calendar_type = this.chartInfo.Calendar; //日历类型
-      this.season_year = [
-        this.chartInfo.SeasonStartDate,
-        this.chartInfo.SeasonEndDate,
-      ];
+
+      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
+          ?`最近${this.chartInfo.StartYear}年`
+          :'请选择时间段';
+
     },
 
     /* 曲线图筛选项发生变化时 非配置项 获取新的图表数据 */
    async getPreviewChartInfo() {
-
+      let dateArray=this.chartInfo.ChartType==2?this.season_year:this.select_date
       let params = {
         ChartType: this.chartInfo.ChartType,
         DateType: this.year_select,
-        StartDate: [5, 6].includes(this.year_select)
-          ? this.select_date[0]
+        StartDate: [5 , 6].includes(this.year_select)
+          ? dateArray[0]
           : '',
-        EndDate: this.year_select === 5 ? this.select_date[1] : '',
+        EndDate: this.year_select === 5 ? dateArray[1] : '',
         Calendar: this.calendar_type,
-        SeasonStartDate: this.season_year ? this.season_year[0] : '',
-        SeasonEndDate: this.season_year ? this.season_year[1] : '',
+        //ETA1.0.5 去除了这两个入参
+        // SeasonStartDate: this.season_year ? this.season_year[0] : '',
+        // SeasonEndDate: this.season_year ? this.season_year[1] : '',
+        SeasonExtraConfig:this.SeasonExtraConfig,
+        StartYear:this.count_year || 0,
         ChartEdbInfoList: this.tableData.map(_ => ({
           EdbInfoId: _.EdbInfoId,
           EdbInfoType: _.EdbInfoType,
@@ -781,13 +799,16 @@ export default {
     /* 打开时间段弹窗 */
     openDateDia() {
       // 自定义时间段回显
+      let selectDateStart = this.chartInfo.ChartType === 2?this.season_year[0]:this.select_date[0]
+			let selectDateEnd = this.chartInfo.ChartType === 2?this.season_year[1]:this.select_date[1]
       this.dateForm = {
         date_type: this.year_select,
         start_date:
           this.year_select === 5 || this.year_select === 6
-            ? this.select_date[0]
+            ? selectDateStart
             : '',
-        end_date: this.year_select === 5 ? this.select_date[1] : '',
+        end_date: this.year_select === 5 ? selectDateEnd : '',
+        count_year: this.year_select === 20 ? this.count_year : ''
       };
       this.isDateDia = true;
     },
@@ -797,19 +818,33 @@ export default {
       this.year_select = data.dateType;
       this.isDateDia = false;
       this.select_date = [data.start_date, data.end_date];
-
+      this.count_year = data.count_year
+      
       this.dateTip =
-        data.dateType === 5
+          data.dateType === 5
           ? `${data.start_date}~${data.end_date}`
-          : `${data.start_date}~至今`;
-
-      this.saveNowOptions();
+          : data.dateType === 6
+					?`${data.start_date}~至今`
+					:`最近${this.count_year}年`
+      if(this.chartInfo.ChartType === 2){
+				let latestYear = parseInt(this.tableData[0].LatestDate.substring(0,4))
+				let dateStart = data.start_date
+				let dateEnd = data.end_date
+				if(data.dateType==20){
+					dateStart = `${latestYear-this.count_year+1}-01-01`
+					dateEnd = `${latestYear}-12-31`
+				}else if(data.dateType==6){
+					dateEnd = this.tableData[0].LatestDate
+				}
+				this.season_year = [dateStart, dateEnd];
+			}
+      // this.saveNowOptions();
       this.getPreviewChartInfo();
     },
 
     /* 季节图切换年份  保持当前配置 */
     seasonYearChange() {
-      this.saveNowOptions();
+      // this.saveNowOptions();
       this.getPreviewChartInfo();
     },
 
@@ -820,7 +855,7 @@ export default {
       this.dateTip = '请选择时间段';
   
       //保存表格配置和上下限 曲线图需要保存表格配置
-      this.saveNowOptions();
+      // this.saveNowOptions();
       this.getPreviewChartInfo();
     },
 
@@ -1055,8 +1090,10 @@ export default {
           typeChartParam = {
             ...public_param,
             Calendar: this.calendar_type,
-            SeasonStartDate: this.season_year ? this.season_year[0] : '',
-            SeasonEndDate: this.season_year ? this.season_year[1] : '',
+            DateType: this.year_select,
+            StartYear:this.count_year || 0,
+            StartDate: this.season_year ? this.season_year[0] : '',
+            EndDate: this.season_year ? this.season_year[1] : '',
           }
           break
         case 7:
@@ -1085,6 +1122,7 @@ export default {
         ? {
             ...public_param,
             DateType: this.year_select,
+            StartYear:this.count_year || 0,
             StartDate:
               this.year_select === 5 || this.year_select === 6
                 ? this.select_date[0]
@@ -1325,6 +1363,13 @@ export default {
   $normal_height: 650px;
   $mini_height: 550px;
 
+  .date-setting{
+    border: 1px solid #DCDFE6;
+    border-radius: 4px;
+    cursor: pointer;
+    color: #333333;
+    line-height: 16px;
+  }
   @media screen and (max-width: 1710px) {
 
     /* transform: scale(0.8);
@@ -1357,6 +1402,11 @@ export default {
     .btn-sty {
       padding: 8px;
     }
+    .date-setting{
+				width: 180px;
+				padding: 10px;
+				font-size: 12px;
+			}
   }
   @media screen and (min-width: 1711px) {
     .year-btn,.btn-sty,.top-right {
@@ -1371,6 +1421,15 @@ export default {
     .btn-sty {
       padding: 10px;
     }
+    .date-setting{
+      width: 210px;
+      padding: 10px;
+      border: 1px solid #DCDFE6;
+      border-radius: 4px;
+      cursor: pointer;
+      font-size: 14px;
+      color: #333333;
+    }
     .el-table__expanded-cell {
       padding: 20px 26px;
     }

+ 100 - 97
src/views/ppt_manage/mixins/mixins.js

@@ -334,6 +334,12 @@ export default {
     setSeasonChart() {
       /* 季节性图的图表配置 */
       const chartData = this.dataList[0];
+
+
+      // 农历数据需要去除第一项 在ETA1.0.5之后,除了这里 农历和公历处理逻辑一样
+      const chartDataHandle=this.calendar_type === '农历'?
+      chartData.DataList.filter((item, index) => index > 0):
+      chartData.DataList
       let seasonYdata = [],
         seasonData = [],
         chart = {
@@ -341,8 +347,8 @@ export default {
         };
 
       /* 公历数据处理 处理数据列 y轴 */
-      if (this.chartInfo.Calendar === '公历')
-        for (let j of chartData.DataList) {
+      // if (this.chartInfo.Calendar === '公历')
+        for (let j of chartDataHandle) {
            //预测指标配置
           let predict_params =  chartData.EdbInfoCategoryType === 1 ? this.getSeasonPredictParams(j.CuttingDataTimestamp) : {};
 
@@ -350,7 +356,7 @@ export default {
             data: [],
             type: chartData.ChartStyle,
             yAxis: 0,
-            name: j.Year,
+            name: j.ChartLegend,
             ...predict_params
           };
           const data_array = _.cloneDeep(j.DataList);
@@ -358,8 +364,8 @@ export default {
             data_array.forEach((item) => {
               serie_item.data.push([item.DataTimestamp, item.Value]);
             });
-          const index = chartData.DataList.findIndex(
-            (item) => item.Year === j.Year
+          const index = chartDataHandle.findIndex(
+            (item) => item.ChartLegend === j.ChartLegend
           );
           const s_yItem = {
             title: {
@@ -392,58 +398,58 @@ export default {
         }
 
       /* 农历数据处理  */
-      let filterArr =
-        this.chartInfo.Calendar === '农历'
-          ? chartData.DataList.List.filter((item, index) => index > 0)
-          : [];
-      if (this.chartInfo.Calendar === '农历')
-        for (let j of filterArr) {
-           //预测指标配置
-          let predict_params =  chartData.EdbInfoCategoryType === 1 ? this.getSeasonPredictParams(j.CuttingDataTimestamp) : {};
+      // let filterArr =
+      //   this.chartInfo.Calendar === '农历'
+      //     ? chartData.DataList.List.filter((item, index) => index > 0)
+      //     : [];
+      // if (this.chartInfo.Calendar === '农历')
+      //   for (let j of filterArr) {
+      //      //预测指标配置
+      //     let predict_params =  chartData.EdbInfoCategoryType === 1 ? this.getSeasonPredictParams(j.CuttingDataTimestamp) : {};
           
-          let serie_item = {
-            data: [],
-            type: chartData.ChartStyle,
-            yAxis: 0,
-            name: j.Year,
-            ...predict_params
-          };
-          const data_array = _.cloneDeep(j.Items);
-          data_array &&
-            data_array.forEach((item) => {
-              serie_item.data.push([item.DataTimestamp, item.Value]);
-            });
-          const index = filterArr.findIndex((item) => item.Year === j.Year);
-
-          const s_yItem = {
-            title: {
-              text:  `${chartData.Unit}`,
-              textCh:chartData.Unit,
-              textEn:chartData.Unit?chartData.UnitEn:'',
-              // text: null,
-              align: 'high',
-              rotation: 0,
-              y: -15,
-              offset: -(12 * chartData.Unit.length),
-            },
-            labels: {
-              formatter: function (ctx) {
-                let val = ctx.value;
-                return index !== 0 ? '' : val;
-              },
-              align: 'center',
-              style: {
-                fontSize: '10px',
-              },
-              x: -5,
-            },
-            max: Number(chartData.MaxData),
-            min: Number(chartData.MinData),
-            ...seasonOptions.yAxis,
-          };
-          seasonData.push(serie_item);
-          seasonYdata.push(s_yItem);
-        }
+      //     let serie_item = {
+      //       data: [],
+      //       type: chartData.ChartStyle,
+      //       yAxis: 0,
+      //       name: j.Year,
+      //       ...predict_params
+      //     };
+      //     const data_array = _.cloneDeep(j.Items);
+      //     data_array &&
+      //       data_array.forEach((item) => {
+      //         serie_item.data.push([item.DataTimestamp, item.Value]);
+      //       });
+      //     const index = filterArr.findIndex((item) => item.Year === j.Year);
+
+      //     const s_yItem = {
+      //       title: {
+      //         text:  `${chartData.Unit}`,
+      //         textCh:chartData.Unit,
+      //         textEn:chartData.Unit?chartData.UnitEn:'',
+      //         // text: null,
+      //         align: 'high',
+      //         rotation: 0,
+      //         y: -15,
+      //         offset: -(12 * chartData.Unit.length),
+      //       },
+      //       labels: {
+      //         formatter: function (ctx) {
+      //           let val = ctx.value;
+      //           return index !== 0 ? '' : val;
+      //         },
+      //         align: 'center',
+      //         style: {
+      //           fontSize: '10px',
+      //         },
+      //         x: -5,
+      //       },
+      //       max: Number(chartData.MaxData),
+      //       min: Number(chartData.MinData),
+      //       ...seasonOptions.yAxis,
+      //     };
+      //     seasonData.push(serie_item);
+      //     seasonYdata.push(s_yItem);
+      //   }
 
       // 季节图x轴显示月/日 周度指标额外处理时间轴显示
       const xAxis = {
@@ -474,52 +480,49 @@ export default {
       };
 
       //农历默认选中一年数据并隐藏按钮  公历显示全部数据
-      let rangeSelector =
-        this.chartInfo.Calendar === '农历'
-          ? {
-              enabled: true,
-              selected: 0,
-              inputStyle: {
-                display: 'none',
-              },
-              labelStyle: {
-                display: 'none',
-              },
-              buttonTheme: {
-                style: {
-                  display: 'none',
-                },
-              },
-              buttons: [
-                {
-                  type: 'month',
-                  count: 12,
-                  text: '12月',
-                },
-                {
-                  type: 'month',
-                  count: 15,
-                  text: '15月',
-                },
-                {
-                  type: 'all',
-                  text: '全部',
-                },
-              ],
-            }
-          : {
-              enabled: false,
-            };
+      // let rangeSelector =
+      //   this.chartInfo.Calendar === '农历'
+      //     ? {
+      //         enabled: true,
+      //         selected: 0,
+      //         inputStyle: {
+      //           display: 'none',
+      //         },
+      //         labelStyle: {
+      //           display: 'none',
+      //         },
+      //         buttonTheme: {
+      //           style: {
+      //             display: 'none',
+      //           },
+      //         },
+      //         buttons: [
+      //           {
+      //             type: 'month',
+      //             count: 12,
+      //             text: '12月',
+      //           },
+      //           {
+      //             type: 'month',
+      //             count: 15,
+      //             text: '15月',
+      //           },
+      //           {
+      //             type: 'all',
+      //             text: '全部',
+      //           },
+      //         ],
+      //       }
+      //     : {
+      //         enabled: false,
+      //       };
 
       this.options = {
-        colors:
-          this.chartInfo.Calendar === '公历'
-            ? seasonOptions.colors.slice(-chartData.DataList.length)
-            : seasonOptions.colors.slice(-filterArr.length),
+        colors:seasonOptions.colors.slice(-chartDataHandle.length),
         series: seasonData,
         yAxis: seasonYdata,
         xAxis,
-        rangeSelector
+        // rangeSelector
       };
     },
 

+ 8 - 4
src/views/predictEdb_manage/addPredicEdb.vue

@@ -807,16 +807,20 @@ export default {
           }
         })
 
+			let dateArray=this.$refs.chartInfo.chartInfo.ChartTyp==2?this.$refs.chartInfo.season_year:this.$refs.chartInfo.select_date
+      
       let params = {
         SourceEdbInfoId: this.formData.oldEdb,
         DateType: this.$refs.chartInfo.year_select,
-        StartDate: this.$refs.chartInfo.select_date[0] || "",
-        EndDate: this.$refs.chartInfo.select_date[1] || "",
+        StartDate: dateArray[0] || "",
+        EndDate: dateArray[1] || "",
         Calendar: this.$refs.chartInfo.calendar_type,
         ChartType: this.$refs.chartInfo.chartInfo.ChartType,
-        SeasonStartDate: this.$refs.chartInfo.season_year[0] || "",
-        SeasonEndDate: this.$refs.chartInfo.season_year[1] || "",
+        // ETA1.0.5 去除了这两个参数
+        // SeasonStartDate: this.$refs.chartInfo.season_year[0] || "",
+        // SeasonEndDate: this.$refs.chartInfo.season_year[1] || "",
         DataDateType: this.formData.dateType,
+        StartYear:this.$refs.chartInfo.count_year || 0
       }
 
       const res = await preDictEdbInterface.edbChartDataForAdd(rules_params.length ? {...params,RuleList: rules_params} : params);

+ 63 - 7
src/views/predictEdb_manage/components/chartInfo.vue

@@ -20,7 +20,7 @@
             >{{dateTip}}</el-button>
             </template>
             <!-- 季节图时间选择 -->
-            <template v-if="chartInfo.ChartType==2">
+            <!-- <template v-if="chartInfo.ChartType==2">
                 <date-picker
                     v-model="season_year"
                     type="month"
@@ -29,7 +29,10 @@
                     placeholder="年份日期选择"
                     @change="seasonYearChange"
                 />
-            </template>
+            </template> -->
+            <div v-else-if="chartInfo.ChartType === 2" @click="openDateDia" class="date-setting" style="display: inline-block;">
+				{{ season_year && season_year.length>0 ? season_year[0]+'~'+season_year[1]:"年份日期选择" }}
+			</div>
             <span v-permission="permissionBtn.predictEdbPermission.edbPreData_switchSeason"
                 class="change-chart-btn" @click="chartTypeChange">切换{{chartInfo.ChartType==1?'季节性图':'曲线图'}}</span>
         </div>
@@ -106,7 +109,9 @@ export default {
     },
     data() {
         return {
-            year_select: 10, //年份选择项 默认全部
+            year_select: 10, //年份选择项
+            year_select_season: 20, //季节性年份选择项 默认最近五年
+            year_select_curve: 10, //曲线年份选择项 默认全部
             yearSelector: [
                 {
                     name: '全部',
@@ -127,6 +132,9 @@ export default {
             isDateDia: false, // 时间段弹窗
             dateForm: {},
             dateTip: '请选择时间段',
+            count_year:0,
+            count_year_season:5,
+            count_year_curve:5,
         }
     },
     mounted() {
@@ -140,13 +148,24 @@ export default {
                     DataList:this.edbData.DataList
                 }
             ]
-
+            if(this.chartInfo.ChartType==2){
+                //季节性图 默认时间 初始化 默认最近5年
+                this.year_select=this.year_select_season
+                this.count_year=this.count_year_season
+                if(!(this.select_date && this.select_date.length>0)){
+                    let latestYear = parseInt(this.tableData[0].LatestDate.substring(0,4))
+                    this.season_year = [`${latestYear-this.count_year+1}-01-01`,`${latestYear}-12-31`];
+                }
+            }else{
+                this.year_select=this.year_select_curve
+                this.count_year=this.count_year_curve
+            }
             this.setAddChartDefault();
             this.setChartOptionHandle(this.tableData)
         },
 
         changeYear(item){
-            this.year_select=item.value
+            this.year_select = this.year_select_curve =item.value
             this.select_date = [];
             this.dateTip = '请选择时间段';
             this.$emit('refreshData','saveLimit')
@@ -156,12 +175,38 @@ export default {
         dataChangeBack(data) {
             this.year_select = data.dateType;
             this.isDateDia = false;
-            this.select_date = [data.start_date, data.end_date];
+
+            this.count_year = data.count_year
+            if(this.chartInfo.ChartType==1){
+                this.year_select_curve = data.dateType
+                this.count_year_curve = data.count_year
+            }else{
+                this.year_select_season = data.dateType
+                this.count_year_season = data.count_year
+            }
+            let dateStart = data.start_date
+            let dateEnd = data.end_date
+            let latestYear = parseInt(this.tableData[0].LatestDate.substring(0,4))
+
+			if(this.chartInfo.ChartType === 2){
+                if(data.dateType==20){
+                    dateStart = `${latestYear-data.count_year+1}-01-01`
+                    dateEnd = `${latestYear}-12-31`
+                }else if(data.dateType==6){
+					// 回显
+					dateEnd = this.tableData[0].LatestDate
+				}
+			}
+            this.season_year = [dateStart, dateEnd];
+
+            this.select_date = [dateStart, dateEnd];
 
             this.dateTip =
                 data.dateType === 5
                 ? `${data.start_date}~${data.end_date}`
-                : `${data.start_date}~至今`;
+                : data.dateType === 6
+                ?`${data.start_date}~至今`
+                :`最近${this.count_year}年`
 
             this.$emit('refreshData','saveLimit')
         },
@@ -200,6 +245,17 @@ export default {
             padding: 9px;
             border: 1px solid #409eff;
         }
+        .date-setting{
+			width: 210px;
+			// height: 40px;
+			padding: 10px;
+			border: 1px solid #DCDFE6;
+			border-radius: 4px;
+			cursor: pointer;
+			font-size: 14px;
+			color: #333333;
+			box-sizing: border-box;
+		}
         .change-chart-btn{
             float: right;
             color: #409eff;

+ 9 - 5
src/views/predictEdb_manage/components/edbDetail.vue

@@ -49,15 +49,19 @@ export default {
     },
     methods: {
         getDetail(type=''){
+			let dateArray=this.$refs.chartInfo.chartInfo.ChartType==2?this.$refs.chartInfo.season_year:this.$refs.chartInfo.select_date
+
             preDictEdbInterface.edbChartInfo({
 				EdbInfoId: this.id,
                 DateType: this.$refs.chartInfo.year_select,
-				StartDate: this.$refs.chartInfo.select_date[0]||'',
-				EndDate: this.$refs.chartInfo.select_date[1]||'',
+				StartDate: dateArray[0]||'',
+				EndDate: dateArray[1]||'',
                 ChartType:this.$refs.chartInfo.chartInfo.ChartType,
-                SeasonStartDate:this.$refs.chartInfo.season_year[0]||'',
-                SeasonEndDate:this.$refs.chartInfo.season_year[1]||'',
-                Calendar:this.$refs.chartInfo.calendar_type
+                // ETA1.0.5 去除了这两个参数
+                // SeasonStartDate:this.$refs.chartInfo.season_year[0]||'',
+                // SeasonEndDate:this.$refs.chartInfo.season_year[1]||'',
+                Calendar:this.$refs.chartInfo.calendar_type,
+                StartYear:this.$refs.chartInfo.count_year || 0
 			}).then(res=>{
                 if(res.Ret!=200) return
                 this.edbData.DataList=res.Data.DataList||[]

+ 9 - 0
src/views/predictEdb_manage/predictEdb.vue

@@ -627,6 +627,15 @@ export default {
 				if(this.$refs.detailComponentRef){
 					this.$refs.detailComponentRef.$refs.chartInfo.chartInfo.ChartType=1;
 					this.$refs.detailComponentRef.$refs.chartInfo.year_select=10;
+					this.$refs.detailComponentRef.$refs.chartInfo.year_select_season=20;
+					this.$refs.detailComponentRef.$refs.chartInfo.year_select_curve=10;
+
+					this.$refs.detailComponentRef.$refs.chartInfo.calendar_type='公历';
+
+					this.$refs.detailComponentRef.$refs.chartInfo.count_year=0;
+					this.$refs.detailComponentRef.$refs.chartInfo.count_year_season=5;
+					this.$refs.detailComponentRef.$refs.chartInfo.count_year_curve=5;
+					
 					this.$refs.detailComponentRef.$refs.chartInfo.select_date=[];
 					this.$refs.detailComponentRef.$refs.chartInfo.season_year=[];
 					this.$refs.detailComponentRef.$refs.chartInfo.dateTip='请选择时间段';