From 4ed4059fc27b065333a7d800979cb4e42b096ce1 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 10 Apr 2024 17:22:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E9=A1=B9=E7=9B=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E4=BF=AE=E5=A4=8D=E6=96=B0=E5=A2=9E=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=A4=9A=E6=AC=A1=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/views/base/project/index.vue | 10 +++++++++- sgzb-ui/src/views/base/unit/index.vue | 3 +-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sgzb-ui/src/views/base/project/index.vue b/sgzb-ui/src/views/base/project/index.vue index 8ddec4d4..854afe6f 100644 --- a/sgzb-ui/src/views/base/project/index.vue +++ b/sgzb-ui/src/views/base/project/index.vue @@ -116,7 +116,7 @@ @@ -136,6 +136,7 @@ export default { components: { Treeselect }, data() { return { + isLoading: false, // 遮罩层 loading: true, // 选中数组 @@ -287,17 +288,24 @@ export default { submitForm: function() { this.$refs["form"].validate(valid => { if (valid) { + this.isLoading = true; if (this.form.proId != undefined) { updateProject(this.form).then(response => { this.$modal.msgSuccess("修改成功"); this.open = false; + this.isLoading = false; this.getList(); + }).catch(() => { + this.isLoading = false; }); } else { addProject(this.form).then(response => { this.$modal.msgSuccess("新增成功"); this.open = false; + this.isLoading = false; this.getList(); + }).catch(() => { + this.isLoading = false; }); } } diff --git a/sgzb-ui/src/views/base/unit/index.vue b/sgzb-ui/src/views/base/unit/index.vue index 954db2c9..000a8ba8 100644 --- a/sgzb-ui/src/views/base/unit/index.vue +++ b/sgzb-ui/src/views/base/unit/index.vue @@ -24,7 +24,6 @@ plain icon="el-icon-plus" size="mini" - :loading="isLoading" @click="handleAdd" >新建 @@ -91,7 +90,7 @@