From aecb706f3c17eb36076160d27a0db24525da3ca7 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期六, 22 一月 2022 15:49:07 +0800
Subject: [PATCH] Update : 顧問流程樣式更新

---
 PAMapp/pages/satisfactionList.vue |   53 ++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 36 insertions(+), 17 deletions(-)

diff --git a/PAMapp/pages/satisfactionList.vue b/PAMapp/pages/satisfactionList.vue
index e54717c..a6bae69 100644
--- a/PAMapp/pages/satisfactionList.vue
+++ b/PAMapp/pages/satisfactionList.vue
@@ -4,17 +4,17 @@
     <div class="pam-container">
       <div class="satisfaction-title">
         <span class="mdTxt">皛踵�漲隤踵</span>
-        <span class="ml-10 text--prudential_grey smTxt_bold">� {{satisfactionList.length}} 蝑�</span>
+        <span class="ml-10 text--prudential_grey smTxt_bold">� {{mapUnReviewLogList.length}} 蝑�</span>
       </div>
-      <div class="satisfaction-card" v-for="(item, index) in satisfactionList" :key="index">
+      <div class="satisfaction-card" v-for="(item, index) in mapUnReviewLogList" :key="index">
         <div class="satisfaction-card-content">
-          <UiAvatar :size="80" :agentNo="''"></UiAvatar>
+          <UiAvatar :size="80" :agentNo="item.agentNo"></UiAvatar>
           <div class="satisfaction-card-text">撠憿批��
               <span class="text--primary text--bold">{{item.agentName}}</span>
               ��擃���蝯虫�嗾憿��嚗�
           </div>
         </div>
-        <el-rate v-model="item.score" class="pam-satisfaction-rate mt-10"></el-rate>
+        <el-rate v-model="item.score" class="pam-satisfaction-rate mt-10 fix-chrome-click--issue"></el-rate>
       </div>
       <div class="text--center mt-30">
         <el-button type="primary" :disabled="isBtnDisabled">�</el-button>
@@ -23,27 +23,46 @@
   </div>
 </template>
 
-<script>
-import { Vue, Component } from 'nuxt-property-decorator';
+<script lang="ts">
+import { Vue, Component, Action, State, Watch } from 'nuxt-property-decorator';
+import { AppointmentLog } from '~/shared/models/appointment.model';
 
 @Component({
   layout: 'home'
 })
 export default class MySatisfactionList extends Vue {
-  satisfactionList = [
-    {
-      agentName: '�蝢��',
-      score: 0
-    },
-    {
-      agentName: '�蝢��',
-      score: 0
+
+  @State
+  unReviewLogList!: AppointmentLog[];
+
+  mapUnReviewLogList: AppointmentReviewLog[] = [];
+
+  ///////////////////////////////////////////////////////
+
+  @Watch('unReviewLogList')
+  onUnReviewLogListChange() {
+    if (this.unReviewLogList.length) {
+      this.mapUnReviewLogList = this.unReviewLogList.map(item => {
+        return {
+          ...item,
+          satisfaction: 0
+        }
+      })
     }
-  ]
+  }
+
+  ///////////////////////////////////////////////////////
 
   get isBtnDisabled() {
-    return this.satisfactionList.findIndex(item => item.score > 0) === -1;
+    if (this.mapUnReviewLogList.length) {
+      return this.mapUnReviewLogList.findIndex(item => item.satisfaction > 0) === -1;
+    }
+    return false;
   }
+}
+
+interface AppointmentReviewLog extends AppointmentLog {
+  satisfaction: number;
 }
 </script>
 
@@ -99,4 +118,4 @@
   }
 
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.8.0