From 026b04258bd4217ae4c53125655d6073c1bce474 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期一, 24 一月 2022 10:39:15 +0800 Subject: [PATCH] remove: 移除 agenda 功能畫面(暫不提供此功能) --- PAMapp/components/AddAndReservedBtns.vue | 47 ++++++++++++++++++++++++++++++----------------- 1 files changed, 30 insertions(+), 17 deletions(-) diff --git a/PAMapp/components/AddAndReservedBtns.vue b/PAMapp/components/AddAndReservedBtns.vue index fe0f2e7..f2f3177 100644 --- a/PAMapp/components/AddAndReservedBtns.vue +++ b/PAMapp/components/AddAndReservedBtns.vue @@ -1,40 +1,53 @@ <template> <el-row type="flex" justify="center" :class="cusClass"> <el-button @click="addConsultant(agentInfo)" :disabled="isAdded"> - <span> + 憿批��</span> + <span> {{ isAdded ? '撌脣�憿批��' : '+ 憿批��' }}</span> </el-button> <el-button - @click="reserveCommunication" + @click="navigateToReservationForm" type="primary" >�脰����</el-button> </el-row> </template> <script lang="ts"> -import { Vue, Component, Prop, Emit, Action, State } from 'nuxt-property-decorator'; -import { Consultants } from '~/assets/ts/api/consultant'; -import { isLogin } from '~/assets/ts/auth'; +import { Vue, Component, Prop, Emit, Action, State, namespace } from 'nuxt-property-decorator'; +import { Consultant } from '~/shared/models/consultant.model'; @Component export default class AddAndReservedBtns extends Vue { - @Action addToMyConsultantList!: (consultantToAdd: Consultants) => Promise<boolean> - @State('myConsultantList') myConsultantList!: Consultants[]; - @Prop() agentInfo!: Consultants; - @Prop() cusClass!: string; + @Action + addToMyConsultantList!: (consultantToAdd: Consultant) => Promise<boolean> + + @State('myConsultantList') + myConsultantList!: Consultant[]; + + @Prop() + agentInfo!: Consultant; + + @Prop() + cusClass!: string; + isVisiblePopUp = false; - addConsultant(item: Consultants) { + + ////////////////////////////////////////////////////////////////////// + + @Emit('openPopUp') + openPopUp(popUpTxt: string = '����憿批��'): string { + return popUpTxt; + } + + ////////////////////////////////////////////////////////////////////// + + addConsultant(item: Consultant): void { this.addToMyConsultantList(item).then(addOk => { addOk && this.openPopUp(); }); } - reserveCommunication() { - isLogin() ? this.$router.push(`/questionnaire/${this.agentInfo.agentNo}`) : this.$router.push('/login'); - } - - @Emit('openPopUp') openPopUp(popUpTxt: string = '����憿批��') { - return popUpTxt + navigateToReservationForm(): void { + this.$router.push(`/questionnaire/${this.agentInfo.agentNo}`); } get isAdded() { @@ -42,4 +55,4 @@ ? true : false } } -</script> \ No newline at end of file +</script> -- Gitblit v1.8.0