<template>
  <div id="serviceList">
    <el-row>
      <el-col :span="24" class="style">
        <el-col :span="24" class="top">
          <span></span>
          <span>计算服务</span>
        </el-col>
        <el-col :span="24" class="info">
          <el-col :span="6" class="list" @click.native="clickBtn(item.title)" v-for="(item, index) in list" :key="index">
            <el-link :underline="false">
              <el-image :src="item.pic"></el-image>
              <p>{{ item.title }}</p>
            </el-link>
          </el-col>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'serviceList',
  props: {},
  components: {},
  data: function() {
    return {
      list: [
        {
          pic: require('@/assets/ziyuan.png'),
          title: '资源介绍',
        },
        {
          pic: require('@/assets/shenqing.png'),
          title: '账号申请',
        },
        {
          pic: require('@/assets/denglu.png'),
          title: '计算登录',
        },
        {
          pic: require('@/assets/lingyu.png'),
          title: '应用领域',
        },
        {
          pic: require('@/assets/anli.png'),
          title: '应用案例',
        },
        {
          pic: require('@/assets/anli.png'),
          title: '运行动态',
        },
        {
          pic: require('@/assets/anli.png'),
          title: '超算讲堂',
        },
        {
          pic: require('@/assets/anli.png'),
          title: 'AI社区',
        },
      ],
    };
  },
  created() {},
  methods: {
    clickBtn(title) {
      this.$router.push({ path: '/service/detail', query: { title: title } });
    },
  },
  computed: {
    ...mapState(['user']),
    pageTitle() {
      return `${this.$route.meta.title}`;
    },
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
};
</script>

<style lang="less" scoped>
.style {
  background: #fff;
  min-height: 505px;
  padding: 0 20px;
  .top {
    height: 35px;
    margin: 20px 0;
    border-bottom: 1px dashed #ccc;
    span:first-child {
      display: inline-block;
      width: 4px;
      height: 20px;
      background: #005293;
      margin: 0 10px -3px 0;
    }
    span:nth-child(2) {
      font-size: 20px;
      color: #005293;
      font-weight: bold;
    }
  }
  .list {
    width: 275px;
    min-height: 180px;
    margin: 0 20px 30px 0;
    text-align: center;
    background-color: #034980;
    .el-image {
      padding: 30px 0 0 0;
    }
    p {
      font-size: 25px;
      color: #ffffff;
      letter-spacing: 2px;
      padding: 20px 0;
    }
  }
  .list:nth-child(4n) {
    margin: 0 0 30px 0;
  }
}
</style>
