From f3cf800aa1c4a86afd44380c69fd9b120ec9411e Mon Sep 17 00:00:00 2001 From: xudan Date: Fri, 10 Oct 2025 17:28:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=92=8C=E7=BB=84=E4=BB=B6=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=EF=BC=8C=E8=B0=83=E6=95=B4=E5=8F=82=E6=95=B0=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=BB=A5=E5=A2=9E=E5=BC=BA=E7=B1=BB=E5=9E=8B=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/amr/api.ts | 2 +- src/components/PlaybackController.vue | 2 +- src/components/modal/ExportConverterModal.vue | 8 ++++---- src/components/modal/MapConverterModal.vue | 2 +- src/pages/group-editor.vue | 2 +- src/pages/scene-editor.vue | 1 - 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/apis/amr/api.ts b/src/apis/amr/api.ts index 6de9941..dd1cfac 100644 --- a/src/apis/amr/api.ts +++ b/src/apis/amr/api.ts @@ -4,7 +4,7 @@ const enum API { // 控制接口 - 只包含右键菜单需要的 控制AMR = '/amr/control', 抢占控制权 = '/amr/controlAmr', - // 设置接单状态 = '/amr/acceptTask', + 设置接单状态 = '/amr/acceptTask', 手动发布充电任务 = '/amr/manuallSetCharging', } diff --git a/src/components/PlaybackController.vue b/src/components/PlaybackController.vue index 1a1a6c9..5b42d41 100644 --- a/src/components/PlaybackController.vue +++ b/src/components/PlaybackController.vue @@ -136,7 +136,7 @@ const setUserInteraction = () => { }, 2000); // 2秒内,用户的操作优先 }; -const handleHourChange = (newHour: number) => { +const handleHourChange = (newHour: any) => { setUserInteraction(); selectedHour.value = newHour; const newTime = newHour * HOUR_IN_MS; diff --git a/src/components/modal/ExportConverterModal.vue b/src/components/modal/ExportConverterModal.vue index 3fa6524..6890273 100644 --- a/src/components/modal/ExportConverterModal.vue +++ b/src/components/modal/ExportConverterModal.vue @@ -6,10 +6,10 @@ import { computed, reactive, type Ref, ref, watch } from 'vue'; // --- Type Definitions --- interface IrayParams { - mapWidth: number | null; - mapHeight: number | null; - xAttrMin: number | null; - yAttrMin: number | null; + mapWidth: number; + mapHeight: number; + xAttrMin: number; + yAttrMin: number; } export type ExportFormat = 'smap' | 'iray'; diff --git a/src/components/modal/MapConverterModal.vue b/src/components/modal/MapConverterModal.vue index ddc24b8..c541295 100644 --- a/src/components/modal/MapConverterModal.vue +++ b/src/components/modal/MapConverterModal.vue @@ -108,7 +108,7 @@ const convertMap = async (convertType: string, formData: FormData) => { // 如果是iray转换,需要特殊处理二进制响应 if (convertType === 'iray') { - const response = await http.post(apiUrl, formData, { + const response = await http.post(apiUrl, formData, { headers: { 'Content-Type': 'multipart/form-data' }, responseType: 'blob', }); diff --git a/src/pages/group-editor.vue b/src/pages/group-editor.vue index 789e0b8..20aa12b 100644 --- a/src/pages/group-editor.vue +++ b/src/pages/group-editor.vue @@ -42,7 +42,7 @@ const container = shallowRef(); const editor = shallowRef(); provide(EDITOR_KEY, editor); onMounted(() => { - editor.value = new EditorService(container.value!); + editor.value = new EditorService(container.value!, props.sid); }); const editable = ref(false); diff --git a/src/pages/scene-editor.vue b/src/pages/scene-editor.vue index 84e4ecc..86574fa 100644 --- a/src/pages/scene-editor.vue +++ b/src/pages/scene-editor.vue @@ -230,7 +230,6 @@ const handleExportConfirm = async (payload: ExportConfirmPayload) => { }); await exportSceneToSmap(sceneFile, payload.smapFile, payload.smapFile.name.replace(/\.smap$/i, '')); } else if (payload.format === 'iray') { - // @ts-expect-error iray params are not typed await convertSceneToIray(sceneJson, payload.smapFile, title.value || 'unknown', payload.irayParams); } };