bidDetail.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616
  1. <template>
  2. <view class="content">
  3. <view class="box">
  4. <view class="name">{{pageData.title}}</view>
  5. <view class="hflex acenter jbetween cell">
  6. <view class="hflex acenter">
  7. <view class="type">{{pageData.type.name}}</view>
  8. <view class="city">{{pageData.citys}}</view>
  9. </view>
  10. <view class="text_style1">{{pageData.create_time}}发布</view>
  11. </view>
  12. <view class="info_bg">
  13. <view class="info_title cell">招标方信息</view>
  14. <view class="hflex acenter cell">
  15. <view class="label">公司名称</view>
  16. <view class="text_style2">{{pageData.com_name}}</view>
  17. </view>
  18. <view class="hflex acenter cell">
  19. <view class="label">联系人</view>
  20. <view class="text_style2">{{pageData.com_username}}</view>
  21. <view class="blue">{{pageData.com_mobile}}</view>
  22. </view>
  23. <view class="hflex acenter cell">
  24. <view class="label">披露时间</view>
  25. <view class="text_style2">{{pageData.pl_time_start}}</view>
  26. </view>
  27. </view>
  28. <view class="info_bg" v-if="pageData.win != null">
  29. <view class="info_title2 cell">中标方信息</view>
  30. <view class="hflex acenter cell">
  31. <view class="label">公司名称</view>
  32. <view class="text_style2">{{pageData.win.com_name}}</view>
  33. </view>
  34. <view class="hflex acenter cell">
  35. <view class="label">联系人</view>
  36. <view class="text_style2">{{pageData.win.com_username}}</view>
  37. <view class="blue">{{pageData.win.com_mobile}}</view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="box" style="margin-bottom: 186rpx;">
  42. <view class="box_title">招标简述</view>
  43. <scroll-view :scroll-y="true" class="text">
  44. <u-parse :content="pageData.summary"></u-parse>
  45. <!-- <view>{{pageData.summary}}</view> -->
  46. </scroll-view>
  47. <block v-for="(item,index) in pageData.files" :key="index">
  48. <view class="hflex acenter cell">
  49. <view class="text2">附件:</view>
  50. <u-icon name="attach" color="#cacaca" size="14"></u-icon>
  51. <view class="blue" @click="down(item.fileurl)">{{item.filename}}</view>
  52. <image src="https://ship.shipcc.cn/common/down.png" class="down_img" @click="down(item.fileurl)"></image>
  53. </view>
  54. </block>
  55. </view>
  56. <view class="bottom">
  57. <view class="bottom_btn" @click="share('Poster1')">分享</view>
  58. </view>
  59. <view class="share_content" :class="share_show?'':'share_content1'">
  60. <!-- <view style="width: 100%;height: 168rpx;"></view> -->
  61. <view class="share_box vflex">
  62. <view class="Poster1 pos_title2" data-etype="textarea" :data-enode="pageData.title">{{pageData.title}}</view>
  63. <view class="pos_title1">
  64. <view class="Poster1 pos_title1" data-etype="textarea" :data-enode="pageData.summary">{{pageData.summary}}</view>
  65. </view>
  66. <view class="hflex acenter jbetween">
  67. <view class="Poster1 left" :data-enode="'招标单位' + pageData.com_name">招标单位:{{pageData.com_name}}</view>
  68. <view class="Poster1 right" :data-enode="pageData.create_time">{{pageData.create_time}}</view>
  69. </view>
  70. <view class="hflex acenter share_text jcenter Poster1" style=" margin: 54rpx 190rpx 12rpx;" data-enode="长按或扫码查看">扫码查看招标详情</view>
  71. <view style="width: 100%;" class="vflex acenter jcenter">
  72. <image class="Poster1" style="width: 25rpx;height: 20rpx;" :data-enode="style.img1" data-etype="image" :src="style.img1"></image>
  73. <image class="Poster1" style="width: 100%;height: 2rpx;margin: 30rpx 0;" :data-enode="style.img2" data-etype="image" :src="style.img2"></image>
  74. </view>
  75. <view class="hflex acenter jbetween">
  76. <view class="vflex">
  77. <view class="share_name Poster1" style="margin: 54rpx 0 20rpx;" data-enode="船百知">船百知</view>
  78. <view class="share_text Poster1" style="margin: 0 0 36rpx;" data-enode="船百知伴你一起杨帆启航,驶向成功彼岸">船百知伴你一起杨帆启航,驶向成功彼岸</view>
  79. </view>
  80. <image class="Poster1" data-etype="image" :data-enode="style.code" :src="style.code" style="width: 136rpx;height: 136rpx;"></image>
  81. <!-- <image class="Poster1" data-etype="image" :data-enode="pageData.contact_headimg" :src="pageData.contact_headimg" style="width: 136rpx;height: 136rpx;"></image> -->
  82. </view>
  83. </view>
  84. <evils-el-poster width="325" height="467" @on-error="onError" :list="list" backgroundColor="rgb(255, 255, 255)" @on-success="onSuccess" ref="Eposter"></evils-el-poster>
  85. <view class="share_bottom">
  86. <view class="hflex acenter jcenter">
  87. <button class="vflex acenter jcenter bottom_item" open-type="share">
  88. <image src="https://ship.shipcc.cn/common/wx.png" class="item_icon"></image>
  89. <view class="item_text">微信好友</view>
  90. </button>
  91. <!-- <button class="vflex acenter jcenter bottom_item" open-type="share">
  92. <image src="https://ship.shipcc.cn/common/moments.png" class="item_icon"></image>
  93. <view class="item_text">朋友圈</view>
  94. </button> -->
  95. <view class="vflex acenter jcenter bottom_item" @click="saveImg">
  96. <image src="https://ship.shipcc.cn/common/download.png" class="item_icon"></image>
  97. <view class="item_text">保存图片</view>
  98. </view>
  99. </view>
  100. <view class="share_cancel" @click="close">取消</view>
  101. </view>
  102. </view>
  103. </view>
  104. </template>
  105. <script>
  106. import $api from '@/static/js/api.js'
  107. var that = ''
  108. export default {
  109. data() {
  110. return {
  111. pageData: {
  112. },
  113. id: '',
  114. share_show: false,
  115. list: {},
  116. style: {
  117. img1: 'https://ship.shipcc.cn/common/down2.png',
  118. img2: 'https://ship.shipcc.cn/common/line.png',
  119. code: 'https://ship.shipcc.cn/common/code.jpg'
  120. },
  121. }
  122. },
  123. onLoad(options) {
  124. that = this
  125. that.id = options.id
  126. that.getData()
  127. },
  128. onShareAppMessage(res) {
  129. console.log(res);
  130. if (res.from === 'button') {// 来自页面内分享按钮
  131. console.log(res.target)
  132. }
  133. return {
  134. title: '船百知', //分享的名称
  135. }
  136. },
  137. onShareTimeline(res) {
  138. console.log(res);
  139. return {
  140. title: '船百知',
  141. type: 0,
  142. summary: "",
  143. }
  144. },
  145. methods: {
  146. getData() {
  147. $api.req({
  148. url: '/data/api.Bidding/show',
  149. data: {
  150. id: that.id
  151. }
  152. }, function(res) {
  153. if(res.code == 1) {
  154. that.pageData = res.data
  155. var time=that.pageData.create_time.split(' ')
  156. var time2 = that.pageData.pl_time_start.split(' ')
  157. that.pageData.create_time = time[0]
  158. that.pageData.pl_time_start = time2[0]
  159. that.pageData.summary = that.pageData.summary.replace(/<.*?>/g,"")
  160. that.pageData.summary = that.pageData.summary.replace(/&ldquo;/g,"“")
  161. that.pageData.summary = that.pageData.summary.replace(/&rdquo;/g,"”")
  162. // var data = new Date((that.pageData.create_time).getTime()).format("yyyy-MM-dd")
  163. }
  164. })
  165. },
  166. down(url) {
  167. // $api.info('开始下载')
  168. uni.downloadFile({
  169. url: url, //仅为示例,并非真实的资源
  170. success: (res) => {
  171. console.log(res);
  172. if (res.statusCode === 200) {
  173. console.log(res.tempFilePath);
  174. uni.openDocument({
  175. filePath: res.tempFilePath, //临时路径
  176. showMenu: true,
  177. success: function(res2) {
  178. // uni.showToast({
  179. // icon: 'none',
  180. // mask: true,
  181. // title: '文件已保存:' + res2.savedFilePath, //保存路径
  182. // duration: 3000,
  183. // });
  184. }
  185. });
  186. }
  187. },
  188. fail: (err) => {
  189. }
  190. });
  191. },
  192. share(elClass) {
  193. let view = uni.createSelectorQuery().in(this).select(".Poster1");
  194. view.fields({
  195. size: true,
  196. rect: true,
  197. scrollOffset: true
  198. }, data => {
  199. }).exec();
  200. that.share_show = true
  201. that.$refs.Eposter.createForElRect(elClass,false)
  202. },
  203. close() {
  204. that.share_show = false
  205. },
  206. onSuccess(e) {
  207. console.log(e);
  208. that.tempImage = e
  209. },
  210. onError(err) {
  211. console.log('发生错误');
  212. console.log(err);
  213. },
  214. saveImg() {
  215. console.log(that.tempImage);
  216. uni.authorize({
  217. scope: 'scope.writePhotosAlbum',
  218. success() {
  219. uni.saveImageToPhotosAlbum({
  220. filePath: that.tempImage,
  221. success: function () {
  222. console.log('save success');
  223. $api.info('保存成功')
  224. that.close()
  225. }
  226. });
  227. }
  228. })
  229. },
  230. },
  231. }
  232. </script>
  233. <style lang="scss" scoped>
  234. .content {
  235. background: #F5F5F5;
  236. .box {
  237. width: 100%;
  238. box-sizing: border-box;
  239. padding: 16rpx 30rpx;
  240. background: #FFFFFF;
  241. margin: 0 0 20rpx;
  242. .name {
  243. font-size: 32rpx;
  244. font-weight: 500;
  245. color: #222222;
  246. line-height: 44rpx;
  247. }
  248. .cell {
  249. padding: 10rpx 0;
  250. }
  251. .type {
  252. background: #F0F8F3;
  253. border-radius: 4rpx;
  254. box-sizing: border-box;
  255. padding: 4rpx 16rpx;
  256. font-size: 22rpx;
  257. font-weight: 400;
  258. color: #46A95C;
  259. line-height: 32rpx;
  260. }
  261. .city {
  262. background: #F4F8FB;
  263. border-radius: 4rpx;
  264. box-sizing: border-box;
  265. padding: 4rpx 16rpx;
  266. font-size: 22rpx;
  267. font-weight: 400;
  268. color: #506DFF;
  269. line-height: 32rpx;
  270. margin-left: 20rpx;
  271. }
  272. .text_style1 {
  273. font-size: 24rpx;
  274. font-weight: 400;
  275. color: #666666;
  276. line-height: 28rpx;
  277. }
  278. .info_bg {
  279. margin: 20rpx 0;
  280. background: #F4F8FB;
  281. border-radius: 8rpx;
  282. box-sizing: border-box;
  283. padding: 20rpx;
  284. .info_title {
  285. font-size: 24rpx;
  286. font-weight: 500;
  287. color: #FF9C27;
  288. line-height: 34rpx;
  289. position: relative;
  290. padding-left: 24rpx;
  291. }
  292. .info_title::before {
  293. content: '';
  294. position: absolute;
  295. width: 12rpx;
  296. height: 12rpx;
  297. top: 21rpx;
  298. left: 0;
  299. background: #FF9C27;
  300. }
  301. .info_title2 {
  302. font-size: 24rpx;
  303. font-weight: 500;
  304. color: #506DFF;
  305. line-height: 34rpx;
  306. position: relative;
  307. padding-left: 24rpx;
  308. }
  309. .info_title2::before {
  310. content: '';
  311. position: absolute;
  312. width: 12rpx;
  313. height: 12rpx;
  314. top: 21rpx;
  315. left: 0;
  316. background: #506DFF;
  317. }
  318. .label {
  319. width: 136rpx;
  320. font-size: 24rpx;
  321. font-weight: 400;
  322. color: #9BA3AF;
  323. line-height: 34rpx;
  324. }
  325. .text_style2 {
  326. font-size: 24rpx;
  327. font-weight: 400;
  328. color: #3D4249;
  329. line-height: 34rpx;
  330. }
  331. }
  332. .blue {
  333. font-size: 24rpx;
  334. font-weight: 400;
  335. color: #506DFF;
  336. line-height: 28rpx;
  337. padding-left: 20rpx;
  338. }
  339. .box_title {
  340. font-size: 30rpx;
  341. font-weight: 500;
  342. color: #222222;
  343. line-height: 42rpx;
  344. position: relative;
  345. }
  346. .box_title::after {
  347. content: "";
  348. position: absolute;
  349. bottom: 0;
  350. left: 0;
  351. width: 100rpx;
  352. height: 12rpx;
  353. background: linear-gradient(270deg, rgba(255,255,255,0) 0%, #506DFF 100%);
  354. border-radius: 8rpx;
  355. opacity: 0.8;
  356. }
  357. .text {
  358. width: 100%;
  359. margin: 28rpx 0;
  360. // height: 760rpx;
  361. border: 1px solid #C6C6C6;
  362. box-sizing: border-box;
  363. padding: 20rpx;
  364. font-size: 24rpx;
  365. color: #222;
  366. line-height: 30rpx;
  367. }
  368. .text2 {
  369. font-size: 26rpx;
  370. font-weight: 400;
  371. color: #686868;
  372. line-height: 36rpx;
  373. }
  374. .down_img {
  375. width: 36rpx;
  376. height: 36rpx;
  377. padding-left: 16rpx;
  378. }
  379. }
  380. .bottom {
  381. width: 100%;
  382. z-index: 9;
  383. position: fixed;
  384. bottom: 0;
  385. height: 166rpx;
  386. background: #FFFFFF;
  387. box-sizing: border-box;
  388. padding: 8rpx 40rpx 74rpx;
  389. .bottom_btn {
  390. width: 100%;
  391. height: 84rpx;
  392. background: #506DFF;
  393. border-radius: 42rpx;
  394. font-size: 36rpx;
  395. font-weight: 500;
  396. color: #FFFFFF;
  397. text-align: center;
  398. line-height: 84rpx;
  399. }
  400. }
  401. .share_content {
  402. position: fixed;
  403. top: 0;
  404. left: 0;
  405. z-index: 99;
  406. width: 100vw;
  407. height: 100vh;
  408. background: rgba(0,0,0,0.5);
  409. backdrop-filter: blur(5px);
  410. padding: 0 0 0;
  411. .pos_img {
  412. width: 112rpx;
  413. height: 112rpx;
  414. margin: 0 12rpx 0 0;
  415. }
  416. .pos_title {
  417. font-size: 32rpx;
  418. font-weight: 500;
  419. color: #222222;
  420. line-height: 44rpx;
  421. margin: 0 0 0 0;
  422. }
  423. .pos_subtitle {
  424. font-size: 32rpx;
  425. font-weight: 400;
  426. color: #506DFF;
  427. line-height: 40rpx;
  428. margin: 24rpx 0 0;
  429. }
  430. .pos_title1 {
  431. /* font-size: 24rpx;
  432. font-weight: 400;
  433. color: #777777;
  434. line-height: 34rpx;
  435. text-overflow: ellipsis;
  436. overflow: hidden;
  437. display: -webkit-box;
  438. -webkit-box-orient: vertical;
  439. box-orient: vertical;
  440. line-clamp: 3;
  441. -webkit-line-clamp: 3; */
  442. text-overflow: ellipsis;
  443. overflow: hidden;
  444. display: -webkit-box;
  445. -webkit-box-orient: vertical;
  446. box-orient: vertical;
  447. line-clamp: 5;
  448. -webkit-line-clamp: 5;
  449. max-width: 100%;
  450. height: 200rpx;
  451. overflow: hidden;
  452. margin: 16rpx 0 28rpx;
  453. }
  454. .left {
  455. font-size: 22rpx;
  456. font-weight: 400;
  457. color: #585F6A;
  458. line-height: 32rpx;
  459. padding: 4rpx 12rpx;
  460. background: #F2F2F2;
  461. }
  462. .right {
  463. font-size: 22rpx;
  464. font-weight: 300;
  465. color: #585F6A;
  466. line-height: 26rpx;
  467. }
  468. .pos_title2 {
  469. text-overflow: ellipsis;
  470. overflow: hidden;
  471. display: -webkit-box;
  472. -webkit-box-orient: vertical;
  473. box-orient: vertical;
  474. line-clamp: 2;
  475. -webkit-line-clamp: 2;
  476. max-width: 100%;
  477. font-size: 30rpx;
  478. font-weight: 500;
  479. color: #222222;
  480. line-height: 42rpx;
  481. }
  482. .label {
  483. width: 120rpx;
  484. font-size: 24rpx;
  485. font-weight: 400;
  486. color: #444444;
  487. line-height: 34rpx;
  488. margin: 0 0 20rpx;
  489. }
  490. .text {
  491. font-size: 24rpx;
  492. font-weight: 400;
  493. color: #444444;
  494. line-height: 34rpx;
  495. margin: 0 0 20rpx;
  496. }
  497. .share_box {
  498. margin: 130rpx auto 0;
  499. width: 650rpx;
  500. background: #FFFFFF;
  501. border-radius: 20rpx;
  502. box-sizing: border-box;
  503. padding: 48rpx 40rpx 0;
  504. .share_name {
  505. width: 100%;
  506. font-size: 32rpx;
  507. font-weight: 500;
  508. color: #222222;
  509. line-height: 44rpx;
  510. }
  511. .share_label {
  512. width: 100%;
  513. font-size: 28rpx;
  514. font-weight: 400;
  515. color: #222222;
  516. line-height: 40rpx;
  517. }
  518. .share_text {
  519. width: 100%;
  520. font-size: 24rpx;
  521. font-weight: 400;
  522. color: #999999;
  523. line-height: 34rpx;
  524. text-overflow: ellipsis;
  525. overflow: hidden;
  526. display: -webkit-box;
  527. -webkit-box-orient: vertical;
  528. box-orient: vertical;
  529. line-clamp: 5;
  530. -webkit-line-clamp: 5;
  531. }
  532. .box_bottom {
  533. width: 100%;
  534. padding: 34rpx 0 16rpx;
  535. border-top: 1rpx dashed #C3C3C3;
  536. .bottom_left1 {
  537. font-size: 32rpx;
  538. font-weight: 500;
  539. color: #222222;
  540. line-height: 44rpx;
  541. padding-bottom: 20rpx;
  542. }
  543. .bottom_left2 {
  544. font-size: 22rpx;
  545. font-weight: 400;
  546. color: #999999;
  547. line-height: 32rpx;
  548. }
  549. .bottom_right {
  550. width: 136rpx;
  551. height: 136rpx;
  552. }
  553. }
  554. }
  555. .canvas {
  556. position: absolute;
  557. top: 188rpx;
  558. left: 50rpx;
  559. width: 650rpx;
  560. min-height: 494rpx;
  561. background: #FFFFFF;
  562. border-radius: 20rpx;
  563. }
  564. .share_bottom {
  565. position: fixed;
  566. bottom: 0;
  567. width: 100%;
  568. height: 388rpx;
  569. background: #F5F7FF;
  570. border-radius: 40rpx 40rpx 0px 0px;
  571. .bottom_item {
  572. width: 33%;
  573. margin: 50rpx 0 90rpx;
  574. border: none !important;
  575. background-color: #F5F7FF !important;
  576. .item_icon {
  577. width: 76rpx;
  578. height: 76rpx;
  579. }
  580. .item_text {
  581. font-size: 26rpx;
  582. font-weight: 400;
  583. color: #333333;
  584. line-height: 36rpx;
  585. margin-top: 12rpx;
  586. }
  587. }
  588. button::after {
  589. border: none !important;
  590. }
  591. .share_cancel {
  592. width: 100%;
  593. text-align: center;
  594. font-size: 32rpx;
  595. font-weight: 400;
  596. color: #333333;
  597. line-height: 44rpx;
  598. }
  599. }
  600. }
  601. .share_content1 {
  602. z-index: -99 !important;
  603. }
  604. }
  605. </style>