notice.vue 2.1 KB

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