From f260d83923396483f39860b8e34baa69c3c9019a Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sat, 11 Dec 2021 23:08:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BC=93=E5=AD=98=E6=9C=BA?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/pages/manage.vue | 3 --- resources/assets/js/store/actions.js | 36 ---------------------------- resources/assets/js/store/state.js | 15 ++++++------ 3 files changed, 8 insertions(+), 46 deletions(-) diff --git a/resources/assets/js/pages/manage.vue b/resources/assets/js/pages/manage.vue index a49d3cc2..4ac184f2 100644 --- a/resources/assets/js/pages/manage.vue +++ b/resources/assets/js/pages/manage.vue @@ -217,9 +217,6 @@ export default { }, mounted() { - this.$store.state.method.clearLocal(); - this.$store.dispatch("saveUserInfo", this.userInfo); - // this.$store.dispatch("getUserInfo"); this.$store.dispatch("getTaskPriority"); // diff --git a/resources/assets/js/store/actions.js b/resources/assets/js/store/actions.js index 338c4593..470bba72 100644 --- a/resources/assets/js/store/actions.js +++ b/resources/assets/js/store/actions.js @@ -278,9 +278,6 @@ export default { } state.cacheUserActive = Object.assign(data, {__:Math.random()}); Store.set('cacheUserActive', data); - setTimeout(() => { - state.method.setStorage("cacheUserBasic", state.cacheUserBasic); - }) }, /** @@ -408,9 +405,6 @@ export default { } else { state.projects.push(data); } - setTimeout(() => { - state.method.setStorage("cacheProjects", state.cacheProjects = state.projects); - }) } }, @@ -432,9 +426,6 @@ export default { $A.goForward({path: '/manage/dashboard'}); } } - setTimeout(() => { - state.method.setStorage("cacheProjects", state.cacheProjects = state.projects); - }) }, /** @@ -618,9 +609,6 @@ export default { } else { state.columns.push(data); } - setTimeout(() => { - state.method.setStorage("cacheColumns", state.cacheColumns = state.columns); - }) } }, @@ -636,9 +624,6 @@ export default { dispatch('getProjectOne', state.columns[index].project_id) state.columns.splice(index, 1); } - setTimeout(() => { - state.method.setStorage("cacheColumns", state.cacheColumns = state.columns); - }) }, /** @@ -734,14 +719,6 @@ export default { if (data.is_update_content) { dispatch("getTaskContent", data.id); } - // - setTimeout(() => { - if (key == 'taskSubs') { - state.method.setStorage("cacheTaskSubs", state.cacheTaskSubs = state[key]); - } else { - state.method.setStorage("cacheTasks", state.cacheTasks = state[key]); - } - }) } }, @@ -770,13 +747,6 @@ export default { if (state.taskId == task_id) { state.taskId = 0; } - setTimeout(() => { - if (key == 'taskSubs') { - state.method.setStorage("cacheTaskSubs", state.cacheTaskSubs = state[key]); - } else { - state.method.setStorage("cacheTasks", state.cacheTasks = state[key]); - } - }) }, /** @@ -1176,9 +1146,6 @@ export default { } else { state.dialogs.push(data); } - setTimeout(() => { - state.method.setStorage("cacheDialogs", state.cacheDialogs = state.dialogs); - }) } }, @@ -1313,9 +1280,6 @@ export default { } else { state.dialogMsgs.push(data); } - setTimeout(() => { - state.method.setStorage("cacheDialogMsgs", state.cacheDialogMsgs = state.dialogMsgs); - }) } }, diff --git a/resources/assets/js/store/state.js b/resources/assets/js/store/state.js index 899e9679..2f35a1d3 100644 --- a/resources/assets/js/store/state.js +++ b/resources/assets/js/store/state.js @@ -266,15 +266,16 @@ state.cacheLoading = {}; // User state.cacheUserActive = {}; state.cacheUserWait = []; -state.cacheUserBasic = state.method.getStorageArray("cacheUserBasic"); +state.cacheUserBasic = []; // Dialog -state.cacheDialogs = state.method.getStorageArray("cacheDialogs"); -state.cacheDialogMsgs = state.method.getStorageArray("cacheDialogMsgs"); +state.cacheDialogs = []; +state.cacheDialogMsgs = []; // Project -state.cacheProjects = state.method.getStorageArray("cacheProjects"); -state.cacheColumns = state.method.getStorageArray("cacheColumns"); -state.cacheTasks = state.method.getStorageArray("cacheTasks"); -state.cacheTaskSubs = state.method.getStorageArray("cacheTaskSubs"); +state.cacheProjects = []; +state.cacheColumns = []; +state.cacheTasks = []; +state.cacheTaskSubs = []; +// TablePanel state.cacheTablePanel = state.method.getStorageArray("cacheTablePanel"); // Ajax