From 23a51718522d4b01e9f13532573a85ff27298c08 Mon Sep 17 00:00:00 2001 From: jack <jack.su@pollex.com.tw> Date: 星期一, 31 七月 2023 17:26:31 +0800 Subject: [PATCH] Merge branch '2023_CR2' of ssh://dev.pollex.com.tw:29418/pcalife/PAM into 2023_CR2 --- PAMapp/pages/questionnaire/_agentNo.vue | 69 +++++++++++++++++++++++----------- 1 files changed, 47 insertions(+), 22 deletions(-) diff --git a/PAMapp/pages/questionnaire/_agentNo.vue b/PAMapp/pages/questionnaire/_agentNo.vue index 2631fea..69dcb60 100644 --- a/PAMapp/pages/questionnaire/_agentNo.vue +++ b/PAMapp/pages/questionnaire/_agentNo.vue @@ -67,7 +67,7 @@ <div class="ques-container"> <div class="pam-paragraph"> <div class="mdTxt"> - �閬岷������ + �鈭圾����� <span class="hint text--bold"> (�銴) </span> @@ -76,6 +76,12 @@ <MultiSelectBtn class="mt-10" :mutiSelect.sync="myRequest.requirement" :options="requirementOptions" /> + </div> + <div class="pam-paragraph"> + <div class="mdTxt">隢株岷�撘�</div> + <SingleSelectBtn class="mt-10" + :singleSelected.sync="myRequest.consultationMethod" + :options="consultationMethodOptions" /> </div> <div class="pam-paragraph"> <div class="mdTxt">����批</div> @@ -103,7 +109,7 @@ <PopUpFrame :isOpen.sync="showDrawer"> <div class="qaTextTitle mdTxt"> - <strong>�閬岷������</strong> + <strong>�鈭圾�����</strong> </div> <div class="qa-dialog"> <div v-for="(qaText,index) in quesAboutList" :key="index" > @@ -166,8 +172,9 @@ import { Gender } from '~/shared/models/enum/Gender'; import { RegisterInfo } from '~/shared/models/registerInfo'; import { AppointmentParams, AppointmentRequests } from '~/shared/models/appointment.model'; -import { UserReviewPlatformParams } from '~/shared/models/reviews.model'; import { UserSetting } from '~/shared/models/account.model'; +import { SatisfactionType } from '~/shared/models/enum/satisfaction-type'; +import { UserReviewParams } from '~/shared/models/reviews.model'; const roleStorage = namespace('localStorage'); @Component @@ -197,6 +204,17 @@ { title:'憟單��', label:Gender.FEMALE, + } + ]; + + consultationMethodOptions = [ + { + title: '蝺��', + label: 'online' + }, + { + title: '蝺��', + label: 'offline' } ]; @@ -299,6 +317,7 @@ selectTimesOptions: [], }], agentNo: '', + consultationMethod: '', }; showDrawer= false; @@ -335,7 +354,6 @@ private setMyRequest(): void { const storageMyRequest = getRequestsFromStorage(); const storageMyRequirement = this.recommendConsultantItem ? JSON.parse(this.recommendConsultantItem).requirements:[]; - const contactTypePromise = accountSettingService.getUserAccountSetting(); if (storageMyRequest) { this.myRequest = { @@ -357,12 +375,15 @@ removeRequestQuestionFromStorage(); } - contactTypePromise.then((contactTypeDetail) => { - this.myRequest = { - ...this.myRequest, - ...contactTypeDetail - } - }) + if (authService.isUserLogin()) { + accountSettingService.getUserAccountSetting().then((contactTypeDetail) => { + this.myRequest = { + ...this.myRequest, + ...contactTypeDetail + } + }) + } + } @@ -399,20 +420,23 @@ private getReservedData(appointmentInfo) { if (appointmentInfo) { - const hopeContactTime = appointmentInfo!.hopeContactTime.split("'") - .filter(item => item && item !== ','); - this.getAppointmentId(appointmentInfo); - - return { - ...appointmentInfo, - hopeContactTime: hopeContactTime.map(item => { + const hopeContactTime = appointmentInfo!.hopeContactTime + ? appointmentInfo!.hopeContactTime.split("'").filter(item => item && item !== ',').map(item => { const info = item.split('��'); return { selectWeekOptions: info[0].split(','), selectTimesOptions: info[1].split(',') } - }), - requirement: appointmentInfo.requirement.split(',') + }) + :[{selectWeekOptions : [],selectTimesOptions: []}]; + this.getAppointmentId(appointmentInfo); + + return { + ...appointmentInfo, + hopeContactTime: hopeContactTime, + requirement: appointmentInfo.requirement + ? appointmentInfo.requirement.split(',') + : [] } } else { return null; @@ -432,7 +456,7 @@ if (this.isEditBtn) { this.editAppointmentDemand(); } else { - queryConsultantService.addFavoriteConsultant([this.$route.params.agentNo]).then(res => this.sentAppointmentDemand()); + queryConsultantService.addFavoriteConsultant([{ agentNo: this.$route.params.agentNo, createdTime: new Date().toISOString()}]).then(res => this.sentAppointmentDemand()); } const editSettingInfo: UserSetting = { name: this.myRequest.name, @@ -484,9 +508,10 @@ } reviewPlatform(): void { - const reviewPlatformParams: UserReviewPlatformParams = { + const reviewPlatformParams: UserReviewParams = { appointmentId: this.appointmentId, - score: this.score + score: this.score, + type: SatisfactionType.SYSTEM }; reviewsService.reviewPlatform(reviewPlatformParams).then((_) => { this.closeReservePopUp(); -- Gitblit v1.8.0