zhuanjia.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <template>
  2. <div id="context">
  3. <el-col :span="24" class="one">
  4. <el-col :span="7" class="oneLeft">
  5. <el-image :src="zhuanjiainfo.img_path" style="height:210px"> </el-image>
  6. </el-col>
  7. <el-col :span="17" class="oneRight">
  8. <p class="textOver">{{ zhuanjiainfo.name }}</p>
  9. <p>
  10. <span>性别:{{ zhuanjiainfo.gender || '暂无' }}</span>
  11. <span>出生年月:{{ zhuanjiainfo.birthday || '暂无' }}</span>
  12. </p>
  13. <p>
  14. <span> 毕业院校:{{ zhuanjiainfo.school }} </span>
  15. <span>专业:{{ zhuanjiainfo.major || '暂无' }}</span>
  16. </p>
  17. <p>
  18. <span>学历:{{ zhuanjiainfo.xl || '暂无' }}</span>
  19. <span>学位:{{ zhuanjiainfo.xw || '暂无' }}</span>
  20. </p>
  21. <p>
  22. <span>电话号码:{{ zhuanjiainfo.phone || '暂无' }}</span>
  23. <span>邮箱:{{ zhuanjiainfo.email || '暂无' }}</span>
  24. </p>
  25. </el-col>
  26. <el-col :span="24" class="newRight">
  27. <div>
  28. <p>
  29. <span>身份证号:{{ zhuanjiainfo.cardnumber || '暂无' }}</span>
  30. <span>地址:{{ zhuanjiainfo.addr || '暂无' }}</span>
  31. <span>职称级别:{{ zhuanjiainfo.level || '暂无' }}</span>
  32. <span>职称名称:{{ zhuanjiainfo.levelname || '暂无' }}</span>
  33. <span>职务:{{ zhuanjiainfo.position || '暂无' }}</span>
  34. <span>项目:{{ zhuanjiainfo.project || '暂无' }}</span>
  35. <span>学术成就:{{ zhuanjiainfo.academic || '暂无' }}</span>
  36. <span>论文:{{ zhuanjiainfo.paper || '暂无' }}</span>
  37. <span>备注:{{ zhuanjiainfo.remark || '暂无' }}</span>
  38. <span>从事专业:{{ zhuanjiainfo.professional || '暂无' }}</span>
  39. </p>
  40. </div>
  41. <div></div>
  42. <div class="news">
  43. <p>工作简介:</p>
  44. <p class="resume" v-if="resume != ''">{{ zhuanjiainfo.resume || '暂无' }}</p>
  45. <p class="resume1" v-else>{{ zhuanjiainfo.resume || '暂无' }}</p>
  46. <el-button size="mini" style="float: right;" v-if="zhuanjiainfo.resume != null && zhuanjiainfo.resume.length > 408">
  47. <span v-if="resume != ''" @click="resumeMore()">更多</span>
  48. <span v-else @click="resumeMore1()">收起</span>
  49. </el-button>
  50. </div>
  51. <el-col :span="24" class="anniu">
  52. <el-button type="primary" @click="btnPhone()" v-if="this.user.uid != zhuanjiainfo.userid">对接聊天</el-button>
  53. <el-button v-if="this.user.uid != zhuanjiainfo.userid" @click="zjsubmit()" type="success">洽谈交易</el-button></el-col
  54. >
  55. </el-col>
  56. <el-dialog title="对接聊天" :visible.sync="dialogTableVisible">
  57. <el-col :span="24" class="two">
  58. <chat :room="room"></chat>
  59. </el-col>
  60. </el-dialog>
  61. </el-col>
  62. </div>
  63. </template>
  64. <script>
  65. import _ from 'lodash';
  66. import { mapState, createNamespacedHelpers } from 'vuex';
  67. import chat from '@/layout/market/parts/chat.vue';
  68. const { mapActions: personalRoom } = createNamespacedHelpers('personalroom');
  69. const { mapActions: transaction } = createNamespacedHelpers('transaction');
  70. export default {
  71. name: 'context',
  72. props: {
  73. zhuanjiainfo: null,
  74. },
  75. components: { chat },
  76. data: () => ({
  77. dialogTableVisible: false,
  78. dialogFormVisible: false,
  79. room: {},
  80. scope: '123',
  81. resume: '123',
  82. }),
  83. created() {},
  84. computed: {
  85. ...mapState(['user']),
  86. },
  87. methods: {
  88. ...personalRoom(['create', 'countDelete']),
  89. ...transaction({ buyProduct: 'create' }),
  90. scopeMore() {
  91. this.scope = '';
  92. },
  93. // 收起
  94. scopeMore1() {
  95. this.scope = '123';
  96. },
  97. // 更多
  98. resumeMore() {
  99. this.resume = '';
  100. },
  101. // 收起
  102. resumeMore1() {
  103. this.resume = '123';
  104. },
  105. zjsubmit() {
  106. console.log(this.policyInfo);
  107. this.$emit('zjsubmit', this.zhuanjiainfo);
  108. },
  109. async btnPhone() {
  110. this.dialogTableVisible = true;
  111. console.log(this.room.id);
  112. if (!this.room.id) {
  113. //TODO 请求房间号
  114. let obj = {};
  115. if (!this.user.uid) {
  116. this.$message.error('游客身份无法与卖家对话,请先注册');
  117. return;
  118. } else {
  119. obj.buyer_id = this.user.uid;
  120. obj.buyer_name = this.user.name;
  121. }
  122. if (!this.zhuanjiainfo.id) {
  123. this.$message.error('缺少卖家信息,请联系卖家或管理员');
  124. return;
  125. } else {
  126. obj.seller_id = this.zhuanjiainfo.uid;
  127. obj.seller_name = this.zhuanjiainfo.name;
  128. }
  129. console.log(obj);
  130. let res = await this.create(obj);
  131. if (this.$checkRes(res)) {
  132. this.$set(this, `room`, res.data);
  133. }
  134. }
  135. },
  136. },
  137. };
  138. </script>
  139. <style lang="less" scoped>
  140. p {
  141. padding: 0;
  142. margin: 0;
  143. }
  144. .textOver {
  145. overflow: hidden;
  146. text-overflow: ellipsis;
  147. white-space: nowrap;
  148. }
  149. // .textOver{}
  150. // overflow: hidden;
  151. // text-overflow: ellipsis;
  152. // -webkit-line-clamp: 3;
  153. // word-break: break-all;
  154. // display: -webkit-box;
  155. // -webkit-box-orient: vertical;
  156. // }
  157. .style {
  158. height: 100vh;
  159. }
  160. .style .info {
  161. position: relative;
  162. top: -450px;
  163. }
  164. .style .top {
  165. position: relative;
  166. top: 0;
  167. width: 100%;
  168. text-align: center;
  169. z-index: 999;
  170. height: 230px;
  171. margin: 0 0 20px 0;
  172. }
  173. .style .top p:first-child {
  174. font-size: 50px;
  175. color: #fff;
  176. }
  177. .style .top p:last-child {
  178. font-size: 30px;
  179. color: #fff;
  180. position: absolute;
  181. width: 100%;
  182. top: 170px;
  183. }
  184. .one {
  185. min-height: 550px;
  186. padding: 20px;
  187. .oneLeft {
  188. height: 210px;
  189. overflow: hidden;
  190. img {
  191. height: 100px;
  192. }
  193. }
  194. .oneRight {
  195. padding: 0 15px;
  196. p {
  197. font-size: 16px;
  198. padding: 0px 0 10px 0;
  199. span {
  200. display: inline-block;
  201. width: 50%;
  202. }
  203. }
  204. p:first-child {
  205. font-size: 20px;
  206. font-weight: bold;
  207. padding: 27px 0;
  208. }
  209. p:nth-child(2) span:last-child {
  210. color: red;
  211. font-weight: bold;
  212. }
  213. }
  214. .newRight {
  215. padding: 0 15px;
  216. p {
  217. font-size: 16px;
  218. padding: 0 0 20px 0;
  219. span {
  220. display: inline-block;
  221. width: 50%;
  222. padding: 5px 0 5px 0;
  223. }
  224. }
  225. p:first-child {
  226. font-size: 16px;
  227. }
  228. }
  229. .oneDown {
  230. border-top: 1px dashed #ccc;
  231. margin: 30px 0 0 0;
  232. padding: 30px 0 0 0;
  233. div {
  234. padding: 0 0 15px 0;
  235. p {
  236. font-size: 18px;
  237. }
  238. p:first-child {
  239. color: #333;
  240. font-weight: bold;
  241. padding: 0 0 10px 0;
  242. }
  243. }
  244. div:nth-child(2) p span:last-child {
  245. color: #409eff;
  246. padding: 0 10px;
  247. }
  248. div:nth-child(2) p span:last-child:hover {
  249. cursor: pointer;
  250. }
  251. div:nth-child(3) .resume {
  252. overflow: hidden;
  253. text-overflow: ellipsis;
  254. -webkit-line-clamp: 6;
  255. word-break: break-all;
  256. display: -webkit-box;
  257. -webkit-box-orient: vertical;
  258. height: 200px;
  259. }
  260. div:nth-child(3) .resume1 {
  261. overflow: none;
  262. }
  263. div:nth-child(3) .el-button {
  264. float: right;
  265. }
  266. div:nth-child(3) .resumeMore {
  267. overflow: hidden;
  268. text-overflow: ellipsis;
  269. -webkit-line-clamp: 6;
  270. word-break: break-all;
  271. display: -webkit-box;
  272. -webkit-box-orient: vertical;
  273. }
  274. div:nth-child(3) .resumeMore1 {
  275. overflow: none;
  276. }
  277. div:last-child .el-button {
  278. float: right;
  279. }
  280. }
  281. .mainDown {
  282. height: 50px;
  283. line-height: 50px;
  284. text-align: center;
  285. }
  286. }
  287. .resume {
  288. overflow: hidden;
  289. text-overflow: ellipsis;
  290. -webkit-line-clamp: 6;
  291. word-break: break-all;
  292. display: -webkit-box;
  293. -webkit-box-orient: vertical;
  294. }
  295. .resume1 {
  296. overflow: none;
  297. }
  298. .anniu {
  299. float: left;
  300. text-align: center;
  301. }
  302. /deep/.el-dialog__body {
  303. padding: 15px 20px;
  304. color: #606266;
  305. font-size: 14px;
  306. height: 660px;
  307. word-break: break-all;
  308. }
  309. </style>