dealDetail.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. <template>
  2. <div id="dealDetail">
  3. <el-row>
  4. <div class="w_1200">
  5. <el-col :span="24" class="main">
  6. <el-col :span="24" class="one">
  7. <el-image :src="topUrl"></el-image>
  8. </el-col>
  9. <el-col :span="24" class="two">
  10. <el-col :span="24" class="top">
  11. <span></span>
  12. </el-col>
  13. <el-col :span="24" class="info">
  14. <el-col :span="1" class="infoTop">
  15. <p>项目详情</p>
  16. <p><span></span></p>
  17. </el-col>
  18. <el-col :span="22" class="infoMess">
  19. <el-col :span="6" class="infoMessStep">
  20. <el-steps direction="vertical" :active="dealDetails.status">
  21. <el-step title="正在洽谈"></el-step>
  22. <el-step title="达成意向"></el-step>
  23. <el-step title="交易成功"></el-step>
  24. </el-steps>
  25. </el-col>
  26. <el-col :span="18" class="infoMessInfo">
  27. <!-- <el-image :src="infoUrl"></el-image> -->
  28. <el-col :span="24" class="message">
  29. <el-col :span="12" class="content">
  30. <p>项目名称</p>
  31. <p>服务名称:{{ dealDetails.product_name }}</p>
  32. <p>发布时间:{{ dealDetails.meta | getDate }}</p>
  33. <p>服务说明:{{ dealDetails.description }}</p>
  34. </el-col>
  35. <el-col :span="12" class="image">
  36. <el-col :span="24" class="user"> 购买人:{{ dealDetails.username }} </el-col>
  37. <el-col :span="24" class="images" v-if="dealDetails.pic">
  38. <el-image style="width:100%;height:380px;" :src="dealDetails.pic"></el-image>
  39. </el-col>
  40. </el-col>
  41. <el-col :span="24" class="btn">
  42. <el-button @click.native="onclick()">我要对接</el-button>
  43. </el-col>
  44. </el-col>
  45. </el-col>
  46. </el-col>
  47. <el-col :span="1" class="infoDown">
  48. <p><span></span></p>
  49. <p>项目详情</p>
  50. </el-col>
  51. </el-col>
  52. <el-col :span="24" class="top down">
  53. <span></span>
  54. </el-col>
  55. </el-col>
  56. </el-col>
  57. </div>
  58. </el-row>
  59. </div>
  60. </template>
  61. <script>
  62. import { mapState, createNamespacedHelpers } from 'vuex';
  63. const { mapActions: transaction } = createNamespacedHelpers('transaction');
  64. const { mapActions: product } = createNamespacedHelpers('enterpriseproject');
  65. export default {
  66. name: 'dealDetail',
  67. props: {},
  68. components: {},
  69. data: () => ({
  70. topUrl: require('@/assets/dynamic6.png'),
  71. infoUrl: require('@/assets/dynamic7.png'),
  72. dealDetails: {},
  73. }),
  74. created() {
  75. this.search();
  76. },
  77. computed: {
  78. id() {
  79. return this.$route.query.id;
  80. },
  81. },
  82. methods: {
  83. ...transaction(['fetch']),
  84. ...product({ list: 'newquery', newfetch: 'newfetch' }),
  85. async search() {
  86. let res = await this.fetch(this.id);
  87. res.data.status = parseInt(res.data.status);
  88. res.data.status = res.data.status + 1;
  89. this.$set(this, `dealDetails`, res.data);
  90. },
  91. async onclick() {
  92. let product_id = this.dealDetails.product_id;
  93. const res = await this.newfetch(product_id);
  94. console.log(res.errcode);
  95. // if (res.data.totaltype == '0') {
  96. // this.$router.push({ path: '/market/marketlists', query: { totaltype: 0, id: this.dealDetails.product_id, column_name: '技术供求', display: 2 } });
  97. // } else if (res.data.totaltype == '1') {
  98. // this.$router.push({ path: '/market/marketlists', query: { totaltype: 1, id: this.dealDetails.product_id, column_name: '科技产品', display: 2 } });
  99. // } else if (res.data.totaltype == '2') {
  100. // this.$router.push({ path: '/market/marketlists', query: { totaltype: 2, id: this.dealDetails.product_id, display: 2, column_name: '科技产品' } });
  101. // }
  102. },
  103. },
  104. filters: {
  105. getDate(meta) {
  106. let createdAt = _.get(meta, `createdAt`);
  107. let date = new Date(createdAt)
  108. .toLocaleDateString()
  109. .replace('/', '-')
  110. .replace('/', '-');
  111. return date;
  112. },
  113. },
  114. };
  115. </script>
  116. <style lang="less" scoped>
  117. .w_1200 {
  118. width: 80%;
  119. margin: 0 auto;
  120. }
  121. .main {
  122. float: left;
  123. width: 100%;
  124. min-height: 600px;
  125. margin: 30px 0;
  126. }
  127. .main .one {
  128. height: 160px;
  129. overflow: hidden;
  130. }
  131. // 头部横
  132. .main .two .top {
  133. float: left;
  134. width: 100%;
  135. height: 1px;
  136. }
  137. .main .two .top span {
  138. float: right;
  139. width: 30%;
  140. height: 1px;
  141. background: #9cb9cb;
  142. }
  143. // 底部横
  144. .main .two .down span {
  145. float: left;
  146. }
  147. .main .two .info {
  148. height: 700px;
  149. overflow: hidden;
  150. }
  151. // 内容左侧
  152. .main .two .info .infoTop {
  153. text-align: center;
  154. height: 700px;
  155. overflow: hidden;
  156. }
  157. .main .two .info .infoTop p:first-child {
  158. font-size: 20px;
  159. height: 120px;
  160. text-align: center;
  161. padding: 0 12px;
  162. color: #003e70;
  163. font-weight: bold;
  164. }
  165. .main .two .info .infoTop p:last-child {
  166. text-align: center;
  167. }
  168. .main .two .info .infoTop p:last-child span {
  169. display: inline-block;
  170. background: #003e70;
  171. width: 1px;
  172. height: 580px;
  173. }
  174. // 内容右侧
  175. .main .two .info .infoDown {
  176. text-align: center;
  177. height: 700px;
  178. overflow: hidden;
  179. }
  180. .main .two .info .infoDown p:first-child {
  181. text-align: center;
  182. }
  183. .main .two .info .infoDown p:first-child span {
  184. display: inline-block;
  185. background: #003e70;
  186. width: 1px;
  187. height: 580px;
  188. }
  189. .main .two .info .infoDown p:last-child {
  190. font-size: 20px;
  191. height: 120px;
  192. text-align: center;
  193. padding: 0 12px;
  194. color: #003e70;
  195. font-weight: bold;
  196. }
  197. // 中间内容
  198. .main .two .info .infoMess {
  199. min-height: 700px;
  200. overflow: hidden;
  201. }
  202. .main .two .info .infoMess .infoMessStep {
  203. padding: 130px 39px;
  204. min-height: 700px;
  205. }
  206. .main .two .info .infoMess .infoMessInfo {
  207. min-height: 700px;
  208. padding: 35px 0;
  209. position: relative;
  210. background-image: url(../../assets/dynamic7.png);
  211. background-repeat: no-repeat;
  212. background-size: 100% 100%;
  213. }
  214. .main .two .info .infoMess .infoMessInfo .el-image {
  215. width: auto;
  216. height: auto;
  217. max-width: 100%;
  218. max-height: 100%;
  219. }
  220. .main .two .info .infoMess .infoMessInfo .message {
  221. position: absolute;
  222. top: 13%;
  223. left: 13%;
  224. height: 515px;
  225. overflow: hidden;
  226. width: 73%;
  227. }
  228. .main .two .info .infoMess .infoMessInfo .message .content {
  229. min-height: 430px;
  230. overflow: hidden;
  231. p:first-child {
  232. float: left;
  233. width: 100%;
  234. font-size: 20px;
  235. text-align: center;
  236. padding: 20px 0;
  237. }
  238. p:nth-child(2) {
  239. float: left;
  240. width: 100%;
  241. font-size: 20px;
  242. text-align: left;
  243. padding: 0 0 15px 0;
  244. overflow: hidden;
  245. text-overflow: ellipsis;
  246. white-space: nowrap;
  247. }
  248. p:nth-child(3) {
  249. float: left;
  250. width: 100%;
  251. font-size: 20px;
  252. text-align: left;
  253. padding: 0 0 15px 0;
  254. }
  255. p:nth-child(4) {
  256. float: left;
  257. width: 100%;
  258. font-size: 20px;
  259. text-align: left;
  260. overflow: hidden;
  261. text-overflow: ellipsis;
  262. -webkit-line-clamp: 11;
  263. word-break: break-all;
  264. display: -webkit-box;
  265. -webkit-box-orient: vertical;
  266. line-height: 27px;
  267. }
  268. }
  269. .main .two .info .infoMess .infoMessInfo .message .image {
  270. min-height: 430px;
  271. overflow: hidden;
  272. .user {
  273. font-size: 20px;
  274. text-align: center;
  275. padding: 20px 0;
  276. }
  277. }
  278. .main .two .info .infoMess .infoMessInfo .message .btn {
  279. text-align: center;
  280. /deep/.el-button {
  281. border-radius: 25px;
  282. color: #fff;
  283. background: #0f75c2;
  284. }
  285. }
  286. /deep/.el-step__title {
  287. font-size: 30px;
  288. }
  289. /deep/.el-step__title.is-process {
  290. color: #c3c3c3;
  291. }
  292. /deep/.el-step__title.is-finish {
  293. color: #1c81bf;
  294. }
  295. /deep/.el-steps--vertical {
  296. height: 420px;
  297. }
  298. </style>