From 547589331bb3769ebe9902bdb51d6479ff3dbedf Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 31 Oct 2019 14:35:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=9C=B0=E5=9B=BE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E8=B0=83=E6=95=B4=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/publish/publishMap/copy.vue | 11 ++++++++++- src/views/publish/publishMap/project.vue | 10 +++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/views/publish/publishMap/copy.vue b/src/views/publish/publishMap/copy.vue index 2de9607c8..624eacce6 100644 --- a/src/views/publish/publishMap/copy.vue +++ b/src/views/publish/publishMap/copy.vue @@ -2,7 +2,7 @@ - {{ $t('global.confirm') }} + {{ $t('global.confirm') }} {{ $t('global.cancel') }} @@ -19,6 +19,7 @@ export default { name: '', copyOtherData: false }, + loading: false, mapId: '', form:{ labelWidth: '100px', @@ -46,10 +47,18 @@ export default { this.mapId = row.id; }, doSave() { + if (this.loading) { + return; + } + this.loading = true; copyMapAs(this.mapId, this.formModel).then(resp =>{ this.$message.success('复制地图成功!'); + this.loading = false; this.dialogVisible = false; this.$emit('refresh'); + }).catch(() => { + this.loading = false; + this.$messageBox(`复制地图失败!`); }); } } diff --git a/src/views/publish/publishMap/project.vue b/src/views/publish/publishMap/project.vue index ce11911d1..17143a1b9 100644 --- a/src/views/publish/publishMap/project.vue +++ b/src/views/publish/publishMap/project.vue @@ -24,7 +24,7 @@ - {{ $t('global.confirm') }} + {{ $t('global.confirm') }} {{ $t('global.cancel') }} @@ -45,6 +45,7 @@ export default { project: false, projectCode: '' }, + loading: false, projectCodeShow: false, booleanValue: { t: true, @@ -63,10 +64,17 @@ export default { doSave() { this.$refs['form'].validate((valid) => { if (valid) { + if (this.loading) { + return; + } + this.loading = true; setMapProject(this.formModel).then(resp =>{ this.$message.success('设置归属项目成功!'); + this.loading = false; this.dialogVisible = false; this.$emit('refresh'); + }).catch( ()=>{ + this.$messageBox(`设置归属项目失败!`); }); } else { return false;