diff --git a/src/drawApp/commonApp.ts b/src/drawApp/commonApp.ts
index d07fcba..b7da6b4 100644
--- a/src/drawApp/commonApp.ts
+++ b/src/drawApp/commonApp.ts
@@ -223,12 +223,16 @@ export function initCommonDrawApp(app: IDrawApp) {
};
DefaultCanvasMenu.open(e.global);
});
+ app.on('destroy', async () => {
+ UniqueIdPrefix = new graphicData.UniqueIdType();
+ });
}
export function loadCommonDrawDatas(
storage: graphicData.RtssGraphicStorage
): GraphicData[] {
const datas: GraphicData[] = [];
+ UniqueIdPrefix = storage.UniqueIdPrefix;
storage.Platforms.forEach((platform) => {
datas.push(new PlatformData(platform));
});
@@ -349,6 +353,7 @@ export function saveCommonDrawDatas(app: IDrawApp) {
storage.curvatures.push((curvatureData as CurvatureData).data);
}
});
+ storage.UniqueIdPrefix = UniqueIdPrefix;
return storage;
}
@@ -392,3 +397,13 @@ export function saveDrawToServer(base64: string) {
errorNotify(err.message, err);
});
}
+
+//UniqueId
+let UniqueIdPrefix = new graphicData.UniqueIdType();
+export function loadUniqueIdPrefix() {
+ return UniqueIdPrefix;
+}
+
+export function setUniqueIdPrefix(newUniqueIdPrefix: graphicData.UniqueIdType) {
+ UniqueIdPrefix = newUniqueIdPrefix;
+}
diff --git a/src/drawApp/relayCabinetLayoutApp.ts b/src/drawApp/relayCabinetLayoutApp.ts
index ce1811f..09c1104 100644
--- a/src/drawApp/relayCabinetLayoutApp.ts
+++ b/src/drawApp/relayCabinetLayoutApp.ts
@@ -278,11 +278,11 @@ export function deleteDeviceRelateRelay(row: RelateRelaylistItem) {
//所属集中站
let UniqueIdPrefix = new relayCabinetGraphicData.UniqueIdType();
-export function loadBelongsStation() {
+export function loadUniqueIdPrefix() {
return UniqueIdPrefix;
}
-export function setBelongsStation(
+export function setUniqueIdPrefix(
newUniqueIdPrefix: relayCabinetGraphicData.UniqueIdType
) {
UniqueIdPrefix = newUniqueIdPrefix;
diff --git a/src/layouts/DrawLayout.vue b/src/layouts/DrawLayout.vue
index f3ea835..4297c3f 100644
--- a/src/layouts/DrawLayout.vue
+++ b/src/layouts/DrawLayout.vue
@@ -100,13 +100,53 @@
+
+
+
+ UniqueId配置
+
+
+
+
+
+
+
+
+
+
+
+