notice.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <div class="container notice-container">
  3. <div class="left-box">
  4. <p class="title">通知公告<span class="sub">NOTICE</span></p>
  5. <ul>
  6. <li :class="activeIndex == 0 ? 'li-active':''" @click="handleMenuClick(0,0,'全部类型')">全部类型</li>
  7. <li :class="activeIndex == 1 ? 'li-active':''" @click="handleMenuClick(1,1,'天天展示')">天天展示</li>
  8. <li :class="activeIndex == 2 ? 'li-active':''" @click="handleMenuClick(2,2,'月月研讨')">月月研讨</li>
  9. <li :class="activeIndex == 3 ? 'li-active':''" @click="handleMenuClick(3,3,'年年观摩')">年年观摩</li>
  10. <li :class="activeIndex == 4 ? 'li-active':''" @click="handleMenuClick(4,4,'课例征集')">课例征集</li>
  11. <li :class="activeIndex == 5 ? 'li-active':''" @click="handleMenuClick(5,5,'获奖信息')">获奖信息</li>
  12. <li :class="activeIndex == 6 ? 'li-active':''" @click="handleMenuClick(6,6,'智慧团队')">智慧团队</li>
  13. <li :class="activeIndex == 7 ? 'li-active':''" @click="handleMenuClick(7,7,'评课标准')">评课标准</li>
  14. <li :class="activeIndex == 8 ? 'li-active':''" @click="handleMenuClick(8,8,'上级通知')">上级通知</li>
  15. <li :class="activeIndex == 9 ? 'li-active':''" @click="handleMenuClick(9,9,'每周评论')">每周评论</li>
  16. <li :class="activeIndex == 10 ? 'li-active':''" @click="handleMenuClick(10,10,'高阶研修')">高阶研修</li>
  17. </ul>
  18. </div>
  19. <div class="right-box center-col">
  20. <p class="title">{{typeName}}</p>
  21. <Table :columns="newColumns" :data="noticeList" @on-row-click="rowClick" no-data-text="暂无数据"></Table>
  22. <Page :total="50" show-elevator show-total />
  23. </div>
  24. </div>
  25. </template>
  26. <script>
  27. import noticeList from '@/static/noticeList.json'
  28. export default {
  29. components: {
  30. },
  31. data() {
  32. return {
  33. activeIndex: 0,
  34. typeName:"",
  35. newColumns: [
  36. {
  37. title: '标题',
  38. key: 'title'
  39. },
  40. {
  41. title: '日期',
  42. key: 'startTime'
  43. }
  44. ],
  45. noticeList: []
  46. }
  47. },
  48. created() {
  49. this.getList(1);
  50. },
  51. methods: {
  52. getList(type) {
  53. let list = noticeList.list;
  54. var newArray = list.filter(function(item){
  55. return item.noticeTypeId == type;
  56. });
  57. this.noticeList = newArray;
  58. },
  59. handleMenuClick(index,typeId,name) {
  60. this.activeIndex = index;
  61. this.typeName = name;
  62. this.getList(typeId);
  63. },
  64. rowClick(data) {
  65. this.$router.push({
  66. path:'/noticeDetails',
  67. query:{
  68. id:data.id
  69. }
  70. });
  71. }
  72. },
  73. mounted() {
  74. }
  75. }
  76. </script>
  77. <style scoped>
  78. html, body, #app {
  79. height: 100% !important;
  80. user-select: none;
  81. }
  82. .main-content {
  83. background: rgb(248,248,248) !important;
  84. }
  85. .container {
  86. width: 1200px;
  87. margin: 100px auto;
  88. display: flex;
  89. flex-direction: row;
  90. justify-content: space-between;
  91. }
  92. .container .left-box {
  93. width: 25%;
  94. padding-bottom: 50px;
  95. background: #fff;
  96. }
  97. .container .left-box .title {
  98. font-size: 16px;
  99. color: #33aafe;
  100. letter-spacing: 1px;
  101. font-weight: 500;
  102. margin: 30px 0 0 20px;
  103. }
  104. .container .left-box .title .sub {
  105. font-size: 14px;
  106. color: #cbb;
  107. margin-left: 15px;
  108. }
  109. .container .left-box ul {
  110. list-style: none;
  111. width: 100%;
  112. margin-top: 20px;
  113. }
  114. .container .left-box ul li {
  115. width: 100%;
  116. height: 56px;
  117. line-height: 56px;
  118. font-size: 14px;
  119. padding-left: 20px;
  120. color: #999;
  121. letter-spacing: 1px;
  122. text-indent: 5px;
  123. cursor: pointer;
  124. }
  125. .container .left-box ul li:hover{
  126. background: rgba(212, 226, 236, 0.5);
  127. color:#999;
  128. }
  129. .container .left-box .li-active {
  130. background: #33aafe;
  131. color: #fff;
  132. }
  133. .container .right-box {
  134. width: 73%;
  135. padding-bottom:50px;
  136. padding: 30px 15px;
  137. background: #fff;
  138. }
  139. .container .right-box .title {
  140. font-size: 16px;
  141. color: #444;
  142. }
  143. .container .right-box .ivu-table-wrapper {
  144. width:100%;
  145. margin-top:20px;
  146. }
  147. .container .right-box .ivu-page {
  148. margin-top:20px;
  149. }
  150. .container .right-box /deep/ .ivu-table-wrapper .ivu-table-cell {
  151. cursor:pointer;
  152. }
  153. .center-col {
  154. display: flex;
  155. flex-direction: column;
  156. align-items: center;
  157. }
  158. </style>