LessonList.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <div class="container">
  3. <div class="search">
  4. <DatePicker type="daterange" placement="bottom-end" placeholder="选择起止时间" style="width: 200px"></DatePicker>
  5. <Button>搜索</Button>
  6. </div>
  7. <div class="activities">
  8. <div class="activity" v-for="(item,index) in lessons" @click="handleLessonClick()">
  9. <div>
  10. <div class="img-box"><span class="state" style="background: rgb(130, 147, 166); visibility: visible;">{{item.activityStatusTip}}</span> <img :src="'http://ttkt.sxedu.org:70'+item.coverUri" alt=""></div>
  11. <div class="infos">
  12. <p></p>
  13. <p>名称:{{item.mainActivityName}}</p>
  14. <p>学校:{{item.schoolName}}</p>
  15. <p>主讲:{{item.speaker}}</p>
  16. <p>学科:{{item.categoryName}}</p>
  17. <p>时间:{{item.timeTip}}</p>
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. </div>
  23. </template>
  24. <script>
  25. import lessons from '@/static/observationList.json'
  26. export default {
  27. components: {
  28. },
  29. data() {
  30. return {
  31. lessons: []
  32. }
  33. },
  34. created() {
  35. this.lessons = lessons.list;
  36. },
  37. methods: {
  38. getList(type) {
  39. let list = noticeList.list;
  40. var newArray = list.filter(function(item){
  41. return item.noticeTypeId == type;
  42. });
  43. this.noticeList = newArray;
  44. },
  45. handleMenuClick(index,typeId,name) {
  46. this.activeIndex = index;
  47. this.typeName = name;
  48. this.getList(typeId);
  49. },
  50. handleLessonClick() {
  51. this.$router.push('lessonDetails')
  52. },
  53. goDetails() {
  54. this.$router.push('activityDetails')
  55. }
  56. },
  57. mounted() {
  58. }
  59. }
  60. </script>
  61. <style scoped>
  62. html, body, #app {
  63. height: 100% !important;
  64. user-select: none;
  65. }
  66. .main-content {
  67. background: rgb(248,248,248) !important;
  68. }
  69. .container {
  70. width: 1200px;
  71. margin: 100px auto;
  72. display: flex;
  73. flex-direction: column;
  74. }
  75. .container .activities {
  76. min-height: 300px;
  77. overflow: hidden
  78. }
  79. .container .activity {
  80. margin-top: 30px;
  81. margin-right: 25px;
  82. margin-bottom: 30px;
  83. width: 383px;
  84. float: left;
  85. cursor: pointer;
  86. border: 1px solid #ddd;
  87. box-sizing: border-box
  88. }
  89. .container .activities .activity:hover {
  90. box-shadow: 0 26px 40px -24px rgba(0,36,100,.3);
  91. transform: translateY(-6px);
  92. transition: all .3s ease 0s
  93. }
  94. .container .activities .activity:nth-child(3n) {
  95. margin-right: 0
  96. }
  97. .img-box {
  98. height: 210px
  99. }
  100. .img-box .state {
  101. padding: 5px 8px;
  102. line-height: 20px;
  103. position: relative;
  104. left: 0;
  105. top: 3px;
  106. z-index: 1;
  107. background-color: #13ce66;
  108. color: #fff
  109. }
  110. .img-box img {
  111. width: 382px;
  112. height: 210px;
  113. position: relative;
  114. left: 0;
  115. top: -21px;
  116. padding-top: 1px
  117. }
  118. .infos {
  119. background-color: #fff;
  120. padding:10px;
  121. font-size:14px;
  122. }
  123. .infos p {
  124. margin:5px 0;
  125. }
  126. .infos .actName {
  127. color: #444;
  128. font-size: 16px;
  129. padding: 20px 10px 10px 20px;
  130. overflow: hidden;
  131. text-overflow: ellipsis;
  132. white-space: nowrap;
  133. width: 280px
  134. }
  135. .infos .actOrganizer {
  136. color: #999;
  137. font-size: 14px;
  138. padding-left: 20px;
  139. padding-bottom: 20px
  140. }
  141. .infos .actTime {
  142. color: #aaa;
  143. font-size: 14px;
  144. padding-left: 20px;
  145. padding-bottom: 10px
  146. }
  147. </style>