From 028bafcb25e1b91e786a01d74181c6aaf93d5198 Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期四, 18 十一月 2021 13:33:13 +0800
Subject: [PATCH] update: [顧問明細] 移除不需要的資訊、加入 info dialog (包含 TODO#130466)

---
 PAMapp/pages/agentInfo/_agentNo.vue          |   63 +++++++++++++++++++++++--------
 PAMapp/assets/scss/utilities/_heading.scss   |    6 ++
 PAMapp/assets/scss/utilities/_utilities.scss |    4 ++
 3 files changed, 55 insertions(+), 18 deletions(-)

diff --git a/PAMapp/assets/scss/utilities/_heading.scss b/PAMapp/assets/scss/utilities/_heading.scss
index 4dca836..f2d8076 100644
--- a/PAMapp/assets/scss/utilities/_heading.scss
+++ b/PAMapp/assets/scss/utilities/_heading.scss
@@ -51,6 +51,10 @@
   text-align: center;
 }
 
+.text--left {
+  text-align: left;
+}
+
 .text--primary {
   color: $PRIMARY_RED;
 }
@@ -80,4 +84,4 @@
 }
 .fix-chrome-click--issue{
   -webkit-tap-highlight-color: transparent;
-}
\ No newline at end of file
+}
diff --git a/PAMapp/assets/scss/utilities/_utilities.scss b/PAMapp/assets/scss/utilities/_utilities.scss
index a5ec985..e4e33bf 100644
--- a/PAMapp/assets/scss/utilities/_utilities.scss
+++ b/PAMapp/assets/scss/utilities/_utilities.scss
@@ -9,6 +9,10 @@
   margin-top: 30px;
 }
 
+.mt-20 {
+  margin-top: 20px;
+}
+
 .mb-30 {
   margin-bottom: 30px;
 }
diff --git a/PAMapp/pages/agentInfo/_agentNo.vue b/PAMapp/pages/agentInfo/_agentNo.vue
index d0b57af..d33cf30 100644
--- a/PAMapp/pages/agentInfo/_agentNo.vue
+++ b/PAMapp/pages/agentInfo/_agentNo.vue
@@ -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
@@ -62,13 +59,15 @@
 
       <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="text--primary icon-information" @click="alertFieldInfo('suitability')"></i>
               </div>
             </div>
             <div class="xsTxt">
@@ -80,7 +79,8 @@
               :show-text="false"
               :text-inside="true"
               :stroke-width="15"
-              :percentage="agentInfo.suitability"></el-progress>
+              :percentage="agentInfo.suitability">
+            </el-progress>
           </div>
         </el-col>
       </el-row>
@@ -92,7 +92,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="text--primary icon-information" @click="alertFieldInfo('evaluation')"></i>
               </div>
             </div>
             <div class="xsTxt">
@@ -146,15 +147,26 @@
       <AddAndReservedBtns
         :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="mb-50">����憿批��</p>
             <p class="text--primary cursor--pointer fix-chrome-click--issue"
-                @click="isVisiblePopUp = false">������</p>
+                @click="isAlertAddSuccess = false">������</p>
+        </div>
+    </PopUpFrame>
+
+    <PopUpFrame
+      drawerSize="40%"
+      :isOpen.sync="isAlertFieldInfo"
+      >
+        <div class="text--center mdTxt fs-18">
+            <p>{{ fieldInfoTitle }}</p>
+            <p class="mt-20 text--left text--regular">{{ fieldInfoDesc }}</p>
+            <p class="text--primary cursor--pointer fix-chrome-click--issue mt-30"
+                @click="isAlertFieldInfo = false">������</p>
         </div>
     </PopUpFrame>
     </div>
@@ -168,8 +180,11 @@
 @Component
 export default class AgentInfoComponent extends Vue {
   agentInfo!: AgentInfo;
-  isVisiblePopUp = false;
-  popUpTxt = '����憿批��';
+  isAlertAddSuccess = false;
+  isAlertFieldInfo = false;
+  fieldInfoTitle = '';
+  fieldInfoDesc = '';
+
   async asyncData(context: Context) {
     const agentNo = context.route.params.agentNo;
     let agentInfo = {};
@@ -183,10 +198,24 @@
     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;
+    console.log(field);
+    switch(field) {
+      case 'suitability':
+        this.fieldInfoTitle = '���漲';
+        this.fieldInfoDesc = '���漲��������翰�祟�敺����雿�憿批����脰�������蝯行�����潘��隞乩������“������潦��';
+        break;
+      case 'evaluation':
+        this.fieldInfoTitle = '隢株岷摨西”�';
+        this.fieldInfoDesc = '隢株岷摨西”��撠��雿�憿批�������垣閰X���脰�������蝯行�����潦��';
+        break;
     }
+  }
 }
 
 interface AgentInfo {

--
Gitblit v1.8.0