From 462c58d3673db3acc7af524603192c8d100280e2 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Fri, 8 Sep 2023 15:54:34 +0800 Subject: [PATCH] =?UTF-8?q?app=E5=A2=9E=E5=8A=A0=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=95=B0=E6=8D=AE=E5=92=8C=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E9=94=AE=E4=BF=9D=E5=AD=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/drawApp/jkApp.ts | 4 +++- src/drawApp/thApp.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/drawApp/jkApp.ts b/src/drawApp/jkApp.ts index 8682009..e3a1933 100644 --- a/src/drawApp/jkApp.ts +++ b/src/drawApp/jkApp.ts @@ -36,6 +36,7 @@ import { initCommonDrawApp, saveCommonDrawDatas, loadCommonDrawDatas, + saveDrawToServer, } from './commonApp'; import { Notify } from 'quasar'; import { generateCalculateLink } from 'src/api/GenerateApi'; @@ -110,7 +111,7 @@ export function initJkDrawApp(): IDrawApp { global: true, combinations: [CombinationKey.Ctrl], onPress: () => { - saveJkDrawDatas(app); + saveDrawToServer(saveJkDrawDatas(app)); }, }) ); @@ -154,6 +155,7 @@ export async function loadJkDrawDatas(): Promise { export function saveJkDrawDatas(app: IDrawApp) { const storage = saveCommonDrawDatas(app); + console.log(storage, '保存数据'); const graphics = app.queryStore.getAllGraphics(); graphics.forEach((g) => { if (SectionLink.Type === g.type) { diff --git a/src/drawApp/thApp.ts b/src/drawApp/thApp.ts index b0fb2f0..dc859e1 100644 --- a/src/drawApp/thApp.ts +++ b/src/drawApp/thApp.ts @@ -27,6 +27,7 @@ import { initCommonDrawApp, saveCommonDrawDatas, loadCommonDrawDatas, + saveDrawToServer, } from './commonApp'; let thDrawApp: IDrawApp | null = null; @@ -85,7 +86,7 @@ export function initThDrawApp(): IDrawApp { global: true, combinations: [CombinationKey.Ctrl], onPress: () => { - saveThDrawDatas(app); + saveDrawToServer(saveThDrawDatas(app)); }, }) ); @@ -126,6 +127,7 @@ export async function loadThDrawDatas(): Promise { export function saveThDrawDatas(app: IDrawApp) { const storage = saveCommonDrawDatas(app); + console.log(storage, '保存数据'); const graphics = app.queryStore.getAllGraphics(); graphics.forEach((g) => { if (TrackSection.Type === g.type) {