소스 검색

update views/chart

reghao 7 달 전
부모
커밋
7ce11732fc
3개의 변경된 파일17개의 추가작업 그리고 16개의 파일을 삭제
  1. 8 8
      src/router/chart.js
  2. 5 5
      src/views/chart/ChartIndex.vue
  3. 4 3
      src/views/chart/LineChart.vue

+ 8 - 8
src/router/chart.js

@@ -16,24 +16,24 @@ export default {
       component: LineChart,
       meta: { needAuth: false }
     },
-    {
-      path: '/chart/heatmap',
-      name: '热力图',
-      component: HeatMap,
-      meta: { needAuth: false }
-    },
     {
       path: '/chart/line',
-      name: '折线图',
+      name: 'LineChart',
       component: LineChart,
       meta: { needAuth: false }
     },
     {
       path: '/chart/pie',
-      name: '饼图',
+      name: 'PieChart',
       component: PieChart,
       meta: { needAuth: false }
     },
+    {
+      path: '/chart/heatmap',
+      name: 'HeatMap',
+      component: HeatMap,
+      meta: { needAuth: false }
+    },
     {
       path: '/chart/timeline',
       name: 'Timeline',

+ 5 - 5
src/views/chart/ChartIndex.vue

@@ -17,10 +17,6 @@
           router
           mode="horizontal"
         >
-          <el-menu-item index="/chart/heatmap">
-            <i class="el-icon-map-location" />
-            <span slot="title">热力图</span>
-          </el-menu-item>
           <el-menu-item index="/chart/line">
             <i class="el-icon-map-location" />
             <span slot="title">折线图</span>
@@ -29,9 +25,13 @@
             <i class="el-icon-map-location" />
             <span slot="title">饼图</span>
           </el-menu-item>
+          <el-menu-item index="/chart/heatmap">
+            <i class="el-icon-map-location" />
+            <span slot="title">热力图</span>
+          </el-menu-item>
           <el-menu-item index="/chart/timeline">
             <i class="el-icon-map-location" />
-            <span slot="title">Timeline</span>
+            <span slot="title">时间轴</span>
           </el-menu-item>
         </el-menu>
       </el-col>

+ 4 - 3
src/views/chart/LineChart.vue

@@ -158,7 +158,8 @@ export default {
           } else if (intValue === 3) {
             this.drawImg4()
           } else {
-            this.drawChart6()
+            this.drawLineChart1()
+            // this.drawLineChart2()
           }
 
           const myChart = this.$echarts.init(document.getElementById('chart4'))
@@ -264,7 +265,7 @@ export default {
         }]
       }
     },
-    drawChart5() {
+    drawLineChart1() {
       this.chartOption = {
         title: {
           text: '卡拉云新用户激活数据',
@@ -344,7 +345,7 @@ export default {
         color: ['#3366CC', '#FFCC99', '#99CC33'] // 三个折线的颜色
       }
     },
-    drawChart6() {
+    drawLineChart2() {
       getLineChartData().then(resp => {
         if (resp.code === 0) {
           const data = resp.data