diff --git a/.env.development b/.env.development index b387ff05b..ddb549af1 100644 --- a/.env.development +++ b/.env.development @@ -19,3 +19,4 @@ VUE_APP_UPLOAD_API = 'https://upload.joylink.club' # Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js VUE_CLI_BABEL_TRANSPILE_MODULES = true +VUE_APP_SOURCE_MAP = true diff --git a/.env.production b/.env.production index 71363ca9f..4c64df13f 100644 --- a/.env.production +++ b/.env.production @@ -5,3 +5,4 @@ NODE_ENV = 'production' VUE_APP_BASE_API = 'https://api.joylink.club/jlcloud' VUE_APP_VOICE_API = 'https://oss.joylink.club/oss/joylink' VUE_APP_UPLOAD_API = 'https://upload.joylink.club' +VUE_APP_SOURCE_MAP = false diff --git a/.env.staging b/.env.staging index d1042b068..9277c1c33 100644 --- a/.env.staging +++ b/.env.staging @@ -5,3 +5,4 @@ NODE_ENV = 'test' VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud' VUE_APP_VOICE_API = 'https://oss.joylink.club/oss/joylink' VUE_APP_UPLOAD_API = 'https://upload.joylink.club' +VUE_APP_SOURCE_MAP = false diff --git a/src/jmapNew/shape/Responder/index.js b/src/jmapNew/shape/Responder/index.js index e9610921d..16d97da9e 100644 --- a/src/jmapNew/shape/Responder/index.js +++ b/src/jmapNew/shape/Responder/index.js @@ -40,16 +40,20 @@ export default class Responder extends Group { create() { const model = this.model; - const responderStyle = this.style.Responder || defaultStyle; - const distanceX = responderStyle.distance * Math.cos(model.rotate-90); - const distanceY = responderStyle.distance * Math.sin(model.rotate-90); + const responderStyle = this.style.Responder || defaultStyle; + const radian = -Math.PI / 180 * Number(model.rotate-90); + const distanceX = -responderStyle.distance * Math.cos(radian); + const distanceY = -responderStyle.distance * Math.sin(radian); const blockWidth = responderStyle.block.width || 5; const blockHeight = responderStyle.block.height || 12; const blockStyle = responderStyle.block.mapStyle[model.type] || { fill: '#fff'}; const blockX = model.position.x - blockWidth / 2 - distanceX; - const blockY = model.position.y - blockHeight / 2 - distanceY; - const textX = blockX + model.textOffset.x; - const textY = blockY + model.textOffset.y; + const blockY = model.position.y - blockHeight / 2 - distanceY; + const textRadian = -Math.PI / 180 * Number(180-model.textRotate); + const textDistanceX = model.textOffset.y * Math.sin(textRadian) + model.textOffset.x * Math.cos(textRadian); + const textDistanceY = model.textOffset.y * Math.cos(textRadian) - model.textOffset.x * Math.sin(textRadian); + const textX = blockX + textDistanceX + blockWidth; + const textY = blockY + textDistanceY; const textName = `${model.type}-${model.name}`; const textFill = responderStyle.text.textFill; const origin = [model.position.x, model.position.y]; @@ -100,29 +104,29 @@ export default class Responder extends Group { } }); - this.text = new Text({ - zlevel: this.zlevel, - z: this.z + 1, - style: { - x: textX, - y: textY, - text: textName, - fontFamily: this.style.fontFamily, - fontSize: this.style.fontSize, - textFill: textFill, - textAlign: 'right' - } - }); + this.text = this.name = new Text({ + zlevel: this.zlevel, + z: this.z + 1, + style: { + x: textX, + y: textY, + text: textName, + fontFamily: this.style.fontFamily, + fontSize: this.style.fontSize, + textFill: textFill, + textAlign: 'left' + } + }); if (model.rotate) { - const rotation = -Math.PI / 180 * Number(model.rotate); + const rotation = -Math.PI / 180 * Number(model.rotate+180); [this.block, this.delta1, this.delta2].forEach(el => { this.transformRotation(el, origin, rotation); }); } if (model.textRotate) { - const rotation = -Math.PI / 180 * Number(model.textRotate); + const rotation = -Math.PI / 180 * Number(model.textRotate+180); this.transformRotation(this.text, origin, rotation); } diff --git a/src/scripts/ConstDic.js b/src/scripts/ConstDic.js index 51c66ebd4..39a244814 100644 --- a/src/scripts/ConstDic.js +++ b/src/scripts/ConstDic.js @@ -1,12 +1,11 @@ -// /** -// * 真实设备类型 -// */ -// export const RealDeviceType = { -// Section: '区段', -// Switch: '道岔', -// Signal: '信号机', -// ScreenDoor: '屏蔽门' -// }; +/** + * 鼠标事件 + */ +export const MouseEvent = { + Left: 1, + Right: 2, + Wheel: 3 +} /** * 权限类型 */ @@ -60,14 +59,6 @@ export const OperateMode = { DIRECTIVE: '03' }; -// /** -// * 分发、转赠 -// */ -// export const OperatorModel = { -// DISTRIBUTE: '01', -// TRANSFER: '02' -// }; - /** * 菜单编号 */ @@ -128,6 +119,7 @@ export const IbpOperation = { XXYS: {operate: '09', event: 'XXYS', name: '下行钥匙'}, SXYS: {operate: '11', event: 'SXYS', name: '上行钥匙'} }; + /** * ibp状态显示条件 */ @@ -136,12 +128,14 @@ export const IbpShowCondition = { Show_Open_Screen_Door: {statusKey: 'screenDoorOpenStatus', statusValue:['02'], defaultStatus: 'close'}, Show_Close_Screen_Door: {statusKey: 'screenDoorOpenStatus', statusValue: ['01'], defaultStatus: 'open'} }; + /** 列车类型 */ export const TrainType = { PLAN: '计划车', HEAD: '头码车', MANUAL: '人工车' }; + /** 仿真成员类型 */ export const SimulationType = { DISPATCHER: '行调', diff --git a/src/views/newMap/mapsystemNew/common/index.vue b/src/views/newMap/mapsystemNew/common/index.vue index 15b76e1de..263c0d03e 100644 --- a/src/views/newMap/mapsystemNew/common/index.vue +++ b/src/views/newMap/mapsystemNew/common/index.vue @@ -8,7 +8,7 @@