index.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <template>
  2. <div id="app">
  3. <div class="banner">
  4. <img src="../../assets/image/gxq_banner.png" />
  5. </div>
  6. <div class="activity-container notice-wrap">
  7. <div class="header-line">
  8. <h3>通知公告</h3>
  9. <span>NOTICE</span>
  10. <a class="view-more" @click="goNotice">查看更多</a>
  11. </div>
  12. <div class="notices-box">
  13. <div class="lastest">
  14. <div class="lastest-mark">
  15. TOP
  16. </div>
  17. <p class="lastest-title" @click="handleNoticeClick()">{{noticeList[0].title}}</p>
  18. <p class="lastest-date">{{noticeList[0].startTimeTip}}</p>
  19. </div>
  20. <ul class="notice-list">
  21. <li v-for="(item,index) in noticeList" @click="handleNoticeClick()"><span class="title">{{item.title}}</span><span class="date">{{item.startTimeTip}}</span></li>
  22. </ul>
  23. </div>
  24. </div>
  25. <div class="home-activity">
  26. <div class="activity-container">
  27. <div class="header-line">
  28. <h3>评审活动</h3> <span>ACTIVITY</span> <div class="more">
  29. <a class="view-more" @click="goActivity">查看更多</a> <span class="count">
  30. </span>
  31. </div>
  32. </div>
  33. <div class="activities">
  34. <div class="activity" v-for="(item,index) in activityList" @click="handleActivityClick()">
  35. <div>
  36. <div class="img-box">
  37. <span class="state" style="background: rgb(8, 203, 203); visibility: visible;">{{item.statusTip}}</span>
  38. <span class="time">{{item.timeTip}}</span>
  39. </div>
  40. <div class="infos">
  41. <p class="actName">{{item.name}}</p> <p></p> <p class="actOrganizer">
  42. <span class="organizer">
  43. {{item.organizer}}
  44. </span>
  45. <span>主办</span>
  46. </p>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. <div class="home-activity">
  54. <div class="activity-container">
  55. <div class="header-line">
  56. <h3>往届回顾</h3> <span>REVIEW</span>
  57. <div class="more">
  58. <a href="./activity.html" class="view-more">查看更多</a>
  59. <span class="count">
  60. </span>
  61. </div>
  62. </div>
  63. <div class="activities">
  64. <div class="activity" v-for="(item,index) in finishAcList" @click="handleActivityClick()">
  65. <div>
  66. <div class="img-box">
  67. <span class="state" style="background: rgb(168, 170, 169); visibility: visible;">{{item.statusTip}}</span>
  68. <span class="time">{{item.timeTip}}</span>
  69. </div>
  70. <div class="infos">
  71. <p></p>
  72. <p class="actName">{{item.name}}</p>
  73. <p></p>
  74. <p class="actOrganizer">
  75. <span class="organizer">
  76. {{item.organizer}}
  77. </span>
  78. <span>主办</span>
  79. </p>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </template>
  88. <script>
  89. import headers from '@/components/smart-class/headers'
  90. import indexNoticeList from '@/static/indexNoticeList.json'
  91. import indexActivityList from '@/static/reviewAcList.json'
  92. import indexFinishActivityList from '@/static/finishAcList.json'
  93. export default {
  94. components: {
  95. headers
  96. },
  97. data() {
  98. return {
  99. noticeList: [],
  100. activityList:[]
  101. }
  102. },
  103. created() {
  104. this.noticeList = indexNoticeList.list;
  105. this.activityList = indexActivityList.data.list;
  106. this.finishAcList = indexFinishActivityList.data.list;
  107. },
  108. methods: {
  109. handleNoticeClick() {
  110. this.$router.push('noticeDetails');
  111. this.$eventBus.$emit("activeIndex", 1);
  112. },
  113. handleActivityClick() {
  114. this.$router.push('activityDetails');
  115. this.$eventBus.$emit("activeIndex", 2);
  116. },
  117. goNotice() {
  118. this.$router.push('notice');
  119. this.$eventBus.$emit("activeIndex", 1);
  120. },
  121. goActivity() {
  122. this.$router.push('reviewActivity');
  123. this.$eventBus.$emit("activeIndex", 2);
  124. }
  125. },
  126. mounted() {
  127. }
  128. }
  129. </script>
  130. <style scoped>
  131. html, body, #app {
  132. height: 100% !important;
  133. user-select: none;
  134. }
  135. .activity-container {
  136. width: 1200px;
  137. margin: 0 auto;
  138. }
  139. .notice-wrap {
  140. height: 300px;
  141. margin-top: 30px;
  142. }
  143. .header-line {
  144. height: 16px;
  145. font-size: 16px;
  146. line-height: 16px
  147. }
  148. .header-line h3 {
  149. float: left;
  150. padding-left: 10px;
  151. border-left: 4px solid #41b6ba;
  152. color: #333
  153. }
  154. .header-line span {
  155. float: left;
  156. margin-left: 8px;
  157. color: #cbb;
  158. font-size: 14px;
  159. height: 16px
  160. }
  161. .header-line a {
  162. float: right;
  163. color: #666;
  164. font-size: 14px
  165. }
  166. .banner {
  167. margin-top:50px;
  168. }
  169. .banner img {
  170. width: 100%;
  171. min-width: 1280px;
  172. background-color: #e5e9f2;
  173. height: 600px
  174. }
  175. .notice-wrap .notices-box {
  176. height: 240px;
  177. }
  178. .notice-wrap .notices-box .lastest {
  179. cursor: pointer;
  180. margin-top: 15px;
  181. margin-right: 60px;
  182. height: 220px;
  183. width: 520px;
  184. float: left;
  185. }
  186. .notice-wrap .notices-box .lastest .lastest-mark {
  187. margin-top: 25px;
  188. text-align: center;
  189. line-height: 28px;
  190. width: 64px;
  191. height: 28px;
  192. background-color: #41b6ba;
  193. color: #fff;
  194. font-size: 24px;
  195. font-family: Arial;
  196. }
  197. .notice-wrap .notices-box .lastest .lastest-title {
  198. padding-top: 12px;
  199. clear: both;
  200. color: #444;
  201. font-size: 26px;
  202. font-weight: bold;
  203. }
  204. .notice-wrap .notices-box .lastest .lastest-date {
  205. padding-top: 20px;
  206. color: #999;
  207. font-size: 18px;
  208. font-family: Arial;
  209. }
  210. .notice-wrap .notices-box .notice-list {
  211. width: 620px;
  212. float: left;
  213. }
  214. .notice-wrap .notices-box .notice-list li {
  215. list-style-type: disc;
  216. padding: 10px 0 10px 8px;
  217. font-size: 14px;
  218. color: #41b6ba;
  219. cursor: pointer;
  220. }
  221. .notice-wrap .notices-box .notice-list li .date {
  222. color: #999;
  223. float: right;
  224. }
  225. .notice-wrap .notices-box .notice-list li:first-child {
  226. margin-top: 10px;
  227. }
  228. .notice-wrap .notices-box .notice-list li .title {
  229. display: inline-block;
  230. color: #444;
  231. font-size: 14px;
  232. overflow: hidden;
  233. text-overflow: ellipsis;
  234. white-space: nowrap;
  235. width: 350px;
  236. vertical-align: top;
  237. }
  238. .notice-wrap .notices-box .notice-list li .title:hover {
  239. color: #20a0ff;
  240. }
  241. .home-activity .activities {
  242. min-height: 300px;
  243. overflow: hidden
  244. }
  245. .home-activity .activities .activity {
  246. margin-top: 30px;
  247. margin-right: 25px;
  248. margin-bottom: 30px;
  249. width: 383px;
  250. float: left;
  251. cursor: pointer;
  252. border: 1px solid #ddd;
  253. box-sizing: border-box
  254. }
  255. .home-activity .activities .activity:hover {
  256. box-shadow: 0 26px 40px -24px rgba(0,36,100,.3);
  257. transform: translateY(-6px);
  258. transition: all .3s ease 0s
  259. }
  260. .home-activity .activities .activity:nth-child(3n) {
  261. margin-right: 0
  262. }
  263. .img-box {
  264. height: 210px;
  265. position:relative;
  266. background:url(../../assets/image/cover.png);
  267. background-size:cover;
  268. display:flex;
  269. flex-direction:row;
  270. justify-content:center;
  271. align-items:center;
  272. }
  273. .img-box .state {
  274. padding: 5px 8px;
  275. position: absolute;
  276. left: 0;
  277. top: 0px;
  278. z-index: 1;
  279. background-color: #13ce66;
  280. color: #fff
  281. }
  282. .img-box .time {
  283. margin-top:130px;
  284. z-index: 1;
  285. color: #dbd8d8;
  286. font-size:18px;
  287. font-weight:bold;
  288. }
  289. .img-box img {
  290. width: 382px;
  291. height: 210px;
  292. position: absolute;
  293. left: 0;
  294. top: -21px;
  295. padding-top: 1px
  296. }
  297. .infos {
  298. background-color: #fff
  299. }
  300. .infos .actName {
  301. color: #444;
  302. font-size: 16px;
  303. padding: 20px 10px 10px 20px;
  304. overflow: hidden;
  305. text-overflow: ellipsis;
  306. white-space: nowrap;
  307. width: 280px
  308. }
  309. .infos .actOrganizer {
  310. color: #999;
  311. font-size: 14px;
  312. padding-left: 20px;
  313. padding-bottom: 20px
  314. }
  315. .infos .actTime {
  316. color: #aaa;
  317. font-size: 14px;
  318. padding-left: 20px;
  319. padding-bottom: 10px
  320. }
  321. .view-more {
  322. text-decoration: none;
  323. float: right
  324. }
  325. </style>