From f9d9bf2cf8a99ecd5a41e4f9a973856cf296966e Mon Sep 17 00:00:00 2001
From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com>
Date: Mon, 10 Feb 2025 18:05:20 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E5=9F=B9=E8=AE=AD=20?=
=?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B8=8A=E4=BC=A0=E5=8A=9F=E8=83=BD=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
manifest.json | 2 +-
.../workbench/personEnter/addPeople.vue | 79 ++++++++-----------
.../workbench/personEnter/editPeople.vue | 79 ++++++++-----------
3 files changed, 69 insertions(+), 91 deletions(-)
diff --git a/manifest.json b/manifest.json
index dbeeea4..47022f7 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,6 +1,6 @@
{
"name" : "兰坪实名制",
- "appid" : "__UNI__517BDE0",
+ "appid" : "__UNI__DC0416B",
"description" : "兰坪实名制",
"versionName" : "1.0.11",
"versionCode" : 111,
diff --git a/pages/realName/workbench/personEnter/addPeople.vue b/pages/realName/workbench/personEnter/addPeople.vue
index 4995b0f..8aef058 100644
--- a/pages/realName/workbench/personEnter/addPeople.vue
+++ b/pages/realName/workbench/personEnter/addPeople.vue
@@ -363,12 +363,12 @@
公司级考试
+
+
+
-
- {{ entryTrainBean.companyExamFilePath ? '重新上传' : '附件上传' }}
-
@@ -376,12 +376,12 @@
部门级考试
+
+
+
-
- {{ entryTrainBean.deptExamFilePath ? '重新上传' : '附件上传' }}
-
@@ -389,12 +389,12 @@
班组级级考试
+
+
+
-
- {{ entryTrainBean.eamExamFilePath ? '重新上传' : '附件上传' }}
-
@@ -1808,45 +1808,34 @@ export default {
sourceType: ['camera'],
success: res => {
console.log('?? ~ res-拍照:', res)
- this.imgToBase64(res.tempFilePaths[0]).then(base64 => {
- uni.uploadFile({
- url: config.realFileUrl + `file/uploadFaceRecognition`, //服务器地址
- fileType: 'image', //ZFB必填,不然报错
- filePath: res.tempFilePaths[0], //这个就是我们上面拍照返回或者先中照片返回的数组
- formData: {
- file: base64,
- optMode: 'replace',
- photoType: 'face',
- uniqueKey: this.entryIdNumberBean.idNumber
- },
- success: uploadFileRes => {
- console.log(uploadFileRes)
- if (uploadFileRes.statusCode == 200) {
- uploadFileRes = JSON.parse(uploadFileRes.data)
- if (uploadFileRes.code == 200) {
- this.faceImgUrl = base64
-
- if (type === 1) {
- this.entryTrainBean.companyExamFilePath = uploadFileRes.data.url
- }
- if (type === 2) {
- this.entryTrainBean.deptExamFilePath = uploadFileRes.data.url
- }
- if (type === 3) {
- this.entryTrainBean.eamExamFilePath = uploadFileRes.data.url
- }
- } else {
- uni.$u.toast(uploadFileRes.msg)
- }
- } else {
- uni.$u.toast('上传失败')
+ uni.uploadFile({
+ url: config.realFileUrl + `file/upload`, //服务器地址
+ fileType: 'image', //ZFB必填,不然报错
+ filePath: res.tempFilePaths[0], //这个就是我们上面拍照返回或者先中照片返回的数组
+ name: 'imgFile',
+ formData: {
+ photoType: 'Contract'
+ },
+ success: uploadFileRes => {
+ console.log(uploadFileRes)
+ if (uploadFileRes.statusCode == 200) {
+ if (type === 1) {
+ this.entryTrainBean.companyExamFilePath = config.realBaseUrl + JSON.parse(uploadFileRes.data).data.url
}
- },
- fail: err => {
+ if (type === 2) {
+ this.entryTrainBean.deptExamFilePath = config.realBaseUrl + JSON.parse(uploadFileRes.data).data.url
+ }
+ if (type === 3) {
+ this.entryTrainBean.eamExamFilePath = config.realBaseUrl + JSON.parse(uploadFileRes.data).data.url
+ }
+ } else {
uni.$u.toast('上传失败')
- console.log(err)
}
- })
+ },
+ fail: err => {
+ uni.$u.toast('上传失败')
+ console.log(err)
+ }
})
},
fail: err => {
diff --git a/pages/realName/workbench/personEnter/editPeople.vue b/pages/realName/workbench/personEnter/editPeople.vue
index 9673ee7..8758ebc 100644
--- a/pages/realName/workbench/personEnter/editPeople.vue
+++ b/pages/realName/workbench/personEnter/editPeople.vue
@@ -375,12 +375,12 @@
公司级考试
+
+
+
-
- {{ entryTrainBean.companyExamFilePath ? '重新上传' : '附件上传' }}
-
@@ -388,12 +388,12 @@
部门级考试
+
+
+
-
- {{ entryTrainBean.deptExamFilePath ? '重新上传' : '附件上传' }}
-
@@ -401,12 +401,12 @@
班组级级考试
+
+
+
-
- {{ entryTrainBean.eamExamFilePath ? '重新上传' : '附件上传' }}
-
@@ -1881,45 +1881,34 @@ export default {
sourceType: ['camera'],
success: res => {
console.log('?? ~ res-拍照:', res)
- this.imgToBase64(res.tempFilePaths[0]).then(base64 => {
- uni.uploadFile({
- url: config.realFileUrl + `file/uploadFaceRecognition`, //服务器地址
- fileType: 'image', //ZFB必填,不然报错
- filePath: res.tempFilePaths[0], //这个就是我们上面拍照返回或者先中照片返回的数组
- formData: {
- file: base64,
- optMode: 'replace',
- photoType: 'face',
- uniqueKey: this.entryIdNumberBean.idNumber
- },
- success: uploadFileRes => {
- console.log(uploadFileRes)
- if (uploadFileRes.statusCode == 200) {
- uploadFileRes = JSON.parse(uploadFileRes.data)
- if (uploadFileRes.code == 200) {
- this.faceImgUrl = base64
-
- if (type === 1) {
- this.entryTrainBean.companyExamFilePath = uploadFileRes.data.url
- }
- if (type === 2) {
- this.entryTrainBean.deptExamFilePath = uploadFileRes.data.url
- }
- if (type === 3) {
- this.entryTrainBean.eamExamFilePath = uploadFileRes.data.url
- }
- } else {
- uni.$u.toast(uploadFileRes.msg)
- }
- } else {
- uni.$u.toast('上传失败')
+ uni.uploadFile({
+ url: config.realFileUrl + `file/upload`, //服务器地址
+ fileType: 'image', //ZFB必填,不然报错
+ filePath: res.tempFilePaths[0], //这个就是我们上面拍照返回或者先中照片返回的数组
+ name: 'imgFile',
+ formData: {
+ photoType: 'Contract'
+ },
+ success: uploadFileRes => {
+ console.log(uploadFileRes)
+ if (uploadFileRes.statusCode == 200) {
+ if (type === 1) {
+ this.entryTrainBean.companyExamFilePath = config.realBaseUrl + JSON.parse(uploadFileRes.data).data.url
}
- },
- fail: err => {
+ if (type === 2) {
+ this.entryTrainBean.deptExamFilePath = config.realBaseUrl + JSON.parse(uploadFileRes.data).data.url
+ }
+ if (type === 3) {
+ this.entryTrainBean.eamExamFilePath = config.realBaseUrl + JSON.parse(uploadFileRes.data).data.url
+ }
+ } else {
uni.$u.toast('上传失败')
- console.log(err)
}
- })
+ },
+ fail: err => {
+ uni.$u.toast('上传失败')
+ console.log(err)
+ }
})
},
fail: err => {