Browse Source

perf: 成员列表操作后出现的页码错误问题

wangcz 7 years ago
parent
commit
388fcedb27
1 changed files with 5 additions and 3 deletions
  1. 5 3
      pages/cloudcenter/enterprise/index.vue

+ 5 - 3
pages/cloudcenter/enterprise/index.vue

@@ -77,7 +77,7 @@
             </table>
             </table>
             <div style="text-align: center; color:#333;height:100px;line-height: 100px;" v-if="apple.content.length === 0">现在没有需要处理的加入申请!</div>
             <div style="text-align: center; color:#333;height:100px;line-height: 100px;" v-if="apple.content.length === 0">现在没有需要处理的加入申请!</div>
             <page :total="apple.totalElements" :page-size="count"
             <page :total="apple.totalElements" :page-size="count"
-                  :current="page" @childEvent="handleApplyChange">
+                  :current="applyPage" @childEvent="handleApplyChange">
             </page>
             </page>
           </div>
           </div>
         </div>
         </div>
@@ -128,6 +128,7 @@
         isToggleDialogVisible: false,
         isToggleDialogVisible: false,
         toggle: true,
         toggle: true,
         page: 1,
         page: 1,
+        applyPage: 1,
         count: 20
         count: 20
       }
       }
     },
     },
@@ -154,8 +155,7 @@
         this.centerDialogVisible = false
         this.centerDialogVisible = false
       },
       },
       handleApplyChange: function (page) {
       handleApplyChange: function (page) {
-        this.page = page ? page : 1
-        this.$store.dispatch('loadApplyList', {page: page, size: this.count})
+        this.$store.dispatch('loadApplyList', {page: applyPage, size: this.count})
       },
       },
       handleMemberChange: function (page) {
       handleMemberChange: function (page) {
         this.$store.dispatch('loadMemberList', {page: page, size: this.count})
         this.$store.dispatch('loadMemberList', {page: page, size: this.count})
@@ -171,6 +171,7 @@
           this.$http.post('/sso/center/agree/apply', param, config)
           this.$http.post('/sso/center/agree/apply', param, config)
             .then(res => {
             .then(res => {
               if (res.data.success) {
               if (res.data.success) {
+                this.applyPage = 1
                 this.handleApplyChange()
                 this.handleApplyChange()
                 this.$message({
                 this.$message({
                   message: '操作成功',
                   message: '操作成功',
@@ -185,6 +186,7 @@
           this.$http.post('/sso/center/disagree/apply', param, config)
           this.$http.post('/sso/center/disagree/apply', param, config)
             .then(res => {
             .then(res => {
               if (res.data.success) {
               if (res.data.success) {
+                this.applyPage = 1
                 this.handleApplyChange()
                 this.handleApplyChange()
                 this.$message({
                 this.$message({
                   message: '操作成功',
                   message: '操作成功',