PAMapp/pages/myAppointmentList/appointmentList.vue | ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程 | |
PAMapp/pages/myAppointmentList/closedList.vue | ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程 |
PAMapp/pages/myAppointmentList/appointmentList.vue
@@ -63,18 +63,11 @@ @Watch('myAppointmentList') onMyAppointmentListChange(): void { const tempViewList = this.myAppointmentList .filter(item => item.communicateStatus === this.contactStatus.RESERVED); // 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)})) .filter(item => item.communicateStatus === this.contactStatus.RESERVED) .map((item) => ({ ...item, sortTime: new Date(item.lastModifiedDate)})) .sort((preItem, nextItem) => +nextItem.sortTime - +preItem.sortTime); this.appointmentList = [ ...unreadList, ...readList]; this.filterList = this.appointmentList; this.filterList = tempViewList; this.getCurrentPage(); } PAMapp/pages/myAppointmentList/closedList.vue
@@ -74,8 +74,8 @@ @Watch('myAppointmentList') onMyAppointmentListChange() { this.closedList = (this.myAppointmentList || []) .filter(item => item.communicateStatus === this.contactStatus.DONE || item.communicateStatus === this.contactStatus.CLOSE) .map((item) => ({...item, sortTime: new Date(item.contactTime)})) .filter(item => item.communicateStatus === this.contactStatus.DONE || item.communicateStatus === this.contactStatus.CLOSE || item.communicateStatus === this.contactStatus.CANCEL) .map((item) => ({...item, sortTime: new Date(item.lastModifiedDate)})) .sort((prevItem, nextItem) => +nextItem.sortTime - +prevItem.sortTime); this.filterList = this.closedList; this.itemSum = this.closedList.length;