123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- <template>
- <div id="context">
- <el-col :span="24" class="one">
- <el-col :span="7" class="oneLeft">
- <el-image :src="zhuanjiainfo.img_path" style="height:210px"> </el-image>
- </el-col>
- <el-col :span="17" class="oneRight">
- <p class="textOver">{{ zhuanjiainfo.name }}</p>
- <p>
- <span>性别:{{ zhuanjiainfo.gender || '暂无' }}</span>
- <span>出生年月:{{ zhuanjiainfo.birthday || '暂无' }}</span>
- </p>
- <p>
- <span> 毕业院校:{{ zhuanjiainfo.school }} </span>
- <span>专业:{{ zhuanjiainfo.major || '暂无' }}</span>
- </p>
- <p>
- <span>学历:{{ zhuanjiainfo.xl || '暂无' }}</span>
- <span>学位:{{ zhuanjiainfo.xw || '暂无' }}</span>
- </p>
- <p>
- <span>电话号码:{{ zhuanjiainfo.phone || '暂无' }}</span>
- <span>邮箱:{{ zhuanjiainfo.email || '暂无' }}</span>
- </p>
- </el-col>
- <el-col :span="24" class="newRight">
- <div>
- <p>
- <span>身份证号:{{ zhuanjiainfo.cardnumber || '暂无' }}</span>
- <span>地址:{{ zhuanjiainfo.addr || '暂无' }}</span>
- <span>职称级别:{{ zhuanjiainfo.level || '暂无' }}</span>
- <span>职称名称:{{ zhuanjiainfo.levelname || '暂无' }}</span>
- <span>职务:{{ zhuanjiainfo.position || '暂无' }}</span>
- <span>项目:{{ zhuanjiainfo.project || '暂无' }}</span>
- <span>学术成就:{{ zhuanjiainfo.academic || '暂无' }}</span>
- <span>论文:{{ zhuanjiainfo.paper || '暂无' }}</span>
- <span>备注:{{ zhuanjiainfo.remark || '暂无' }}</span>
- <span>从事专业:{{ zhuanjiainfo.professional || '暂无' }}</span>
- </p>
- </div>
- <div></div>
- <div class="news">
- <p>工作简介:</p>
- <p class="resume" v-if="resume != ''">{{ zhuanjiainfo.resume || '暂无' }}</p>
- <p class="resume1" v-else>{{ zhuanjiainfo.resume || '暂无' }}</p>
- <el-button size="mini" style="float: right;" v-if="zhuanjiainfo.resume != null && zhuanjiainfo.resume.length > 408">
- <span v-if="resume != ''" @click="resumeMore()">更多</span>
- <span v-else @click="resumeMore1()">收起</span>
- </el-button>
- </div>
- <el-col :span="24" class="anniu">
- <el-button type="primary" @click="btnPhone()" v-if="this.user.uid != zhuanjiainfo.userid">对接聊天</el-button>
- <el-button v-if="this.user.uid != zhuanjiainfo.userid" @click="zjsubmit()" type="success">洽谈交易</el-button></el-col
- >
- </el-col>
- <el-dialog title="对接聊天" :visible.sync="dialogTableVisible">
- <el-col :span="24" class="two">
- <chat :room="room"></chat>
- </el-col>
- </el-dialog>
- </el-col>
- </div>
- </template>
- <script>
- import _ from 'lodash';
- import { mapState, createNamespacedHelpers } from 'vuex';
- import chat from '@/layout/market/parts/chat.vue';
- const { mapActions: personalRoom } = createNamespacedHelpers('personalroom');
- const { mapActions: transaction } = createNamespacedHelpers('transaction');
- export default {
- name: 'context',
- props: {
- zhuanjiainfo: null,
- },
- components: { chat },
- data: () => ({
- dialogTableVisible: false,
- dialogFormVisible: false,
- room: {},
- scope: '123',
- resume: '123',
- }),
- created() {},
- computed: {
- ...mapState(['user']),
- },
- methods: {
- ...personalRoom(['create', 'countDelete']),
- ...transaction({ buyProduct: 'create' }),
- scopeMore() {
- this.scope = '';
- },
- // 收起
- scopeMore1() {
- this.scope = '123';
- },
- // 更多
- resumeMore() {
- this.resume = '';
- },
- // 收起
- resumeMore1() {
- this.resume = '123';
- },
- zjsubmit() {
- console.log(this.policyInfo);
- this.$emit('zjsubmit', this.zhuanjiainfo);
- },
- async btnPhone() {
- this.dialogTableVisible = true;
- console.log(this.room.id);
- if (!this.room.id) {
- //TODO 请求房间号
- let obj = {};
- if (!this.user.uid) {
- this.$message.error('游客身份无法与卖家对话,请先注册');
- return;
- } else {
- obj.buyer_id = this.user.uid;
- obj.buyer_name = this.user.name;
- }
- if (!this.zhuanjiainfo.id) {
- this.$message.error('缺少卖家信息,请联系卖家或管理员');
- return;
- } else {
- obj.seller_id = this.zhuanjiainfo.uid;
- obj.seller_name = this.zhuanjiainfo.name;
- }
- console.log(obj);
- let res = await this.create(obj);
- if (this.$checkRes(res)) {
- this.$set(this, `room`, res.data);
- }
- }
- },
- },
- };
- </script>
- <style lang="less" scoped>
- p {
- padding: 0;
- margin: 0;
- }
- .textOver {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- // .textOver{}
- // overflow: hidden;
- // text-overflow: ellipsis;
- // -webkit-line-clamp: 3;
- // word-break: break-all;
- // display: -webkit-box;
- // -webkit-box-orient: vertical;
- // }
- .style {
- height: 100vh;
- }
- .style .info {
- position: relative;
- top: -450px;
- }
- .style .top {
- position: relative;
- top: 0;
- width: 100%;
- text-align: center;
- z-index: 999;
- height: 230px;
- margin: 0 0 20px 0;
- }
- .style .top p:first-child {
- font-size: 50px;
- color: #fff;
- }
- .style .top p:last-child {
- font-size: 30px;
- color: #fff;
- position: absolute;
- width: 100%;
- top: 170px;
- }
- .one {
- min-height: 550px;
- padding: 20px;
- .oneLeft {
- height: 210px;
- overflow: hidden;
- img {
- height: 100px;
- }
- }
- .oneRight {
- padding: 0 15px;
- p {
- font-size: 16px;
- padding: 0px 0 10px 0;
- span {
- display: inline-block;
- width: 50%;
- }
- }
- p:first-child {
- font-size: 20px;
- font-weight: bold;
- padding: 27px 0;
- }
- p:nth-child(2) span:last-child {
- color: red;
- font-weight: bold;
- }
- }
- .newRight {
- padding: 0 15px;
- p {
- font-size: 16px;
- padding: 0 0 20px 0;
- span {
- display: inline-block;
- width: 50%;
- padding: 5px 0 5px 0;
- }
- }
- p:first-child {
- font-size: 16px;
- }
- }
- .oneDown {
- border-top: 1px dashed #ccc;
- margin: 30px 0 0 0;
- padding: 30px 0 0 0;
- div {
- padding: 0 0 15px 0;
- p {
- font-size: 18px;
- }
- p:first-child {
- color: #333;
- font-weight: bold;
- padding: 0 0 10px 0;
- }
- }
- div:nth-child(2) p span:last-child {
- color: #409eff;
- padding: 0 10px;
- }
- div:nth-child(2) p span:last-child:hover {
- cursor: pointer;
- }
- div:nth-child(3) .resume {
- overflow: hidden;
- text-overflow: ellipsis;
- -webkit-line-clamp: 6;
- word-break: break-all;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- height: 200px;
- }
- div:nth-child(3) .resume1 {
- overflow: none;
- }
- div:nth-child(3) .el-button {
- float: right;
- }
- div:nth-child(3) .resumeMore {
- overflow: hidden;
- text-overflow: ellipsis;
- -webkit-line-clamp: 6;
- word-break: break-all;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- }
- div:nth-child(3) .resumeMore1 {
- overflow: none;
- }
- div:last-child .el-button {
- float: right;
- }
- }
- .mainDown {
- height: 50px;
- line-height: 50px;
- text-align: center;
- }
- }
- .resume {
- overflow: hidden;
- text-overflow: ellipsis;
- -webkit-line-clamp: 6;
- word-break: break-all;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- }
- .resume1 {
- overflow: none;
- }
- .anniu {
- float: left;
- text-align: center;
- }
- /deep/.el-dialog__body {
- padding: 15px 20px;
- color: #606266;
- font-size: 14px;
- height: 660px;
- word-break: break-all;
- }
- </style>
|