From ac594e4efb30ba28776d74b0fb08ab34d7c32023 Mon Sep 17 00:00:00 2001 From: HelenHuang <LinHuang@pollex.com.tw> Date: 星期四, 30 十二月 2021 15:20:08 +0800 Subject: [PATCH] Merge branch 'Phase2' --- PAMapp/pages/recommendConsultant/result.vue | 384 +++++++++++++++++++++++------------------------------- 1 files changed, 167 insertions(+), 217 deletions(-) diff --git a/PAMapp/pages/recommendConsultant/result.vue b/PAMapp/pages/recommendConsultant/result.vue index 8792bcc..c92a75e 100644 --- a/PAMapp/pages/recommendConsultant/result.vue +++ b/PAMapp/pages/recommendConsultant/result.vue @@ -5,184 +5,167 @@ <li class="pam-rec-agent-card" v-for="(info,index) in pageList" :key="index"> <div class="pam-rec-agent-card__content"> <div class="pam-rec-agent-card__content-header"> - <div class="pam-rec-agent-card__avatar"> - <img :src="info.avatar" class="avatar"> - </div> - <div class="pam-rec-agent-card__main-info"> - <div class="fz-20 pt-10 rec-desktop-name">{{ info.name }}</div> - <div class="rec-role">{{ info.role }}</div> - <span class="rec-detail">閰喟敦鞈��</span> - </div> - </div> - <div class="pam-rec-agent-card__content-body"> - <el-row type="flex" class="pam-paragraph"> - <div class="field"> - <div class="field__label"> - 撠���� + <div class="pam-rec-agent-card__avatar"> + <UiAvatar + :agentNo="info.agentNo" > + </UiAvatar> </div> - <div class="field__content expertieses-container"> - <div class="pr-10 pb-10" v-for="(expert, index) in info.expertises" :key="index"> - #{{ expert }} - </div> + <div class="pam-rec-agent-card__main-info"> + <div class="text--middle pt-10 rec-desktop-name">{{ info.name }}</div> + <div class="rec-role">{{ info.role }}</div> + <span class="rec-detail fix-chrome-click--issue" @click="showAgentDetail(info.agentNo)">閰喟敦鞈��</span> </div> </div> - </el-row> + <div class="pam-rec-agent-card__content-body"> + <el-row type="flex" class="pam-paragraph"> + <div class="field"> + <div class="field__label">撠����</div> + <div class="field__content expertieses-container"> + <div class="pr-10 pb-10" v-for="(expert, index) in info.expertise" :key="index"> + #{{ expert }} + </div> + </div> + </div> + </el-row> - <el-row type="flex" class="pam-paragraph"> - <el-col :span="12"> - <div class="field__label"> - ����風 - </div> - <div class="field__content"> - {{ info.seniority }} - </div> - </el-col> - <el-col :span="12"> - <div class="field__label"> - 摰X皛踵�漲 - </div> - <div class="field__content"> - <i class="icon-star" style="color:#F2C75C"></i> - {{ info.avgScore }} - </div> - </el-col> - </el-row> + <el-row type="flex" class="pam-paragraph"> + <el-col :span="12"> + <div class="field__label"> + ����風 + </div> + <div class="field__content"> + {{ info.seniority }} + </div> + </el-col> + <!-- TODO:���遛��漲 --> + <el-col :span="12" v-if="!hideReviews"> + <div class="field__label"> + 摰X皛踵�漲 + </div> + <div class="field__content"> + <i class="icon-star" style="color:#F2C75C"></i> + {{ info.avgScore }} + </div> + </el-col> + </el-row> </div> <div class="pam-rec-agent-card__content-footer"> - <el-row - type="flex" - justify="center" - > - <el-button class="btn">+ 憿批��</el-button> - <el-button class="btn2" type="primary" style="margin-left: 10px" @click="$router.push('/questionnaire')" - >�脰����</el-button> - </el-row> + <AddAndReservedBtns + :cusClass="'pam-rec-btns'" + :agentInfo="info" + @openPopUp="openPopUp" + ></AddAndReservedBtns> </div> </div> </li> </ul> + <UiPagination - :totalList="recAgentList" - @changePage="changePage" - ></UiPagination> + class="mb-30" + :totalList="strictQueryList" + @changePage="changePage" + :pageSize = 6 + ></UiPagination> + + <PopUpFrame :isOpen.sync="isVisiblePopUp" + > + <div class="text--center mdTxt"> + <p class="mb-50">{{popUpTxt}}</p> + <div class="text--center"> + <el-button + type="primary" + @click="isVisiblePopUp = false" + >������</el-button> + </div> + </div> + </PopUpFrame> </div> </template> <script lang="ts"> -import {Vue,Component} from 'vue-property-decorator'; +import { AgentOfStrictQuery } from '~/shared/models/strict-query.model'; +import { hideReviews } from '~/shared/const/hide-reviews'; +import { Vue,Component, State, namespace, Action} from 'nuxt-property-decorator'; + +const localStorage = namespace('localStorage'); @Component export default class Reslut extends Vue{ + @State('strictQueryList') + strictQueryList!: AgentOfStrictQuery[]; - recAgentList =[ - { - avatar:'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png', - name:'�蝢��', - role:'隡舀��蝬�鈭�', - expertises: ['鞎∪����', '鞈頧宏', '蝭�蝔�', '璅暑��隡�'], - seniority:'1撟�2���', - avgScore:4.8 - }, - { - avatar:'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png', - name:'鞈�', - role:'擙剝��蝬�鈭�', - expertises: ['鞎∪����', '鞈頧宏', '蝭�蝔�', '璅暑��隡�'], - seniority:'1撟�2���', - avgScore:4.8 - }, - { - avatar:'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png', - name:'�摰嗅弧', - role:'���收靽蝬�鈭�', - expertises: ['鞎∪����', '鞈頧宏', '蝭�蝔�', '璅暑��隡�'], - seniority:'1撟�2���', - avgScore:4.8 - }, - { - avatar:'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png', - name:'撘萄���', - role:'擙剝��蝬�鈭�', - expertises: ['鞎∪����', '鞈頧宏', '蝭�蝔�', '璅暑��隡�'], - seniority:'1撟�2���', - avgScore:4.8 - }, - { - avatar:'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png', - name:'���戊', - role:'���收靽蝬�鈭�', - expertises: ['鞎∪����', '鞈頧宏', '蝭�蝔�', '璅暑��隡�'], - seniority:'1撟�2���', - avgScore:4.8 - }, - { - avatar:'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png', - name:'�撣亙', - role:'擙剝��蝬�鈭�', - expertises: ['鞎∪����', '鞈頧宏', '蝭�蝔�', '璅暑��隡�'], - seniority:'1撟�2���', - avgScore:4.8 - } - ]; + @Action + storeStrictQueryList!: (data: any) => Promise<number>; + + @localStorage.State + recommendConsultantItem!: string; + pageList: any[] = []; + isVisiblePopUp = false; + popUpTxt = ''; + hideReviews = hideReviews; + ////////////////////////////////////////////////////////////////////// + mounted(): void { + if (this.recommendConsultantItem && this.strictQueryList.length === 0) { + const strictQueryDto = JSON.parse(this.recommendConsultantItem); + this.storeStrictQueryList(strictQueryDto); + } + } + + ////////////////////////////////////////////////////////////////////// changePage(pageList: any[]) { this.pageList = pageList; } + showAgentDetail(agentNo: string): void { + this.$router.push(`/agentInfo/${agentNo}`); + } + openPopUp(txt: string) { + this.popUpTxt = txt; + this.isVisiblePopUp = true; + } } </script> <style lang="scss" scoped> -.btn{ - width: 139px; - height: 47px; -} -.btn2{ - width: 120px; - height: 47px; -} .pam-rec-agent-card { margin-bottom: 10px; border-radius: 10px; border: 1px solid $LIGHT_GREY; padding: 20px 33px; - margin-right:-20px; - margin-left:-20px; - + .pam-rec-agent-card__content { - width: 270px; .pam-rec-agent-card__content-header { - display: flex; - .pam-rec-agent-card__avatar { display: flex; - flex-direction: row; - margin-right: 20px; - .avatar{ - width: 120px; - height: 120px; - border-radius: 50%; + .pam-rec-agent-card__avatar { + display: flex; + flex-direction: row; + margin-right: 20px; + } + .pam-rec-agent-card__main-info { + display: flex; + flex-direction: column; + justify-content: flex-end; + .rec-role { + font-size: 16px; + color: $PRUDENTIAL_GREY; + font-weight: bold; + margin-top: 4px; + } + .rec-detail{ + font-size: 20px; + color:$PRIMARY_RED; + font-weight: bold; + padding-top: 30px; + cursor: pointer; + } } } - .pam-rec-agent-card__main-info { - display: flex; - flex-direction: column; - justify-content: flex-end; - .rec-role { - font-size: 16px; - color: $PRUDENTIAL_GREY; - font-weight: bold; - margin-top: 4px; - } - .rec-detail{ - font-size: 20px; - color:$PRIMARY_RED; - font-weight: bold; - padding-top: 30px; - } - } + .pam-rec-agent-card__content-body { + height: 200px; } } } @@ -205,94 +188,61 @@ .pam-rec-agent__list{ display: flex; flex-wrap: wrap; + flex-direction:row; + width: 100%; } .pam-paragraph{ margin-top: 10px; } .pam-rec-agent-card { - margin-right: 20px; - margin-bottom: 10px; border-radius: 10px; border: 1px solid $LIGHT_GREY; - padding-top: 15px; - padding-bottom: 15px; - padding-left: 28px; - padding-right: 20px; - width: 30%; - margin-left: 10px; - - .pam-rec-agent-card__content { - width: 190px; - .pam-rec-agent-card__content-header { + padding: 15px 20px 15px 20px; + width: 170px; + margin: 0 10px 10px 10px; + + .pam-rec-agent-card__content { + .pam-rec-agent-card__content-header { + display: flex; + .pam-rec-agent-card__avatar { + display: flex; + flex-direction: row; + margin-right: 20px; + } + .pam-rec-agent-card__main-info { + display: flex; + flex-direction: column; + justify-content: center; + .rec-desktop-name{ + font-size: 12px; + font-weight: bold; + } + .rec-role { + font-size: 12px; + color:$PRUDENTIAL_GREY; + } + .rec-detail{ + font-size: 12px; + color:$PRIMARY_RED; + font-weight: bold; + padding-top: 10px; + } + } + } + } + } + .field__label { + font-size: 12px; + color: $PRUDENTIAL_GREY; + font-weight:bold; + margin-bottom: 7px; + } + .field__content{ + font-size: 12px; + } + .expertieses-container { display: flex; - .pam-rec-agent-card__avatar { - display: flex; - flex-direction: row; - margin-right: 20px; - .avatar{ - width: 80px; - height: 80px; - border-radius: 50%; - margin-bottom: 10px; - } - } - .pam-rec-agent-card__main-info { - display: flex; - flex-direction: column; - justify-content: center; - .rec-desktop-name{ - font-size: 12px; - font-weight: bold; - } - .rec-role { - font-size: 12px; - color:$PRUDENTIAL_GREY; - } - .rec-detail{ - font-size: 12px; - color:$PRIMARY_RED; - font-weight: bold; - padding-top: 10px; - } - } - } + flex-wrap: wrap; } - - } -.field__label { - font-size: 12px; - color: $PRUDENTIAL_GREY; - font-weight:bold; - margin-bottom: 7px; -} -.field__content{ - font-size: 12px; -} -.expertieses-container { - display: flex; - flex-wrap: wrap; - -} -.btn{ - width: 90px; - height: 43px; - font-size: 14px; - display: flex; - justify-content: center; - padding-top: 12px; - margin-right: 20px; -} -.btn2{ - width: 90px; - height: 43px; - font-size: 14px; - display: flex; - justify-content: center; - padding-top: 12px; - margin-right: -10px; -} -.el-row--flex.is-justify-center{ - justify-content:none; -} } </style> -- Gitblit v1.8.0