diff --git a/src/jmapNew/theme/beijing_01/menus/menuSection.vue b/src/jmapNew/theme/beijing_01/menus/menuSection.vue index fe2931434..07d648269 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSection.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSection.vue @@ -189,7 +189,8 @@ export default { }, // 切除 split() { - commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code; + commitOperate(menuOperate.Section.split, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{ if (valid) { this.$refs.sectionControl.doShow(operate, this.selected); } @@ -204,7 +205,8 @@ export default { }, // 激活 active() { - commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code; + commitOperate(menuOperate.Section.active, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{ if (valid) { this.$refs.sectionControl.doShow(operate, this.selected); } @@ -226,7 +228,8 @@ export default { // }, // 设置速度 setSpeed() { - commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code; + commitOperate(menuOperate.Section.setSpeed, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{ if (valid) { this.$refs.speedLimitControl.doShow(operate, this.selected); } diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue index c3b909c87..ac6aeac70 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue @@ -166,7 +166,8 @@ export default { }, // 切除 split() { - commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code; + commitOperate(menuOperate.Section.split, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{ if (valid) { this.$refs.sectionControl.doShow(operate, this.selected); } @@ -182,7 +183,8 @@ export default { }, // 区段激活 active() { - commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code; + commitOperate(menuOperate.Section.active, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{ if (valid) { this.$refs.sectionControl.doShow(operate, this.selected); } @@ -206,7 +208,8 @@ export default { }, // 设置速度 setSpeed() { - commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ + const sectionCode = this.selected.parentCode ? this.selected.parentCode : this.selected.code; + commitOperate(menuOperate.Section.setSpeed, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{ if (valid) { this.$refs.speedLimitControl.doShow(operate, this.selected); } diff --git a/src/views/newMap/newDesignUser/mapmanage/mapImport.vue b/src/views/newMap/newDesignUser/mapmanage/mapImport.vue index 724233465..46d998f0c 100644 --- a/src/views/newMap/newDesignUser/mapmanage/mapImport.vue +++ b/src/views/newMap/newDesignUser/mapmanage/mapImport.vue @@ -64,25 +64,26 @@ export default { // this.validateText = this.$t('rules.pleaseEnterMapName'); return false; } - // const loading = this.$loading({ - // lock: true, - // text: '正在导入中...', - // spinner: 'el-icon-loading', - // background: 'rgba(0, 0, 0, 0.7)' - // }); + const loading = this.$loading({ + lock: true, + text: '正在导入中...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); const that = this; that.loading = true; this.jsonData.name = this.editModel.name; + this.dialogShow = false; + this.validateText = ''; postBuildMapImport(this.jsonData).then(res => { - // loading.close(); + loading.close(); that.loading = false; that.$message.success('导入成功!'); - // that.loadInitData(); this.$emit('loadInitData'); // loading.close(); this.close(); }).catch(error => { - // loading.close(); + loading.close(); that.loading = false; this.close(); that.$message.error('导入失败' + error.message);