保誠-保戶業務員媒合平台
Tomas
2021-12-27 176b380f392efab0a84dd79560dca22e8053d0e4
PAMapp/components/careerSelect.vue
@@ -29,14 +29,13 @@
          </div>
          <el-button type="primary"
            class="pam-career__confirm"
            :disabled="isCareerVerifyFailed"
            :disabled="!isCareerValid"
            @click="patchCareer">
              確定
          </el-button>
        </div>
      </PopUpFrame>
  </div>
</template>
@@ -46,10 +45,14 @@
  @Component
  export default class CareerSelect extends Vue {
    @PropSync('careerSelect',{ type: String, default :''}) syncCareerSelect! :string;
    @PropSync('careerSelect',{ type: String, default :''})
    syncCareerSelect! :string;
    showJobDrawer = false;
    career='';
    career_Other='';
    options= [
      {
        title:'外勤',
@@ -64,9 +67,9 @@
        label:'其他'
      }
    ];
    get isCareerVerifyFailed():boolean{
      return !this.career || (_.isEqual(this.career,'其他')&&!this.career_Other) ;
    }
    //////////////////////////////////////////////////////////////////////
    handleChange(event:any):void{
      if(event !== '其他'){
        this.career_Other='';
@@ -89,10 +92,17 @@
      }
    }
    patchCareer():boolean {
    patchCareer(): void {
      this.showJobDrawer = false;
      this.syncCareerSelect = this.career === '其他' ? _.cloneDeep(this.career_Other):_.cloneDeep(this.career);
      return true;
      this.syncCareerSelect = this.career === '其他'
                          ? _.cloneDeep(this.career_Other)
                          : _.cloneDeep(this.career);
    }
    get isCareerValid(): boolean {
      return !!(this.career === '其他'
            ? this.career_Other
            : this.career);
    }
  }
</script>