qinhouyu hace 1 año
padre
commit
c51bc4cbf7
Se han modificado 1 ficheros con 10 adiciones y 10 borrados
  1. 10 10
      songhua-ui/src/views/index/index.vue

+ 10 - 10
songhua-ui/src/views/index/index.vue

@@ -242,7 +242,7 @@
 <script>
 
 import * as echarts from 'echarts'
-import {getMap} from "@/api/ship/diqiu";
+import {getMap, getMapPromise} from "@/api/ship/diqiu";
 import {getShipRoute} from "@/api/ship/shipMapping";
 
 
@@ -316,7 +316,7 @@ export default {
          }
        }
        if (str==='景区近一年销售趋势排行榜TOP5'){
-
+         this.chartRankOneSaleGet()
        }
       if (str==='景区近一个月游客排行榜TOP5'){
         if (i===0){
@@ -583,7 +583,7 @@ export default {
       let myChart = this.$echarts.init(document.getElementById("chartRankOnePark"));
       myChart.setOption(option);
     },
-    chartRankOneSaleGet(xData,yData) {
+    chartRankOneSaleGet() {
       let option = {
         tooltip: {
           trigger: 'axis'
@@ -607,31 +607,31 @@ export default {
             name: '景区1',
             type: 'line',
             stack: 'Total',
-            data: [120, 132, 101, 134, 90, 230, 210]
+            data: Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000))
           },
           {
             name: '景区2',
             type: 'line',
             stack: 'Total',
-            data: [220, 182, 191, 234, 290, 330, 310]
+            data: Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000))
           },
           {
             name: '景区3',
             type: 'line',
             stack: 'Total',
-            data: [150, 232, 201, 154, 190, 330, 410]
+            data: Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000))
           },
           {
             name: '景区4',
             type: 'line',
             stack: 'Total',
-            data: [320, 332, 301, 334, 390, 330, 320]
+            data: Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000))
           },
           {
             name: '景区5',
             type: 'line',
             stack: 'Total',
-            data: [820, 932, 901, 934, 1290, 1330, 1320]
+            data: Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000))
           }
         ]
       };
@@ -999,8 +999,8 @@ export default {
       let myChart = this.$echarts.init(document.getElementById("chartRankOneMb"));
       myChart.setOption(option);
     },
-    getMapByPerson() {
-      let option = getMap();
+    async getMapByPerson() {
+      let option = await getMapPromise();
       let myChart = this.$echarts.init(document.getElementById("mapByPerson"));
       myChart.setOption(option);
     },