优化保存恢复功能
This commit is contained in:
parent
08148209e7
commit
d901594c16
Binary file not shown.
@ -12,10 +12,10 @@ export let saveDelay = 1000;
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} file
|
* @param {string} file
|
||||||
* @param {*} payload
|
* @param {any} payload
|
||||||
*/
|
*/
|
||||||
export async function saveView(file, payload) {
|
export async function saveView(file, payload) {
|
||||||
if (payload.waves === undefined || payload.waves.length === 0) {
|
if (payload === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mode === 'debug') {
|
if (mode === 'debug') {
|
||||||
|
@ -6,6 +6,7 @@ import { BSON } from "bson";
|
|||||||
import { Id2Pivot, orderedTimes, UserPivots } from "@/components/pivot/pivot-view";
|
import { Id2Pivot, orderedTimes, UserPivots } from "@/components/pivot/pivot-view";
|
||||||
import { TreeviewExpandSignals } from "@/components/treeview/modules";
|
import { TreeviewExpandSignals } from "@/components/treeview/modules";
|
||||||
import { controlPanel } from "@/components/right-nav";
|
import { controlPanel } from "@/components/right-nav";
|
||||||
|
import { saveViewApi } from "@/api";
|
||||||
|
|
||||||
export const recoverConfig = {
|
export const recoverConfig = {
|
||||||
/**
|
/**
|
||||||
@ -228,6 +229,16 @@ export function recoverSession(topModules) {
|
|||||||
recoverConfig.treeviewExpands = null;
|
recoverConfig.treeviewExpands = null;
|
||||||
recoverConfig.waves = null;
|
recoverConfig.waves = null;
|
||||||
recoverConfig.rightNavIndex = null;
|
recoverConfig.rightNavIndex = null;
|
||||||
|
|
||||||
|
// 更新后端缓存
|
||||||
|
saveViewApi({
|
||||||
|
waves: true,
|
||||||
|
views: true,
|
||||||
|
state: true,
|
||||||
|
pivots: true,
|
||||||
|
treeviewExpands: true,
|
||||||
|
rightNavIndex: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user