Browse Source

统计分析-相关性分析

jwyu 1 year ago
parent
commit
105ceb66fd

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

@@ -24,6 +24,14 @@ export const ChartRelevanceEn = {
     standard_index:'Standard index',
     leading_indicator:'Leading indicator',
     lead_tag:'lead',
+
+    calculation_window:'Calculation window',
+    B_leads_A:'B leads A',
+    analysis_cycle:'Analysis cycle',
+    update_edb:'Update indicator',
+    save_other:'Indicator Save as',
+    save_edb:'Save indicator',
+    update_edb:'update'
 };
   
 /* 中文 */
@@ -49,6 +57,14 @@ export const ChartRelevanceZh = {
     leading_indicator:'领先指标',
     lead_tag:'领先',
 
+    calculation_window:'计算窗口',
+    B_leads_A:'B领先A',
+    analysis_cycle:'分析周期',
+    update_edb:'更新指标',
+    save_other:'指标另存为',
+    save_edb:'保存指标',
+    update_edb:'更新'
+
 };
   
 /**

+ 13 - 12
src/utils/defaultOptions.js

@@ -1,3 +1,4 @@
+import bus from "@/api/bus";
 export const defaultOpts = {
 	//图表配置
 	chart: {
@@ -219,27 +220,27 @@ export const copyOtherOptions = {
 /* 图表年份筛选框 */
 export const yearSelector = [
 	{
-		name: '15年至今',
+		name: bus.$i18nt?bus.$i18nt.t('Chart.since_onefive'):'15年至今',//'15年至今'
 		value: 3,
 	},
-	// {
-	// 	name: '18年至今',
-	// 	value: 7,
-	// },
-	// {
-	// 	name: '19年至今',
-	// 	value: 8,
-	// },
+	// // {
+	// // 	name: '18年至今',
+	// // 	value: 7,
+	// // },
+	// // {
+	// // 	name: '19年至今',
+	// // 	value: 8,
+	// // },
 	{
-		name: '20年至今',
+		name: bus.$i18nt?bus.$i18nt.t('Chart.since_twozero'):'20年至今',//'20年至今'
 		value: 9,
 	},
 	{
-		name: '21年至今',
+		name: bus.$i18nt?bus.$i18nt.t('Chart.since_twoone'):'21年至今',//'21年至今'
 		value: 4,
 	},
 	{
-		name: '22年至今',
+		name: bus.$i18nt?bus.$i18nt.t('Chart.since_twotwo'):'22年至今',//'22年至今'
 		value: 11,
 	},
 ]

+ 6 - 6
src/views/chartRelevance_manage/components/chartCard.vue

@@ -13,12 +13,12 @@
             @click="updateEdbHandle(entryType)" 
             @command="edbCommandHandle"
           >
-            更新指标
+            {{$t('StatisticAnalysis.ChartRelevance.update_edb')}}
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item :command="{entryType,scence:'saveOther'}">指标另存为</el-dropdown-item>
+              <el-dropdown-item :command="{entryType,scence:'saveOther'}">{{$t('StatisticAnalysis.ChartRelevance.save_other')}}</el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
-          <el-button type="primary" v-show="!isEdbAdd" @click="saveEdb(entryType)">保存指标</el-button>
+          <el-button type="primary" v-show="!isEdbAdd" @click="saveEdb(entryType)">{{$t('StatisticAnalysis.ChartRelevance.save_edb')}}</el-button>
         </template>
 
         <el-dropdown 
@@ -28,12 +28,12 @@
           @click="updateChartHandle(entryType)" 
           @command="chartCommandHandle"
         >
-          更新
+          {{$t('StatisticAnalysis.ChartRelevance.update_edb')}}
           <el-dropdown-menu slot="dropdown" v-show="isHaveSaveOtherHandle">
-            <el-dropdown-item :command="{entryType,scence:'saveOther'}">另存为</el-dropdown-item>
+            <el-dropdown-item :command="{entryType,scence:'saveOther'}">{{$t('Table.save_as')}}</el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
-        <el-button type="primary" @click="saveChart(entryType)" v-show="!isChartAdd">保存</el-button>
+        <el-button type="primary" @click="saveChart(entryType)" v-show="!isChartAdd">{{$t('Dialog.confirm_save_btn')}}</el-button>
 
       </div>
     </div>

+ 15 - 10
src/views/chartRelevance_manage/relevance/relevanceChartEditor.vue

@@ -164,7 +164,7 @@
             </el-tooltip> -->
           </div>
           <div class="section-item">
-            <div style="flex-shrink:0;min-width:70px"><span style="color:red;font-size:18px;">*</span>计算窗口</div>
+            <div style="flex-shrink:0;min-width:70px"><span style="color:red;font-size:18px;">*</span>{{$t('StatisticAnalysis.ChartRelevance.calculation_window')}}</div>
             <el-input
               style="flex:2;margin-left:5px;margin-right:10px"
               :step="1"
@@ -186,7 +186,7 @@
             </el-select>
           </div>
           <div class="section-item">
-            <div style="flex-shrink:0;min-width:70px"><span style="color:red;font-size:18px;">*</span>分析周期</div>
+            <div style="flex-shrink:0;min-width:70px"><span style="color:red;font-size:18px;">*</span>{{$t('StatisticAnalysis.ChartRelevance.analysis_cycle')}}</div>
             <el-input
               style="flex:2;margin-left:5px;margin-right:10px"
               :step="1"
@@ -224,7 +224,7 @@
           </el-tooltip> -->
         </div>
         <div class="section-item">
-          <span style="flex-shrink:0;min-width:70px">计算窗口</span>
+          <span style="flex-shrink:0;min-width:70px">{{$t('StatisticAnalysis.ChartRelevance.calculation_window')}}</span>
           <el-input
             style="flex:2;margin-left:5px;margin-right:10px"
             :step="1"
@@ -246,7 +246,7 @@
           </el-select>
         </div>
         <div class="section-item">
-          <span style="flex-shrink:0;min-width:70px">B领先A</span>
+          <span style="flex-shrink:0;min-width:70px">{{$t('StatisticAnalysis.ChartRelevance.B_leads_A')}}</span>
           <el-input
             style="flex:2;margin-left:5px;margin-right:10px"
             :step="1"
@@ -269,7 +269,7 @@
         </div>
       </div>
 
-        <el-button type="primary" style="float:right" @click="handlePreviewChart">确定</el-button>
+        <el-button type="primary" style="float:right" @click="handlePreviewChart">{{$t('Dialog.confirm_btn')}}</el-button>
       </div>
       <span
         class="move-btn resize"
@@ -424,6 +424,12 @@ export default {
           {label:this.$t('Edb.FreAll.week_min'),val:'周'},
           {label:this.$t('Edb.FreAll.day_min'),val:'天'},
       ]
+    },
+    yearSelector(){
+      return [
+        ...yearSelector,
+        { name: this.$i18n.locale == 'zh'?'自定义':'custom',value: 5 }
+      ]
     }
   },
   data() {
@@ -432,11 +438,10 @@ export default {
       isSlideLeft: false,
       chartInfoData: {},
       chartBatchData:null,
-
-      yearSelector: [
-        ...yearSelector,
-        { name: '自定义',value: 5 }
-      ],
+      // yearSelector: [
+      //   ...yearSelector,
+      //   { name: '自定义',value: 5 }
+      // ],
       chartInfo: {
         MultipleGraphConfigId: 0,
         EdbInfoIdA: 0,