diff --git a/src/views/company-manage/key-person/components/addAndEditForm.vue b/src/views/company-manage/key-person/components/addAndEditForm.vue
index bd82863..060b73b 100644
--- a/src/views/company-manage/key-person/components/addAndEditForm.vue
+++ b/src/views/company-manage/key-person/components/addAndEditForm.vue
@@ -164,16 +164,17 @@
style="width: 100%"
v-model="item.diploma"
placeholder="请选择资格证书"
+ @change="onDiplomaChange($event, index)"
>
-
+
-
-
+
@@ -342,6 +343,7 @@ export default {
diplomaNum: '',
level: '',
diplomaImg: [],
+ diplomaList: [{ name: '注册建造师' }, { name: '项目经理B证' }],
},
], // 资格证书列表
},
@@ -661,6 +663,10 @@ export default {
diplomaNum: '',
level: '',
diplomaImg: [],
+ diplomaList: [
+ { name: '注册建造师', value: '注册建造师' },
+ { name: '项目经理B证', value: '项目经理B证' },
+ ],
})
},
// 删除资格证书
@@ -670,15 +676,38 @@ export default {
// 上传成功
uploadSuccess() {},
+
+ // 资格证书选择
+ onDiplomaChange(value, index) {
+ if (!value) return
+ const isRepeat = this.addAndEditForm.certificateList[index].diplomaList.some((item) => item.name === value)
+ if (!isRepeat) {
+ this.addAndEditForm.certificateList[index].diplomaList.push({ name: value })
+ }
+ },
},
watch: {
editRow: {
handler(newVal) {
if (newVal && Object.keys(newVal).length > 0) {
Object.assign(this.addAndEditForm, { ...newVal })
- // if (!['注册建造师', '项目经理B证'].includes(newVal.diploma)) {
- // this.diplomaList.push({ name: newVal.diploma })
- // }
+
+ 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证' },
+ ])
+
+ if (!['注册建造师', '项目经理B证'].includes(item.diploma)) {
+ this.addAndEditForm.certificateList[index].diplomaList.push({
+ name: item.diploma,
+ value: item.diploma,
+ })
+ }
+ })
+ }
+
this.addAndEditForm.idCardFront = this.addAndEditForm.tbFileSourceVoList
.filter((item) => item.fileType == 1)
.map((e) => {