expeDetail.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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="8" class="left">
  7. <el-image v-if="detailInfo.expertimage != ''" :src="detailInfo.expertimage" style="width:100%;height:260px;"></el-image>
  8. <el-image v-else :src="expertimage" style="width:100%;height:260px;"></el-image>
  9. </el-col>
  10. <el-col :span="16" class="right">
  11. <el-col :span="24" class="name textOver">
  12. {{ detailInfo.name || '暂无' }}
  13. </el-col>
  14. <el-col :span="24">
  15. <el-col :span="3" class="otherInfo textOver">
  16. 工作单位
  17. </el-col>
  18. <el-col :span="21" class="otherInfo textOver">
  19. {{ detailInfo.company || '暂无' }}
  20. </el-col>
  21. </el-col>
  22. <el-col :span="12">
  23. <el-col :span="6" class="otherInfo textOver">
  24. 毕业院校
  25. </el-col>
  26. <el-col :span="18" class="otherInfo textOver">
  27. {{ detailInfo.school || '暂无' }}
  28. </el-col>
  29. </el-col>
  30. <el-col :span="12">
  31. <el-col :span="6" class="otherInfo textOver">
  32. 最高学历
  33. </el-col>
  34. <el-col :span="18" class="otherInfo textOver">
  35. {{ detailInfo.education || '暂无' }}
  36. </el-col>
  37. </el-col>
  38. <el-col :span="12">
  39. <el-col :span="6" class="otherInfo textOver">
  40. 出生日期
  41. </el-col>
  42. <el-col :span="18" class="otherInfo textOver">
  43. {{ detailInfo.birthDate || '暂无' }}
  44. </el-col>
  45. </el-col>
  46. <el-col :span="12">
  47. <el-col :span="6" class="otherInfo textOver">
  48. 职务职称
  49. </el-col>
  50. <el-col :span="18" class="otherInfo textOver">
  51. {{ detailInfo.zwzc || '暂无' }}
  52. </el-col>
  53. </el-col>
  54. <el-col :span="12">
  55. <el-col :span="6" class="otherInfo textOver">
  56. QQ/微信
  57. </el-col>
  58. <el-col :span="18" class="otherInfo textOver">
  59. {{ detailInfo.qqwx || '暂无' }}
  60. </el-col>
  61. </el-col>
  62. <el-col :span="12">
  63. <el-col :span="6" class="otherInfo textOver">
  64. 电子邮箱
  65. </el-col>
  66. <el-col :span="18" class="otherInfo textOver">
  67. {{ detailInfo.email || '暂无' }}
  68. </el-col>
  69. </el-col>
  70. <el-col :span="24">
  71. <el-col :span="3" class="otherInfo textOver">
  72. 擅长领域
  73. </el-col>
  74. <el-col :span="21" class="otherInfo textOver">
  75. {{ detailInfo.expertise || '暂无' }}
  76. </el-col>
  77. </el-col>
  78. <!-- <el-col :span="12" class="otherInfo textOver"> 毕业院校:{{ detailInfo.school }} </el-col>
  79. <el-col :span="12" class="otherInfo textOver"> 最高学历:{{ detailInfo.education }} </el-col>
  80. <el-col :span="12" class="otherInfo textOver"> 出生日期:{{ detailInfo.birthDate }} </el-col>
  81. <el-col :span="12" class="otherInfo textOver"> 工作单位:{{ detailInfo.company }} </el-col>
  82. <el-col :span="12" class="otherInfo textOver"> QQ/微信:{{ detailInfo.qqwx }} </el-col>
  83. <el-col :span="12" class="otherInfo textOver"> 电子邮箱:{{ detailInfo.email }} </el-col>
  84. <el-col :span="12" class="otherInfo textOver"> 职务职称:{{ detailInfo.zwzc }} </el-col>
  85. <el-col :span="12" class="otherInfo textOver"> 擅长领域:{{ detailInfo.expertise }} </el-col> -->
  86. </el-col>
  87. </el-col>
  88. <el-col :span="24" class="down">
  89. <el-col :span="24" class="downInfo">
  90. <el-col :span="4" class="tit">
  91. <h2>工作经历</h2>
  92. </el-col>
  93. <el-col :span="20" class="info">
  94. {{ detailInfo.workexperience || '暂无' }}
  95. </el-col>
  96. </el-col>
  97. <el-col :span="24" class="downInfo">
  98. <el-col :span="4" class="tit">
  99. <h2>科研综述</h2>
  100. </el-col>
  101. <el-col :span="20" class="info">
  102. {{ detailInfo.scientific || '暂无' }}
  103. </el-col>
  104. </el-col>
  105. <el-col :span="24" class="downInfo">
  106. <el-col :span="4" class="tit">
  107. <h2>承担项目</h2>
  108. </el-col>
  109. <el-col :span="20" class="info">
  110. {{ detailInfo.undertakingproject || '暂无' }}
  111. </el-col>
  112. </el-col>
  113. <el-col :span="24" class="downInfo">
  114. <el-col :span="4" class="tit">
  115. <h2>科技奖励</h2>
  116. </el-col>
  117. <el-col :span="20" class="info">
  118. {{ detailInfo.scienceaward || '暂无' }}
  119. </el-col>
  120. </el-col>
  121. <el-col :span="24" class="downInfo">
  122. <el-col :span="4" class="tit">
  123. <h2>社会任职</h2>
  124. </el-col>
  125. <el-col :span="20" class="info">
  126. {{ detailInfo.social || '暂无' }}
  127. </el-col>
  128. </el-col>
  129. </el-col>
  130. <el-col :span="24" class="anniu" v-if="displayBtn">
  131. <el-button type="primary" size="mini" v-if="this.user.uid != detailInfo.userid" @click="btnPhone()">交流洽谈</el-button>
  132. <el-button type="success" size="mini" v-if="this.user.uid != detailInfo.userid" @click="onSubmit()">供求对接</el-button>
  133. </el-col>
  134. </el-col>
  135. </el-row>
  136. <el-dialog title="对接" :visible.sync="dialogTableVisible">
  137. <chat :room="room"></chat>
  138. </el-dialog>
  139. </div>
  140. </template>
  141. <script>
  142. import _ from 'lodash';
  143. import { mapState, createNamespacedHelpers } from 'vuex';
  144. import chat from '@/layout/market/parts/chat.vue';
  145. const { mapActions: personalRoom } = createNamespacedHelpers('personalroom');
  146. const { mapActions: transaction } = createNamespacedHelpers('transaction');
  147. export default {
  148. name: 'techDetail',
  149. props: {
  150. detailInfo: { type: Object },
  151. displayBtn: { type: Boolean },
  152. },
  153. components: { chat },
  154. data: function() {
  155. return {
  156. expertimage: require('@/assets/live/222.png'),
  157. dialogTableVisible: false,
  158. room: {},
  159. };
  160. },
  161. created() {},
  162. methods: {
  163. ...personalRoom(['create', 'countDelete']),
  164. ...transaction({ buyProduct: 'create' }),
  165. // 对接
  166. async btnPhone() {
  167. if (!this.room.id) {
  168. //TODO 请求房间号
  169. let obj = {};
  170. if (!this.user.uid) {
  171. // this.$message.error('游客身份无法与卖家对话,请先注册');
  172. this.$message({
  173. dangerouslyUseHTMLString: true,
  174. message: '<strong><a href="http://free.liaoningdoupo.com/platlive/webLogin" style="color:red;">游客身份无法与卖家对话,请先注册</a></strong>',
  175. type: 'error',
  176. });
  177. return;
  178. } else {
  179. obj.buyer_id = this.user.uid;
  180. obj.buyer_name = this.user.name;
  181. }
  182. if (!this.detailInfo.id) {
  183. this.$message.error('缺少卖家信息,请联系卖家或管理员');
  184. return;
  185. } else {
  186. obj.seller_id = this.detailInfo.userid;
  187. obj.seller_name = this.detailInfo.name;
  188. }
  189. let res = await this.create(obj);
  190. if (this.$checkRes(res)) {
  191. this.$set(this, `room`, res.data);
  192. }
  193. }
  194. this.dialogTableVisible = true;
  195. },
  196. // 洽谈
  197. onSubmit() {
  198. this.$emit('onSubmit', { data: this.detailInfo });
  199. },
  200. },
  201. computed: {
  202. ...mapState(['user']),
  203. pageTitle() {
  204. return `${this.$route.meta.title}`;
  205. },
  206. },
  207. metaInfo() {
  208. return { title: this.$route.meta.title };
  209. },
  210. };
  211. </script>
  212. <style lang="less" scoped>
  213. .main {
  214. margin: 10px 0 0 0;
  215. .top {
  216. height: 270px;
  217. overflow: hidden;
  218. .right {
  219. padding: 0 0 0 10px;
  220. .name {
  221. font-size: 18px;
  222. font-weight: bold;
  223. padding: 10px;
  224. border: 1px solid #ccc;
  225. }
  226. .otherInfo {
  227. font-size: 16px;
  228. padding: 10px;
  229. border: 1px solid #ccc;
  230. }
  231. }
  232. }
  233. .down {
  234. margin: 0 0 15px 0;
  235. .downInfo {
  236. border: 1px solid #ccc;
  237. .tit {
  238. height: 150px;
  239. line-height: 150px;
  240. text-align: center;
  241. border-right: 1px solid #ccc;
  242. }
  243. .info {
  244. font-size: 16px;
  245. padding: 10px;
  246. height: 150px;
  247. }
  248. }
  249. }
  250. .anniu {
  251. text-align: center;
  252. /deep/.el-button {
  253. margin: 0 10px;
  254. }
  255. }
  256. }
  257. </style>