law.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <div id="law">
  3. <el-row>
  4. <el-col :span="24" class="info">
  5. <el-col :span="24" class="topInfo">
  6. <el-col :span="20" class="left">{{ title }}</el-col>
  7. <el-col :span="4" class="more">
  8. <el-link :underline="false" @click="moreClick()"><el-image :src="more"></el-image></el-link>
  9. </el-col>
  10. </el-col>
  11. <el-col :span="24" class="list">
  12. <ul>
  13. <li class="zixunList" v-for="(item, index) in lawList" :key="index" @click="$router.push({ path: '/policy/lawDetail', query: { id: item.id } })">
  14. <el-link :underline="false">
  15. <span class="title textOver">{{ item.title }}</span>
  16. <span class="date textOver">{{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}</span>
  17. </el-link>
  18. </li>
  19. </ul>
  20. </el-col>
  21. </el-col>
  22. </el-row>
  23. </div>
  24. </template>
  25. <script>
  26. export default {
  27. name: 'notice',
  28. props: {
  29. lawList: null,
  30. },
  31. components: {},
  32. data: () => ({
  33. title: '政策法规',
  34. more: require('@/assets/更多.png'),
  35. }),
  36. created() {},
  37. computed: {},
  38. methods: {
  39. moreClick() {
  40. this.$router.push({ path: '/policy/policy' });
  41. },
  42. },
  43. };
  44. </script>
  45. <style lang="less" scoped>
  46. ul {
  47. padding: 0;
  48. margin: 0;
  49. }
  50. li {
  51. padding: 0;
  52. margin: 0;
  53. color: #999;
  54. }
  55. .info {
  56. width: 100%;
  57. height: 310px;
  58. overflow: hidden;
  59. padding: 20px;
  60. background-color: #fff;
  61. }
  62. .topInfo {
  63. height: 30px;
  64. line-height: 30px;
  65. margin: 0 0 10px 0;
  66. }
  67. .topInfo .left {
  68. font-size: 22px;
  69. color: #2c3350;
  70. font-weight: bold;
  71. }
  72. .topInfo .more {
  73. height: 30px;
  74. text-align: right;
  75. padding: 6px 0;
  76. }
  77. .list {
  78. padding: 0 0 0 20px;
  79. height: 230px;
  80. overflow: hidden;
  81. }
  82. .zixunList {
  83. padding: 0 0 4px 0;
  84. }
  85. .zixunList .title {
  86. font-size: 14px;
  87. color: #60626e;
  88. display: inline-block;
  89. width: 240px;
  90. margin: 0 20px 0 0;
  91. }
  92. .zixunList .date {
  93. font-size: 14px;
  94. color: #abaab8;
  95. float: right;
  96. max-width: 90px;
  97. }
  98. </style>