diff --git a/.env b/.env
index 537b441..8e41f01 100644
--- a/.env
+++ b/.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_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_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_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_BASE_URL=http://192.168.1.111:8899
# VITE_WEBSOCKET_JAVA_URL=ws://192.168.1.111:8899/websocket/nuclear
diff --git a/dist.zip b/dist.zip
new file mode 100644
index 0000000..08aa9ef
Binary files /dev/null and b/dist.zip differ
diff --git a/src/components/Debug.vue b/src/components/Debug.vue
index b1c20f7..ce99a35 100644
--- a/src/components/Debug.vue
+++ b/src/components/Debug.vue
@@ -125,6 +125,12 @@
+
@@ -156,25 +162,27 @@ const station_core_id = ref('')
const coreList = ref([])
+const loadingVisible = ref(false)
+
const handleSelectChange = async val => {
const res = await getCameraConfig(val)
if (res?.code == 200) {
- if (res?.data?.exposure) {
- exposure.value = res?.data?.exposure
- // 改变相机的exposure
- handleExposureTime(res?.data?.exposure)
- } else {
- exposure.value = 0
- handleExposureTime(0)
- }
- if (res?.data?.brightness) {
- simulation_brightness.value = res?.data?.brightness
- // 改变相机的simulation_brightness
- handleSimulationBrightness(res?.data?.brightness)
- } else {
- simulation_brightness.value = 0
- handleSimulationBrightness(0)
- }
+ // if (res?.data?.exposure) {
+ // exposure.value = res?.data?.exposure
+ // // 改变相机的exposure
+ // handleExposureTime(res?.data?.exposure)
+ // } else {
+ // exposure.value = 0
+ // handleExposureTime(0)
+ // }
+ // if (res?.data?.brightness) {
+ // simulation_brightness.value = res?.data?.brightness
+ // // 改变相机的simulation_brightness
+ // handleSimulationBrightness(res?.data?.brightness)
+ // } else {
+ // simulation_brightness.value = 0
+ // handleSimulationBrightness(0)
+ // }
}
}
@@ -183,6 +191,9 @@ onMounted(async () => {
if (res?.code == 200) {
coreList.value = res?.data?.list
}
+ setTimeout(() => {
+ websocketsend(openFlashLight)
+ }, 2000)
})
const onSubmit = async () => {
@@ -251,6 +262,7 @@ const handleStopCharacterRecognition = () => {
const handleGetCharacterRecognitionResult = () => {
if (isCameraOpen.value) {
// 如果相机打开则发送拍照,如果相机关闭 则提醒用户
+ loadingVisible.value = true
websocketsend(getCharacterRecognitionResult)
} else {
MessagePlugin('error', { content: '请先开启相机' })
@@ -348,15 +360,22 @@ const websocketonmessage = e => {
case 'getCharacterRecognitionResult':
const { result } = data
const { result: str, srcImagePath } = result || {}
+ loadingVisible.value = false
recognitionResult.value = `识别结果为${
str ? str : '空结果'
}, 图片保存路径为${srcImagePath}`
+ if (str) {
+ MessagePlugin.success('识别结果为' + str)
+ } else {
+ MessagePlugin.error('识别失败,结果为空')
+ }
break
default:
break
}
} else {
// MessagePlugin('error', { content: 'ws发送指令执行错误' })
+ loadingVisible.value = false
}
}
@@ -572,9 +591,9 @@ onUnmounted(() => {
background: #ebebeb;
}
.photo {
- flex: 1;
- width: 100%;
+ width: 835px;
border-radius: 6px;
+ object-fit: cover;
}
}
}
diff --git a/src/components/Task.vue b/src/components/Task.vue
index 7544e1b..34a38fc 100644
--- a/src/components/Task.vue
+++ b/src/components/Task.vue
@@ -449,6 +449,7 @@ export default {
'startCaptureFunc',
'handleSimulationBrightness',
'handleExposureTime',
+ 'startFlashLight',
],
components: {
PathPlan,
@@ -583,6 +584,11 @@ export default {
return
}
this.startCaptureFunc()
+ this.startFlashLight()
+ setTimeout(() => {
+ this.startFlashLight()
+ }, 1000)
+ // websocketsend(openFlashLight)
// 需要设置相机的参数 根据核堆id获取
const res = await getCameraConfig(row.nuclearCoreId)
if (res?.code == 200) {
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 2a555c0..c690cbc 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -314,6 +314,7 @@
{
+ websocketsend(openFlashLight)
+}
+
const handleExposureTime = value => {
websocketsend(setExposureTimeRaw(value))
}
diff --git a/src/service/request.js b/src/service/request.js
index 0f9304c..ec01160 100644
--- a/src/service/request.js
+++ b/src/service/request.js
@@ -55,7 +55,7 @@ class Request {
return res.data
},
err => {
- if (err.response.status == 403) {
+ if (err.response?.status == 403) {
// token超时
Cookie.clearAllCookie()
window.location.href = '/'