刪除4個檔案
修改8個檔案
新增6個檔案
修改1個檔案名稱
| | |
| | | font-size: 15px; |
| | | padding-right: 8px; |
| | | color: $PRUDENTIAL_GREY; |
| | | &.icon--primary { |
| | | color: $PRIMARY_RED; |
| | | } |
| | | &.icon--primary { |
| | | color: $PRIMARY_RED; |
| | | } |
| | | &.icon--yellow { |
| | | color: $YELLOW; |
| | | } |
| | | } |
| | |
| | | @import './elementUI/_carousel'; |
| | | @import './elementUI/_rate'; |
| | | @import './elementUI/_tag'; |
| | | @import './elementUI/_pagination'; |
| | | @import './elementUI/_dialog'; |
¤ñ¹ï·sÀÉ®× |
| | |
| | | .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; |
| | | } |
| | | |
| | | } |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | .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; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | <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> |
| | |
| | | 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; |
| | |
| | | |
| | | .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; |
| | |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .dialogInfo { |
| | | font-size: 20px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <div> |
| | | <template v-if="agents.length > 0"> |
| | | <template v-if="agents.length > 0 && noLogin"> |
| | | <ConsultantCard |
| | | v-for="(agent, index) in agents" |
| | | :key="index" |
| | |
| | | @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> |
| | |
| | | export default class ConsultantList extends Vue { |
| | | @Prop() agents!: Agents[]; |
| | | |
| | | noLogin = false; |
| | | noLogin = true; |
| | | |
| | | @Emit('removeAgent') removeAgent(agentId: number) { |
| | | return agentId; |
File was renamed from PAMapp/components/Ui/UiSwiper.vue |
| | |
| | | @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> |
| | |
| | | |
| | | @Component |
| | | export default class UiSwiper extends Vue { |
| | | @Prop() agents!: Agents; |
| | | @Prop() agents!: Agents[]; |
| | | |
| | | swiperOptions: SwiperOptions = { |
| | | loop: true, |
| | |
| | | } |
| | | |
| | | clkItem(loopIndex: number, realIndex: number) { |
| | | this.$router.push('/agentInfo') |
| | | this.$router.push('/agentInfo'); |
| | | console.log(loopIndex, realIndex, 'clkItem') |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | .swiper-button-next,.swiper-button-prev { |
| | | background-color: $PRIMARY_WHITE; |
| | | top: 20px; |
| | | top: 0px; |
| | | height: 100%; |
| | | |
| | | &:after { |
| | |
| | | right: 0; |
| | | } |
| | | } |
| | | |
| | | .consultantCardStyle { |
| | | text-align: center; |
| | | |
| | | .name { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .satisfaction { |
| | | font-size: 20px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <el-dialog |
| | | title="" |
| | | :visible.sync="dialogVisible" |
| | | width="70%" |
| | | width="80%" |
| | | > |
| | | <slot></slot> |
| | | </el-dialog> |
¤ñ¹ï·sÀÉ®× |
| | |
| | | <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> |
| | |
| | | <template> |
| | | <div class="container"> |
| | | <div class="pam-background"> |
| | | <NavBar></NavBar> |
| | | <Nuxt></Nuxt> |
| | | <Footer></Footer> |
| | |
| | | </template> |
| | | |
| | | <style lang="scss" scoped> |
| | | .container { |
| | | .pam-background { |
| | | background-color: #F8F9FA; |
| | | } |
| | | </style> |
| | |
| | | <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> |
| | | |
| | |
| | | }) |
| | | 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 |
| | | } |
| | | } |
| | | |
| | |
| | | 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) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | <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; |
| | |
| | | } |
| | | } |
| | | |
| | | .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> |
¤ñ¹ï·sÀÉ®× |
| | |
| | | <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> |
¤ñ¹ï·sÀÉ®× |
| | |
| | | <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> |
¤ñ¹ï·sÀÉ®× |
| | |
| | | <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> |
| | |
| | | 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/') |
| | |
| | | }) |
| | | |
| | | 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 |
| | | } |