<template>
  <div class="quick">
    <div class="quick-title">快捷入口</div>
    <ul class="process-list">
      <li v-for="(item, index) in menuList" :key="index">
        <div class="process-item" @click="handlerMenu(item)">
          <div class="left" :style="{'background-image': `url(${require(`../img/${item.icon}.png`)})`}"></div>
          <div class="right">
            <p class="title">{{ item.text }}</p>
          </div>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      menuList: [
        { text: '综合查询', url: '/jxy/fourLibrary/index', icon: 'menu_gccx' },
        { text: '工程项目', url: '/jxy/fourLibrary/projectInfo', icon: 'menu_gcxm' },
        { text: '企业信息', url: '/jxy/fourLibrary/enterpriseInfo', icon: 'menu_qyxx' },
        { text: '人员信息', url: 'jxy/fourLibrary/personalnfo', icon: 'menu_ryxx' },
        { text: '工程沙盘', url: '/dctj/statistics/projectStat', icon: 'menu_gcsp' },
        { text: '检测监管', url: '/zhjg/html/report_jcjgReportHunList', icon: 'menu_jcjg' },
        { text: '监督总览', url: '/zg/other/storyBoard', icon: 'menu_jdzl' },
        { text: '安全监督', url: '/crane/property-record', icon: 'menu_aqjd' },
        { text: '文明施工管理', url: '/zhgdAttnDevice/supplierManager', icon: 'menu_wmsg' },
        { text: '工程验收', url: '/zg/other/foundation', icon: 'menu_gcys' },
        { text: '监控调度中心', url: 'http://116.63.36.91/screen/', icon: 'menu_jkddzx' },
        { text: '数据管理', url: '/dc/datamodel/index', icon: 'menu_sjgl' }
        // { text: '更多...', url: '', icon: 'menu_gd' }
      ]
    }
  },
  methods: {
    handlerMenu(item) {
      if (item.url.indexOf('http') !== -1) {
        window.open(item.url)
      } else {
        this.$router.push(item.url)
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.quick {
  border-radius: 8px;
  background: #fff;
  padding: 24px;
  &-title {
    line-height: 32px;
    background: url(../img/title_bg.png) no-repeat;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    padding: 0 10px;
    margin-bottom: 16px;
  }
}
.process-list {
  overflow: hidden;
  li {
    width: 16.66%;
    float: left;
  }
  .process-item {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #ebeef5;
    border-radius: 4px;
    margin: 10px;
    padding: 10px 5%;
    overflow: hidden;
    cursor: pointer;
  }
  .menu-phase {
    background-color: #DBDEDF;
  }
  .menu-action,
  .process-item:hover {
    background-color: #4A86FF;
    .left {
      background-position: -54px -200px;
    }
    .txt,
    .title {
      color: #fff;
    }
  }
  .left {
    width: 64px;
    height: 64px;
    float: left;
    background-position: -54px -54px;
    background-repeat: no-repeat;
    transition: all 0.3s;
    img {
      width: 100%;
      height: 100%;
    }
  }
  .right {
    width: calc(100% - 66px);
    float: left;
    padding: 20px 0 0 5px;
    box-sizing: border-box;
  }
  .title {
    font-size: 16px;
    font-weight: 700;
    color: #4A86FF;
  }
  .txt {
    font-size: 10px;
    color: #333;
    margin-top: 10px;
  }
}
</style>
