model-6.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <div id="model-6">
  3. <el-col :span="24" class="list">
  4. <el-col class="infoRightList" :span="24" v-for="(item, index) in list" :key="index" @click.native="clickDetail(item.id)">
  5. <el-col :span="20" class="title textOver">
  6. {{ item.p1 }}
  7. </el-col>
  8. <el-col :span="4" class="date">
  9. {{ item.p2 || '暂无' }}
  10. </el-col>
  11. </el-col>
  12. </el-col>
  13. </div>
  14. </template>
  15. <script>
  16. import { mapState, createNamespacedHelpers } from 'vuex';
  17. export default {
  18. name: 'model-6',
  19. props: {
  20. list: { type: Array, default: () => [] },
  21. },
  22. components: {},
  23. data: function() {
  24. return {};
  25. },
  26. created() {},
  27. methods: {
  28. clickDetail(id) {
  29. // TODO:打开指定详情
  30. this.$router.push({ path: './list', query: { index: this.index, id } });
  31. },
  32. },
  33. computed: {
  34. ...mapState(['user', 'menuParams']),
  35. pageTitle() {
  36. return `${this.$route.meta.title}`;
  37. },
  38. index() {
  39. return parseInt(this.$route.query.index) || 0;
  40. },
  41. },
  42. metaInfo() {
  43. return { title: this.$route.meta.title };
  44. },
  45. };
  46. </script>
  47. <style lang="less" scoped>
  48. .list {
  49. height: 455px;
  50. overflow: hidden;
  51. height: 455px;
  52. overflow: hidden;
  53. padding: 0 10px;
  54. .infoRightList {
  55. padding: 10px 0;
  56. .title {
  57. font-size: 18px;
  58. font-weight: bold;
  59. }
  60. .date {
  61. font-size: 18px;
  62. text-align: right;
  63. }
  64. }
  65. .infoRightList:nth-child(5) {
  66. border-bottom: 1px dashed #ccc;
  67. padding: 10px 0 17px 0;
  68. }
  69. .infoRightList:nth-child(6) {
  70. padding: 15px 0 10px 0;
  71. }
  72. .infoRightList:hover {
  73. cursor: pointer;
  74. .title {
  75. color: #409eff;
  76. }
  77. }
  78. }
  79. </style>