| | |
| | | import Speech from 'speak-tts' |
| | | import { reactive,computed, toRefs, onMounted, watch, ref } from "vue" |
| | | import { sendPationCodeApi } from '../../samples/httpApi' |
| | | import { formatDate,jgTime } from '@/utils/formatTime' |
| | | import { formatDate,jgTime,isworkTime } from '@/utils/formatTime' |
| | | import { confingInfoStore } from '@/stores/StoresConfing' |
| | | import {base64toFile} from '@/samples/faceApi' |
| | | import{initPort} from '@/samples/portApi' |
| | |
| | | // console.log('没有监测到---') |
| | | msg.value = "没识别到人脸..."; |
| | | } else if(event.data.length >= 1){ |
| | | |
| | | trackerTask.stop(); |
| | | msg.value = "检测到人脸"; |
| | | console.log('监测到人脸2样') |
| | | console.log('监测到人脸样') |
| | | console.log(event.data) |
| | | const myCanvas = document.getElementById("myCanvas");// |
| | | const thisContext = myCanvas?.getContext("2d"); |
| | |
| | | const X= jgTime(lsDateTime,new Date()) |
| | | |
| | | // 转文件 |
| | | // 识别框显示才能到传阿里云识别 |
| | | if(dialogVisible.value&&X>configData.value.face_push){ |
| | | // 识别框显示才能到传阿里云识别并且时间要是工作时间 |
| | | if(dialogVisible.value&&X>configData.value.face_push&&isworkTime(new Date())){ |
| | | lsDateTime=new Date() |
| | | console.log(X,'上传阿里识别间隔') |
| | | base64toFile(imgSrc) |