禅道bug修复

This commit is contained in:
BianLzhaoMin 2025-06-27 12:09:55 +08:00
parent 166d05ba94
commit b4d6279265
2 changed files with 23 additions and 15 deletions

View File

@ -45,7 +45,9 @@
:upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.idCardFront"
:is-uploaded="addAndEditForm.idCardFront.length >= 1"
:is-uploaded="
addAndEditForm.idCardFront && addAndEditForm.idCardFront.length >= 1
"
>
<template #upload-img-box> 身份证正面 </template>
</UploadImg>
@ -59,7 +61,9 @@
:upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.idCardBack"
:is-uploaded="addAndEditForm.idCardBack.length >= 1"
:is-uploaded="
addAndEditForm.idCardBack && addAndEditForm.idCardBack.length >= 1
"
>
<template #upload-img-box> 身份证反面 </template>
</UploadImg>
@ -251,7 +255,7 @@
:upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="item.diplomaImg"
:is-uploaded="item.diplomaImg.length >= 5"
:is-uploaded="item.diplomaImg && item.diplomaImg.length >= 5"
/>
</el-form-item>
</el-col>
@ -277,7 +281,7 @@
:upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.otherImg"
:is-uploaded="addAndEditForm.otherImg.length >= 5"
:is-uploaded="addAndEditForm.otherImg && addAndEditForm.otherImg.length >= 5"
/>
</el-form-item>
</el-col>
@ -319,7 +323,10 @@ export default {
fileViewUrl: process.env.VUE_APP_BASE_API + '/files',
deleteFileList: [],
uploadOuterVisible: false,
diplomaList: [{ name: '注册建造师' }, { name: '项目经理B证' }], //
diplomaList: [
{ name: '注册建造师', value: '注册建造师' },
{ name: '项目经理B证', value: '项目经理B证' },
], //
addAndEditForm: {
userName: '', //
idCard: '', //
@ -344,7 +351,7 @@ export default {
diplomaNum: '',
level: '',
diplomaImg: [],
diplomaList: [{ name: '注册建造师' }, { name: '项目经理B证' }],
diplomaList: [],
},
], //
},
@ -700,15 +707,16 @@ export default {
watch: {
editRow: {
handler(newVal) {
if (newVal && Object.keys(newVal).length > 0) {
if (newVal) {
Object.assign(this.addAndEditForm, { ...newVal })
this.addAndEditForm = JSON.parse(JSON.stringify(this.addAndEditForm))
if (this.addAndEditForm.certificateList.length > 0) {
this.addAndEditForm.certificateList.forEach((item, index) => {
this.$set(this.addAndEditForm.certificateList[index], 'diplomaList', this.diplomaList)
if (!this.diplomaList.includes(item.diploma)) {
this.addAndEditForm.certificateList[index].diplomaList.push({
this.$set(item, 'diplomaList', this.diplomaList)
if (!item.diplomaList.some((j) => j.name === item.diploma)) {
item.diplomaList.push({
name: item.diploma,
value: item.diploma,
})

View File

@ -14,7 +14,7 @@
<el-input v-model.trim="queryParams.title" placeholder="请输入职称" clearable> </el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="4">
<!-- <el-col :span="4">
<el-form-item prop="diploma">
<el-input v-model.trim="queryParams.diploma" placeholder="请输入资格证书" clearable> </el-input>
</el-form-item>
@ -134,7 +134,7 @@ export default {
total: 0, //
formType: 1, // 1 2 3
timeValue: [], //
editRow: {}, //
editRow: null, //
//
dialogConfig: {
outerTitle: '新增',
@ -224,7 +224,7 @@ export default {
tbFileSourceVoList,
certificateList,
} = row
Object.assign(this.editRow, {
this.editRow = {
userName,
idCard,
age,
@ -240,7 +240,7 @@ export default {
id,
tbFileSourceVoList,
certificateList,
})
}
}
this.dialogConfig.outerVisible = true