| | |
| | | <el-col class="flex_column" :xs="5" :sm="3"> |
| | | <UiAvatar |
| | | :size="50" |
| | | :fileName="agentInfo.img" |
| | | :fileName="avatarFileName" |
| | | @click.native="showAgentDetail(agentInfo.agentNo)" |
| | | ></UiAvatar> |
| | | <div class="satisfaction"> |
| | |
| | | <div class="professionals"> |
| | | <span |
| | | class="professionalsTxt" |
| | | v-for="(expertise, index) in agentInfo.expertise" |
| | | v-for="(expertise, index) in expertises" |
| | | :key="index" |
| | | >#{{expertise}}</span> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component, Prop, Emit } from 'nuxt-property-decorator'; |
| | | import { AppointmentDetail, Consultants, getAppointmentDetail } from '~/assets/ts/api/consultant'; |
| | | import { Vue, Component, Prop, Emit, Action } from 'nuxt-property-decorator'; |
| | | import { Consultants, getAppointmentDetail } from '~/assets/ts/api/consultant'; |
| | | import { AppointmentDetail } from '~/assets/ts/models/AppointmentDetail'; |
| | | import { isLogin } from '~/assets/ts/auth'; |
| | | import { isMobileDevice } from '~/assets/ts/device'; |
| | | |
| | |
| | | } |
| | | }) |
| | | export default class ConsultantCard extends Vue { |
| | | @Action removeFromMyConsultantList!: (agentNo: string) => Promise<boolean>; |
| | | |
| | | @Prop() agentInfo!: Consultants; |
| | | isVisibleDialog = false; |
| | | width: string = ''; |
| | |
| | | name: '' |
| | | }; |
| | | |
| | | get avatarFileName() { |
| | | return this.agentInfo.img ? this.agentInfo.img : this.agentInfo.image; |
| | | } |
| | | |
| | | get expertises() { |
| | | return this.agentInfo.expertise ? this.agentInfo.expertise : this.agentInfo.expertises; |
| | | } |
| | | get gender() { |
| | | if (this.appointmentDetail.gender) { |
| | | return this.appointmentDetail.gender === 'male' ? '男性' : '女性'; |
| | |
| | | |
| | | get hopeContactTime() { |
| | | const contactList = this.appointmentDetail.hopeContactTime |
| | | .split("'").map(item => item.slice(0, item.length - 1)); |
| | | .split("'").map(item => item.slice(0, item.length)); |
| | | return contactList.filter(item => !!item) |
| | | } |
| | | reserveCommunication() { |
| | |
| | | }); |
| | | } |
| | | |
| | | @Emit('removeAgent') removeAgent() { |
| | | return this.agentInfo.agentNo; |
| | | removeAgent() { |
| | | this.removeFromMyConsultantList(this.agentInfo.agentNo).then((removeOk) => { |
| | | console.log('removeOk?', removeOk); |
| | | }); |
| | | } |
| | | |
| | | showAgentDetail(agentNo: string): void { |