Browse Source

自定义路径不变

master
maochaoying 2 years ago
parent
commit
668962c9d9
  1. 6
      .env
  2. 2
      src/components/Task.vue
  3. 24
      src/mock/ws.cjs

6
.env

@ -13,6 +13,6 @@
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
VITE_WEBSOCKET_CAMERA_URL=ws://127.0.0.1:8899/websocket/nuclear
VITE_WEBSOCKET_CAMERA_URL=ws://192.168.1.111:8081/ws/cmd
VITE_HOST_URL=http://192.168.1.111:8081/
# VITE_WEBSOCKET_CAMERA_URL=ws://127.0.0.1:8899/websocket/nuclear
VITE_WEBSOCKET_CAMERA_URL=ws://192.168.1.111:8899/ws/cmd
VITE_HOST_URL=http://192.168.1.111:8899/

2
src/components/Task.vue

@ -158,7 +158,7 @@ export default {
{ {
colKey: 'taskName', colKey: 'taskName',
title: '任务名称', title: '任务名称',
width: 120,
width: 160,
}, },
{ {
colKey: 'operatorName', colKey: 'operatorName',

24
src/mock/ws.cjs

@ -6,18 +6,18 @@ server.on('connection', socket => {
socket.on('message', message => { socket.on('message', message => {
console.log(`Received message => ${message}`) console.log(`Received message => ${message}`)
let msg = {
command: 'detection_completed',
result: {
imgUrl:
'https://www.whyknown.com/static/img/5e713df34d58da23e47fe08ee3634440.clipboard-2022-09-16.png',
detection_result_top: 'YQT0DB',
detection_result_bottom: 'FBNA0T1E',
taskId: '21',
coord: '1-6',
},
}
socket.send(JSON.stringify(msg))
// let msg = {
// command: 'detection_completed',
// result: {
// imgUrl:
// 'https://www.whyknown.com/static/img/5e713df34d58da23e47fe08ee3634440.clipboard-2022-09-16.png',
// detection_result_top: 'YQT0DB',
// detection_result_bottom: 'FBNA0T1E',
// taskId: '21',
// coord: '1-6',
// },
// }
// socket.send(JSON.stringify(msg))
}) })
socket.on('close', () => { socket.on('close', () => {

Loading…
Cancel
Save