<template>
  <div id="app">
    <Header id="header" />
    <router-view id="router" />
  </div>
</template>

<script>
import Header from '@/views/header/index.vue'

export default {
  name: '',
  components: {
    Header,
  },
  data() {
    return {
      routerMap: {
        1: '/',
        // 2: '/residentAnalysis ',
      },
    }
  },
  mounted() {
    this.receiveBUS()
  },
  methods: {
    receiveBUS() {
      this.$bus.$on('setActiveIndex', (val) => {
        this.$router.push(this.routerMap[val])
      })
    },
  },
}
</script>

<style lang="scss">
@use '@/assets/scss/index.scss';

#app {
  width: 100%;
  height: 100%;
}

#header {
  width: 100%;
  height: 74px;
}

#router {
  width: 100%;
  height: calc(100% - 74px);
  overflow-y: hidden;
}
</style>
