Newer
Older
robot_dog_patrol_front / src / views / dashboard / index.vue
StephanieGitHub on 24 Sep 2019 1 KB ADD:新增Dashboard页面
<template>
  <div class="dashboard-container">
    <panel-group/>
    <el-row>
      <el-col :span="10">
        <el-card shadow="never">
          <well-count/>
        </el-card>
      </el-col>
      <el-col :span="14">
        <el-card shadow="never">
          <well-count-by-type/>
        </el-card>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="14">
        <el-card shadow="never">
        <device-count/>
        </el-card>
      </el-col>
      <el-col :span="10">
        <el-card shadow="never">
        <device-count-by-online/>
        </el-card>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="10">
        <el-card shadow="never">
        <alarm-by-days/>
        </el-card>
      </el-col>
      <el-col :span="14">
        <el-card shadow="never">
        <job-by-status/>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import PanelGroup from './components/PanelGroup'
import WellCount from './components/WellCount'
import WellCountByType from './components/WellCountByType'
import DeviceCount from './components/DeviceCount'
import DeviceCountByOnline from './components/DeviceCountByOnline'
import AlarmByDays from './components/AlarmByDays'
import JobByStatus from './components/JobByStatus'

export default {
  name: 'Dashboard',
  components: {
    JobByStatus,
    AlarmByDays,
    PanelGroup,
    WellCount,
    WellCountByType,
    DeviceCount,
    DeviceCountByOnline
  },
  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>