index.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  1. <template>
  2. <div id="index">
  3. <el-col :span="24" class="main">
  4. <el-col :span="24" class="marketTop">
  5. <el-col :span="12" class="left">
  6. <el-col :span="1" class="leftTitle">
  7. <p>科<br />技<br />产<br />品</p>
  8. <p></p>
  9. </el-col>
  10. <el-col :span="23" class="infoLeft">
  11. <el-col :span="12" class="productList" v-for="(item, index) in productList" :key="index" @click.native="productDetail(item.id)">
  12. <el-image :src="item.image[0].url"></el-image>
  13. <p class="textOver">{{ item.name }}</p>
  14. </el-col>
  15. </el-col>
  16. <el-col :span="24" class="leftListDown"><span></span><span @click="toProductList">MORE</span></el-col>
  17. </el-col>
  18. <el-col :span="12" class="right">
  19. <el-col :span="24" class="rightListTop"><span @click="toTecList">MORE</span><span></span></el-col>
  20. <el-col :span="23" class="infoRight">
  21. <el-col :span="24" class="tecList" v-for="(item, index) in tecList" :key="index">
  22. <span></span>
  23. <span class="textOver" @click="tecDetail(item.id)">{{ item.name }}</span>
  24. <span>对接</span>
  25. <span>{{ item.meta | getDate }}</span>
  26. </el-col>
  27. </el-col>
  28. <el-col :span="1" class="rightTitle">
  29. <p></p>
  30. <p>技<br />术<br />供<br />求</p>
  31. </el-col>
  32. </el-col>
  33. <el-col :span="24">
  34. <el-image :src="gongqiuImage" class="gongqiuImage"></el-image>
  35. </el-col>
  36. </el-col>
  37. <el-col :span="24" class="marketDown">
  38. <el-col :span="24" class="downMain">
  39. <el-col :span="12" class="left">
  40. <el-col :span="24" class="downLeftTop">
  41. <el-image :src="downLeftTopImage"></el-image>
  42. <span class="topText">
  43. <span>服务供求</span>
  44. <span
  45. ><p>S</p>
  46. <p>ervice</p></span
  47. >
  48. <span @click="toServiceList">更多</span>
  49. </span>
  50. </el-col>
  51. <el-col :span="24" class="downLeftInfo">
  52. <el-col :span="24" class="bankingList" v-for="(item, index) in serviceList" :key="index" @click.native="serviceDetail(item.id)">
  53. <el-col :span="10">
  54. <el-image :src="item.image[0].url"></el-image>
  55. </el-col>
  56. <el-col :span="14">
  57. <span class="textOver">{{ item.name }}</span>
  58. <span>{{ item.introduction }}</span>
  59. </el-col>
  60. </el-col>
  61. </el-col>
  62. </el-col>
  63. <el-col :span="12" class="right">
  64. <el-col :span="24" class="downLeftTop">
  65. <el-image :src="downLeftTopImage"></el-image>
  66. <span class="topText">
  67. <span>金融供求</span>
  68. <span
  69. ><p>B</p>
  70. <p>anking</p></span
  71. >
  72. <span>更多</span>
  73. </span>
  74. </el-col>
  75. <el-col :span="24" class="downRightImage">
  76. <el-image src="http://img2.imgtn.bdimg.com/it/u=1300722955,3173826431&fm=26&gp=0.jpg"></el-image>
  77. </el-col>
  78. <el-col :span="24">
  79. <el-col :span="24" class="downRightList" v-for="(item, index) in bankingList" :key="index">
  80. <span></span>
  81. <span>{{ item.title }}</span>
  82. </el-col>
  83. </el-col>
  84. </el-col>
  85. </el-col>
  86. </el-col>
  87. <el-col :span="24" class="marketNew">
  88. <el-col :span="24" class="downLeftTop">
  89. <el-image :src="downLeftTopImage"></el-image>
  90. <span class="topTexts">
  91. <span>最新发布</span>
  92. <span
  93. ><p>N</p>
  94. <p>ewing</p></span
  95. >
  96. <span @click="fabu()">我要发布</span>
  97. </span>
  98. <el-col :span="24" class="downLeftInfos">
  99. <el-col :span="12" class="bankingLists" v-for="(item, index) in newList" :key="index" @click.native="productDetail(item.id)">
  100. <el-col :span="10">
  101. <el-image :src="item.image[0].url"></el-image>
  102. </el-col>
  103. <el-col :span="12">
  104. <span class="textOvers">{{ item.name }}</span>
  105. <span>{{ item.introduction }}</span>
  106. </el-col>
  107. </el-col>
  108. </el-col>
  109. </el-col>
  110. </el-col>
  111. </el-col>
  112. </div>
  113. </template>
  114. <script>
  115. import _ from 'lodash';
  116. import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
  117. const { mapActions: product } = createNamespacedHelpers('marketproduct');
  118. const { mapActions: talentExperts } = createNamespacedHelpers('talentExperts');
  119. var moment = require('moment');
  120. export default {
  121. name: 'index',
  122. props: {},
  123. components: {},
  124. data: () => ({
  125. gongqiuImage: require('@/assets/live/main2.png'),
  126. downLeftTopImage: require('@/assets/live/square_big.png'),
  127. productList: [],
  128. tecList: [],
  129. bankingList: [
  130. {
  131. image:
  132. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1588061253920&di=18e7a68061c9debd24a2db64967b891c&imgtype=0&src=http%3A%2F%2Fbpic.588ku.com%2Fback_pic%2F03%2F51%2F81%2F1257923ada49020.jpg',
  133. title: '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  134. content:
  135. '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  136. },
  137. {
  138. image:
  139. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1588061253920&di=18e7a68061c9debd24a2db64967b891c&imgtype=0&src=http%3A%2F%2Fbpic.588ku.com%2Fback_pic%2F03%2F51%2F81%2F1257923ada49020.jpg',
  140. title: '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  141. content:
  142. '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  143. },
  144. {
  145. image:
  146. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1588061253920&di=18e7a68061c9debd24a2db64967b891c&imgtype=0&src=http%3A%2F%2Fbpic.588ku.com%2Fback_pic%2F03%2F51%2F81%2F1257923ada49020.jpg',
  147. title: '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  148. content:
  149. '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  150. },
  151. {
  152. image:
  153. 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1588061253920&di=18e7a68061c9debd24a2db64967b891c&imgtype=0&src=http%3A%2F%2Fbpic.588ku.com%2Fback_pic%2F03%2F51%2F81%2F1257923ada49020.jpg',
  154. title: '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  155. content:
  156. '测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据测试型数据测试型数测试型数测试型数据',
  157. },
  158. ],
  159. serviceList: [],
  160. newList: [],
  161. }),
  162. created() {
  163. this.search();
  164. },
  165. filters: {
  166. getDate(meta) {
  167. let createdAt = _.get(meta, `createdAt`);
  168. let date = new Date(createdAt)
  169. .toLocaleDateString()
  170. .replace('/', '-')
  171. .replace('/', '-');
  172. return date;
  173. },
  174. },
  175. computed: {},
  176. methods: {
  177. ...product(['query']),
  178. ...talentExperts({ expertQuery: 'query' }),
  179. async search() {
  180. let res = await this.query({ skip: 0, limit: 4, totaltype: '0' });
  181. if (this.$checkRes(res)) this.$set(this, `tecList`, res.data);
  182. res = await this.query({ skip: 0, limit: 4, totaltype: '1' });
  183. if (this.$checkRes(res)) this.$set(this, `productList`, res.data);
  184. if (this.$checkRes(res)) this.$set(this, `newList`, res.data);
  185. res = await this.query({ skip: 0, limit: 4, totaltype: '2' });
  186. if (this.$checkRes(res)) this.$set(this, `serviceList`, res.data);
  187. // res = await this.expertQuery({ skip: 0, limit: 4 });
  188. // if (this.$checkRes(res)) this.$set(this, `expertsList`, res.data);
  189. },
  190. toProductList() {
  191. // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=1';
  192. window.open('http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=1');
  193. },
  194. productDetail(id) {
  195. // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '';
  196. window.open('http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '');
  197. },
  198. toTecList() {
  199. // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=0';
  200. window.open('http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=0');
  201. },
  202. tecDetail(id) {
  203. // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=0&&?&id=' + id + '';
  204. window.open('//free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=0&&?&id=' + id + '');
  205. },
  206. toServiceList() {
  207. // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=2';
  208. window.open('http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=2');
  209. },
  210. serviceDetail(id) {
  211. // window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '';
  212. window.open('http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '');
  213. },
  214. fabu() {
  215. // window.location.href = 'http://free.liaoningdoupo.com/platweb/enterprise/enterprisexuqiu';
  216. window.open('http://free.liaoningdoupo.com/platweb/enterprise/enterprisexuqiu');
  217. },
  218. },
  219. };
  220. </script>
  221. <style lang="less" scoped>
  222. .gongqiuImage {
  223. width: 100%;
  224. height: 100%;
  225. }
  226. .main {
  227. width: 100%;
  228. margin: 20px auto;
  229. float: none;
  230. }
  231. .marketTop {
  232. width: 80%;
  233. margin: 20px auto;
  234. float: none;
  235. }
  236. .left {
  237. float: left;
  238. height: 500px;
  239. margin: 10px 0 20px 0;
  240. overflow: hidden;
  241. }
  242. .leftTitle {
  243. text-align: center;
  244. position: relative;
  245. }
  246. .leftTitle p:first-child {
  247. font-size: 18px;
  248. color: #044b79;
  249. font-weight: bold;
  250. }
  251. .leftTitle p:last-child {
  252. float: left;
  253. width: 2px;
  254. height: 402px;
  255. background-color: #044b79;
  256. margin: 0 5px;
  257. position: absolute;
  258. left: 9px;
  259. }
  260. .infoLeft {
  261. height: 480px;
  262. padding: 0 10px;
  263. }
  264. .productList {
  265. position: relative;
  266. margin: 0 10px 10px 0;
  267. width: 48%;
  268. height: 220px;
  269. }
  270. .productList:nth-child(2n) {
  271. margin: 0 0 10px 0;
  272. }
  273. .productList .el-image {
  274. width: 100%;
  275. height: 220px;
  276. }
  277. .productList p {
  278. position: absolute;
  279. text-align: center;
  280. bottom: 0;
  281. height: 50px;
  282. line-height: 50px;
  283. text-indent: 5px;
  284. // padding: 0 10px;
  285. background: #044b799f;
  286. color: #fff;
  287. width: 100%;
  288. font-size: 18px;
  289. }
  290. .leftListDown {
  291. position: relative;
  292. }
  293. .leftListDown span:first-child {
  294. display: inline-block;
  295. width: 80%;
  296. height: 3px;
  297. background: rgba(4, 75, 121, 0.37);
  298. margin: 0 10px 0 0;
  299. position: absolute;
  300. left: -10px;
  301. top: 10px;
  302. }
  303. .leftListDown span:last-child {
  304. font-size: 16px;
  305. float: right;
  306. padding: 0 15px 0 0;
  307. color: #044b79;
  308. font-weight: 700;
  309. cursor: pointer;
  310. }
  311. .right {
  312. float: right;
  313. height: 500px;
  314. overflow: hidden;
  315. margin: 10px 0 20px 0;
  316. }
  317. .rightListTop {
  318. position: relative;
  319. }
  320. .rightListTop span:first-child {
  321. font-size: 16px;
  322. float: left;
  323. padding: 0 0 0 15px;
  324. color: #044b79;
  325. font-weight: 700;
  326. cursor: pointer;
  327. }
  328. .rightListTop span:last-child {
  329. display: inline-block;
  330. width: 80%;
  331. height: 3px;
  332. background: rgba(4, 75, 121, 0.37);
  333. margin: 0 10px 0 0;
  334. position: absolute;
  335. right: -10px;
  336. top: 10px;
  337. }
  338. .infoRight {
  339. height: 480px;
  340. padding: 0 10px;
  341. }
  342. .tecList {
  343. padding: 0 15px;
  344. margin: 10px 0 10px 0;
  345. }
  346. .tecList span:first-child {
  347. display: inline-block;
  348. width: 10px;
  349. height: 10px;
  350. background: #2188c6;
  351. border-radius: 90px;
  352. }
  353. .tecList span:nth-child(2n) {
  354. display: inline-block;
  355. width: 80%;
  356. font-size: 18px;
  357. padding: 0 15px;
  358. }
  359. .tecList span:nth-child(3n) {
  360. display: inline-block;
  361. width: 10%;
  362. text-align: center;
  363. background-color: #044b79;
  364. color: #ffffff;
  365. font-size: 16px;
  366. padding: 3px 0px;
  367. }
  368. .tecList span:last-child {
  369. display: block;
  370. width: 120px;
  371. text-align: left;
  372. padding: 5px 0 5px 25px;
  373. font-size: 14px;
  374. }
  375. .rightTitle {
  376. text-align: center;
  377. }
  378. .rightTitle p:first-child {
  379. width: 2px;
  380. height: 370px;
  381. background: #044b79;
  382. position: relative;
  383. left: 10px;
  384. top: -20px;
  385. }
  386. .rightTitle p:last-child {
  387. font-size: 18px;
  388. font-weight: bold;
  389. color: #044b79;
  390. }
  391. .marketDown {
  392. height: 550px;
  393. overflow: hidden;
  394. margin: 20px 0 20px 0;
  395. background: #e9edf6;
  396. padding-top: 30px;
  397. }
  398. .downMain {
  399. width: 80%;
  400. float: none;
  401. height: 550px;
  402. margin: 0 auto;
  403. }
  404. .downLeftTop .el-image {
  405. width: 40px;
  406. }
  407. .topTexts {
  408. width: 100%;
  409. border-bottom: 2.5px solid #044b79;
  410. display: inline-block;
  411. position: relative;
  412. top: -10px;
  413. margin: 0 0 0 5px;
  414. }
  415. .topTexts span:first-child {
  416. font-size: 24px;
  417. font-weight: 700;
  418. color: #000000;
  419. padding: 0 10px;
  420. top: 4px;
  421. }
  422. .topTexts span p:first-child {
  423. font-weight: 800;
  424. font-size: 34px;
  425. color: #92959a;
  426. top: 11px;
  427. display: inline-block;
  428. }
  429. .topTexts span p:last-child {
  430. display: inline-block;
  431. font-weight: 700;
  432. font-size: 18px;
  433. color: #92959a;
  434. }
  435. .topTexts span:last-child {
  436. float: right;
  437. font-size: 16px;
  438. font-weight: 700;
  439. color: #044b79;
  440. position: relative;
  441. top: 20px;
  442. cursor: pointer;
  443. }
  444. .topText {
  445. width: 89%;
  446. border-bottom: 2.5px solid #044b79;
  447. display: inline-block;
  448. position: relative;
  449. top: -10px;
  450. margin: 0 0 0 5px;
  451. }
  452. .topText span:first-child {
  453. font-size: 24px;
  454. font-weight: 700;
  455. color: #000000;
  456. padding: 0 10px;
  457. top: 4px;
  458. }
  459. .topText span p:first-child {
  460. font-weight: 800;
  461. font-size: 34px;
  462. color: #92959a;
  463. top: 11px;
  464. display: inline-block;
  465. }
  466. .topText span p:last-child {
  467. display: inline-block;
  468. font-weight: 700;
  469. font-size: 18px;
  470. color: #92959a;
  471. }
  472. .topText span:last-child {
  473. float: right;
  474. font-size: 16px;
  475. font-weight: 700;
  476. color: #044b79;
  477. position: relative;
  478. top: 20px;
  479. cursor: pointer;
  480. }
  481. .bankingLists {
  482. height: 152px;
  483. }
  484. .bankingLists .el-image {
  485. width: 100%;
  486. height: 130px;
  487. display: inline-block;
  488. }
  489. .bankingLists span {
  490. margin: 0 5px 0 5px;
  491. display: inline-block;
  492. width: 80%;
  493. font-size: 18px;
  494. padding: 0 0 0 10px;
  495. color: #044b79;
  496. font-weight: 700;
  497. }
  498. .bankingLists span:last-child {
  499. margin: 10px 0 0 5px;
  500. font-size: 16px;
  501. overflow: hidden;
  502. text-overflow: ellipsis;
  503. -webkit-line-clamp: 4;
  504. word-break: break-all;
  505. display: -webkit-box;
  506. -webkit-box-orient: vertical;
  507. padding: 0 0 0 10px;
  508. color: #666;
  509. line-height: 25px;
  510. font-weight: 400;
  511. }
  512. .bankingList {
  513. height: 152px;
  514. }
  515. .bankingList .el-image {
  516. width: 100%;
  517. height: 130px;
  518. display: inline-block;
  519. }
  520. .bankingList span {
  521. margin: 0 5px 0 5px;
  522. display: inline-block;
  523. width: 80%;
  524. font-size: 18px;
  525. padding: 0 0 0 10px;
  526. color: #044b79;
  527. font-weight: 700;
  528. }
  529. .bankingList span:last-child {
  530. margin: 10px 0 0 5px;
  531. font-size: 16px;
  532. overflow: hidden;
  533. text-overflow: ellipsis;
  534. -webkit-line-clamp: 4;
  535. word-break: break-all;
  536. display: -webkit-box;
  537. -webkit-box-orient: vertical;
  538. padding: 0 0 0 10px;
  539. color: #666;
  540. line-height: 25px;
  541. font-weight: 400;
  542. }
  543. .downRightImage {
  544. float: none;
  545. width: 85%;
  546. margin: 0 auto;
  547. }
  548. .downRightImage .el-image {
  549. height: 200px;
  550. width: 100%;
  551. }
  552. .downRightList {
  553. float: none;
  554. width: 85%;
  555. margin: 10px auto;
  556. height: 50px;
  557. font-size: 16px;
  558. line-height: 35px;
  559. }
  560. .downRightList span:first-child {
  561. display: inline-block;
  562. width: 10px;
  563. height: 10px;
  564. background: #2188c6;
  565. border-radius: 90px;
  566. margin: 10px;
  567. }
  568. .downRightList span:last-child {
  569. width: 80%;
  570. overflow: hidden;
  571. white-space: nowrap;
  572. text-overflow: ellipsis;
  573. display: inline-block;
  574. }
  575. .marketNew {
  576. float: none;
  577. width: 80%;
  578. margin: 30px auto;
  579. height: 400px;
  580. }
  581. .downLeftInfos {
  582. height: 330px;
  583. }
  584. </style>