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/pages/index.vue |  115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 111 insertions(+), 4 deletions(-)

diff --git a/PAMapp/pages/index.vue b/PAMapp/pages/index.vue
index 4f6e0b9..a85fe90 100644
--- a/PAMapp/pages/index.vue
+++ b/PAMapp/pages/index.vue
@@ -1,18 +1,125 @@
 <template>
-    <div>PAMapp-Home
-        <h5>��憿批��</h5>
-        <Ui-Swiper></Ui-Swiper>
+    <div>
+        <Ui-Carousel></Ui-Carousel>
+        <div class="page-container">
+            <h5 class="mdTxt mb-30">����憿批��</h5>
+            <el-button
+                class="reserveBtn"
+                @click="routerPush('/recommendConsultant')"
+            >������</el-button>
+            <el-button
+                class="reserveBtn"
+                @click="routerPush('/quickFilter')"
+            >敹恍�祟�</el-button>
+            <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="consultantList.slice(0, 3)"
+                @removeAgent="removeAgent"
+            ></ConsultantList>
+            <h5 class="mdTxt mb-30 mt-30">��靽憿批��</h5>
+            <ConsultantSwiper :agents="agents"></ConsultantSwiper>
+        </div>
     </div>
 </template>
 
 <script lang="ts">
-import { Vue, Component } from 'vue-property-decorator'
+import { Vue, Component } from 'nuxt-property-decorator';
+import { Agents } from '~/plugins/api/home';
+import { Context } from '@nuxt/types/app';
 
 @Component({
     layout: 'home'
 })
 export default class MainComponent extends Vue {
+    agents: Agents[] = [];
+    consultantList: Agents[] = [];
 
+    async asyncData(context: Context) {
+        let agents: Agents[] = [];
+        let consultantList: Agents[] = [];
+        await context.$service.home.recommendConsultantList().then((result: Agents[]) => {
+            agents = result;
+        })
+
+        consultantList = agents.filter(item => item.contactStatus !== 'contacted');
+
+        return {
+            agents,
+            consultantList
+        }
+    }
+
+    routerPush(path: string) {
+        this.$router.push(path);
+    }
+
+    removeAgent(agentNo: number) {
+        const findIndex = this.agents.findIndex((item, i) => {
+            return item.agentNo === agentNo;
+        })
+        this.consultantList.splice(findIndex, 1)
+    }
 }
 
 </script>
+
+<style lang="scss" scoped>
+
+    .page-container {
+        padding: 0px 20px 30px 20px;
+    }
+
+    .reserveBtn {
+        width: 100%;
+        height: 110px;
+        border-radius: 10px;
+        box-shadow: 0px 0px 6px #22222229;
+        margin: 0 auto 17px auto;
+        font-size: 32px;
+        font-weight: 700;
+        color: $PRIMARY_BLACK;
+
+        &:nth-child(3) {
+            margin-bottom: 42px;
+        }
+    }
+
+    .reserveBtn+.reserveBtn {
+        margin-left: 0px;
+    }
+
+    .rowStyle {
+        .amount {
+            color: $PRUDENTIAL_GREY;
+        }
+        .readMore {
+            color: $PRIMARY_RED;
+            cursor: pointer;
+            text-align: right;
+        }
+    }
+
+    @include desktop {
+        .page-container {
+            width: 700px;
+            margin: 0 auto;
+        }
+
+        .reserveBtn {
+            max-width: 340px;
+
+            &:nth-child(2) {
+                margin-right: 15px;
+            }
+        }
+
+    }
+
+</style>

--
Gitblit v1.8.0