| | |
| | | placeholder="請輸入關鍵字" |
| | | class="mb-30 pam-clientReserved-input" |
| | | v-model="keyWord" |
| | | @keyup.enter.native="search" |
| | | > |
| | | <i slot="suffix" class="icon-search search cursor--pointer" @click="search"></i> |
| | | </el-input> |
| | |
| | | ></ClientList> |
| | | |
| | | <UiPagination |
| | | :totalList="appointmentList" |
| | | :totalList="filterList" |
| | | @changePage="changePage" |
| | | ></UiPagination> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component, Prop, State, Watch } from 'nuxt-property-decorator'; |
| | | import { Vue, Component, State, Watch } from 'nuxt-property-decorator'; |
| | | import { ClientInfo } from '~/assets/ts/api/appointment'; |
| | | |
| | | @Component |
| | |
| | | |
| | | @Watch('myAppointmentList') |
| | | onMyAppointmentListChange() { |
| | | this.appointmentList = this.myAppointmentList |
| | | .filter(item => item.communicateStatus !== 'contacted') |
| | | .sort((a, b) => a.appointmentDate > b.appointmentDate ? -1 : 1);; |
| | | const unreadList = this.myAppointmentList |
| | | .filter(item => item.communicateStatus !== 'contacted' && !item.consultantReadTime) |
| | | .sort((a, b) => a.consultantViewTime > b.consultantViewTime ? 1 : -1); |
| | | |
| | | const readList = this.myAppointmentList |
| | | .filter(item => item.communicateStatus !== 'contacted' && item.consultantReadTime) |
| | | .sort((a, b) => a.consultantReadTime > b.consultantReadTime ? -1 : 1) |
| | | |
| | | this.appointmentList = unreadList.concat(readList); |
| | | this.filterList = this.appointmentList; |
| | | } |
| | | |
| | | mounted() { |