保誠-保戶業務員媒合平台
HelenHuang
2022-02-15 dc834c0bb42b788888212d5a58eeff0d98373bec
Update#135214 [平台滿意度] 調整填寫滿意度 overall 頁面
修改7個檔案
新增1個檔案
92 ■■■■■ 已變更過的檔案
PAMapp/components/ReviewRecords/ReviewRecords.vue 2 ●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/index.vue 6 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/questionnaire/_agentNo.vue 8 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/satisfactionList.vue 34 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/shared/models/appointment.model.ts 16 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/shared/models/enum/satisfaction-type.ts 5 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/shared/models/reviews.model.ts 11 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/shared/services/reviews.service.ts 10 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/components/ReviewRecords/ReviewRecords.vue
@@ -18,7 +18,7 @@
                v-for="(appointmentLog, index) in reviewLogList"
                :key="index">
                <div class="user-reviews-card-content" v-if="isUserLogin">
                    æ‚¨å°<span class="mdTxt">{{ ` ${appointmentLog.agentName} ` }}</span>做了 <UiReviewScore :score="appointmentLog.score" /> è©•價!
                    æ‚¨å°<span class="mdTxt">{{ ` ${appointmentLog.type === 'APPOINTMENT' ? appointmentLog.agentName : '平台'} ` }}</span>做了 <UiReviewScore :score="appointmentLog.score" /> è©•價!
                </div>
                <div class="user-reviews-card-content" v-else>
                    {{ `${appointmentLog.customerName} `}} å°æ‚¨åšäº† <UiReviewScore :score="appointmentLog.score" /> è©•價!
PAMapp/pages/index.vue
@@ -149,10 +149,11 @@
  import myConsultantService from '~/shared/services/my-consultant.service';
  import { Appointment, AppointmentClosedInfo } from '~/shared/models/appointment.model';
  import { Consultant } from '~/shared/models/consultant.model';
  import { UserReviewsConsultantsParams } from '~/shared/models/reviews.model';
  import { UserReviewParams } from '~/shared/models/reviews.model';
  import { StrictQueryParams } from '~/shared/models/strict-query.model';
  import { AgentInfo } from '~/shared/models/agent-info.model';
  import { ContactStatus } from '~/shared/models/enum/contact-status';
import { SatisfactionType } from '~/shared/models/enum/satisfaction-type';
  const localStorage = namespace('localStorage');
  const roleStorage = namespace('localStorage');
