From dc0e7366e96ce773ae1690f6db28e03a684bb45e Mon Sep 17 00:00:00 2001 From: Jack <jack.su@pollex.com.tw> Date: 星期二, 18 一月 2022 19:50:12 +0800 Subject: [PATCH] Merge branch 'Phase3' of ssh://dev.pollex.com.tw:29418/pcalife/PAM into Phase3 --- PAMapp/components/Client/ClientCard.vue | 209 ++++++++++++++++++++++++++-------------------------- 1 files changed, 104 insertions(+), 105 deletions(-) diff --git a/PAMapp/components/Client/ClientCard.vue b/PAMapp/components/Client/ClientCard.vue index 90eec39..2d417e0 100644 --- a/PAMapp/components/Client/ClientCard.vue +++ b/PAMapp/components/Client/ClientCard.vue @@ -6,7 +6,7 @@ class="rowStyle cursor--pointer" justify="space-between" :class="{'new': newAppointment }" - @click.native="viewDetail" + @click.native="viewAppointmentDetail" > <div class="test"> <div class="unread" v-if="isReserved"> @@ -14,7 +14,7 @@ </div> <div class="pl-10"> - <div class="smTxt_bold name">{{ client.name }}</div> + <div class="smTxt_bold name">{{ client.name || 'NO NAME' }}</div> <div v-if="client.communicateStatus === contactStatus.RESERVED" class="my-10 xsTxt">������</div> <div class="xsTxt mb-10 mt-10" @@ -25,10 +25,12 @@ class="xsTxt mb-10 mt-10" v-else> 皛踵�漲 - <span v-if="client.satisfactionScore" class="xsTxt">{{ client.satisfactionScore }}</span> + <span v-if="client.satisfactionScore" class="xsTxt text--primary"> + <UiReviewScore :score="client.satisfactionScore"></UiReviewScore> + </span> <span v-else class="xsTxt text--mid_grey">�憛�</span> </div> - <div class="professionals" v-if="client.communicateStatus === contactStatus.RESERVED"> + <div class="professionals mb-10" v-if="client.communicateStatus === contactStatus.RESERVED"> <template v-if="client.requirement"> <span v-for="(item, index) in requirements" @@ -79,7 +81,7 @@ <div class="invite-msg smTxt_bold" @click.stop="inviteReview" - v-else> + v-else-if="!client.satisfactionScore"> ��遛��漲 </div> @@ -93,9 +95,9 @@ </el-row> <Ui-Dialog - :isVisible.sync="isVisibleDialog" + :isVisible.sync="isShowInformDialog" :width="dialogWidth" - @closeDialog="closeDialog" + @closeDialog="closeInformDialog" class="pam-myDemand-dialog" > <h5 class="subTitle text--center mb-30" @@ -158,10 +160,10 @@ :client="client" :isVisible.sync="isShowAddInterviewDialog"> </InterviewMsg> - <PopUpFrame :isOpen.sync="showInviteReview"> + <PopUpFrame :isOpen.sync="isShowInviteReviewDialog"> <div class="text--middle invite-review"> <div class="mb-30 mt-10">撌脩�遛��漲</div> - <div class="text--primary text--middle cursor--pointer text--underline" @click="showInviteReview = false" :size="'250px'">������</div> + <div class="text--primary text--middle cursor--pointer text--underline" @click="isShowInviteReviewDialog = false" :size="'250px'">������</div> </div> </PopUpFrame> </div> @@ -175,7 +177,7 @@ import UtilsService from '~/shared/services/utils.service'; import { hideReviews } from '~/shared/const/hide-reviews'; import { ElRow } from 'element-ui/types/row'; -import { Appointment, AppointmentMemoInfo, ToInformAppointment } from '~/shared/models/appointment.model'; +import { Appointment, AppointmentMemoInfo } from '~/shared/models/appointment.model'; import { ContactStatus } from '~/shared/models/enum/contact-status'; const localStorage = namespace('localStorage'); @@ -209,22 +211,20 @@ storageClearAppointmentIdFromMsg!: () => void; contactStatus = ContactStatus; + dialogWidth = ''; hideReviews = hideReviews; isEdit = false; isShowAddInterviewDialog = false; - isVisibleDialog = false; + isShowInformDialog = false; + isShowInviteReviewDialog = false; memo = ''; - showInviteReview = false; - - - // currentAppointmentStatus = this.contactStatus.RESERVED; memoInfo: AppointmentMemoInfo = { appointmentId: 0, content : '', id : 0 - } + }; ////////////////////////////////////////////////////////////////////// @@ -247,7 +247,7 @@ ////////////////////////////////////////////////////////////////////// - viewDetail(): void { + viewAppointmentDetail(): void { this.$router.push(`/appointment/${this.client.id}`); } @@ -264,62 +264,7 @@ } inviteReview(): void { - this.showInviteReview = true ; - } - - get newAppointment(): boolean { - return !this.client.consultantViewTime - && this.client.communicateStatus === 'reserved'; - } - - get isReserved() { - return this.client.communicateStatus === 'reserved'; - } - - get isRead() { - return !!this.client.consultantReadTime; - } - - get requirements() { - return this.client.requirement.split(','); - } - - get gender() { - if (this.client.gender) { - return this.client.gender === 'male' ? '���' : '憟單��'; - } - return ''; - } - - get hopeContactTime() { - const contactList = this.client.hopeContactTime.split("'").map(item => item.slice(0, item.length)); - return contactList.filter(item => !!item && item !== ",") - } - - get reservedTxt(): string { - if (this.isReserved) { - return this.client.consultantReadTime ? '撌脰�' : '�霈�'; - } else { - return '撌脰蝯�' - } - } - - get displayTime(): string { - if (this.isReserved) { - return this.client.appointmentDate; - } else { - return this.client.lastModifiedDate; - } - } - - get time() { - const formatDate = (this.$options.filters as any).formatDate(this.displayTime); - return formatDate.split(' ')[1] - } - - get date() { - const formatDate = (this.$options.filters as any).formatDate(this.displayTime); - return formatDate.split(' ')[0]; + this.isShowInviteReviewDialog = true ; } openDetail() { @@ -327,17 +272,17 @@ (this.$refs.clientCardRef as any).$el.classList.add('currentShowStyle'); }, 0) this.dialogWidth = UtilsService.isMobileDevice() ? '80%' : ''; - this.isVisibleDialog = true; + this.isShowInformDialog = true; } markAppointment() { myConsultantService.markAsContact(this.client.id).then(data => { this.updateMyAppointment(data); - this.isVisibleDialog = false; + this.isShowInformDialog = false; }) } - closeDialog(): void { + closeInformDialog(): void { const unread = !this.client.consultantReadTime; if (unread) { appointmentService.recordRead(this.client.id).then((_) => { @@ -404,54 +349,109 @@ this.memo = this.memoInfo.content; } + get newAppointment(): boolean { + return !this.client.consultantViewTime + && this.client.communicateStatus === 'reserved'; + } + + get isReserved() { + return this.client.communicateStatus === 'reserved'; + } + + get isRead() { + return !!this.client.consultantReadTime; + } + + get requirements() { + return this.client.requirement.split(','); + } + + get gender() { + if (this.client.gender) { + return this.client.gender === 'male' ? '���' : '憟單��'; + } + return ''; + } + + get hopeContactTime() { + const contactList = this.client.hopeContactTime.split("'").map(item => item.slice(0, item.length)); + return contactList.filter(item => !!item && item !== ",") + } + + get reservedTxt(): string { + if (this.isReserved) { + return this.client.consultantReadTime ? '撌脰�' : '�霈�'; + } else { + return '撌脰蝯�' + } + } + + get displayTime(): string { + if (this.isReserved) { + return this.client.appointmentDate; + } else { + return this.client.lastModifiedDate; + } + } + + get date() { + const formatDate = (this.$options.filters as any).formatDate(this.displayTime); + return formatDate.split(' ')[0]; + } + + get time() { + const formatDate = (this.$options.filters as any).formatDate(this.displayTime); + return formatDate.split(' ')[1] + } + } </script> <style lang="scss" scoped> .rowStyle { - padding: 10px 15px 10px 5px; background-color: $PRIMARY_WHITE; - margin-bottom: 10px; - display: flex; - justify-content: space-between; - + border-left : solid 4px transparent; + display : flex; + justify-content : space-between; + margin-bottom : 10px; + padding : 10px 15px 10px 5px; transition: background-color 0.5s; &.new { - border-left: solid 4px $YELLOW; + border-color: $YELLOW; } &.currentShowStyle { background-color: rgba(236, 195, 178, 0.5); - transition: background-color 0.5s; + transition : background-color 0.5s; } .unread { align-self: center; .circle { - width: 10px; - height: 10px; - border-radius: 50%; background-color: $PRIMARY_RED; - margin: auto; + border-radius : 50%; + height : 10px; + margin : auto; + width : 10px; } } .satisfaction { - font-size: 12px; + font-size : 12px; font-weight: bold; - margin-top: 5px; + margin-top : 5px; .unfilled { + color : $MID_GREY; font-weight: lighter; - color: $MID_GREY; } } .professionals { - overflow: hidden; - white-space: nowrap; + overflow : hidden; text-overflow: ellipsis; + white-space : nowrap; .professionalsTxt { - font-size: 12px; + font-size : 12px; margin-right: 5px; } .noProfessionalsTxt { - color: $PRUDENTIAL_GREY; + color : $PRUDENTIAL_GREY; font-weight: lighter; } } @@ -469,24 +469,23 @@ } } .flex-column { - display: flex; - flex-direction: column; + display : flex; + flex-direction : column; justify-content: space-between; } .dialogTxt { - font-size: 20px; - overflow-y:scroll; + font-size : 20px; max-height: 25vh; + overflow-y: scroll; @include desktop { height: 400px; } } .memoTitleStyle { - display: flex; - flex-direction: row; + display : flex; + flex-direction : row; justify-content: space-between; - - .edit { + .edit { align-self: flex-end; } } @@ -498,11 +497,11 @@ } .invite-msg{ color: $PRIMARY_RED; - @extend .text--underline; + @extend .text--underline; } .invite-review{ - display: flex; + align-items : center; + display : flex; flex-direction: column; - align-items: center; } </style> -- Gitblit v1.8.0