This commit is contained in:
parent
62fb3f9b73
commit
a89853b4ac
|
|
@ -51,6 +51,7 @@ export const importEntryPersonAPI = (data) => {
|
|||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 修改人员的红绿灯状态
|
||||
export const updatePersonLightStatusAPI = (id) => {
|
||||
return request({
|
||||
|
|
@ -58,3 +59,12 @@ export const updatePersonLightStatusAPI = (id) => {
|
|||
method: 'POST',
|
||||
})
|
||||
}
|
||||
|
||||
// 人员入场时 校验人脸图片接口
|
||||
export const checkFaceImageAPI = (data) => {
|
||||
return requestFormData({
|
||||
url: '/bmw/worker/faceDetection',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@
|
|||
:limit="1"
|
||||
:file-size="10"
|
||||
:multiple="true"
|
||||
@onUploadChange="onUploadChange"
|
||||
@onUploadChange="onUploadChangeFaceImg"
|
||||
:file-type="['jpg', 'png', 'jpeg']"
|
||||
:file-list.sync="idCardInfoForm.faceImg"
|
||||
:is-uploaded="idCardInfoForm.faceImg.length >= 1"
|
||||
|
|
@ -585,6 +585,7 @@
|
|||
import UploadImgFormData from '@/components/UploadImgFormData'
|
||||
import UploadFileFormData from '@/components/UploadFileFormData'
|
||||
import {
|
||||
checkFaceImageAPI,
|
||||
addEntryPersonAPI,
|
||||
editEntryPersonAPI,
|
||||
getEntryPersonDetailAPI,
|
||||
|
|
@ -940,6 +941,15 @@ export default {
|
|||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
wageCriterion: [
|
||||
{
|
||||
required: false,
|
||||
},
|
||||
{
|
||||
pattern: /^[1-9]\d*$/,
|
||||
message: '请输入正确的工资核定标准',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// 入场工程列表
|
||||
|
|
@ -1222,7 +1232,7 @@ export default {
|
|||
await updatePersonLightStatusAPI(
|
||||
this.queryDetailsId
|
||||
? this.workerId
|
||||
: res.data.id,
|
||||
: res.data,
|
||||
)
|
||||
console.log(
|
||||
result,
|
||||
|
|
@ -1565,11 +1575,16 @@ export default {
|
|||
},
|
||||
|
||||
// 人脸照片验证
|
||||
onUploadChange(fileList) {
|
||||
async onUploadChangeFaceImg(fileList) {
|
||||
console.log('人脸照片验证', fileList)
|
||||
|
||||
if (fileList.length > 0) {
|
||||
// 走验证逻辑
|
||||
|
||||
const formData = new FormData()
|
||||
formData.append('file', fileList[0].raw)
|
||||
const res = await checkFaceImageAPI(formData)
|
||||
console.log(res, 'res人脸照片验证结果')
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue