Browse Source

Merge branch 'ETA1.9.7'

jwyu 2 months ago
parent
commit
74a8f6356a

+ 19 - 0
src/api/intervalAnalysis.js

@@ -0,0 +1,19 @@
+import { get,post } from "./index";
+
+//区间分析
+export default{  
+  // 不含图表的所有目录
+  classifyListNoChart:params=>{
+    return get('/range_analysis/chart_classify/tree',params)
+  },
+
+  // 图表刷新
+  chartRefresh:params=>{
+    return get('/range_analysis/chart_info/refresh',params)
+  },
+  // 图表另存为
+  chartSaveOther:params=>{
+    return post('/range_analysis/chart_info/copy',params)
+  },
+  
+}

+ 3 - 3
src/hooks/chart/render.js

@@ -108,7 +108,7 @@ export function chartRender({data,renderId,lang='zh',changeLangIsCheck,showChart
     chartData.value=data
    /*  useSelfLimit = ['/myETA/chartdetail','/chartETA/chartdetail'].includes(window.location.pathname) */
    useSelfLimit = shouldUseSelfLimit
-    if([1,11].includes(data.ChartInfo.Source)){
+    if([1,11,12].includes(data.ChartInfo.Source)){
         const chartSetMap = {
             1: setSplineOpt,
             2: setSeasonOpt,
@@ -895,8 +895,8 @@ function setSplineOpt(e){
                 maxLimit = axisLimitState[`${limitMap[item.IsAxis][1]}`]||0
             }
         }
-        const textZh = item.ConvertUnit||item.Unit
-        const textEn = item.ConvertEnUnit||item.UnitEn||item.ConvertUnit||item.Unit
+        const textZh =e.ChartInfo.Source===12?item.ConvertUnit : item.ConvertUnit||item.Unit
+        const textEn =e.ChartInfo.Source===12?item.ConvertEnUnit : item.ConvertEnUnit||item.UnitEn||item.ConvertUnit||item.Unit
         let yItem={
             ...basicYAxis,
             IsAxis:item.IsAxis,

+ 5 - 2
src/views/myETA/ChartDetail.vue

@@ -10,6 +10,7 @@ import apiCrossVarietyChart from '@/api/crossVarietyChart'
 import apiMyETAChart from '@/api/myETA'
 import apiDataEDB from '@/api/dataEDB'
 import apiSheet from '@/api/sheet'
+import apiIntervalAnalysis from '@/api/intervalAnalysis'
 import { useRoute, useRouter } from 'vue-router'
 import {useChartRender} from '@/hooks/chart/render'
 import {yearSelectOpt,sameOptionType} from '@/hooks/chart/config'
@@ -141,7 +142,7 @@ async function getChartInfo(){
         temEndTime.value=chartState.endTime.split('-')
     }
     //仅ETA图库图表需要初始化上下限
-    if(res.Data.ChartInfo.Source===1&&![7,10,11].includes(res.Data.ChartInfo.ChartType)){
+    if(res.Data.ChartInfo.Source===1&&![7,10,11,12].includes(res.Data.ChartInfo.ChartType)){
         isUseSelfLimit.value = true
         setLimitData(res.Data)
     }else{
@@ -562,6 +563,8 @@ async function handleChartRefresh(){
         res=await apiCrossVarietyChart.refreshChart({ ChartInfoId })
     }else if(Source===11){
         res=await apiSheet.sheetRefresh({ChartInfoId})
+    }else if(Source===12){
+        res=await apiIntervalAnalysis.chartRefresh({ChartInfoId})
     }
     if(res.Ret!==200)return
     showToast('刷新成功')
@@ -801,7 +804,7 @@ const isShowAddToMyETADialog=ref(false)
                     >{{chartState.startTime?chartState.startTime+'~'+(chartState.endTime?chartState.endTime:'至今'):'请选择时间段'}}</span>
                 </div>
                 <div class="right-action-box">
-                    <div class="item" @click="handleShowAxisLimitOpt" v-if="[1,2,5,10].includes(chartInfo.Source)&&checkAuthBtn(myETABtn.myChart_editLimit)">
+                    <div class="item" @click="handleShowAxisLimitOpt" v-if="[1,2,5,10,12].includes(chartInfo.Source)&&checkAuthBtn(myETABtn.myChart_editLimit)">
                         <img src="@/assets/imgs/myETA/icon_limit2.png" alt="">
                         <span>上下限设置</span>
                     </div>

+ 6 - 1
src/views/myETA/components/ChartSaveOther.vue

@@ -6,6 +6,7 @@ import apiFuture from '@/api/futureChart'
 import apiLineEquationChart from '@/api/lineEquationChart'
 import apiStatisticFeatureChart from '@/api/statisticFeatureChart'
 import apiCrossVarietyChart from '@/api/crossVarietyChart'
+import apiIntervalAnalysis from '@/api/intervalAnalysis'
 import { showToast } from 'vant'
 import { useWindowSize } from '@vueuse/core'
 
@@ -54,6 +55,8 @@ async function getOpts(){
         res=await apiLineEquationChart.chartClassifyList({})
     }else if([7,8,9].includes(props.source)){
         res=await apiStatisticFeatureChart.chartClassifyList({})
+    }else if(props.source==12){
+        res=await apiIntervalAnalysis.classifyListNoChart()
     }else{
         res=await apiETAChart.ETAChartClassifyList({})
     }
@@ -115,6 +118,8 @@ async function handleConfirmSave(){
         res=await apiStatisticFeatureChart.chartSaveOther(params)
     }else if(props.source===10){
         res=await apiCrossVarietyChart.saveOtherChart(params)
+    }else if(props.source===12){
+        res=await apiIntervalAnalysis.chartSaveOther(params)
     }else{
         res=await apiETAChart.ETAChartSaveOther(params)
     }
@@ -138,7 +143,7 @@ async function handleConfirmSave(){
                 <div class="title">另存为</div>
             </div>
             <div class="content">
-                <template v-if="[2,3,5,6,7,8,9].includes(source)">
+                <template v-if="[2,3,5,6,7,8,9,12].includes(source)">
                     <ul class="list-box">
                         <li 
                             :class="['item',activeIds==item.ChartClassifyId?'active':'']"