Parcourir la source

缓存页面大小修复

wucl il y a 11 mois
Parent
commit
a26e18dbd1
2 fichiers modifiés avec 6 ajouts et 2 suppressions
  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;