Browse Source

Merge branch 'eta1.9.4'

cxmo 10 months ago
parent
commit
c48b40bd95

+ 3 - 0
src/api/modules/chartApi.js

@@ -869,6 +869,9 @@ const dataBaseInterface = {
 	sectionScatterPreviewData: params => {
 		return http.post('/datamanage/chart_info/preview/time_section',params)
 	},
+	seasonPreviewData:params=>{
+		return http.post('/datamanage/chart_info/preview/season',params)
+	},
 
 	 /* 批量计算
 	 * @param {*} params 

+ 37 - 0
src/lang/modules/EtaChart/En.js

@@ -28,6 +28,13 @@ export default {
       1、If the start date is earlier than the end date, the default is not to cross the year, and you can check the check box to cross the year.</br>
       2、If the start date is later than or equal to the end date, it will cross the year and the check is not allowed.
     `,
+    dynamic_time_tip:`
+    <p>Purpose: To set a dynamically updating end time based on the system date or the latest date of the indicator.</p>
+    <p> For example, the end of the last month, this "end of the month" will dynamically update as the latest date is updated. </p>
+    <p>Method: 1. Select the base date. The default is the system date (the current natural date), or you can choose the latest date of the indicator (which updates with the indicator).</p>
+    <p> On the premise of choosing the latest date of the indicator, you can perform period shifting, assuming a shift of 1 period, then select the date of the previous period of the indicator.</p> 
+    <p>2. Based on the base date, you can perform date transformations. The transformation methods include date displacement and specified frequency, which can be freely combined.</p>
+    <p> The default is to specify a frequency (the first day of the current month) plus a date transformation (-1 day), which means to provide the end date of the last month. </p>`,
     label_cross_year:'Cross the year',
     label_legend_set:'Legend Name Settings',
     no_set_msg: 'No configuration available',
@@ -51,6 +58,10 @@ export default {
     edit_plotline_btn: 'Edit Marker Line',
     edit_plotarea_btn: 'Edit Marker Area',
     add_intro_btn: 'Add Chart Description',
+    add_right_edb_btn:'Add Right Axis',
+    limits_btn:'Limits Area',
+    avg_line_btn:'Average Line',
+    std_btn:'StdEV Area',
     label_select_serie:'Select axis',
     label_select_seris_placeholder:'Please select the date axis',
     label_line_scale:'Marker line position',
@@ -67,6 +78,32 @@ export default {
     section_pos_top: 'Top',
     section_pos_center: 'Center',
     section_pos_bot: 'Bottom',
+    right_edb_type_on_year:'Left Axis Year-on-Year',
+    right_edb_type_lib:'Indicator Library',
+    right_edb_type_pred:'Predictive Indicators',
+    right_edb_gen_style:'Generate Style',
+    right_edb_gen_column:'Column',
+    right_edb_gen_mark:'Mark Point',
+    right_edb_mark_shape:'Mark Point Shape',
+    right_edb_color_set:'Color and transparency',
+    right_edb_mark_size:'Mark Point Size',
+    right_edb_legend:'Legend Name',
+    right_edb_format:'Number Format',
+    right_edb_format_per:'Percent',
+    right_edb_format_dec:'Decimal',
+    right_edb_mark_connect_text:'Mark Point Line',
+    right_edb_mark_connected:'Connected',
+    right_edb_mark_not_connected:'Not Connected',
+    right_edb_mark_connect_line_color:'Line Color',
+    right_edb_mark_connect_line_style:'Line Style',
+    right_edb_mark_connect_line_width:'Line Width',
+    limit_range:'Range of Limits',
+    average_range:'Range of Average',
+    std_range:'Range of STDEV',
+    year_placeholder:'Please enter year',
+    linewidth_placeholder:'Please enter line width',
+    multiple_placeholder:'Please enter the multiple',
+    year_on_right:'Year On Year(Right Axis)',
 
     //截面散点图区域
     label_serie_set:'Series {index} Configuration',

+ 34 - 0
src/lang/modules/EtaChart/Zh.js

@@ -28,6 +28,10 @@ export default {
       1、若开始日期小于结束日期,则默认不跨年,允许勾选跨年</br>
       2、若开始日期大于等于结束日期,则跨年,不允许取消勾选
     `,
+    dynamic_time_tip:`<p>配置目的:根据系统日期或者指标最新日期,设置一个动态更新的结束时间。比如上个月的月末,这个“月末”会随着最新日期的更新而动态更新。</p>
+    <p>配置方法:1、选择基准日期。默认选则系统日期(当前的自然日期),也可选指标最新日期(跟随指标的更新而更新)。在选择指标最新日期的前提下,可进行期数前移,假设前移1期,则选择指标上一期的日期。</p>
+    <p>2、根据基准日期,可进行日期变换。变换方式有日期位移和指定频率两种,可自由组合。默认给出指定频率(当月第一天)加日期变换(-1天),意味着给出上个月的月末日期。</p>
+    <p>配置示例:把起始日期设置在指标最新日期所在年份上一年的年末。基准日期选则指标最新日期,日期变换添加指定频率为当年第一天,再添加日期位移为-1。</p>`,
     label_cross_year:'跨年',
     label_legend_set:'图例名称设置',
     no_set_msg: '暂无配置',
@@ -51,6 +55,10 @@ export default {
     edit_plotline_btn: '编辑标识线',
     edit_plotarea_btn: '编辑标识区',
     add_intro_btn: '添加图表说明',
+    add_right_edb_btn:'添加右轴指标',
+    limits_btn:'同期上下限',
+    avg_line_btn:'同期均线',
+    std_btn:'同期标准差',
     label_select_serie:'选择坐标轴',
     label_select_seris_placeholder:'请选择日期坐标轴',
     label_line_scale:'标识线所在刻度',
@@ -67,6 +75,32 @@ export default {
     section_pos_top: '顶部',
     section_pos_center: '居中',
     section_pos_bot: '底部',
+    right_edb_type_on_year:'左轴指标同比',
+    right_edb_type_lib:'指标库',
+    right_edb_type_pred:'预测指标',
+    right_edb_gen_style:'生成样式',
+    right_edb_gen_column:'柱形',
+    right_edb_gen_mark:'标记点',
+    right_edb_mark_shape:'标记点形状',
+    right_edb_color_set:'颜色及透明度',
+    right_edb_mark_size:'标记点大小',
+    right_edb_legend:'图例名称',
+    right_edb_format:'数字格式',
+    right_edb_format_per:'百分数',
+    right_edb_format_dec:'小数',
+    right_edb_mark_connect_text:'标记点连线',
+    right_edb_mark_connected:'有',
+    right_edb_mark_not_connected:'无',
+    right_edb_mark_connect_line_color:'连线颜色',
+    right_edb_mark_connect_line_style:'连线线型',
+    right_edb_mark_connect_line_width:'连线粗细',
+    limit_range:'上下限取数范围',
+    average_range:'均线取数范围',
+    std_range:'取数范围',
+    year_placeholder:'请输入年份',
+    linewidth_placeholder:'请输入线宽',
+    multiple_placeholder:'请输入倍数',
+    year_on_right:'同比(右轴)',
 
     //截面散点图区域
     label_serie_set:'系列{index}配置',

+ 110 - 0
src/lang/modules/EtaChart/commonLang.js

@@ -56,6 +56,10 @@ export default {
     zh: '农历',
     en: 'Lunar Calendar'
   },
+  calendar_lunar_text: {
+    zh: '春节对齐',
+    en: 'Lunar Calendar'
+  },
   chart_share_btn:{
     zh:'分享',
     en:'Share'
@@ -456,7 +460,113 @@ export default {
     text_size: {
       zh:'字号',
       en:'Size'
+    },
+    chart_first_edb:{
+        zh:'图上第一个指标',
+        en:'The first indicator on the graph'
+    },
+    chart_other_edb:{
+        zh:'其他指标',
+        en:'Other indicator',
+    },
+    time_interval:{
+        zh:'时间区间',
+        en:'Time Interval'
+    },
+    follow_chart:{
+        zh:'跟随图表',
+        en:'follow the chart'
+    },
+    custom:{
+        zh:'自定义',
+        en:'custom'
+    },
+    plot_style:{
+        zh:'样式',
+        en:'style'
+    },
+    plot_calculation:{
+        zh:'计算方式',
+        en:'Calculation'
+    },
+    cal_range_val:{
+        zh:'区间',
+        en:'Range'
+    },
+    cal_range_mean:{
+        zh:'均值',
+        en:'Mean'
+    },
+    cal_range_plus:{
+        zh:'加',
+        en:'Plus'
+    },
+    cal_range_times:{
+        zh:'倍',
+        en:'times'
+    },
+    cal_range_times2:{
+        zh:'倍数',
+        en:'times'
+    },
+    cal_range_std:{
+        zh:'标准差',
+        en:'STDEV'
+    },
+    cal_range_count:{
+        zh:'个数',
+        en:'Count'
+    },
+    cal_range_value:{
+        zh:'数值',
+        en:'Value'
+    },
+    cal_range_quantile:{
+        zh:'分位',
+        en:'Quantile'
+    },
+    time_base:{
+        zh:'基准日期',
+        en:'Base Date'
+    },
+    sys_time:{
+        zh:'系统日期',
+        en:'System Date'
+    },
+    edb_new_time:{
+        zh:'指标最新日期',
+        en:'Indicator Latest Date'
+    },
+    edb_periods:{
+        zh:'期数',
+        en:'periods'
+    },
+    edb_periods_lead:{
+        zh:'前移',
+        en:' forward lead'
+    },
+    edb_period:{
+        zh:'期',
+        en:'periods'
+    },
+    edb_time_fix:{
+        zh:'固定',
+        en:'Fix'
+    },
+    edb_time_now:{
+        zh:'至今',
+        en:'So Far'
+    },
+    edb_time_dyn:{
+        zh:'动态',
+        en:'Dynamic'
+    },
+    pass_year:{
+        zh:'过去',
+        en:'pass'
     }
+
+
   },
 
   /* form校验 */

+ 28 - 4
src/views/dataEntry_manage/addChart.vue

@@ -205,7 +205,8 @@
             <el-collapse-item v-for="(item,index) in tableData" :key="item.EdbInfoId" :disabled="[2,5].includes(chartInfo.ChartType)">
               <template slot="title">
                 <span class="text_oneLine">{{currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName}}</span>
-								<i class="el-icon-delete del-icon" @click.stop="delTarget(item)"></i>
+								<!-- 当为季节性图的第二个轴时,隐藏删除按钮 -->
+								<i class="el-icon-delete del-icon" @click.stop="delTarget(item)" v-if="!(chartInfo.ChartType===2&&index===1)"></i>
               </template>
               <ul class="setting-cont" v-if="sameOptionType.includes(chartInfo.ChartType)">
 
@@ -357,7 +358,11 @@
 						v-if="tableData.length"
 						ref="markerSectionRef"
 						:chartInfo="chartInfo"
+						:tableData="tableData"
 						@update="setChartMarkerInfo"
+						@updateSeason="updateSeasonChart"
+						@previewSeason="previewSeasonChart"
+						@previewSeasonRight="previewSeasonRight"
 					/>
         </div>
 
@@ -602,7 +607,7 @@
 								@change="getPreviewSplineInfo"
 							>
 								<el-radio-button label="公历">{{$t('Chart.calendar_gre')}}</el-radio-button>
-								<el-radio-button label="农历">{{$t('Chart.calendar_lunar')}}</el-radio-button>
+								<el-radio-button label="农历">{{$t('Chart.calendar_lunar_text')}}</el-radio-button>
 							</el-radio-group>
 
 							<!-- 图表说明 -->
@@ -779,8 +784,8 @@ export default {
 			this.$refs.diaForm.validate((valid) => {
 				if(valid) {
 					// 季节图只允许添加一个指标
-					if(this.chartInfo.ChartType === 2 && this.tableData.length > 1) 
-						return this.$message.warning(/* '您选择的图表样式为季节性图表,只支持单指标画图' */this.$t('Chart.OptMsg.season_one_msg'));
+					if(this.chartInfo.ChartType === 2 && this.tableData.length > 1){}
+						//return this.$message.warning(/* '您选择的图表样式为季节性图表,只支持单指标画图' */this.$t('Chart.OptMsg.season_one_msg'));
 
 					else if([7,11].includes(this.chartInfo.ChartType)  && !this.$refs.BarOptRef.dateList.length)  
 						return this.$message.warning(/*'请添加日期'*/this.$t('ToolBox.CommodityPriceChart.tips_msg06'));
@@ -892,6 +897,25 @@ export default {
 							MinMaxSave:Number(hasLimitChange)
 						}
 					}
+					//如果是季节性图,在这里加上同期/右轴的参数
+					if(this.chartInfo.ChartType===2){
+						//const {MaxMinLimits={},SamePeriodAverage={},SamePeriodStandardDeviation={}} = this.chartInfo.SeasonAverageConfig||{}
+						const {SeasonRightConfig={}} = this.chartInfo
+						const tempData = _.cloneDeep(this.chartInfo.SeasonAverageConfig||{})
+						const {MaxMinLimits={},SamePeriodAverage={},SamePeriodStandardDeviation={}} = tempData||{}
+						delete MaxMinLimits.List
+						delete SamePeriodAverage.List
+						delete SamePeriodStandardDeviation.List
+						const tempConfig = _.cloneDeep(SeasonRightConfig)
+						delete tempConfig.EdbInfoList
+						params.SeasonExtraConfig = {
+							...this.SeasonExtraConfig,
+							MaxMinLimits:MaxMinLimits.IsAdd?MaxMinLimits:{},
+							SamePeriodAverage:SamePeriodAverage.IsAdd?SamePeriodAverage:{},
+							SamePeriodStandardDeviation:SamePeriodStandardDeviation.IsAdd?SamePeriodStandardDeviation:{},
+							RightAxis:SeasonRightConfig.IsAdd?tempConfig:{}//右轴的具体配置
+						}
+					}
 					dataBaseInterface.chartAdd(params).then(res => {
 						if(res.Ret !== 200) return;
 							this.setChartImage(res.Data);

+ 26 - 4
src/views/dataEntry_manage/chartSetting.vue

@@ -542,7 +542,7 @@
                         @change="getPreviewChartInfo"
                       >
                         <el-radio-button label="公历">{{$t('Chart.calendar_gre')}}</el-radio-button>
-                        <el-radio-button label="农历">{{$t('Chart.calendar_lunar')}}</el-radio-button>
+                        <el-radio-button label="农历">{{$t('Chart.calendar_lunar_text')}}</el-radio-button>
                       </el-radio-group>
 
                       <!-- 图表说明 -->
@@ -1698,6 +1698,12 @@ export default {
       }
       if (res.Ret !== 200) return;
       this.chartInfo = res.Data.ChartInfo;
+      //如果是季节性图,存储额外参数(同期/右轴)
+      if(this.chartInfo.ChartType===2){
+        const {MaxMinLimits,SamePeriodAverage,SamePeriodStandardDeviation,RightAxis} = res.Data.DataResp
+        this.chartInfo.SeasonAverageConfig = {MaxMinLimits,SamePeriodAverage,SamePeriodStandardDeviation}
+        this.chartInfo.SeasonRightConfig = RightAxis
+      }
       this.tableData = res.Data.EdbInfoList;
 
       // //将指标添加进标签列表中
@@ -1834,13 +1840,29 @@ export default {
           ConvertType:Number(_.ConvertType),
           ConvertValue:Number(_.ConvertValue),
           ConvertUnit:Number(_.IsConvert)?_.ConvertUnit:'',
-          ConvertEnUnit:Number(_.IsConvert)?_.ConvertEnUnit:''
-        }))
+          ConvertEnUnit:Number(_.IsConvert)?_.ConvertEnUnit:'',
+          IsAxis:_.IsAxis
+        })),
+        MarkersLines:this.chartInfo.MarkersLines||''
+      }
+      //季节性图 更改SeasonExtraConfig
+      //如果是季节性图,带上额外参数(同期/右轴)
+      if(this.chartInfo.ChartType===2){
+        const {MaxMinLimits={},SamePeriodAverage={},SamePeriodStandardDeviation={}} = this.chartInfo.SeasonAverageConfig||{}
+        const {SeasonRightConfig={}} = this.chartInfo
+        params.SeasonExtraConfig = {
+            ...this.SeasonExtraConfig,
+            MaxMinLimits:MaxMinLimits.IsAdd?SeasonAverageConfig.MaxMinLimits:{},
+            SamePeriodAverage:SamePeriodAverage.IsAdd?SamePeriodAverage:{},
+            SamePeriodStandardDeviation:SamePeriodStandardDeviation.IsAdd?SamePeriodStandardDeviation:{},
+            RightAxis:SeasonRightConfig.IsAdd?SeasonRightConfig:{}
+        }
       }
