| | |
| | | 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 |
| | |
| | | |
| | | @Watch('myAppointmentList') |
| | | onMyAppointmentListChange(): void { |
| | | const tempViewList = this.myAppointmentList |
| | | 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); |
| | | |
| | | this.filterList = tempViewList; |
| | | this.filterList = this.appointmentList; |
| | | |
| | | this.getCurrentPage(); |
| | | } |
| | |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | | 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 { |