app增加打印保存数据和快捷键保存修复

This commit is contained in:
joylink_zhaoerwei 2023-09-08 15:54:34 +08:00
parent 1321437f02
commit 462c58d367
2 changed files with 6 additions and 2 deletions

View File

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

View File

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