Jelajahi Sumber

fix: 添加数据变更和编辑验证

johnsen 6 bulan lalu
induk
melakukan
a3bb264d0f
1 mengubah file dengan 13 tambahan dan 3 penghapusan
  1. 13 3
      src/views/platform/auth/board/index.vue

+ 13 - 3
src/views/platform/auth/board/index.vue

@@ -236,6 +236,7 @@ export default {
   methods: {
     search() {
       this.loading = true
+      // this.handleResize()
       try {
         searchPagePermission({
           requestPage: {
@@ -257,7 +258,7 @@ export default {
           } else {
             this.pagination = {
               pageNo: 1,
-              limit: 20,
+              limit: this.pagination.limit,
               totalCount: 0,
               totalPages: 1
             }
@@ -292,9 +293,18 @@ export default {
       this.search()
     },
     tableEdit() {
+      if (!this.ibpsData || this.ibpsData.length === 0) {
+        this.$message.warning('列表无数据')
+        return
+      }
       this.editFalg = true
     },
     tableSave() {
+      if (this.changeRows.length === 0) {
+        this.$message.warning('列表无数据变更')
+        this.editFalg = false
+        return
+      }
       this.loading = true
       savePagePermission({
         permissions: this.changeRows
@@ -361,8 +371,8 @@ export default {
       }
     },
     handleTableHeight(showToolbar) {
-      if (this.height) {
-        this.tableHeight = this.height
+      if (this.tableHeight) {
+        return
       } else if (this.$refs.ibpsCrud) {
         this.tableHeight = this.$refs.ibpsCrud.clientHeight
       }