<template>
  <div class="dashboard-container">
    <div class="dashboard-text">name:{{ name }}</div>
    <div class="dashboard-text">roles:<span v-for="role in roleNames" :key="role">{{ role }}</span></div>
    <div class="dashboard-text">tips:<span v-for="tip in roleTips" :key="tip">{{ tip }}</span></div>
    <div v-if="hasPerm('kaptcha')" class="dashboard-text">有权限显示</div>
    <div class="dashboard-text">wellTypes:<span v-for="wellType in wellTypes" :key="wellType">{{ wellType }}</span></div>
    <div class="dashboard-text">deviceTypes:<span v-for="deviceType in deviceTypes" :key="deviceType">{{ deviceType }}</span></div>
    <div class="dashboard-text">communications:<span v-for="communication in communications" :key="communication">{{ communication }}</span></div>
    <div class="dashboard-text">area:{{ area }}</div>

  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'Dashboard',
  computed: {
    ...mapGetters([
      'name',
      'roleNames',
      'roleTips',
      'wellTypes',
      'deviceTypes',
      'communications',
      'area'
    ])
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
