Merge branch 'master' of http://192.168.189.2:8418/sunLong/web-amr
This commit is contained in:
commit
f4136aaee6
@ -8,7 +8,7 @@ const enum API {
|
||||
注册机器人 = '/robot/register',
|
||||
|
||||
批量抢占控制权 = '/robot/seizeByIds',
|
||||
同步组文件 = 'robot/syncByGroupId',
|
||||
同步组文件 = '/robot/syncByGroupId',
|
||||
}
|
||||
|
||||
export async function getAllRobots(): Promise<Array<RobotInfo>> {
|
||||
|
@ -52,24 +52,6 @@ onMounted(async () => {
|
||||
await readScene();
|
||||
await editor.value?.initRobots();
|
||||
await monitorScene();
|
||||
|
||||
// const id = 'mock-robot-1';
|
||||
// let x = 800;
|
||||
// let y = 500;
|
||||
// const active = true;
|
||||
// const angle = -90;
|
||||
// const path = <[number, number][]>[
|
||||
// [600, 500],
|
||||
// [100, 400],
|
||||
// ];
|
||||
// editor.value?.refreshRobot(id, { x, y, active, angle, path });
|
||||
// const test = () =>
|
||||
// requestAnimationFrame(() => {
|
||||
// x -= 0.1;
|
||||
// editor.value?.refreshRobot(id, { x, y });
|
||||
// test();
|
||||
// });
|
||||
// test();
|
||||
});
|
||||
onUnmounted(() => {
|
||||
client.value?.close();
|
||||
|
@ -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 });
|
||||
}
|
||||
(<SceneData>this.store.data).robots = [...this.#robotMap.values()];
|
||||
}
|
||||
|
||||
@ -401,7 +404,7 @@ export class EditorService extends Meta2d {
|
||||
): Required<Pick<MapPen, 'image' | 'iconWidth' | 'iconHeight' | 'iconTop'>> {
|
||||
const theme = this.data().theme;
|
||||
const image =
|
||||
import.meta.env.BASE_URL + active ? `/robot/${type}-active-${theme}.png` : `/robot/${type}-${theme}.png`;
|
||||
import.meta.env.BASE_URL + (active ? `/robot/${type}-active-${theme}.png` : `/robot/${type}-${theme}.png`);
|
||||
return { image, iconWidth: 34, iconHeight: 54, iconTop: -5 };
|
||||
}
|
||||
//#endregion
|
||||
|
@ -48,12 +48,12 @@ export default ({ mode }: Record<string, unknown>) =>
|
||||
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,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user