Ver Fonte

前端: 列表页删除时loading

baichengfei há 5 anos atrás
pai
commit
9f0efe5763

+ 4 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/basicindex.vue

@@ -631,6 +631,7 @@
         this.initDatas()
       },
       deleteEntity (row) {
+        this.tableLoading = true
         api.deleteEntity(row.Id, this.$axios).then(res => {
           if (res.data.code === 0) {
             this.initDatas()
@@ -638,14 +639,17 @@
               type: 'success',
               message: res.data.message
             })
+            this.tableLoading = false
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
             })
+            this.tableLoading = false
           }
         }).catch(err => {
           console.error(err)
+          this.tableLoading = false
         })
       },
 

+ 4 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/goodsindex.vue

@@ -632,6 +632,7 @@
         this.initDatas()
       },
       deleteEntity (row) {
+        this.tableLoading = true
         api.deleteEntity(row.Id, this.$axios).then(res => {
           if (res.data.code === 0) {
             this.initDatas()
@@ -639,14 +640,17 @@
               type: 'success',
               message: res.data.message
             })
+            this.tableLoading = false
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
             })
+            this.tableLoading = false
           }
         }).catch(err => {
           console.error(err)
+          this.tableLoading = false
         })
       },
 

+ 4 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/index.vue

@@ -560,6 +560,7 @@ import WfHistory from '@/components/workflow/wfmultihistory.vue'
         this.initDatas()
       },
       deleteEntity (row) {
+        this.tableLoading = true
         api.deleteEntity(row.Id, this.$axios).then(res => {
           if (res.data.code === 0) {
             this.initDatas()
@@ -567,14 +568,17 @@ import WfHistory from '@/components/workflow/wfmultihistory.vue'
               type: 'success',
               message: res.data.message
             })
+            this.tableLoading = false
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
             })
+            this.tableLoading = false
           }
         }).catch(err => {
           console.error(err)
+          this.tableLoading = false
         })
       },
 

+ 4 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/techindex.vue

@@ -635,6 +635,7 @@ import WfHistory from '@/components/workflow/wfmultihistory.vue'
         this.initDatas()
       },
       deleteEntity (row) {
+        this.tableLoading = true
         api.deleteEntity(row.Id, this.$axios).then(res => {
           if (res.data.code === 0) {
             this.initDatas()
@@ -642,14 +643,17 @@ import WfHistory from '@/components/workflow/wfmultihistory.vue'
               type: 'success',
               message: res.data.message
             })
+            this.tableLoading = false
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
             })
+            this.tableLoading = false
           }
         }).catch(err => {
           console.error(err)
+          this.tableLoading = false
         })
       },
 

+ 3 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/index.vue

@@ -484,6 +484,7 @@
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
+          this.tableLoading = true
           api.delInfoChangech(Id, this.$axios).then(res => {
             if (res.data.code === 0) {
               this.initDatas()
@@ -491,11 +492,13 @@
                 type: 'success',
                 message: res.data.message
               })
+              this.tableLoading = false
             } else {
               this.$message({
                 type: 'warning',
                 message: res.data.message
               })
+              this.tableLoading = false
             }
           })
         })

+ 4 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/basislist.vue

@@ -1023,6 +1023,7 @@ export default {
     },
     deleteEntity (row) {
       row.deleteConfirmFlag = false
+      this.tableLoading = true
       api.deleteAllEntity(row.Id, row.SupplierTypeCode, this.$axios).then(res => {
         if (res.data.code === 0) {
           this.initDatas()
@@ -1031,14 +1032,17 @@ export default {
             type: 'success',
             message: res.data.message
           })
+          this.tableLoading = false
         } else {
           this.$message({
             type: 'warning',
             message: res.data.message
           })
+          this.tableLoading = false
         }
       }).catch(err => {
         console.error(err)
+        this.tableLoading = false
       })
     },
 

+ 4 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/goodslist.vue

@@ -1022,6 +1022,7 @@ export default {
     },
     deleteEntity (row) {
       row.deleteConfirmFlag = false
+      this.tableLoading = true
       api.deleteAllEntity(row.Id, row.SupplierTypeCode, this.$axios).then(res => {
         if (res.data.code === 0) {
           this.initDatas()
@@ -1030,14 +1031,17 @@ export default {
             type: 'success',
             message: res.data.message
           })
+          this.tableLoading = false
         } else {
           this.$message({
             type: 'warning',
             message: res.data.message
           })
+          this.tableLoading = false
         }
       }).catch(err => {
         console.error(err)
+        this.tableLoading = false
       })
     },
 

+ 4 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/index.vue

@@ -1060,6 +1060,7 @@
           })
           return
         }
+        this.tableLoading = true
         api.deleteAllEntity(row.Id, row.SupplierTypeCode, this.$axios).then(res => {
           if (res.data.code === 0) {
             this.initDatas()
@@ -1068,14 +1069,17 @@
               type: 'success',
               message: res.data.message
             })
+            this.tableLoading = false
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
             })
+            this.tableLoading = false
           }
         }).catch(err => {
           console.error(err)
+          this.tableLoading = false
         })
       },
 

+ 4 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/techlist.vue

@@ -1025,6 +1025,7 @@ export default {
     },
     deleteEntity (row) {
       row.deleteConfirmFlag = false
+      this.tableLoading = true
       api.deleteAllEntity(row.Id, row.SupplierTypeCode, this.$axios).then(res => {
         if (res.data.code === 0) {
           this.initDatas()
@@ -1033,14 +1034,17 @@ export default {
             type: 'success',
             message: res.data.message
           })
+          this.tableLoading = false
         } else {
           this.$message({
             type: 'warning',
             message: res.data.message
           })
+          this.tableLoading = false
         }
       }).catch(err => {
         console.error(err)
+        this.tableLoading = false
       })
     },