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