修改模板新增时证书的回显

This commit is contained in:
BianLzhaoMin 2025-06-24 14:12:31 +08:00
parent af655dbbc7
commit 3a2ef1392b
3 changed files with 113 additions and 21 deletions

View File

@ -96,12 +96,14 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="职称" prop="title" show-overflow-tooltip /> <el-table-column align="center" label="职称" prop="title" show-overflow-tooltip />
<el-table-column align="center" label="职业资格证书/身份证" width="200"> <el-table-column align="center" label="职业资格证书/身份证" width="200" show-overflow-tooltip>
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<span> <span v-if="row.certificateList.length > 0">
{{ row.diploma }} <!-- {{ row.diploma }} -->
<span v-for="(item, index) in row.certificateList" :key="index">
{{ `${item.diploma} (${item.diplomaNum})` }} <br />
</span>
</span> </span>
<br />
<span> <span>
{{ row.idCard }} {{ row.idCard }}
</span> </span>
@ -225,9 +227,17 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="职称" show-overflow-tooltip prop="title" /> <el-table-column align="center" label="职称" show-overflow-tooltip prop="title" />
<el-table-column align="center" label="证书名称" show-overflow-tooltip prop="diploma" /> <!-- <el-table-column align="center" label="证书名称" show-overflow-tooltip prop="diploma" /> -->
<el-table-column align="center" label="级别" show-overflow-tooltip prop="level" /> <el-table-column align="center" label="级别" show-overflow-tooltip prop="level" />
<el-table-column align="center" label="证书编号" show-overflow-tooltip prop="diplomaNum" /> <el-table-column align="center" label="证书名称/证书编号" show-overflow-tooltip>
<template slot-scope="{ row }">
<span v-if="row.certificateList.length > 0">
<span v-for="(item, index) in row.certificateList" :key="index">
{{ `${item.diploma} / ${item.diplomaNum}` }} <br />
</span>
</span>
</template>
</el-table-column>
<el-table-column align="center" label="专业" show-overflow-tooltip prop="major" /> <el-table-column align="center" label="专业" show-overflow-tooltip prop="major" />
<el-table-column align="center" label="操作" v-if="formType !== 2" width="80"> <el-table-column align="center" label="操作" v-if="formType !== 2" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
@ -1091,6 +1101,7 @@ export default {
this.companyKeyPersonList[index].userName = rowInfo.userName this.companyKeyPersonList[index].userName = rowInfo.userName
this.companyKeyPersonList[index].diploma = rowInfo.diploma this.companyKeyPersonList[index].diploma = rowInfo.diploma
this.companyKeyPersonList[index].idCard = rowInfo.idCard this.companyKeyPersonList[index].idCard = rowInfo.idCard
this.companyKeyPersonList[index].certificateList = rowInfo.certificateList
const keyPersonPerformanceInnerSelectList = this.waitSelectData.filter((item) => const keyPersonPerformanceInnerSelectList = this.waitSelectData.filter((item) =>
this.selectData.includes(item.perfId), this.selectData.includes(item.perfId),
) )
@ -1112,7 +1123,8 @@ export default {
return false return false
} else { } else {
// //
const { id, userName, title, diploma, diplomaNum, major, level } = this.selectedOtherPerson const { id, userName, title, diploma, diplomaNum, major, level, certificateList } =
this.selectedOtherPerson
Object.assign(this.companyOtherPersonList[this.otherTableCurrentIndex], { Object.assign(this.companyOtherPersonList[this.otherTableCurrentIndex], {
userId: id, userId: id,
userName, userName,
@ -1121,6 +1133,7 @@ export default {
diplomaNum, diplomaNum,
major, major,
level, level,
certificateList,
}) })
} }
} }
@ -1272,6 +1285,7 @@ export default {
proPerf: '', // proPerf: '', //
einDate: '', // einDate: '', //
exitDate: '', // 退 exitDate: '', // 退
certificateList: [], //
}) })
}, },
// //
@ -1397,6 +1411,7 @@ export default {
diplomaNum: '', // diplomaNum: '', //
major: '', // major: '', //
level: '', // level: '', //
certificateList: [], //
}) })
}, },
// //
@ -1660,6 +1675,21 @@ export default {
if (res.code === 200) { if (res.code === 200) {
const { name, comCoreList, comOtherList, comPerfList, subList } = res.data const { name, comCoreList, comOtherList, comPerfList, subList } = res.data
this.addAndEditForm.name = name this.addAndEditForm.name = name
//
if (comCoreList.length > 0) {
comCoreList.forEach((item) => {
if (item.certList && item.certList.length > 0) {
item.certificateList = item.certList
}
})
}
if (comOtherList.length > 0) {
comOtherList.forEach((item) => {
if (item.certList && item.certList.length > 0) {
item.certificateList = item.certList
}
})
}
// //
// 1. // 1.
this.companyPerformanceList = comPerfList this.companyPerformanceList = comPerfList

View File

@ -96,12 +96,14 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="职称" prop="title" show-overflow-tooltip /> <el-table-column align="center" label="职称" prop="title" show-overflow-tooltip />
<el-table-column align="center" label="职业资格证书/身份证" width="200"> <el-table-column align="center" label="职业资格证书/身份证" width="200" show-overflow-tooltip>
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<span> <span v-if="row.certificateList.length > 0">
{{ row.diploma }} <!-- {{ row.diploma }} -->
<span v-for="(item, index) in row.certificateList" :key="index">
{{ `${item.diploma} (${item.diplomaNum})` }} <br />
</span>
</span> </span>
<br />
<span> <span>
{{ row.idCard }} {{ row.idCard }}
</span> </span>
@ -225,9 +227,17 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="职称" show-overflow-tooltip prop="title" /> <el-table-column align="center" label="职称" show-overflow-tooltip prop="title" />
<el-table-column align="center" label="证书名称" show-overflow-tooltip prop="diploma" /> <!-- <el-table-column align="center" label="证书名称" show-overflow-tooltip prop="diploma" /> -->
<el-table-column align="center" label="级别" show-overflow-tooltip prop="level" /> <el-table-column align="center" label="级别" show-overflow-tooltip prop="level" />
<el-table-column align="center" label="证书编号" show-overflow-tooltip prop="diplomaNum" /> <el-table-column align="center" label="证书名称/证书编号" show-overflow-tooltip>
<template slot-scope="{ row }">
<span v-if="row.certificateList.length > 0">
<span v-for="(item, index) in row.certificateList" :key="index">
{{ `${item.diploma} / ${item.diplomaNum}` }} <br />
</span>
</span>
</template>
</el-table-column>
<el-table-column align="center" label="专业" show-overflow-tooltip prop="major" /> <el-table-column align="center" label="专业" show-overflow-tooltip prop="major" />
<el-table-column align="center" label="操作" v-if="formType !== 2" width="80"> <el-table-column align="center" label="操作" v-if="formType !== 2" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
@ -1091,6 +1101,7 @@ export default {
this.companyKeyPersonList[index].userName = rowInfo.userName this.companyKeyPersonList[index].userName = rowInfo.userName
this.companyKeyPersonList[index].diploma = rowInfo.diploma this.companyKeyPersonList[index].diploma = rowInfo.diploma
this.companyKeyPersonList[index].idCard = rowInfo.idCard this.companyKeyPersonList[index].idCard = rowInfo.idCard
this.companyKeyPersonList[index].certificateList = rowInfo.certificateList
const keyPersonPerformanceInnerSelectList = this.waitSelectData.filter((item) => const keyPersonPerformanceInnerSelectList = this.waitSelectData.filter((item) =>
this.selectData.includes(item.perfId), this.selectData.includes(item.perfId),
) )
@ -1112,7 +1123,8 @@ export default {
return false return false
} else { } else {
// //
const { id, userName, title, diploma, diplomaNum, major, level } = this.selectedOtherPerson const { id, userName, title, diploma, diplomaNum, major, level, certificateList } =
this.selectedOtherPerson
Object.assign(this.companyOtherPersonList[this.otherTableCurrentIndex], { Object.assign(this.companyOtherPersonList[this.otherTableCurrentIndex], {
userId: id, userId: id,
userName, userName,
@ -1121,6 +1133,7 @@ export default {
diplomaNum, diplomaNum,
major, major,
level, level,
certificateList,
}) })
} }
} }
@ -1272,6 +1285,7 @@ export default {
proPerf: '', // proPerf: '', //
einDate: '', // einDate: '', //
exitDate: '', // 退 exitDate: '', // 退
certificateList: [], //
}) })
}, },
// //
@ -1336,6 +1350,7 @@ export default {
// change // change
async onChangePerson(value) { async onChangePerson(value) {
console.log(value, 'value')
if ( if (
this.companyKeyPersonList.length > 0 && this.companyKeyPersonList.length > 0 &&
this.companyKeyPersonList.some((item) => item.userId == value) this.companyKeyPersonList.some((item) => item.userId == value)
@ -1397,6 +1412,7 @@ export default {
diplomaNum: '', // diplomaNum: '', //
major: '', // major: '', //
level: '', // level: '', //
certificateList: [], //
}) })
}, },
// //
@ -1660,6 +1676,22 @@ export default {
if (res.code === 200) { if (res.code === 200) {
const { name, comCoreList, comOtherList, comPerfList, subList } = res.data const { name, comCoreList, comOtherList, comPerfList, subList } = res.data
this.addAndEditForm.name = name this.addAndEditForm.name = name
//
if (comCoreList.length > 0) {
comCoreList.forEach((item) => {
if (item.certList && item.certList.length > 0) {
item.certificateList = item.certList
}
})
}
if (comOtherList.length > 0) {
comOtherList.forEach((item) => {
if (item.certList && item.certList.length > 0) {
item.certificateList = item.certList
}
})
}
// //
// 1. // 1.
this.companyPerformanceList = comPerfList this.companyPerformanceList = comPerfList

View File

@ -96,12 +96,14 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="职称" prop="title" show-overflow-tooltip /> <el-table-column align="center" label="职称" prop="title" show-overflow-tooltip />
<el-table-column align="center" label="职业资格证书/身份证" width="200"> <el-table-column align="center" label="职业资格证书/身份证" width="200" show-overflow-tooltip>
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<span> <span v-if="row.certificateList.length > 0">
{{ row.diploma }} <!-- {{ row.diploma }} -->
<span v-for="(item, index) in row.certificateList" :key="index">
{{ `${item.diploma} (${item.diplomaNum})` }} <br />
</span>
</span> </span>
<br />
<span> <span>
{{ row.idCard }} {{ row.idCard }}
</span> </span>
@ -225,9 +227,17 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="职称" show-overflow-tooltip prop="title" /> <el-table-column align="center" label="职称" show-overflow-tooltip prop="title" />
<el-table-column align="center" label="证书名称" show-overflow-tooltip prop="diploma" /> <!-- <el-table-column align="center" label="证书名称" show-overflow-tooltip prop="diploma" /> -->
<el-table-column align="center" label="级别" show-overflow-tooltip prop="level" /> <el-table-column align="center" label="级别" show-overflow-tooltip prop="level" />
<el-table-column align="center" label="证书编号" show-overflow-tooltip prop="diplomaNum" /> <el-table-column align="center" label="证书名称/证书编号" show-overflow-tooltip>
<template slot-scope="{ row }">
<span v-if="row.certificateList.length > 0">
<span v-for="(item, index) in row.certificateList" :key="index">
{{ `${item.diploma} / ${item.diplomaNum}` }} <br />
</span>
</span>
</template>
</el-table-column>
<el-table-column align="center" label="专业" show-overflow-tooltip prop="major" /> <el-table-column align="center" label="专业" show-overflow-tooltip prop="major" />
<el-table-column align="center" label="操作" v-if="formType !== 2" width="80"> <el-table-column align="center" label="操作" v-if="formType !== 2" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
@ -1091,6 +1101,7 @@ export default {
this.companyKeyPersonList[index].userName = rowInfo.userName this.companyKeyPersonList[index].userName = rowInfo.userName
this.companyKeyPersonList[index].diploma = rowInfo.diploma this.companyKeyPersonList[index].diploma = rowInfo.diploma
this.companyKeyPersonList[index].idCard = rowInfo.idCard this.companyKeyPersonList[index].idCard = rowInfo.idCard
this.companyKeyPersonList[index].certificateList = rowInfo.certificateList
const keyPersonPerformanceInnerSelectList = this.waitSelectData.filter((item) => const keyPersonPerformanceInnerSelectList = this.waitSelectData.filter((item) =>
this.selectData.includes(item.perfId), this.selectData.includes(item.perfId),
) )
@ -1112,7 +1123,8 @@ export default {
return false return false
} else { } else {
// //
const { id, userName, title, diploma, diplomaNum, major, level } = this.selectedOtherPerson const { id, userName, title, diploma, diplomaNum, major, level, certificateList } =
this.selectedOtherPerson
Object.assign(this.companyOtherPersonList[this.otherTableCurrentIndex], { Object.assign(this.companyOtherPersonList[this.otherTableCurrentIndex], {
userId: id, userId: id,
userName, userName,
@ -1121,6 +1133,7 @@ export default {
diplomaNum, diplomaNum,
major, major,
level, level,
certificateList,
}) })
} }
} }
@ -1272,6 +1285,7 @@ export default {
proPerf: '', // proPerf: '', //
einDate: '', // einDate: '', //
exitDate: '', // 退 exitDate: '', // 退
certificateList: [], //
}) })
}, },
// //
@ -1397,6 +1411,7 @@ export default {
diplomaNum: '', // diplomaNum: '', //
major: '', // major: '', //
level: '', // level: '', //
certificateList: [], //
}) })
}, },
// //
@ -1660,6 +1675,21 @@ export default {
if (res.code === 200) { if (res.code === 200) {
const { name, comCoreList, comOtherList, comPerfList, subList } = res.data const { name, comCoreList, comOtherList, comPerfList, subList } = res.data
this.addAndEditForm.name = name this.addAndEditForm.name = name
//
if (comCoreList.length > 0) {
comCoreList.forEach((item) => {
if (item.certList && item.certList.length > 0) {
item.certificateList = item.certList
}
})
}
if (comOtherList.length > 0) {
comOtherList.forEach((item) => {
if (item.certList && item.certList.length > 0) {
item.certificateList = item.certList
}
})
}
// //
// 1. // 1.
this.companyPerformanceList = comPerfList this.companyPerformanceList = comPerfList