achieveInfo.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. <template>
  2. <div id="achieveInfo">
  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="form.image != ''">
  7. <el-carousel trigger="click" height="345px" :autoplay="false">
  8. <el-carousel-item v-for="(item, index) in form.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. <p class="name textOver">{{ form.name }}</p>
  15. <p class="brief">{{ form.achievebrief }}</p>
  16. <p class="other">
  17. <span class="textOver">领域:{{ form.field }}</span>
  18. <span class="textOver">联系人:{{ form.contacts }}</span>
  19. </p>
  20. </el-col>
  21. <el-col :span="17" class="right">
  22. <el-col :span="24" class="name textOver">
  23. {{ form.name || '暂无' }}
  24. </el-col>
  25. <el-col :span="24">
  26. <el-col :span="4" class="otherInfo textOver">
  27. 成果单位
  28. </el-col>
  29. <el-col :span="20" class="otherInfo textOver">
  30. {{ form.company }}
  31. <el-link v-if="form.companyweb != null || ''" :href="form.companyweb" :underline="false" target="_blank">({{ form.companyweb }})</el-link>
  32. </el-col>
  33. </el-col>
  34. <el-col :span="12">
  35. <el-col :span="8" class="otherInfo textOver">
  36. 所属领域
  37. </el-col>
  38. <el-col :span="16" class="otherInfo textOver">
  39. {{ form.field || '暂无' }}
  40. </el-col>
  41. </el-col>
  42. <el-col :span="12">
  43. <el-col :span="8" class="otherInfo textOver">
  44. 合作方式
  45. </el-col>
  46. <el-col :span="16" class="otherInfo textOver">
  47. {{ form.cooperation || '暂无' }}
  48. </el-col>
  49. </el-col>
  50. <el-col :span="12">
  51. <el-col :span="8" class="otherInfo textOver">
  52. 成果状态
  53. </el-col>
  54. <el-col :span="16" class="otherInfo textOver">
  55. {{ form.achievestatus || '暂无' }}
  56. </el-col>
  57. </el-col>
  58. <el-col :span="12">
  59. <el-col :span="8" class="otherInfo textOver">
  60. 成果来源
  61. </el-col>
  62. <el-col :span="16" class="otherInfo textOver">
  63. {{ form.achievesource || '暂无' }}
  64. </el-col>
  65. </el-col>
  66. <el-col :span="12">
  67. <el-col :span="8" class="otherInfo textOver">
  68. 成果权属
  69. </el-col>
  70. <el-col :span="16" class="otherInfo textOver">
  71. {{ form.achieveown || '暂无' }}
  72. </el-col>
  73. </el-col>
  74. <el-col :span="12">
  75. <el-col :span="8" class="otherInfo textOver">
  76. 意向价格
  77. </el-col>
  78. <el-col :span="16" class="otherInfo textOver">
  79. {{ form.intentionprice || '暂无' }}
  80. </el-col>
  81. </el-col>
  82. <el-col :span="12">
  83. <el-col :span="8" class="otherInfo textOver">
  84. 联系人
  85. </el-col>
  86. <el-col :span="16" class="otherInfo textOver">
  87. {{ form.contacts || '暂无' }}
  88. </el-col>
  89. </el-col>
  90. <el-col :span="12">
  91. <el-col :span="8" class="otherInfo textOver">
  92. 联系方式
  93. </el-col>
  94. <el-col :span="16" class="otherInfo textOver">
  95. <el-tooltip class="item" effect="dark" placement="top">
  96. <div slot="content">{{ form.email }}/{{ form.qqwx || '暂无' }}</div>
  97. <p class="textOver">{{ form.email }}/{{ form.qqwx || '暂无' }}</p>
  98. </el-tooltip>
  99. </el-col>
  100. </el-col>
  101. <el-col :span="24">
  102. <el-col :span="4" class="otherInfo textOver">
  103. 项目路演
  104. </el-col>
  105. <el-col :span="20" class="otherInfo textOver">
  106. <el-link :href="form.roadshow" :underline="false">{{ form.roadshow ? '观看演示文件' : '暂无' }}</el-link>
  107. </el-col>
  108. </el-col>
  109. <el-col :span="24">
  110. <el-col :span="4" class="otherInfo textOver">
  111. 专利信息
  112. </el-col>
  113. <el-col :span="20" class="otherInfo textOver" style="padding: 6px">
  114. <el-button type="primary" size="mini" @click="dialogTableVisible1 = true">专利信息</el-button>
  115. </el-col>
  116. </el-col>
  117. </el-col>
  118. </el-col>
  119. <el-col :span="24" class="down">
  120. <el-col :span="24" class="downInfo">
  121. <el-col :span="4" class="tit">
  122. <h2>成果简介</h2>
  123. </el-col>
  124. <el-col :span="20" class="info">
  125. {{ form.achievebrief || '暂无' }}
  126. </el-col>
  127. </el-col>
  128. <el-col :span="24" class="downInfo">
  129. <el-col :span="4" class="tit">
  130. <h2>技术特点</h2>
  131. </el-col>
  132. <el-col :span="20" class="info">
  133. {{ form.features || '暂无' }}
  134. </el-col>
  135. </el-col>
  136. <el-col :span="24" class="downInfo">
  137. <el-col :span="4" class="tit">
  138. <h2>技术团队</h2>
  139. </el-col>
  140. <el-col :span="20" class="info">
  141. {{ form.team || '暂无' }}
  142. </el-col>
  143. </el-col>
  144. <el-col :span="24" class="downInfo">
  145. <el-col :span="4" class="tit">
  146. <h2>商业预期</h2>
  147. </el-col>
  148. <el-col :span="20" class="info">
  149. {{ form.expectations || '暂无' }}
  150. </el-col>
  151. </el-col>
  152. <el-col :span="24" class="downInfo">
  153. <el-col :span="4" class="tit">
  154. <h2>合作要求</h2>
  155. </el-col>
  156. <el-col :span="20" class="info">
  157. {{ form.condition || '暂无' }}
  158. </el-col>
  159. </el-col>
  160. </el-col>
  161. <el-col :span="24" class="anniu" v-if="showBtn">
  162. <el-button type="primary" size="mini" @click="btnPhone()">交流洽谈</el-button>
  163. <el-button type="success" size="mini" @click="onSubmit()">供求对接</el-button>
  164. </el-col>
  165. </el-col>
  166. </el-row>
  167. <el-dialog title="专利信息" :visible.sync="dialogTableVisible1">
  168. <el-table :data="form.patent" style="width: 100%" border>
  169. <el-table-column prop="patentinfo" label="专利信息" align="center"> </el-table-column>
  170. <el-table-column prop="patentstatus" label="专利状态" align="center"> </el-table-column>
  171. </el-table>
  172. </el-dialog>
  173. <el-dialog title="对接" :visible.sync="dialogTableVisible" destroy-on-close>
  174. <chat :room="room"></chat>
  175. </el-dialog>
  176. </div>
  177. </template>
  178. <script>
  179. import chat from '@c/chat.vue';
  180. import _ from 'lodash';
  181. import { mapState, createNamespacedHelpers } from 'vuex';
  182. const { mapActions: personRoom } = createNamespacedHelpers('personRoom');
  183. const { mapActions: dockTranscation } = createNamespacedHelpers('dockTranscation');
  184. export default {
  185. name: 'achieveInfo',
  186. props: {
  187. form: { type: Object },
  188. showBtn: { type: Boolean, default: () => true },
  189. },
  190. components: { chat },
  191. data: function() {
  192. return {
  193. dialogTableVisible1: false,
  194. dialogTableVisible: false,
  195. room: {},
  196. };
  197. },
  198. created() {},
  199. methods: {
  200. ...personRoom(['create']),
  201. ...dockTranscation({ tranCreate: 'create' }),
  202. async btnPhone() {
  203. if (!this.room.id) {
  204. //TODO 请求房间号
  205. let obj = {};
  206. if (!_.get(this.user, 'id')) {
  207. // this.$message.error('游客身份无法与卖家对话,请先注册');
  208. this.$message({
  209. dangerouslyUseHTMLString: true,
  210. message: '<strong><a href="http://broadcast.waityou24.cn/live/login" style="color:red;">游客身份无法与卖家对话,请先注册</a></strong>',
  211. type: 'error',
  212. });
  213. return;
  214. } else {
  215. obj.p1_id = this.user.id;
  216. obj.p1 = this.user.name;
  217. }
  218. if (!this.form.user_id) {
  219. this.$message.error('缺少卖家信息,请联系卖家或管理员');
  220. return;
  221. } else {
  222. obj.p2_id = this.form.user_id;
  223. obj.p2 = this.form.contacts;
  224. }
  225. let res = await this.create(obj);
  226. if (this.$checkRes(res)) {
  227. this.$set(this, `room`, res.data);
  228. }
  229. }
  230. this.dialogTableVisible = true;
  231. },
  232. //供求对接
  233. async onSubmit() {
  234. let data = { product_id: this.form.id, s_id: this.form.user_id, s_name: this.form.company, s_phone: this.form.phone };
  235. if (this.dock_id) data.dock_id = this.dock_id;
  236. if (!_.get(this.user, 'id')) {
  237. this.$message({
  238. dangerouslyUseHTMLString: true,
  239. message: '<strong><a href="http://broadcast.waityou24.cn/live/login" style="color:red;">游客身份无法与专家进行对接,请先注册</a></strong>',
  240. type: 'error',
  241. });
  242. return;
  243. } else {
  244. // 需求者信息
  245. data.d_id = this.user.id;
  246. data.d_name = this.user.name;
  247. data.d_phone = this.user.phone;
  248. }
  249. if (data.d_id === data.s_id) {
  250. this.$message.error('您不能对自己进行对接!');
  251. return;
  252. }
  253. const res = await this.tranCreate(data);
  254. this.$checkRes(res, '对接成功', res.errmsg || '对接失败');
  255. },
  256. },
  257. computed: {
  258. ...mapState(['user']),
  259. pageTitle() {
  260. return `${this.$route.meta.title}`;
  261. },
  262. dock_id() {
  263. return this.$route.query.dock_id;
  264. },
  265. },
  266. metaInfo() {
  267. return { title: this.$route.meta.title };
  268. },
  269. };
  270. </script>
  271. <style lang="less" scoped>
  272. .main {
  273. margin: 10px 0 0 0;
  274. .top {
  275. height: 360px;
  276. overflow: hidden;
  277. .right {
  278. padding: 0 0 0 10px;
  279. .name {
  280. font-size: 18px;
  281. font-weight: bold;
  282. padding: 10px;
  283. border: 1px solid #ccc;
  284. text-align: center;
  285. }
  286. .otherInfo {
  287. padding: 10px;
  288. font-size: 16px;
  289. border: 1px solid #ccc;
  290. }
  291. }
  292. .achieveImage {
  293. position: relative;
  294. height: 348px;
  295. background: url('~@common/src/assets/achieve.png');
  296. background-size: 100% 100%;
  297. background-repeat: no-repeat;
  298. padding: 28px 25px;
  299. .name {
  300. font-size: 16px;
  301. font-weight: bold;
  302. margin: 10px 0;
  303. }
  304. .brief {
  305. font-size: 14px;
  306. overflow: hidden;
  307. text-overflow: ellipsis;
  308. -webkit-line-clamp: 11;
  309. word-break: break-all;
  310. display: -webkit-box;
  311. -webkit-box-orient: vertical;
  312. }
  313. .other {
  314. position: absolute;
  315. bottom: 10px;
  316. width: 82%;
  317. font-size: 14px;
  318. span {
  319. display: inline-block;
  320. width: 100%;
  321. }
  322. }
  323. }
  324. }
  325. .down {
  326. margin: 0 0 15px 0;
  327. .downInfo {
  328. border: 1px solid #ccc;
  329. .tit {
  330. height: 150px;
  331. line-height: 150px;
  332. text-align: center;
  333. border-right: 1px solid #ccc;
  334. }
  335. .info {
  336. font-size: 16px;
  337. padding: 10px;
  338. min-height: 150px;
  339. }
  340. }
  341. }
  342. .anniu {
  343. text-align: center;
  344. /deep/.el-button {
  345. margin: 0 10px;
  346. }
  347. }
  348. }
  349. </style>