Commit 7cb7b6c1 authored by rockyl's avatar rockyl

去掉压缩

parent a0f0edff
...@@ -98,6 +98,7 @@ export const projectStore = { ...@@ -98,6 +98,7 @@ export const projectStore = {
creator: '', creator: '',
operator: '', operator: '',
operators: '', operators: '',
update_time: '',
data: { data: {
options: {}, options: {},
views: [], views: [],
...@@ -126,10 +127,12 @@ export const projectStore = { ...@@ -126,10 +127,12 @@ export const projectStore = {
}, },
updateProject(state, project) { updateProject(state, project) {
const {id, name, creator, data} = project; const {id, name, creator, data, operators, update_time} = project;
state.id = id; state.id = id;
state.name = name; state.name = name;
state.creator = creator; state.creator = creator;
state.operators = operators;
state.update_time = update_time;
const localData = state.data; const localData = state.data;
if (data) { if (data) {
...@@ -502,9 +505,9 @@ export const projectStore = { ...@@ -502,9 +505,9 @@ export const projectStore = {
}, },
getters: { getters: {
project(state) { project(state) {
const {id, name, creator, data} = state; const {id, name, creator, data, update_time} = state;
return { return {
id, name, creator, id, name, creator, update_time,
data: JSON.stringify(data), data: JSON.stringify(data),
}; };
}, },
...@@ -671,7 +674,9 @@ export const projectStore = { ...@@ -671,7 +674,9 @@ export const projectStore = {
} }
}, },
async saveToRemote({state, dispatch, getters}, {remark}) { async saveToRemote({state, dispatch, getters}, {remark}) {
await projectApi.saveOne(getters.project, remark); console.log(getters.project);
let result = await projectApi.saveOne(getters.project, remark);
console.log(result);
dispatch('deleteLocalVersion', state.id); dispatch('deleteLocalVersion', state.id);
}, },
async updateProject({commit}, projectID) { async updateProject({commit}, projectID) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment