whycwx
2021-07-30 b9adfa8f6e54151b8f87dfade7866d2e60ce743e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<template>
  <div class="indexWarp">
    <van-nav-bar title="首页" left-arrow></van-nav-bar>
    <van-tabs v-model="active" color="#41c5f6" :swipeable="true" background="#ffffff">
      <van-tab title="轮廓图">
        <div class="chartCon">
          <china-map ref="chinaMap" id="chinaMap" name="zhongguo"></china-map>
        </div>
      </van-tab>
      <van-tab title="站点列表">
        <site-list ref="siteList" id="siteList"></site-list>
      </van-tab>
    </van-tabs>
  </div>
</template>
 
<script>
  import ChinaMap from '@/components/chart/chinaMap.vue'
  import siteList from '@/components/site/siteList.vue'
  export default {
    components: {
      ChinaMap,
      siteList
    },
    data() {
      return {
        active: 0
      }
    },
    mounted() {
      this.$nextTick(() => {
        this.$refs.chinaMap.setData({})
        this.$refs.chinaMap.searchChartHomeState();
      })
    },
  }
</script>
 
<style scoped>
  .indexWarp {
    width: 100%;
    min-height: 100%;
    background: #f8f8f8;
  }
 
  .chartCon {
    height: calc(100vh - 90Px);
    background-color: #0b388b;
  }
</style>