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_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_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_BASE_URL=http://192.168.1.111:8899
# VITE_WEBSOCKET_JAVA_URL=ws://192.168.1.111:8899/websocket/nuclear # 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) websocketsend(getCameraParametersInteger)
// //
handleCloseFlashLight(false) handleCloseFlashLight(false)
}, 500)
setTimeout(() => {
websocketsend(openFlashLight)
websocketsend(getFlashBrightnessAnalog) websocketsend(getFlashBrightnessAnalog)
}, 1000) }, 1000)
} }

1
src/components/Excel.vue

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

11
src/components/Task.vue

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

34
src/pages/index.vue

@ -320,6 +320,7 @@
</div> </div>
<div class="task_container" v-if="accountStore.activePage == 1"> <div class="task_container" v-if="accountStore.activePage == 1">
<Task <Task
:closeAll="closeAll"
:startFlashLight="startFlashLight" :startFlashLight="startFlashLight"
:startCaptureFunc="startCaptureFunc" :startCaptureFunc="startCaptureFunc"
:handleSimulationBrightness="handleSimulationBrightness" :handleSimulationBrightness="handleSimulationBrightness"
@ -381,10 +382,13 @@ import {
getCharacterRecognitionResult, getCharacterRecognitionResult,
getCameraState, getCameraState,
startCapture, startCapture,
closeFlashLight,
stopCapture,
setFlashBrightnessAnalog, setFlashBrightnessAnalog,
setExposureTimeRaw, setExposureTimeRaw,
openFlashLight, openFlashLight,
} from '@/command' } from '@/command'
import { getCameraConfig } from '@/api/camera'
const accountStore = useAccountStore() const accountStore = useAccountStore()
const taskStore = useTaskStore() const taskStore = useTaskStore()
const imageStore = useImageStore() const imageStore = useImageStore()
@ -395,6 +399,11 @@ const loading = ref(false)
const hasTestedLength = ref(0) const hasTestedLength = ref(0)
const testArrLength = ref(121) const testArrLength = ref(121)
const closeAll = () => {
websocketsend(closeFlashLight)
websocketsend(stopCapture)
}
const changeTaskStatusThree = () => {} const changeTaskStatusThree = () => {}
// websocket // websocket
@ -471,8 +480,25 @@ const clickLogo = () => {
// taskStore.updateType(0) // taskStore.updateType(0)
// getInitData() // 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() imageStore.reset()
taskStore.updateCurrentDetailTaskId(null) taskStore.updateCurrentDetailTaskId(null)
accountStore.changePage(0) accountStore.changePage(0)
@ -660,11 +686,7 @@ onMounted(async () => {
const catCurrentTaskDetail = () => { const catCurrentTaskDetail = () => {
cameraStore.updateContinueTask(true) cameraStore.updateContinueTask(true)
startCaptureFunc()
startFlashLight()
setTimeout(() => {
startFlashLight()
}, 1000)
closeAll()
const currentTaskId = taskStore.currentTaskId const currentTaskId = taskStore.currentTaskId
// //
taskStore.updateCurrentDetailTaskId(currentTaskId) taskStore.updateCurrentDetailTaskId(currentTaskId)

4
src/store/modules/image.js

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

Loading…
Cancel
Save