diff --git a/src/api/inspection/map.js b/src/api/inspection/map.js new file mode 100644 index 0000000..ec8c562 --- /dev/null +++ b/src/api/inspection/map.js @@ -0,0 +1,33 @@ +import request from '@/utils/request' + + +export function getMapList(params) { + return request({ + url: '/inspection/map/list', + method: 'get', + params: params + }) +} + +export function addMap(data) { + return request({ + url: '/inspection/map', + method: 'post', + data: data + }) +} + +export function updateMap(data) { + return request({ + url: '/inspection/map', + method: 'put', + data: data + }) +} + +export function deleteMap(id) { + return request({ + url: `/inspection/map/${id}`, + method: 'delete' + }) +} \ No newline at end of file diff --git a/src/api/inspection/robot.js b/src/api/inspection/robot.js new file mode 100644 index 0000000..8844e22 --- /dev/null +++ b/src/api/inspection/robot.js @@ -0,0 +1,32 @@ +import request from '@/utils/request' + +export function getRobotList(params) { + return request({ + url: '/inspection/robot/list', + method: 'get', + params: params + }) +} + +export function addRobot(data) { + return request({ + url: '/inspection/robot', + method: 'post', + data: data + }) +} + +export function updateRobot(data) { + return request({ + url: '/inspection/robot', + method: 'put', + data: data + }) +} + +export function deleteRobot(id) { + return request({ + url: `/inspection/robot/${id}`, + method: 'delete' + }) +} \ No newline at end of file diff --git a/src/main.js b/src/main.js index f52695b..5630a13 100644 --- a/src/main.js +++ b/src/main.js @@ -88,7 +88,7 @@ app.use(ElementPlus, { app.use(WebSocketPlugin, { // url: import.meta.env.VITE_WS_URL, - url: 'ws://192.168.0.100:13080/ws', + url: 'ws://192.168.0.114:13080/ws', // url: 'ws://10.148.209.5:13080/ws', userId: 'your_user_id' }); diff --git a/src/store/modules/inspection.js b/src/store/modules/inspection.js index f9b12fc..08efa03 100644 --- a/src/store/modules/inspection.js +++ b/src/store/modules/inspection.js @@ -9,7 +9,7 @@ export const useInspectionStore = defineStore('inspection', { camera: { // 相机参数 centerX: 0, // 相机中心的世界坐标 X centerY: 0, // 相机中心的世界坐标 Y - pixelsPerMeter: 40, // 缩放:每米对应的屏幕像素数 + pixelsPerMeter: 20, // 缩放:每米对应的屏幕像素数 }, canvasWidthPx: 0, // Canvas CSS 逻辑宽度(像素) canvasHeightPx: 0, // Canvas CSS 逻辑高度(像素) diff --git a/src/views/inspection/cockpit/components/MapCanvas.vue b/src/views/inspection/cockpit/components/MapCanvas.vue index bf6ebb1..0cfffc6 100644 --- a/src/views/inspection/cockpit/components/MapCanvas.vue +++ b/src/views/inspection/cockpit/components/MapCanvas.vue @@ -153,7 +153,7 @@ async function loadMapIntoApplication(parsedMap) { const worldHeightMeters = parsedMap.maxY - parsedMap.originY; // 地图世界高度 const fitScaleX = inspectionStore.canvasWidthPx / worldWidthMeters; // 水平方向恰好填满的缩放 const fitScaleY = inspectionStore.canvasHeightPx / worldHeightMeters; // 垂直方向恰好填满的缩放 - inspectionStore.camera.pixelsPerMeter = Math.max(1, Math.min(fitScaleX, fitScaleY) * 0.88); // 取较小值并留12%边距 + inspectionStore.camera.pixelsPerMeter = Math.max(1, Math.min(fitScaleX, fitScaleY) * 1); // 取较小值 // 标记加载完成并更新UI applicationState.isMapLoaded = true; diff --git a/src/views/inspection/flow/index.vue b/src/views/inspection/flow/index.vue index 1e21e79..6531b30 100644 --- a/src/views/inspection/flow/index.vue +++ b/src/views/inspection/flow/index.vue @@ -1,3 +1,307 @@ \ No newline at end of file +
+
+ + + + + + + 新增 + + + + +
+ +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + diff --git a/src/views/inspection/map/index.vue b/src/views/inspection/map/index.vue index f5c8126..c8c20c0 100644 --- a/src/views/inspection/map/index.vue +++ b/src/views/inspection/map/index.vue @@ -1,12 +1,12 @@