|
|
@ -320,6 +320,7 @@ |
|
|
|
</div> |
|
|
|
<div class="task_container" v-if="accountStore.activePage == 1"> |
|
|
|
<Task |
|
|
|
:closeAll="closeAll" |
|
|
|
:startFlashLight="startFlashLight" |
|
|
|
:startCaptureFunc="startCaptureFunc" |
|
|
|
:handleSimulationBrightness="handleSimulationBrightness" |
|
|
@ -381,10 +382,13 @@ import { |
|
|
|
getCharacterRecognitionResult, |
|
|
|
getCameraState, |
|
|
|
startCapture, |
|
|
|
closeFlashLight, |
|
|
|
stopCapture, |
|
|
|
setFlashBrightnessAnalog, |
|
|
|
setExposureTimeRaw, |
|
|
|
openFlashLight, |
|
|
|
} from '@/command' |
|
|
|
import { getCameraConfig } from '@/api/camera' |
|
|
|
const accountStore = useAccountStore() |
|
|
|
const taskStore = useTaskStore() |
|
|
|
const imageStore = useImageStore() |
|
|
@ -395,6 +399,11 @@ const loading = ref(false) |
|
|
|
const hasTestedLength = ref(0) |
|
|
|
const testArrLength = ref(121) |
|
|
|
|
|
|
|
const closeAll = () => { |
|
|
|
websocketsend(closeFlashLight) |
|
|
|
websocketsend(stopCapture) |
|
|
|
} |
|
|
|
|
|
|
|
const changeTaskStatusThree = () => {} |
|
|
|
|
|
|
|
// websocket |
|
|
@ -471,8 +480,25 @@ const clickLogo = () => { |
|
|
|
// taskStore.updateType(0) |
|
|
|
// getInitData() |
|
|
|
} |
|
|
|
const continueWork = () => { |
|
|
|
const continueWork = async () => { |
|
|
|
// 重置图片 |
|
|
|
startCaptureFunc() |
|
|
|
startFlashLight() |
|
|
|
setTimeout(() => { |
|
|
|
startFlashLight() |
|
|
|
}, 1000) |
|
|
|
// 设置相机 |
|
|
|
const res = await getCameraConfig(imageStore.nuclearCoreId) |
|
|
|
if (res?.code == 200) { |
|
|
|
if (res?.data?.exposure) { |
|
|
|
// 改变相机的exposure |
|
|
|
handleExposureTime(res?.data?.exposure) |
|
|
|
} |
|
|
|
if (res?.data?.brightness) { |
|
|
|
// 改变相机的simulation_brightness |
|
|
|
handleSimulationBrightness(res?.data?.brightness) |
|
|
|
} |
|
|
|
} |
|
|
|
imageStore.reset() |
|
|
|
taskStore.updateCurrentDetailTaskId(null) |
|
|
|
accountStore.changePage(0) |
|
|
@ -660,11 +686,7 @@ onMounted(async () => { |
|
|
|
|
|
|
|
const catCurrentTaskDetail = () => { |
|
|
|
cameraStore.updateContinueTask(true) |
|
|
|
startCaptureFunc() |
|
|
|
startFlashLight() |
|
|
|
setTimeout(() => { |
|
|
|
startFlashLight() |
|
|
|
}, 1000) |
|
|
|
closeAll() |
|
|
|
const currentTaskId = taskStore.currentTaskId |
|
|
|
// 查看当前进行任务的详情 |
|
|
|
taskStore.updateCurrentDetailTaskId(currentTaskId) |
|
|
|