| | |
| | | </div> |
| | | <el-button type="primary" |
| | | class="pam-career__confirm" |
| | | :disabled="isCareerVerifyFailed" |
| | | :disabled="!isCareerValid" |
| | | @click="patchCareer"> |
| | | 確定 |
| | | </el-button> |
| | | </div> |
| | | </PopUpFrame> |
| | | </div> |
| | | |
| | | |
| | | </template> |
| | | |
| | |
| | | |
| | | @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:'外勤', |
| | |
| | | label:'其他' |
| | | } |
| | | ]; |
| | | get isCareerVerifyFailed():boolean{ |
| | | return !this.career || (_.isEqual(this.career,'其他')&&!this.career_Other) ; |
| | | } |
| | | |
| | | ////////////////////////////////////////////////////////////////////// |
| | | |
| | | handleChange(event:any):void{ |
| | | if(event !== '其他'){ |
| | | this.career_Other=''; |
| | |
| | | } |
| | | } |
| | | |
| | | 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> |