From 599de6682c7c19cc5763346da6c68743f8a7dfdb Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Fri, 13 Sep 2024 10:13:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0protobuf=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/drawApp/drawApp.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/package.json b/package.json index 187a4a0..f283802 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "axios": "^1.2.1", "pinia": "^2.0.11", "js-base64": "^3.7.5", + "google-protobuf": "^3.21.2", "jl-graphic": "git+http://120.46.212.6:3000/joylink/graphic-pixi.git#v0.1.15" }, "devDependencies": { diff --git a/src/drawApp/drawApp.ts b/src/drawApp/drawApp.ts index a1c7d94..798160e 100644 --- a/src/drawApp/drawApp.ts +++ b/src/drawApp/drawApp.ts @@ -10,6 +10,8 @@ import { newDrawApp, } from 'jl-graphic'; import { useDrawStore } from 'src/stores/draw-store'; +// import { graphicData } from 'src/protos/stationLayoutGraphics'; +import { iscsGraphicData } from 'src/protos/iscs_graphic_data'; // import { Notify } from 'quasar'; @@ -144,3 +146,14 @@ export function saveDrawToServer(base64: string) { } console.log('save' + base64); } + +let UniqueIdPrefix = new iscsGraphicData.UniqueIdOfStationLayout(); +export function loadUniqueIdPrefix() { + return UniqueIdPrefix; +} + +export function setUniqueIdPrefix( + newUniqueIdPrefix: iscsGraphicData.UniqueIdOfStationLayout +) { + UniqueIdPrefix = newUniqueIdPrefix; +}