From 3dd41875f8a623bda069ab4f9c1e2fd6c757c44e Mon Sep 17 00:00:00 2001 From: wayne <wayne8692wayne8692@gmail.com> Date: 星期六, 22 一月 2022 17:06:47 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/Phase3' into Phase3 --- PAMapp/components/AddAndReservedBtns.vue | 40 +++++++++++++++++++++++++++------------- 1 files changed, 27 insertions(+), 13 deletions(-) diff --git a/PAMapp/components/AddAndReservedBtns.vue b/PAMapp/components/AddAndReservedBtns.vue index fa37c72..f2f3177 100644 --- a/PAMapp/components/AddAndReservedBtns.vue +++ b/PAMapp/components/AddAndReservedBtns.vue @@ -1,10 +1,10 @@ <template> <el-row type="flex" justify="center" :class="cusClass"> <el-button @click="addConsultant(agentInfo)" :disabled="isAdded"> - <span> {{isAdded ? '撌脣�憿批��' : '+ 憿批��'}}</span> + <span> {{ isAdded ? '撌脣�憿批��' : '+ 憿批��' }}</span> </el-button> <el-button - @click="reserveCommunication" + @click="navigateToReservationForm" type="primary" >�脰����</el-button> </el-row> @@ -14,26 +14,40 @@ import { Vue, Component, Prop, Emit, Action, State, namespace } from 'nuxt-property-decorator'; import { Consultant } from '~/shared/models/consultant.model'; -const localStorage = namespace('localStorage'); @Component export default class AddAndReservedBtns extends Vue { - @Action addToMyConsultantList!: (consultantToAdd: Consultant) => Promise<boolean> - @State('myConsultantList') myConsultantList!: Consultant[]; - @Prop() agentInfo!: Consultant; - @Prop() cusClass!: string; + + @Action + addToMyConsultantList!: (consultantToAdd: Consultant) => Promise<boolean> + + @State('myConsultantList') + myConsultantList!: Consultant[]; + + @Prop() + agentInfo!: Consultant; + + @Prop() + cusClass!: string; + isVisiblePopUp = false; - addConsultant(item: Consultant) { + + ////////////////////////////////////////////////////////////////////// + + @Emit('openPopUp') + openPopUp(popUpTxt: string = '����憿批��'): string { + return popUpTxt; + } + + ////////////////////////////////////////////////////////////////////// + + addConsultant(item: Consultant): void { this.addToMyConsultantList(item).then(addOk => { addOk && this.openPopUp(); }); } - reserveCommunication() { + navigateToReservationForm(): void { this.$router.push(`/questionnaire/${this.agentInfo.agentNo}`); - } - - @Emit('openPopUp') openPopUp(popUpTxt: string = '����憿批��') { - return popUpTxt } get isAdded() { -- Gitblit v1.8.0