diff --git a/src/views/company-manage/key-person/components/addAndEditForm.vue b/src/views/company-manage/key-person/components/addAndEditForm.vue index 060b73b..03f75ff 100644 --- a/src/views/company-manage/key-person/components/addAndEditForm.vue +++ b/src/views/company-manage/key-person/components/addAndEditForm.vue @@ -165,6 +165,7 @@ v-model="item.diploma" placeholder="请选择资格证书" @change="onDiplomaChange($event, index)" + @blur="onDiplomaBlur($event, index)" > item.name === event.target.value, + ) + if (!isRepeat) { + this.addAndEditForm.certificateList[index].diplomaList.push({ name: event.target.value }) + this.addAndEditForm.certificateList[index].diploma = event.target.value + } + }, }, watch: { editRow: { @@ -694,12 +705,9 @@ export default { if (this.addAndEditForm.certificateList.length > 0) { this.addAndEditForm.certificateList.forEach((item, index) => { - this.$set(this.addAndEditForm.certificateList[index], 'diplomaList', [ - { name: '注册建造师', value: '注册建造师' }, - { name: '项目经理B证', value: '项目经理B证' }, - ]) + this.$set(this.addAndEditForm.certificateList[index], 'diplomaList', this.diplomaList) - if (!['注册建造师', '项目经理B证'].includes(item.diploma)) { + if (!this.diplomaList.includes(item.diploma)) { this.addAndEditForm.certificateList[index].diplomaList.push({ name: item.diploma, value: item.diploma,