优化渲染速度
This commit is contained in:
parent
57c1e09fc4
commit
c94cc11ef8
@ -32,21 +32,23 @@ export default {
|
|||||||
},
|
},
|
||||||
project_id(id) {
|
project_id(id) {
|
||||||
if (id > 0) {
|
if (id > 0) {
|
||||||
this.$store.state.projectId = $A.runNum(id);
|
setTimeout(() => {
|
||||||
this.$store.dispatch("getProjectOne", id).then(() => {
|
this.$store.state.projectId = $A.runNum(id);
|
||||||
this.$store.dispatch("getColumns", id);
|
this.$store.dispatch("getProjectOne", id).then(() => {
|
||||||
this.$store.dispatch("getTasks", {project_id: id});
|
this.$store.dispatch("getColumns", id);
|
||||||
}).catch(({msg}) => {
|
this.$store.dispatch("getTasks", {project_id: id});
|
||||||
$A.modalWarning({
|
}).catch(({msg}) => {
|
||||||
content: msg,
|
$A.modalWarning({
|
||||||
onOk: () => {
|
content: msg,
|
||||||
const project = this.$store.state.projects.find(({id}) => id);
|
onOk: () => {
|
||||||
if (project) {
|
const project = this.$store.state.projects.find(({id}) => id);
|
||||||
$A.goForward({path: '/manage/project/' + project.id});
|
if (project) {
|
||||||
} else {
|
$A.goForward({path: '/manage/project/' + project.id});
|
||||||
$A.goForward({path: '/manage/dashboard'});
|
} else {
|
||||||
|
$A.goForward({path: '/manage/dashboard'});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
2
resources/assets/js/store/getters.js
vendored
2
resources/assets/js/store/getters.js
vendored
@ -26,7 +26,7 @@ export default {
|
|||||||
return a.id - b.id;
|
return a.id - b.id;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
return project;
|
return Object.freeze(project);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user