jwyu 1 rok temu
rodzic
commit
38c63abfc0

+ 32 - 0
src/lang/modules/EtaBase/commonLang.js

@@ -83,6 +83,14 @@ export default {
     zh:'切换曲线图',
     en:'Switch to curve chart'
   },
+  eta_name:{
+    zh:'ETA指标',
+    en:'ETA index'
+  },
+  eta_predictor_name:{
+    zh:'ETA预测指标',
+    en:'ETA predictor index'
+  },
 
   /* 指标相关字段 */
   Detail: {
@@ -246,6 +254,26 @@ export default {
       zh:'年度',
       en:'Yearly'
     },
+    year_min:{
+      zh:'年',
+      en:'Year'
+    },
+    quarter_min: {
+      zh:'季',
+      en:'season'
+    },
+    month_min: {
+      zh:'月',
+      en:'month'
+    },
+    week_min: {
+      zh:'周',
+      en:'week'
+    },
+    day_min: {
+      zh:'天',
+      en:'day'
+    },
   },
 
   /* 计算方式 */
@@ -385,6 +413,10 @@ export default {
     input_fre: {
       zh: '请选择频度',
       en: 'Please input frequency'
+    },
+    select_edb_name:{
+      zh: '请选择指标名称',
+      en: 'Please select an indicator name'
     }
   }
 }

+ 21 - 1
src/lang/modules/EtaChart/commonLang.js

@@ -113,7 +113,27 @@ export default {
     chart_del_confirm:{
       zh:'删除后该图表将不能再引用,确认删除吗?',
       en:'After deletion, this chart will no longer be referenced. Are you sure to delete it?'
-    }
+    },
+    graph_name:{
+      zh:'曲线图',
+      en:'graph'
+    },
+
 
   },
+
+  ChartType:{
+    graph_name:{
+      zh:'曲线图',
+      en:'graph'
+    },
+    correlation_name:{
+      zh:'相关性',
+      en:'correlation'
+    },
+    rolling_correlation_name:{
+      zh:'滚动相关性',
+      en:'Rolling correlation'
+    }
+  }
 }

+ 22 - 0
src/lang/modules/StatisticAnalysis/ChartRelevance.js

@@ -13,6 +13,17 @@ export const ChartRelevanceEn = {
     edit_chart_classify:'Edit chart category',
     classify_name_tips:"The category name cannot be empty",
     opt_tip_btn:"Operation instruction",
+
+    edbTagA:'INDEX A',
+    edbTagB:'INDEX B',
+    time:'time',
+    left_axis:"Left axis",
+    right_axis:"Right axis",
+    to:'to',
+    reverse_sequence:'Reverse sequence',
+    standard_index:'Standard index',
+    leading_indicator:'Leading indicator',
+    lead_tag:'lead',
 };
   
 /* 中文 */
@@ -27,6 +38,17 @@ export const ChartRelevanceZh = {
     classify_name_tips:"分类名称不能为空",
     opt_tip_btn:"操作说明",
 
+    edbTagA:'指标A',
+    edbTagB:'指标B',
+    time:'时间',
+    left_axis:"左轴",
+    right_axis:"右轴",
+    to:'至',
+    reverse_sequence:'逆序',
+    standard_index:'标准指标',
+    leading_indicator:'领先指标',
+    lead_tag:'领先',
+
 };
   
 /**

+ 7 - 3
src/views/chartRelevance_manage/components/explainDialog.vue

@@ -7,7 +7,7 @@
         width="976px"
         v-dialogDrag
         top="8vh"
-        title="操作说明"
+        :title="$t('StatisticAnalysis.ChartRelevance.opt_tip_btn')"
         @close="$emit('close')"
     >
         <div class="dialog-container">
@@ -15,7 +15,7 @@
             </div>
         </div>
         <div class="dialog-btn">
-            <el-button type="primary" @click="$emit('close')">知道了</el-button>
+            <el-button type="primary" @click="$emit('close')">{{$t('MsgPrompt.known')}}</el-button>
         </div>
         
     </el-dialog>
@@ -36,7 +36,11 @@ export default {
     },
     computed:{
         textArray(){
-            return explainText[this.textArrName]
+            if(this.$i18n.locale == 'zh'){
+                return explainText[this.textArrName]
+            }else{
+                return explainText[this.textArrName+'En']
+            }
         }
     },
     data() {

+ 17 - 0
src/views/chartRelevance_manage/components/explainText.js

@@ -16,6 +16,23 @@ export const chartrelevanceTextArr = [
     <p>1、计算窗口:参与计算的时间段长度,从两个指标都有值的日期开始滚动的取计算窗口长度的值进行计算,如配置计算窗口1个月,则2023.7.28的值取2023.6.28~2023.7.28时间段,2023.7.27的值取2023.6.27~2023.7.27时间段;</p>
     <p>2、B领先A:B指标领先A指标的参数,为0时不领先;</p>`
 ]
+export const chartrelevanceTextArrEn=[
+    `<p style='font-weight:bold;'>Instruction for Correlation Calculation Processing Logic:</p>
+    <p>1、 Data Retrieval: Determine the time length of the calculation window, and move backwards from the current time by this duration to obtain a range of dates. Retrieve values for indicator A series and indicator B series within this date range.</p>
+    <p>2、Frequency Adjustment:</p>
+    <p>a. If indicator A is higher frequency, upsample indicator B (use linear equation interpolation to fill in data).</p>
+    <p>b. If indicator B is higher frequency, upsample indicator A (use linear equation interpolation to fill in data).</p>
+    <p>c. If indicator A and B are at the same frequency, no further processing is required.</p>
+    <p>Calculation: For each analysis period, use indicator A as a reference and shift indicator B by corresponding periods. Calculate the correlation for each period using the formula correlation coefficient R = SUM[(Xi-Mx)*(Yi-My)]/[(N-1)(SDx*SDy)].</p>
+    <p style='height:20px;'></p>
+    <p>Note: When shifting indicator B, if there's no value found for a date in the sequence of indicator A, search backward for the closest value within the time range of the calculation window moving back from the current date.</p>`,
+    `<p style='font-weight:bold;'>Correlation Configuration:</p>
+    <p>1. Calculation Window: The historical data time segment involved in the calculation.</p>
+    <p>2. Analysis Period: The number of periods that indicator B leads ahead of A; for instance, if configured with a parameter of 10 months, it indicates that B leads A by -10 months to +10 months, with correlation values calculated separately for each period.</p>`,
+    `<p style='font-weight:bold;'>Rolling Correlation Configuration:</p>
+    <p>1. Calculation Window: The length of time involved in calculations starts from when both indicators have available values and rolls forward taking values within the duration of the calculation window for computation. For example, if configured with a 1-month calculation window, then the value for July 28th, 2023 will be taken from June 28th to July 28th, 2023; while the value for July 27th will be taken from June 27th to July 27th.</p>
+    <p>2. B Leads A: The parameter by which indicator B leads ahead of indicator A; when set to 0, there is no lead.</p>`
+]
 
 //拟合方程曲线
 export const fittingEquationListTextArr = [

+ 23 - 9
src/views/chartRelevance_manage/components/selectTarget.vue

@@ -46,7 +46,7 @@
         :filterable="!search_txt"
         remote
         clearable
-        placeholder="请选择指标名称"
+        :placeholder="$t('Edb.InputHolderAll.select_edb_name')"
         style="flex: 1;margin-left: 15px"
         :remote-method="searchHandle"
         @click.native="inputFocusHandle"
@@ -72,7 +72,7 @@
       :filterable="!search_txt"
       remote
       clearable
-      placeholder="请选择指标名称"
+      :placeholder="$t('Edb.InputHolderAll.select_edb_name')"
       :style="`width: 100%; ${filter?'margin-top: 20px':''}`"
       :remote-method="searchHandle"
       @click.native="inputFocusHandle"
@@ -123,19 +123,33 @@ export default {
         this.targetType=this.defaultType==1?'2':'1' //EdbInfoCategoryType 0普通 1预测
       }
     },
-    data() {
-        return {
-            targetType:'1',//1:ETA指标 2:ETA预测指标
-            etaTypeOpt:[
+    computed:{
+      etaTypeOpt(){
+        return [
                 {
-                    label:'ETA指标',
+                    label:this.$t('Edb.eta_name'),
                     val:'1'
                 },
                 {
-                    label:'ETA预测指标',
+                    label:this.$t('Edb.eta_predictor_name'),
                     val:'2'
                 },
-            ],
+            ]
+      }
+    },
+    data() {
+        return {
+            targetType:'1',//1:ETA指标 2:ETA预测指标
+            // etaTypeOpt:[
+            //     {
+            //         label:'ETA指标',
+            //         val:'1'
+            //     },
+            //     {
+            //         label:'ETA预测指标',
+            //         val:'2'
+            //     },
+            // ],
             search_txt: this.defaultId||'',
             searchOptions: this.defaultOpt||[],
             search_have_more: true,

+ 33 - 22
src/views/chartRelevance_manage/relevance/relevanceChartEditor.vue

@@ -23,7 +23,7 @@
           :model="chartInfo"
           :rules="chartRules"
         >
-          <el-form-item class="label-left" label="指标A" prop="EdbInfoIdA">
+          <el-form-item class="label-left" :label="$t('StatisticAnalysis.ChartRelevance.edbTagA')" prop="EdbInfoIdA">
               <selectTarget  
                 :defaultId="chartInfoData.EdbInfoList?chartInfoData.EdbInfoList[0].EdbInfoId:''"
                 :defaultOpt="chartInfoData.EdbInfoList?[chartInfoData.EdbInfoList[0]]:[]"
@@ -31,7 +31,7 @@
                 @select="handleSelectTargetA"
               />
           </el-form-item>
-          <el-form-item class="label-left" label="指标B" prop="EdbInfoIdB">
+          <el-form-item class="label-left" :label="$t('StatisticAnalysis.ChartRelevance.edbTagB')" prop="EdbInfoIdB">
               <selectTarget 
                 :defaultId="chartInfoData.EdbInfoList?chartInfoData.EdbInfoList[1].EdbInfoId:''"
                 :defaultOpt="chartInfoData.EdbInfoList?[chartInfoData.EdbInfoList[1]]:[]" 
@@ -42,9 +42,9 @@
         </el-form>
 
         <div class="section">
-          <div>曲线图</div>
+          <div>{{$t('Chart.ChartType.graph_name')}}</div>
           <div class="section-item">
-            <span style="flex-shrink:0;min-width:50px;">时间:</span>
+            <span style="flex-shrink:0;min-width:50px;">{{$t('StatisticAnalysis.ChartRelevance.time')}}:</span>
             <el-select
                 style="max-width: 120px;flex:1;"
                 v-model="chartInfo.Curve.DateType"
@@ -70,7 +70,7 @@
             />
           </div>
           <div class="section-item">
-            <span style="flex-shrink:0;min-width:50px;">左轴:</span>
+            <span style="flex-shrink:0;min-width:50px;">{{$t('StatisticAnalysis.ChartRelevance.left_axis')}}:</span>
             <el-input
               style="flex:2;margin-left:5px;margin-right:10px"
               :step="1"
@@ -78,7 +78,7 @@
               v-model="chartInfo.Curve.LeftMin"
               @change="val => { chartInfo.Curve.LeftMin=Number(val);changeSplineOption() }"
             />
-            <span></span>
+            <span>{{$t('StatisticAnalysis.ChartRelevance.to')}}</span>
             <el-input
               style="flex:2;margin-left:5px;"
               :step="1"
@@ -88,7 +88,7 @@
             />
           </div>
           <div class="section-item">
-            <span style="flex-shrink:0;min-width:50px;">右轴:</span>
+            <span style="flex-shrink:0;min-width:50px;">{{$t('StatisticAnalysis.ChartRelevance.right_axis')}}:</span>
             <el-input
               style="flex:2;margin-left:5px;margin-right:10px"
               :step="1"
@@ -96,7 +96,7 @@
               v-model="chartInfo.Curve.RightMin"
               @change="val => { chartInfo.Curve.RightMin=Number(val);changeSplineOption() }"
             />
-            <span></span>
+            <span>{{$t('StatisticAnalysis.ChartRelevance.to')}}</span>
             <el-input
               style="flex:2;margin-left:5px;"
               :step="1"
@@ -106,8 +106,8 @@
             />
           </div>
           <div class="section-item">
-            <span style="flex-shrink:0;min-width:50px;">指标B:</span>
-            <el-checkbox v-model="chartInfo.Curve.IsOrder"  @change="getPreviewSplineChart">逆序</el-checkbox>
+            <span style="flex-shrink:0;min-width:50px;">{{$t('StatisticAnalysis.ChartRelevance.edbTagB')}}:</span>
+            <el-checkbox v-model="chartInfo.Curve.IsOrder"  @change="getPreviewSplineChart">{{$t('StatisticAnalysis.ChartRelevance.reverse_sequence')}}</el-checkbox>
           </div>
           <div class="section-item" style="align-items: flex-start;margin-left:50px;">
             <el-radio
@@ -115,15 +115,15 @@
               :label="true"
               style="margin-right:10px;"
               @change="getPreviewSplineChart"
-            >标准指标</el-radio>
+            >{{$t('StatisticAnalysis.ChartRelevance.standard_index')}}</el-radio>
             <div>
               <el-radio
                 v-model="chartInfo.Curve.EdbInfoType"
                 :label="false"
                 @change="getPreviewSplineChart"
-              >领先指标</el-radio>
+              >{{$t('StatisticAnalysis.ChartRelevance.leading_indicator')}}</el-radio>
               <div style="margin-top: 10px;" v-if="chartInfo.Curve.EdbInfoType===false">
-                领先
+                {{$t('StatisticAnalysis.ChartRelevance.lead_tag')}}
                 <el-input
                   style="width: 60px"
                   size="mini"
@@ -151,7 +151,7 @@
         </div>  
 
         <div class="section">
-          <div>相关性
+          <div>{{$t('Chart.ChartType.correlation_name')}}
             <!-- <el-tooltip
               effect="dark"
             >
@@ -211,7 +211,7 @@
 
 
       <div class="section" v-for="(item,index) in chartInfo.RollingCorrelation" :key="index">
-        <div>滚动相关性{{index+1}}
+        <div>{{$t('Chart.ChartType.rolling_correlation_name')}}{{index+1}}
           <!-- <el-tooltip
             effect="dark"
           >
@@ -415,6 +415,17 @@ export default {
     }
     next()
   },
+  computed:{
+    unitOpt(){
+      return [
+          {label:this.$t('Edb.FreAll.year_min'),val:'年'},
+          {label:this.$t('Edb.FreAll.quarter_min'),val:'季'},
+          {label:this.$t('Edb.FreAll.month_min'),val:'月'},
+          {label:this.$t('Edb.FreAll.week_min'),val:'周'},
+          {label:this.$t('Edb.FreAll.day_min'),val:'天'},
+      ]
+    }
+  },
   data() {
     return {
       chart_code: this.$route.query.code || '',
@@ -465,13 +476,13 @@ export default {
           }
         ]
       },
-      unitOpt:[
-          {label:'年',val:'年'},
-          {label:'季',val:'季'},
-          {label:'月',val:'月'},
-          {label:'周',val:'周'},
-          {label:'天',val:'天'},
-      ],
+      // unitOpt:[
+      //     {label:'年',val:'年'},
+      //     {label:'季',val:'季'},
+      //     {label:'月',val:'月'},
+      //     {label:'周',val:'周'},
+      //     {label:'天',val:'天'},
+      // ],
       operationType:'preview',
       chartRules: {
         EdbInfoIdA:[