Преглед изворни кода

'编辑后刷新列表依据当前页码'

Rorschach пре 6 година
родитељ
комит
cc6de6ac79
2 измењених фајлова са 7 додато и 4 уклоњено
  1. 3 2
      src/pages/manage/cost.vue
  2. 4 2
      src/pages/manage/index.vue

+ 3 - 2
src/pages/manage/cost.vue

@@ -328,6 +328,7 @@ export default {
       }).then(res => {
         this.manageData = res.data.content;
         this.totalNumber = parseInt(res.data.totalElements);
+        this.pageNo = val;
       });
     },
     tableRowClassName({ row, rowIndex }) {
@@ -420,7 +421,7 @@ export default {
               //获取经营列表
               getManageList({
                 type: "COST",
-                pageNo: 1,
+                pageNo: this.pageNo,
                 pageSize: 50,
                 isEntry: true
               }).then(res => {
@@ -439,7 +440,7 @@ export default {
               //获取经营列表
               getManageList({
                 type: "COST",
-                pageNo: 1,
+                pageNo: this.pageNo,
                 pageSize: 50,
                 startTime: this.searchFlag ? this.searchForm.startTime : null,
                 endTime: this.searchFlag ? this.searchForm.endTime : null,

+ 4 - 2
src/pages/manage/index.vue

@@ -340,6 +340,7 @@ export default {
       }).then(res => {
         this.manageData = res.data.content;
         this.totalNumber = parseInt(res.data.totalElements);
+        this.pageNo = val;
       });
     },
     tableRowClassName({ row, rowIndex }) {
@@ -396,6 +397,7 @@ export default {
     },
     // 提交新增
     submitForm(formName) {
+      console.log(this.pageNo)
       //验证表单
       this.$refs[formName].validate((valid, value) => {
         if (valid) {
@@ -408,7 +410,7 @@ export default {
               //获取经营列表
               getManageList({
                 type: "INCOME",
-                pageNo: 1,
+                pageNo: this.pageNo,
                 pageSize: 50,
                 isEntry: true
               }).then(res => {
@@ -427,7 +429,7 @@ export default {
               //获取经营列表
               getManageList({
                 type: "INCOME",
-                pageNo: 1,
+                pageNo: this.pageNo,
                 pageSize: 50,
                 startTime: this.searchFlag ? this.searchForm.startTime : null,
                 endTime: this.searchFlag ? this.searchForm.endTime : null,