保誠-保戶業務員媒合平台
HelenHuang
2021-12-28 23b153b373efc2c198d580f96e8ed3300faca647
TODO#顧問帳號資訊編輯API串接
修改2個檔案
48 ■■■■■ 已變更過的檔案
PAMapp/pages/agentInfo/edit/_agentNo.vue 44 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/shared/models/account.model.ts 4 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
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>
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;
}