diff --git a/bj-rtss-message b/bj-rtss-message index a8fa6fe..5604ad8 160000 --- a/bj-rtss-message +++ b/bj-rtss-message @@ -1 +1 @@ -Subproject commit a8fa6fec188ad3df19952e298a1f846d581ca200 +Subproject commit 5604ad84ed5c6af4206937f5bbba9b2debfbfb6f diff --git a/src/drawApp/ibpDrawApp.ts b/src/drawApp/ibpDrawApp.ts index 81bc9cc..60cac6d 100644 --- a/src/drawApp/ibpDrawApp.ts +++ b/src/drawApp/ibpDrawApp.ts @@ -32,7 +32,6 @@ import { TextContentDraw } from 'src/graphics/textContent/TextContentDrawAssista import { IbpTextData } from './graphics/IbpTextInteraction'; import { MenuItemOptions } from 'src/jl-graphic/ui/Menu'; import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu'; -import { savePslDrawToServer } from './pslApp'; let drawApp: IDrawApp | null = null; const UndoOptions: MenuItemOptions = { @@ -107,6 +106,18 @@ export function initIBPDrawApp() { return drawApp; } +//所属集中站 +let uniqueIdPrefix = new ibpGraphicData.UniqueIdType(); +export function loadUniqueIdPrefix() { + return uniqueIdPrefix; +} + +export function setUniqueIdPrefix( + newUniqueIdPrefix: ibpGraphicData.UniqueIdType +) { + uniqueIdPrefix = newUniqueIdPrefix; +} + export function saveIBPDrawToServer(app: IDrawApp) { const base64 = saveIBPDrawDatas(app); const ibpDrawStore = useIBPDrawStore(); @@ -123,7 +134,7 @@ export function saveIBPDrawToServer(app: IDrawApp) { }); } -function saveIBPDrawDatas(app: IDrawApp) { +export function saveIBPDrawDatas(app: IDrawApp) { const storage = new ibpGraphicData.IBPGraphicStorage(); const canvasData = app.canvas.saveData(); storage.canvas = new graphicData.Canvas({ @@ -145,6 +156,7 @@ function saveIBPDrawDatas(app: IDrawApp) { storage.IBPTexts.push(g.saveData().data); } }); + storage.UniqueIdPrefix = uniqueIdPrefix; const base64 = fromUint8Array(storage.serialize()); return base64; } @@ -176,6 +188,9 @@ async function IBPDrawDataLoader() { storage.IBPTexts.forEach((ibpText) => { datas.push(new IbpTextData(ibpText)); }); + if (storage.UniqueIdPrefix) { + setUniqueIdPrefix(storage.UniqueIdPrefix); + } return { canvasProperty: storage.canvas, datas: datas, diff --git a/src/layouts/IBPDrawLayout.vue b/src/layouts/IBPDrawLayout.vue index f01daa7..8ed67b9 100644 --- a/src/layouts/IBPDrawLayout.vue +++ b/src/layouts/IBPDrawLayout.vue @@ -1,5 +1,5 @@