From 23b153b373efc2c198d580f96e8ed3300faca647 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期二, 28 十二月 2021 15:31:19 +0800
Subject: [PATCH] TODO#顧問帳號資訊編輯API串接

---
 PAMapp/pages/agentInfo/edit/_agentNo.vue |   44 +++++++++++++++++++++++++++++---------------
 PAMapp/shared/models/account.model.ts    |    4 ++--
 2 files changed, 31 insertions(+), 17 deletions(-)

diff --git a/PAMapp/pages/agentInfo/edit/_agentNo.vue b/PAMapp/pages/agentInfo/edit/_agentNo.vue
index 5cfafbb..61aa91c 100644
--- a/PAMapp/pages/agentInfo/edit/_agentNo.vue
+++ b/PAMapp/pages/agentInfo/edit/_agentNo.vue
@@ -3,7 +3,7 @@
       <el-row
         type="flex"
         justify="center">
-        <UiAvatar :size="150" :fileName="agentInfo.img"></UiAvatar>
+        <UiAvatar :size="150" :agentNo="agentInfo.agentNo"></UiAvatar>
       </el-row>
 
       <el-row
@@ -121,7 +121,7 @@
         type="flex"
         class="pam-paragraph">
         <UiField icon="school" label="�犖��">
-            <el-input type="textarea" autosize v-model="editInfoValue.experience"></el-input>
+            <el-input type="textarea" autosize v-model="editInfoValue.experiences"></el-input>
         </UiField>
       </el-row>
 
@@ -173,6 +173,8 @@
 
 const localStorage = namespace('localStorage');
 
+const testImgBase64 =""
+
 @Component
 export default class AgentInfoComponent extends Vue {
 
@@ -188,6 +190,7 @@
   hideReviews              = hideReviews ;
 
   editInfoValue = {
+    agentNo           : '',
     name              : '',
     expert            : [] as string[],
     title             : '',
@@ -196,7 +199,7 @@
     seniorityYear     : 1,
     seniorityMonth    : 0,
     concept           : '',
-    experience        : '',
+    experiences        : '',
     awards            : '',
     communicationStyle: [] as string[],
   }
@@ -284,12 +287,12 @@
                   seniorityYear     : agentYear? +agentYear : 0,
                   seniorityMonth    : agentMonth ? +agentMonth: 0,
                   concept           : agentInfo.concept || '',
-                  experience        : agentInfo.experiences  || '',
-                  award             : agentInfo.awards || '',
+                  experiences        : agentInfo.experiences  || '',
+                  awards             : agentInfo.awards || '',
                   communicationStyle: agentInfo.communicationStyle || '',
-                  photoBase64       : '123',
+                  photoBase64       : '',
               };
-
+                this.editInfoValue.agentNo
                 this.editInfoValue.name           = this._agentInfoSetting.name!;
                 this.editInfoValue.title          = this._agentInfoSetting.title!;
                 this.editInfoValue.serveArea      = this._agentInfoSetting.serveArea
@@ -298,8 +301,8 @@
                 this.editInfoValue.seniorityMonth = this._agentInfoSetting.seniorityMonth;
                 this.editInfoValue.expert        = _.cloneDeep(this._agentInfoSetting.expertise);
                 this.editInfoValue.concept        = this._agentInfoSetting.concept;
-                this.editInfoValue.experience     = this._agentInfoSetting.experience;
-                this.editInfoValue.awards         = this._agentInfoSetting.award;
+                this.editInfoValue.experiences     = this._agentInfoSetting.experiences;
+                this.editInfoValue.awards         = this._agentInfoSetting.awards;
                 this.editInfoValue.communicationStyle = this._agentInfoSetting.communicationStyle.split(',');
 
   }
@@ -330,7 +333,7 @@
   }
 
   get experienceValid():boolean{
-      this.formValidStatus.experience = this.editInfoValue.experience ? true : false;
+      this.formValidStatus.experience = this.editInfoValue.experiences ? true : false;
       return this.formValidStatus.experience;
   }
 
@@ -378,28 +381,39 @@
   
   editAgentInfoSetting(): void {
             const editSettingInfo: any = {
+                agentNo           :this.agentInfo.agentNo,
                 name              : this.editInfoValue.name,    
                 expertise         : this.editInfoValue.expert,
                 title             : this.editInfoValue.title,
                 role              : this.agentInfo.role,
                 serveArea         : this.editInfoValue.serveArea,
-                gender            : 'male',
+                gender            : this.agentInfo.gender,
                 phoneNumber       : this.agentInfo.phoneNumber,
                 companyAddress    : this.editInfoValue.companyAddress,
                 seniorityYear     : this.editInfoValue.seniorityYear,
                 seniorityMonth    : this.editInfoValue.seniorityMonth,
                 concept           : this.editInfoValue.concept,
-                experience        : this.editInfoValue.experience,
-                award             : this.editInfoValue.awards,
+                experiences        : this.editInfoValue.experiences,
+                awards             : this.editInfoValue.awards,
                 communicationStyle: this.editInfoValue.communicationStyle.join(','),
-                photoBase64       : '123'
+                photoBase64       : ''
             }
 
             accountSettingService.editAgentInfoSetting(editSettingInfo).then((res: AgentInfoSetting) => {
               console.log(editSettingInfo)
             });
         }
-
+  // handleRemove(file) {
+  //       console.log(file);
+  //     }
+  //     handlePictureCardPreview(file) {
+  //       this.photoBase64 = file.url;
+  //       this.dialogVisible = true;
+  //     }
+  //     handleDownload(file) {
+  //       console.log(file);
+  //     }
+    
 }
 
 </script>
diff --git a/PAMapp/shared/models/account.model.ts b/PAMapp/shared/models/account.model.ts
index ea0154e..0076a64 100644
--- a/PAMapp/shared/models/account.model.ts
+++ b/PAMapp/shared/models/account.model.ts
@@ -17,8 +17,8 @@
     seniorityYear     : number; 
     seniorityMonth    : number; 
     concept           : string;
-    experience        : string;  
-    award             : string;
+    experiences        : string;  
+    awards           : string;
     communicationStyle: string; 
     photoBase64       : string;
 }

--
Gitblit v1.8.0