From 93f58fa3ebf4fc50143138cff052353d274cfaa4 Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期五, 10 十二月 2021 11:10:37 +0800 Subject: [PATCH] Merge branch 'master' of https://192.168.0.10:8443/r/pcalife/PAM --- PAMapp/pages/agentInfo/_agentNo.vue | 126 ++++++++++++++++++++++++++++------------- 1 files changed, 86 insertions(+), 40 deletions(-) diff --git a/PAMapp/pages/agentInfo/_agentNo.vue b/PAMapp/pages/agentInfo/_agentNo.vue index 6ec15b5..738b438 100644 --- a/PAMapp/pages/agentInfo/_agentNo.vue +++ b/PAMapp/pages/agentInfo/_agentNo.vue @@ -3,7 +3,7 @@ <el-row type="flex" justify="center"> - <UiAvatar :size="150" :fileName="agentInfo.image"></UiAvatar> + <UiAvatar :size="150" :fileName="agentInfo.img"></UiAvatar> </el-row> <el-row @@ -28,9 +28,6 @@ <UiField :span="12" icon="agent" label="����"> {{ agentInfo.title }} </UiField> - <UiField :span="12" icon="phone" label="�閰�"> - {{ agentInfo.phoneNumber }} - </UiField> </el-row> <el-row @@ -53,22 +50,27 @@ type="flex" class="pam-paragraph"> <UiField :span="12" icon="time" label="��敺�����"> - {{ agentInfo.lastestLoginTime | formatDate }} + {{ agentInfo.latestLoginTime | formatDate }} </UiField> <UiField :span="12" icon="calender" label="����風"> {{ agentInfo.seniority }} </UiField> </el-row> - <el-row + <!-- TODO: 靘�� 2021/12/10 10:30 ��� Charles ����������漲甈��*蝷� [Tomas, 2021/12/10] --> + <!-- REF: https://reurl.cc/OkO6Q9--> + + <!-- <el-row type="flex" + v-if="agentInfo.suitability" class="pam-paragraph"> <el-col :span="24" class="pam-field"> <div class="pam-field__label pam-progress__label"> <div> <div class="pam-field__title"> - <!-- TODO: 憒����憿批��脣嚗������漲 [Tomas, 2021/10/29] --> - <i class="pam-icon icon-puzzle"></i>���漲 <i class="text--primary icon-information"></i> + <i class="pam-icon icon-puzzle" + ></i>���漲 + <i class="pl-5 text--primary icon-information" @click="alertFieldInfo('suitability')"></i> </div> </div> <div class="xsTxt"> @@ -80,10 +82,11 @@ :show-text="false" :text-inside="true" :stroke-width="15" - :percentage="agentInfo.suitability"></el-progress> + :percentage="agentInfo.suitability"> + </el-progress> </div> </el-col> - </el-row> + </el-row> --> <el-row type="flex" @@ -92,7 +95,8 @@ <div class="pam-field__label pam-progress__label"> <div> <div class="pam-field__title"> - <i class="pam-icon icon-thumbs-up"></i>隢株岷摨西”� <i class="text--primary icon-information"></i> + <i class="pam-icon icon-thumbs-up" + ></i>隢株岷摨西”� <i class="pl-5 text--primary icon-information" @click="alertFieldInfo('evaluation')"></i> </div> </div> <div class="xsTxt"> @@ -100,7 +104,7 @@ </div> </div> <div class="pam-field__content pam-field-evaluation pt-10"> - <el-progress :show-text="false" :stroke-width="15" :percentage="agentInfo.evaluation"></el-progress> + <el-progress :show-text="false" :stroke-width="15" :percentage="agentInfo.evaluation * 2"></el-progress> </div> </el-col> </el-row> @@ -143,18 +147,38 @@ </UiField> </el-row> + <AddAndReservedBtns + v-if="currentRole!==role.ADMIN" :cusClass="'pam-paragraph'" :agentInfo="agentInfo" - @openPopUp="openPopUp" + @openPopUp="alertAddSuccess" ></AddAndReservedBtns> - <PopUpFrame :isOpen.sync="isVisiblePopUp" - > + <PopUpFrame :isOpen.sync="isAlertAddSuccess"> <div class="text--center mdTxt"> - <p class="mb-50">{{popUpTxt}}</p> - <p class="text--primary cursor--pointer" - @click="isVisiblePopUp = false">������</p> + <p class="mb-50">����憿批��</p> + <div class="text--center"> + <el-button + type="primary" + @click="isAlertAddSuccess = false" + >������</el-button> + </div> + </div> + </PopUpFrame> + + <PopUpFrame + :isOpen.sync="isAlertFieldInfo" + > + <div class="text--center mdTxt fs-18"> + <p>{{ fieldInfoTitle }}</p> + <p class="mt-20 text--left text--regular">{{ fieldInfoDesc }}</p> + <div class="text--center mt-30"> + <el-button + type="primary" + @click="isAlertFieldInfo = false" + >������</el-button> + </div> </div> </PopUpFrame> </div> @@ -162,14 +186,21 @@ <script lang="ts"> import { Context } from '@nuxt/types'; +import { namespace } from 'nuxt-property-decorator'; import { Vue, Component } from 'vue-property-decorator'; import { getConsultantDetail } from '~/assets/ts/api/consultant'; - +import { Role } from '~/assets/ts//models/enum/Role'; +const roleStorage = namespace('localStorage'); @Component export default class AgentInfoComponent extends Vue { + @roleStorage.Getter currentRole!:string|null; + role = Role; agentInfo!: AgentInfo; - isVisiblePopUp = false; - popUpTxt = '����憿批��'; + isAlertAddSuccess = false; + isAlertFieldInfo = false; + fieldInfoTitle = ''; + fieldInfoDesc = ''; + async asyncData(context: Context) { const agentNo = context.route.params.agentNo; let agentInfo = {}; @@ -183,30 +214,43 @@ return `${this.agentInfo.name}(${this.agentInfo.role})`; } - openPopUp(txt: string) { - this.popUpTxt = txt; - this.isVisiblePopUp = true; + alertAddSuccess() { + this.isAlertAddSuccess = true; + } + + alertFieldInfo(field: string): void { + this.isAlertFieldInfo = true; + switch(field) { + case 'suitability': + this.fieldInfoTitle = '���漲'; + this.fieldInfoDesc = '���漲��������翰�祟�敺����雿�憿批����脰�������蝯行�����潘��隞乩������“������潦��'; + break; + case 'evaluation': + this.fieldInfoTitle = '隢株岷摨西”�'; + this.fieldInfoDesc = '隢株岷摨西”��撠��雿�憿批�������垣閰X���脰�������蝯行�����潦��'; + break; } + } } interface AgentInfo { - name: string; - agentNo:string; - role: string; - image: string; - avgScore: number; - title: string; - phoneNumber: string; - serveArea: string; - companyAddress: string; + name : string; + agentNo : string; + role : string; + img : string; + avgScore : number; + title : string; + phoneNumber : string; + serveArea : string; + companyAddress : string; lastestLoginTime: Date | null; - seniority: string; - suitability: number; - evaluation: number; - expertises: string[]; - concept: string; - experiences: string[]; - awards: string; + seniority : string; + suitability : number; + evaluation : number; + expertises : string[]; + concept : string; + experiences : string[]; + awards : string; } </script> @@ -231,6 +275,8 @@ .pam-field__title { font-size: 16px; font-weight: bold; + display: flex; + align-items: center; } } } -- Gitblit v1.9.3