diff --git a/sgzb-ui/src/views/base/comeAndGo/index.vue b/sgzb-ui/src/views/base/comeAndGo/index.vue index 49ab431a..6428a798 100644 --- a/sgzb-ui/src/views/base/comeAndGo/index.vue +++ b/sgzb-ui/src/views/base/comeAndGo/index.vue @@ -201,7 +201,7 @@
@@ -220,6 +220,7 @@ export default { components: { Treeselect }, data() { return { + isLoading: false, //单位类型 typeList: [], chonsenData: {}, @@ -377,17 +378,24 @@ export default { submitForm: function () { this.$refs["form"].validate(valid => { if (valid) { + this.isLoading = true; if (this.form.unitId != undefined) { updateUnit(this.form).then(response => { this.$modal.msgSuccess("修改成功"); this.open = false; + this.isLoading = false; this.getList(); + }).catch(() => { + this.isLoading = false; }); } else { addUnit(this.form).then(response => { this.$modal.msgSuccess("新增成功"); this.open = false; + this.isLoading = false; this.getList(); + }).catch(() => { + this.isLoading = false; }); } }