Karsa 1 year ago
parent
commit
86e433608d
1 changed files with 21 additions and 20 deletions
  1. 21 20
      src/views/mychart_manage/components/chooseChart.vue

+ 21 - 20
src/views/mychart_manage/components/chooseChart.vue

@@ -36,6 +36,7 @@
 						<el-radio :label="3">相关性图表</el-radio>
 						<el-radio :label="3">相关性图表</el-radio>
 						<el-radio :label="6">拟合方程曲线</el-radio>
 						<el-radio :label="6">拟合方程曲线</el-radio>
 						<el-radio :label="7">统计特征</el-radio>
 						<el-radio :label="7">统计特征</el-radio>
+						<el-radio :label="10">跨品种分析</el-radio>
 					</el-radio-group>
 					</el-radio-group>
           <el-checkbox v-model="isShowMe"  @change="searchHandle">只看我的</el-checkbox>
           <el-checkbox v-model="isShowMe"  @change="searchHandle">只看我的</el-checkbox>
         </div>
         </div>
@@ -96,7 +97,7 @@
 import { mychartInterface } from '@/api/api.js';
 import { mychartInterface } from '@/api/api.js';
 import addMyClassifyDia from '@/views/dataEntry_manage/components/addMyClassifyDia';
 import addMyClassifyDia from '@/views/dataEntry_manage/components/addMyClassifyDia';
 import chartRelevanceApi from '@/api/modules/chartRelevanceApi';
 import chartRelevanceApi from '@/api/modules/chartRelevanceApi';
-import { fittingEquationInterface,statisticFeatureInterface } from '@/api/modules/chartRelevanceApi';
+import { fittingEquationInterface,statisticFeatureInterface,crossVarietyInterface } from '@/api/modules/chartRelevanceApi';
 import futuresInterface from '@/api/modules/futuresBaseApi';
 import futuresInterface from '@/api/modules/futuresBaseApi';
 export default {
 export default {
   components: {
   components: {
@@ -140,26 +141,26 @@ export default {
         KeyWord: this.search_txt,
         KeyWord: this.search_txt,
         IsShowMe: this.isShowMe
         IsShowMe: this.isShowMe
       };
       };
-      let res=null 
-      if(this.chart_source===1){
-        res=await mychartInterface.publicList(params)
-      }else if(this.chart_source===2){
-				res=await futuresInterface.searchChart(params)
-			}else if(this.chart_source===3){
-        res=await chartRelevanceApi.getChartList(params)
-      }else if(this.chart_source===6) {
-        res=await fittingEquationInterface.getChartList(params)
-      }else if(this.chart_source===7) {
-        res=await statisticFeatureInterface.getChartList(params)
+
+      const apiMap = {
+        1: mychartInterface.publicList,
+        2: futuresInterface.searchChart,
+        3: chartRelevanceApi.getChartList,
+        6: fittingEquationInterface.getChartList,
+        7: statisticFeatureInterface.getChartList,
+        10: crossVarietyInterface.searchChart,
       }
       }
-        if (res.Ret !== 200) return;
-        this.haveMove = res.Data ? this.page_no < res.Data.Paging.Pages : false;
-        this.chartPublicList = res.Data
-          ? this.page_no === 1
-            ? res.Data.List
-            : [...this.chartPublicList, ...res.Data.List]
-          : [];
-        this.haveData = this.chartPublicList.length ? true : false;
+      let res = await apiMap[this.chart_source](params)
+
+
+      if (res.Ret !== 200) return;
+      this.haveMove = res.Data ? this.page_no < res.Data.Paging.Pages : false;
+      this.chartPublicList = res.Data
+        ? this.page_no === 1
+          ? res.Data.List
+          : [...this.chartPublicList, ...res.Data.List]
+        : [];
+      this.haveData = this.chartPublicList.length ? true : false;
       
       
     },
     },