-
       const res = await dataBaseInterface.getSplinePreviewData(params)
 
       if(res.Ret !== 200) return
+      //标识线回显
+      this.chartInfo.MarkersLines = res.Data.ChartInfo.MarkersLines||''
 
       const { EdbInfoList } = res.Data;
 

+ 180 - 0
src/views/dataEntry_manage/components/addAverageDialog.vue

@@ -0,0 +1,180 @@
+<template>
+    <!-- 添加同期上下限/均线/标准差 -->
+    <el-dialog
+        :visible.sync="isShow"
+        :close-on-click-modal="false"
+        :append-to-body="true"
+        @close="$emit('close')"
+        custom-class="average-edit-dialog"
+        center
+        width="650px"
+        v-dialogDrag
+        top="8vh"
+        :title="dialogTitle"
+    >
+        <div class="container">
+            <el-form :model="averageForm" :rules="formRules" hide-required-asterisk
+                ref="averageFormRef"
+                label-position="right"
+                label-width="120px">
+                <!-- 倍数 -->
+                <el-form-item :label="$t('Chart.Detail.cal_range_times2')" prop="Multiple" v-if="averageType===3">
+                    <el-input-number 
+                        v-model="averageForm.Multiple" 
+                        controls-position="right" 
+                        :min="0" step-strictly
+                        :step="0.1"
+                        style="width: 90px"
+                        />
+                </el-form-item>
+                <el-form-item prop="Year"
+                    :label="rangeLabelMap[averageType]" >
+                    <span><!-- 过去 -->{{ $t('Chart.Detail.pass_year') }}</span>
+                    <el-input-number 
+                        v-model="averageForm.Year" 
+                        controls-position="right" 
+                        :min="2" step-strictly
+                        style="width: 90px" 
+                        />
+                    <span><!-- 年 -->{{ $t('Edb.FreAll.year_min') }}</span>
+                </el-form-item>
+                <!-- 颜色 -->
+                <el-form-item :label="$t('EtaChartAddPage.right_edb_color_set')" prop="Color">
+                    <el-color-picker
+                      style="width: 90px"
+                      v-model="averageForm.Color"
+                      show-alpha
+                      :predefine="predefineColors"
+                    ></el-color-picker>
+                </el-form-item>
+                <!-- 线型 -->
+                <el-form-item :label="$t('EtaChartAddPage.label_line_sty')" prop="LineType" v-if="averageType===2">
+                    <el-select v-model="averageForm.LineType">
+                        <el-option v-for="lineItem in lineStylesOpts"
+                            :key="lineItem.value"
+                            :label="lineItem.label"
+                            :value="lineItem.value"
+                        >
+                            <svg width="60" height="10" viewBox="0 0 60 10" fill="none" xmlns="http://www.w3.org/2000/svg" v-html="lineItem.svg">
+                            </svg>
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <!-- 粗细 -->
+                <el-form-item :label="$t('Chart.Detail.size')" prop="LineWidth" v-if="averageType===2">
+                    <el-input-number 
+                        v-model="averageForm.LineWidth" 
+                        controls-position="right" 
+                        :min="1" step-strictly
+                        style="width: 90px"/>
+                </el-form-item>
+                <el-form-item :label="$t('EtaChartAddPage.right_edb_legend')" prop="Legend">
+                    <el-input v-model="averageForm.Legend"  style="width: 300px;"/>
+                </el-form-item>
+            </el-form>
+        </div>
+        <div slot="footer" class="dialog-footer" style="text-align: center;">
+            <el-button @click="$emit('close')">{{$t('Dialog.cancel_btn')}}</el-button>
+            <el-button type="primary" @click="confirmPerson">{{$t('Dialog.confirm_save_btn')}}</el-button>
+        </div>
+    </el-dialog>
+</template>
+
+<script>
+import { defaultOpts } from '@/utils/defaultOptions';
+import {lineStylesOpts} from '@/views/system_manage/chartTheme/common/config'
+export default {
+    props:{
+        isShow:{
+            type:Boolean,
+            default:false
+        },
+        averageType:{
+            type:Number,
+            default:1, //1同期上下限 2同期均线 3同期标准差
+        },
+        formData:{
+            type:Object,
+            default:{}
+        }
+    },
+    computed:{
+        dialogTitle(){
+            const titleMap = {
+                1:/* '添加同期上下限' */`${this.$t('Table.add_btn')}${this.$i18n.locale!=='zh'?' ':''}${this.$t('EtaChartAddPage.limits_btn')}`,
+                2:/* '添加同期均线' */`${this.$t('Table.add_btn')}${this.$i18n.locale!=='zh'?' ':''}${this.$t('EtaChartAddPage.avg_line_btn')}`,
+                3:/* '添加同期标准差' */`${this.$t('Table.add_btn')}${this.$i18n.locale!=='zh'?' ':''}${this.$t('EtaChartAddPage.std_btn')}`
+            }
+            return titleMap[this.averageType]
+        },
+        rangeLabelMap(){
+            return {
+                1:/* '上下限取数范围' */ this.$t('EtaChartAddPage.limit_range'),
+                2:/* '均线取数范围' */ this.$t('EtaChartAddPage.average_range'),
+                3:/* '取数范围' */ this.$t('EtaChartAddPage.std_range')
+            }
+        },
+        formRules(){ //方便英文翻译
+            return {
+                Legend:[{required:true,message:/* '请输入图例名称' */this.$t('EtaChartAddPage.legend_placeholder')}],
+                Year:[{required:true,message:/* '请输入年份' */this.$t('EtaChartAddPage.year_placeholder')}],
+                LineWidth:[{required:true,message:/* '请选择线宽' */this.$t('EtaChartAddPage.linewidth_placeholder')}],
+                Multiple:[{required:true,message:/* '请选择倍数' */this.$t('EtaChartAddPage.multiple_placeholder')}],
+            }
+        }
+    },
+    watch:{
+        isShow(newval){
+            if(newval){
+                Object.assign(this.averageForm,this.formData)
+                /* if(!this.averageForm.Legend){
+                    this.getLegend()
+                } */
+                this.$refs.averageFormRef&&this.$refs.averageFormRef.clearValidate()
+            }
+        }
+    },
+    data() {
+        return {
+            averageForm:{
+                Legend:'',//图例名称
+                Year:5,//上下限取数范围/均线取数范围/取数范围
+                Color:'#075EEE',//颜色及透明度
+                LineType:'Solid',//线型
+                LineWidth:1,//线宽
+                Multiple:1,//倍数
+            },
+            predefineColors: defaultOpts.colors.slice(0, 2),
+            lineStylesOpts:lineStylesOpts,
+        };
+    },
+    methods: {
+        getLegend(){
+            const nameMap = {
+                1:'年区间',
+                2:'年均值',
+                3:'年标准差'
+            }
+            this.averageForm.Legend = this.averageForm.Year+nameMap[this.averageType]
+        },
+        async confirmPerson(){
+            //校验
+            await this.$refs.averageFormRef.validate()
+            this.$emit('modify',{data:this.averageForm,type:this.averageType})
+        }
+    },
+};
+</script>
+
+<style lang="scss">
+.average-edit-dialog{
+    .container{
+        padding:0 60px;
+        .el-input{
+            width:100%;
+        }
+        .el-color-picker__trigger { width: 100%;padding: 0;border-radius: 4px; }
+        .number-input .el-input__inner { padding: 0 2px 0 10px; }
+    }
+}
+</style>

+ 490 - 115
src/views/dataEntry_manage/components/addMarkerDialog.vue

@@ -6,7 +6,7 @@
 		@close="cancelHandle"
 		custom-class="marker-edit-dialog"
 		center
-		width="650px"
+		width="950px"
 		v-dialogDrag
     top="8vh"
     :title="form.title"
@@ -24,7 +24,7 @@
               v-model="markerForm.axis"
               :placeholder="$t('EtaChartAddPage.label_select_seris_placeholder')"
               style="width:200px;"
-              @change="markerForm.axisName=axisLabelMap[markerForm.axis]"
+              @change="markerForm.axisName=axisLabelMap[markerForm.axis];markerForm.markLineType=1;"
             >
               <el-option :label="$t('Chart.Detail.l_axis')" :value="1" v-if="canSelectLeftYaxis"/>
               <el-option :label="$t('Chart.Detail.h_axis')" :value="3" v-if="canSelectXaxis"/>
@@ -35,45 +35,55 @@
           <el-form-item :label="form.markerType==='line'?$t('EtaChartAddPage.label_line_scale'):$t('EtaChartAddPage.label_area_scale')" prop="value">
             <!-- 标识线 -->
             <template v-if="form.markerType==='line'">
-              <!-- 时间轴1,2,4,6的y轴数字 x轴日期  -->
-              <template v-if="[1,2,4,6].includes(chartInfo.ChartType)">
-                <el-date-picker
-                  v-if="markerForm.axis===3"
-                  v-model="markerForm.value"
-                  :popper-class="{'month-day-picker':chartInfo.ChartType===2}"
-                  type="date"
-                  style="width: 200px;"
-                  :placeholder="$t('EtaChartAddPage.label_date_choose')"
-                  :clearable="false"
-                  :format="chartInfo.ChartType===2?'MM-dd':'yyyy-MM-dd'"
-                  :value-format="chartInfo.ChartType===2?'MM-dd':'yyyy-MM-dd'"
-                ></el-date-picker>
+              <div class="mark-value-wrap form-item-content">
+                <!-- 固定值:原标识线输入框 -->
+                <div class="default-value">
+                    <el-radio v-model="markerForm.markLineType" :label="1" style="margin-right: 20px;">{{$t('PredictEditPage.rule_fix')}}</el-radio>
+                    <!-- 时间轴1,2,4,6的y轴数字 x轴日期  -->
+                    <template v-if="[1,2,4,6].includes(chartInfo.ChartType)">
+                        <el-date-picker
+                            v-if="markerForm.axis===3"
+                            v-model="markerForm.value"
+                            :popper-class="{'month-day-picker':chartInfo.ChartType===2}"
+                            type="date"
+                            style="width: 100px;"
+                            :placeholder="$t('EtaChartAddPage.label_date_choose')"
+                            :clearable="false"
+                            :format="chartInfo.ChartType===2?'MM-dd':'yyyy-MM-dd'"
+                            :value-format="chartInfo.ChartType===2?'MM-dd':'yyyy-MM-dd'"
+                        ></el-date-picker>
 
-                <el-input
-                  v-else
-                  v-model="markerForm.value"
-                  class="number-input"
-                  style="width: 200px;"
-                  type="number"
-                  :placeholder="$t('Edb.InputHolderAll.input_number')"
-                />
-
-              </template>
+                        <el-input
+                            v-else
+                            v-model="markerForm.value"
+                            class="number-input"
+                            style="width: 100px;"
+                            type="number"
+                            :placeholder="$t('Edb.InputHolderAll.input_number')"
+                            :disabled="markerForm.markLineType===2"
+                        />
+                    </template>
 
-              <!-- 柱形图,散点,截面散点只可选数字 -->
-              <template v-else-if="[5,7,10].includes(chartInfo.ChartType)">
-                <el-input
-                  v-model="markerForm.value"
-                  style="width: 200px;"
-                  type="number"
-                  class="number-input"
-                  :placeholder="$t('Edb.InputHolderAll.input_number')"
-                  clearable
-                />
-              </template>
+                    <!-- 柱形图,散点,截面散点只可选数字 -->
+                    <template v-else-if="[5,7,10].includes(chartInfo.ChartType)">
+                        <el-input
+                            v-model="markerForm.value"
+                            style="width: 100px;"
+                            type="number"
+                            class="number-input"
+                            :placeholder="$t('Edb.InputHolderAll.input_number')"
+                            :disabled="markerForm.markLineType===2"
+                            clearable
+                        />
+                    </template>
+                </div>
+                <!-- 指标计算 -->
+                <div class="custom-value" v-if="markerForm.axis!==3">
+                    <el-radio v-model="markerForm.markLineType" :label="2" style="margin-left: 20px;">{{ $t('Edb.CalculatesAll.indicator_calculation') }}</el-radio>
+                </div>
+              </div>
             </template>
 
-
             <!-- 标识区 -->
             <template v-else>
               <!-- 时间轴1,2,4,6的y轴数字 x轴日期  -->
@@ -108,6 +118,7 @@
                     class="number-input"
                     style="width: 90px;"
                     type="number"
+                    @change="e => {markerForm.fromValue=Number(e);}"
                     :placeholder="$t('Edb.InputHolderAll.input_number')"
                   />
                   <!-- 至 -->{{$t('Common.to')}}
@@ -116,6 +127,7 @@
                     class="number-input"
                     style="width: 90px;"
                     type="number"
+                    @change="e => {markerForm.toValue=Number(e);}"
                     :placeholder="$t('Edb.InputHolderAll.input_number')"
                   />
 
@@ -129,6 +141,7 @@
                   class="number-input"
                   style="width: 90px;"
                   type="number"