@@ -378,9 +379,10 @@
    }
    userReviewsConsultants() {
      const reviewParams: UserReviewsConsultantsParams = {
      const reviewParams: UserReviewParams = {
            appointmentId: this.appointmentDetail.id,
            score: this.inputScore,
            type: SatisfactionType.APPOINTMENT
        }
        this.appointmentDetail.satisfactionScore = this.inputScore;
PAMapp/pages/questionnaire/_agentNo.vue
@@ -166,8 +166,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
@@ -484,9 +485,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();
PAMapp/pages/satisfactionList.vue
@@ -8,11 +8,20 @@
      </div>
      <template v-if="mapUnReviewLogList.length">
        <div class="satisfaction-card" v-for="(item, index) in mapUnReviewLogList" :key="index">
          <div class="satisfaction-card-content">
          <div class="satisfaction-card-content"  v-if="item.agentName">
            <UiAvatar :size="80" :agentNo="item.agentNo"></UiAvatar>
            <div class="satisfaction-card-text">對於顧問
                <span class="text--primary text--bold">{{item.agentName}}</span>
                çš„æ•´é«”服務,您給予幾顆星評價?
            </div>
          </div>
           <div class="satisfaction-card-content"  v-else>
            <div class="pam-satisfaction-avatar">
              <span class="pam-satisfaction-avatar-txt">平台</span>
              </div>
            <div class="satisfaction-card-text" >對於
                <span class="text--primary text--bold">服務媒合</span>
                å¹³å°çš„æ•´é«”服務,您給予幾顆星評價?
            </div>
          </div>
          <el-rate
@@ -46,9 +55,10 @@
<script lang="ts">
import { Vue, Component, Action, State, Watch } from 'nuxt-property-decorator';
import { AppointmentLog } from '~/shared/models/appointment.model';
import { UserReviewsConsultantsParams } from '~/shared/models/reviews.model';
import reviewsService from '~/shared/services/reviews.service';
import { AppointmentLog } from '~/shared/models/appointment.model';
import { UserReviewParams } from '~/shared/models/reviews.model';
@Component({
  layout: 'home'
@@ -80,12 +90,13 @@
  ///////////////////////////////////////////////////////
  sent() {
    const reviewParams: UserReviewsConsultantsParams[] = this.mapUnReviewLogList
    const reviewParams: UserReviewParams[] = this.mapUnReviewLogList
                .filter(item => item.satisfaction > 0)
                .map(item => {
                  return {
                    appointmentId: item.appointmentId,
                    score: item.satisfaction
                    score: item.satisfaction,
                    type: item.type
                  }
                })
@@ -147,6 +158,19 @@
      font-size: 20px;
      padding-left: 10px;
    }
    .pam-satisfaction-avatar{
      height: 80px;
      width: 80px;
      border-radius: 50%;
      background-color:#F09491;
      justify-content: center;
      align-items: center;
      display: flex;
      .pam-satisfaction-avatar-txt{
        font-size: 18px;
        color: #fff;
      }
    }
    @include desktop {
        justify-content: flex-start;
PAMapp/shared/models/appointment.model.ts
@@ -1,16 +1,18 @@
import { ContactStatus } from "./enum/contact-status";
import { SatisfactionType } from "./enum/satisfaction-type";
export interface AppointmentLog {
    agentName       : string;
    agentNo         : string;
    appointmentId   : number;
    createdDate     : string;
    customerId      : number;
    customerName    : string;
    id              : number;
  createdDate     : string;
    lastModifiedDate: string;
    score           : number;
  customerId      : number;
  agentNo         : string;
    status          : 'UNFILLED' | 'FILLED';
  score           : number;
  appointmentId   : number;
  customerName    : string;
  agentName       : string;
  type            : SatisfactionType;
}
export interface Appointment {
PAMapp/shared/models/enum/satisfaction-type.ts
¤ñ¹ï·sÀÉ®×
@@ -0,0 +1,5 @@
export enum SatisfactionType {
  SYSTEM = 'SYSTEM',
  APPOINTMENT = 'APPOINTMENT',
}
PAMapp/shared/models/reviews.model.ts
@@ -1,6 +1,8 @@
export interface UserReviewsConsultantsParams{
import { SatisfactionType } from './enum/satisfaction-type';
export interface UserReviewParams{
  appointmentId: number,
  score        : number,
  type         : SatisfactionType,
}
export interface NotificationList {
@@ -20,16 +22,11 @@
  readDate: string;
}
export interface UserReviewPlatformParams {
  appointmentId: number;
  score        : number;
}
export interface UserReviewPlatformRes {
  agentNo?     : string;
  appointmentId: number;
  customerId   : string;
  id           : number,
  score        : string;
  type         : 'APPOINTMENT' | 'SYSTEM';
  type         : SatisfactionType;
}
PAMapp/shared/services/reviews.service.ts
@@ -1,17 +1,17 @@
import { http } from "./httpClient";
import { NotificationList, UserReviewPlatformParams, UserReviewPlatformRes, UserReviewsConsultantsParams } from "../models/reviews.model";
import { NotificationList, UserReviewPlatformRes, UserReviewParams } from "../models/reviews.model";
import { AppointmentLog } from "../models/appointment.model";
class ReviewsService {
  //客戶進行滿意度評分(單筆)
  userReviewsConsultants(data: UserReviewsConsultantsParams) {
  userReviewsConsultants(data: UserReviewParams) {
    return http.post('/satisfaction/score', data);
  }
  // å®¢æˆ¶é€²è¡Œæ»¿æ„åº¦(多筆)
  allUserReviewsConsultants(data: UserReviewsConsultantsParams[]) {
  allUserReviewsConsultants(data: UserReviewParams[]) {
    return http.post('/satisfaction/score/all', data);
  }
@@ -37,8 +37,8 @@
  }
  // å®¢æˆ¶å¡«å¯«å¹³å°æ»¿æ„åº¦
  reviewPlatform(params: UserReviewPlatformParams): Promise<UserReviewPlatformRes> {
    return http.post('/satisfaction/system/score', params);
  reviewPlatform(params: UserReviewParams): Promise<UserReviewPlatformRes> {
    return http.post('/satisfaction/score', params);
  }
}