浏览代码

统计分析-统计特征

jwyu 1 年之前
父节点
当前提交
271c7b916d

+ 4 - 1
src/lang/modules/StatisticAnalysis/IndexEn.js

@@ -1,11 +1,14 @@
 
 import { ChartRelevanceEn } from "./ChartRelevance";
 import { FittingEquationChartEn } from "./FittingEquationChart";
+import { StatisticFeatureChartEn } from "./statisticFeatureChart";
+
 
 export default {
   // 统计分析
   StatisticAnalysis: {
     ChartRelevance:ChartRelevanceEn,
-    FittingEquationChart:FittingEquationChartEn
+    FittingEquationChart:FittingEquationChartEn,
+    StatisticFeatureChart:StatisticFeatureChartEn
   },
 };

+ 3 - 1
src/lang/modules/StatisticAnalysis/IndexZh.js

@@ -1,11 +1,13 @@
 import { ChartRelevanceZh } from "./ChartRelevance";
 import { FittingEquationChartZh } from "./FittingEquationChart";
+import { StatisticFeatureChartZh } from "./statisticFeatureChart";
 
 
 export default {
     // 统计分析
     StatisticAnalysis: {
       ChartRelevance:ChartRelevanceZh,
-      FittingEquationChart:FittingEquationChartZh
+      FittingEquationChart:FittingEquationChartZh,
+      StatisticFeatureChart:StatisticFeatureChartZh
     },
   };

+ 37 - 0
src/lang/modules/StatisticAnalysis/StatisticFeatureChart.js

@@ -0,0 +1,37 @@
+/**
+ * 统计分析-统计特征
+ */
+
+/* 英文 */
+export const StatisticFeatureChartEn = {
+    limit_name:'up and dowm limited',
+    select_edb:'Select index',
+    standard_deviation:'Standard deviation',
+    rolling_period:'Rolling period',
+    percentile:'percentile',
+    time_length:'Length of time',
+    frequency_distribution:'Frequency distribution',
+    time_period:'Time period',
+    frequency_band_number:'Frequency band number',
+    near_month:'Last {num} months',
+    near_year:'Last {num} years',
+};
+  
+/* 中文 */
+export const StatisticFeatureChartZh = {
+    limit_name:'上下限',
+    select_edb:'选择指标',
+    standard_deviation:'标准差',
+    rolling_period:'滚动期数',
+    percentile:'百分位',
+    time_length:'时间长度',
+    frequency_distribution:'频率分布',
+    time_period:'时间段',
+    frequency_band_number:'频段数',
+    near_month:'最近{num}月',
+    near_year:'最近{num}年',
+};
+  
+/**
+* $t('StatisticAnalysis.StatisticFeatureChart.XXX')
+*/

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

@@ -48,6 +48,7 @@ export const fittingEquationListTextArrEn = [
     <p>3、and draw the curves of the elastic coefficient a, intercept b, and correlation coefficient R² within the selected time range respectively</p>`,
 ]
 
+// 统计特征
 export const statisticFeatureListTextArr = [
     `<p style='font-weight:bold;'>标准差处理逻辑:</p>
     <p>计算所选时间范围内数据的样本标准差s,s=sqrt(((x1-x)^2 (x2-x)^2 ......(xn-x)^2)/(n-1)),n表示数据个数</p>`,
@@ -59,6 +60,17 @@ export const statisticFeatureListTextArr = [
     <p>3、频率=落在某区间数据个数/所选时间段内数据总个数;</p>
     <p>4、累计频率为从最小值所在区间对应的频率开始累加;</p>`
 ]
+export const statisticFeatureListTextArrEn = [
+    `<p style='font-weight:bold;'>Standard Deviation Processing Logic:</p>
+    <p>Calculate the sample standard deviation s for the data within the selected time range, where s = sqrt(((x1-x)^2 + (x2-x)^2 + ... +(xn-x)^2)/(n-1)), and n represents the number of data points.</p>`,
+    `<p style='font-weight:bold;'>Percentile Processing Logic:</p>
+    <p>For the data within the selected time range, find the maximum value Max and minimum value Min, compute Max-Min, and calculate the percentile as (current value - Min) / (Max - Min). If Max=Min, do not compute.</p>`,
+    `<p style='font-weight:bold;'>频率分布处理逻辑:</p>
+    <p>1、在所选时间范围内,取最大值和最小值;</p>
+    <p>2、根据频段数划分多个间距相同的区间(左闭右开,最后一个区间为左闭右闭),统计数据值落在每个区间的数据个数;</p>
+    <p>3、频率=落在某区间数据个数/所选时间段内数据总个数;</p>
+    <p>4、累计频率为从最小值所在区间对应的频率开始累加;</p>`
+]
 
 //跨品种分析
 export const crossVarietyAnalisisTextArr = [

+ 1 - 1
src/views/chartRelevance_manage/components/selectTarget.vue

@@ -16,7 +16,7 @@
     </el-select>
 
     <div v-else-if="selectStyleType===2&&filter">
-      <label>选择指标:</label>
+      <label>{{$t('StatisticAnalysis.StatisticFeatureChart.select_edb')}}:</label>
       <el-radio-group v-model="targetType" @change="targetTypeChange">
         <el-radio  
           v-for="item in etaTypeOpt"

+ 41 - 30
src/views/chartRelevance_manage/statistic/statisticFeatureChartEditor.vue

@@ -9,10 +9,10 @@
     </span>
     <div class="left-cont" v-show="!isSlideLeft" id="left">
       <div class="left-top">
-        <el-button type="primary" plain @click="$router.back()">取消</el-button>
+        <el-button type="primary" plain @click="$router.back()">{{$t('Dialog.cancel_btn')}}</el-button>
         <div style="color:#409EFF;font-size: 16px;cursor: pointer;" @click="showExplain = true">
             <i class="el-icon-document" style="font-size:22px;"></i>
-            操作说明
+            {{$t('StatisticAnalysis.ChartRelevance.opt_tip_btn')}}
         </div>
       </div>
       <div class="left-min">
@@ -27,9 +27,9 @@
 				</div>
 
         <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: 110px;flex-shink:0;"
                 v-model="chartInfo.Curve.DateType"
@@ -55,7 +55,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.StatisticFeatureChart.limit_name')}}:</span>
             <el-input
               style="flex:2;margin-left:5px;margin-right:10px"
               :step="1"
@@ -63,7 +63,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"
@@ -75,7 +75,7 @@
         </div>
 
         <div class="section">
-          <div>标准差
+          <div>{{$t('StatisticAnalysis.StatisticFeatureChart.standard_deviation')}}
             <!-- <el-tooltip effect="dark" placement="right">
               <div
                 slot="content"
@@ -86,7 +86,7 @@
             </el-tooltip> -->
           </div>
           <div class="section-item">
-            <div>滚动期数:</div>
+            <div>{{$t('StatisticAnalysis.StatisticFeatureChart.rolling_period')}}:</div>
             <el-input
               style="max-width:100px;margin-left:10px"
               :step="1"
@@ -98,7 +98,7 @@
         </div>
 
         <div class="section">
-          <div>百分位
+          <div>{{$t('StatisticAnalysis.StatisticFeatureChart.percentile')}}
             <!-- <el-tooltip effect="dark" placement="right">
               <div
                 slot="content"
@@ -109,7 +109,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.StatisticFeatureChart.time_length')}}:</span>
             <el-input
               style="width:100px;margin-left:5px;margin-right:10px"
               :step="1"
@@ -133,7 +133,7 @@
         </div>
 
         <div class="section">
-          <div>频率分布
+          <div>{{$t('StatisticAnalysis.StatisticFeatureChart.frequency_distribution')}}
             <!-- <el-tooltip effect="dark" placement="right">
               <div
                 slot="content"
@@ -144,7 +144,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.StatisticFeatureChart.time_period')}}:</span>
             <el-select
                 style="max-width: 110px;flex-shink:0;"
                 v-model="chartInfo.FrequencyDistribution.DateType"
@@ -169,7 +169,7 @@
             />
           </div>
           <div class="section-item">
-            <span style="flex-shrink:0;min-width:70px">频段数</span>
+            <span style="flex-shrink:0;min-width:70px">{{$t('StatisticAnalysis.StatisticFeatureChart.frequency_band_number')}}</span>
             <el-select
                 style="max-width: 110px;flex-shink:0;"
                 v-model="chartInfo.FrequencyDistribution.FrequencyValue"
@@ -187,7 +187,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"
@@ -323,6 +323,17 @@ export default {
       };
     },
   },
