保誠-保戶業務員媒合平台
Tomas
2021-12-27 614f4074a7dfca7a5c887c54a10c649595e51358
page refactor: my-consultant-list
修改3個檔案
40 ■■■■■ 已變更過的檔案
PAMapp/pages/myConsultantList.vue 24 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/myConsultantList/consultantList.vue 8 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/myConsultantList/contactedList.vue 8 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/myConsultantList.vue
@@ -21,6 +21,7 @@
            :contactedList="contactedList"
            :consultantList="consultantList"
        ></NuxtChild>
    </div>
</template>
@@ -31,15 +32,15 @@
@Component
export default class myConsultantList extends Vue {
    activeTabName = 'consultantList';
    consultantList: Consultant[] = [];
    contactedList: ConsultantWithAppointmentId[] = [];
    @State('myConsultantList')
    myConsultantList!: Consultant[];
    @Action
    storeConsultantList!: any;
    activeTabName : string                        = 'consultantList';
    consultantList: Consultant[]                  = [];
    contactedList : ConsultantWithAppointmentId[] = [];
    //////////////////////////////////////////////////////////////////////
@@ -66,13 +67,6 @@
    onMyConsultantListChange() {
        this.setList();
    }
    clickTab(path: string) {
        this.activeTabName = path;
        this.$router.push('/myConsultantList/' + this.activeTabName)
    }
    //////////////////////////////////////////////////////////////////////
    private setList() {
      // reset contacted list
@@ -105,6 +99,14 @@
          .sort((preAppointment, nextAppointment) => +nextAppointment.sortTime - +preAppointment.sortTime);
    }
    //////////////////////////////////////////////////////////////////////
    clickTab(path: string) {
        this.activeTabName = path;
        this.$router.push('/myConsultantList/' + this.activeTabName)
    }
}
</script>
PAMapp/pages/myConsultantList/consultantList.vue
@@ -16,12 +16,16 @@
import { Vue, Component, Prop } from 'nuxt-property-decorator';
import { Consultant } from '~/shared/models/consultant.model';
@Component
export default class ConsultantPage extends Vue {
    @Prop() consultantList!: Consultant[];
    @Prop()
    consultantList!: Consultant[];
    pageList: Consultant[] = [];
    //////////////////////////////////////////////////////////////////////
    changePage(pageList: Consultant[]) {
        this.pageList = pageList;
    }
PAMapp/pages/myConsultantList/contactedList.vue
@@ -16,12 +16,16 @@
import { Vue, Component, Prop } from 'nuxt-property-decorator' ;
import { Consultant } from '~/shared/models/consultant.model';
@Component
export default class ContactedList extends Vue {
    @Prop() contactedList!: Consultant[];
    @Prop()
    contactedList!: Consultant[];
    pageList: Consultant[] = [];
    //////////////////////////////////////////////////////////////////////
    changePage(pageList: Consultant[]) {
        this.pageList = pageList;
    }