<template>
  <div id="model-6">
    <el-col :span="24" class="list">
      <el-col class="infoRightList" :span="24" v-for="(item, index) in list" :key="index" @click.native="clickDetail(item.id)">
        <el-col :span="20" class="title textOver">
          {{ item.p1 }}
        </el-col>
        <el-col :span="4" class="date">
          {{ item.p2 || '暂无' }}
        </el-col>
      </el-col>
    </el-col>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'model-6',
  props: {
    list: { type: Array, default: () => [] },
  },
  components: {},
  data: function() {
    return {};
  },
  created() {},
  methods: {
    clickDetail(id) {
      // TODO:打开指定详情
      this.$router.push({ path: './list', query: { index: this.index, id } });
    },
  },
  computed: {
    ...mapState(['user', 'menuParams']),
    pageTitle() {
      return `${this.$route.meta.title}`;
    },
    index() {
      return parseInt(this.$route.query.index) || 0;
    },
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
};
</script>

<style lang="less" scoped>
.list {
  height: 455px;
  overflow: hidden;
  height: 455px;
  overflow: hidden;
  padding: 0 10px;
  .infoRightList {
    padding: 10px 0;
    .title {
      font-size: 18px;
      font-weight: bold;
    }
    .date {
      font-size: 18px;
      text-align: right;
    }
  }
  .infoRightList:nth-child(5) {
    border-bottom: 1px dashed #ccc;
    padding: 10px 0 17px 0;
  }
  .infoRightList:nth-child(6) {
    padding: 15px 0 10px 0;
  }
  .infoRightList:hover {
    cursor: pointer;
    .title {
      color: #409eff;
    }
  }
}
</style>
