代码完善

This commit is contained in:
BianLzhaoMin 2025-05-07 10:59:15 +08:00
parent 75e50cd13f
commit d051d95fa4
11 changed files with 129 additions and 57 deletions

View File

@ -15,6 +15,7 @@
:show-file-list="true" :show-file-list="true"
:on-exceed="handleExceed" :on-exceed="handleExceed"
name="files" name="files"
:class="isDetail || isUploaded ? 'upload-img' : ''"
> >
<i class="el-icon-plus" /> <i class="el-icon-plus" />
<div class="upload-img-box"> <div class="upload-img-box">
@ -72,6 +73,16 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
//
isDetail: {
type: Boolean,
default: false,
},
//
isUploaded: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return { return {
@ -181,4 +192,7 @@ export default {
align-items: center; align-items: center;
} }
} }
::v-deep .upload-img .el-upload--picture-card {
display: none;
}
</style> </style>

View File

@ -40,9 +40,11 @@
:limit="1" :limit="1"
:file-size="10" :file-size="10"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:is-detail="formType === 2"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']" :file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.idCardFront" :file-list.sync="addAndEditForm.idCardFront"
:is-uploaded="addAndEditForm.idCardFront.length >= 1"
> >
<template #upload-img-box> 身份证正面 </template> <template #upload-img-box> 身份证正面 </template>
</UploadImg> </UploadImg>
@ -52,9 +54,11 @@
:limit="1" :limit="1"
:file-size="10" :file-size="10"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:is-detail="formType === 2"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']" :file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.idCardBack" :file-list.sync="addAndEditForm.idCardBack"
:is-uploaded="addAndEditForm.idCardBack.length >= 1"
> >
<template #upload-img-box> 身份证反面 </template> <template #upload-img-box> 身份证反面 </template>
</UploadImg> </UploadImg>
@ -186,9 +190,11 @@
:file-size="10" :file-size="10"
:multiple="true" :multiple="true"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:is-detail="formType === 2"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']" :file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.diplomaImg" :file-list.sync="addAndEditForm.diplomaImg"
:is-uploaded="addAndEditForm.diplomaImg.length >= 5"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -206,9 +212,11 @@
:file-size="10" :file-size="10"
:multiple="true" :multiple="true"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:is-detail="formType === 2"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']" :file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.otherImg" :file-list.sync="addAndEditForm.otherImg"
:is-uploaded="addAndEditForm.otherImg.length >= 5"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -552,7 +560,7 @@ export default {
.map((e) => { .map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
this.addAndEditForm.idCardBack = this.addAndEditForm.tbFileSourceVoList this.addAndEditForm.idCardBack = this.addAndEditForm.tbFileSourceVoList
@ -560,7 +568,7 @@ export default {
.map((e) => { .map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
this.addAndEditForm.diplomaImg = this.addAndEditForm.tbFileSourceVoList this.addAndEditForm.diplomaImg = this.addAndEditForm.tbFileSourceVoList
@ -568,7 +576,7 @@ export default {
.map((e) => { .map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
this.addAndEditForm.otherImg = this.addAndEditForm.tbFileSourceVoList this.addAndEditForm.otherImg = this.addAndEditForm.tbFileSourceVoList
@ -576,7 +584,7 @@ export default {
.map((e) => { .map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
} }

View File

@ -35,9 +35,11 @@
:limit="1" :limit="1"
:file-size="10" :file-size="10"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:file-type="['jpg', 'png', 'jpeg']" :is-detail="formType === 2"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.idCardFront" :file-list.sync="addAndEditForm.idCardFront"
:is-uploaded="addAndEditForm.idCardFront.length >= 1"
> >
<template #upload-img-box> 身份证正面 </template> <template #upload-img-box> 身份证正面 </template>
</UploadImg> </UploadImg>
@ -47,9 +49,11 @@
:limit="1" :limit="1"
:file-size="10" :file-size="10"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:file-type="['jpg', 'png', 'jpeg']" :is-detail="formType === 2"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.idCardBack" :file-list.sync="addAndEditForm.idCardBack"
:is-uploaded="addAndEditForm.idCardBack.length >= 1"
> >
<template #upload-img-box> 身份证反面 </template> <template #upload-img-box> 身份证反面 </template>
</UploadImg> </UploadImg>
@ -167,9 +171,11 @@
:file-size="10" :file-size="10"
:multiple="true" :multiple="true"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:file-type="['jpg', 'png', 'jpeg']" :is-detail="formType === 2"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.diplomaImg" :file-list.sync="addAndEditForm.diplomaImg"
:is-uploaded="addAndEditForm.diplomaImg.length >= 5"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -187,9 +193,11 @@
:file-size="10" :file-size="10"
:multiple="true" :multiple="true"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:file-type="['jpg', 'png', 'jpeg']" :is-detail="formType === 2"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.otherImg" :file-list.sync="addAndEditForm.otherImg"
:is-uploaded="addAndEditForm.otherImg.length >= 5"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -514,7 +522,7 @@ export default {
.map((e) => { .map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
this.addAndEditForm.idCardBack = this.addAndEditForm.tbFileSourceVoList this.addAndEditForm.idCardBack = this.addAndEditForm.tbFileSourceVoList
@ -522,7 +530,7 @@ export default {
.map((e) => { .map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
this.addAndEditForm.diplomaImg = this.addAndEditForm.tbFileSourceVoList this.addAndEditForm.diplomaImg = this.addAndEditForm.tbFileSourceVoList
@ -530,7 +538,7 @@ export default {
.map((e) => { .map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
this.addAndEditForm.otherImg = this.addAndEditForm.tbFileSourceVoList this.addAndEditForm.otherImg = this.addAndEditForm.tbFileSourceVoList
@ -538,7 +546,7 @@ export default {
.map((e) => { .map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
} }

View File

@ -236,9 +236,11 @@
:file-size="10" :file-size="10"
:multiple="true" :multiple="true"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:is-detail="formType === 2"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']" :file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.htKeyFileList" :file-list.sync="addAndEditForm.htKeyFileList"
:is-uploaded="addAndEditForm.htKeyFileList.length >= 8"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -266,9 +268,11 @@
:file-size="10" :file-size="10"
:multiple="true" :multiple="true"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:is-detail="formType === 2"
:file-list.sync="proveFileList" :file-list.sync="proveFileList"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']" :file-type="['jpg', 'png', 'jpeg']"
:is-uploaded="proveFileList.length >= 4"
/> />
<el-row class="upload-btn-box"> <el-row class="upload-btn-box">
@ -533,7 +537,7 @@ export default {
filePath, filePath,
fileName, fileName,
fileType: 1, fileType: 1,
url: this.fileViewUrl + filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + filePath + '?file_token=' + getToken(),
}) })
} else { } else {
this.addTableList[this.keyTbCurrentIndex].tbFileSourceVoList.push({ this.addTableList[this.keyTbCurrentIndex].tbFileSourceVoList.push({
@ -541,7 +545,7 @@ export default {
filePath: item.filePath, filePath: item.filePath,
fileName: item.fileName, fileName: item.fileName,
fileType: 1, fileType: 1,
url: this.fileViewUrl + item.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + item.filePath + '?file_token=' + getToken(),
}) })
} }
}) })
@ -561,7 +565,7 @@ export default {
this.proveFileList = this.addTableList[index].tbFileSourceVoList.map((e) => { this.proveFileList = this.addTableList[index].tbFileSourceVoList.map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
this.uploadOuterVisible = true this.uploadOuterVisible = true
@ -581,7 +585,7 @@ export default {
e.tbFileSourceVoList = e.tbFileSourceVoList.map((item) => { e.tbFileSourceVoList = e.tbFileSourceVoList.map((item) => {
return { return {
...item, ...item,
url: this.fileViewUrl + item.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + item.filePath + '?file_token=' + getToken(),
} }
}) })
}) })
@ -589,7 +593,7 @@ export default {
this.addAndEditForm.htKeyFileList = newVal.tbFileSourceVoList.map((e) => { this.addAndEditForm.htKeyFileList = newVal.tbFileSourceVoList.map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
} }

View File

@ -760,6 +760,15 @@ export default {
if (this.dialogConfig.outerTitle === '关键人员选择') { if (this.dialogConfig.outerTitle === '关键人员选择') {
if (this.companyPerformanceQueryParams.personId) { if (this.companyPerformanceQueryParams.personId) {
const rowInfo = this.keyPersonList.find(
(item) => item.id == this.companyPerformanceQueryParams.personId,
)
const index = this.keyTableCurrentIndex
this.companyKeyPersonList[index].userId = rowInfo.id
this.companyKeyPersonList[index].title = rowInfo.title
this.companyKeyPersonList[index].userName = rowInfo.userName
this.companyKeyPersonList[index].diploma = rowInfo.diploma
this.companyKeyPersonList[index].idCard = rowInfo.idCard
const keyPersonPerformanceInnerSelectList = this.waitSelectData.filter((item) => const keyPersonPerformanceInnerSelectList = this.waitSelectData.filter((item) =>
this.selectData.includes(item.perfId), this.selectData.includes(item.perfId),
) )
@ -901,15 +910,11 @@ export default {
) { ) {
this.$modal.msgError('当前人员已选择,不可重复添加') this.$modal.msgError('当前人员已选择,不可重复添加')
this.companyPerformanceQueryParams.personId = '' this.companyPerformanceQueryParams.personId = ''
this.waitSelectData = []
this.selectData = []
return false return false
} else { } else {
const rowInfo = this.keyPersonList.find((item) => item.id == value) this.getCompanyPerformanceListByPersonIdData()
const index = this.keyTableCurrentIndex
this.companyKeyPersonList[index].userId = rowInfo.id
this.companyKeyPersonList[index].title = rowInfo.title
this.companyKeyPersonList[index].userName = rowInfo.userName
this.companyKeyPersonList[index].diploma = rowInfo.diploma
this.companyKeyPersonList[index].idCard = rowInfo.idCard
} }
}, },

View File

@ -1081,6 +1081,15 @@ export default {
if (this.dialogConfig.outerTitle === '关键人员选择') { if (this.dialogConfig.outerTitle === '关键人员选择') {
if (this.companyPerformanceQueryParams.personId) { if (this.companyPerformanceQueryParams.personId) {
const rowInfo = this.keyPersonList.find(
(item) => item.id == this.companyPerformanceQueryParams.personId,
)
const index = this.keyTableCurrentIndex
this.companyKeyPersonList[index].userId = rowInfo.id
this.companyKeyPersonList[index].title = rowInfo.title
this.companyKeyPersonList[index].userName = rowInfo.userName
this.companyKeyPersonList[index].diploma = rowInfo.diploma
this.companyKeyPersonList[index].idCard = rowInfo.idCard
const keyPersonPerformanceInnerSelectList = this.waitSelectData.filter((item) => const keyPersonPerformanceInnerSelectList = this.waitSelectData.filter((item) =>
this.selectData.includes(item.perfId), this.selectData.includes(item.perfId),
) )
@ -1162,6 +1171,21 @@ export default {
// //
if (this.dialogConfig.outerTitle === '分包人员选择') { if (this.dialogConfig.outerTitle === '分包人员选择') {
if (this.personPerformanceForm.personId) {
const rowInfo = this.subcontractorPersonSelectList.find(
(item) => item.id == this.personPerformanceForm.personId,
)
const index = this.subcontractorPersonCurrentIndex
const personIndex = this.subcontractorPersonSelectIndex
this.subcontractorList[index].subcontractorPersonList[personIndex].userId = rowInfo.id
this.subcontractorList[index].subcontractorPersonList[personIndex].userName = rowInfo.userName
this.subcontractorList[index].subcontractorPersonList[personIndex].title = rowInfo.title
this.subcontractorList[index].subcontractorPersonList[personIndex].diploma = rowInfo.diploma
this.subcontractorList[index].subcontractorPersonList[personIndex].idCard = rowInfo.idCard
} else {
this.$modal.msgError('请选择人员')
return false
}
const subcontractorPerformanceInnerList = this.waitSubcontractorPerformanceData.filter((item) => const subcontractorPerformanceInnerList = this.waitSubcontractorPerformanceData.filter((item) =>
this.selectSubcontractorPerformanceData.includes(item.perfId), this.selectSubcontractorPerformanceData.includes(item.perfId),
) )
@ -1317,15 +1341,12 @@ export default {
) { ) {
this.$modal.msgError('当前人员已选择,不可重复添加') this.$modal.msgError('当前人员已选择,不可重复添加')
this.companyPerformanceQueryParams.personId = '' this.companyPerformanceQueryParams.personId = ''
this.waitSelectData = []
this.selectData = []
return false return false
} else { } else {
const rowInfo = this.keyPersonList.find((item) => item.id == value) //
const index = this.keyTableCurrentIndex this.getCompanyPerformanceListByPersonIdData()
this.companyKeyPersonList[index].userId = rowInfo.id
this.companyKeyPersonList[index].title = rowInfo.title
this.companyKeyPersonList[index].userName = rowInfo.userName
this.companyKeyPersonList[index].diploma = rowInfo.diploma
this.companyKeyPersonList[index].idCard = rowInfo.idCard
} }
}, },
@ -1584,16 +1605,11 @@ export default {
) { ) {
this.$modal.msgError('当前人员已选择,不可重复添加') this.$modal.msgError('当前人员已选择,不可重复添加')
this.personPerformanceForm.personId = '' this.personPerformanceForm.personId = ''
this.waitSubcontractorPerformanceData = []
this.selectSubcontractorPerformanceData = []
return false return false
} else { } else {
const rowInfo = this.subcontractorPersonSelectList.find((item) => item.id == value) this.getSubcontractorPerformanceDataByPersonId()
const index = this.subcontractorPersonCurrentIndex
const personIndex = this.subcontractorPersonSelectIndex
this.subcontractorList[index].subcontractorPersonList[personIndex].userId = rowInfo.id
this.subcontractorList[index].subcontractorPersonList[personIndex].userName = rowInfo.userName
this.subcontractorList[index].subcontractorPersonList[personIndex].title = rowInfo.title
this.subcontractorList[index].subcontractorPersonList[personIndex].diploma = rowInfo.diploma
this.subcontractorList[index].subcontractorPersonList[personIndex].idCard = rowInfo.idCard
} }
}, },

View File

@ -760,6 +760,15 @@ export default {
if (this.dialogConfig.outerTitle === '关键人员选择') { if (this.dialogConfig.outerTitle === '关键人员选择') {
if (this.companyPerformanceQueryParams.personId) { if (this.companyPerformanceQueryParams.personId) {
const rowInfo = this.keyPersonList.find(
(item) => item.id == this.companyPerformanceQueryParams.personId,
)
const index = this.keyTableCurrentIndex
this.companyKeyPersonList[index].userId = rowInfo.id
this.companyKeyPersonList[index].title = rowInfo.title
this.companyKeyPersonList[index].userName = rowInfo.userName
this.companyKeyPersonList[index].diploma = rowInfo.diploma
this.companyKeyPersonList[index].idCard = rowInfo.idCard
const keyPersonPerformanceInnerSelectList = this.waitSelectData.filter((item) => const keyPersonPerformanceInnerSelectList = this.waitSelectData.filter((item) =>
this.selectData.includes(item.perfId), this.selectData.includes(item.perfId),
) )
@ -902,15 +911,11 @@ export default {
) { ) {
this.$modal.msgError('当前人员已选择,不可重复添加') this.$modal.msgError('当前人员已选择,不可重复添加')
this.companyPerformanceQueryParams.personId = '' this.companyPerformanceQueryParams.personId = ''
this.waitSelectData = []
this.selectData = []
return false return false
} else { } else {
const rowInfo = this.keyPersonList.find((item) => item.id == value) this.getCompanyPerformanceListByPersonIdData()
const index = this.keyTableCurrentIndex
this.companyKeyPersonList[index].userId = rowInfo.id
this.companyKeyPersonList[index].title = rowInfo.title
this.companyKeyPersonList[index].userName = rowInfo.userName
this.companyKeyPersonList[index].diploma = rowInfo.diploma
this.companyKeyPersonList[index].idCard = rowInfo.idCard
} }
}, },

View File

@ -72,9 +72,11 @@
:file-size="10" :file-size="10"
:multiple="true" :multiple="true"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:is-detail="formType === 2"
:file-type="['jpg', 'png', 'jpeg']" :file-type="['jpg', 'png', 'jpeg']"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-list.sync="addAndEditForm.fileList" :file-list.sync="addAndEditForm.fileList"
:is-uploaded="addAndEditForm.fileList.length >= 20"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -238,7 +240,7 @@ export default {
.map((e) => { .map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
} }

View File

@ -171,10 +171,12 @@
:limit="8" :limit="8"
:file-size="10" :file-size="10"
:multiple="true" :multiple="true"
:file-type="['jpg', 'png', 'jpeg']"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:is-detail="formType === 2"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.imgList" :file-list.sync="addAndEditForm.imgList"
:is-uploaded="addAndEditForm.imgList.length >= 8"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -467,7 +469,7 @@ export default {
this.addAndEditForm.imgList = newVal.tbFileSourceVoList.map((e) => { this.addAndEditForm.imgList = newVal.tbFileSourceVoList.map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
} }

View File

@ -51,26 +51,30 @@
<div style="display: flex"> <div style="display: flex">
<el-form-item prop="idCardFront"> <el-form-item prop="idCardFront">
<UploadImg <UploadImg
:limit="4" :limit="1"
:multiple="true" :multiple="true"
:file-size="10" :file-size="10"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:is-detail="formType === 2"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']" :file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.idCardFront" :file-list.sync="addAndEditForm.idCardFront"
:is-uploaded="addAndEditForm.idCardFront.length >= 1"
> >
<template #upload-img-box> 身份证正面 </template> <template #upload-img-box> 身份证正面 </template>
</UploadImg> </UploadImg>
</el-form-item> </el-form-item>
<el-form-item prop="idCardBack"> <el-form-item prop="idCardBack">
<UploadImg <UploadImg
:limit="4" :limit="1"
:multiple="true" :multiple="true"
:file-size="10" :file-size="10"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:is-detail="formType === 2"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']" :file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.idCardBack" :file-list.sync="addAndEditForm.idCardBack"
:is-uploaded="addAndEditForm.idCardBack.length >= 1"
> >
<template #upload-img-box> 身份证反面 </template> <template #upload-img-box> 身份证反面 </template>
</UploadImg> </UploadImg>
@ -131,9 +135,11 @@
:multiple="true" :multiple="true"
:file-size="10" :file-size="10"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:is-detail="formType === 2"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']" :file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.diplomaImg" :file-list.sync="addAndEditForm.diplomaImg"
:is-uploaded="addAndEditForm.diplomaImg.length >= 5"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -151,9 +157,11 @@
:multiple="true" :multiple="true"
:file-size="10" :file-size="10"
@deleteFile="deleteFile" @deleteFile="deleteFile"
:is-detail="formType === 2"
:upload-file-url="uploadFileUrl" :upload-file-url="uploadFileUrl"
:file-type="['jpg', 'png', 'jpeg']" :file-type="['jpg', 'png', 'jpeg']"
:file-list.sync="addAndEditForm.otherImg" :file-list.sync="addAndEditForm.otherImg"
:is-uploaded="addAndEditForm.otherImg.length >= 5"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -466,7 +474,7 @@ export default {
.map((e) => { .map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
this.addAndEditForm.idCardBack = this.addAndEditForm.tbFileSourceVoList this.addAndEditForm.idCardBack = this.addAndEditForm.tbFileSourceVoList
@ -474,7 +482,7 @@ export default {
.map((e) => { .map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
this.addAndEditForm.diplomaImg = this.addAndEditForm.tbFileSourceVoList this.addAndEditForm.diplomaImg = this.addAndEditForm.tbFileSourceVoList
@ -482,7 +490,7 @@ export default {
.map((e) => { .map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
this.addAndEditForm.otherImg = this.addAndEditForm.tbFileSourceVoList this.addAndEditForm.otherImg = this.addAndEditForm.tbFileSourceVoList
@ -490,7 +498,7 @@ export default {
.map((e) => { .map((e) => {
return { return {
...e, ...e,
url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(),
} }
}) })
} }

View File

@ -719,8 +719,8 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
closeOnClickModal: false, closeOnClickModal: false,
inputPattern: /^.{5,20}$/, // inputPattern: /^.{5,20}$/,
inputErrorMessage: '用户密码长度必须介于 5 和 20 之间', // inputErrorMessage: ' 5 20 ',
inputValidator: (value) => { inputValidator: (value) => {
// if (/<|>|"|'|\||\\/.test(value)) { // if (/<|>|"|'|\||\\/.test(value)) {
// return '< > " \' \\\ |' // return '< > " \' \\\ |'