diff --git a/src/drawApp/relayCabinetGraphics/RelayInteraction.ts b/src/drawApp/relayCabinetGraphics/RelayInteraction.ts index e0ea7d6..d0a3d56 100644 --- a/src/drawApp/relayCabinetGraphics/RelayInteraction.ts +++ b/src/drawApp/relayCabinetGraphics/RelayInteraction.ts @@ -92,8 +92,8 @@ export class RelayState extends GraphicStateBase implements IRelayState { const setOpen: MenuItemOptions = { name: '驱动落下' }; const setClose: MenuItemOptions = { name: '驱动吸起' }; -const RelayOperationMenu: ContextMenu = ContextMenu.init({ - name: 'Turnout操作', +export const RelayOperationMenu: ContextMenu = ContextMenu.init({ + name: 'Relay操作', groups: [{ items: [setOpen, setClose] }], }); diff --git a/src/layouts/LineLayout.vue b/src/layouts/LineLayout.vue index 5b83978..71aff5c 100644 --- a/src/layouts/LineLayout.vue +++ b/src/layouts/LineLayout.vue @@ -59,6 +59,7 @@ import { ApiError } from 'src/boot/axios'; import { layerList } from 'src/drawApp/lineScene'; import { IGraphicScene } from 'src/jl-graphic'; import { ISceneName, getSceneName } from 'src/drawApp/lineApp'; +import { RelayOperationMenu } from 'src/drawApp/relayCabinetGraphics/RelayInteraction'; const $q = useQuasar(); const canvasWidth = ref(0); @@ -191,6 +192,7 @@ function switchScene(val: MapInfo) { sceneName = getSceneNameFn(val); lineStore.setSceneName(sceneName); scene = lineApp.getScene(sceneName); + scene.registerMenu(RelayOperationMenu); const dom = document.getElementById('line-app-container'); if (dom) { scene.bindDom(dom);