From 9bdb95c9e34cef640534e5e5a1e2225a80442000 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期四, 09 六月 2022 15:48:15 +0800
Subject: [PATCH] TODO#139894 [ footer -最下方說明與保經代合作 ] 文案修改

---
 PAMapp/pages/myAppointmentList/appointmentList.vue |   30 ++++++++++++++----------------
 1 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/PAMapp/pages/myAppointmentList/appointmentList.vue b/PAMapp/pages/myAppointmentList/appointmentList.vue
index a573885..e623916 100644
--- a/PAMapp/pages/myAppointmentList/appointmentList.vue
+++ b/PAMapp/pages/myAppointmentList/appointmentList.vue
@@ -5,9 +5,9 @@
             placeholder="隢撓���摮�"
             class="mb-30 pam-clientReserved-input"
             v-model="keyWord"
-            @keyup.enter.native="search"
+            @input="search"
         >
-            <i slot="suffix" class="icon-search search cursor--pointer" @click="search"></i>
+            <i slot="suffix" class="icon-search search cursor--pointer"></i>
         </el-input>
 
         <ClientList
@@ -62,18 +62,11 @@
 
     @Watch('myAppointmentList')
     onMyAppointmentListChange(): void {
-      const tempViewList = this.myAppointmentList
-          .filter(item => item.communicateStatus === this.contactStatus.RESERVED);
+      this.appointmentList = this.myAppointmentList
+          .filter(item => item.communicateStatus === this.contactStatus.RESERVED)
+          .map((item) => ({ ...item, sortTime: new Date(item.lastModifiedDate)}))
+          .sort((preItem, nextItem) => +nextItem.sortTime - +preItem.sortTime);
 
-      // TODO: 敺������� unreadList ��蝝啁溶�������隢�垢����靘������ createTime嚗�Tomas, 2021/12/16];
-      const unreadList = tempViewList
-                    .filter((item) => !item.consultantReadTime);
-      const readList = tempViewList
-                    .filter((item) => item.consultantReadTime)
-                    .map((item) => ({ ...item, sortTime: new Date(item.consultantReadTime)}))
-                    .sort((preItem, nextItem) => +nextItem.sortTime - +preItem.sortTime);
-
-      this.appointmentList = [ ...unreadList, ...readList];
       this.filterList = this.appointmentList;
 
       this.getCurrentPage();
@@ -91,9 +84,14 @@
     //////////////////////////////////////////////////////////////////////
 
     search(): void {
-        this.filterList = this.appointmentList.filter(item => {
-            return item.name.match(this.keyWord) || item.requirement.match(this.keyWord)
-        })
+        if (this.keyWord) {
+            this.filterList = this.appointmentList.filter(item => {
+                return item.name.match(this.keyWord) || item.requirement.match(this.keyWord);
+            })
+        } else {
+            this.filterList = this.appointmentList;
+        }
+
     }
 
     changePage(pageList: Appointment[]): void {

--
Gitblit v1.9.3