diff --git a/src/drawApp/ibpDrawApp.ts b/src/drawApp/ibpDrawApp.ts index 88f457b..1f3920b 100644 --- a/src/drawApp/ibpDrawApp.ts +++ b/src/drawApp/ibpDrawApp.ts @@ -171,6 +171,27 @@ export function saveIBPDrawDatas(app: IDrawApp) { storage.ibpLights.push(g.saveData().data); } }); + storage.ibpButtons.forEach((item) => { + item.common.newId = +item.common.id; + }); + storage.ibpAlarms.forEach((item) => { + item.common.newId = +item.common.id; + }); + storage.ibpKeys.forEach((item) => { + item.common.newId = +item.common.id; + }); + storage.ibpArrows.forEach((item) => { + item.common.newId = +item.common.id; + }); + storage.IBPTexts.forEach((item) => { + item.common.newId = +item.common.id; + }); + storage.ibpStationTexts.forEach((item) => { + item.common.newId = +item.common.id; + }); + storage.ibpLights.forEach((item) => { + item.common.newId = +item.common.id; + }); storage.ibpRelatedDevices = ibpRelatedDeviceList; const base64 = fromUint8Array(storage.serialize()); return base64; diff --git a/src/drawApp/pslApp.ts b/src/drawApp/pslApp.ts index 1a5a4ef..f82a9e7 100644 --- a/src/drawApp/pslApp.ts +++ b/src/drawApp/pslApp.ts @@ -185,6 +185,18 @@ export function savePslDrawDatas(app: IDrawApp) { storage.pslTexts.push((pslTextData as PslTextData).data); } }); + storage.pslLights.forEach((item) => { + item.common.newId = +item.common.id; + }); + storage.pslButtons.forEach((item) => { + item.common.newId = +item.common.id; + }); + storage.pslKeys.forEach((item) => { + item.common.newId = +item.common.id; + }); + storage.pslTexts.forEach((item) => { + item.common.newId = +item.common.id; + }); storage.gatedRelateDeviceList = refDevicesList; const base64 = fromUint8Array(storage.serialize()); console.log('保存数据', storage);