<!--
 * @Description: 快捷功能
 * @Author: 王晓颖
 * @Date:
 -->
<template>
  <div>
    <el-row>
      <el-col :span="24">
        <el-card class="box-card">
          <div slot="header">
            <span>常用功能</span>
          </div>
          <div class="box-body">
            <div v-for="item of funcs">
              <div v-if="hasPerm(item.permission)" class="box-item">
                <svg-icon :icon-class="item.icon" class-name="card-panel-icon" />
                {{ item.name }}
              </div>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>

  </div>
</template>

<script>
export default {
  name: 'QuickFunction',
  data() {
    return {
      funcs: [
        { name: '人员管理', icon: 'icon-user', path: '/stafflist', permisson: '/sanitation/staff' },
        { name: '出勤统计', icon: 'icon-attendance', path: '/assessment/staff', permission: '/sanitation/assessment/staff' },
        { name: '垃圾转运作业统计', icon: 'icon-transfer2', path: '/assesment/wastebin', permission: '/sanitation/assesment/wastebin' },
        { name: '路面清扫作业统计', icon: 'attendance-analyse', path: '/assesment/clean', permission: '/sanitation/assesment/clean' },
        { name: '公厕保洁作业统计', icon: 'icon-clean2', path: '/assesment/toilet', permission: '/sanitation/assesment/toilet' }
      ]
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  @import "../../../styles/variables";
.box-card{
  width:100%;
  /*height: 100px;*/
  .box-body{
    width:100%;
    display: flex;
    justify-content: left;
    .box-item{
      /*width: 130px;*/
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      margin: 0px 20px;
      line-height: 18px;
      color: rgba(12, 12, 12, 0.66);
      font-size: 16px;
      .card-panel-icon{
        font-size: 36px;
        margin:10px;
        margin-bottom: 20px;
      }
    }
    .box-item:hover{
      cursor: pointer;
      color:$themeColor;
    }
  }

}
</style>
