|
@@ -76,18 +76,21 @@ const getInit = async () => {
|
|
|
}
|
|
|
if (e?.cmd == 'check_facecontroller_available') {
|
|
|
let handcontroller_id = deviceInfo.value.handcontroller_id;
|
|
|
- if (e?.code != 0) {
|
|
|
- proxy?.$modal.msgError(`人脸识别模块不可用,code:${e.code}`);
|
|
|
- } else {
|
|
|
+ if (e?.code == 0) {
|
|
|
//查看人脸识别状态,如果不处于关闭就先关闭再重新启动(可能会APP退出然后工作站还在运行的可能性)
|
|
|
getFaceState(handcontroller_id);
|
|
|
+ } else if (e?.code == 102402) {
|
|
|
+ getCloseFace()
|
|
|
+ proxy?.$modal.msgError(`人脸识别模块被占用,请重试`);
|
|
|
+ } else {
|
|
|
+ proxy?.$modal.msgError(`人脸识别模块不可用,code:${e.code}`);
|
|
|
}
|
|
|
}
|
|
|
if (e?.cmd == 'get_facecontroller_state') {
|
|
|
let handcontroller_id = deviceInfo.value.handcontroller_id;
|
|
|
//state说明: 0:关闭,3:空闲,36:工作中
|
|
|
if ([3, 36].includes(e.state)) {
|
|
|
- terminateFace(handcontroller_id);
|
|
|
+ getCloseFace();
|
|
|
proxy?.$modal.msgWarning(`请重新人脸识别`);
|
|
|
} else {
|
|
|
faceState.value = true;
|