jwyu 10 месяцев назад
Родитель
Сommit
4ebdf920ff

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

@@ -129,4 +129,21 @@ export const crossVarietyAnalisisTextArrEn = [
     <p>(4) Y-axis Coordinate: Choose a tag.</p>
     <p>(5) Chart Name: Concatenation of X-axis and Y-axis coordinates tags.</p>`
 
+]
+
+//区间分析
+export const rangeAnalysisChart = [
+    `<p>配置目的:根据系统日期或者指标日期,设置一个动态更新的起始时间。比如指标日期的一个月前,这个“一个月前”会随着指标日期的更新而动态更新。</p>
+    <p>配置方法:1、选择基准日期。默认选则指标日期(会跟随指标的更新而更新),也可选系统日期。在选择指标日期的前提下,可进行期数前移,假设前移1期,则选择指标上一期的日期。</p>
+    <p>2、根据基准日期,可进行日期变换。变换方式有日期位移和指定频率两种,可自由组合。默认给出-1月日期平移,意味着选中一个月前的日期。</p>
+    <p>配置示例:把起始日期设置在指标日期所在月份的第一天。基准日期选则指标日期,日期变换先删除默认的日期位移,再添加指定频率为本月第一天。</p>
+    `
+]
+
+export const rangeAnalysisChartEn = [
+    `<p>Purpose: To set a dynamically updating start time based on the system date or the date of the indicator. For example, one month before the date of the indicator, this "one month before" will dynamically update as the indicator date is updated.</p>
+    <p>Method: 1. Select the base date. By default, the date of the indicator is selected (which will be updated as the indicator is updated), or the system date can be chosen. On the premise of selecting the date of the indicator, you can move the period forward. Assuming a forward shift of one period, the date of the previous period of the indicator is selected.</p>
+    <p>2.Based on the base date, date transformations can be performed. There are two transformation methods: date displacement and specified frequency, which can be freely combined. The default is to give a -1 month date shift, which means selecting the date one month before</p>
+    <p>Example: Set the start date to the first day of the month where the date of the indicator is located. The base date is selected as the date of the indicator. For date transformation, first remove the default date displacement, and then add a specified frequency as the first day of this month.</p>
+    `
 ]

+ 30 - 17
src/views/intervalAnalysis/addChart.vue

@@ -17,13 +17,15 @@
             $t("Dialog.cancel_btn")
           }}</el-button>
         </div>
-        <div
-          style="color: #409eff; font-size: 16px; cursor: pointer"
-          @click="showExplain = true"
-        >
-          <i class="el-icon-document" style="font-size: 22px"></i>
+        <!-- 操作说明 -->
+        <span @click="showExplain = true" style="color:#0052d9">
+          <img
+            style="width: 15px; height: 15px;position: relative;top:3px"
+            src="~@/assets/img/icons/formula-add.png"
+            alt=""
+          />
           {{ $t("StatisticAnalysis.ChartRelevance.opt_tip_btn") }}
-        </div>
+        </span>
       </div>
       <div class="left-content">
         <div class="type-box">
@@ -293,6 +295,13 @@
       source="interval_analysis"
       :data="chartInfo"
     />
+
+    <!-- 操作说明 -->
+    <ExplainDialog 
+      :show-explain="showExplain"
+      :textArrName="'rangeAnalysisChart'"
+      @close="showExplain = false"
+    />
   </div>
 </template>
 
@@ -310,6 +319,7 @@ import chartSetWrap from './components/chartSetWrap.vue'
 import batchSelectEdb from './components/batchSelectEdb.vue';
 import SaveChartOther from '@/views/dataEntry_manage/components/SaveChartOther';
 import saveMultipleEdb from './components/saveMultipleEdb.vue';
+import ExplainDialog from '@/views/chartRelevance_manage/components/explainDialog.vue'
 export default {
   components: {
     edbComputedWrap,
@@ -321,7 +331,8 @@ export default {
     chartSetWrap,
     batchSelectEdb,
     SaveChartOther,
-    saveMultipleEdb
+    saveMultipleEdb,
+    ExplainDialog
   },
   directives: {
     drag(el, bindings) {
@@ -349,7 +360,7 @@ export default {
       };
     },
   },
-  mixins: [chartSetMixin,addOrEditMixn],
+  mixins: [chartSetMixin, addOrEditMixn],
   computed: {
     roleName() {
       return localStorage.getItem('userName');
@@ -375,6 +386,8 @@ export default {
       showBatchSelectEdb: false,//显示多指标选择
 
       isShowSaveOther: false,//另存为
+
+      showExplain:false
     }
   },
   methods: {
@@ -401,16 +414,16 @@ export default {
     // 图表设置成功回调
     handleChartSetChange(e) {
       this.chartInfo.ChartThemeStyle = e.ChartThemeStyle
-      this.chartInfo.ChartThemeId=e.formData.themeId
-      let sourceObj=this.chartInfo.SourcesFrom?JSON.parse(this.chartInfo.SourcesFrom):''
-      if(sourceObj){
-        sourceObj={
+      this.chartInfo.ChartThemeId = e.formData.themeId
+      let sourceObj = this.chartInfo.SourcesFrom ? JSON.parse(this.chartInfo.SourcesFrom) : ''
+      if (sourceObj) {
+        sourceObj = {
           ...sourceObj,
-          isShow:e.formData.showSource,
-          text:e.formData.source
+          isShow: e.formData.showSource,
+          text: e.formData.source
         }
       }
-      this.chartInfo.SourcesFrom=JSON.stringify(sourceObj)
+      this.chartInfo.SourcesFrom = JSON.stringify(sourceObj)
       this.tableData = e.edbList
       this.$refs.edbComputedWrap.updateEdbListData(e.edbList)
       // 重新渲染图表
@@ -459,8 +472,8 @@ export default {
         Right2Min: rightTwoMin + '',
         Right2Max: rightTwoMax + '',
         MinMaxSave: Number(!this.getLimitInfo()),
-        ChartThemeId:this.chartInfo.ChartThemeId,
-        SourcesFrom:this.chartInfo.SourcesFrom
+        ChartThemeId: this.chartInfo.ChartThemeId,
+        SourcesFrom: this.chartInfo.SourcesFrom
 
       }
       apiIntervalAnalysis.chartEdit(params).then(res => {