| | |
| | | :size="50" |
| | | :src="agentInfo.img" |
| | | class="cursor--pointer" |
| | | @click.native="$router.push('/agentInfo')" |
| | | @click.native="showAgentDetail(agentInfo.agentNo);" |
| | | ></el-avatar> |
| | | <div class="satisfaction"> |
| | | <i class="icon-star pam-icon icon--yellow satisfaction"></i> |
| | | <span>{{agentInfo.satisfaction}}</span> |
| | | <span>{{agentInfo.avgScore }}</span> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="10" :sm="15"> |
| | |
| | | <div class="professionals"> |
| | | <span |
| | | class="professionalsTxt" |
| | | v-for="(professional, index) in agentInfo.professionals" |
| | | v-for="(expertise, index) in agentInfo.expertise" |
| | | :key="index" |
| | | >#{{professional}}</span> |
| | | >#{{expertise}}</span> |
| | | </div> |
| | | <div |
| | | class="delete" |
| | | v-if="agentInfo.contactStatus === 'picked'" |
| | | v-if="agentInfo.contactStatus !== 'reserved' |
| | | || agentInfo.contactStatus !== 'contacted'" |
| | | @click="removeAgent" |
| | | >移除</div> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <Ui-Dialog :isVisible.sync="isVisibleDialog"> |
| | | <Ui-Dialog |
| | | :isVisible.sync="isVisibleDialog" |
| | | :width="width" |
| | | > |
| | | <h5 class="subTitle text--center mb-30">預約成功</h5> |
| | | <p class="smTxt">今天 10:00</p> |
| | | <div class="dialogInfo"> |
| | |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component, Prop, Emit } from 'nuxt-property-decorator'; |
| | | import { Agents } from '~/plugins/api/home'; |
| | | import { Consultants } from '~/assets/ts/api/consultant'; |
| | | import { isLogin } from '~/assets/ts/auth'; |
| | | import { isMobileDevice } from '~/assets/ts/device'; |
| | | |
| | | @Component |
| | | export default class ConsultantCard extends Vue { |
| | | @Prop() agentInfo!: Agents; |
| | | @Prop() agentInfo!: Consultants; |
| | | isVisibleDialog = false; |
| | | width: string = ''; |
| | | |
| | | get contactTxt() { |
| | | if (this.agentInfo.contactStatus === 'contacted') { |
| | |
| | | let date = newDate.getDate(); |
| | | let hours = newDate.getHours(); |
| | | let minutes = newDate.getMinutes(); |
| | | return `${year}/${month}/${date} ${hours} : ${minutes}` |
| | | return isLogin() ? `${year}/${month}/${date} ${hours} : ${minutes}` : '' |
| | | } |
| | | |
| | | reserveCommunication() { |
| | | if (this.agentInfo.contactStatus === 'picked') { |
| | | this.$router.push('/communication/myDemand') |
| | | const contactStatus = this.agentInfo.contactStatus; |
| | | if (contactStatus !== 'reserved' && contactStatus !== 'contacted') { |
| | | isLogin() ? this.$router.push(`/questionnaire/${this.agentInfo.agentNo}`) : this.$router.push('/login'); |
| | | } else { |
| | | this.width = isMobileDevice() ? '80%' : ''; |
| | | this.isVisibleDialog = true; |
| | | } |
| | | } |
| | |
| | | @Emit('removeAgent') removeAgent() { |
| | | return this.agentInfo.agentNo; |
| | | } |
| | | |
| | | showAgentDetail(agentNo: string): void { |
| | | this.$router.push(`/agentInfo/${agentNo}`); |
| | | } |
| | | } |
| | | </script> |
| | | |