+  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 || '',
@@ -332,18 +343,18 @@ export default {
 
       yearSelector: [
         ...yearSelector,
-        { name: '自定义',value: 5 }
+        { name: this.$i18n.locale == 'zh'?'自定义':'custom',value: 5 }
       ],
 
       frequencyDateOption: [
-        { name: '最近3月',value:1 },
-        { name: '最近6月',value:2 },
-        { name: '最近1年',value:3 },
-        { name: '最近2年',value:4 },
-        { name: '最近3年',value:5 },
-        { name: '最近5年',value:6 },
-        { name: '最近10年',value:7 },
-        { name: '自定义',value:8 },
+        { name: this.$t('StatisticAnalysis.StatisticFeatureChart.near_month',{num:3})/* '最近3月' */,value:1 },
+        { name: this.$t('StatisticAnalysis.StatisticFeatureChart.near_month',{num:6})/* '最近6月' */,value:2 },
+        { name: this.$t('StatisticAnalysis.StatisticFeatureChart.near_year',{num:1})/* '最近1年' */,value:3 },
+        { name: this.$t('StatisticAnalysis.StatisticFeatureChart.near_year',{num:2})/* '最近2年' */,value:4 },
+        { name: this.$t('StatisticAnalysis.StatisticFeatureChart.near_year',{num:3})/* '最近3年' */,value:5 },
+        { name: this.$t('StatisticAnalysis.StatisticFeatureChart.near_year',{num:5})/* '最近5年' */,value:6 },
+        { name: this.$t('StatisticAnalysis.StatisticFeatureChart.near_year',{num:10})/* '最近10年' */,value:7 },
+        { name: this.$i18n.locale == 'zh'?'自定义':'custom',value:8 },
       ],
       chartInfo: {
         MultipleGraphConfigId: 0,
@@ -371,13 +382,13 @@ export default {
           FrequencyValue: 10,
         }
       },
-      unitOpt:[
-        {label:'年',val:'年'},
-        {label:'季',val:'季'},
-        {label:'月',val:'月'},
-        {label:'周',val:'周'},
-        {label:'天',val:'天'},
-      ],
+      // unitOpt:[
+      //   {label:'年',val:'年'},
+      //   {label:'季',val:'季'},
+      //   {label:'月',val:'月'},
+      //   {label:'周',val:'周'},
+      //   {label:'天',val:'天'},
+      // ],
 
       buttonAuth: { //按钮控制
         isCurveChartAdd: false,

+ 15 - 15
src/views/chartRelevance_manage/statistic/statisticFeatureList.vue

@@ -12,20 +12,20 @@
       <div class="main-left left" id="left" v-show="!isSlideLeft">
 				<div class="datasheet_top">
 						<el-button v-permission="permissionBtn.statisticPermission.statisticFeature_addChart"
-							 type="primary" @click="goAddChart">添加图表</el-button>
+							 type="primary" @click="goAddChart">{{$t('StatisticAnalysis.ChartRelevance.chart_add_btn')}}</el-button>
 				</div>
 
 				<div class="search-cont">
 					<el-checkbox v-model="isShowMe"  
 						v-permission="permissionBtn.statisticPermission.statisticFeature_onlyMine"
-						@change="() => { getTreeData();getPublicList() }">只看我的</el-checkbox>
+						@change="() => { getTreeData();getPublicList() }">{{$t('StatisticAnalysis.ChartRelevance.only_see_mine')}}</el-checkbox>
 					<el-select
 						v-model="search_txt"
 						v-loadMore="searchLoad"
 						:filterable="!search_txt"
 						remote
 						clearable
-						placeholder="请输入图表名称"
+						:placeholder="$t('Chart.search_chart_placeholder')"
 						style="width: 100%; margin-top: 20px"
 						:remote-method="searchHandle"
 						@click.native="inputFocusHandle"
@@ -119,7 +119,7 @@
 							alt=""
 							style="width: 16px; height: 16px; margin-right: 10px"
 						/>
-						<span>添加图表分类</span>
+						<span>{{$t('StatisticAnalysis.ChartRelevance.add_chart_classify')}}</span>
 					</div>
 				</div>
 				<span
@@ -154,7 +154,7 @@
 											ref="chartRef"
 										/>
                   </div>
-                  <span class="chart-author">作者:{{ chartInfo.SysUserRealName}}</span>
+                  <span class="chart-author">{{$t('MsgPrompt.author')}}:{{ chartInfo.SysUserRealName}}</span>
                 </div>
 
                 <!-- 异常显示 -->
@@ -374,7 +374,7 @@ export default {
 
 		/* 添加一级目录 */
 		addLevelOneHandle() {
-			this.dialog_title = '添加图表分类';
+			this.dialog_title = this.$t('StatisticAnalysis.ChartRelevance.add_chart_classify')||'添加图表分类';
 			this.classifyForm = {
 				classify_name: '',
 			}
@@ -384,7 +384,7 @@ export default {
     /* 编辑节点 */
     editNode(node, { ChartClassifyName,ChartClassifyId }) {
 
-      this.dialog_title = '编辑图表分类';
+      this.dialog_title = this.$t('StatisticAnalysis.ChartRelevance.edit_chart_classify')||'编辑图表分类';
       /* 编辑目录 */
       this.classifyForm = {
         classify_name: ChartClassifyName,
@@ -401,14 +401,14 @@ export default {
 			const { DeleteStatus } = Data;
 
 			DeleteStatus === 1 
-			? this.$confirm('该分类下关联表图表不可删除', '删除失败', {
-				confirmButtonText: '知道了',
+			? this.$confirm(this.$t('Chart.OptMsg.classify_del_fail'), this.$t('Chart.OptMsg.del_fail_tag'), {
+				confirmButtonText: this.$t('MsgPrompt.known'),
 				showCancelButton: false,
 				type: 'error',
 			}) : DeleteStatus === 0
-			?  this.$confirm('确定删除当前分类吗?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
+			?  this.$confirm(this.$t('Chart.OptMsg.classify_del_confirm'), this.$t('Confirm.prompt'), {
+				// confirmButtonText: '确定',
+				// cancelButtonText: '取消',
 				type: 'warning',
 			}).then(() => {
 				this.delApi(ChartClassifyId,ChartInfoId)
@@ -506,9 +506,9 @@ export default {
 		/* 删除图表 */
 		delChartHandle() {
 			const { ChartClassifyId,ChartInfoId } = this.chartInfo;
-			this.$confirm('删除后该图表将不能再引用,确认删除吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+			this.$confirm(this.$t('Chart.OptMsg.chart_del_confirm'), this.$t('Confirm.prompt'), {
+        // confirmButtonText: '确定',
+        // cancelButtonText: '取消',
         type: 'warning',
       })
         .then(() => {