+                  @change="e => {markerForm.fromValue=Number(e);}"
                   :placeholder="$t('Edb.InputHolderAll.input_number')"
                 />
                 <!-- 至 -->{{$t('Common.to')}}
@@ -137,81 +150,271 @@
                   class="number-input"
                   style="width: 90px;"
                   type="number"
+                  @change="e => {markerForm.toValue=Number(e);}"
                   :placeholder="$t('Edb.InputHolderAll.input_number')"
                 />
 
               </div>
             </template>
-            
-          </el-form-item>
-          <el-form-item :label="$t('EtaChartAddPage.label_line_sty')" prop="dashStyle" v-if="form.markerType==='line'">
-            <el-select 
-              v-model="markerForm.dashStyle"
-              style="width:200px;"
-            >
-              <el-option 
-                v-for="item in dashOptions" 
-                :key="item.value" 
-                :label="item.label" 
-                :value="item.value"
-              >
-                <svg width="60" height="10" viewBox="0 0 60 10" fill="none" xmlns="http://www.w3.org/2000/svg" v-html="item.svg"></svg>
-              </el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item :label="$t('Chart.Detail.color')" prop="color" style="margin-bottom:8px;">
-            <el-color-picker
-              v-model="markerForm.color"
-              :predefine="predefineColors"
-              show-alpha
-              style="width: 90px"
-            />
-          </el-form-item>
-          <el-form-item :label="$t('Chart.Detail.size')" prop="lineWidth" v-if="form.markerType==='line'">
-            <el-input
-              v-model="markerForm.lineWidth"
-              style="width: 90px"
-              type="number"
-              :min="1"
-            />
-          </el-form-item>
-          <el-form-item :label="form.markerType==='line'?$t('EtaChartAddPage.label_line_intru'):$t('EtaChartAddPage.label_area_intru')" prop="text">
-            <el-input
-              v-model="markerForm.text"
-              style="width: 200px"
-              :placeholder="$t('Chart.InputHolderAll.input_content')"
-            />
-          </el-form-item>
-          <el-form-item :label="$t('EtaChartAddPage.label_text_pos')" prop="textPosition">
-            <el-select 
-              v-model="markerForm.textPosition"
-              style="width:200px;"
-            >
-              <el-option 
-                v-for="item in verticalPositions" 
-                :key="item.value" 
-                :label="item.label" 
-                :value="item.value"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item :label="$t('EtaChartAddPage.label_text_color')" prop="textColor" style="margin-bottom:8px;">
-            <el-color-picker
-              v-model="markerForm.textColor"
-              show-alpha
-              :predefine="predefineColors"
-              style="width: 90px"
-            />
-          </el-form-item>
-          <el-form-item :label="$t('EtaChartAddPage.label_text_size')" prop="textFontSize">
-            <el-input
-              v-model="markerForm.textFontSize"
-              class="number-input"
-              style="width: 90px"
-              type="number"
-              :min="1"
-            />
           </el-form-item>
+
+          <!-- 标识线-指标计算部分 -->
+          <div class="custom-value-setting-wrap" v-if="form.markerType==='line'&&markerForm.markLineType===2">
+            <!-- 指标选择 -->
+            <el-form-item :label="$t('Edb.eta_name')">
+                <div class="edb-box-wrap form-item-content">
+                    <!-- 固定第一个指标 -->
+                    <div class="fixed-edb" style="margin-right: 20px;width:45%;">
+                        <el-radio v-model="markerForm.edbType" :label="0">{{ $t('Chart.Detail.chart_first_edb') }}</el-radio>
+                        <p>{{tableData&&tableData[0].EdbName||''}}</p>
+                    </div>
+                    <!-- 指标/预测指标库的指标 -->
+                    <div class="other-edb">
+                        <el-radio v-model="markerForm.edbType" :label="1" style="margin-right: 20px;">{{$t('Chart.Detail.chart_other_edb')}}</el-radio>
+                        <!-- /datamanage/edb_info/filter_by_es/all -->
+                        <el-select style="width: 200px;"
+                            filterable remote clearable
+                            :placeholder="$t('ToolBox.ForexCalendar.edb_input')"
+                            v-model="searchObj"
+                            :remote-method="searchHandle"
+                            value-key="EdbInfoId"
+                            @click.native="searchHandle('')"
+                            @change="searchChange">
+                            <i slot="prefix" class="el-input__icon el-icon-search"></i>
+                            <el-option
+                                v-for="item in searchOptions"
+                                :key="item.EdbInfoId"
+                                :label="item.EdbName"
+                                :value="item"/>
+                        </el-select>
+                        <p>{{ markerForm.edbType&&markerForm.edbName||'' }}</p>
+                    </div>
+                </div>
+            </el-form-item>
+            <!-- 时间区间选择 -->
+            <el-form-item :label="$t('Chart.Detail.time_interval')">
+                <div class="time-area-wrap">
+                    <el-radio v-model="markerForm.timeInterval" :label="0" :disabled="[7,10].includes(chartInfo.ChartType)">{{ $t('Chart.Detail.follow_chart') }}</el-radio>
+                    <el-radio v-model="markerForm.timeInterval" :label="1">{{ $t('Chart.Detail.custom') }}</el-radio>
+                </div>
+            </el-form-item>
+            <!-- 如果时间区间选择自定义 -->
+            <div class="custom-time-wrap" v-if="markerForm.timeInterval===1">
+                <!-- 起始时间 -->
+                <el-form-item :label="$t('Table.start_time')">
+                    <div class="form-item-content">
+                        <div class="format">
+                            <el-radio v-model="markerForm.startTime.timeType" :label="1" style="margin-right: 0;"><!-- 固定 -->{{ $t('Chart.Detail.edb_time_fix') }}</el-radio>
+                            <el-date-picker
+                                v-model="markerForm.startTime.date"
+                                popper-class="x-range-picker-date"
+                                style="width: 140px;"
+                                placeholder="请输入固定时间"
+                                :clearable="false"
+                                format="yyyy-MM-dd"
+                                value-format="yyyy-MM-dd"
+                            ></el-date-picker>
+                        </div>
+                        <div class="format">
+                            <el-radio v-model="markerForm.startTime.timeType" :label="2" style="margin-left:20px;margin-right:0"><!-- 动态 -->{{ $t('Chart.Detail.edb_time_dyn') }}</el-radio>
+                            <el-tooltip effect="dark" placement="top">
+                                <div slot="content" v-html="$t('EtaChartAddPage.dynamic_time_tip')"></div>
+                                <i class="el-icon-question" style="font-size: 16px;"></i>
+                            </el-tooltip>
+                        </div>
+                    </div>
+                </el-form-item>
+                <!-- 起始时间为动态 -->
+                <div class="start-time-custom-wrap" v-if="markerForm.startTime.timeType===2">
+                    <!-- 基准日期 -->
+                    <el-form-item :label="$t('Chart.Detail.time_base')">
+                        <div class="form-item-content">
+                            <div class="format">
+                                <el-radio v-model="markerForm.startTime.baseDate" :label="0"><!-- 系统日期 -->{{ $t('Chart.Detail.sys_time') }}</el-radio>
+                            </div>
+                            <div class="format" style="display: flex;align-items: center;">
+                                <p>
+                                    <el-radio v-model="markerForm.startTime.baseDate" :label="1" style="margin-right:5px;"><!-- 指标最新日期 -->{{ $t('Chart.Detail.edb_new_time') }}</el-radio>
+                                </p>
+                                <p><!-- 期数前移 -->{{ $t('Chart.Detail.edb_periods') }}{{ $t('Chart.Detail.edb_periods_lead') }}
+                                    <el-input style="width:60px" type="number" class="number-input"
+                                    v-model.number="markerForm.startTime.conf.moveForward" 
+                                    @change="e => {markerForm.startTime.conf.moveForward=Number(e);}"
+                                    />
+                                    <!-- 期 -->{{ $t('Chart.Detail.edb_period') }}
+                                </p>
+                            </div>
+                        </div>
+                        
+                    </el-form-item>
+                    <!-- 日期变换 -->
+                    <dateMoveWaySec ref="startTime"></dateMoveWaySec>
+                   
+                </div>
+                
+                <!-- 结束时间 -->
+                <el-form-item :label="$t('Edb.Detail.e_end_time')">
+                    <div class="form-item-content">
+                        <div class="format">
+                            <el-radio v-model="markerForm.endTime.timeType" :label="3"><!-- 至今 -->{{ $t('Chart.Detail.edb_time_now') }}</el-radio>
+                        </div>
+                        <div class="format">
+                            <el-radio v-model="markerForm.endTime.timeType" :label="1" style="margin-right: 0;"><!-- 固定 -->{{ $t('Chart.Detail.edb_time_fix') }}</el-radio>
+                            <el-date-picker
+                                v-model="markerForm.endTime.date"
+                                popper-class="x-range-picker-date"
+                                style="width: 140px;"
+                                placeholder="请输入固定时间"
+                                :clearable="false"
+                                format="yyyy-MM-dd"
+                                value-format="yyyy-MM-dd"
+                            ></el-date-picker>
+                        </div>
+                        <div class="format">
+                            <el-radio v-model="markerForm.endTime.timeType" :label="2" style="margin-right: 0;"><!-- 动态 -->{{ $t('Chart.Detail.edb_time_dyn') }}</el-radio>
+                            <el-tooltip effect="dark" placement="top">
+                                <div slot="content" v-html="$t('EtaChartAddPage.dynamic_time_tip')"></div>
+                                <i class="el-icon-question" style="font-size: 16px;"></i>
+                            </el-tooltip>
+                        </div>
+                    </div>
+                    
+                </el-form-item>
+                <!-- 结束时间为动态 -->
+                <div class="end-time-custom-wrap" v-if="markerForm.endTime.timeType===2">
+                    <!-- 基准日期 -->
+                    <el-form-item :label="$t('Chart.Detail.time_base')">
+                        <div class="form-item-content">
+                            <div class="format">
+                                <el-radio v-model="markerForm.endTime.baseDate" :label="0"><!-- 系统日期 -->{{ $t('Chart.Detail.sys_time') }}</el-radio>
+                            </div>
+                            <div class="format" style="display: flex;align-items: center;">
+                                <p>
+                                    <el-radio v-model="markerForm.endTime.baseDate" :label="1" style="margin-right:5px;"><!-- 指标最新日期 -->{{ $t('Chart.Detail.edb_new_time') }}</el-radio>
+                                </p>
+                                <p><!-- 期数前移 -->{{ $t('Chart.Detail.edb_periods') }}{{ $t('Chart.Detail.edb_periods_lead') }}
+                                    <el-input style="width:60px" type="number" class="number-input"
+                                    v-model.number="markerForm.endTime.conf.moveForward" 
+                                    @change="e => {markerForm.endTime.conf.moveForward=Number(e);}"
+                                    />
+                                    <!-- 期 -->{{ $t('Chart.Detail.edb_period') }}
+                                </p>
+                            </div>
+                        </div>
+                        
+                    </el-form-item>
+                    <!-- 日期变换 -->
+                    <dateMoveWaySec ref="endTime"></dateMoveWaySec>
+                </div>
+            </div>
+            <!-- 计算方式 -->
+            <el-form-item :label="$t('Chart.Detail.plot_calculation')">
+                <div class="form-item-content">
+                    <!--区间均值-->
+                    <div class="format">
+                        <el-radio v-model="markerForm.calculation" :label="1">{{ $t('Chart.Detail.cal_range_val') }}{{ $t('Chart.Detail.cal_range_mean') }}</el-radio>
+                    </div>
+                    <!--区间均值加N倍标准差-->
+                    <div class="format">
+                        <el-radio v-model="markerForm.calculation" :label="2" style="margin-right:0;">{{ $t('Chart.Detail.cal_range_val') }}{{ $t('Chart.Detail.cal_range_mean') }}</el-radio>
+                        <p style="display:inline-block">{{ $t('Chart.Detail.cal_range_plus') }}
+                            <el-input 
+                            style="width:60px" 
+                            v-model.number="markerForm.calculationValue" 
+                            @change="e => {markerForm.calculationValue=Number(e);}"
+                            type="number" class="number-input"></el-input>{{ $t('Chart.Detail.cal_range_times') }} {{ $t('Chart.Detail.cal_range_std') }}</p>
+                    </div>
+                    <!--区间分位-->
+                    <div class="format">
+                        <el-radio v-model="markerForm.calculation" :label="3" style="margin-right:0;">{{ $t('Chart.Detail.cal_range_val') }}</el-radio>
+                        <p style="display:inline-block">
+                            <el-input style="width:60px" v-model="calculationValue" type="number" class="number-input"></el-input>%
+                            <el-select v-model="calculationType" style="width:80px">
+                                <el-option :label="$t('Chart.Detail.cal_range_count')" :value="3"></el-option>
+                                <el-option :label="$t('Chart.Detail.cal_range_value')" :value="4"></el-option>
+                            </el-select>{{ $t('Chart.Detail.cal_range_quantile') }}
+                        </p>
+                    </div>
+                </div>
+            </el-form-item>
+          </div>
+
+          <!-- 标识线样式 可收起 -->
+          <div class="mark-box" @click="isMarkStyleShow = !isMarkStyleShow;">
+            <span><i :class="isMarkStyleShow?'el-icon-arrow-down':'el-icon-arrow-right'"></i></span><span>{{ $t('Chart.Detail.plot_style') }}</span>
+          </div>
+          <div class="mark-style-wrap" v-show="isMarkStyleShow">
+            <el-form-item :label="$t('EtaChartAddPage.label_line_sty')" prop="dashStyle" v-if="form.markerType==='line'">
+                <el-select 
+                v-model="markerForm.dashStyle"
+                style="width:200px;"
+                >
+                <el-option 
+                    v-for="item in dashOptions" 
+                    :key="item.value" 
+                    :label="item.label" 
+                    :value="item.value"
+                >
+                    <svg width="60" height="10" viewBox="0 0 60 10" fill="none" xmlns="http://www.w3.org/2000/svg" v-html="item.svg"></svg>
+                </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item :label="$t('Chart.Detail.color')" prop="color" style="margin-bottom:8px;">
+                <el-color-picker
+                v-model="markerForm.color"
+                :predefine="predefineColors"
+                show-alpha
+                style="width: 90px"
+                />
+            </el-form-item>
+            <el-form-item :label="$t('Chart.Detail.size')" prop="lineWidth" v-if="form.markerType==='line'">
+                <el-input
+                v-model="markerForm.lineWidth"
+                style="width: 90px"
+                type="number"
+                @change="e => {markerForm.lineWidth=Number(e);}"
+                :min="1"
+                />
+            </el-form-item>
+            <el-form-item :label="form.markerType==='line'?$t('EtaChartAddPage.label_line_intru'):$t('EtaChartAddPage.label_area_intru')" prop="text">
+                <el-input
+                v-model="markerForm.text"
+                style="width: 200px"
+                :placeholder="$t('Chart.InputHolderAll.input_content')"
+                />
+            </el-form-item>
+            <el-form-item :label="$t('EtaChartAddPage.label_text_pos')" prop="textPosition">
+                <el-select 
+                v-model="markerForm.textPosition"
+                style="width:200px;"
+                >
+                <el-option 
+                    v-for="item in verticalPositions" 
+                    :key="item.value" 
+                    :label="item.label" 
+                    :value="item.value"
+                />
+                </el-select>
+            </el-form-item>
+            <el-form-item :label="$t('EtaChartAddPage.label_text_color')" prop="textColor" style="margin-bottom:8px;">
+                <el-color-picker
+                v-model="markerForm.textColor"
+                show-alpha
+                :predefine="predefineColors"
+                style="width: 90px"
+                />
+            </el-form-item>
+            <el-form-item :label="$t('EtaChartAddPage.label_text_size')" prop="textFontSize">
+                <el-input
+                v-model="markerForm.textFontSize"
+                class="number-input"
+                style="width: 90px"
+                type="number"
+                @change="e => {markerForm.textFontSize=Number(e);}"
+                :min="1"
+                />
+            </el-form-item>
+          </div>
       </el-form>
     </div>
 
