law.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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"><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. };
  40. </script>
  41. <style lang="less" scoped>
  42. ul {
  43. padding: 0;
  44. margin: 0;
  45. }
  46. li {
  47. padding: 0;
  48. margin: 0;
  49. color: #999;
  50. }
  51. .info {
  52. width: 100%;
  53. height: 310px;
  54. overflow: hidden;
  55. padding: 20px;
  56. background-color: #fff;
  57. }
  58. .topInfo {
  59. height: 30px;
  60. line-height: 30px;
  61. margin: 0 0 10px 0;
  62. }
  63. .topInfo .left {
  64. font-size: 22px;
  65. color: #2c3350;
  66. font-weight: bold;
  67. }
  68. .topInfo .more {
  69. height: 30px;
  70. text-align: right;
  71. padding: 6px 0;
  72. }
  73. .list {
  74. padding: 0 0 0 20px;
  75. height: 230px;
  76. overflow: hidden;
  77. }
  78. .zixunList {
  79. padding: 0 0 4px 0;
  80. }
  81. .zixunList .title {
  82. font-size: 14px;
  83. color: #60626e;
  84. display: inline-block;
  85. width: 240px;
  86. margin: 0 20px 0 0;
  87. }
  88. .zixunList .date {
  89. font-size: 14px;
  90. color: #abaab8;
  91. float: right;
  92. max-width: 90px;
  93. }
  94. </style>