index.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. <template>
  2. <div style="background: #f0f0f0;padding-bottom:50px">
  3. <div class="banner">
  4. <img src="~@/assets/images/yqhd.png" alt="">
  5. </div>
  6. <div class="bread">
  7. <div>
  8. <span>当前位置:首页-<span style="color: rgba(75, 175, 227, 1)">园区活动</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: '/zhaoshang/list'}">政策服务</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="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.styleStatus==1" 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. styleStatus: item.styleStatus,
  154. detail: ''
  155. }
  156. this.zsList.push(i)
  157. })
  158. }
  159. })
  160. },
  161. detail(index) {
  162. this.$router.push({ path: '/service/detail?id=' + index })
  163. }
  164. }
  165. }
  166. </script>
  167. <style scoped>
  168. .banner img{
  169. width: 100% !important;
  170. }
  171. @media screen and (min-width: 1000px){
  172. .bread{
  173. background: #fff;
  174. position: relative;
  175. }
  176. .bread>div{
  177. width: 1200px;
  178. margin: 0 auto;
  179. text-align: left;
  180. padding: 0.8rem 0;
  181. font-size: 1rem;
  182. position: relative;
  183. }
  184. .area-nav{
  185. position:absolute;
  186. right: 0;
  187. top: 0.8rem;
  188. width: 40%;
  189. text-align: right;
  190. }
  191. .area-nav{
  192. display: flex;
  193. justify-content: center;
  194. flex-wrap: nowrap;
  195. }
  196. .area-nav li{
  197. flex: 1;
  198. text-align: center;
  199. border-bottom: 2px solid #f0f0f0;
  200. padding-bottom:0.7rem;
  201. }
  202. .area-nav a{
  203. color: #333;
  204. }
  205. .smart-title{
  206. margin-top:3rem;
  207. }
  208. .smart-device{
  209. width: 1200px;
  210. margin: 0 auto;
  211. text-align: left;
  212. font-size: 1rem;
  213. }
  214. .smart-device span span{
  215. font-size: 2rem;
  216. display: inline-block;
  217. position: relative;
  218. padding-right: 1rem;
  219. margin-right: 1rem;
  220. font-weight: 900;
  221. }
  222. .smart-device span span:after{
  223. content: '';
  224. width: 1px;
  225. height: 15px;
  226. background: #666;
  227. position: absolute;
  228. right: 0;
  229. bottom: 7px;
  230. }
  231. .nav-company{
  232. margin: 3rem 0;
  233. }
  234. .nav-company>div{
  235. width: 97%;
  236. margin: 0 auto;
  237. background: #fff;
  238. padding: 1rem 0;
  239. }
  240. .nav-company ul{
  241. display: flex;
  242. width: 80%;
  243. margin: 0 auto;
  244. justify-content: center;
  245. flex-wrap: nowrap;
  246. }
  247. .nav-company ul li{
  248. width: 6rem;
  249. text-align: center;
  250. cursor: pointer;
  251. }
  252. .nav-company ul li span{
  253. width: 80%;
  254. margin: 0 auto;
  255. display: inline-block;
  256. text-align: center;
  257. color: #333;
  258. }
  259. .wrap-device-detail{
  260. background: #fff;
  261. width: 90%;
  262. margin: 0 auto;
  263. position: relative;
  264. padding: 1rem 0;
  265. overflow: hidden;
  266. }
  267. .smart-device-content .company-list{
  268. }
  269. .smart-device-content .company-list li{
  270. margin-bottom: 2rem;
  271. }
  272. .c-logo{
  273. float: left;
  274. text-align: center;
  275. width: 30%;
  276. }
  277. .c-logo img{
  278. width: 90%;
  279. height:9rem;
  280. }
  281. .wrap-content{
  282. float: left;
  283. width: 70%;
  284. }
  285. .c-content,.detail-btn{
  286. width: 90%;
  287. margin: 1rem auto;
  288. overflow: hidden;
  289. }
  290. .c-content span{
  291. color: rgba(75, 175, 227, 1);
  292. }
  293. .c-content h3{
  294. font-size: 1rem;
  295. margin: 1rem 0;
  296. }
  297. .c-content p{
  298. font-size: 0.8rem;
  299. line-height: 1.6rem;
  300. height: 3rem;
  301. overflow: hidden;
  302. margin: 1rem 0;
  303. }
  304. .detail-btn{
  305. margin-bottom: 1rem;
  306. }
  307. .detail-btn .a-status{
  308. float: left;
  309. }
  310. .detail-btn .a-option{
  311. float: right;
  312. }
  313. .detail-btn span{
  314. display: inline-block;
  315. padding: 0 1rem;
  316. margin-right: 10px;
  317. color: #fff;
  318. }
  319. .a-status .over{
  320. background: #666;
  321. }
  322. .a-status .loading{
  323. background: #FF6A00;
  324. }
  325. .a-option span{
  326. color: #666;
  327. }
  328. .a-option span:nth-child(2){
  329. display: inline-block;
  330. text-align: center;
  331. background: rgba(75, 175, 227, 1);
  332. color: #fff;
  333. }
  334. .active{
  335. background: rgba(75, 175, 227, 1);
  336. }
  337. .active span{
  338. color: #fff!important;
  339. }
  340. .tabs{
  341. border-bottom:2px solid rgba(75, 175, 227, 1)!important;
  342. }
  343. .paginationo-box{
  344. width: 20%;
  345. margin: 0 auto;
  346. }
  347. }
  348. @media screen and (max-width: 1000px){
  349. .zc-content{
  350. display: none;
  351. }
  352. .banner{
  353. display: none;
  354. }
  355. .bread{
  356. display: none;
  357. }
  358. .smart-title{
  359. margin-top:2rem;
  360. }
  361. .smart-device{
  362. width: 90%;
  363. margin: 0 auto;
  364. text-align: left;
  365. font-size: 1rem;
  366. overflow: hidden;
  367. }
  368. .smart-device span span{
  369. font-size: 1.5rem;
  370. display: inline-block;
  371. position: relative;
  372. padding-right: 1rem;
  373. margin-right: 1rem;
  374. font-weight: 900;
  375. }
  376. .smart-device span span:after{
  377. content: '';
  378. width: 1px;
  379. height: 15px;
  380. background: #666;
  381. position: absolute;
  382. right: 0;
  383. bottom: 7px;
  384. }
  385. .nav-company{
  386. margin: 3rem 0;
  387. box-shadow: 10px 10px 10px #dedede;
  388. }
  389. .nav-company>div{
  390. width: 100%;
  391. margin: 0 auto;
  392. background: #fff;
  393. padding: 1rem 0;
  394. }
  395. .nav-company ul{
  396. overflow: hidden;
  397. width: 80%;
  398. margin: 0 auto;
  399. display: flex;
  400. justify-content: center;
  401. flex-wrap: wrap;
  402. }
  403. .nav-company ul li{
  404. width: 5rem;
  405. overflow: hidden;
  406. text-align: center;
  407. cursor: pointer;
  408. margin-top: 1rem;
  409. }
  410. .nav-company ul li span{
  411. width: 80%;
  412. margin: 0 auto;
  413. display: inline-block;
  414. text-align: center;
  415. border: 1px solid rgba(75, 175, 227, 1);
  416. color: rgba(75, 175, 227, 1);
  417. padding: 0 4px;
  418. }
  419. .wrap-device-detail{
  420. background: #fff;
  421. width: 90%;
  422. margin: 0 auto;
  423. position: relative;
  424. padding-top: 1rem;
  425. overflow: hidden;
  426. }
  427. .smart-device-content .company-list{
  428. }
  429. .smart-device-content .company-list li{
  430. margin-bottom: 2rem;
  431. }
  432. .c-logo{
  433. width: 90%;
  434. margin: 0 auto;
  435. }
  436. .c-logo img{
  437. width: 100%;
  438. height:9rem;
  439. }
  440. .wrap-content{
  441. width: 90%;
  442. margin: 0 auto;
  443. }
  444. .c-content,.detail-btn{
  445. width: 98%;
  446. margin: 0 auto;
  447. overflow: hidden;
  448. }
  449. .c-content span{
  450. color: rgba(75, 175, 227, 1);
  451. margin: 10px 0;
  452. display: inline-block;
  453. /*display: none;*/
  454. }
  455. .c-content h3{
  456. font-size: 1rem;
  457. margin-bottom: 0.6rem;
  458. }
  459. .c-content p{
  460. font-size: 0.8rem;
  461. line-height: 1rem;
  462. height: 2rem;
  463. overflow: hidden;
  464. margin: 0.5rem 0;
  465. }
  466. .detail-btn{
  467. margin-bottom: 0.5rem;
  468. }
  469. .detail-btn>div{
  470. margin-bottom: 0.6rem;
  471. overflow: hidden;
  472. }
  473. .detail-btn .a-status span{
  474. margin-right: 1rem;
  475. }
  476. .detail-btn .a-option span:first-child{
  477. text-align: left;
  478. float: left;
  479. padding: 0;
  480. }
  481. .detail-btn .a-option span:last-child{
  482. text-align: center;
  483. float: right;
  484. }
  485. .detail-btn span{
  486. display: inline-block;
  487. padding: 0 1rem;
  488. font-size: 0.8rem;
  489. color: #fff;
  490. }
  491. .a-status .over{
  492. background: #666;
  493. }
  494. .a-status .loading{
  495. background: #FF6A00;
  496. }
  497. .a-option span{
  498. color: #666;
  499. }
  500. .a-option span:nth-child(2){
  501. display: inline-block;
  502. text-align: center;
  503. background: rgba(75, 175, 227, 1);
  504. color: #fff;
  505. }
  506. .active{
  507. background: rgba(75, 175, 227, 1);
  508. }
  509. .active span{
  510. color: #fff!important;
  511. }
  512. }
  513. .paginationo-box /deep/ .van-pagination__item--active{
  514. background: rgba(75, 175, 227, 1)!important;
  515. color: #fff!important;
  516. }
  517. .paginationo-box /deep/ .van-pagination__item{
  518. color: #333;
  519. }
  520. </style>