From 33d0d51a799302ebc3ff47b86dbce4c1912abd22 Mon Sep 17 00:00:00 2001 From: wayne <wayne8692wayne8692@gmail.com> Date: 星期二, 30 十一月 2021 10:10:43 +0800 Subject: [PATCH] [update] 【todo 131218】嚴選配對 與 快速篩選 的滿意度評分皆改成 列出指定滿意度評分以上的顧問 --- PAMapp/components/Consultant/ConsultantCard.vue | 35 ++++++++++++++++++++++++++--------- 1 files changed, 26 insertions(+), 9 deletions(-) diff --git a/PAMapp/components/Consultant/ConsultantCard.vue b/PAMapp/components/Consultant/ConsultantCard.vue index f4c5d8a..92bb8ef 100644 --- a/PAMapp/components/Consultant/ConsultantCard.vue +++ b/PAMapp/components/Consultant/ConsultantCard.vue @@ -46,6 +46,7 @@ <Ui-Dialog :isVisible.sync="isVisibleDialog" :width="width" + class="pam-myDemand-dialog" > <div v-if="appointmentDetail"> <h5 class="subTitle text--center mb-30">������</h5> @@ -57,11 +58,11 @@ <p>�批嚗{gender}}</p> <p>撟湧翩嚗{appointmentDetail.age}}</p> <p>�璆哨�{appointmentDetail.job}}</p> - <p>��瘙�{appointmentDetail.requirement.replace(',', '��')}}</p> + <p>��瘙�{appointmentDetail.requirement.split(',').join('��')}}</p> <p v-for="(item, index) in hopeContactTime" :key="index" - >��蝯⊥�挾{{index + 1 | formatNumber}}嚗{item}}</p> + >��蝯⊥�挾{{index + 1 | formatNumber}}嚗{ item | formatHopeContactTime }}</p> </div> </div> </Ui-Dialog> @@ -69,8 +70,9 @@ </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'; @@ -81,10 +83,21 @@ const upperNumber = ['�', '銝�', '鈭�', '銝�', '���', '鈭�', '�', '銝�', '�', '銋�', '���'] return upperNumber[index]; } + }, + formatHopeContactTime(item: string): string { + if (item) { + const [hopeDay, hopeTime] = item.split('��'); + const day = hopeDay.split(',').length > 6 ? '銝����' : hopeDay; + const time = hopeTime.split(',').length > 3 ? '銝����' : hopeTime; + return `${day}��${time}`; + } + return ''; } } }) export default class ConsultantCard extends Vue { + @Action removeFromMyConsultantList!: (agentNo: string) => Promise<boolean>; + @Prop() agentInfo!: Consultants; isVisibleDialog = false; width: string = ''; @@ -135,8 +148,8 @@ get hopeContactTime() { const contactList = this.appointmentDetail.hopeContactTime - .split("'").map(item => item.slice(0, item.length - 1)); - return contactList.filter(item => !!item) + .split("'").map(item => item.slice(0, item.length)); + return contactList.filter(item => !!item && item !== ",") } reserveCommunication() { const contactStatus = this.agentInfo.contactStatus; @@ -157,8 +170,10 @@ }); } - @Emit('removeAgent') removeAgent() { - return this.agentInfo.agentNo; + removeAgent() { + this.removeFromMyConsultantList(this.agentInfo.agentNo).then((removeOk) => { + console.log('removeOk?', removeOk); + }); } showAgentDetail(agentNo: string): void { @@ -248,6 +263,8 @@ .dialogInfo { font-size: 20px; + overflow-y:scroll; + height: 400px; } -</style> \ No newline at end of file +</style> -- Gitblit v1.8.0