Browse Source

区间分析-我的图库

jwyu 10 months ago
parent
commit
36c4ea40d9

+ 2 - 2
src/views/dataEntry_manage/components/SaveChartOther.vue

@@ -123,7 +123,7 @@ export default {
         res=await statisticFeatureInterface.classifyList()
       }else if([10,'cross_variety'].includes(this.source)) { //跨品种分析
         res = await crossVarietyInterface.classifyList();
-      }else if(['interval_analysis'].includes(this.source)){//区间分析
+      }else if([12,'interval_analysis'].includes(this.source)){//区间分析
         res=await apiIntervalAnalysis.classifyListNoChart()
       }else{
         res=await dataBaseInterface.chartClassify();
@@ -141,7 +141,7 @@ export default {
         this.filterNodes(res.Data.AllNodes,1)
       }else if([10,'cross_variety'].includes(this.source)) { //
         this.filterNodes(res.Data.AllNodes,1)
-      }else if(['interval_analysis'].includes(this.source)){//区间分析
+      }else if([12,'interval_analysis'].includes(this.source)){//区间分析
         this.filterNodesAll(res.Data.AllNodes)
       }else{
         this.filterNodes(res.Data.AllNodes,3)

+ 37 - 10
src/views/intervalAnalysis/addChart.vue

@@ -136,12 +136,12 @@
         </div>
         <div class="cont-bottom">
           <div class="chart-show-cont" v-show="options.series">
-            <div class="chartWrapper" id="chartWrapper">
-              <!-- :style="`
+            <div class="chartWrapper" id="chartWrapper" :style="`
 									textAlign:${JSON.parse(chartInfo.ChartThemeStyle).titleOptions.align};
 									fontSize:${JSON.parse(chartInfo.ChartThemeStyle).titleOptions.style.fontSize}px;
 									color:${JSON.parse(chartInfo.ChartThemeStyle).titleOptions.style.color}
-								`" -->
+								`">
+              
               <h2 class="chart-title" v-show="chartInfo.ChartName || chartName">
                 {{ chartInfo.ChartName || chartName }}
               </h2>
@@ -206,7 +206,7 @@
               </template>
             </div>
 
-            <div class="chart-bottom-insruction-info" v-if="false">
+            <div class="chart-bottom-insruction-info">
               <div class="chart-source">
                 <span
                   v-if="chartInfo.SourcesFrom"
@@ -539,15 +539,22 @@ 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 = {
-          ...sourceObj,
-          isShow: e.formData.showSource,
-          text: e.formData.source
+      let SourcesFrom = this.chartInfo.SourcesFrom ? JSON.parse(this.chartInfo.SourcesFrom) : ''
+      
+      let sourceObj = {
+        isShow: e.formData.showSource,
+        text: e.formData.source
+      }
+      if(SourcesFrom){
+        sourceObj={
+          ...SourcesFrom,
+          ...sourceObj
         }
       }
+      console.log(sourceObj,this.chartInfo);
       this.chartInfo.SourcesFrom = JSON.stringify(sourceObj)
+      console.log(this.chartInfo);
+      this.chartInfo.MinMaxSave=Number(!this.getLimitInfo())
       this.tableData = e.edbList
       this.$refs.edbComputedWrap.updateEdbListData(e.edbList)
       // 重新渲染图表
@@ -612,6 +619,9 @@ export default {
     // 新增图
     handleSaveChart(e) {
       const edbParams = this.$refs.edbComputedWrap.getParams()
+      const {
+        min, max, rightMin, rightMax, rightTwoMin, rightTwoMax
+      } = this.chartLimit
       const params = {
         ChartEdbInfoList: edbParams.ChartEdbInfoList,
         ExtraConfig: JSON.stringify(edbParams.ExtraConfig),
@@ -619,6 +629,20 @@ export default {
         ChartName: e.name,
         ChartType: 1,
         DateType: this.year_select,
+        StartDate: [5, 6].includes(this.year_select)
+          ? this.select_date[0]
+          : '',
+        EndDate: this.year_select === 5 ? this.select_date[1] : '',
+        StartYear: this.count_year || 0,
+        LeftMin: min + '',
+        LeftMax: max + '',
+        RightMin: rightMin + '',
+        RightMax: rightMax + '',
+        Right2Min: rightTwoMin + '',
+        Right2Max: rightTwoMax + '',
+        MinMaxSave: Number(!this.getLimitInfo()),
+        ChartThemeId: this.chartInfo.ChartThemeId,
+        SourcesFrom: this.chartInfo.SourcesFrom
       }
       apiIntervalAnalysis.chartAdd(params).then(res => {
         if (res.Ret === 200) {
@@ -771,6 +795,9 @@ export default {
           this.initEditData(res.Data)
           this.tableData=res.Data.EdbInfoList
           this.chartInfo=res.Data.ChartInfo
+          this.MultipleGraphConfigId=res.Data.DataResp.MultipleGraphConfigId
+          this.hasSaveEdbFlag=res.Data.DataResp.ConfigEdbNum>0
+
           this.setDefaultDateSelect()
           
           this.initIntervalAnalysisChartData(res.Data)

+ 11 - 2
src/views/mychart_manage/components/chartDetailDia.vue

@@ -225,7 +225,7 @@
                 <template v-if="!chartInfo.WarnMsg">
                   <Chart :options="options" :chartInfo="chartInfo" ref="chartRef"/>
                   <!-- 上下限 -->
-                  <template v-if="chartInfo.Source===1&&![7,10,11].includes(chartInfo.ChartType)">
+                  <template v-if="(chartInfo.Source===1&&![7,10,11].includes(chartInfo.ChartType))||(chartInfo.Source===12)">
                       <div class="range-cont left" v-if="leftIndex !== -1">
                           <el-input
                               style="width: 60px; display: block"
@@ -486,6 +486,7 @@
 </template>
 
 <script>
+import apiIntervalAnalysis from '@/api/modules/intervalAnalysis'
 import * as sheetInterface from "@/api/modules/sheetApi.js";
 import { dataBaseInterface,mychartInterface } from '@/api/api.js';
 import futuresInterface from '@/api/modules/futuresBaseApi';
@@ -644,7 +645,7 @@ export default {
 
           if(!this.chartInfo.HaveOperaAuth) return
 
-          if([1,11].includes(this.chartInfo.Source)) {
+          if([1,11,12].includes(this.chartInfo.Source)) {
             //处理下历史默认来源
             this.setDefaultSourceFrom();
             //季节性图处理SeasonAverageConfig,SeasonRightEdbConfig
@@ -671,6 +672,9 @@ export default {
             // 截面组合图
 					  this.chartInfo.ChartType===14&&this.initSectionalCombinationChart(res.Data);
 
+            // 区间分析
+            this.chartInfo.ChartType===1&&this.initIntervalAnalysisChartData(res.Data)
+
           }else if([2,5].includes(this.chartInfo.Source)) {
             // this.tableData = [res.Data.EdbInfoList[0]];
             this.tableData=res.Data.EdbInfoList.filter(_e=>_e.Source)
@@ -907,6 +911,8 @@ export default {
         res=await crossVarietyInterface.refreshChart({ ChartInfoId })
       }else if(Source===11){
         res=await sheetInterface.refreshCustomSheet({ChartInfoId});
+      }else if(Source===12){
+        res=await apiIntervalAnalysis.chartRefresh({ChartInfoId})
       }
      
         this.refreshLoading = false;
@@ -1368,6 +1374,8 @@ export default {
         path='/statisticFeatureChartEditor'
       }else if(this.chartInfo.Source===10) {
         path='/crossVarietyChartEditor'
+      }else if(this.chartInfo.Source===12){
+        path='/rangeAnalysisChartEditor'
       }
 
 
@@ -1377,6 +1385,7 @@ export default {
           code: this.chartInfo.UniqueCode,
           from: 'mychart',
           type,
+          id:this.chartInfo.ChartInfoId
         }
       })
       window.open(href,'_blank');