techDetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. <template>
  2. <div id="techDetail">
  3. <el-row>
  4. <el-col :span="24" class="main">
  5. <el-col :span="24" class="top">
  6. <el-col :span="7" class="left" v-if="detailInfo.image != ''">
  7. <el-carousel trigger="click" height="305px" :autoplay="false">
  8. <el-carousel-item v-for="(item, index) in detailInfo.image" :key="index">
  9. <el-image :src="item.url" style="width:99%;height:345px;border: 1px solid #ccc;"></el-image>
  10. </el-carousel-item>
  11. </el-carousel>
  12. </el-col>
  13. <el-col :span="7" v-else class="achieveImage">
  14. <!-- <el-image :src="achievezb" style="height:305px;"></el-image>
  15. <el-col :span="24" class="company textOver">
  16. {{ detailInfo.company }}
  17. </el-col>
  18. <el-col :span="24" class="aName">
  19. {{ detailInfo.name }}
  20. </el-col>
  21. <el-col :span="24" class="a-brief">{{ detailInfo.requirementdesc }}</el-col>
  22. <el-col :span="24" class="cont">
  23. <el-col :span="24" class="a-field">领域:{{ detailInfo.field }}</el-col>
  24. <el-col :span="24" class="a-contacts">联系人:{{ detailInfo.contacts }}</el-col>
  25. </el-col> -->
  26. {{ detailInfo.degreeurgency || '暂无' }}
  27. </el-col>
  28. <el-col :span="17" class="right">
  29. <el-col :span="24" class="name textOver">
  30. {{ detailInfo.name || '暂无' }}
  31. </el-col>
  32. <el-col :span="24">
  33. <el-col :span="4" class="otherInfo textOver">
  34. 需求方
  35. </el-col>
  36. <el-col :span="20" class="otherInfo textOver">
  37. {{ detailInfo.company }}
  38. <el-link v-if="detailInfo.companyweb != null || ''" :href="detailInfo.companyweb" :underline="false" target="_blank"
  39. >({{ detailInfo.companyweb }})</el-link
  40. >
  41. </el-col>
  42. </el-col>
  43. <el-col :span="24">
  44. <el-col :span="4" class="otherInfo textOver">
  45. 所属领域
  46. </el-col>
  47. <el-col :span="20" class="otherInfo textOver">
  48. {{ detailInfo.field || '暂无' }}
  49. </el-col>
  50. </el-col>
  51. <el-col :span="12">
  52. <el-col :span="8" class="otherInfo textOver">
  53. 注册类型
  54. </el-col>
  55. <el-col :span="16" class="otherInfo textOver"> {{ detailInfo.companytype || '暂无' }} </el-col>
  56. </el-col>
  57. <el-col :span="12">
  58. <el-col :span="8" class="otherInfo textOver">
  59. 注册时间
  60. </el-col>
  61. <el-col :span="16" class="otherInfo textOver"> {{ detailInfo.companydate || '暂无' }} </el-col>
  62. </el-col>
  63. <el-col :span="12">
  64. <el-col :span="8" class="otherInfo textOver">
  65. 注册资金
  66. </el-col>
  67. <el-col :span="16" class="otherInfo textOver"> {{ detailInfo.companycapital || '暂无' }}</el-col>
  68. </el-col>
  69. <el-col :span="12">
  70. <el-col :span="8" class="otherInfo textOver">
  71. 投资预算
  72. </el-col>
  73. <el-col :span="16" class="otherInfo textOver"> {{ detailInfo.budget || '暂无' }} </el-col>
  74. </el-col>
  75. <el-col :span="12">
  76. <el-col :span="8" class="otherInfo textOver">
  77. 紧急程度
  78. </el-col>
  79. <el-col :span="16" class="otherInfo textOver"> {{ detailInfo.degreeurgency || '暂无' }} </el-col>
  80. </el-col>
  81. <el-col :span="12">
  82. <el-col :span="8" class="otherInfo textOver">
  83. 合作方式
  84. </el-col>
  85. <el-col :span="16" class="otherInfo textOver">
  86. {{ detailInfo.cooperation ? detailInfo.cooperation : '暂无' }}
  87. </el-col>
  88. </el-col>
  89. <!-- <el-col :span="24">
  90. <el-col :span="4" class="otherInfo textOver">
  91. 机构代码
  92. </el-col>
  93. <el-col :span="20" class="otherInfo textOver"> {{ policyInfo.contact_tel ? policyInfo.contact_tel : '暂无' }} </el-col>
  94. </el-col> -->
  95. <el-col :span="12">
  96. <el-col :span="8" class="otherInfo textOver">
  97. 联系人
  98. </el-col>
  99. <el-col :span="16" class="otherInfo textOver">
  100. {{ detailInfo.contacts || '暂无' }}
  101. </el-col>
  102. </el-col>
  103. <el-col :span="12">
  104. <el-col :span="8" class="otherInfo textOver">
  105. 电子邮箱
  106. </el-col>
  107. <el-col :span="16" class="otherInfo textOver">
  108. {{ detailInfo.email || '暂无' }}
  109. </el-col>
  110. </el-col>
  111. </el-col>
  112. </el-col>
  113. <el-col :span="24" class="down">
  114. <el-col :span="24" class="downInfo">
  115. <el-col :span="4" class="tit">
  116. <h2>需求说明</h2>
  117. </el-col>
  118. <el-col :span="20" class="info">
  119. {{ detailInfo.requirementdesc || '暂无' }}
  120. </el-col>
  121. </el-col>
  122. <el-col :span="24" class="downInfo">
  123. <el-col :span="4" class="tit">
  124. <h2>预期目标</h2>
  125. </el-col>
  126. <el-col :span="20" class="info">
  127. {{ detailInfo.expect || '暂无' }}
  128. </el-col>
  129. </el-col>
  130. <el-col :span="24" class="downInfo">
  131. <el-col :span="4" class="tit">
  132. <h2>需求现状</h2>
  133. </el-col>
  134. <el-col :span="20" class="info">
  135. {{ detailInfo.present || '暂无' }}
  136. </el-col>
  137. </el-col>
  138. <el-col :span="24" class="downInfo">
  139. <el-col :span="4" class="tit">
  140. <h2>合作要求</h2>
  141. </el-col>
  142. <el-col :span="20" class="info">
  143. {{ detailInfo.condition || '暂无' }}
  144. </el-col>
  145. </el-col>
  146. </el-col>
  147. <el-col :span="24" class="anniu" v-if="displayBtn">
  148. <el-button type="primary" size="mini" v-if="this.user.uid != detailInfo.userid" @click="btnPhone()">交流洽谈</el-button>
  149. <el-button type="success" size="mini" v-if="this.user.uid != detailInfo.userid" @click="onSubmit()">供求对接</el-button>
  150. </el-col>
  151. </el-col>
  152. </el-row>
  153. <el-dialog title="对接" :visible.sync="dialogTableVisible">
  154. <chat :room="room"></chat>
  155. </el-dialog>
  156. </div>
  157. </template>
  158. <script>
  159. import _ from 'lodash';
  160. import { mapState, createNamespacedHelpers } from 'vuex';
  161. import chat from '@/layout/market/parts/chat.vue';
  162. const { mapActions: personalRoom } = createNamespacedHelpers('personalroom');
  163. const { mapActions: transaction } = createNamespacedHelpers('transaction');
  164. export default {
  165. name: 'techDetail',
  166. props: {
  167. detailInfo: { type: Object },
  168. displayBtn: { type: Boolean },
  169. },
  170. components: {
  171. chat,
  172. },
  173. data: function() {
  174. return {
  175. dialogTableVisible: false,
  176. room: {},
  177. achievezb: require('@/assets/3.png'),
  178. };
  179. },
  180. created() {},
  181. methods: {
  182. ...personalRoom(['create', 'countDelete']),
  183. ...transaction({ buyProduct: 'create' }),
  184. // 对接
  185. async btnPhone() {
  186. if (!this.room.id) {
  187. //TODO 请求房间号
  188. let obj = {};
  189. if (!this.user.uid) {
  190. // this.$message.error('游客身份无法与卖家对话,请先注册');
  191. this.$message({
  192. dangerouslyUseHTMLString: true,
  193. message: '<strong><a href="http://free.liaoningdoupo.com/platlive/webLogin" style="color:red;">游客身份无法与卖家对话,请先注册</a></strong>',
  194. type: 'error',
  195. });
  196. return;
  197. } else {
  198. obj.buyer_id = this.user.uid;
  199. obj.buyer_name = this.user.name;
  200. }
  201. if (!this.detailInfo.userid) {
  202. this.$message.error('缺少卖家信息,请联系卖家或管理员');
  203. return;
  204. } else {
  205. obj.seller_id = this.detailInfo.userid;
  206. obj.seller_name = this.detailInfo.contacts;
  207. }
  208. console.log(obj);
  209. let res = await this.create(obj);
  210. if (this.$checkRes(res)) {
  211. this.$set(this, `room`, res.data);
  212. }
  213. }
  214. this.dialogTableVisible = true;
  215. },
  216. // 洽谈
  217. onSubmit() {
  218. this.$emit('onSubmit', { data: this.detailInfo });
  219. },
  220. },
  221. computed: {
  222. ...mapState(['user']),
  223. pageTitle() {
  224. return `${this.$route.meta.title}`;
  225. },
  226. },
  227. metaInfo() {
  228. return { title: this.$route.meta.title };
  229. },
  230. };
  231. </script>
  232. <style lang="less" scoped>
  233. .main {
  234. margin: 10px 0 0 0;
  235. .top {
  236. height: 315px;
  237. overflow: hidden;
  238. .right {
  239. padding: 0 0 0 10px;
  240. .name {
  241. font-size: 18px;
  242. font-weight: bold;
  243. padding: 10px;
  244. border: 1px solid #ccc;
  245. }
  246. .otherInfo {
  247. padding: 10px;
  248. font-size: 16px;
  249. border: 1px solid #ccc;
  250. }
  251. }
  252. }
  253. .down {
  254. margin: 0 0 15px 0;
  255. .downInfo {
  256. border: 1px solid #ccc;
  257. .tit {
  258. height: 150px;
  259. line-height: 150px;
  260. text-align: center;
  261. border-right: 1px solid #ccc;
  262. }
  263. .info {
  264. font-size: 16px;
  265. padding: 10px;
  266. min-height: 150px;
  267. }
  268. }
  269. }
  270. .anniu {
  271. text-align: center;
  272. /deep/.el-button {
  273. margin: 0 10px;
  274. }
  275. }
  276. .achieveImage {
  277. height: 305px;
  278. line-height: 305px;
  279. text-align: center;
  280. font-size: 90px;
  281. // position: relative;
  282. // .el-image {
  283. // width: 100%;
  284. // height: 345px;
  285. // overflow: hidden;
  286. // position: relative;
  287. // }
  288. // .aName {
  289. // position: absolute;
  290. // top: 40px;
  291. // left: 0px;
  292. // text-align: center;
  293. // transform: scale(0.8);
  294. // font-weight: bolder;
  295. // // color: transparent;
  296. // // 文字边框宽度和颜色
  297. // -webkit-text-stroke: 1px #f18d2c;
  298. // font-style: oblique;
  299. // // 文字填充色
  300. // -webkit-text-fill-color: transparent;
  301. // letter-spacing: 3px;
  302. // }
  303. // .a-brief {
  304. // margin: 10px 0px;
  305. // position: absolute;
  306. // top: 55px;
  307. // left: 0px;
  308. // overflow: hidden;
  309. // line-height: 20px;
  310. // letter-spacing: 2px;
  311. // text-overflow: ellipsis;
  312. // -webkit-line-clamp: 12;
  313. // word-break: break-all;
  314. // display: -webkit-box;
  315. // -webkit-box-orient: vertical;
  316. // transform: scale(0.8);
  317. // }
  318. // .cont {
  319. // position: absolute;
  320. // left: 0px;
  321. // bottom: 20px;
  322. // transform: scale(0.8);
  323. // .a-field {
  324. // overflow: hidden;
  325. // text-overflow: ellipsis;
  326. // white-space: nowrap;
  327. // }
  328. // }
  329. // .company {
  330. // position: absolute;
  331. // top: 12px;
  332. // left: 30px;
  333. // width: 86%;
  334. // color: #ec6c2d;
  335. // -webkit-text-stroke: 1px #f18d2c;
  336. // font-style: oblique;
  337. // -webkit-text-fill-color: #ec6c2d;
  338. // letter-spacing: 3px;
  339. // }
  340. }
  341. }
  342. </style>