绘图相关调整_(添加快捷键修改)

This commit is contained in:
fan 2019-12-06 15:12:22 +08:00
parent a4f83d1f38
commit d09b418bba
4 changed files with 16 additions and 2 deletions

View File

@ -1,6 +1,7 @@
export const keyboardEvents = {
Z: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_Z'}, // 绘图撤销
Y: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_Y'}, // 绘图恢复
DELETE: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Delete'} // 快捷删除绘图元素
DELETE: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Delete'}, // 快捷删除绘图元素
ENTER: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Update'} // 快捷修改绘图元素
};

View File

@ -251,7 +251,8 @@ const map = {
mapViewLoadedCount: 0, // 地图视图加载完成标识
mapDataLoadedCount: 0, // 地图数据加载完成标识
trainDetails: null, // 地图'列车详情'显示
deleteCount: 0 // 绘图快捷删除标识
deleteCount: 0, // 绘图快捷删除标识
updateCount: 0 // 绘图快捷修改标识
},
getters: {
@ -581,6 +582,9 @@ const map = {
},
setDeleteCount: (state) => {
state.deleteCount++;
},
setUpdateCount: (state) => {
state.updateCount++;
}
},
@ -693,6 +697,10 @@ const map = {
setDeleteCount: ({ commit }) => {
commit('setDeleteCount');
},
setUpdateCount: ({ commit }) => {
commit('setUpdateCount');
}
}

View File

@ -225,6 +225,8 @@ export default {
break;
case 'Delete': this.$store.dispatch('map/setDeleteCount');
break;
case 'Update': this.$store.dispatch('map/setUpdateCount');
break;
}
},
//

View File

@ -257,6 +257,9 @@ export default {
watch: {
'$store.state.map.deleteCount': function (val) {
this.$refs[this.enabledTab].deleteObj();
},
'$store.state.map.updateCount': function (val) {
this.$refs[this.enabledTab].edit();
}
},
mounted() {