index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  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 :span="24">
  86. <el-col :span="24" class="downLeftTop">
  87. <el-image :src="downLeftTopImage"></el-image>
  88. <span class="topText">
  89. <span>最新发布</span>
  90. <span
  91. ><p>B</p>
  92. <p>anking</p></span
  93. >
  94. <span @click="fabu()">我要发布</span>
  95. </span>
  96. <el-col :span="24" class="downLeftInfos">
  97. <el-col :span="12" class="bankingLists" v-for="(item, index) in serviceList" :key="index" @click.native="serviceDetail(item.id)">
  98. <el-col :span="10">
  99. <el-image :src="item.image[0].url"></el-image>
  100. </el-col>
  101. <el-col :span="12">
  102. <span class="textOvers">{{ item.name }}</span>
  103. <span>{{ item.introduction }}</span>
  104. </el-col>
  105. </el-col>
  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. }),
  161. created() {
  162. this.search();
  163. },
  164. filters: {
  165. getDate(meta) {
  166. let createdAt = _.get(meta, `createdAt`);
  167. let date = new Date(createdAt)
  168. .toLocaleDateString()
  169. .replace('/', '-')
  170. .replace('/', '-');
  171. return date;
  172. },
  173. },
  174. computed: {},
  175. methods: {
  176. ...product(['query']),
  177. ...talentExperts({ expertQuery: 'query' }),
  178. async search() {
  179. let res = await this.query({ skip: 0, limit: 4, totaltype: '0' });
  180. if (this.$checkRes(res)) this.$set(this, `tecList`, res.data);
  181. res = await this.query({ skip: 0, limit: 4, totaltype: '1' });
  182. if (this.$checkRes(res)) this.$set(this, `productList`, res.data);
  183. res = await this.query({ skip: 0, limit: 4, totaltype: '2' });
  184. if (this.$checkRes(res)) this.$set(this, `serviceList`, res.data);
  185. // res = await this.expertQuery({ skip: 0, limit: 4 });
  186. // if (this.$checkRes(res)) this.$set(this, `expertsList`, res.data);
  187. },
  188. toProductList() {
  189. window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=1';
  190. },
  191. productDetail(id) {
  192. window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '';
  193. },
  194. toTecList() {
  195. window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=0';
  196. },
  197. tecDetail(id) {
  198. window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=0&&?&id=' + id + '';
  199. },
  200. toServiceList() {
  201. window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketlist?totaltype=2';
  202. },
  203. serviceDetail(id) {
  204. window.location.href = 'http://free.liaoningdoupo.com/platweb/supermaket/supermarketdetail?totaltype=2&&?&id=' + id + '';
  205. },
  206. fabu() {
  207. window.location.href = 'http://localhost:8002/enterprise/enterprisexuqiu';
  208. },
  209. },
  210. };
  211. </script>
  212. <style lang="less" scoped>
  213. .gongqiuImage {
  214. width: 100%;
  215. height: 100%;
  216. }
  217. .main {
  218. width: 100%;
  219. margin: 20px auto;
  220. float: none;
  221. }
  222. .marketTop {
  223. width: 80%;
  224. margin: 20px auto;
  225. float: none;
  226. }
  227. .left {
  228. float: left;
  229. height: 500px;
  230. margin: 10px 0 20px 0;
  231. overflow: hidden;
  232. }
  233. .leftTitle {
  234. text-align: center;
  235. position: relative;
  236. }
  237. .leftTitle p:first-child {
  238. font-size: 18px;
  239. color: #044b79;
  240. font-weight: bold;
  241. }
  242. .leftTitle p:last-child {
  243. float: left;
  244. width: 2px;
  245. height: 402px;
  246. background-color: #044b79;
  247. margin: 0 5px;
  248. position: absolute;
  249. left: 9px;
  250. }
  251. .infoLeft {
  252. height: 480px;
  253. padding: 0 10px;
  254. }
  255. .productList {
  256. position: relative;
  257. margin: 0 10px 10px 0;
  258. width: 48%;
  259. height: 220px;
  260. }
  261. .productList:nth-child(2n) {
  262. margin: 0 0 10px 0;
  263. }
  264. .productList .el-image {
  265. width: 100%;
  266. height: 220px;
  267. }
  268. .productList p {
  269. position: absolute;
  270. text-align: center;
  271. bottom: 0;
  272. height: 50px;
  273. line-height: 50px;
  274. text-indent: 5px;
  275. // padding: 0 10px;
  276. background: #044b799f;
  277. color: #fff;
  278. width: 100%;
  279. font-size: 18px;
  280. }
  281. .leftListDown {
  282. position: relative;
  283. }
  284. .leftListDown span:first-child {
  285. display: inline-block;
  286. width: 80%;
  287. height: 3px;
  288. background: rgba(4, 75, 121, 0.37);
  289. margin: 0 10px 0 0;
  290. position: absolute;
  291. left: -10px;
  292. top: 10px;
  293. }
  294. .leftListDown span:last-child {
  295. font-size: 16px;
  296. float: right;
  297. padding: 0 15px 0 0;
  298. color: #044b79;
  299. font-weight: 700;
  300. cursor: pointer;
  301. }
  302. .right {
  303. float: right;
  304. height: 500px;
  305. overflow: hidden;
  306. margin: 10px 0 20px 0;
  307. }
  308. .rightListTop {
  309. position: relative;
  310. }
  311. .rightListTop span:first-child {
  312. font-size: 16px;
  313. float: left;
  314. padding: 0 0 0 15px;
  315. color: #044b79;
  316. font-weight: 700;
  317. cursor: pointer;
  318. }
  319. .rightListTop span:last-child {
  320. display: inline-block;
  321. width: 80%;
  322. height: 3px;
  323. background: rgba(4, 75, 121, 0.37);
  324. margin: 0 10px 0 0;
  325. position: absolute;
  326. right: -10px;
  327. top: 10px;
  328. }
  329. .infoRight {
  330. height: 480px;
  331. padding: 0 10px;
  332. }
  333. .tecList {
  334. padding: 0 15px;
  335. margin: 10px 0 10px 0;
  336. }
  337. .tecList span:first-child {
  338. display: inline-block;
  339. width: 10px;
  340. height: 10px;
  341. background: #2188c6;
  342. border-radius: 90px;
  343. }
  344. .tecList span:nth-child(2n) {
  345. display: inline-block;
  346. width: 80%;
  347. font-size: 18px;
  348. padding: 0 15px;
  349. }
  350. .tecList span:nth-child(3n) {
  351. display: inline-block;
  352. width: 10%;
  353. text-align: center;
  354. background-color: #044b79;
  355. color: #ffffff;
  356. font-size: 16px;
  357. padding: 3px 0px;
  358. }
  359. .tecList span:last-child {
  360. display: block;
  361. width: 120px;
  362. text-align: left;
  363. padding: 5px 0 5px 25px;
  364. font-size: 14px;
  365. }
  366. .rightTitle {
  367. text-align: center;
  368. }
  369. .rightTitle p:first-child {
  370. width: 2px;
  371. height: 370px;
  372. background: #044b79;
  373. position: relative;
  374. left: 10px;
  375. top: -20px;
  376. }
  377. .rightTitle p:last-child {
  378. font-size: 18px;
  379. font-weight: bold;
  380. color: #044b79;
  381. }
  382. .marketDown {
  383. height: 780px;
  384. overflow: hidden;
  385. margin: 20px 0 20px 0;
  386. background: #e9edf6;
  387. padding-top: 30px;
  388. }
  389. .downMain {
  390. width: 80%;
  391. float: none;
  392. height: 550px;
  393. margin: 0 auto;
  394. }
  395. .downLeftTop .el-image {
  396. width: 40px;
  397. }
  398. .topText {
  399. width: 89%;
  400. border-bottom: 2.5px solid #044b79;
  401. display: inline-block;
  402. position: relative;
  403. top: -10px;
  404. margin: 0 0 0 5px;
  405. }
  406. .topText span:first-child {
  407. font-size: 24px;
  408. font-weight: 700;
  409. color: #000000;
  410. padding: 0 10px;
  411. top: 4px;
  412. }
  413. .topText span p:first-child {
  414. font-weight: 800;
  415. font-size: 34px;
  416. color: #92959a;
  417. top: 11px;
  418. display: inline-block;
  419. }
  420. .topText span p:last-child {
  421. display: inline-block;
  422. font-weight: 700;
  423. font-size: 18px;
  424. color: #92959a;
  425. }
  426. .topText span:last-child {
  427. float: right;
  428. font-size: 16px;
  429. font-weight: 700;
  430. color: #044b79;
  431. position: relative;
  432. top: 20px;
  433. cursor: pointer;
  434. }
  435. .bankingLists {
  436. height: 152px;
  437. }
  438. .bankingLists .el-image {
  439. width: 100%;
  440. height: 130px;
  441. display: inline-block;
  442. }
  443. .bankingLists span {
  444. margin: 0 5px 0 5px;
  445. display: inline-block;
  446. width: 80%;
  447. font-size: 18px;
  448. padding: 0 0 0 10px;
  449. color: #044b79;
  450. font-weight: 700;
  451. }
  452. .bankingLists span:last-child {
  453. margin: 10px 0 0 5px;
  454. font-size: 16px;
  455. overflow: hidden;
  456. text-overflow: ellipsis;
  457. -webkit-line-clamp: 4;
  458. word-break: break-all;
  459. display: -webkit-box;
  460. -webkit-box-orient: vertical;
  461. padding: 0 0 0 10px;
  462. color: #666;
  463. line-height: 25px;
  464. font-weight: 400;
  465. }
  466. .bankingList {
  467. height: 152px;
  468. }
  469. .bankingList .el-image {
  470. width: 100%;
  471. height: 130px;
  472. display: inline-block;
  473. }
  474. .bankingList span {
  475. margin: 0 5px 0 5px;
  476. display: inline-block;
  477. width: 80%;
  478. font-size: 18px;
  479. padding: 0 0 0 10px;
  480. color: #044b79;
  481. font-weight: 700;
  482. }
  483. .bankingList span:last-child {
  484. margin: 10px 0 0 5px;
  485. font-size: 16px;
  486. overflow: hidden;
  487. text-overflow: ellipsis;
  488. -webkit-line-clamp: 4;
  489. word-break: break-all;
  490. display: -webkit-box;
  491. -webkit-box-orient: vertical;
  492. padding: 0 0 0 10px;
  493. color: #666;
  494. line-height: 25px;
  495. font-weight: 400;
  496. }
  497. .downRightImage {
  498. float: none;
  499. width: 85%;
  500. margin: 0 auto;
  501. }
  502. .downRightImage .el-image {
  503. height: 200px;
  504. width: 100%;
  505. }
  506. .downRightList {
  507. float: none;
  508. width: 85%;
  509. margin: 10px auto;
  510. height: 50px;
  511. font-size: 16px;
  512. line-height: 35px;
  513. }
  514. .downRightList span:first-child {
  515. display: inline-block;
  516. width: 10px;
  517. height: 10px;
  518. background: #2188c6;
  519. border-radius: 90px;
  520. margin: 10px;
  521. }
  522. .downRightList span:last-child {
  523. width: 80%;
  524. overflow: hidden;
  525. white-space: nowrap;
  526. text-overflow: ellipsis;
  527. display: inline-block;
  528. }
  529. </style>