This commit is contained in:
BianLzhaoMin 2025-08-21 14:24:05 +08:00
parent 62fb3f9b73
commit a89853b4ac
2 changed files with 28 additions and 3 deletions

View File

@ -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,
})
}

View File

@ -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人脸照片验证结果')
}
},
},