From 2b4ffaea5c43c32a9335d4aa9becceea220ce68c Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期三, 03 十一月 2021 09:16:58 +0800
Subject: [PATCH] TODO#129054 我的顧問清單 畫面刻版

---
 PAMapp/assets/scss/utilities/_icon.scss               |    9 
 PAMapp/pages/myConsultantList.vue                     |   99 +++++++++
 PAMapp/pages/myConsultantList/contactedList.vue       |   27 ++
 PAMapp/components/Ui/UiDialog.vue                     |    2 
 PAMapp/components/Consultant/ConsultantCard.vue       |  134 ++++++++---
 /dev/null                                             |    3 
 PAMapp/plugins/api/home.ts                            |   85 ++++---
 PAMapp/components/Consultant/ConsultantSwiper.vue     |   32 ++
 PAMapp/assets/scss/vendors/elementUI/_pagination.scss |   39 +++
 PAMapp/pages/index.vue                                |   87 +++----
 PAMapp/pages/myConsultantList/consultantList.vue      |   36 +++
 PAMapp/assets/scss/vendors/_elementUI.scss            |    2 
 PAMapp/assets/scss/vendors/elementUI/_dialog.scss     |   22 ++
 PAMapp/components/Ui/UiPagination.vue                 |   43 +++
 PAMapp/components/Consultant/ConsultantList.vue       |   12 
 PAMapp/layouts/home.vue                               |    4 
 16 files changed, 490 insertions(+), 146 deletions(-)

diff --git a/PAMapp/assets/scss/utilities/_icon.scss b/PAMapp/assets/scss/utilities/_icon.scss
index 3d2b22e..32f2ef1 100644
--- a/PAMapp/assets/scss/utilities/_icon.scss
+++ b/PAMapp/assets/scss/utilities/_icon.scss
@@ -2,7 +2,10 @@
   font-size: 15px;
   padding-right: 8px;
   color: $PRUDENTIAL_GREY;
-  &.icon--primary {
-    color: $PRIMARY_RED;
-  }
+    &.icon--primary {
+      color: $PRIMARY_RED;
+    }
+    &.icon--yellow {
+      color: $YELLOW;
+    }
 }
diff --git a/PAMapp/assets/scss/vendors/_elementUI.scss b/PAMapp/assets/scss/vendors/_elementUI.scss
index 30e1972..28acb25 100644
--- a/PAMapp/assets/scss/vendors/_elementUI.scss
+++ b/PAMapp/assets/scss/vendors/_elementUI.scss
@@ -8,3 +8,5 @@
 @import './elementUI/_carousel';
 @import './elementUI/_rate';
 @import './elementUI/_tag';
+@import './elementUI/_pagination';
+@import './elementUI/_dialog';
\ No newline at end of file
diff --git a/PAMapp/assets/scss/vendors/elementUI/_dialog.scss b/PAMapp/assets/scss/vendors/elementUI/_dialog.scss
new file mode 100644
index 0000000..1610f91
--- /dev/null
+++ b/PAMapp/assets/scss/vendors/elementUI/_dialog.scss
@@ -0,0 +1,22 @@
+.el-dialog {
+    border-radius: 10px;
+
+    .el-dialog__header {
+        padding: 0;
+    }
+
+    .el-dialog__headerbtn {
+        top: -55px;
+        background-color: $PRIMARY_WHITE;
+        border-radius: 50px;
+        width: 45px;
+        height: 45px;
+        right: 0;
+
+        .el-icon-close {
+            @extend .subTitle;
+            color: $PRIMARY_RED;
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/PAMapp/assets/scss/vendors/elementUI/_pagination.scss b/PAMapp/assets/scss/vendors/elementUI/_pagination.scss
new file mode 100644
index 0000000..52704dd
--- /dev/null
+++ b/PAMapp/assets/scss/vendors/elementUI/_pagination.scss
@@ -0,0 +1,39 @@
+.el-pagination {
+    text-align: center;
+    background-color: #F8F9FA;
+
+    .btn-prev,.btn-next {
+        border: solid 1px;
+        border-radius: 50px;
+        padding: 0;
+        width: 24px;
+        height: 24px;
+        min-width: 24px;
+        vertical-align: bottom;
+        background-color: $PRIMARY_BLACK;
+        color: $PRIMARY_WHITE;
+        font-size: 16px;
+
+        &::before {
+            font-weight: bold;
+        }
+
+        &:disabled {
+            background-color: $MID_GREY;
+            color: $PRIMARY_WHITE;
+        }
+    }
+
+    .el-pager {
+        .number {
+            background-color: #F8F9FA;
+            color: $MID_GREY;
+
+            &.active {
+                color: $PRIMARY_BLACK;
+            }
+        }
+
+
+    }
+}
\ No newline at end of file
diff --git a/PAMapp/components/Consultant/ConsultantCard.vue b/PAMapp/components/Consultant/ConsultantCard.vue
index 2b7525e..88b44c4 100644
--- a/PAMapp/components/Consultant/ConsultantCard.vue
+++ b/PAMapp/components/Consultant/ConsultantCard.vue
@@ -5,49 +5,100 @@
             <el-col :xs="22" :sm="23">
                 <el-row type="flex">
                     <el-col class="flex_column" :xs="5" :sm="3">
-                        <img class="avator" :src="agentInfo.img" alt="">
-                        <div class="star">{{agentInfo.satisfaction}}</div>
-                    </el-col>
-                    <el-col class="flex_column" :xs="10" :sm="15">
-                        <div class="smTxt_bold name">{{agentInfo.name}}</div>
-                        <div class="tagStyle">
-                            <span
-                                class="tagTxt"
-                                v-for="(tag, index) in agentInfo.tags" :key="index">#{{tag}}</span>
+                        <el-avatar
+                            :size="50"
+                            :src="agentInfo.img"
+                            class="cursor--pointer"
+                            @click.native="$router.push('/agentInfo')"
+                        ></el-avatar>
+                        <div class="satisfaction">
+                            <i class="icon-star pam-icon icon--yellow satisfaction"></i>
+                            <span>{{agentInfo.satisfaction}}</span>
                         </div>
-                        <div class="delete" @click="removeAgent">蝘駁</div>
+                    </el-col>
+                    <el-col :xs="10" :sm="15">
+                        <div class="smTxt_bold name">{{agentInfo.name}}</div>
+                        <div class="professionals">
+                            <span
+                                class="professionalsTxt"
+                                v-for="(professional, index) in agentInfo.professionals"
+                                :key="index"
+                            >#{{professional}}</span>
+                        </div>
+                        <div
+                            class="delete"
+                            v-if="agentInfo.contactStatus === 'picked'"
+                            @click="removeAgent"
+                        >蝘駁</div>
                     </el-col>
                     <el-col class="flex_column" :xs="9" :sm="6">
                         <el-button
                             class="smTxt_bold outline_btn"
                             @click="reserveCommunication"
-                            :class="{'reservedBtn': agentInfo.reserve}"
-                        >{{ agentInfo.reserve ? '撌脤���' : '�脰����'}}</el-button>
-                        <div class="time">隞予 10:00 ��</div>
+                            :class="agentInfo.contactStatus + 'Btn'"
+                        >{{ contactTxt }}</el-button>
+                        <div class="updateTime">{{updateTime}}</div>
                     </el-col>
                 </el-row>
             </el-col>
         </el-row>
+
+        <Ui-Dialog :isVisible.sync="isVisibleDialog">
+            <h5 class="subTitle text--center mb-30">������</h5>
+            <p class="smTxt">隞予 10:00</p>
+            <div class="dialogInfo">
+                <p>憪������</p>
+                <p>�閰梧��0912345678</p>
+                <p>Email嚗�</p>
+                <p>�批 嚗��</p>
+                <p>撟湧翩嚗�26-30</p>
+                <p>�璆哨����璆�</p>
+                <p>��瘙���瑼�/閬���靽����</p>
+                <p>��蝯⊥�挾銝�嚗���,��� 18:00~21:00</p>
+            </div>
+        </Ui-Dialog>
     </div>
 </template>
 
 <script lang="ts">
-import { Vue, Component, Prop, Emit, Watch } from 'nuxt-property-decorator';
+import { Vue, Component, Prop, Emit } from 'nuxt-property-decorator';
 import { Agents } from '~/plugins/api/home';
 
 @Component
 export default class ConsultantCard extends Vue {
     @Prop() agentInfo!: Agents;
+    isVisibleDialog = false;
+
+    get contactTxt() {
+        if (this.agentInfo.contactStatus === 'contacted') {
+            return '撌脰蝯�'
+        } else if (this.agentInfo.contactStatus === 'reserved') {
+            return '撌脤���'
+        } else {
+            return '�脰����'
+        }
+    }
+
+    get updateTime() {
+        const newDate = new Date(this.agentInfo.updateTime);
+        let year = newDate.getFullYear();
+        let month = newDate.getMonth() + 1;
+        let date = newDate.getDate();
+        let hours = newDate.getHours();
+        let minutes = newDate.getMinutes();
+        return `${year}/${month}/${date} ${hours} : ${minutes}`
+    }
 
     reserveCommunication() {
-        if (!this.agentInfo.reserve) {
+        if (this.agentInfo.contactStatus === 'picked') {
             this.$router.push('/communication/myDemand')
+        } else {
+            this.isVisibleDialog = true;
         }
-
     }
 
     @Emit('removeAgent') removeAgent() {
-        return this.agentInfo.id;
+        return this.agentInfo.agentNo;
     }
 }
 </script>
@@ -68,28 +119,20 @@
             margin: auto 0;
         }
 
-        .avator {
-            width: 50px;
-            height: 50px;
-            border-radius: 50px ;
-        }
-
-        .star {
+        .satisfaction {
             font-size: 12px;
             font-weight: bold;
-
-            &:before {
-                content: '\2605';
-                color: $PRIMARY_RED;
-                margin: 5px;
-            }
+            margin-top: 5px;
         }
 
-        .tagStyle {
+        .professionals {
+            height: 20px;
             overflow: hidden;
             white-space: nowrap;
             text-overflow: ellipsis;
-            .tagTxt {
+            margin: 5px 0 10px 0;
+
+            .professionalsTxt {
                 font-size: 12px;
                 font-weight: bold;
                 margin-right: 5px;
@@ -105,16 +148,27 @@
 
         .reservedBtn {
             color: $SKY_BLUE;
-            cursor: auto;
+            border-color: $SKY_BLUE;
 
-            &:hover {
-                color: $SKY_BLUE;
-                border-color: $SKY_BLUE;
-                background-color: $PRIMARY_WHITE;
+            &:focus {
+                color: $PRIMARY_WHITE;
+                background-color: $SKY_BLUE;
+                opacity: 0.5;
             }
         }
 
-        .time {
+        .contactedBtn {
+            color: $GREEN;
+            border-color: $GREEN;
+
+            &:focus {
+                color: $PRIMARY_WHITE;
+                background-color: $GREEN;
+                opacity: 0.5;
+            }
+        }
+
+        .updateTime {
             font-size: 12px;
             font-weight: bold;
             color: #707070;
@@ -128,4 +182,8 @@
         justify-content: space-between;
     }
 
+    .dialogInfo {
+        font-size: 20px;
+    }
+
 </style>
diff --git a/PAMapp/components/Consultant/ConsultantList.vue b/PAMapp/components/Consultant/ConsultantList.vue
index d2fa896..440d75b 100644
--- a/PAMapp/components/Consultant/ConsultantList.vue
+++ b/PAMapp/components/Consultant/ConsultantList.vue
@@ -1,6 +1,6 @@
 <template>
     <div>
-        <template v-if="agents.length > 0">
+        <template v-if="agents.length > 0 && noLogin">
             <ConsultantCard
                 v-for="(agent, index) in agents"
                 :key="index"
@@ -8,15 +8,15 @@
                 @removeAgent="removeAgent"
             ></ConsultantCard>
         </template>
-        <template v-else-if="noLogin">
+        <template v-else-if="agents.length === 0">
             <div class="emptyRowStyle">
-                <div class="mdTxt login" @click="$router.push('/login')">��</div>
-                <div class="smTxt txt">���憭歇�憿批��</div>
+                <div class="smTxt txt">����撌脤憿批��</div>
             </div>
         </template>
         <template v-else>
             <div class="emptyRowStyle">
-                <div class="smTxt txt">����撌脤憿批��</div>
+                <div class="mdTxt login" @click="$router.push('/login')">��</div>
+                <div class="smTxt txt">���憭歇�憿批��</div>
             </div>
         </template>
     </div>
@@ -30,7 +30,7 @@
 export default class ConsultantList extends Vue {
     @Prop() agents!: Agents[];
 
-    noLogin = false;
+    noLogin = true;
 
     @Emit('removeAgent') removeAgent(agentId: number) {
         return agentId;
diff --git a/PAMapp/components/Ui/UiSwiper.vue b/PAMapp/components/Consultant/ConsultantSwiper.vue
similarity index 67%
rename from PAMapp/components/Ui/UiSwiper.vue
rename to PAMapp/components/Consultant/ConsultantSwiper.vue
index f37f45f..29fa092 100644
--- a/PAMapp/components/Ui/UiSwiper.vue
+++ b/PAMapp/components/Consultant/ConsultantSwiper.vue
@@ -6,10 +6,17 @@
       @click-slide="clkItem"
     >
         <swiper-slide
-          v-for="(info, index) in agents"
+          v-for="(agentInfo, index) in agents"
           :key="index"
         >
-            <SwiperConsultantCard :agentInfo="info"></SwiperConsultantCard>
+            <div class="consultantCardStyle" >
+              <el-avatar class="mb-10" :size="80" :src="agentInfo.img"></el-avatar>
+              <div class="name">{{agentInfo.name}}</div>
+              <div>
+                <i class="icon-star pam-icon icon--yellow"></i>
+                <span class="satisfaction">{{agentInfo.satisfaction}}</span>
+              </div>
+          </div>
         </swiper-slide>
 
         <div class="swiper-button-prev" slot="button-prev"></div>
@@ -25,7 +32,7 @@
 
 @Component
 export default class UiSwiper extends Vue {
-    @Prop() agents!: Agents;
+    @Prop() agents!: Agents[];
 
     swiperOptions: SwiperOptions = {
         loop: true,
@@ -49,8 +56,10 @@
     }
 
     clkItem(loopIndex: number, realIndex: number) {
-      this.$router.push('/agentInfo')
+      this.$router.push('/agentInfo');
+      console.log(loopIndex, realIndex, 'clkItem')
     }
+
 }
 
 
@@ -69,7 +78,7 @@
 
   .swiper-button-next,.swiper-button-prev {
     background-color: $PRIMARY_WHITE;
-    top: 20px;
+    top: 0px;
     height: 100%;
 
     &:after {
@@ -87,4 +96,17 @@
     right: 0;
   }
 }
+
+.consultantCardStyle {
+        text-align: center;
+
+        .name {
+            font-size: 16px;
+            font-weight: bold;
+        }
+
+        .satisfaction {
+            font-size: 20px;
+        }
+    }
 </style>
diff --git a/PAMapp/components/SwiperConsultantCard.vue b/PAMapp/components/SwiperConsultantCard.vue
deleted file mode 100644
index a842e92..0000000
--- a/PAMapp/components/SwiperConsultantCard.vue
+++ /dev/null
@@ -1,46 +0,0 @@
-<template>
-    <div class="consultantCardStyle">
-        <img class="avator" :src="agentInfo.img" alt="">
-        <div class="name">{{agentInfo.name}}</div>
-        <div class="star">{{agentInfo.satisfaction}}</div>
-    </div>
-</template>
-
-<script lang="ts">
-import { Vue, Component, Prop } from 'vue-property-decorator';
-import { Agents } from '~/plugins/api/home';
-
-@Component
-export default class Avator extends Vue {
-    @Prop() agentInfo!: Agents;
-}
-</script>
-
-<style lang="scss" scoped>
-    .consultantCardStyle {
-        text-align: center;
-
-        .avator {
-            width: 80px;
-            height: 80px;
-            border-radius: 50px;
-            margin: 0 auto 8px auto;
-        }
-
-        .name {
-            font-size: 16px;
-            font-weight: bold;
-        }
-
-        .star {
-            font-size: 20px;
-
-            &:before {
-                content: '\2605';
-                color: $PRIMARY_RED;
-                margin-right: 10px;
-                font-size: 15px;
-            }
-        }
-    }
-</style>
diff --git a/PAMapp/components/Ui/UiDialog.vue b/PAMapp/components/Ui/UiDialog.vue
index 3b49409..c5c94f8 100644
--- a/PAMapp/components/Ui/UiDialog.vue
+++ b/PAMapp/components/Ui/UiDialog.vue
@@ -3,7 +3,7 @@
         <el-dialog
             title=""
             :visible.sync="dialogVisible"
-            width="70%"
+            width="80%"
         >
             <slot></slot>
         </el-dialog>
diff --git a/PAMapp/components/Ui/UiPagination.vue b/PAMapp/components/Ui/UiPagination.vue
new file mode 100644
index 0000000..b2128a7
--- /dev/null
+++ b/PAMapp/components/Ui/UiPagination.vue
@@ -0,0 +1,43 @@
+<template>
+    <el-pagination
+        layout="prev, pager, next"
+        :total="totalList.length"
+        :page-size="pageSize"
+        @current-change="handleCurrentChange"
+    >
+    </el-pagination>
+</template>
+
+<script lang="ts">
+import { Vue, Component, Prop, Emit, Watch } from 'nuxt-property-decorator';
+import { Agents } from '~/plugins/api/home';
+
+@Component
+export default class UiPagination extends Vue {
+    @Prop() totalList!: Agents[];
+    pageSize = 5;
+    currentPage = 1;
+    pageList: Agents[] = [];
+
+    mounted() {
+        this.handleCurrentChange(this.currentPage);
+    }
+
+    @Emit('changePage') chagnePage(): Agents[] {
+        return this.pageList
+    }
+
+    handleCurrentChange(currentPage: number) {
+        if (this.totalList) {
+            this.pageList = this.totalList.slice(this.pageSize * currentPage - this.pageSize, this.pageSize * currentPage)
+            this.chagnePage();
+        }
+    }
+
+    @Watch('totalList') watchtotalList(newValue: Agents[]) {
+        if (newValue) {
+            this.handleCurrentChange(this.currentPage);
+        }
+    }
+}
+</script>
\ No newline at end of file
diff --git a/PAMapp/layouts/home.vue b/PAMapp/layouts/home.vue
index 9ed8242..8d73078 100644
--- a/PAMapp/layouts/home.vue
+++ b/PAMapp/layouts/home.vue
@@ -1,5 +1,5 @@
 <template>
-    <div class="container">
+    <div class="pam-background">
         <NavBar></NavBar>
         <Nuxt></Nuxt>
         <Footer></Footer>
@@ -7,7 +7,7 @@
 </template>
 
 <style lang="scss" scoped>
-    .container {
+    .pam-background {
         background-color: #F8F9FA;
     }
 </style>
\ No newline at end of file
diff --git a/PAMapp/pages/contactList.vue b/PAMapp/pages/contactList.vue
deleted file mode 100644
index 7f22019..0000000
--- a/PAMapp/pages/contactList.vue
+++ /dev/null
@@ -1,46 +0,0 @@
-<template>
-    <div>���蝯⊥�
-        <el-tabs
-            v-model="activeTabName"
-            @tab-click="tabClick"
-        >
-            <el-tab-pane
-                label="憿批��"
-                name="consultantList"
-            >
-            </el-tab-pane>
-            <el-tab-pane
-                label="������"
-                name="messageList"
-            ></el-tab-pane>
-        </el-tabs>
-
-        <NuxtChild></NuxtChild>
-    </div>
-</template>
-
-<script lang='ts'>
-import { Vue, Component, Watch } from 'vue-property-decorator';
-import { Route } from 'vue-router/types/router.d'
-
-@Component
-export default class ContactList extends Vue {
-    activeTabName = 'consultantList'
-
-    tabClick() {
-        this.$router.push('/contactList/' + this.activeTabName)
-    }
-
-    @Watch('$route') watchRouter(currentRoute: Route) {
-        const pathArray = currentRoute.fullPath.split('/');
-        this.activeTabName = pathArray[pathArray.length - 1];
-    }
-
-}
-</script>
-
-<style lang="scss" scoped>
-    .el-tabs__item:hover {
-        color: #303133;
-    }
-</style>
\ No newline at end of file
diff --git a/PAMapp/pages/contactList/consultantList.vue b/PAMapp/pages/contactList/consultantList.vue
deleted file mode 100644
index 8ceeec0..0000000
--- a/PAMapp/pages/contactList/consultantList.vue
+++ /dev/null
@@ -1,3 +0,0 @@
-<template>
-    <div>憿批��</div>
-</template>
\ No newline at end of file
diff --git a/PAMapp/pages/contactList/messageList.vue b/PAMapp/pages/contactList/messageList.vue
deleted file mode 100644
index b478f9e..0000000
--- a/PAMapp/pages/contactList/messageList.vue
+++ /dev/null
@@ -1,3 +0,0 @@
-<template>
-    <div>������</div>
-</template>
\ No newline at end of file
diff --git a/PAMapp/pages/index.vue b/PAMapp/pages/index.vue
index 9a447a3..a85fe90 100644
--- a/PAMapp/pages/index.vue
+++ b/PAMapp/pages/index.vue
@@ -1,34 +1,31 @@
 <template>
     <div>
         <Ui-Carousel></Ui-Carousel>
-        <div class="content">
-            <h5 class="mdTxt mb-20">����憿批��</h5>
+        <div class="page-container">
+            <h5 class="mdTxt mb-30">����憿批��</h5>
             <el-button
-                class="reserveConsultantBtn"
+                class="reserveBtn"
                 @click="routerPush('/recommendConsultant')"
             >������</el-button>
             <el-button
-                class="reserveConsultantBtn"
+                class="reserveBtn"
                 @click="routerPush('/quickFilter')"
             >敹恍�祟�</el-button>
-            <div class="rowStyle mb-20">
-                <div class="flex">
-                    <h5 class="mdTxt">���“���</h5>
-                    <span class="smTxt_bold align_center amount">� {{agents.length}} 蝑�</span>
-                </div>
-                <div
-                    class="mdTxt readMore"
-                    @click="routerPush('/contactList/consultantList')"
-                >���憭�</div>
-            </div>
+            <el-row class="mb-30 rowStyle">
+                <el-col :span="16">
+                    <span class="mdTxt">���“���</span>
+                    <span class="smTxt_bold amount">� {{consultantList.length}} 蝑�</span>
+                </el-col>
+                <el-col :span="8" class="mdTxt readMore"
+                    @click.native="routerPush('/myConsultantList/consultantList')">���憭�</el-col>
+            </el-row>
             <ConsultantList
-                :agents="agents.slice(0, 3)"
+                :agents="consultantList.slice(0, 3)"
                 @removeAgent="removeAgent"
             ></ConsultantList>
-            <h5 class="mdTxt mb-20 mt-32">��靽憿批��</h5>
-            <Ui-Swiper :agents="swiperAgents"></Ui-Swiper>
+            <h5 class="mdTxt mb-30 mt-30">��靽憿批��</h5>
+            <ConsultantSwiper :agents="agents"></ConsultantSwiper>
         </div>
-
     </div>
 </template>
 
@@ -42,20 +39,20 @@
 })
 export default class MainComponent extends Vue {
     agents: Agents[] = [];
-    swiperAgents: Agents[] = [];
+    consultantList: Agents[] = [];
 
     async asyncData(context: Context) {
         let agents: Agents[] = [];
-
+        let consultantList: Agents[] = [];
         await context.$service.home.recommendConsultantList().then((result: Agents[]) => {
             agents = result;
         })
 
-        const swiperAgents = JSON.parse(JSON.stringify(agents));
+        consultantList = agents.filter(item => item.contactStatus !== 'contacted');
 
         return {
             agents,
-            swiperAgents
+            consultantList
         }
     }
 
@@ -63,11 +60,11 @@
         this.$router.push(path);
     }
 
-    removeAgent(agentId: number) {
+    removeAgent(agentNo: number) {
         const findIndex = this.agents.findIndex((item, i) => {
-            return item.id === agentId;
+            return item.agentNo === agentNo;
         })
-        this.agents.splice(findIndex, 1)
+        this.consultantList.splice(findIndex, 1)
     }
 }
 
@@ -75,20 +72,11 @@
 
 <style lang="scss" scoped>
 
-    .content {
-        padding: 0 20px;
+    .page-container {
+        padding: 0px 20px 30px 20px;
     }
 
-    .mb-20 {
-        margin: 0 0 20px 0;
-    }
-
-    .mt-32 {
-        margin-top: 32px;
-    }
-
-    .reserveConsultantBtn {
-        max-width: 340px;
+    .reserveBtn {
         width: 100%;
         height: 110px;
         border-radius: 10px;
@@ -103,36 +91,35 @@
         }
     }
 
-    .reserveConsultantBtn+.reserveConsultantBtn {
+    .reserveBtn+.reserveBtn {
         margin-left: 0px;
     }
 
     .rowStyle {
-        display: flex;
-        justify-content: space-between;
-        .flex {
-            display: flex;
-            .amount {
-                color: $PRUDENTIAL_GREY;
-                margin-left: 10px;
-                align-self: center;
-            }
+        .amount {
+            color: $PRUDENTIAL_GREY;
         }
         .readMore {
             color: $PRIMARY_RED;
             cursor: pointer;
+            text-align: right;
         }
     }
 
     @include desktop {
-        .content{
+        .page-container {
             width: 700px;
             margin: 0 auto;
         }
 
-        .reserveConsultantBtn:nth-child(2) {
-            margin-right: 15px;
+        .reserveBtn {
+            max-width: 340px;
+
+            &:nth-child(2) {
+                margin-right: 15px;
+            }
         }
+
     }
 
 </style>
diff --git a/PAMapp/pages/myConsultantList.vue b/PAMapp/pages/myConsultantList.vue
new file mode 100644
index 0000000..b8e1ba4
--- /dev/null
+++ b/PAMapp/pages/myConsultantList.vue
@@ -0,0 +1,99 @@
+<template>
+    <div>
+        <div class="flex mb-30">
+            <div
+                class="cus-tab-item"
+                :class="{'is-active': activeTabName === 'consultantList'}"
+                @click="tabClick('consultantList')"
+            >憿批��
+                <span class="p">({{consultantList.length}})</span>
+            </div>
+            <div
+                class="cus-tab-item"
+                :class="{'is-active': activeTabName === 'contactedList'}"
+                @click="tabClick('contactedList')"
+            >撌脰蝯�
+                <span class="p">({{contactedList.length}})</span>
+            </div>
+        </div>
+
+        <NuxtChild
+            :contactedList="contactedList"
+            :consultantList="consultantList"
+            @remove="removeAgent"
+        ></NuxtChild>
+    </div>
+</template>
+
+<script lang='ts'>
+import { Context } from '@nuxt/types';
+import { Vue, Component, Watch } from 'vue-property-decorator';
+import { Route } from 'vue-router/types/router.d'
+import { Agents } from '~/plugins/api/home';
+
+@Component
+export default class myConsultantList extends Vue {
+    activeTabName = 'consultantList';
+    agents: Agents[] = [];
+    contactedList: Agents[] = [];
+    consultantList: Agents[] = [];
+
+    tabClick(path: string) {
+        this.activeTabName = path;
+        this.$router.push('/myConsultantList/' + this.activeTabName)
+    }
+
+    async asyncData(context: Context) {
+        let agents: Agents[] = [];
+        let contactedList: Agents[] = [];
+        let consultantList: Agents[] = [];
+
+        await context.$service.home.recommendConsultantList().then((result: Agents[]) => {
+            agents = result;
+        })
+
+        contactedList = agents.filter(item => item.contactStatus === 'contacted');
+        consultantList = agents.filter(item => item.contactStatus !== 'contacted');
+
+        return {
+            agents,
+            contactedList,
+            consultantList
+        }
+    }
+
+    removeAgent(agentNo: number) {
+        const fintIndex = this.consultantList.findIndex(item => item.agentNo === agentNo);
+        this.consultantList.splice(fintIndex, 1);
+    }
+
+    @Watch('$route') watchRouter(currentRoute: Route) {
+        const pathArray = currentRoute.fullPath.split('/');
+        this.activeTabName = pathArray[pathArray.length - 1];
+    }
+
+}
+</script>
+
+<style lang="scss" scoped>
+    .flex {
+        display: flex;
+        width: 100%;
+        height: 45px;
+
+        .cus-tab-item {
+            width: 50%;
+            text-align: center;
+            font-size: 24px;
+            border-bottom: solid 3px $LIGHT_GREY;
+            cursor: pointer;
+        }
+
+        .is-active {
+            font-weight: bold;
+            border-bottom: solid 3px $PRIMARY_BLACK;
+
+        }
+    }
+
+</style>
\ No newline at end of file
diff --git a/PAMapp/pages/myConsultantList/consultantList.vue b/PAMapp/pages/myConsultantList/consultantList.vue
new file mode 100644
index 0000000..c46c2f8
--- /dev/null
+++ b/PAMapp/pages/myConsultantList/consultantList.vue
@@ -0,0 +1,36 @@
+<template>
+    <div>
+        <ConsultantList
+            :agents="pageList"
+            @removeAgent="removeAgent"
+        ></ConsultantList>
+
+        <UiPagination
+            :totalList="consultantList"
+            @changePage="changePage"
+        ></UiPagination>
+    </div>
+</template>
+
+<script lang="ts">
+import { Vue, Component, Prop, Emit } from 'nuxt-property-decorator';
+import { Agents } from '~/plugins/api/home';
+
+@Component
+export default class ConsultantPage extends Vue {
+    @Prop() consultantList!: Agents[];
+    pageList: Agents[] = [];
+
+    @Emit('remove') remove(agentNo: number) {
+        return agentNo;
+    }
+
+    changePage(pageList: Agents[]) {
+        this.pageList = pageList;
+    }
+
+    removeAgent(agentNo: number) {
+        this.remove(agentNo);
+    }
+}
+</script>
\ No newline at end of file
diff --git a/PAMapp/pages/myConsultantList/contactedList.vue b/PAMapp/pages/myConsultantList/contactedList.vue
new file mode 100644
index 0000000..b317884
--- /dev/null
+++ b/PAMapp/pages/myConsultantList/contactedList.vue
@@ -0,0 +1,27 @@
+<template>
+    <div>
+        <ConsultantList
+            :agents="pageList"
+        ></ConsultantList>
+
+        <UiPagination
+            :totalList="contactedList"
+            @changePage="changePage"
+        ></UiPagination>
+    </div>
+</template>
+
+<script lang="ts">
+import { Vue, Component, Prop } from 'nuxt-property-decorator' ;
+import { Agents } from '~/plugins/api/home';
+
+@Component
+export default class ContactedList extends Vue {
+    @Prop() contactedList!: Agents[];
+    pageList: Agents[] = [];
+
+    changePage(pageList: Agents[]) {
+        this.pageList = pageList;
+    }
+}
+</script>
\ No newline at end of file
diff --git a/PAMapp/plugins/api/home.ts b/PAMapp/plugins/api/home.ts
index b26d5aa..854f0ff 100644
--- a/PAMapp/plugins/api/home.ts
+++ b/PAMapp/plugins/api/home.ts
@@ -5,76 +5,84 @@
     recommendConsultantList(){
         const debugData = [
             {
-                id: 0,
+                new: true,
+                agentNo: 0,
                 name: '撘萄���',
                 img: 'https://randomuser.me/api/portraits/women/31.jpg',
-                new: false,
-                tags: ['鞎∪����', '鞈頧宏'],
+                professionals: ['鞎∪����', '鞈頧宏'],
                 satisfaction: 4.8,
-                reserve: false
+                contactStatus: 'reserved',
+                updateTime: 'Tue Nov 02 2021 11:40:02 GMT+0800 (��������)'
             },
             {
-                id: 1,
+                new: true,
+                agentNo: 1,
                 name: '�撣亙',
                 img: 'https://randomuser.me/api/portraits/men/32.jpg',
-                new: true,
-                tags: [],
+                professionals: [],
                 satisfaction: 4,
-                reserve: false
+                contactStatus: 'contacted',
+                updateTime: 'Tue Nov 02 2021 11:40:02 GMT+0800 (��������)'
             },
             {
-                id: 2,
+                new: false,
+                agentNo: 2,
                 name: '���戊',
                 img: 'https://randomuser.me/api/portraits/women/33.jpg',
-                new: false,
-                tags: ['鞎∪����', '鞈頧宏'],
+                professionals: ['鞎∪����', '鞈頧宏'],
                 satisfaction: 5,
-                reserve: true
+                contactStatus: 'picked',
+                updateTime: 'Tue Oct 12 2021 19:05:02 GMT+0800 (��������)'
             },
             {
-                id: 3,
+                new: false,
+                agentNo: 3,
                 name: '�蝢��',
                 img: 'https://randomuser.me/api/portraits/women/34.jpg',
-                new: true,
-                tags: ['鞎∪����', '鞈頧宏'],
+                professionals: ['鞎∪����', '鞈頧宏'],
                 satisfaction: 4.3,
-                reserve: false
+                contactStatus: 'picked',
+                updateTime: 'Tue Nov 02 2021 11:40:02 GMT+0800 (��������)'
             },
             {
-                id: 4,
+                new: true,
+                agentNo: 4,
                 name: '撘萄���',
                 img: 'https://randomuser.me/api/portraits/women/35.jpg',
-                state: '敹��',
-                tags: [],
+                professionals: [],
                 satisfaction: 4.8,
-                reserve: true
+                contactStatus: 'picked',
+                updateTime: 'Tue Nov 02 2021 11:40:02 GMT+0800 (��������)'
             },
             {
-                id: 5,
+                new: true,
+                agentNo: 5,
                 name: '�撣亙',
                 img: 'https://randomuser.me/api/portraits/men/36.jpg',
-                new: true,
-                tags: ['鞎∪����', '鞈頧宏'],
-                satisfaction: 4,
-                reserve: false
+                professionals: ['鞎∪����', '鞈頧宏'],
+                satisfaction: 4.8,
+                contactStatus: 'reserved',
+                updateTime: 'Tue Nov 02 2021 11:40:02 GMT+0800 (��������)'
             },
             {
-                id: 6,
+                new: false,
+                agentNo: 6,
                 name: '���戊',
                 img: 'https://randomuser.me/api/portraits/women/37.jpg',
-                state: '敹��',
-                tags: [],
-                satisfaction: 5,
-                reserve: false
+                professionals: ['鞎∪����', '鞈蝘餉��', '蝭�蝔�', '璅暑��隡�'],
+                satisfaction: 4.8,
+                contactStatus: 'picked',
+                updateTime: 'Tue Nov 02 2021 10:40:02 GMT+0800 (��������)'
             },
             {
-                id: 7,
+                new: false,
+                agentNo: 7,
                 name: '�蝢��',
                 img: 'https://randomuser.me/api/portraits/women/38.jpg',
-                new: false,
-                tags: [],
-                satisfaction: 4.3,
-                reserve: true
+                professionals: ['鞎∪����', '蝭�蝔�', '璅暑��隡�'],
+                satisfaction: 4.8,
+                contactStatus: 'picked',
+                updateTime: 'Tue Sep 02 2021 09:40:02 GMT+0800 (��������)'
             }
         ]
         return CommonService.prototype.withDebugData(debugData, 'https://randomuser.me/api/')
@@ -82,11 +90,12 @@
 })
 
 export interface Agents {
-    id: number,
+    agentNo: number,
     name: string,
     img: string,
     new: boolean,
     satisfaction: number,
-    tags: string[],
-    reserve: boolean
+    professionals: string[],
+    contactStatus: string,
+    updateTime: Date
   }
\ No newline at end of file

--
Gitblit v1.8.0