From 38f82beb8aa181f8760ed28ae4bebc6a06e48914 Mon Sep 17 00:00:00 2001 From: zyn Date: Wed, 22 Nov 2023 17:51:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=96=E8=BE=91=E9=A1=B5-=E6=8C=89?= =?UTF-8?q?=E9=92=AEloading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../policyRegulation/meeting/components/editDrawer.vue | 7 ++++++- .../policyRegulation/policy/components/editDrawer.vue | 2 +- .../policyTopics/components/editDrawer.vue | 7 ++++++- .../regulatoryMaterials/components/editDrawer.vue | 7 ++++++- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/pages/policyRegulation/meeting/components/editDrawer.vue b/src/pages/policyRegulation/meeting/components/editDrawer.vue index 58f246549..3027ae6ee 100644 --- a/src/pages/policyRegulation/meeting/components/editDrawer.vue +++ b/src/pages/policyRegulation/meeting/components/editDrawer.vue @@ -177,7 +177,7 @@ @@ -352,6 +352,7 @@ export default { onSubmit () { this.$refs.formRef.validate(valid => { if (valid) { + this.isSubmit = true if (this.title === '新增') { this.$http._postData(this.api.add, this.form).then(res => { if (res.ok) { @@ -359,6 +360,8 @@ export default { this.onClose() this.$emit('load') } + }).finally(() => { + this.isSubmit = false }) } else { this.$http._putData(this.api.update, this.form).then(res => { @@ -367,6 +370,8 @@ export default { this.onClose() this.$emit('load') } + }).finally(() => { + this.isSubmit = false }) } } diff --git a/src/pages/policyRegulation/policy/components/editDrawer.vue b/src/pages/policyRegulation/policy/components/editDrawer.vue index 60b5851ef..b92bf9c6d 100644 --- a/src/pages/policyRegulation/policy/components/editDrawer.vue +++ b/src/pages/policyRegulation/policy/components/editDrawer.vue @@ -541,7 +541,7 @@ @@ -538,6 +538,7 @@ export default { onSubmit () { this.$refs.formRef.validate(valid => { if (valid) { + this.isSubmit = true if (this.title === '新增') { this.$http._postData(this.api.add, this.form).then(res => { if (res.ok) { @@ -545,6 +546,8 @@ export default { this.onClose() this.$emit('load') } + }).finally(() => { + this.isSubmit = false }) } else { this.$http._putData(this.api.update, this.form).then(res => { @@ -553,6 +556,8 @@ export default { this.onClose() this.$emit('load') } + }).finally(() => { + this.isSubmit = false }) } } diff --git a/src/pages/policyRegulation/regulatoryMaterials/components/editDrawer.vue b/src/pages/policyRegulation/regulatoryMaterials/components/editDrawer.vue index 0917db21a..48a9152d3 100644 --- a/src/pages/policyRegulation/regulatoryMaterials/components/editDrawer.vue +++ b/src/pages/policyRegulation/regulatoryMaterials/components/editDrawer.vue @@ -143,7 +143,7 @@ { if (valid) { + this.isSubmit = true if (this.title === '新增') { this.$http._postData(this.url.add, this.form, { _this: this, loading: 'isSubmit' }).then(res => { if (res.ok) { @@ -277,6 +278,8 @@ export default { this.onClose() this.$emit('load') } + }).finally(() => { + this.isSubmit = false }) } else { this.$http._putData(this.url.update, this.form,{ _this: this, loading: 'isSubmit' }).then(res => { @@ -285,6 +288,8 @@ export default { this.onClose() this.$emit('load') } + }).finally(() => { + this.isSubmit = false }) } }