From 74c97d077b231e0ec353eace46b26292f81e8233 Mon Sep 17 00:00:00 2001 From: chndfang Date: Sun, 8 Jun 2025 16:36:57 +0800 Subject: [PATCH] feat: change ws prefix --- .env.production | 2 +- src/apis/robot/api.ts | 2 +- src/services/editor.service.ts | 3 +++ vite.config.ts | 12 ++++++------ 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.env.production b/.env.production index 47bfa43..bf43d52 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ ENV_APP_TITLE=大众一汽发动机AMR调度系统 ENV_HTTP_BASE=/jeecg-boot/ -ENV_WEBSOCKET_BASE=/ws \ No newline at end of file +ENV_WEBSOCKET_BASE=/jeecg-boot/ \ No newline at end of file diff --git a/src/apis/robot/api.ts b/src/apis/robot/api.ts index 35f6cdb..58a4e2e 100644 --- a/src/apis/robot/api.ts +++ b/src/apis/robot/api.ts @@ -8,7 +8,7 @@ const enum API { 注册机器人 = '/robot/register', 批量抢占控制权 = '/robot/seizeByIds', - 同步组文件 = 'robot/syncByGroupId', + 同步组文件 = '/robot/syncByGroupId', } export async function getAllRobots(): Promise> { diff --git a/src/services/editor.service.ts b/src/services/editor.service.ts index 7d36dfa..187aada 100644 --- a/src/services/editor.service.ts +++ b/src/services/editor.service.ts @@ -230,6 +230,9 @@ export class EditorService extends Meta2d { const robot = this.getRobotById(id); if (isNil(robot)) return; this.#robotMap.set(id, { ...robot, ...value }); + if (value.label) { + this.setValue({ id, text: value.label }, { render: true, history: false, doEvent: false }); + } (this.store.data).robots = [...this.#robotMap.values()]; } diff --git a/vite.config.ts b/vite.config.ts index dac2afa..7e158c1 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -48,12 +48,12 @@ export default ({ mode }: Record) => rewrite: (path) => path.replace(/^\/api/, ''), changeOrigin: true, }, - // '/ws/': { - // target: 'ws://82.157.33.186:26981/jeecg-boot', - // rewrite: (path) => path.replace(/^\/ws/, ''), - // changeOrigin: true, - // ws: true, - // }, + '/ws/': { + target: 'ws://82.156.39.91:18080/jeecg-boot', + rewrite: (path) => path.replace(/^\/ws/, ''), + changeOrigin: true, + ws: true, + }, }, }, });