LessonList.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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(item.rowKey)">
  9. <div>
  10. <div class="img-box">
  11. <span class="state" style="background: rgb(130, 147, 166); visibility: visible;">{{item.activityStatusTip}}</span>
  12. <!--<img :src="getThumb(item.rowKey)" alt="">-->
  13. <div class="lesson-image">
  14. <p style="font-size:24px">高新区智慧课堂优秀课例</p>
  15. <p style="font-size:16px;margin:5px 0">六年级</p>
  16. <p style="font-size:28px;">《 速度与激情 》</p>
  17. <p style="font-size:16px;margin-top:8px;">高新区益民学校 钟源教师 执教</p>
  18. <p style="font-size:16px;margin-top:8px;">授课平台:网奕HiTeach</p>
  19. </div>
  20. </div>
  21. <div class="infos">
  22. <p>名称:{{item.mainActivityName}}</p>
  23. <p>学校:{{item.schoolName}}</p>
  24. <p>主讲:{{item.speaker}}</p>
  25. <p>学科:{{item.categoryName}}</p>
  26. <p>时间:{{item.timeTip}}</p>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. </template>
  33. <script>
  34. import lessons from '@/static/observationList.json'
  35. export default {
  36. components: {
  37. },
  38. data() {
  39. return {
  40. lessons: []
  41. }
  42. },
  43. created() {
  44. this.lessons = lessons.list;
  45. },
  46. methods: {
  47. getList(type) {
  48. let list = noticeList.list;
  49. var newArray = list.filter(function(item){
  50. return item.noticeTypeId == type;
  51. });
  52. this.noticeList = newArray;
  53. },
  54. handleMenuClick(index,typeId,name) {
  55. this.activeIndex = index;
  56. this.typeName = name;
  57. this.getList(typeId);
  58. },
  59. handleLessonClick(rowKey) {
  60. sessionStorage.setItem('_lesson_rowKey', rowKey);
  61. this.$router.push('lessonDetails')
  62. },
  63. goDetails() {
  64. this.$router.push('activityDetails')
  65. }
  66. },
  67. mounted() {
  68. }
  69. }
  70. </script>
  71. <style scoped>
  72. html, body, #app {
  73. height: 100% !important;
  74. user-select: none;
  75. }
  76. .main-content {
  77. background: rgb(248,248,248) !important;
  78. }
  79. .container {
  80. width: 1200px;
  81. margin: 100px auto;
  82. display: flex;
  83. flex-direction: column;
  84. }
  85. .container .activities {
  86. min-height: 300px;
  87. overflow: hidden
  88. }
  89. .container .activity {
  90. margin-top: 30px;
  91. margin-right: 25px;
  92. margin-bottom: 30px;
  93. width: 383px;
  94. float: left;
  95. cursor: pointer;
  96. border: 1px solid #ddd;
  97. box-sizing: border-box
  98. }
  99. .container .activities .activity:hover {
  100. box-shadow: 0 26px 40px -24px rgba(0,36,100,.3);
  101. transform: translateY(-6px);
  102. transition: all .3s ease 0s
  103. }
  104. .container .activities .activity:nth-child(3n) {
  105. margin-right: 0
  106. }
  107. .img-box {
  108. background:#13ce66;
  109. height: 210px
  110. }
  111. .img-box .lesson-image {
  112. display:flex;
  113. flex-direction:column;
  114. justify-content:center;
  115. align-items:center;
  116. color:#fff;
  117. font-weight:bold;
  118. }
  119. .img-box .state {
  120. padding: 5px 8px;
  121. line-height: 20px;
  122. position: relative;
  123. left: 0;
  124. top: 3px;
  125. z-index: 1;
  126. background-color: #13ce66;
  127. color: #fff
  128. }
  129. .img-box img {
  130. width: 382px;
  131. height: 210px;
  132. position: relative;
  133. left: 0;
  134. top: -21px;
  135. padding-top: 1px
  136. }
  137. .infos {
  138. background-color: #fff;
  139. padding:10px;
  140. font-size:14px;
  141. }
  142. .infos p {
  143. margin:5px 0;
  144. }
  145. .infos .actName {
  146. color: #444;
  147. font-size: 16px;
  148. padding: 20px 10px 10px 20px;
  149. overflow: hidden;
  150. text-overflow: ellipsis;
  151. white-space: nowrap;
  152. width: 280px
  153. }
  154. .infos .actOrganizer {
  155. color: #999;
  156. font-size: 14px;
  157. padding-left: 20px;
  158. padding-bottom: 20px
  159. }
  160. .infos .actTime {
  161. color: #aaa;
  162. font-size: 14px;
  163. padding-left: 20px;
  164. padding-bottom: 10px
  165. }
  166. </style>