From 1ea7200df3ce7be88dcdc53f5043c182282f77dc Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期五, 21 一月 2022 09:44:45 +0800 Subject: [PATCH] update: 顧問_預約單列表 - 未聯絡, 結案清單排序(新->舊) --- PAMapp/pages/myAppointmentList/appointmentList.vue | 15 ++++----------- 1 files changed, 4 insertions(+), 11 deletions(-) diff --git a/PAMapp/pages/myAppointmentList/appointmentList.vue b/PAMapp/pages/myAppointmentList/appointmentList.vue index a573885..a2a19cc 100644 --- a/PAMapp/pages/myAppointmentList/appointmentList.vue +++ b/PAMapp/pages/myAppointmentList/appointmentList.vue @@ -63,18 +63,11 @@ @Watch('myAppointmentList') onMyAppointmentListChange(): void { const tempViewList = this.myAppointmentList - .filter(item => item.communicateStatus === this.contactStatus.RESERVED); + .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.filterList = tempViewList; this.getCurrentPage(); } -- Gitblit v1.8.0