expeDetail.vue 8.4 KB

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