From 57dc3fc3fcd7c33e2cdd9bb7ba40028dd60faa17 Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期四, 09 十二月 2021 17:00:16 +0800
Subject: [PATCH] Merge branch 'master' of https://192.168.0.10:8443/r/pcalife/PAM

---
 PAMapp/pages/index.vue |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/PAMapp/pages/index.vue b/PAMapp/pages/index.vue
index 3be99fc..4bd0a61 100644
--- a/PAMapp/pages/index.vue
+++ b/PAMapp/pages/index.vue
@@ -52,7 +52,7 @@
   })
   export default class MainComponent extends Vue {
     consultantList: Consultant[] = [];
-    agents: Consultant[] = [];
+
     @State('recommendList') recommendList!: Consultant[];
     @Action storeRecommendList!: any;
 
@@ -66,7 +66,8 @@
     onMyConsultantListChange() {
       this.consultantList = (this.myConsultantList || [])
         .filter(item => item.contactStatus !== 'contacted')
-        .sort((a, b) => a.updateTime > b.updateTime ? -1 : 1)
+        .map((item) => ({ ...item, formatDate: new Date(item.updateTime)}))
+        .sort((preItem, nextItem) => +nextItem.formatDate - +preItem.formatDate)
     }
 
     mounted() {
@@ -75,7 +76,6 @@
       }
 
       this.storeConsultantList();
-
       this.storageClearQuickFilter();
       this.storageClearRecommendConsultant();
     }

--
Gitblit v1.8.0