const menuTool = { toolMenu: null, toolFlag: null, colorAll: { }, menuTools(res) { this.clearTools(); this.toolFlag = res.id; switch (res.id) { case 'a2'://点漫游 this.pointRoam(); break; case 'a3'://线漫游 this.lineRoam(); break; case 'b2'://表面距离 this.surfaceDistance(); break; case 'b3'://平面面积 this.planeDistance(); break; case 'b4'://高程测量 this.heightMeasure(); break; case 'b5'://垂直高度 this.verticalHeight(); break; } }, //垂直高度 verticalHeight() { }, //高程测量 heightMeasure() { }, //平面面积 planeDistance() { }, //表面距离 surfaceDistance() { }, //点漫游 pointRoam() { }, //线漫游 lineRoam() { }, //清除方法 clearTools() { if (this.toolFlag) { switch (this.toolFlag) { case 'a2': break; case 'a3': break; case 'b2': case 'b3': case 'b4': case 'b5': break; } this.toolFlag = null; this.toolMenu = null; } }, } export default menuTool;