Browse Source

缓存页面大小修复

wucl 11 months ago
parent
commit
a26e18dbd1
2 changed files with 6 additions and 2 deletions
  1. 3 1
      src/views/personal/pendingList.vue
  2. 3 1
      src/views/personal/todoList.vue

+ 3 - 1
src/views/personal/pendingList.vue

@@ -147,13 +147,15 @@ export default {
   },
 
   created() {
-    this.listQuery.size = parseInt(getCookie('PersonalPendingList'));
     this.listQuery.keyword = this.$route.query.keyword;
     this.getPage();
     this.getNodeEnum();
   },
   methods: {
     getPage() {
+      if (getCookie('PersonalPendingList') != undefined){
+        this.listQuery.size = parseInt(getCookie('PersonalPendingList'));
+      }
       this.$api.personal.list(this.listQuery).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;

+ 3 - 1
src/views/personal/todoList.vue

@@ -262,7 +262,9 @@ export default {
   },
   methods: {
     getPage() {
-      this.listQuery.size = parseInt(getCookie('personalTodoList'));
+      if (getCookie('personalTodoList')!= undefined){
+        this.listQuery.size = parseInt(getCookie('personalTodoList'));
+      }
       this.$api.workNodeTaskRecord.personalTaskTodoList(this.listQuery).then(res=>{
         if (res.code ===200){
             this.pageData = res.data;