Browse Source

finish

master
maochaoying 2 years ago
parent
commit
5abd3f480b
  1. 16
      .env
  2. 3
      src/components/Debug.vue
  3. 1
      src/components/Excel.vue
  4. 11
      src/components/Task.vue
  5. 34
      src/pages/index.vue
  6. 4
      src/store/modules/image.js

16
.env

@ -1,15 +1,15 @@
# VITE_BASE_URL=http://192.168.1.194:8899
VITE_WEBSOCKET_JAVA_URL=ws://192.168.1.194:8899/websocket/nuclear
VITE_WEBSOCKET_CAMERA_URL=ws://127.0.0.1:8899/websocket/nuclear
VITE_WEBSOCKET_CAMERA_URL=ws://192.168.1.194:8081/ws/cmd
VITE_HOST_URL=http://192.168.1.194:8081/
# VITE_WEBSOCKET_JAVA_URL=ws://192.168.1.194:8899/websocket/nuclear
# VITE_WEBSOCKET_CAMERA_URL=ws://127.0.0.1:8899/websocket/nuclear
# VITE_WEBSOCKET_CAMERA_URL=ws://192.168.1.194:8081/ws/cmd
# VITE_HOST_URL=http://192.168.1.194:8081/
VITE_BASE_URL=http://127.0.0.1:8899
# VITE_WEBSOCKET_JAVA_URL=ws://127.0.0.1:8899/websocket/nuclear
# # VITE_WEBSOCKET_CAMERA_URL=ws://127.0.0.1:8899/websocket/nuclear
# VITE_WEBSOCKET_CAMERA_URL=ws://127.0.0.1:8081/ws/cmd
# VITE_HOST_URL=http://127.0.0.1:8081/
VITE_WEBSOCKET_JAVA_URL=ws://127.0.0.1:8899/websocket/nuclear
# VITE_WEBSOCKET_CAMERA_URL=ws://127.0.0.1:8899/websocket/nuclear
VITE_WEBSOCKET_CAMERA_URL=ws://127.0.0.1:8081/ws/cmd
VITE_HOST_URL=http://127.0.0.1:8081/
# VITE_BASE_URL=http://192.168.1.111:8899
# VITE_WEBSOCKET_JAVA_URL=ws://192.168.1.111:8899/websocket/nuclear

3
src/components/Debug.vue

@ -416,6 +416,9 @@ const websocketonopen = () => {
websocketsend(getCameraParametersInteger)
//
handleCloseFlashLight(false)
}, 500)
setTimeout(() => {
websocketsend(openFlashLight)
websocketsend(getFlashBrightnessAnalog)
}, 1000)
}

1
src/components/Excel.vue

@ -30,6 +30,7 @@ const showCoreDetail = index => {
checkStore.updateCheckNumber(item.serialNumber)
}
}
//
if (arr?.length > 0) {
imageStore.updateShowImage(true)

11
src/components/Task.vue

@ -480,6 +480,7 @@ export default {
}
},
props: [
'closeAll',
'startCaptureFunc',
'handleSimulationBrightness',
'handleExposureTime',
@ -648,6 +649,7 @@ export default {
}, 1000)
// websocketsend(openFlashLight)
// id
imageStore.updateNuclearCoreId(row.nuclearCoreId)
const res = await getCameraConfig(row.nuclearCoreId)
if (res?.code == 200) {
if (res?.data?.exposure) {
@ -683,13 +685,12 @@ export default {
if (flag == 1 && canUpload) {
return
}
this.startCaptureFunc()
this.startFlashLight()
setTimeout(() => {
this.startFlashLight()
}, 1000)
this.closeAll()
// this.startCaptureFunc()
// this.startFlashLight()
// websocketsend(openFlashLight)
// id
imageStore.updateNuclearCoreId(row.nuclearCoreId)
const res = await getCameraConfig(row.nuclearCoreId)
if (res?.code == 200) {
if (res?.data?.exposure) {

34
src/pages/index.vue

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

4
src/store/modules/image.js

@ -8,10 +8,14 @@ export const useImageStore = defineStore({
showImage: false,
operatorName: '',
nuclearStationName: '',
nuclearCoreId: '',
}
},
// actions
actions: {
updateNuclearCoreId(nuclearCoreId) {
this.nuclearCoreId = nuclearCoreId
},
updateNuclearStationName(nuclearStationName) {
this.nuclearStationName = nuclearStationName
},

Loading…
Cancel
Save