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) {