人员管理(劳务人员):更改 handleUpload 图片绑定逻辑
This commit is contained in:
parent
9bc6007ba1
commit
127eac97b1
@ -1524,6 +1524,7 @@
|
||||
<span style="color: #f76c6c">*</span>
|
||||
{{ $t('message.laborMange.IdCardHead') }}
|
||||
</div>
|
||||
<!-- 身份证头像 -->
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action="uploadUrl"
|
||||
@ -2256,13 +2257,11 @@ export default {
|
||||
formData.append('files', result.file)
|
||||
apiUploadImage(formData).then((res) => {
|
||||
if (res.code == 200 || res.status == 'SUCCESS') {
|
||||
const data = res.data
|
||||
let obj = {}
|
||||
for (let i in data) {
|
||||
obj = { name: data[i].filename, url: data[i].imageUrl }
|
||||
}
|
||||
this.personForm.idCardBigPhotoUrl = obj.url
|
||||
this.idCardUpPhotoFile = [obj]
|
||||
const imgInfo = res.data[0]
|
||||
this.personForm.idCardBigPhotoUrl = imgInfo.imageUrl
|
||||
this.idCardUpPhotoFile = [
|
||||
{ name: imgInfo.filename, url: imgInfo.imageUrl }
|
||||
]
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user