From 7d0ecdebe4a0c1fed526c2e25945ab3f86b8288f Mon Sep 17 00:00:00 2001 From: Jack <1638169491@qq.com> Date: Thu, 28 Jul 2022 19:28:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=AE=A1=E7=90=86(=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BA=BA=E5=91=98)=EF=BC=9A=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=BA=AB=E4=BB=BD=E8=AF=81=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E5=8E=8B=E7=BC=A9=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../personModule/administration.vue | 47 +++++++++++++++++-- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/src/views/projectFront/laborManage/personModule/administration.vue b/src/views/projectFront/laborManage/personModule/administration.vue index c9d71a61..28ef949f 100644 --- a/src/views/projectFront/laborManage/personModule/administration.vue +++ b/src/views/projectFront/laborManage/personModule/administration.vue @@ -1222,16 +1222,16 @@ { + const formData = new FormData() + formData.append('files', result.file) + // 图片上传 + apiUploadImage(formData).then((res) => { + if (res.code == 200 || res.status == 'SUCCESS') { + const imgInfo = res.data[0] + + switch (type) { + case 'idCardAvatar': // 身份证头像 + this.personForm.idCardBigPhotoUrl = imgInfo.imageUrl + this.idCardUpPhotoFile = this.idCardBigPhotoUrlFile = [ + { name: imgInfo.filename, url: imgInfo.imageUrl } + ] + break + case 'livesFace': // 现场采集人脸 + let imgStatus = result.file.size / 1024 < 500 + if (!imgStatus) { + this.cropperOption.img = + this.$store.state.FILEURL + imgInfo.imageUrl + this.cropperDialog = true + } else { + if (this.isSzProject == 1) { + this.checkImgLibrary(imgInfo.imageUrl) + } else { + this.checkFace(imgInfo.imageUrl) + } + } + break + } + } + }) + }) + }, changePeople(val) {}, issuePersonFn() { batchSendWorkerInfoApi({