From 92c10db6904251d6d87123544e1fcbf568f57172 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 3 Jul 2020 09:46:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=A7=E6=9C=AC=E5=BD=95=E5=88=B6=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../display/tipScriptRecordNew.vue | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/views/scriptManage/display/tipScriptRecordNew.vue b/src/views/scriptManage/display/tipScriptRecordNew.vue index 40a9ff224..a07d3c018 100644 --- a/src/views/scriptManage/display/tipScriptRecordNew.vue +++ b/src/views/scriptManage/display/tipScriptRecordNew.vue @@ -189,10 +189,22 @@ export default { }, saveScenesData() { this.isSavingScript = true; - saveScriptDataNew(this.group).then(resp => { - this.$message.success(this.$t('scriptRecord.saveDataSucess')); - this.isSavingScript = false; + const data = Vue.prototype.$jlmap.$options; + const dataZoom = {scale: data.scaleRate, x: data.offsetX, y: data.offsetY}; + updateMapLocationNew(this.group, dataZoom).then(response=>{ + saveScriptDataNew(this.group).then(resp => { + this.$message.success(this.$t('scriptRecord.saveDataSucess')); + this.isSavingScript = false; // this.initAutoSaveScript(); + }).catch(error => { + this.$messageBox(`${this.$t('scriptRecord.saveDataFail')}: ${error.message}`); + this.isSavingScript = false; + if (error.code === 40004 || error.code === 40005 || error.code === 40003) { + // this.clearAutoSave(); + } else { + // // this.initAutoSaveScript(); + } + }); }).catch(error => { this.$messageBox(`${this.$t('scriptRecord.saveDataFail')}: ${error.message}`); this.isSavingScript = false; @@ -202,13 +214,14 @@ export default { // // this.initAutoSaveScript(); } }); + }, saveScenesStage() { const data = Vue.prototype.$jlmap.$options; const group = this.$route.query.group; const dataZoom = {scale: data.scaleRate, x: data.offsetX, y: data.offsetY}; - saveScriptScenesNew(this.group).then(resp => { - updateMapLocationNew(group, dataZoom).then(response=>{ + updateMapLocationNew(group, dataZoom).then(response=>{ + saveScriptScenesNew(this.group).then(resp => { this.$store.dispatch('scriptRecord/updateBgSet', true); this.$store.dispatch('training/setPrdType', null); this.$message.success(this.$t('scriptRecord.saveBackgroundSuceess'));