index.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. <template>
  2. <div style="background: #f0f0f0;padding-bottom:50px">
  3. <div class="banner">
  4. <img src="~@/assets/images/yxfw.jpg" alt="">
  5. </div>
  6. <div class="bread">
  7. <div>
  8. <span>当前位置:首页-园区活动</span>
  9. <div>
  10. <ul class="area-nav">
  11. <li><router-link :to="{path: '/service/characteristic'}">服务特色</router-link></li>
  12. <li><router-link :to="{path: '/service/periphery'}">园区周边</router-link></li>
  13. <li class="tabs"><router-link :to="{path: '/service/activities'}">园区活动</router-link></li>
  14. <li><router-link :to="{path: '/service/educate'}">园区培训</router-link></li>
  15. </ul>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="smart-device">
  20. <div class="smart-title">
  21. <span><span>园区活动</span>PARK AVTIVITIES</span>
  22. </div>
  23. <div class="smart-device-content">
  24. <div class="nav-company">
  25. <div>
  26. <ul>
  27. <li v-for="item in activeType" :class="active===item.value?'active':''" @click="changeType(item.value)">
  28. <span>{{item.label}}</span>
  29. </li>
  30. <!-- <li :class="active==1?'active':''" @click="changeType('1')"><span>全部</span></li>-->
  31. <!-- <li :class="active==2?'active':''" @click="changeType('2')"><span>培训</span></li>-->
  32. <!-- <li :class="active==3?'active':''" @click="changeType('3')"><span>私募</span></li>-->
  33. <!-- <li :class="active==4?'active':''" @click="changeType('4')"><span>法务</span></li>-->
  34. <!-- <li :class="active==5?'active':''" @click="changeType('5')"><span>财税</span></li>-->
  35. <!-- <li :class="active==6?'active':''" @click="changeType('6')"><span>培训</span></li>-->
  36. </ul>
  37. </div>
  38. </div>
  39. <ul class="company-list">
  40. <li v-for="(item,index) in zsList" :key="index" @click="detail(item.id)">
  41. <div class="wrap-device-detail">
  42. <div class="c-logo">
  43. <!-- <img :src="require('../../../assets/images/'+item.img)" alt="">-->
  44. <img :src="'https://smartpark.idea-sf.com'+item.img" alt="">
  45. </div>
  46. <div class="wrap-content">
  47. <div class="c-content">
  48. <span>{{item.createTime}}</span>
  49. <h3>{{item.name}}</h3>
  50. </div>
  51. <div class="detail-btn">
  52. <div class="a-status">
  53. <span v-if="item.status==2" class="over">已结束</span>
  54. <span v-else class="loading">报名中</span>
  55. <span v-if="item.status==2" class="over">活动风采</span>
  56. </div>
  57. <div class="a-option">
  58. <span>参与人数:{{item.num}}</span>
  59. <span>查看详情</span>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </li>
  65. </ul>
  66. <div class="paginationo-box">
  67. <van-pagination v-model="search.pageNum" :total-items="total" :show-page-size="10" @change="handleCurrentChange">
  68. <template #prev-text>
  69. <van-icon name="arrow-left" />
  70. </template>
  71. <template #next-text>
  72. <van-icon name="arrow" />
  73. </template>
  74. <template #page="{ text }">{{ text }}</template>
  75. </van-pagination>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </template>
  81. <script>
  82. import {websiteActivityPage} from "@/service/api_service";
  83. import Base from '@/views/base/base'
  84. import BaseData from '@/views/base/baseData'
  85. export default {
  86. mixins: [Base, BaseData],
  87. data () {
  88. return {
  89. dc_key: ['activityType'],
  90. active:'',
  91. currentPage:1,
  92. total:0,
  93. zsList:[
  94. // {
  95. // img:'n1.png',
  96. // name:'互联网私募如何入门',
  97. // eventIndex:1,
  98. // createTime:'2012-12-12',
  99. // num:1,
  100. // status:1,
  101. // detail:'互联网私募如何入门互联网私募如何入门互联网私募如何入门互联网私募如何入门互联网私募如何入门互联网私募如何入门互联网私募如何入门互联网私募如何入门互联网私募如何入门互联网私募如何入门互联网私募如何入门互联网私募如何入门互联网私募如何入门互联网私募如何入门互联网私募如何入门互联网私募如何入门'
  102. // },
  103. ],
  104. activeType:[],
  105. search:{
  106. pageSize:10,
  107. pageNum:1,
  108. publishStatus:'2'
  109. }
  110. }
  111. },
  112. mounted() {
  113. this.initDict(this.dc_key,true).then((res) => {
  114. this.activeType = this.dc_data.activityType
  115. this.getData()
  116. })
  117. document.documentElement.scrollTop = document.body.scrollTop =0; //回到顶部
  118. },
  119. methods: {
  120. changeType(active){
  121. this.search.pageNum = 1
  122. this.active=active
  123. this.getData()
  124. },
  125. handleCurrentChange: function(val) {
  126. this.search.pageNum = val
  127. this.getData()
  128. },
  129. getData(){
  130. if(this.active===0){
  131. this.search.trainType=''
  132. }else{
  133. this.search.activityType=this.active
  134. }
  135. websiteActivityPage(this.search).then((res)=>{
  136. if(res.rows){
  137. this.total = res.total
  138. this.zsList = []
  139. res.rows.forEach(item=>{
  140. let url = ''
  141. if(item.activityAnnex&&item.activityAnnex.length>2){
  142. const annex = this.$common.castEval(item.activityAnnex)
  143. url = annex[0].url
  144. }
  145. const i = {
  146. id:item.id,
  147. img:this.$common.replaceWxDownload(url),
  148. name:item.activityName,
  149. eventIndex:item.registrationStatus,
  150. createTime:this.$common.transServDate(item.publishDate),
  151. num:item.partakeNumber,
  152. status:item.registrationStatus,
  153. detail:''
  154. }
  155. this.zsList.push(i)
  156. })
  157. }
  158. })
  159. },
  160. detail(index){
  161. this.$router.push({path:'/service/detail?id='+index})
  162. }
  163. },
  164. };
  165. </script>
  166. <style scoped>
  167. .banner img{
  168. width: 100% !important;
  169. }
  170. @media screen and (min-width: 1000px){
  171. .bread{
  172. background: #fff;
  173. position: relative;
  174. }
  175. .bread>div{
  176. width: 1200px;
  177. margin: 0 auto;
  178. text-align: left;
  179. padding: 0.8rem 0;
  180. font-size: 1rem;
  181. position: relative;
  182. }
  183. .area-nav{
  184. position:absolute;
  185. right: 0;
  186. top: 0.8rem;
  187. width: 40%;
  188. text-align: right;
  189. }
  190. .area-nav{
  191. display: flex;
  192. justify-content: center;
  193. flex-wrap: nowrap;
  194. }
  195. .area-nav li{
  196. flex: 1;
  197. text-align: center;
  198. border-bottom: 2px solid #f0f0f0;
  199. padding-bottom:0.7rem;
  200. }
  201. .area-nav a{
  202. color: #333;
  203. }
  204. .smart-title{
  205. margin-top:3rem;
  206. }
  207. .smart-device{
  208. width: 1200px;
  209. margin: 0 auto;
  210. text-align: left;
  211. font-size: 1rem;
  212. }
  213. .smart-device span span{
  214. font-size: 2rem;
  215. display: inline-block;
  216. position: relative;
  217. padding-right: 1rem;
  218. margin-right: 1rem;
  219. font-weight: 900;
  220. }
  221. .smart-device span span:after{
  222. content: '';
  223. width: 1px;
  224. height: 15px;
  225. background: #666;
  226. position: absolute;
  227. right: 0;
  228. bottom: 7px;
  229. }
  230. .nav-company{
  231. margin: 3rem 0;
  232. }
  233. .nav-company>div{
  234. width: 97%;
  235. margin: 0 auto;
  236. background: #fff;
  237. padding: 1rem 0;
  238. }
  239. .nav-company ul{
  240. display: flex;
  241. width: 80%;
  242. margin: 0 auto;
  243. justify-content: center;
  244. flex-wrap: nowrap;
  245. }
  246. .nav-company ul li{
  247. width: 6rem;
  248. text-align: center;
  249. cursor: pointer;
  250. }
  251. .nav-company ul li span{
  252. width: 80%;
  253. margin: 0 auto;
  254. display: inline-block;
  255. text-align: center;
  256. color: #333;
  257. }
  258. .wrap-device-detail{
  259. background: #fff;
  260. width: 90%;
  261. margin: 0 auto;
  262. position: relative;
  263. padding: 1rem 0;
  264. overflow: hidden;
  265. }
  266. .smart-device-content .company-list{
  267. }
  268. .smart-device-content .company-list li{
  269. margin-bottom: 2rem;
  270. }
  271. .c-logo{
  272. float: left;
  273. text-align: center;
  274. width: 30%;
  275. }
  276. .c-logo img{
  277. width: 90%;
  278. height:9rem;
  279. }
  280. .wrap-content{
  281. float: left;
  282. width: 70%;
  283. }
  284. .c-content,.detail-btn{
  285. width: 90%;
  286. margin: 1rem auto;
  287. overflow: hidden;
  288. }
  289. .c-content span{
  290. color: rgba(75, 175, 227, 1);
  291. }
  292. .c-content h3{
  293. font-size: 1rem;
  294. margin: 1rem 0;
  295. }
  296. .c-content p{
  297. font-size: 0.8rem;
  298. line-height: 1.6rem;
  299. height: 3rem;
  300. overflow: hidden;
  301. margin: 1rem 0;
  302. }
  303. .detail-btn{
  304. margin-bottom: 1rem;
  305. }
  306. .detail-btn .a-status{
  307. float: left;
  308. }
  309. .detail-btn .a-option{
  310. float: right;
  311. }
  312. .detail-btn span{
  313. display: inline-block;
  314. padding: 0 1rem;
  315. margin-right: 10px;
  316. color: #fff;
  317. }
  318. .a-status .over{
  319. background: #666;
  320. }
  321. .a-status .loading{
  322. background: #FF6A00;
  323. }
  324. .a-option span{
  325. color: #666;
  326. }
  327. .a-option span:nth-child(2){
  328. display: inline-block;
  329. text-align: center;
  330. background: rgba(75, 175, 227, 1);
  331. color: #fff;
  332. }
  333. .active{
  334. background: rgba(75, 175, 227, 1);
  335. }
  336. .active span{
  337. color: #fff!important;
  338. }
  339. .tabs{
  340. border-bottom:2px solid rgba(75, 175, 227, 1)!important;
  341. }
  342. .paginationo-box{
  343. width: 20%;
  344. margin: 0 auto;
  345. }
  346. }
  347. @media screen and (max-width: 1000px){
  348. .zc-content{
  349. display: none;
  350. }
  351. .banner{
  352. display: none;
  353. }
  354. .bread{
  355. display: none;
  356. }
  357. .smart-title{
  358. margin-top:2rem;
  359. }
  360. .smart-device{
  361. width: 90%;
  362. margin: 0 auto;
  363. text-align: left;
  364. font-size: 1rem;
  365. overflow: hidden;
  366. }
  367. .smart-device span span{
  368. font-size: 1.5rem;
  369. display: inline-block;
  370. position: relative;
  371. padding-right: 1rem;
  372. margin-right: 1rem;
  373. font-weight: 900;
  374. }
  375. .smart-device span span:after{
  376. content: '';
  377. width: 1px;
  378. height: 15px;
  379. background: #666;
  380. position: absolute;
  381. right: 0;
  382. bottom: 7px;
  383. }
  384. .nav-company{
  385. margin: 3rem 0;
  386. box-shadow: 10px 10px 10px #dedede;
  387. }
  388. .nav-company>div{
  389. width: 100%;
  390. margin: 0 auto;
  391. background: #fff;
  392. padding: 1rem 0;
  393. }
  394. .nav-company ul{
  395. overflow: hidden;
  396. width: 80%;
  397. margin: 0 auto;
  398. display: flex;
  399. justify-content: center;
  400. flex-wrap: wrap;
  401. }
  402. .nav-company ul li{
  403. width: 5rem;
  404. overflow: hidden;
  405. text-align: center;
  406. cursor: pointer;
  407. margin-top: 1rem;
  408. }
  409. .nav-company ul li span{
  410. width: 80%;
  411. margin: 0 auto;
  412. display: inline-block;
  413. text-align: center;
  414. border: 1px solid rgba(75, 175, 227, 1);
  415. color: rgba(75, 175, 227, 1);
  416. padding: 0 4px;
  417. }
  418. .wrap-device-detail{
  419. background: #fff;
  420. width: 90%;
  421. margin: 0 auto;
  422. position: relative;
  423. padding-top: 1rem;
  424. overflow: hidden;
  425. }
  426. .smart-device-content .company-list{
  427. }
  428. .smart-device-content .company-list li{
  429. margin-bottom: 2rem;
  430. }
  431. .c-logo{
  432. width: 90%;
  433. margin: 0 auto;
  434. }
  435. .c-logo img{
  436. width: 100%;
  437. height:9rem;
  438. }
  439. .wrap-content{
  440. width: 90%;
  441. margin: 0 auto;
  442. }
  443. .c-content,.detail-btn{
  444. width: 98%;
  445. margin: 0 auto;
  446. overflow: hidden;
  447. }
  448. .c-content span{
  449. color: rgba(75, 175, 227, 1);
  450. margin: 10px 0;
  451. display: inline-block;
  452. /*display: none;*/
  453. }
  454. .c-content h3{
  455. font-size: 1rem;
  456. margin-bottom: 0.6rem;
  457. }
  458. .c-content p{
  459. font-size: 0.8rem;
  460. line-height: 1rem;
  461. height: 2rem;
  462. overflow: hidden;
  463. margin: 0.5rem 0;
  464. }
  465. .detail-btn{
  466. margin-bottom: 0.5rem;
  467. }
  468. .detail-btn>div{
  469. margin-bottom: 0.6rem;
  470. overflow: hidden;
  471. }
  472. .detail-btn .a-status span{
  473. margin-right: 1rem;
  474. }
  475. .detail-btn .a-option span:first-child{
  476. text-align: left;
  477. float: left;
  478. padding: 0;
  479. }
  480. .detail-btn .a-option span:last-child{
  481. text-align: center;
  482. float: right;
  483. }
  484. .detail-btn span{
  485. display: inline-block;
  486. padding: 0 1rem;
  487. font-size: 0.8rem;
  488. color: #fff;
  489. }
  490. .a-status .over{
  491. background: #666;
  492. }
  493. .a-status .loading{
  494. background: #FF6A00;
  495. }
  496. .a-option span{
  497. color: #666;
  498. }
  499. .a-option span:nth-child(2){
  500. display: inline-block;
  501. text-align: center;
  502. background: rgba(75, 175, 227, 1);
  503. color: #fff;
  504. }
  505. .active{
  506. background: rgba(75, 175, 227, 1);
  507. }
  508. .active span{
  509. color: #fff!important;
  510. }
  511. }
  512. .paginationo-box /deep/ .van-pagination__item--active{
  513. background: rgba(75, 175, 227, 1)!important;
  514. color: #fff!important;
  515. }
  516. .paginationo-box /deep/ .van-pagination__item{
  517. color: #333;
  518. }
  519. </style>