@@ -223,8 +426,10 @@
   </el-dialog>
 </template>
 <script>
+import dateMoveWaySec from '@/views/datasheet_manage/components/dateMoveWaySection.vue'
 import { defaultOpts } from '@/utils/defaultOptions';
 import { verticalPositions } from '@/views/system_manage/chartTheme/common/config';
+import {ForexCalendarInterface} from '@/api/modules/toolBoxApi';
 export default {
   props: {
     isShow: {
@@ -241,18 +446,40 @@ export default {
 
     chartInfo: {
       type:Object
+    },
+    tableData:{
+        type:Array
     }
-
+  },
+  components:{
+    dateMoveWaySec
   },
   watch: {
     isShow(nval) {
       if(!nval) return
-
+      this.searchObj = ''
       if(this.form.editIndex) { //表单回显
         this.editIndex = this.form.editIndex;
         this.markerForm = {
           ...this.form.data
         }
+        //标识线特殊处理
+        if(this.form.markerType==='line'){
+            if(!this.markerForm.markLineType){
+                Object.assign(this.markerForm,this.markerExtraConfig)
+                //柱形图 截面散点图禁用时间区间-跟随图表
+                if([7,10].includes(this.chartInfo.ChartType)){
+                    this.markerForm.timeInterval = 1
+                }
+            }else{
+                //重置计算方式的值
+                const {calculation} = this.markerForm
+                if(calculation===3){
+                    this.calculationValue = this.markerForm.calculationValue
+                    this.markerForm.calculationValue = 1
+                }
+            }
+        }
       }else {
         this.editIndex = 0;
         
@@ -262,8 +489,8 @@ export default {
           axis: this.canSelectLeftYaxis?1:0,
           axisName:this.axisLabelMap[this.canSelectLeftYaxis?1:0],
           value: '',
-          from: '',
-          to:'',
+          fromValue: '',
+          toValue:'',
           lineWidth: 2,
           dashStyle: 'ShortDashDot',
           color: '#999',
@@ -273,7 +500,27 @@ export default {
           textFontSize: themeOpt.markerOptions.style.fontSize,
           isShow: true,
         }
+        //标识线特殊处理
+        if(this.form.markerType==='line'){
+           this.markerForm = {
+            ...this.markerForm,
+            ...this.markerExtraConfig
+           }
+            this.calculationValue = 50
+            //柱形图 截面散点图禁用时间区间-跟随图表
+            if([7,10].includes(this.chartInfo.ChartType)){
+                this.markerForm.timeInterval = 1
+            }
+        }
       }
+    },
+    'markerForm.axis':{
+        handler(newval,oldval){
+            //从横轴切换到其他轴/其他轴切换到横轴 清空value值
+            if(oldval===3||newval===3){
+                this.markerForm.value = ''
+            }
+        }
     }
   },
   computed: {
@@ -326,8 +573,53 @@ export default {
         text: '',
         textPosition: 'top',
         textColor: '#999',
-        textFontSize: 12
+        textFontSize: 12,
+        //markerType:'line'
+      },
+      //eta1.9.4新增标识线设置
+      markerExtraConfig:{
+        markLineType:1,//标识线所在刻度 1固定值 2指标计算
+        edbType:0,//指标 0图上第一个指标 1其他指标 -
+        edbInfoId:0,//选择的指标id 图上第一个指标取tableData[0] 其他指标取 searchObj
+        edbName:'',//回显指标用
+        timeInterval:0,//时间区间 0跟随图表 1自定义
+        startTime:{//当timeInterval为1时,有值
+            timeType:1,//起始时间类型 1 固定 2动态
+            date:'2020-01-01',//固定的时间值,timeType为2时为空
+            baseDate:0,//基准日期 0系统日期 1指标最新日期
+            conf:{
+                moveForward:0,//baseTimeType为2时,表示前移的期数
+                dateChange:[
+                    {//和 datasheet_manage/components/dateMoveWaySection 保持一致
+                        ChangeType:1,//1日期位移 2指定频率
+                        Day: 0,
+                        Month: 0,
+                        Year: 0,
+                        Frequency: '本周',
+                        FrequencyDay: '周一'
+                    }
+                ]//日期变换的值,最多两项,最少0项,
+            },
+
+        },
+        endTime:{
+            timeType:3,//起始时间类型 3至今 1 固定 2动态
+            date:'2024-01-01',//固定的时间值,timeType不为1时为空
+            baseDate:0,//基准日期 0系统日期 1指标最新日期
+            conf:{
+                moveForward:0,
+                dateChange:[]
+            },
+        },
+        calculation:1,//计算方式 1区间均值 2区间均值+标准差 3区间百分位个数分位 4区间百分位数值分位
+        calculationValue:1,//计算方式对应值,calculation为2时表示标准差的倍数,为3时表示个数分位的百分数
       },
+      calculationType:3,
+      calculationValue:50,
+     /*  calculationSelect:[
+        {lable:'个数',value:3},
+        {label:'数值',value:4}
+      ], */
 
       axisLabelMap: { //暂时没有横轴的代表key 规定为3好了
         1: '左轴',
@@ -335,6 +627,10 @@ export default {
         2: '右二轴',
         3: '横轴',
       },
+
+      isMarkStyleShow:false,
+      searchObj:'',
+      searchOptions:[]
     }
   },
   mounted(){
@@ -344,15 +640,52 @@ export default {
 
     async saveMarker() {
 
-      if(this.form.markerType==='line'&&!this.markerForm.value) return this.$message.warning(/* '标识线所在刻度不能为空' */this.$t('Chart.Vailds.plotline_msg'))
+      if(this.form.markerType==='line'&&this.markerForm.markLineType===1&&!this.markerForm.value) return this.$message.warning(/* '标识线所在刻度不能为空' */this.$t('Chart.Vailds.plotline_msg'))
 
       else if(this.form.markerType==='area'&&(!this.markerForm.fromValue||!this.markerForm.toValue)) return this.$message.warning(/* '标识区所在范围不能为空' */this.$t('Chart.Vailds.plotarea_msg'))
       
       else if(this.form.markerType==='area'&&this.markerForm.fromValue===this.markerForm.toValue) return this.$message.warning(/* '标识区所在范围不能相同' */this.$t('Chart.Vailds.plotarea_same_msg'))
 
+      //其他判断
+      if(this.form.markerType==='line'){
+        if(this.markerForm.markLineType===2&&this.markerForm.edbType===1&&!this.searchObj){
+            return this.$message.warning(/* '请选择指标' */this.$t('Edb.InputHolderAll.input_select_edb'))
+        }
+        //起始日期为动态 获取日期变换
+        if(this.markerForm.startTime.timeType===2){
+            this.markerForm.startTime.conf.dateChange = this.$refs.startTime.dateChangeArr||[]
+            //key的第一个字母改为小写
+            this.markerForm.startTime.conf.dateChange = this.markerForm.startTime.conf.dateChange.map(i=>{
+                return Object.fromEntries(
+                    Object.keys(i).map(key => [key.charAt(0).toLowerCase() + key.slice(1), i[key]])
+                );
+            })
+        }
+        //结束日期为动态 获取日期变换
+        if(this.markerForm.endTime.timeType===2){
+            this.markerForm.endTime.conf.dateChange = this.$refs.endTime.dateChangeArr||[]
+            this.markerForm.startTime.conf.dateChange = this.markerForm.startTime.conf.dateChange.map(i=>{
+                return Object.fromEntries(
+                    Object.keys(i).map(key => [key.charAt(0).toLowerCase() + key.slice(1), i[key]])
+                );
+            })
+        }
+        if(this.markerForm.edbType===1){
+            this.markerForm.edbInfoId = this.searchObj.EdbInfoId||0
+            this.markerForm.edbName = this.searchObj.EdbName||''
+        }else{
+            this.markerForm.edbInfoId = this.tableData&&this.tableData[0].EdbInfoId||0
+        }
+      }
       
       let item = _.cloneDeep(this.markerForm)
-      
+
+      //格式化某些值
+      //form.calculation+calculationType 共同判断计算方式
+      if(this.markerForm.calculation===3){
+            item.calculation = this.calculationType
+            item.calculationValue = Number(this.calculationValue)
+      }
       this.editIndex 
         ? this.$emit('edit',{
             index: this.editIndex,
@@ -365,13 +698,33 @@ export default {
    
     cancelHandle() {
       this.$emit('update:isShow',false)
-    }
+    },
+    searchHandle(keyword){
+        ForexCalendarInterface.searchEdbInfo({
+            KeyWord:keyword,
+            CurrentIndex:1,
+            PageSize:100,
+        }).then(res=>{
+            if(res.Ret!==200) return 
+            this.searchOptions = res.Data.List||[]
+        })
+    },
+    searchChange(){
+        if(typeof this.searchObj === 'object'){
+            //获取需要的数据
+            this.markerForm.edbInfoId = this.searchObj.EdbInfoId
+            this.markerForm.edbName = this.searchObj.EdbName
+        }else{
+            this.markerForm.edbInfoId = 0
+            this.markerForm.edbName = ''
+        }
+    },
   },
 }
 </script>
 <style scoped lang='scss'>
 .main {
-  padding-left: 20%;
+  padding-left: 5%;
 }
 .bottom {
   margin: 30px 0;
@@ -383,6 +736,28 @@ export default {
 .marker-edit-dialog {
   .el-color-picker__trigger { width: 100%;padding: 0;border-radius: 4px; }
   .number-input .el-input__inner { padding: 0 2px 0 10px; }
+  .form-item-content{
+    display: flex;
+    .format{
+        margin-right: 30px;
+    }
+  }
+  .date-change-ways{
+    margin-bottom: 20px;
+    .header{
+        label{
+            text-align: left !important;
+            width:120px !important;
+        }
+    }
+  }
+  .mark-box{
+    background-color: #EBEFF6;
+    border:1px solid #C8CDD9;
+    padding:12px;
+    cursor: pointer;
+    margin-bottom: 20px;
+  }
 
 }
 .month-day-picker {

+ 319 - 0
src/views/dataEntry_manage/components/addRightEdbDialog.vue

@@ -0,0 +1,319 @@
+<template>
+    <!-- 添加右轴指标 -->
+    <el-dialog
+        :visible.sync="isShow"
+        :close-on-click-modal="false"
+        :append-to-body="true"
+        @close="$emit('close')"
+        custom-class="average-edit-dialog"
+        center
+        width="650px"
+        v-dialogDrag
+        top="8vh"
+        :title="$t('EtaChartAddPage.add_right_edb_btn')"
+    >
+        <div class="container">
+           <div class="type-select">
+                <el-radio-group v-model="rightEdbForm.IndicatorType" @change="indicatorTypeChange">
+                    <el-radio :label="1"><!-- 左轴指标同比 -->{{ $t('EtaChartAddPage.right_edb_type_on_year') }}</el-radio>
+                    <el-radio :label="2"><!-- 指标库 -->{{ $t('EtaChartAddPage.right_edb_type_lib') }}</el-radio>
+                    <el-radio :label="3"><!-- 预测指标 -->{{ $t('EtaChartAddPage.right_edb_type_pred') }}</el-radio>
+                </el-radio-group>
+                <el-select v-if="rightEdbForm.IndicatorType!==1"
+                    v-model="search_txt"
+                    v-loadMore="searchLoad"
+                    ref="searchRef"
+                    :filterable="!search_txt"
+                    remote
+                    clearable
+                    :placeholder="$t('Edb.InputHolderAll.input_name_orid')"
+                    style="width:90%;margin-top: 20px;display: block;"
+                    :remote-method="searchHandle"
+                    @click.native="inputFocusHandle"
+                    @change="selectTarget($event && searchOptions.find(_ => _.EdbInfoId === $event))"
+                >
+                    <i slot="prefix" class="el-input__icon el-icon-search"></i>
+                    <el-option
+                        v-for="item in searchOptions"
+                        :key="item.EdbInfoId"
+                        :label="chart_lang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName"
+                        :value="item.EdbInfoId"
+                        :disabled="!item.HaveOperaAuth"
+                    >
+                        <edbDetailPopover :info="item">
+                            <div slot="reference">
+                                <img 
+                                    :src="$icons.lock_ico2" 
+                                    width="18" 
+                                    height="18" 
+                                    style="vertical-align:middle" 
+                                    v-if="!item.HaveOperaAuth"
+                                />
+                                {{chart_lang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName }}
+                            </div>
+                        </edbDetailPopover>
+                    </el-option>
+                </el-select>
+           </div>
+           <div class="form-box">
+            <el-form :model="rightEdbForm" :rules="formRules" hide-required-asterisk
+                label-position="right"
+                label-width="120px">
+                <!-- 生成样式-->
+                <el-form-item :label="$t('EtaChartAddPage.right_edb_gen_style')">
+                    <el-select v-model="rightEdbForm.Style">
+                        <el-option :label="$t('EtaChartAddPage.right_edb_gen_column')" value="column"></el-option>
+                        <el-option :label="$t('EtaChartAddPage.right_edb_gen_mark')" value="mark"></el-option>
+                    </el-select>
+                </el-form-item>
+                <!-- 如果选择标记点 -->
+                <!-- 标记点形状 -->
+                <el-form-item :label="$t('EtaChartAddPage.right_edb_mark_shape')" v-if="rightEdbForm.Style==='mark'">
+                    <el-select v-model="rightEdbForm.Shape">
+                        <el-option 
+                            v-for="markItem in markTypesOpts" 
+                            :key="markItem.value"
+                            :label="markItem.label"
+                            :value="markItem.value"
+                            >
+                            <div style="display: flex;align-items: center;justify-content: center;height: 100%;" v-html="markItem.svg">
+                            </div>
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <!-- 柱形/标记点的 颜色及透明度 -->
+                <el-form-item :label="$t('EtaChartAddPage.right_edb_color_set')">
+                    <el-color-picker
+                      style="width: 90px"
+                      v-model="rightEdbForm.ChartColor"
+                      show-alpha
+                      :predefine="predefineColors"
+                    ></el-color-picker>
+                </el-form-item>
+                <!-- 如果选择标记点 -->
+                <!-- 标记点大小 -->
+                <el-form-item :label="$t('EtaChartAddPage.right_edb_mark_size')" v-if="rightEdbForm.Style==='mark'">
+                    <el-input-number 
+                        v-model="rightEdbForm.Size" 
+                        controls-position="right" 
+                        :min="1" 
+                        style="width: 90px"/>
+                </el-form-item>
+                <el-form-item :label="$t('EtaChartAddPage.right_edb_legend')">
+                    <el-input v-model="rightEdbForm.Legend"></el-input>
+                </el-form-item>
+                <!-- 如果选择左轴同比 -->
+                <el-form-item :label="$t('EtaChartAddPage.right_edb_format')" v-if="rightEdbForm.IndicatorType===1">
+                    <el-radio-group v-model="rightEdbForm.NumFormat">
+                        <el-radio :label="1"><!-- 百分数 -->{{ $t('EtaChartAddPage.right_edb_format_per') }}</el-radio>
+                        <el-radio :label="2"><!-- 小数 -->{{ $t('EtaChartAddPage.right_edb_format_dec') }}</el-radio>
+                    </el-radio-group>
+                </el-form-item>
+                <!-- 如果选择标记点 -->
+                <!-- 标记点连线 -->
+                <el-form-item :label="$t('EtaChartAddPage.right_edb_mark_connect_text')" v-if="rightEdbForm.Style==='mark'">
+                    <el-radio-group v-model="rightEdbForm.IsConnected">
+                        <el-radio :label="0">{{$t('EtaChartAddPage.right_edb_mark_not_connected')}}</el-radio>
+                        <el-radio :label="1">{{ $t('EtaChartAddPage.right_edb_mark_connected') }}</el-radio>
+                    </el-radio-group>
+                </el-form-item>
+                <!-- 如果选择连线 -->
+                <template v-if="rightEdbForm.IsConnected">
+                    <el-form-item :label="$t('EtaChartAddPage.right_edb_mark_connect_line_color')">
+                        <el-color-picker
+                        style="width: 90px"
+                        v-model="rightEdbForm.LineColor"
+                        show-alpha
+                        :predefine="predefineColors"
+                        ></el-color-picker>
+                    </el-form-item>
+                    <el-form-item :label="$t('EtaChartAddPage.right_edb_mark_connect_line_style')">
+                        <el-select v-model="rightEdbForm.LineStyle">
+                            <el-option v-for="lineItem in lineStylesOpts"
+                                :key="lineItem.value"
+                                :label="lineItem.label"
+                                :value="lineItem.value"
+                            >
+                                <svg width="60" height="10" viewBox="0 0 60 10" fill="none" xmlns="http://www.w3.org/2000/svg" v-html="lineItem.svg">
+                                </svg>
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item :label="$t('EtaChartAddPage.right_edb_mark_connect_line_width')">
+                        <el-input-number 
+                            v-model="rightEdbForm.LineWidth" 
+                            controls-position="right" 
+                            :min="1" 
+                            style="width: 90px"/>
+                    </el-form-item>
+                </template>
+            </el-form>
+           </div>
+        </div>
+        <div slot="footer" class="dialog-footer" style="text-align: center;">
+            <el-button @click="$emit('close')">{{$t('Dialog.cancel_btn')}}</el-button>
+            <el-button type="primary" @click="confirmPerson">{{$t('Dialog.confirm_save_btn')}}</el-button>
+        </div>
+    </el-dialog>
+</template>
+
+<script>
+import { dataBaseInterface } from '@/api/api.js';
+import * as preDictEdbInterface from '@/api/modules/predictEdbApi.js';
+import { defaultOpts } from '@/utils/defaultOptions';
+import { markTypesOpts,lineStylesOpts } from '@/views/system_manage/chartTheme/common/config'
+export default {
+    props:{
+        isShow:{
+            type:Boolean,
+            default:false
+        },
+        tableData:{
+            type:Array
+        },
+        formData:{
+            type:Object,
+            default:{}
+        },
+        edbData:{
+            type:Object,
+        }
+    },
+    computed:{
+        formRules(){ //方便英文翻译
+            return {}
+        }
+    },
+    watch:{
+        isShow(newval){
+            if(newval){
+                Object.assign(this.rightEdbForm,this.formData)
+                this.rightEdbData = this.edbData
+                this.search_txt = this.edbData.EdbInfoId||''
+                this.searchOptions = this.edbData&&this.edbData.EdbInfoId?[this.edbData]:[]
+                if(!this.rightEdbForm.Legend){
+                    this.rightEdbForm.Legend = this.$t('EtaChartAddPage.year_on_right')
+                }
+            }
+        }
+    },
+    data() {
+        return {
+            search_page:1,
+            current_search:'',
+            search_txt:'',
+            search_have_more:false,
+            searchOptions:[],
+            rightEdbForm:{
+                IndicatorType:1,//1左轴同比 2指标库 3预测指标
+                Style:'column',//生成样式 column/mark
+                Shape:'circle',//标记点形状
+                ChartColor:'#075EEE',//颜色
+                Size:3,//标记点大小
+                Legend:'',//图例名称
+                NumFormat:1,//数值格式 1百分比 2小数
+                IsConnected:0,//连线 0无 1有
+                LineColor:'rgba(102, 102, 102, 1)',//线条颜色
+                LineWidth:1,//线条粗细
+                LineStyle:'Solid',//线条线型
+            },
+            rightEdbData:{},
+            markTypesOpts,lineStylesOpts,
+            predefineColors: defaultOpts.colors.slice(0, 2),
+        };
+    },
+    methods: {
+        indicatorTypeChange(){
+            //清空指标信息
+            this.search_txt=''
+            this.searchOptions=[]
+            this.rightEdbData={}
+        },
+        /* 搜索 */
+        searchHandle(query) {
+            this.search_page = 1;
+            this.current_search = query;
+            this.searchApi(this.current_search)
+        },
+
+        async searchApi(query,page=1) {
+            let params = {
+                KeyWord:query,
+                CurrentIndex: page,
+            }
+            const res = this.rightEdbForm.IndicatorType === 2
+                ? await dataBaseInterface.targetSearchByPage(params)
+                : await preDictEdbInterface.edbSearch(params)
+
+                if(res.Ret !== 200) return
+                const { List,Paging } = res.Data;
+                this.search_have_more = page < Paging.Pages;
+                this.searchOptions = page === 1 ? List : this.searchOptions.concat(List);
+        },
+
+        /* 聚焦获取当前检索 */
+        inputFocusHandle(e) {
+            this.search_page = 1;
+            this.current_search = e.target.value;
+            this.searchApi(this.current_search);
+        },
+        searchLoad() {
+            if(!this.search_have_more) return;
+            this.searchApi(this.current_search,++this.search_page);
+        },
+        //选择指标,获取详情,保存基本信息
+        async selectTarget(item){
+            if(!item) return 
+            //检查添加指标是否已存在
+            let have_bol = this.tableData.every(i => i.EdbInfoId === item.EdbInfoId);
+            if(have_bol){
+                // this.$message.warning('录入指标已存在');
+                this.search_txt = ''
+                return this.$message.warning(this.$t('Chart.OptMsg.edb_haved_msg'));
+            }
+            //以曲线图的参数获取指标详情
+            let params = {
+                EdbInfoId: item.EdbInfoId,
+                ChartType: 1,
+                Calendar: undefined,
+                DateType: 3,
+                StartYear:0,
+                StartDate: '',
+                EndDate: '',
+            } 
+            const res = await dataBaseInterface.chartInfo(params)
+            if(res.Ret!==200) return 
+            const tableItem = res.Data.EdbInfoList[0]
+            this.rightEdbData = {
+                EdbInfoId: tableItem.EdbInfoId,
+                EdbInfoType:tableItem.EdbInfoType,
+                LeadValue:tableItem.LeadValue,
+                LeadUnit:tableItem.LeadUnit,
+                IsAxis:0,
+            }
+        },
+        confirmPerson(){
+            //校验
+            if(this.rightEdbForm.IndicatorType!==1&&!this.search_txt){
+                return this.$message.warning(/* '请选择指标!' */this.$t('Edb.InputHolderAll.input_select_edb'))
+            }
+            if(!this.rightEdbForm.Legend){
+                return this.$message.warning(/* '请输入图例名称' */this.$t('EtaChartAddPage.legend_placeholder'))
+            }
+            this.$emit('modify',{form:this.rightEdbForm,data:this.rightEdbData})
+        }
+    },
+};
+</script>
+
+<style scoped lang="scss">
+.average-edit-dialog{
+    .type-select{
+        padding-bottom: 30px;
+        border-bottom: 1px solid #C8CDD9;
+    }
+    .form-box{
+        margin-top: 30px;
+    }
+}
+</style>

+ 3 - 2
src/views/dataEntry_manage/components/chartReleationEdbTable.vue

@@ -67,7 +67,8 @@
         width="140"
     >
         <template slot-scope="scope" v-if="scope.row.HaveOperaAuth">
-            <span @click="delTarget(scope.row)" class="deletesty"><!-- 删除 -->{{$t('Table.delete_btn')}}&nbsp;</span>
+            <!-- 如果是季节性图的右轴,隐藏删除按钮 -->
+            <span @click="delTarget(scope.row)" class="deletesty" v-if="!(scope.$index===1&&chartInfo.ChartType===2)"><!-- 删除 -->{{$t('Table.delete_btn')}}&nbsp;</span>
             <span v-permission="permissionBtn.chartLibPermission.chartLib_copyData"
                 class="editsty" @click="copyCode(scope.row)">
                 <i class="el-icon-document-copy" />&nbsp;<!-- 复制数据 -->{{$t('Edb.detail_copydata_btn')}}</span
@@ -151,7 +152,7 @@ export default {
           key: 'SourceName',
         },
       ]
-    }
+    },
   },
   data() {
     return {

+ 245 - 3
src/views/dataEntry_manage/components/markersSection.vue

@@ -1,5 +1,27 @@
 <template>
   <div class="chart-markers-section">
+    <!-- 季节性图升级-添加右轴指标-->
+    <div class="section-item" v-if="chartInfo.ChartType===2">
+        <div class="average-item" v-if="rightEdbForm.IsAdd">
+            <span>{{$t('Chart.Detail.r_axis')}}</span>
+            <div style="flex-shrink:0">
+                <i class="el-icon-view icon" :style="rightEdbForm.IsShow?'color:#0052D9':'color:#999'" @click="rightEdbForm.IsShow=!rightEdbForm.IsShow;previewSeason('updateSeason')"/>
+                <i class="el-icon-edit icon" style="margin:0 6px" @click="isAddRightEdbDialogShow=true"/>
+                <i class="el-icon-delete icon" @click="deleteRightEdb"/>
+            </div>
+        </div>
+        <div v-else
+            class="add-cont"
+            @click="isAddRightEdbDialogShow=true"
+        >
+            <img
+                src="~@/assets/img/set_m/add_ico.png"
+                alt=""
+                style="width: 16px; height: 16px; margin-right: 10px"
+            />
+            <span>{{$t('EtaChartAddPage.add_right_edb_btn')}}</span>
+        </div>
+    </div>
     <!-- 雷达不要 -->
     <template v-if="chartInfo.ChartType!==11">
       <!-- 标示线 -->
@@ -55,6 +77,73 @@
 
       </div>
     </template>
+    <!-- 季节性图升级-同期上下限/均线/标准差-->
+    <template v-if="chartInfo.ChartType===2">
+        <div class="section-item">
+            <div class="average-item" v-if="averageArea.IsAdd">
+                <span>{{ $t('EtaChartAddPage.limits_btn') }}:{{ averageArea.Year||0 }}</span>
+                <div style="flex-shrink:0">
+                    <i class="el-icon-view icon" :style="averageArea.IsShow?'color:#0052D9':'color:#999'" @click="averageArea.IsShow=!averageArea.IsShow;previewSeason('updateSeason')"/>
+                    <i class="el-icon-edit icon" style="margin:0 6px" @click="openAverageDialog(averageArea,1,'edit')"/>
+                    <i class="el-icon-delete icon" @click="deleteAverage(1)"/>
+                </div>
+            </div>
+            <div v-else
+                class="add-cont"
+                @click="openAverageDialog(averageArea,1)"
+            >
+                <img
+                    src="~@/assets/img/set_m/add_ico.png"
+                    alt=""
+                    style="width: 16px; height: 16px; margin-right: 10px"
+                />
+                <span><!-- 添加同期上下限 -->{{$t('Table.add_btn')}}{{$i18n.locale!=='zh'?' ':''}}{{ $t('EtaChartAddPage.limits_btn') }}</span>
+            </div>
+        </div>
+        <div class="section-item">
+            <div class="average-item" v-if="averageLine.IsAdd">
+                <span>{{ $t('EtaChartAddPage.avg_line_btn') }}:{{averageLine.Year||0}}</span>
+                <div style="flex-shrink:0">
+                    <i class="el-icon-view icon" :style="averageLine.IsShow?'color:#0052D9':'color:#999'" @click="averageLine.IsShow=!averageLine.IsShow;previewSeason('updateSeason')"/>
+                    <i class="el-icon-edit icon" style="margin:0 6px" @click="openAverageDialog(averageLine,2,'edit')"/>
+                    <i class="el-icon-delete icon" @click="deleteAverage(2)"/>
+                </div>
+            </div>
+            <div v-else
+                class="add-cont"
+                @click="openAverageDialog(averageLine,2)"
+            >
+                <img
+                    src="~@/assets/img/set_m/add_ico.png"
+                    alt=""
+                    style="width: 16px; height: 16px; margin-right: 10px"
+                />
+                <span><!-- 添加同期均线 -->{{$t('Table.add_btn')}}{{$i18n.locale!=='zh'?' ':''}}{{ $t('EtaChartAddPage.avg_line_btn') }}</span>
+            </div>
+        </div>
+        <div class="section-item">
+            <div class="average-item" v-if="averageStd.IsAdd">
+                <span>{{ $t('EtaChartAddPage.std_btn') }}:{{averageStd.Year||0}}</span>
+                <div style="flex-shrink:0">
+                    <i class="el-icon-view icon" :style="averageStd.IsShow?'color:#0052D9':'color:#999'" @click="averageStd.IsShow=!averageStd.IsShow;previewSeason('updateSeason')"/>
+                    <i class="el-icon-edit icon" style="margin:0 6px" @click="openAverageDialog(averageStd,3,'edit')"/>
+                    <i class="el-icon-delete icon" @click="deleteAverage(3)"/>
+                </div>
+            </div>
+            <div v-else
+                class="add-cont"
+                @click="openAverageDialog(averageStd,3)"
+            >
+                <img
+                    src="~@/assets/img/set_m/add_ico.png"
+                    alt=""
+                    style="width: 16px; height: 16px; margin-right: 10px"
+                />
+                <span><!-- 添加同期标准差 -->{{$t('Table.add_btn')}}{{$i18n.locale!=='zh'?' ':''}}{{ $t('EtaChartAddPage.std_btn') }}</span>
+            </div>
+        </div>
+    </template>
+
 
     <!-- 图表说明 -->
     <div class="section-item">
@@ -93,6 +182,7 @@
         rightIndex: $parent.rightIndex,
         rightTwoIndex: $parent.rightTwoIndex
       }"
+      :tableData="tableData"
       @add="addMarkerItem"
       @edit="editMarkerItem"
     />
@@ -138,17 +228,62 @@
         <el-button @click="chartInductionDiaForm.show=false"><!-- 取消 -->{{$t('Dialog.cancel_btn')}}</el-button>
       </div>
     </m-dialog>
-
+    <!-- 同期上下限/均线/标准差弹窗 -->
+    <addAverageDialog 
+        :isShow="isAddAverageDialogShow"
+        :averageType="averageType"
+        :formData="averageForm"
+        @close="isAddAverageDialogShow=false"
+        @modify="addAverage"
+    />
+    <!-- 右轴指标弹窗 -->
+    <addRightEdbDialog 
+        :isShow="isAddRightEdbDialogShow"
+        :tableData="tableData"
+        :formData="rightEdbForm"
+        :edbData="rightEdbInfo"
+        @close="isAddRightEdbDialogShow=false"
+        @modify="addRightEdb"
+    />
   </div>  
 </template>
 <script>
 import addMarkerDialog from './addMarkerDialog.vue'
 import mDialog from '@/components/mDialog.vue'
+import addAverageDialog from './addAverageDialog.vue'
+import addRightEdbDialog from './addRightEdbDialog.vue'
+
+const baseAverageForm = {
+    Legend:'',//图例名称
+    Year:5,//上下限取数范围/均线取数范围/取数范围
+    Color:'#075EEE',//颜色及透明度
+    LineType:'Solid',//线型
+    LineWidth:1,//线宽
+    Multiple:1,//倍数
+}
+const baseRightForm = {
+    IndicatorType:1,//1左轴同比 2指标库 3预测指标
+    Style:'column',//生成样式 column/mark
+    Shape:'circle',//标记点形状
+    ChartColor:'#075EEE',//颜色
+    Size:3,//标记点大小
+    Legend:'',//图例名称
+    NumFormat:1,//数值格式 1百分比 2小数
+    IsConnected:0,//连线 0无 1有
+    LineColor:'rgba(102, 102, 102, 1)',//线条颜色
+    LineWidth:1,//线条粗细
+    LineStyle:'Solid',//线条线型
+    IsShow:false,
+    IsAdd:false
+}
 export default {
-  components: { addMarkerDialog,mDialog },
+  components: { addMarkerDialog,mDialog, addAverageDialog, addRightEdbDialog },
   props: {
     chartInfo: {
       type: Object
+    },
+    tableData:{
+        type:Array
     }
   },
   data() {
@@ -173,7 +308,26 @@ export default {
       chartInductionDiaForm: {
         show: false,
         text: '',
-      }
+      },
+
+      /* 同期上下限/均线/标准差弹窗 */
+      isAddAverageDialogShow:false,
+      averageType:1,//1同期上下限 2同期均线 3同期标准差
+      averageForm:{},//初始化和回显用
+      averageMap:{
+        0:'',
+        1:{name:'averageArea'},//同期上下限
+        2:{name:'averageLine'},//同期均线
+        3:{name:'averageStd'},//同期标准差
+      },
+      averageArea:{IsAdd:false,IsShow:false},
+      averageLine:{IsAdd:false,IsShow:false},
+      averageStd:{IsAdd:false,IsShow:false},
+
+      /* 右轴指标弹窗 */
+      isAddRightEdbDialogShow:false,
+      rightEdbForm:{},//初始化和回显用
+      rightEdbInfo:{},//右轴不为同比时,有值
     }
   },
   methods:{
@@ -259,6 +413,85 @@ export default {
         color: this.chartInfo.ChartThemeStyle?JSON.parse(this.chartInfo.ChartThemeStyle).markerOptions.style.color:'#333',
         fontSize: this.chartInfo.ChartThemeStyle?JSON.parse(this.chartInfo.ChartThemeStyle).markerOptions.style.fontSize:12
       };
+    },
+    //打开同期弹窗
+    openAverageDialog(data,type,openType='add'){
+        if(openType==='add'){
+            this.averageForm = {
+                ...baseAverageForm,
+                IsAdd:false,
+                IsShow:false
+            }
+            //要默认颜色不一样
+            if(type===1){
+                this.averageForm.Color = 'rgba(153, 153, 153, 0.5)'
+            }
+            if(type===2){
+                this.averageForm.Color = '#ccc'
+                this.averageForm.LineType = 'ShortDash'
+            }
+        }else{
+            this.averageForm = data
+        }
+        this.averageType = type
+        this.isAddAverageDialogShow = true
+    },
+    //添加同期设置
+    addAverage({data,type}){
+        Object.assign(this[this.averageMap[type].name],data)
+        this[this.averageMap[type].name].IsAdd = true
+        this[this.averageMap[type].name].IsShow = true
+        this.isAddAverageDialogShow=false
+        this.previewSeason('previewSeason')
+    },
+    //取消添加同期设置
+    deleteAverage(type){
+        this[this.averageMap[type].name].IsAdd = false
+        this.previewSeason('previewSeason')
+    },
+    //添加右轴指标
+    addRightEdb({form,data}){
+        const tableData = {
+            ...data,
+            IsAxis:0,
+            Unit:form.NumFormat===1?'%':'',
+            UnitEn:''
+
+        }
+        this.rightEdbInfo = tableData
+        Object.assign(this.rightEdbForm,form)
+        this.rightEdbForm.IsAdd = true
+        this.rightEdbForm.IsShow = true
+        this.isAddRightEdbDialogShow = false
+        this.$emit('previewSeasonRight',{rightConfig:this.rightEdbForm,tableData})
+    },
+    //取消添加右轴指标
+    deleteRightEdb(){
+        this.rightEdbForm.IsAdd = false
+        this.rightEdbForm.IsShow = false
+        this.$emit('previewSeasonRight',{rightConfig:this.rightEdbForm,tableData:this.rightEdbInfo})
+        this.rightEdbForm = {}
+        Object.assign(this.rightEdbForm,baseRightForm)
+    },
+    //更新季节性图 同期/右轴
+    //预览图表
+    previewSeason(eventName='previewSeason'){
+        this.$emit(eventName,{
+            SeasonAverageConfig:{
+                MaxMinLimits:this.averageArea,
+                SamePeriodAverage:this.averageLine,
+                SamePeriodStandardDeviation:this.averageStd
+            },
+            SeasonRightEdbConfig:this.rightEdbForm
+        })
+    },
+    //季节性图配置数据回显
+    initSeasonData(data){
+        Object.assign(this.averageArea,data.MaxMinLimits)
+        Object.assign(this.averageLine,data.SamePeriodAverage)
+        Object.assign(this.averageStd,data.SamePeriodStandardDeviation)
+        Object.assign(this.rightEdbForm,data.RightAxis)
+        this.rightEdbInfo = data.RightInfo
     }
   },
 }
@@ -278,6 +511,15 @@ export default {
         padding: 12px 15px;
       }
     }
+    .average-item{
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        padding: 12px 15px;
+        border: 1px solid #DCDFE6;
+        background: #F0F2F5;
+        margin-bottom: 15px;
+    }
     .icon {font-size: 18px;cursor: pointer;}
     .el-icon-delete{
       color: #f00;

+ 1 - 1
src/views/dataEntry_manage/databaseComponents/batchComputedV2.vue

@@ -52,7 +52,7 @@
                     <el-form-item :label="$t('EtaBasePage.label_calendar')"  style="width:180px">
                         <el-select v-model="formData.calendarType" style="width:120px">
                             <el-option :label="$t('Chart.calendar_gre')" value="公历"></el-option>
-                            <el-option :label="$t('Chart.calendar_lunar')" value="农历"></el-option>
+                            <el-option :label="$t('Chart.calendar_lunar_text')" value="农历"></el-option>
                         </el-select>
                     </el-form-item>
                     </template>

+ 1 - 1
src/views/dataEntry_manage/databaseComponents/chartTrendRender.vue

@@ -110,7 +110,7 @@
 							@change="getDataByPath"
 					>
 							<el-radio-button label="公历">{{$t('Chart.calendar_gre')}}</el-radio-button>
-							<el-radio-button label="农历">{{$t('Chart.calendar_lunar')}}</el-radio-button>
+							<el-radio-button label="农历">{{$t('Chart.calendar_lunar_text')}}</el-radio-button>
 					</el-radio-group>
 				</div>
 			</div>

+ 1 - 1
src/views/dataEntry_manage/databaseComponents/operationDialog.vue

@@ -476,7 +476,7 @@ export default {
 		calendarOptions(){
 			return [
 				{label: this.$t('Chart.calendar_gre'),key: 1},
-				{label: this.$t('Chart.calendar_lunar'),key: 2},
+				{label: this.$t('Chart.calendar_lunar_text'),key: 2},
 			]
 		}
 	},

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

@@ -212,7 +212,8 @@
             <el-collapse-item v-for="(item,index) in tableData" :key="item.EdbInfoId" :disabled="[2,5].includes(chartInfo.ChartType)">
               <template slot="title">
                 <span class="text_oneLine">{{currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName}}</span>
-								<i class="el-icon-delete del-icon" @click.stop="delTarget(item)"></i>
+								<!-- 当为季节性图的第二个轴时,隐藏删除按钮 -->
+								<i class="el-icon-delete del-icon" @click.stop="delTarget(item)" v-if="!(chartInfo.ChartType===2&&index===1)"></i>
               </template>
               <ul class="setting-cont">
 								<!-- 堆叠图 或组合图中的堆叠类型 非第一项隐藏配置 -->
@@ -364,7 +365,11 @@
 						ref="markerSectionRef"
 						:chartType="chartInfo.ChartType"
 						:chartInfo="chartInfo"
+						:tableData="tableData"
 						@update="setChartMarkerInfo"
+						@updateSeason="updateSeasonChart"
+						@previewSeason="previewSeasonChart"
+						@previewSeasonRight="previewSeasonRight"
 					/>
         </div>
 			</div>
@@ -606,7 +611,7 @@
 								@change="getPreviewSplineInfo"
 							>
 								<el-radio-button label="公历">{{$t('Chart.calendar_gre')}}</el-radio-button>
-								<el-radio-button label="农历">{{$t('Chart.calendar_lunar')}}</el-radio-button>
+								<el-radio-button label="农历">{{$t('Chart.calendar_lunar_text')}}</el-radio-button>
 							</el-radio-group>
 
 							<!-- 图表说明 -->
@@ -788,12 +793,31 @@ export default {
 						Unit: ChartInfo.ChartType===7 
 							? (this.currentLang==='en'?BarChartInfo.UnitEn:BarChartInfo.Unit) 
 							: (this.currentLang==='en'?ChartInfo.UnitEn:ChartInfo.Unit),
-						SourcesFromVisable: ChartInfo.SourcesFrom ? JSON.parse(ChartInfo.SourcesFrom).isShow : true
+						SourcesFromVisable: ChartInfo.SourcesFrom ? JSON.parse(ChartInfo.SourcesFrom).isShow : true,
 					};
+					
 					//处理下历史默认来源
 					this.setDefaultSourceFrom();
 
+					//初始化标识线/区/图表说明
 					this.$refs.markerSectionRef.initData(ChartInfo);
+					//季节性图处理SeasonAverageConfig,SeasonRightEdbConfig
+					if(this.chartInfo.ChartType===2){
+						const {MaxMinLimits,SamePeriodAverage,SamePeriodStandardDeviation,RightAxis} = res.Data.DataResp
+						this.chartInfo.SeasonAverageConfig = {MaxMinLimits,SamePeriodAverage,SamePeriodStandardDeviation}
+						this.chartInfo.SeasonRightConfig = RightAxis
+						const tempData = _.cloneDeep(this.chartInfo.SeasonAverageConfig)
+						tempData.RightAxis = _.cloneDeep(RightAxis)
+						tempData.RightInfo = _.cloneDeep((RightAxis.EdbInfoList&&RightAxis.EdbInfoList[0])||{})
+						if(tempData.RightAxis.IndicatorType!==1){
+							tempData.RightInfo = EdbInfoList[1]||{}
+						}
+						delete tempData.MaxMinLimits.List
+						delete tempData.SamePeriodAverage.List
+						delete tempData.SamePeriodStandardDeviation.List
+						delete tempData.RightAxis.EdbInfoList
+						this.$refs.markerSectionRef.initSeasonData(tempData)
+					}
 
 					this.tableData = EdbInfoList;
 					this.updateData = this.tableData.map(item=>{
@@ -892,8 +916,8 @@ export default {
 			this.$refs.diaForm.validate((valid) => {
 				if(valid) {
 					// 季节图只允许添加一个指标
-					if(this.chartInfo.ChartType === 2 && this.tableData.length > 1)  
-						return this.$message.warning(/* '您选择的图表样式为季节性图表,只支持单指标画图' */this.$t('Chart.OptMsg.season_one_msg'));
+					if(this.chartInfo.ChartType === 2 && this.tableData.length > 1) {} 
+						//return this.$message.warning(/* '您选择的图表样式为季节性图表,只支持单指标画图' */this.$t('Chart.OptMsg.season_one_msg'));
 
 					if(this.chartInfo.ChartType === 7 && !this.$refs.BarOptRef.dateList.length)  
 						return this.$message.warning(/*'请添加日期'*/this.$t('ToolBox.CommodityPriceChart.tips_msg06'));
@@ -1011,6 +1035,25 @@ export default {
 							MinMaxSave:Number(hasLimitChange)
 						}
 					}
+					//如果是季节性图,在这里加上同期/右轴的参数
+					if(this.chartInfo.ChartType===2){
+						//const {MaxMinLimits={},SamePeriodAverage={},SamePeriodStandardDeviation={}} = this.chartInfo.SeasonAverageConfig||{}
+						const {SeasonRightConfig={}} = this.chartInfo
+						const tempData = _.cloneDeep(this.chartInfo.SeasonAverageConfig||{})
+						const {MaxMinLimits={},SamePeriodAverage={},SamePeriodStandardDeviation={}} = tempData||{}
+						delete MaxMinLimits.List
+						delete SamePeriodAverage.List
+						delete SamePeriodStandardDeviation.List
+						const tempConfig = _.cloneDeep(SeasonRightConfig)
+						delete tempConfig.EdbInfoList
+						params.SeasonExtraConfig = {
+							...this.SeasonExtraConfig,
+							MaxMinLimits:MaxMinLimits.IsAdd?MaxMinLimits:{},
+							SamePeriodAverage:SamePeriodAverage.IsAdd?SamePeriodAverage:{},
+							SamePeriodStandardDeviation:SamePeriodStandardDeviation.IsAdd?SamePeriodStandardDeviation:{},
+							RightAxis:SeasonRightConfig.IsAdd?tempConfig:{}//右轴的具体配置
+						}
+					}
 					dataBaseInterface.chartEdit(params).then(res => {
 						if(res.Ret !== 200) return;
 						

+ 163 - 11
src/views/dataEntry_manage/mixins/addOreditMixin.js

@@ -220,7 +220,8 @@ export default {
 				EndDate: this.year_select === 5 ? dateArray[1] : '',
 				IsConvert:Number(IsConvert),
 				ConvertType,ConvertValue:Number(ConvertValue),
-				ConvertUnit,ConvertEnUnit
+				ConvertUnit,ConvertEnUnit,
+				IsAxis:this.tableData[index].IsAxis
 			}).then(res=>{
 				if(res.Ret!==200) return 
 				const {EdbInfoList=[]} = res.Data||{}
@@ -361,6 +362,7 @@ export default {
 
 		},
 
+
 		/* 添加柱形图 /雷达图指标数组 */
 		setBarEdbList(edb) {
 			let have_bol = this.tableData.some(item => item.EdbInfoId === edb.EdbInfoId);
@@ -403,7 +405,8 @@ export default {
 				Sort: {
 					Sort: sort.sort,
 					DateIndex: Number(sort.sortIndex)
-				}
+				},
+				MarkersLines:this.chartInfo.MarkersLines
 			}
 
 			dataBaseInterface.getBarData(params).then(res => {
@@ -433,6 +436,9 @@ export default {
 				
 				//默认来源搞一下
 				this.setDefaultSourceFrom();
+				//标识线回显
+				this.chartInfo.MarkersLines = res.Data.ChartInfo.MarkersLines||''
+				this.$refs.markerSectionRef&&this.$refs.markerSectionRef.initData(res.Data.ChartInfo||{});
 			})
 		},
 
@@ -506,10 +512,25 @@ export default {
 						ConvertType,
 						ConvertValue:Number(ConvertValue),
 						ConvertUnit:IsConvert?ConvertUnit:'',
-						ConvertEnUnit:IsConvert?ConvertEnUnit:''
+						ConvertEnUnit:IsConvert?ConvertEnUnit:'',
+						IsAxis:_.IsAxis
 					}
-				})
-		}
+				}),
+				MarkersLines:this.chartInfo.MarkersLines||''
+			}
+			//季节性图 更改SeasonExtraConfig
+			//如果是季节性图,存储额外参数(同期/右轴)
+			if(this.chartInfo.ChartType===2){
+				const {MaxMinLimits={},SamePeriodAverage={},SamePeriodStandardDeviation={}} = this.chartInfo.SeasonAverageConfig||{}
+				const {SeasonRightConfig={}} = this.chartInfo
+				params.SeasonExtraConfig = {
+					...this.SeasonExtraConfig,
+					MaxMinLimits:MaxMinLimits.IsAdd?MaxMinLimits:{},
+					SamePeriodAverage:SamePeriodAverage.IsAdd?SamePeriodAverage:{},
+					SamePeriodStandardDeviation:SamePeriodStandardDeviation.IsAdd?SamePeriodStandardDeviation:{},
+					RightAxis:SeasonRightConfig.IsAdd?SeasonRightConfig:{}
+				}
+			}
 
       const res = await dataBaseInterface.getSplinePreviewData(params)
 
@@ -531,13 +552,18 @@ 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;
+		}
+        
       });
+			//标识线回显
+			this.chartInfo.MarkersLines = res.Data.ChartInfo.MarkersLines||''
+			this.$refs.markerSectionRef&&this.$refs.markerSectionRef.initData(res.Data.ChartInfo||{});
 		},
 
 		/* 年份改变 重新刷新图表接口  保存当前的图表配置和上下限 只改变图表 */
@@ -1068,11 +1094,22 @@ export default {
 			this.chartInfo.MarkersAreas = JSON.stringify(markerAreasArr);
 			this.chartInfo.Instructions = JSON.stringify(chartInstruction);
 
+			//markersLines含有指标计算的部分,调preview
+			if(markerLinesArr.find(i=>i.markLineType===2)){
+				//柱形图单独设置
+				if(this.chartInfo.ChartType===7){
+					this.barDateList.length && this.$refs.BarOptRef.getBarData();
+				}else{
+					this.getPreviewSplineInfo()
+				}
+			}
+
 			this.reLoadChartOption();
 		},
 		
 		//更新标识线,区 重绘图 不用重新获取数据 
 		reLoadChartOption() {
+			console.log('reloadChartOption')
 			if(!this.options.series) return
 			
 			const chartTypeMap = {
@@ -1084,6 +1121,121 @@ 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
+			}
+			if(this.chartInfo.SeasonRightConfig){
+				this.chartInfo.SeasonRightConfig.IsShow = SeasonRightEdbConfig.IsShow||false
+			}
+			this.reLoadChartOption()
+		},
+		//预览季节性图(请求接口)
+		previewSeasonChart({SeasonAverageConfig={},SeasonRightEdbConfig={IndicatorType:1}}){
+			this.chartInfo.SeasonAverageConfig = SeasonAverageConfig
+			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:'',
+						IsAxis:_.IsAxis
+					}
+			})
+			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:{},
+				RightAxis:SeasonRightEdbConfig.IsAdd?SeasonRightEdbConfig:{}//右轴的具体配置
+			}
+			params.SeasonExtraConfig = SeasonExtraConfig
+			dataBaseInterface.getSplinePreviewData(params).then(res=>{
+				if(res.Ret!==200) return 
+				const {DataResp} = res.Data
+				const {MaxMinLimits,SamePeriodAverage,SamePeriodStandardDeviation,
+						RightAxis={
+							IndicatorType:1,
+							EdbInfoList:[]
+						}} = DataResp
+				//包含同期的具体数据,用于绘图展示和传参
+				this.chartInfo.SeasonAverageConfig = {
+					MaxMinLimits,SamePeriodAverage,SamePeriodStandardDeviation
+				}
+				//更新SearonRightConfig
+				this.chartInfo.SeasonRightConfig = RightAxis
+				//更新chartLimit.rightMin/rightMax
+				const {EdbInfoList=[]} = res.Data
+				let MinData=0,MaxData
+				if(RightAxis.IndicatorType===1){
+					MinData = RightAxis.EdbInfoList[0].MinData||0
+					MaxData = RightAxis.EdbInfoList[0].MaxData||0
+				}else{
+					MinData = EdbInfoList[1]&&EdbInfoList[1].MinData||0
+					MaxData = EdbInfoList[1]&&EdbInfoList[1].MaxData||0
+				}
+				this.chartLimit.rightMin = MinData
+				this.chartLimit.rightMax = MaxData
+				//如果右轴有设置更新tableData&updateData
+				if(RightAxis.IsAdd){
+					this.tableData = EdbInfoList
+					this.updateData = this.tableData.map(item=>{
+						return this.formatUpdateData(item)
+					})
+					//弹窗回显
+					this.$refs.markerSectionRef.rightEdbInfo =RightAxis.IndicatorType!==1? _.cloneDeep(EdbInfoList[1]):{}
+				}else{
+					//右轴为指标时有修改tableData的行为 会重绘图表 而右轴为同比时不会 这里手动重绘一次
+					this.reLoadChartOption()
+				}
+				
+			})
+
+		},
+		//预览季节性图右轴
+		previewSeasonRight({rightConfig,tableData}){
+			this.chartInfo.SeasonRightConfig = rightConfig
+			if(rightConfig.IsAdd){
+				//若为指标/预测指标
+				if(rightConfig.IndicatorType!==1){
+					const tempItem = this.formatUpdateData(tableData)
+					if(rightConfig.IndicatorType!==1){
+						if(this.tableData.length>1){
+							this.tableData[1] = tableData
+						}else{
+							this.tableData.push(tableData)
+							this.updateData.push(tempItem)
+						}
+					}
+				}
+				//若为左轴同比,啥也不做
+			}else{
+				if(rightConfig.IndicatorType!==1){
+					this.delTarget(tableData)
+				}
+			}
+			this.previewSeasonChart({SeasonAverageConfig:this.chartInfo.SeasonAverageConfig,SeasonRightEdbConfig:rightConfig})
+		},
 		//获取图表全局设置
 		async getChartBaseSetting(){
 			//目前是用基本配置的接口,后续有多个配置再改

+ 141 - 5
src/views/dataEntry_manage/mixins/chartPublic.js

@@ -10,6 +10,11 @@ import futuresInterface from '@/api/modules/futuresBaseApi';
 import chartRelevanceApi from '@/api/modules/chartRelevanceApi';
 import { fittingEquationInterface,statisticFeatureInterface,crossVarietyInterface } from '@/api/modules/chartRelevanceApi';
 
+//获取RGBA的透明度
+const parseRgbaColor = (color='rgba(51, 51, 51, 1)') => {
+    const arr = color.match(/(\d(\.\d+)?)+/g) || ['','','',1];
+    return parseFloat(arr[3]||1)
+}
 /* 散点x轴 */
 const scatterXAxis = {
   tickPosition: 'inside',
@@ -1086,7 +1091,8 @@ export const chartSetMixin = {
     setSeasonChart(newval) {
       /* 季节性图的图表配置 */
       this.leftIndex = 0;
-      this.rightIndex = -1;
+      const {SeasonRightConfig={}} = this.chartInfo
+      this.rightIndex = SeasonRightConfig.IsShow?1:-1;
       this.rightTwoIndex = -1;
       const chartData = newval[0];
       // 农历数据需要去除第一项  农历和公历处理逻辑一样
@@ -1108,19 +1114,23 @@ export const chartSetMixin = {
         //获取对应轴的上下限
         //预测指标-走势图;图表配置-主题设置;不使用自定义上下限,剔除
         const useTableLimit = ['/predictEdb','/chartThemeSet','/addpredictEdb','/editpredictEdb','/viewBalanceSheet','/editBalanceSheet'].includes(this.$route.path)
-        let minLimit = 0,maxLimit = 0
+        let minLimit = 0,maxLimit = 0,rightMin=0,rightMax=0
         if(useTableLimit){
             minLimit = chartData.MinData
             maxLimit = chartData.MaxData
+            //这几个页面的季节性图没有右轴,若有,取SearonRightConfig.EdbInfoList[0]的MinData/MaxData
         }else{
             minLimit = this.chartLimit.min||0
             maxLimit = this.chartLimit.max||0
+            //加上右轴
+            if(this.rightIndex!=-1){
+                rightMin = this.chartLimit.rightMin||0
+                rightMax = this.chartLimit.rightMax||0
+            }
         }
-
-      //数据列
+      //数据列-常规左轴
       for (let index in chartDataHandle) {
         let j = chartDataHandle[index]
-        // console.log(j,index);
         //预测指标配置
         let predict_params =  chartData.EdbInfoCategoryType === 1 ? this.getSeasonPredictParams(j.CuttingDataTimestamp) : {};
         // 图表可配置的线条数就10条,第11条用第1条的配置,索引取下模
@@ -1147,6 +1157,81 @@ export const chartSetMixin = {
         seasonData.push(serie_item);
       }
 
+      //数据列-同期上下限/均线/标准差
+      const {MaxMinLimits={},SamePeriodAverage={},SamePeriodStandardDeviation={}} = this.chartInfo.SeasonAverageConfig||{}
+      if(MaxMinLimits.IsShow&&MaxMinLimits.List&&MaxMinLimits.List.length){
+        let serieItem = {
+            type:'arearange',//上下限是一个范围
+            data:[],
+            name:MaxMinLimits.Legend||'同期上下限',
+            color:MaxMinLimits.Color||'#075EEE' ,
+            fillOpacity:parseRgbaColor(MaxMinLimits.Color||'')>0.75?0.75:parseRgbaColor(MaxMinLimits.Color||'') //透明度最高0.75 
+        }
+        MaxMinLimits.List.forEach(item=>{
+            serieItem.data.push([item.DataTimestamp,item.MinValue,item.MaxValue])
+        })
+        seasonData.push(serieItem)
+      }
+      if(SamePeriodAverage.IsShow&&SamePeriodAverage.List){
+        let serieItem = {
+            type:'line',
+            data:[],
+            lineWidth:SamePeriodAverage.LineWidth,
+            dashStyle:SamePeriodAverage.LineType,
+            name:SamePeriodAverage.Legend||'同期均值',
+            color:SamePeriodAverage.Color||'#075EEE'
+        }
+        SamePeriodAverage.List.forEach(item=>{
+            serieItem.data.push([item.DataTimestamp,item.Value])
+        })
+        seasonData.push(serieItem)
+      }
+      if(SamePeriodStandardDeviation.IsShow&&SamePeriodStandardDeviation.List){
+        let serieItem = {
+            type:'arearange',//标准差也是一个范围
+            data:[],
+            name:SamePeriodStandardDeviation.Legend||'同期标准差',
+            color:SamePeriodStandardDeviation.Color||'#075EEE',
+            fillOpacity:parseRgbaColor(SamePeriodStandardDeviation.Color||'')>0.75?0.75:parseRgbaColor(SamePeriodStandardDeviation.Color||'')
+        }
+        SamePeriodStandardDeviation.List.forEach(item=>{
+            serieItem.data.push([item.DataTimestamp,item.MinValue,item.MaxValue])
+        })
+        seasonData.push(serieItem)
+      }
+      //数据列-右轴
+      if(SeasonRightConfig.IsShow){
+        //右轴的设置
+        let serieConfig = SeasonRightConfig.Style==='column'?{
+            //柱形
+            type:'column',
+            color:SeasonRightConfig.ChartColor
+        }:{
+            //标记点
+            type:'spline',
+            lineWidth:SeasonRightConfig.LineWidth,
+            dashStyle:SeasonRightConfig.LineStyle,
+            color:SeasonRightConfig.IsConnected?SeasonRightConfig.LineColor:'rgba(255, 255, 255, 0)',//没有连线颜色设置为透明
+            marker:{
+                enabled:true,
+                symbol:SeasonRightConfig.Shape,
+                fillColor:SeasonRightConfig.ChartColor,
+                radius:SeasonRightConfig.Size
+            },
+        }
+        let serieItem = {
+            ...serieConfig,
+            name:SeasonRightConfig.Legend||'',
+            data:[],
+            yAxis:1,
+        }
+        const DataList = (SeasonRightConfig.IndicatorType===1?SeasonRightConfig.EdbInfoList[0].DataList:newval[1].DataList)||[]
+        DataList.forEach(item=>{
+            serieItem.data.push([item.DataTimestamp,item.Value])
+        })
+        seasonData.push(serieItem)
+      }
+
       //y轴
       const textZh = chartData.ConvertUnit||chartData.Unit
       const textEn = chartData.ConvertEnUnit||chartData.UnitEn||chartData.ConvertUnit||chartData.Unit
@@ -1183,6 +1268,44 @@ export const chartSetMixin = {
         plotBands: this.setAxisPlotAreas(1),
         plotLines: this.setAxisPlotLines(1)
       }];
+      //如果有右轴,seasonYdata加上右轴
+      if(SeasonRightConfig.IsShow){
+        const rightEdb = (SeasonRightConfig.IndicatorType===1?SeasonRightConfig.EdbInfoList[0]:newval[1])||{Unit:''}
+        //左轴同比:text为空或% 右轴指标:取指标单位
+        if(SeasonRightConfig.IndicatorType===1){
+            rightEdb.Unit = SeasonRightConfig.NumFormat===1?'%':''
+        }else{
+            rightEdb.Unit = newval[1]&&(newval[1].ConvertUnit||newval[1].Unit)||''
+        }
+        seasonYdata.push({
+            ...seasonOptions.yAxis,
+            opposite: true,//右轴
+            labels: {
+                formatter: function () {
+                  let val = this.value;
+                  return val;
+                },
+                align: 'center',
+                style: {
+                  ...chartTheme&&chartTheme.yAxisOptions.style
+                }
+              },
+              title: {
+                text: rightEdb.Unit||'',
+                style:{
+                  ...chartTheme&&chartTheme.yAxisOptions.style
+                },
+                align: 'high',
+                rotation: 0,
+                y: -12,
+                x: -rightEdb.Unit.length*12 ,
+                textAlign: 'right',
+                reserveSpace: false,
+              },
+              max: Number(rightMax),
+              min: Number(rightMin),
+        })
+      }
 
       /* x轴显示月日 */
       const xAxis = {
@@ -2964,6 +3087,19 @@ export const chartSetMixin = {
                 this.chartLimit.rightTwoMin = 0
                 this.chartLimit.rightTwoMax = 0
             }
+            //季节性图-右轴为左轴同比,单独处理
+            if(this.chartInfo.ChartType===2){
+                if(this.chartInfo.SeasonRightConfig&&this.chartInfo.SeasonRightConfig.IsAdd&&this.chartInfo.SeasonRightConfig.IsShow){
+                    if(this.chartInfo.SeasonRightConfig.IndicatorType===1){
+                        this.chartLimit.rightMin = this.chartInfo.SeasonRightConfig.EdbInfoList[0].MinData||0
+                        this.chartLimit.rightMax = this.chartInfo.SeasonRightConfig.EdbInfoList[0].MaxData||0
+                    }else{
+                        this.chartLimit.rightMin = this.tableData[1].MinData||0
+                        this.chartLimit.rightMax = this.tableData[1].MaxData||0
+                    }
+                    
+                }
+            }
             console.table([{
                     'y轴': '左轴',
                     '最大值': this.chartLimit.max,

+ 1 - 1
src/views/datasheet_manage/components/BalanceAddChart.vue

@@ -360,7 +360,7 @@
               <!-- 公历 -->
               <el-radio-button label="公历">{{$t('Chart.calendar_gre')}}</el-radio-button>
               <!-- 农历 -->
-              <el-radio-button label="农历">{{$t('Chart.calendar_lunar')}}</el-radio-button>
+              <el-radio-button label="农历">{{$t('Chart.calendar_lunar_text')}}</el-radio-button>
             </el-radio-group>
           </div>
           <!-- 季节图设置图例名称按钮 -->

+ 13 - 5
src/views/mychart_manage/components/chartDetailDia.vue

@@ -353,7 +353,7 @@
                   @change="getPreviewChartInfo"
                 >
                   <el-radio-button label="公历">{{$t('Chart.calendar_gre')}}</el-radio-button>
-                  <el-radio-button label="农历">{{$t('Chart.calendar_lunar')}}</el-radio-button>
+                  <el-radio-button label="农历">{{$t('Chart.calendar_lunar_text')}}</el-radio-button>
                 </el-radio-group>
 
                 <!-- 图表说明 -->
@@ -645,7 +645,12 @@ export default {
           if([1,11].includes(this.chartInfo.Source)) {
             //处理下历史默认来源
             this.setDefaultSourceFrom();
-            
+            //季节性图处理SeasonAverageConfig,SeasonRightEdbConfig
+            if(this.chartInfo.ChartType===2){
+                const {MaxMinLimits,SamePeriodAverage,SamePeriodStandardDeviation,RightAxis} = res.Data.DataResp
+                this.chartInfo.SeasonAverageConfig = {MaxMinLimits,SamePeriodAverage,SamePeriodStandardDeviation}
+                this.chartInfo.SeasonRightConfig = RightAxis
+            }
             this.tableData = res.Data.EdbInfoList;
             //初始化上下限
             this.setLimitData(this.tableData)
@@ -778,14 +783,17 @@ export default {
           ConvertType:Number(_.ConvertType),
           ConvertValue:Number(_.ConvertValue),
           ConvertUnit:Number(_.IsConvert)?_.ConvertUnit:'',
-          ConvertEnUnit:Number(_.IsConvert)?_.ConvertEnUnit:''
-        }))
+          ConvertEnUnit:Number(_.IsConvert)?_.ConvertEnUnit:'',
+          IsAxis:_.IsAxis
+        })),
+        MarkersLines:this.chartInfo.MarkersLines||''
       }
 
       const res = await dataBaseInterface.getSplinePreviewData(params)
 
       if(res.Ret !== 200) return
-
+      //标识线回显
+      this.chartInfo.MarkersLines = res.Data.ChartInfo.MarkersLines||''
       const { EdbInfoList } = res.Data;
 
       this.tableData.forEach((item) => {

+ 139 - 2
src/views/ppt_manage/mixins/mixins.js

@@ -2,6 +2,12 @@
 import Highcharts from 'highcharts';
 import { defaultOpts, seasonOptions,getTerminal,browser } from '@/utils/defaultOptions';
 
+//获取RGBA的透明度
+const parseRgbaColor = (color='rgba(51, 51, 51, 1)') => {
+    const arr = color.match(/(\d(\.\d+)?)+/g) || ['','','',1];
+    return parseFloat(arr[3]||1)
+}
+
 // 散点x轴
 const scatterXAxis = {
   tickPosition: 'inside',
@@ -443,7 +449,7 @@ export default {
     setSeasonChart() {
       /* 季节性图的图表配置 */
       const chartData = this.dataList[0];
-
+      const {SeasonRightConfig={}} = this.chartInfo
        /* 主题样式*/
       const chartTheme =  this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
 
@@ -460,9 +466,14 @@ export default {
         seasonData = []
 
         //获取对应轴的上下限
-        let minLimit = 0,maxLimit = 0
+        let minLimit = 0,maxLimit = 0,rightMin=0,rightMax=0
         minLimit = this.chartLimit.min||0
         maxLimit = this.chartLimit.max||0
+        //右轴
+        if(SeasonRightConfig.IsShow){
+            rightMin = this.chartLimit.rightMin||0
+            rightMax = this.chartLimit.rightMax||0
+        }
       //数据列
       for (let index in chartDataHandle) {
         let j = chartDataHandle[index]
@@ -493,6 +504,81 @@ export default {
         seasonData.push(serie_item);
       }
 
+      //数据列-同期上下限/均线/标准差
+      const {MaxMinLimits={},SamePeriodAverage={},SamePeriodStandardDeviation={}} = this.chartInfo.SeasonAverageConfig||{}
+      if(MaxMinLimits.IsShow&&MaxMinLimits.List&&MaxMinLimits.List.length){
+        let serieItem = {
+            type:'arearange',//上下限是一个范围
+            data:[],
+            name:MaxMinLimits.Legend||'同期上下限',
+            color:MaxMinLimits.Color||'#075EEE',
+            fillOpacity:parseRgbaColor(MaxMinLimits.Color||'')>0.75?0.75:parseRgbaColor(MaxMinLimits.Color||'') //透明度最高0.75 
+        }
+        MaxMinLimits.List.forEach(item=>{
+            serieItem.data.push([item.DataTimestamp,item.MinValue,item.MaxValue])
+        })
+        seasonData.push(serieItem)
+      }
+      if(SamePeriodAverage.IsShow&&SamePeriodAverage.List){
+        let serieItem = {
+            type:'line',
+            data:[],
+            lineWidth:SamePeriodAverage.LineWidth,
+            dashStyle:SamePeriodAverage.LineType,
+            name:SamePeriodAverage.Legend||'同期均值',
+            color:SamePeriodAverage.Color||'#075EEE'
+        }
+        SamePeriodAverage.List.forEach(item=>{
+            serieItem.data.push([item.DataTimestamp,item.Value])
+        })
+        seasonData.push(serieItem)
+      }
+      if(SamePeriodStandardDeviation.IsShow&&SamePeriodStandardDeviation.List){
+        let serieItem = {
+            type:'arearange',//标准差也是一个范围
+            data:[],
+            name:SamePeriodStandardDeviation.Legend||'同期标准差',
+            color:SamePeriodStandardDeviation.Color||'#075EEE',
+            fillOpacity:parseRgbaColor(SamePeriodStandardDeviation.Color||'')>0.75?0.75:parseRgbaColor(SamePeriodStandardDeviation.Color||'')
+        }
+        SamePeriodStandardDeviation.List.forEach(item=>{
+            serieItem.data.push([item.DataTimestamp,item.MinValue,item.MaxValue])
+        })
+        seasonData.push(serieItem)
+      }
+      //数据列-右轴
+      if(SeasonRightConfig.IsShow){
+        //右轴的设置
+        let serieConfig = SeasonRightConfig.Style==='column'?{
+            //柱形
+            type:'column',
+            color:SeasonRightConfig.ChartColor
+        }:{
+            //标记点
+            type:'spline',
+            lineWidth:SeasonRightConfig.LineWidth,
+            dashStyle:SeasonRightConfig.LineStyle,
+            color:SeasonRightConfig.IsConnected?SeasonRightConfig.LineColor:'rgba(255, 255, 255, 0)',//没有连线颜色设置为透明
+            marker:{
+                enabled:true,
+                symbol:SeasonRightConfig.Shape,
+                fillColor:SeasonRightConfig.ChartColor,
+                radius:SeasonRightConfig.Size
+            },
+        }
+        let serieItem = {
+            ...serieConfig,
+            name:SeasonRightConfig.Legend||'右轴',
+            data:[],
+            yAxis:1,
+        }
+        const DataList = (SeasonRightConfig.IndicatorType===1?SeasonRightConfig.EdbInfoList[0].DataList:this.dataList[1].DataList)||[]
+        DataList.forEach(item=>{
+            serieItem.data.push([item.DataTimestamp,item.Value])
+        })
+        seasonData.push(serieItem)
+      }
+
       //y轴
       const textZh = chartData.ConvertUnit||chartData.Unit
       const textEn = chartData.ConvertEnUnit||chartData.UnitEn||chartData.ConvertUnit||chartData.Unit
@@ -531,6 +617,44 @@ export default {
         plotBands: this.setAxisPlotAreas(1),
         plotLines: this.setAxisPlotLines(1)
       }];
+      //如果有右轴,seasonYdata加上右轴
+      if(SeasonRightConfig.IsShow){
+        const rightEdb = (SeasonRightConfig.IndicatorType===1?SeasonRightConfig.EdbInfoList[0]:this.dataList[1])||{unit:''}
+        //左轴同比:text为空或% 右轴指标:取指标单位
+        if(SeasonRightConfig.IndicatorType===1){
+            rightEdb.Unit = SeasonRightConfig.NumFormat===1?'%':''
+        }else{
+            rightEdb.Unit = this.dataList[1]&&(this.dataList[1].ConvertUnit||this.dataList[1].Unit)||''
+        }
+        seasonYdata.push({
+            ...seasonOptions.yAxis,
+            opposite: true,//右轴
+            labels: {
+                formatter: function () {
+                  let val = this.value;
+                  return val;
+                },
+                align: 'center',
+                style: {
+                  ...chartTheme&&chartTheme.yAxisOptions.style
+                }
+              },
+              title: {
+                text: rightEdb.Unit||'',
+                style:{
+                  ...chartTheme&&chartTheme.yAxisOptions.style
+                },
+                align: 'high',
+                rotation: 0,
+                y: -12,
+                x: -rightEdb.Unit.length*12 ,
+                textAlign: 'right',
+                reserveSpace: false,
+              },
+              max: Number(rightMax),
+              min: Number(rightMin),
+        })
+      }
 
       // 季节图x轴显示月/日 周度指标额外处理时间轴显示
       const xAxis = {
@@ -2045,6 +2169,19 @@ export default {
             this.chartLimit.rightTwoMin = 0
             this.chartLimit.rightTwoMax = 0
         }
+        //季节性图-右轴为左轴同比,单独处理
+        if(this.chartInfo.ChartType===2){
+            if(this.chartInfo.SeasonRightConfig&&this.chartInfo.SeasonRightConfig.IsShow){
+                if(this.chartInfo.SeasonRightConfig.IndicatorType===1){
+                    this.chartLimit.rightMin = this.chartInfo.SeasonRightConfig.EdbInfoList[0].MinData||0
+                    this.chartLimit.rightMax = this.chartInfo.SeasonRightConfig.EdbInfoList[0].MaxData||0
+                }else{
+                    this.chartLimit.rightMin = tableData[1].MinData||0
+                    this.chartLimit.rightMax = tableData[1].MaxData||0
+                }
+                
+            }
+        }
     },
     calcLimit(arr) {
         return {

+ 6 - 1
src/views/ppt_manage/mixins/pptMixins.js

@@ -281,7 +281,12 @@ export default {
       if([1,11].includes(this.chartInfo.Source)) { //常规图
         //处理下历史默认来源
         this.setDefaultSourceFrom();
-        
+        //季节性图处理SeasonAverageConfig,SeasonRightEdbConfig
+        if(this.chartInfo.ChartType===2){
+            const {MaxMinLimits={},SamePeriodAverage={},SamePeriodStandardDeviation={},RightAxis={}} = Data.DataResp||{}
+            this.chartInfo.SeasonAverageConfig = {MaxMinLimits,SamePeriodAverage,SamePeriodStandardDeviation}
+            this.chartInfo.SeasonRightConfig = RightAxis
+        }
         this.dataList = Data.EdbInfoList;
         //初始化上下限
         this.setLimitData(this.dataList)

+ 1 - 1
src/views/predictEdb_manage/components/chartInfo.vue

@@ -74,7 +74,7 @@
                 @change="seasonTypeChange2"
             >
                 <el-radio-button label="公历">{{$t('Chart.calendar_gre')}}</el-radio-button>
-				<el-radio-button label="农历">{{$t('Chart.calendar_lunar')}}</el-radio-button>
+				<el-radio-button label="农历">{{$t('Chart.calendar_lunar_text')}}</el-radio-button>
             </el-radio-group>
 
             <div class="range-cont left">