From d68daaa8371eed7dc521d0b0b36109d2f3edbe9a Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 2 Aug 2019 14:26:50 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9A=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 --- src/jmap/shape/StationStand/EJump.js | 37 ++++++++++++++++++++++++---- src/jmap/shape/StationStand/index.js | 20 ++++++++++++++- 2 files changed, 51 insertions(+), 6 deletions(-) diff --git a/src/jmap/shape/StationStand/EJump.js b/src/jmap/shape/StationStand/EJump.js index c2823ed7a..7665c6567 100644 --- a/src/jmap/shape/StationStand/EJump.js +++ b/src/jmap/shape/StationStand/EJump.js @@ -1,11 +1,14 @@ import Group from 'zrender/src/container/Group'; import Text from 'zrender/src/graphic/Text'; +import Arc from 'zrender/src/graphic/shape/Arc'; class EJump extends Group { constructor(model) { super(); this.model = model; this.isNew = false; + this.create(); + this.setStatus(); } create() { @@ -23,13 +26,28 @@ class EJump extends Group { fontWeight: 'normal', fontSize: style.StationStand.common.textFontSize, fontFamily: style.textFontFormat, - text: model.name, - textFill: style.StationStand.level.textColor, - textAlign: 'middle' + text: style.StationStand.jump.text, + textFill: style.StationStand.jump.textColor, + textAlign: model.textAlign, + textVerticalAlign: model.textVerticalAlign } }); - + this.jumpArc = new Arc({ + zlevel: model.zlevel, + z: model.z, + shape: { + cx: model.cx, + cy: model.cy, + r: style.StationStand.jump.r + }, + style: { + stroke: style.StationStand.jump.arcColor, + fill: style.StationStand.jump.fillColor + } + }); + this.add(this.jumpArc); this.add(this.jump); + this.jumpArc.hide(); } } @@ -37,7 +55,16 @@ class EJump extends Group { this.create(); this.jump.setStyle('text', val); } - + setStatus(val) { + switch (val) { + case '01': + this.jumpArc.show(); + break; + case '02': + this.jumpArc.hide(); + break; + } + } setColor(color) { this.create(); this.jump.setStyle('textFill', color); diff --git a/src/jmap/shape/StationStand/index.js b/src/jmap/shape/StationStand/index.js index e4b1e8ea7..2c3c11398 100644 --- a/src/jmap/shape/StationStand/index.js +++ b/src/jmap/shape/StationStand/index.js @@ -8,6 +8,7 @@ import ESafeDoor from './ESafeDoor'; import ESafeStand from './ESafeStand'; import ESafeEmergent from './ESafeEmergent'; import EMouse from './EMouse'; +import EJump from './EJump'; class StationStand extends Group { constructor(model, style) { @@ -115,7 +116,6 @@ class StationStand extends Group { y: timeY, name: model.parkingTime || '30' }); - /** 运行等级*/ const levelD = style.StationStand.level.direction ? model.height - distance: -style.StationStand.safetyDoor.height; const levelH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + levelD; @@ -129,6 +129,24 @@ class StationStand extends Group { y: levelY, name: model.intervalRunTime || '5' }); + /** 列车停跳 */ + const jumpD = style.StationStand.jump.direction ? model.height - distance: -style.StationStand.safetyDoor.height; + const jumpH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + jumpD; + const jumpX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2); + const jumpY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y) + drict * jumpH; + const jumpCX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2 - style.StationStand.common.textFontSize/2); + const jumpCY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y + style.StationStand.common.textFontSize / 2) + drict * jumpH; + this.jump = new EJump({ + zlevel: this.zlevel, + z: this.z + 1, + style: style, + x: jumpX, + y: jumpY, + cx: jumpCX, + cy: jumpCY, + textAlign: 'middle', + textVerticalAlign: 'top' + }); this.add(this.safeDoor); this.add(this.safeStand); From 02ba15964ce7bf5bbcd33204eb4d44a4669b7e59 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 2 Aug 2019 14:38:05 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9A=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 --- src/jmap/config/skinStyle/bejing_01.js | 1 + src/jmap/config/skinStyle/chengdu_03.js | 33 +++++++++++++++--------- src/jmap/shape/StationStand/index.js | 34 ++++++++++++------------- 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/src/jmap/config/skinStyle/bejing_01.js b/src/jmap/config/skinStyle/bejing_01.js index 373284fa4..c96da1f09 100644 --- a/src/jmap/config/skinStyle/bejing_01.js +++ b/src/jmap/config/skinStyle/bejing_01.js @@ -338,6 +338,7 @@ class SkinStyle extends defaultStyle { fontWeight: 'normal', textAlign: 'middle', textVerticalAlign: 'top', + textColor: '#000000', arcColor: '#00FFFF' } }; diff --git a/src/jmap/config/skinStyle/chengdu_03.js b/src/jmap/config/skinStyle/chengdu_03.js index 11037d119..72efc1cbd 100644 --- a/src/jmap/config/skinStyle/chengdu_03.js +++ b/src/jmap/config/skinStyle/chengdu_03.js @@ -165,15 +165,15 @@ class SkinStyle extends defaultStyle { }, stand: { // 站台 headFontSize: 10, // 站台首端字体大小 - spareColor: '#606060', // 站台空闲颜色 - stopColor: '#FEFE00', // 站台列车停站颜色 + spareColor: '#808080', // 站台空闲颜色 + stopColor: '#FFF000', // 站台列车停站颜色 jumpStopColor: '#9A99FF', // 站台跳停颜色 designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色 }, standEmergent: { // 紧急关闭 mergentR: 4, // 站台紧急关闭半径 offset: {x: 0, y: 40}, // 站台紧急关闭偏移量 - closeColor: '#F61107' // 站台紧急关闭颜色 + closeColor: '#C00808' // 站台紧急关闭颜色 }, reentry: { // 站台折返策略 direction: 0, // 折返方向 @@ -182,23 +182,32 @@ class SkinStyle extends defaultStyle { AutoChangeEndsColor: '#0BF400' // 站台自动换端 }, detainCar: { // 扣车 - text: 'H', // 扣车显示内容 + text: '扣', // 扣车显示内容 direction: -1, // 扣车方向 - offset: {x: -8, y: -6}, // 扣车偏移量 - trainColor: '#E4EF50', // 车站扣车颜色 - centerTrainColor: '#FFFFFF', // 中心扣车颜色 - andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 + offset: {x: -8, y: -2}, // 扣车偏移量 + trainColor: '#FFFF00', // 车站扣车颜色 + centerTrainColor: '#C0C0C0', // 中心扣车颜色 + andCenterTrainColor: '#C00808', // 车站+中心扣车颜色 detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色 }, + jump: { + text: '跳', // 停跳显示内容 + direction: -1, // 停跳方向 + offset: {x: -8, y: 4}, + textColor: '#0000FF', // 停跳文字颜色 + arcColor: '#0000FF', // 停跳圆圈颜色 + fillColor: 'rgba(0,0,0,0)', // 透明填充颜色 + r: 8 // 圆半径大小 + }, stopTime: { // 停站时间 direction: 1, // 运行时间方向 - offset: {x: -8, y: 26}, // 运行时间偏移量 - textColor: '#FFFFFF' // 停站时间字体颜色 + offset: {x: -8, y: -4}, // 运行时间偏移量 + textColor: '#C0C0C0' // 停站时间字体颜色 }, level: { // 运行等级 direction: 1, // 运行等级方向 - offset: {x: -8, y: 6}, // 运行等级偏移量 - textColor: '#FFFFFF' // 停站等级字体颜色 + offset: {x: -8, y: 30}, // 运行等级偏移量 + textColor: '#FFF000' // 停站等级字体颜色 } }; this[deviceType.StationControl] = { diff --git a/src/jmap/shape/StationStand/index.js b/src/jmap/shape/StationStand/index.js index a5298bcd6..74bd525ed 100644 --- a/src/jmap/shape/StationStand/index.js +++ b/src/jmap/shape/StationStand/index.js @@ -130,23 +130,23 @@ class StationStand extends Group { name: model.intervalRunTime || '5' }); /** 列车停跳 */ - const jumpD = style.StationStand.jump.direction ? model.height - distance: -style.StationStand.safetyDoor.height; - const jumpH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + jumpD; - const jumpX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2); - const jumpY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y) + drict * jumpH; - const jumpCX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2 - style.StationStand.common.textFontSize/2); - const jumpCY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y + style.StationStand.common.textFontSize / 2) + drict * jumpH; - this.jump = new EJump({ - zlevel: this.zlevel, - z: this.z + 1, - style: style, - x: jumpX, - y: jumpY, - cx: jumpCX, - cy: jumpCY, - textAlign: 'middle', - textVerticalAlign: 'top' - }); + // const jumpD = style.StationStand.jump.direction ? model.height - distance: -style.StationStand.safetyDoor.height; + // const jumpH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + jumpD; + // const jumpX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2); + // const jumpY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y) + drict * jumpH; + // const jumpCX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2 - style.StationStand.common.textFontSize/2); + // const jumpCY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y + style.StationStand.common.textFontSize / 2) + drict * jumpH; + // this.jump = new EJump({ + // zlevel: this.zlevel, + // z: this.z + 1, + // style: style, + // x: jumpX, + // y: jumpY, + // cx: jumpCX, + // cy: jumpCY, + // textAlign: 'middle', + // textVerticalAlign: 'top' + // }); this.add(this.safeDoor); this.add(this.safeStand); From e64a26f6217d3b418fe3afca0883370e1335b4f6 Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Fri, 2 Aug 2019 14:54:51 +0800 Subject: [PATCH 03/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9eventBus=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmap/config/deviceStyle.js | 4 ++-- src/jmap/shape/TrainWindow/index.js | 4 ++-- src/main.js | 2 +- src/views/jlmap/index.vue | 16 ++++++++-------- src/views/map/mapdraft/index.vue | 1 + src/views/map/mapdraft/mapmanage/operateMenu.vue | 1 - 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/jmap/config/deviceStyle.js b/src/jmap/config/deviceStyle.js index adef27cac..b5babe4f6 100644 --- a/src/jmap/config/deviceStyle.js +++ b/src/jmap/config/deviceStyle.js @@ -1,8 +1,8 @@ const mapDeviceStyle = { // '01': 'chengdu_04', '02': 'fuzhou_01', - '03': 'bejing_01', - // '03': 'chengdu_03', + // '03': 'bejing_01', + '03': 'chengdu_03', '05': 'batong_01' // 暂时没有画北京八通线 }; diff --git a/src/jmap/shape/TrainWindow/index.js b/src/jmap/shape/TrainWindow/index.js index a98c1aeb4..1ac880e1f 100644 --- a/src/jmap/shape/TrainWindow/index.js +++ b/src/jmap/shape/TrainWindow/index.js @@ -45,8 +45,8 @@ class TrainWindow extends Group { stroke: this.style.TrainWindow.trainWindowColor, fill: this.style.transparentColor }, - onmouseover: () => { if (this.prdType != '') this.setTrainWindowEventShow(true); }, - onmouseout: () => { if (this.prdType != '') this.setTrainWindowEventShow(false); } + onmouseover: () => { if (this.prdType) this.setTrainWindowEventShow(true); }, + onmouseout: () => { if (this.prdType) this.setTrainWindowEventShow(false); } }); this.add(this.trainRect); } diff --git a/src/main.js b/src/main.js index 92262dedd..5b137d734 100644 --- a/src/main.js +++ b/src/main.js @@ -23,7 +23,7 @@ Vue.use(ElementUI); Vue.config.productionTip = false; -window.eventBus = new Vue({ +new Vue({ el: '#app', router, store, diff --git a/src/views/jlmap/index.vue b/src/views/jlmap/index.vue index fcd6d1d93..3ca18b95b 100644 --- a/src/views/jlmap/index.vue +++ b/src/views/jlmap/index.vue @@ -27,6 +27,7 @@ import ZoomBox from './zoom/zoom'; import ProgressBar from '@/views/components/progressBar/index'; import { mapGetters } from 'vuex'; import { TrainingMode } from '@/scripts/ConstDic'; +import { EventBus } from '@/scripts/event-bus'; export default { name: 'JlmapVisual', @@ -98,24 +99,23 @@ export default { } }, created() { - eventBus.$on('viewLoading', (loading) => { + EventBus.$on('viewLoading', (loading) => { this.mapViewLoaded(loading); }); - eventBus.$on('viewProgressAt', (percentage) => { + EventBus.$on('viewProgressAt', (percentage) => { this.mapViewProgressAt(percentage); }); - eventBus.$on('refresh', () => { + EventBus.$on('refresh', () => { this.refresh(this.$store.state.map.map); }); }, mounted() { this.initLoadPage(); }, - async beforeDestroy() { - await this.$store.dispatch('training/setPrdType', null); - eventBus.$off('refresh'); - eventBus.$off('viewLoading'); - eventBus.$off('viewProgressAt'); + beforeDestroy() { + EventBus.$off('refresh'); + EventBus.$off('viewLoading'); + EventBus.$off('viewProgressAt'); if (this.$jlmap) { this.$jlmap.dispose(); } diff --git a/src/views/map/mapdraft/index.vue b/src/views/map/mapdraft/index.vue index 573c68a87..b70ad684b 100644 --- a/src/views/map/mapdraft/index.vue +++ b/src/views/map/mapdraft/index.vue @@ -38,6 +38,7 @@ export default { } }, mounted() { + this.$store.dispatch('training/setPrdType', null); this.resizeHandler(); }, methods: { diff --git a/src/views/map/mapdraft/mapmanage/operateMenu.vue b/src/views/map/mapdraft/mapmanage/operateMenu.vue index 06111c91e..53d5d923c 100644 --- a/src/views/map/mapdraft/mapmanage/operateMenu.vue +++ b/src/views/map/mapdraft/mapmanage/operateMenu.vue @@ -16,7 +16,6 @@ import PopMenu from '@/components/PopMenu'; import MapEdit from './edit'; import MapSaveAs from './saveAs'; import MapPublish from './publish'; -// import localStore from 'storejs'; export default { name: 'MapOperateMenu', From 803dd3f8234c089d7f1836aed07dc6fc52770c0d Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Fri, 2 Aug 2019 17:02:43 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9A=AE=E8=82=A4?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmap/config/deviceStyle.js | 4 +- src/jmap/config/skinStyle/batong_01.js | 374 +------------- src/jmap/config/skinStyle/bejing_01.js | 398 +++++++-------- src/jmap/config/skinStyle/chengdu_03.js | 478 +++++++++--------- src/jmap/config/skinStyle/fuzhou_01.js | 387 +++++++------- src/jmap/shape/Section/ELimitLines.js | 4 +- src/jmap/shape/Section/index.js | 16 +- src/jmap/shape/Signal/ESigAuto.js | 4 +- src/jmap/shape/Signal/ESigButton.js | 18 +- src/jmap/shape/Signal/ESigLamp.js | 26 +- src/jmap/shape/Signal/ESigPost.js | 18 +- src/jmap/shape/Signal/ESigRoute.js | 4 +- src/jmap/shape/Signal/index.js | 120 ++--- src/jmap/shape/StationControl/EMouse.js | 4 +- .../shape/StationControl/ESingleControl.js | 8 +- src/jmap/shape/StationControl/index.js | 48 +- src/jmap/shape/StationStand/index.js | 2 +- src/jmap/shape/Switch/ESwName.js | 2 +- src/jmap/shape/Switch/index.js | 18 +- 19 files changed, 729 insertions(+), 1204 deletions(-) diff --git a/src/jmap/config/deviceStyle.js b/src/jmap/config/deviceStyle.js index b5babe4f6..adef27cac 100644 --- a/src/jmap/config/deviceStyle.js +++ b/src/jmap/config/deviceStyle.js @@ -1,8 +1,8 @@ const mapDeviceStyle = { // '01': 'chengdu_04', '02': 'fuzhou_01', - // '03': 'bejing_01', - '03': 'chengdu_03', + '03': 'bejing_01', + // '03': 'chengdu_03', '05': 'batong_01' // 暂时没有画北京八通线 }; diff --git a/src/jmap/config/skinStyle/batong_01.js b/src/jmap/config/skinStyle/batong_01.js index 721db8be5..893b5d1e5 100644 --- a/src/jmap/config/skinStyle/batong_01.js +++ b/src/jmap/config/skinStyle/batong_01.js @@ -5,376 +5,10 @@ class SkinStyle extends defaultStyle { constructor() { super(); this[deviceType.Link] = { - /** line 颜色*/ - lineWidthColor: '#FFFFFF', - /** link 宽度*/ - linkWidth: 4.4, - /** link 线条颜色*/ - linkColor: '#3F3F3F', - /** link 字体颜色*/ - linkTextColor: '#FFFFFF' - }; - this[deviceType.Section] = { - sectionTextPosition: 0, // 区段名称位置 1 上行 -1 下面 0 默认 - /** 区段 宽度*/ - sectionWidth: 5, - /** 区段宽超出宽度*/ - sectionBeyondWidth: 1, - /** 计轴 半径*/ - sectionAxleR: 3, - /** 计轴和区段之间的距离*/ - sectionAxleDistance: 5, - /** 限速线的宽度*/ - sectionSpeedLimitLinewidth: 1, - /** 限速线距离区段距离*/ - sectionSpeedLimitDistance: 5, - /** 分隔符宽度*/ - sectionSeparatorWidth: 1.2, - sectionEndSeparatorWidth: 1.2, // 尽头分隔符宽度 - sectionEndSeparatorStroke: '#7F7F7F', // 尽头分隔符颜色 - /** 区段侵入颜色*/ - sectionInvadeColor: '#EF0C08', - /** 限速线颜色*/ - sectionSpeedLimitColor: '#FFFF00', - /** 逻辑区段颜色*/ - sectionLogicalBackgroundColor: '#FFFF00', - /** 区段计轴颜色*/ - sectionAxleColor: '#FFFFFF', - /** 区段边界符颜色*/ - sectionSeparatorColor: '#C0C0C0', - /** 区段空闲颜色*/ - sectionSpareColor: '#0000FF', - /** 逻辑区段名称颜色*/ - sectionLogicalTextColor: '#C0C0C0', - /** 区段通信车占用颜色**/ - sectionCommunicationOccupiedColor: '#FF329A', - /** 区段非通讯车占用颜色*/ - sectionUnCommunicationOccupiedColor: '#FE0000', - /** 区段路由锁定颜色*/ - sectionRouteLockColor: '#FFFFFF', - /** 区段故障锁定颜色*/ - sectionFaultLockColor: '#9B4A0A', - /** 区段未定义颜色*/ - sectionUndefinedColor: '#0071C1', - /** 保护区段锁闭*/ - sectionProtectionSectionLockedColor: '#FEFF00', - /** 区段计轴预复位*/ - sectionAxleResetColor: '#00FFFF', - /** 区段封锁颜色*/ - sectionBlockColor: '#800080', - /** 区段atc切除颜色*/ - sectionAtcExcisionColor: '#A0522D', - /** 区段ats切除颜色*/ - sectionAtsExcisionColor: '#A0522D', - /** 区段延时释放颜色*/ - sectionTimeReleaseColor: '#3F3F3F', - /** 区段保护锁闭*/ - sectionProtectiveLockColor: '#FFFF00', - /** 区段保护延时解锁*/ - sectionProtectiveTimeReleaseColor: '#0071C1', - /** 计轴失效*/ - sectionAxleFailure: '#E6A23C' // #FFFF00 - }; - this[deviceType.Signal] = { - /** 信号机宽度 */ - signalR: 5, - /** 自动信号宽度*/ - signalAutoWidth: 6, - /** 延迟解锁字体大小*/ - signalDelayTextFontSize: 10, - /** 信号机名称字体大小*/ - signalTextFontSize: 12, - /** 灯柱宽度*/ - signalLampStandardWidth: 1.2, - /** 设备距离区段的距离*/ - signalDistance: 19, - /** 信号灯按钮距离区段的距离*/ - signalButtonDistance: 5, - /** 自动进路方向*/ - signalSigRouteDirection: false, - /** 自动进路偏移量*/ - signalSigRouteOffset: { x: 4, y: -2 }, - /** 自动通过方向*/ - signalSigPassDirection: true, - /** 自动通过偏移量*/ - signalSigPassOffset: { x: 4, y: 0}, - /** 延时解锁方向*/ - signalSigDelayDirection: false, - /** 延时解锁偏移量*/ - signalSigDelayOffset: { x: 0, y: -5}, - /** 信号灯按钮边线*/ - signalButtonDashColor: '#FFFFFF', - /** 信号灯按钮颜色*/ - signalButtonColor: 'darkgreen', - /** 信号灯按钮闪烁颜色*/ - signalButtonLightenColor: '#E4EF50', - /** 信号灯字体颜色*/ - signalTextRed: '#EF0C08', - /** 信号机字体绿色*/ - signalTextGreen: '#4DD43F', - /** 信号灯灯柱颜色*/ - signalLampStandardColor: '#C0C0C0', // #3E44BE, - /** 信号灯锁闭*/ - signalBlockColor: '#EF0C08', - /** 信号灯灰色*/ - signalLampGrayColor: '#808080', - /** 信号灯红色*/ - signalLampRedColor: '#EF0C08', - /** 信号灯绿色*/ - signalLampGreenColor: '#4DD43F', - /** 信号灯黄色*/ - signalLampYellowColor: '#E4EF50', - /** 信号灯白色*/ - signalLampWhiteColor: '#FFFFFF', - /** 信号灯蓝色*/ - signalLampBlueColor: '#3E44BE' - }; - this[deviceType.StationStand] = { - /** 站台和屏蔽门之间的距离*/ - standDistance: 9, - /** 站台屏蔽门高度*/ - standSafeHeight: 1.6, - /** 站台首端字体大小*/ - standHeadFontSize: 8, - /** 站台默认字体大小*/ - standTextFontSize: 8, - /** 站台紧急关闭半径*/ - standEmergentR: 4, - /** 站台紧急关闭偏移量*/ - standEmergentOffset: {x: 0, y: 0}, - /** 扣车方向*/ - standDetainDirection: 1, - /** 扣车偏移量*/ - standDetainOffset: {x: -8, y: 13}, - /** 运行时间方向*/ - standTimeDirection: 1, - /** 运行时间偏移量*/ - standTimeOffset: {x: -8, y: 3}, - /** 运行等级方向*/ - standLevelDirection: 1, - /** 运行等级偏移量*/ - standLevelOffset: {x: -8, y: 22}, - /** 折返方向*/ - standReentryDirection: 0, - /** 折返偏移量*/ - standReentryOffset: {x: -16, y: 18}, - /** 扣车显示内容*/ - standDetainText: 'H', - /** 站台无人折返*/ - standNoHumanReentryColor: '#0F16DA', - /** 站台自动换端*/ - standAutoChangeEndsColor: '#0BF400', - /** 站台空闲颜色*/ - standSpareColor: '#ffffff', - /** 站台列车停站颜色*/ - standStopColor: '#FEFE00', - /** 站台跳停颜色*/ - standJumpStopColor: '#9A99FF', - /** 站台指定列车跳停颜色*/ - standDesignatedJumpStopColor: 'lightSkyBlue', - /** 站台紧急关闭颜色*/ - standEmergentCloseColor: '#F61107', - /** 停站时间字体颜色*/ - standTimeTextColor: '#FFFFFF', - /** 停站等级字体颜色*/ - standLevelTextColor: '#FFFFFF', - /** 车站扣车颜色*/ - standDetainTrainColor: '#E4EF50', - /** 中心扣车颜色*/ - standCenterDetainTrainColor: '#FFFFFF', - /** 车站+中心扣车颜色*/ - standAndCenterDetainTrainColor: '#F61107', - /** 屏蔽门默认颜色*/ - standDoorDefaultColor: '#00FF00', - /** 屏蔽门切除颜色*/ - standSplitDoorColor: '#F61107', - /** 车站扣除文字颜色*/ - standDetainTrainTextColor: '#E4EF50', - /** 计数器字体颜色*/ - stationCounterTextColor: '#FFFFFF', - /** 计数器边框颜色*/ - stationCounterBorderColor: '#E4EF50', - /** 延迟解锁倒计时和设备文字之间的距离*/ - stationDelayUnlockDistance: 3, - /** 延时解锁字体颜色*/ - stationDelayUnlockTextColor: '#FFFFFF', - /** 延迟解锁边框颜色*/ - stationDelayUnlockBorderColor: '#FFFFFF' - }; - this[deviceType.StationControl] = { - singleControlNum: 3, // 灯数 - stationOffset: {x: 20, y: 0}, // 控制模式灯位置偏移量 - arrowsShow: false, // 控制模式箭头显隐 - /** 控制模式字体大小*/ - stationControlTextSize: 12, - /** 控制模式灯的半径 */ - stationControlmodeR: 5, - /** 控制模式之间灯之间的距离*/ - stationControlDistance: 44, - /** 控制模式灰色*/ - stationControlGrayColor: '#74747C', - /** 控制模式绿色*/ - stationControlGreenColor: '#4DD43F', - /** 控制模式红色*/ - stationControlRedColor: '#EF0C08', - /** 控制模式黄色*/ - stationControlYellowColor: '#E4EF50' - }; - this[deviceType.Station] = { - kilometerPosition: 'down' // 公里标位置 - }; - this[deviceType.Switch] = { - // 道岔字体颜色 - switchTextColor: '#FF00C0', - /** 道岔单边长度 */ - switchLen: 6, - /** 道岔名称与区段距离*/ - switchNameDistance: 2, - /** 道岔边框颜色*/ - switchTextBorderColor: '#FE0000', - /** 道岔失去颜色*/ - switchTextLossColor: '#FFFFFF', - /** 道岔定位颜色*/ - switchTextLocateColor: '#00FF00', - /** 道岔反位颜色*/ - switchInversionColor: '#9C9D09', - /** 道岔单锁颜色*/ - switchMonolockColor: '#870E10', - /** 列车服务号偏移 */ - trainServerOffset: { x: -1, y: 1}, - /** 列车车次号偏移 */ - trainTargetOffset: { x: -1, y: 1} - }; - this[deviceType.Train] = { - /** 车身line宽 */ - trainBodyLineWidth: 0, - /** 车身鼠标悬浮事件 */ - trainBodyOnMouseOver: {train: true, textTrainNumber: true, textTrainServer: true, textTrainTarget: true, textTrainTargetNumber: true}, - /** 车身鼠标移出事件 */ - trainBodyOnMouseOut: {train: true, textTrainNumber: true, textTrainServer: true, textTrainTarget: true, textTrainTargetNumber: true}, - /** 目的地码前缀*/ - targetCodePrefix: '000', - /** 默认目的地码 */ - defaultTargetCode: 'AAA', - /** 服务号(表号)前缀 */ - serviceNumberPrefix: '00', - /** 默认服务号(表号) */ - defaultServiceNumber: 'BB', - /** 车次号前缀 */ - tripNumberPrefix: '0000', - /** 默认车次号1 */ - defaultDirectionCode: 'D', - /** 默认车次号2 */ - defaultTripNumber: 'CCC', - /** 车组号前缀 */ - groupNumberPrefix: '000', - /** 默认车组号 */ - defaultGroupNumber: 'EEE', - /** 列车车头比车身高出的长度,上下相比车体伸出去的边框*/ - trainMoreLength: 1, - /** 列车车头三角坐标1偏移量 */ - trainHeadTriangleFirst: { x: 0, y: 0}, - /** 列车车头三角坐标2偏移量 */ - trainHeadTriangleSecond: { x: 4, y: 8.5}, - /** 列车车头三角坐标3偏移量 */ - trainHeadTriangleThird: { x: 0, y: 15}, - /** 列车高度*/ - trainHeight: 17, - /** 列车和车头之间的间距*/ - trainHeadDistance: 2, - /** 列车车头矩形高度 */ - trainHeadRectHeight: 15, - /** 列车长度*/ - trainWidth: 76, - /** 列车竖杠的宽度*/ - trainConntWidth: 4, - /** 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度 */ - changeTrainWidth: true, - /** 是否根据nameFormat去动态加载车组号、服务号、车次号、目的地码 */ - dynamicLoadingDisplay: true, - /** 特殊列车类型需设置显示格式 */ - specialTrainType: [], - /** 两边间隔 */ - lrPadding: 1, - /** 上边距离 */ - upPadding: 1, - /** 列车字号*/ - trainTextFontSize: 15, - /** 目的地状态 01准点 02早点 03严重早点 04晚点 05严重晚点 06头码车 07ATP切除 */ - destinationStatus: [ - {status: '01', showColor: '#FFFFFF'}, - {status: '02', showColor: '#00FF00'}, - {status: '03', showColor: '#3265FF'}, - {status: '04', showColor: '#9B4A09'}, - {status: '05', showColor: '#EF0C08'}, - {status: '06', showColor: '#FFFFFF'}, - {status: '07', showColor: '#FFFF00'} - ], - /** 默认字体 族类*/ - textFontFormat: '宋体', - /** 列车HDSA字号*/ - trainHSDATextFontSize: 8, - /** 服务号状态类型 eg:{type: '01', showColor: '#FFFFFF'} */ - serverNoType: [], - /** 运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行*/ - directionType: [ - {type: '01', lineLShow: false, lineRShow: false, arrowLShow: false, arrowRShow: false }, - {type: '02', lineLShow: false, lineRShow: false, arrowLShow: false, arrowRShow: true }, - {type: '03', lineLShow: false, lineRShow: false, arrowLShow: true, arrowRShow: false } - ], - /** 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行 */ - directionStopType: [ - {type: '01', lineLShow: false, lineRShow: false}, - {type: '02', lineLShow: false, lineRShow: true}, - {type: '03', lineLShow: true, lineRShow: false} - ], - /** 列车运行模式对应车头颜色 01信号中断 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM - * 04 限制人工驾驶模式RM 05 非限制人工驾驶模式RM*/ - runModeStatus: [ - {status: '01', trainLColor: '#EF0C08', trainRColor: '#EF0C08'}, - {status: '02', trainLColor: '#00FF00', trainRColor: '#00FF00'}, - {status: '03', trainLColor: '#FFFF00', trainRColor: '#FFFF00'}, - {status: '04', trainLColor: '#EA700D', trainRColor: '#EA700D'}, - {status: '05', trainLColor: '#A0522D', trainRColor: '#A0522D'} - ], - /** 设置运行控制状态类型 eg:{status: '01', hShow: false, sShow: false}, */ - runControlStatus: [], - /** 设置车门状态类型 eg:{status: '01', dShow: false}, */ - doorStatus: [], - /** 设置通信状态 eg:{status: '01', trainColor:'#725A64'}, */ - communicationStatus: [], - /** 设置报警状态 eg:{status: '01', aShow: false}, */ - alarmStatus: [], - /** 列车车头矩形填充颜色 */ - trainHeadFillColor: '#EF0C08', - /** 列车车身填充颜色 */ - trainBodyFillColor: '#000000', - /** 列车服务号偏移 */ - trainServerOffset: { x: -1, y: 1}, - /** 列车车次号偏移 */ - trainTargetOffset: { x: -1, y: 1}, - /** 列车显示格式 */ - trainNameFormat: 'targetCode:serviceNumber:tripNumber', - /** 字体大小 */ - nameFontSize: 10, - /** 目的地码文字显示位置 */ - trainTargetTextAlign: 'left', - /** 是否需创建textHSDA对象 */ - haveTextHSDA: false, - /** 是否需创建arrowText对象 */ - haveArrowText: true, - /** 是否需创建trainBorder对象 */ - haveTrainBorder: false - }; - this[deviceType.TrainWindow] = { - /** 车次窗颜色*/ - trainWindowColor: '#4DD43F', - /** 车次窗虚线间隔 */ - trainWindowLineDash: null, - /** 车次窗线宽 */ - trainWindowLineWidth: 1.5, - /** 车次窗矩形圆滑程度 */ - trainWindowSmooth: 0 + lineWidthColor: '#FFFFFF', // line 颜色 + linkWidth: 4.4, // link 宽度 + linkColor: '#3F3F3F', // link 线条颜色 + linkTextColor: '#FFFFFF' // link 字体颜色 }; } } diff --git a/src/jmap/config/skinStyle/bejing_01.js b/src/jmap/config/skinStyle/bejing_01.js index 373284fa4..b45add1a3 100644 --- a/src/jmap/config/skinStyle/bejing_01.js +++ b/src/jmap/config/skinStyle/bejing_01.js @@ -5,24 +5,21 @@ class SkinStyle extends defaultStyle { constructor() { super(); this[deviceType.Link] = { - /** line 颜色*/ - lineWidthColor: '#FFFFFF', - /** link 宽度*/ - linkWidth: 4.4, - /** link 线条颜色*/ - linkColor: '#3F3F3F', - /** link 字体颜色*/ - linkTextColor: '#FFFFFF' + lineWidthColor: '#FFFFFF', // line 颜色 + linkWidth: 4.4, // link 宽度 + linkColor: '#3F3F3F', // link 线条颜色 + linkTextColor: '#FFFFFF' // link 字体颜色 }; + this[deviceType.Section] = { - text: { // 区段文字属性 - fontSize: 10, // 字体大小 - fontFormat: 'consolas', // 字体族类 - fontColor: '#C0C0C0', // 字体颜色 - textAlign: 'center', // 水平对齐方式 - textPosition: 'inside', // 文字位置 - textVerticalAlign: 'middle', // 文字垂直对齐方式 - position: 1 // 区段名称位置 1 上面 -1 下面 0 默认 + text: { // 区段文字属性 + fontSize: 10, // 字体大小 + fontFormat: 'consolas', // 字体族类 + fontColor: '#C0C0C0', // 字体颜色 + textAlign: 'center', // 水平对齐方式 + textPosition: 'inside', // 文字位置 + textVerticalAlign: 'middle', // 文字垂直对齐方式 + position: 1 // 区段名称位置 1 上面 -1 下面 0 默认 }, mouseOverStyle: { borderColor: '#fff', @@ -30,129 +27,95 @@ class SkinStyle extends defaultStyle { textShadowColor: '#22DFDF' }, line: { - width: 5, // 区段宽度 - beyondWidth: 0, // 区段宽超出宽度 - invadeColor: '#EF0C08', // 区段侵入颜色 - spareColor: '#606060', // 区段空闲颜色 - communicationOccupiedColor: '#FF0000', // 区段通信车占用颜色 - unCommunicationOccupiedColor: '#800080', // 区段非通讯车占用颜色 - routeLockColor: '#FFFFFF', // 区段路由锁定颜色 - faultLockColor: '#006400', // 区段故障锁定颜色 - undefinedColor: '#0071C1', // 区段未定义颜色 - protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用) - blockColor: '#800080', // 区段封锁颜色 - atcExcisionColor: '#A0522D', // 区段atc切除颜色 - atsExcisionColor: '#A0522D', // 区段ats切除颜色 - timeReleaseColor: '#3F3F3F', // 区段延时释放颜色 - protectiveLockColor: '#FFFF00', // 区段保护锁闭 - protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁 - logicalColor: '#FFFF00', // 逻辑区段颜色 (未用) - logicalTextColor: '#C0C0C0' // 逻辑区段名称颜色 (未用) + width: 5, // 区段宽度 + beyondWidth: 0, // 区段宽超出宽度 + invadeColor: '#EF0C08', // 区段侵入颜色 + spareColor: '#606060', // 区段空闲颜色 + communicationOccupiedColor: '#FF0000', // 区段通信车占用颜色 + unCommunicationOccupiedColor: '#800080', // 区段非通讯车占用颜色 + routeLockColor: '#FFFFFF', // 区段路由锁定颜色 + faultLockColor: '#006400', // 区段故障锁定颜色 + undefinedColor: '#0071C1', // 区段未定义颜色 + protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用) + blockColor: '#800080', // 区段封锁颜色 + atcExcisionColor: '#A0522D', // 区段atc切除颜色 + atsExcisionColor: '#A0522D', // 区段ats切除颜色 + timeReleaseColor: '#3F3F3F', // 区段延时释放颜色 + protectiveLockColor: '#FFFF00', // 区段保护锁闭 + protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁 + logicalColor: '#FFFF00', // 逻辑区段颜色 (未用) + logicalTextColor: '#C0C0C0' // 逻辑区段名称颜色 (未用) }, axle: { - radius: 3, // 计轴 半径 - distance: 5, // 计轴和区段之间的距离 (未用) - color: '#C0C0C0', // 区段计轴颜色 - resetColor: '#00FFFF', // 区段计轴预复位颜色 - Failure: '#E6A23C' // #FFFF00 计轴失效 + radius: 3, // 计轴 半径 + distance: 5, // 计轴和区段之间的距离 (未用) + color: '#C0C0C0', // 区段计轴颜色 + resetColor: '#00FFFF', // 区段计轴预复位颜色 + Failure: '#E6A23C' // #FFFF00 计轴失效 }, - speedLimit: { // 限速元素 - width: 1, // 限速线的宽度 - Distance: 5, // 限速线距离区段距离 - lineColor: '#FFFF00' // 限速线颜色 + speedLimit: { // 限速元素 + width: 1, // 限速线的宽度 + Distance: 5, // 限速线距离区段距离 + lineColor: '#FFFF00' // 限速线颜色 }, separator: { - width: 1.5, // 分隔符宽度 - endWidth: 1.5, // 尽头分隔符宽度 - endColor: '#7F7F7F', // 尽头分隔符颜色 - color: '#7F7F7F' // 区段边界符颜色 + width: 1.5, // 分隔符宽度 + endWidth: 1.5, // 尽头分隔符宽度 + endColor: '#7F7F7F', // 尽头分隔符颜色 + color: '#7F7F7F' // 区段边界符颜色 } }; + this[deviceType.Signal] = { - /** 设备距离区段的距离*/ - signalDistance: 0, + signalDistance: 0, // 设备距离区段的距离 post: { - /** 信号灯灯柱颜色*/ - signalLampStandardColor: '#5578B6', - signalLampStandardWidth: 1.5 + standardColor: '#5578B6', // 灯灯柱颜色 + standardWidth: 1.5 // 灯柱宽度 }, text: { - /** 文字和灯杆的距离*/ - distance: 3, - /** 是否禁止旋转*/ - isNoRotation: true, - /** 信号字体对其方式*/ - isAlignCenter: false, - /** 信号机名称字体大小*/ - signalTextFontSize: 10, - /** 信号灯字体默认色*/ - signalDefaultTextColor: '#C0C0C0', - /** 信号灯字体锁定颜色*/ - signalTextBlockColor: '#EF0C08', - /** 信号字体*/ - signalTextblock: '#00FF00' + distance: 3, // 文字和灯杆的距离 + isNoRotation: true, // 是否禁止旋转 + isAlignCenter: false, // 信号字体对其方式 + fontSize: 10, // 信号机名称字体大小 + defaultColor: '#C0C0C0', // 信号灯字体默认色 + blockColor: '#EF0C08', // 信号灯字体锁定颜色 + checkColor: '#00FF00' // 信号字体 }, lamp: { - /** 禁止线宽度*/ - signalStopWidth: 2, - /** 信号灯边框线宽度*/ - signalBorderWidth: 1, - /** 信号灯边框线颜色*/ - signalBorderColor: '#3149C3', - /** 信号机宽度 */ - signalR: 5, - /** 信号灯锁闭*/ - signalBlockColor: '#EF0C08', - /** 信号灯灰色*/ - signalLampGrayColor: '#7F7F7F', - /** 信号灯红色*/ - signalLampRedColor: '#FF0000', - /** 信号灯绿色*/ - signalLampGreenColor: '#00FF00', - /** 信号灯黄色*/ - signalLampYellowColor: '#FFFF00', - /** 信号灯白色*/ - signalLampWhiteColor: '#FFFFFF', - /** 信号灯蓝色*/ - signalLampBlueColor: '#0070C0' + stopWidth: 2, // 禁止线宽度 + borderWidth: 1, // 信号灯边框线宽度 + borderColor: '#3149C3', // 信号灯边框线颜色 + radiusR: 5, // 信号机宽度 + blockColor: '#EF0C08', // 信号灯锁闭 + grayColor: '#7F7F7F', // 信号灯灰色 + redColor: '#FF0000', // 信号灯红色 + greenColor: '#00FF00', // 信号灯绿色 + yellowColor: '#FFFF00', // 信号灯黄色 + whiteColor: '#FFFFFF', // 信号灯白色 + blueColor: '#0070C0' // 信号灯蓝色 }, route: { - /** 自动进路方向*/ - signalRouteDirection: false, - /** 自动进路偏移量*/ - signalRouteOffset: { x: 4, y: -2 }, - /** 自动进路*/ - signalRouteColor: '#00FF00' + direction: false, // 自动进路方向 + offset: { x: 4, y: -2 }, // 自动进路偏移量 + routeColor: '#00FF00' // 自动进路 }, auto: { - /** 自动通过方向*/ - signalAutoDirection: true, - /** 自动通过偏移量*/ - signalAutoOffset: { x: 4, y: 0}, - /** 自动进路*/ - signalAutoRoute: '#00FF00', - /** 自动触发*/ - signalAutoTrigger: '#FFFF00' + direction: true, // 自动通过方向 + offset: { x: 4, y: 0}, // 自动通过偏移量 + autoRoute: '#00FF00', // 自动进路 + autoTrigger: '#FFFF00' // 自动触发 }, delay: { - /** 延迟解锁字体大小*/ - signalDelayTextFontSize: 9, - /** 延时解锁方向*/ - signalDelayDirection: false, - /** 延时解锁偏移量*/ - signalDelayOffset: { x: 0, y: -5}, - /** 延迟解锁颜色*/ - signalDelayTextColor: '#FF0000' + direction: false, // 延时解锁方向 + offset: { x: 0, y: -5}, // 延时解锁偏移量 + fontSize: 9, // 延迟解锁字体大小 + fontColor: '#FF0000' // 延迟解锁颜色 }, button: { - /** 信号灯按钮距离区段的距离*/ - signalButtonDistance: 5, - /** 信号灯按钮边线*/ - signalButtonDashColor: '#FFFFFF', - /** 信号灯按钮颜色*/ - signalButtonColor: 'darkgreen', - /** 信号灯按钮闪烁颜色*/ - signalButtonLightenColor: '#E4EF50' + distance: 5, // 信号灯按钮距离区段的距离 + borderDashColor: '#FFFFFF', // 信号灯按钮边线 + buttonColor: 'darkgreen', // 信号灯按钮颜色 + buttonLightenColor: '#E4EF50' // 信号灯按钮闪烁颜色 }, mouseOverStyle: { borderLineColor: '#FFFFFF', @@ -163,51 +126,51 @@ class SkinStyle extends defaultStyle { }; this[deviceType.StationStand] = { - common: { // 通用属性 - textFontSize: 8 // 站台默认字体大小 + common: { // 通用属性 + textFontSize: 8 // 站台默认字体大小 }, - safetyDoor: { // 屏蔽门 - height: 1.6, // 站台屏蔽门高度 - distance: 9, // 站台和屏蔽门之间的距离 - defaultColor: '#00FF00', // 屏蔽门默认颜色 - splitDoorColor: '#F61107' // 屏蔽门切除颜色 + safetyDoor: { // 屏蔽门 + height: 1.6, // 站台屏蔽门高度 + distance: 9, // 站台和屏蔽门之间的距离 + defaultColor: '#00FF00', // 屏蔽门默认颜色 + splitDoorColor: '#F61107' // 屏蔽门切除颜色 }, - stand: { // 站台 - headFontSize: 8, // 站台首端字体大小 - spareColor: '#606060', // 站台空闲颜色 - stopColor: '#FEFE00', // 站台列车停站颜色 - jumpStopColor: '#9A99FF', // 站台跳停颜色 - designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色 + stand: { // 站台 + headFontSize: 8, // 站台首端字体大小 + spareColor: '#606060', // 站台空闲颜色 + stopColor: '#FEFE00', // 站台列车停站颜色 + jumpStopColor: '#9A99FF', // 站台跳停颜色 + designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色 }, - standEmergent: { // 紧急关闭 - mergentR: 4, // 站台紧急关闭半径 - offset: {x: 0, y: 0}, // 站台紧急关闭偏移量 - closeColor: '#F61107' // 站台紧急关闭颜色 + standEmergent: { // 紧急关闭 + mergentR: 4, // 站台紧急关闭半径 + offset: {x: 0, y: 0}, // 站台紧急关闭偏移量 + closeColor: '#F61107' // 站台紧急关闭颜色 }, - reentry: { // 站台折返策略 - direction: 0, // 折返方向 - offset: {x: -16, y: 18}, // 折返偏移量 - noHumanColor: '#0F16DA', // 站台无人折返 - AutoChangeEndsColor: '#0BF400' // 站台自动换端 + reentry: { // 站台折返策略 + direction: 0, // 折返方向 + offset: {x: -16, y: 18}, // 折返偏移量 + noHumanColor: '#0F16DA', // 站台无人折返 + autoChangeEndsColor: '#0BF400' // 站台自动换端 }, - detainCar: { // 扣车 - text: 'H', // 扣车显示内容 - direction: 1, // 扣车方向 - offset: {x: -8, y: 13}, // 扣车偏移量 - trainColor: '#E4EF50', // 车站扣车颜色 - centerTrainColor: '#FFFFFF', // 中心扣车颜色 - andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 - detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色 + detainCar: { // 扣车 + text: 'H', // 扣车显示内容 + direction: 1, // 扣车方向 + offset: {x: -8, y: 13}, // 扣车偏移量 + trainColor: '#E4EF50', // 车站扣车颜色 + centerTrainColor: '#FFFFFF', // 中心扣车颜色 + andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 + detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色 }, - stopTime: { // 停站时间 - direction: 1, // 运行时间方向 - offset: {x: -8, y: 3}, // 运行时间偏移量 - textColor: '#FFFFFF' // 停站时间字体颜色 + stopTime: { // 停站时间 + direction: 1, // 运行时间方向 + offset: {x: -8, y: 3}, // 运行时间偏移量 + textColor: '#FFFFFF' // 停站时间字体颜色 }, - level: { // 运行等级 - direction: 1, // 运行等级方向 - offset: {x: -8, y: 22}, // 运行等级偏移量 - textColor: '#FFFFFF' // 停站等级字体颜色 + level: { // 运行等级 + direction: 1, // 运行等级方向 + offset: {x: -8, y: 22}, // 运行等级偏移量 + textColor: '#FFFFFF' // 停站等级字体颜色 }, mouseOverStyle: { borderLineColor: '#FFFFFF', @@ -217,32 +180,28 @@ class SkinStyle extends defaultStyle { this[deviceType.StationControl] = { text: { - fontSize: 10, - fontFormat: 'consolas', - fontColor: '#ffffff', - fontWeight: 'normal', - textAlign: 'middle', - textVerticalAlign: 'top' + fontSize: 10, // 控制模式字体大小 + fontFormat: 'consolas', // 控制模式字体格式 + fontColor: '#ffffff', // 控制模式字体颜色 + fontWeight: 'normal', // 控制模式字体粗细 + textAlign: 'middle', // 控制模式水平对齐 + textVerticalAlign: 'top' // 控制模式垂直对齐 }, - singleControlNum: 3, - stationOffset: { x: 20, y: 0 }, - arrowsShow: false, // 控制模式箭头显隐 - /** 控制模式字体大小*/ - stationControlTextSize: 10, - /** 控制模式灯的半径 */ - stationControlmodeR: 6, - /** 控制模式之间灯之间的距离*/ - stationControlDistance: 36, - /** 控制模式灰色*/ - stationControlGrayColor: '#7F7F7F', - /** 控制模式绿色*/ - stationControlGreenColor: '#00FF00', - /** 控制模式红色*/ - stationControlRedColor: '#FF0000', - /** 控制模式黄色*/ - stationControlYellowColor: '#FFFF00', - /** 鼠标悬浮样式 */ - mouseOverStyle: { + lamp: { + count: 3, // 控制模式灯个数 + offset: { x: 20, y: 0 }, // 偏移量 + radiusR: 6, // 控制模式灯的半径 + distance: 36, // 控制模式之间灯之间的距离 + grayColor: '#7F7F7F', // 控制模式灰色 + greenColor: '#00FF00', // 控制模式绿色 + redColor: '#FF0000', // 控制模式红色 + yellowColor: '#FFFF00' // 控制模式黄色 + + }, + arrow: { + show: false // 控制模式箭头显隐 + }, + mouseOverStyle: { // 鼠标悬浮样式 fontSize: 10, fontFormat: 'consolas', fontColor: '#FFF000', @@ -253,43 +212,43 @@ class SkinStyle extends defaultStyle { }; this[deviceType.Station] = { - kilometerPosition: 'down' // 公里标位置 + kilometerPosition: 'down' // 公里标位置 }; this[deviceType.Switch] = { - mouseOverStyle: { - borderBackgroundColor: '#22DFDF', - borderColor: '#fff', - textShadowColor: '#22DFDF' - }, text: { /** 道岔名称与区段距离*/ - switchNameDistance: 2, + distance: 2, /** 道岔边框颜色*/ - switchTextBorderColor: '#FE0000', + borderColor: '#FE0000', /** 道岔失去颜色*/ - switchTextLossColor: '#FFFFFF', + lossColor: '#FFFFFF', /** 道岔定位颜色*/ - switchTextLocateColor: '#00FF00', + locateColor: '#00FF00', /** 道岔反位颜色*/ - switchInversionColor: '#9C9D09', + inversionColor: '#9C9D09', /** 道岔单锁颜色*/ - switchMonolockColor: '#870E10' + monolockColor: '#870E10' }, core: { /** 道岔单边长度 */ - switchLen: 6 + legnth: 6 + }, + mouseOverStyle: { + borderBackgroundColor: '#22DFDF', // 边框背景色 + borderColor: '#fff', // 边框颜色 + textShadowColor: '#22DFDF' // 字体阴影颜色 } }; this[deviceType.LcControl] = { text: { - fontSize: 10, - distance: 5 // 灯跟文字距离 + fontSize: 10, // 灯字体大小 + distance: 5 // 灯跟文字距离 }, lamp: { - radiusR: 6, - controlColor: '#FFFF00' + radiusR: 6, // 灯大小 + controlColor: '#FFFF00' // 灯颜色 }, mouseOverStyle: { fontSize: 10, @@ -302,14 +261,15 @@ class SkinStyle extends defaultStyle { textColor: '#000000' } }; + this[deviceType.ZcControl] = { text: { - fontSize: 10, - distance: 5 // 灯跟文字距离 + fontSize: 10, // 字体大小 + distance: 5 // 灯跟文字距离 }, lamp: { - radiusR: 6, - controlColor: '#00FF00' + radiusR: 6, // 灯大小 + controlColor: '#00FF00' // 灯颜色 }, mouseOverStyle: { fontSize: 10, @@ -322,14 +282,15 @@ class SkinStyle extends defaultStyle { textColor: '#000000' } }; + this[deviceType.LimitControl] = { text: { - fontSize: 10, - distance: 5 // 灯跟文字距离 + fontSize: 10, // 字体大小 + distance: 5 // 灯跟文字距离 }, lamp: { - radiusR: 6, - controlColor: '#ECE9D8' + radiusR: 6, // 灯大小 + controlColor: '#ECE9D8' // 灯颜色 }, mouseOverStyle: { fontSize: 10, @@ -341,6 +302,18 @@ class SkinStyle extends defaultStyle { arcColor: '#00FFFF' } }; + + this[deviceType.Line] = { + lineColor: '#FFFFFF' // 线条颜色 + }; + + this[deviceType.TrainWindow] = { + trainWindowColor: '#FFF', // 车次窗颜色 + lineDash: [3, 3], // 车次窗虚线间隔 + trainWindowLineWidth: 1, // 车次窗线宽 + trainWindowSmooth: 0.01 // 车次窗矩形圆滑程度 + }; + this[deviceType.Train] = { /** 车身line宽 */ trainBodyLineWidth: 0.1, @@ -479,19 +452,6 @@ class SkinStyle extends defaultStyle { /** 目的地码文字显示位置 */ trainTargetTextAlign: 'right' }; - this[deviceType.TrainWindow] = { - /** 车次窗颜色*/ - trainWindowColor: '#FFF', - /** 车次窗虚线间隔 */ - lineDash: [3, 3], - /** 车次窗线宽 */ - trainWindowLineWidth: 1, - /** 车次窗矩形圆滑程度 */ - trainWindowSmooth: 0.01 - }; - this[deviceType.Line] = { - lineColor: '#FFFFFF' - }; } } diff --git a/src/jmap/config/skinStyle/chengdu_03.js b/src/jmap/config/skinStyle/chengdu_03.js index d0cde5733..6abd70b84 100644 --- a/src/jmap/config/skinStyle/chengdu_03.js +++ b/src/jmap/config/skinStyle/chengdu_03.js @@ -5,18 +5,14 @@ class SkinStyle extends defaultStyle { constructor() { super(); this[deviceType.Link] = { - /** line 颜色*/ - lineWidthColor: '#FFFFFF', - /** link 宽度*/ - linkWidth: 4.4, - /** link 线条颜色*/ - linkColor: '#3F3F3F', - /** link 字体颜色*/ - linkTextColor: '#FFFFFF' + lineWidthColor: '#FFFFFF', // line 颜色 + linkWidth: 4.4, // link 宽度 + linkColor: '#3F3F3F', // link 线条颜色 + linkTextColor: '#FFFFFF' // link 字体颜色 }; this[deviceType.Section] = { text: { // 区段文字属性 - fontSize: 10, // 字体大小 + fontSize: 12, // 字体大小 fontFormat: 'consolas', // 字体族类 fontColor: '#FFFFFF', // 字体颜色 textAlign: 'center', // 水平对齐方式 @@ -63,302 +59,274 @@ class SkinStyle extends defaultStyle { color: '#FFFFFF' // 区段边界符颜色 } }; + this[deviceType.Signal] = { - /** 设备距离区段的距离*/ - signalDistance: 10, + signalDistance: 10, // 设备距离区段的距离 post: { - signalLampStandardColor: '#FFFFFF', - signalLampStandardWidth: 2 + standardColor: '#FFFFFF', // 灯柱颜色 + standardWidth: 2 // 灯柱宽度 }, text: { - /** 文字和灯杆的距离*/ - distance: 0, - /** 是否禁止旋转*/ - isNoRotation: true, - /** 信号字体对其方式*/ - isAlignCenter: false, - /** 信号机名称字体大小*/ - signalTextFontSize: 10, - /** 信号灯字体默认色*/ - signalDefaultTextColor: '#FFFFFF', - /** 信号灯字体锁定颜色*/ - signalTextBlockColor: '#EF0C08', - /** 信号字体*/ - signalTextblock: '#00FF00' + distance: 3, // 文字和灯杆的距离 + isNoRotation: true, // 是否禁止旋转 + isAlignCenter: false, // 信号字体对其方式 + fontSize: 12, // 信号机名称字体大小 + defaultColor: '#FFFFFF', // 信号灯字体默认色 + blockColor: '#EF0C08', // 信号灯字体锁定颜色 + checkColor: '#00FF00' // 信号保护区段检查颜色 }, lamp: { - /** 禁止线宽度*/ - signalStopWidth: 2, - /** 信号灯边框线宽度*/ - signalBorderWidth: 2, - /** 信号灯边框线颜色*/ - signalBorderColor: '#3149C3', - /** 信号灯半径*/ - signalR: 6, - /** 信号灯锁闭*/ - signalBlockColor: '#EF0C08', - /** 信号灯灰色*/ - signalLampGrayColor: '#7F7F7F', - /** 信号灯红色*/ - signalLampRedColor: '#FF0000', - /** 信号灯绿色*/ - signalLampGreenColor: '#00FF00', - /** 信号灯黄色*/ - signalLampYellowColor: '#FFFF00', - /** 信号灯白色*/ - signalLampWhiteColor: '#FFFFFF', - /** 信号灯蓝色*/ - signalLampBlueColor: '#0070C0' + stopWidth: 2, // 禁止线宽度 + borderWidth: 2, // 信号灯边框线宽度 + borderColor: '#3149C3', // 信号灯边框线颜色 + radiusR: 6, // 信号灯半径 + blockColor: '#EF0C08', // 信号灯锁闭 + grayColor: '#7F7F7F', // 信号灯灰色 + redColor: '#FF0000', // 信号灯红色 + greenColor: '#00FF00', // 信号灯绿色 + yellowColor: '#FFFF00', // 信号灯黄色 + whiteColor: '#FFFFFF', // 信号灯白色 + blueColor: '#0070C0' // 信号灯蓝色 }, route: { - /** 自动进路方向*/ - signalRouteDirection: false, - /** 自动进路偏移量*/ - signalRouteOffset: { x: -4, y: 0 }, - /** 自动进路*/ - signalRouteColor: '#00FF00' + direction: false, // 自动进路方向 + offset: { x: -4, y: 0 }, // 自动进路偏移量 + routeColor: '#00FF00' // 自动进路 }, auto: { - /** 自动通过方向*/ - signalAutoDirection: false, - /** 自动通过偏移量*/ - signalAutoOffset: { x: -4, y: 0}, - /** 人工控制*/ - signalManual: '#FFFF00', - /** 自动进路*/ - signalAutoRoute: '#00FF00', - /** 自动触发*/ - signalAutoTrigger: '#FFFF00', - /** 出车冲突*/ - signalConflict: '#C00808' + direction: false, // 自动通过方向 + offset: { x: -4, y: 0}, // 自动通过偏移量 + manualControl: '#FFFF00', // 人工控制 + autoRoute: '#00FF00', // 自动进路 + autoTrigger: '#FFFF00', // 自动触发 + outConflict: '#C00808' // 出车冲突 }, delay: { - /** 延迟解锁字体大小*/ - signalDelayTextFontSize: 9, - /** 延时解锁方向*/ - signalDelayDirection: true, - /** 延时解锁偏移量*/ - signalDelayOffset: { x: 15, y: -10}, - /** 延迟解锁颜色*/ - signalDelayTextColor: '#C00808' + direction: true, // 延时解锁方向 + offset: { x: 15, y: -10}, // 延时解锁偏移量 + fontSize: 9, // 延迟解锁字体大小 + fontColor: '#C00808' // 延迟解锁颜色 + }, button: { - /** 信号灯按钮距离区段的距离*/ - signalButtonDistance: 5, - /** 信号灯按钮边线*/ - signalButtonDashColor: '#FFFFFF', - /** 信号灯按钮颜色*/ - signalButtonColor: 'darkgreen', - /** 信号灯按钮闪烁颜色*/ - signalButtonLightenColor: '#E4EF50' + distance: 5, // 信号灯按钮距离区段的距离 + borderDashColor: '#FFFFFF', // 信号灯按钮边线 + buttonColor: 'darkgreen', // 信号灯按钮颜色 + buttonLightenColor: '#E4EF50' // 信号灯按钮闪烁颜色 } }; + this[deviceType.StationStand] = { - common: { // 通用属性 - textFontSize: 10 // 站台默认字体大小 + common: { // 通用属性 + textFontSize: 10 // 站台默认字体大小 }, - safetyDoor: { // 屏蔽门 - height: 3, // 站台屏蔽门高度 - distance: 8, // 站台和屏蔽门之间的距离 - defaultColor: '#00FF00', // 屏蔽门默认颜色 - splitDoorColor: '#F61107' // 屏蔽门切除颜色 + safetyDoor: { // 屏蔽门 + height: 3, // 站台屏蔽门高度 + distance: 8, // 站台和屏蔽门之间的距离 + defaultColor: '#00FF00', // 屏蔽门默认颜色 + splitDoorColor: '#F61107' // 屏蔽门切除颜色 }, - stand: { // 站台 - headFontSize: 10, // 站台首端字体大小 - spareColor: '#606060', // 站台空闲颜色 - stopColor: '#FEFE00', // 站台列车停站颜色 - jumpStopColor: '#9A99FF', // 站台跳停颜色 - designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色 + stand: { // 站台 + headFontSize: 10, // 站台首端字体大小 + spareColor: '#606060', // 站台空闲颜色 + stopColor: '#FEFE00', // 站台列车停站颜色 + jumpStopColor: '#9A99FF', // 站台跳停颜色 + designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色 }, - standEmergent: { // 紧急关闭 - mergentR: 4, // 站台紧急关闭半径 - offset: {x: 0, y: 40}, // 站台紧急关闭偏移量 - closeColor: '#F61107' // 站台紧急关闭颜色 + standEmergent: { // 紧急关闭 + mergentR: 4, // 站台紧急关闭半径 + offset: {x: 0, y: 40}, // 站台紧急关闭偏移量 + closeColor: '#F61107' // 站台紧急关闭颜色 }, - reentry: { // 站台折返策略 - direction: 0, // 折返方向 - offset: {x: -16, y: 20}, // 折返偏移量 - noHumanColor: '#0F16DA', // 站台无人折返 - AutoChangeEndsColor: '#0BF400' // 站台自动换端 + reentry: { // 站台折返策略 + direction: 0, // 折返方向 + offset: {x: -16, y: 20}, // 折返偏移量 + noHumanColor: '#0F16DA', // 站台无人折返 + autoChangeEndsColor: '#0BF400' // 站台自动换端 }, - detainCar: { // 扣车 - text: 'H', // 扣车显示内容 - direction: -1, // 扣车方向 - offset: {x: -8, y: -6}, // 扣车偏移量 - trainColor: '#E4EF50', // 车站扣车颜色 - centerTrainColor: '#FFFFFF', // 中心扣车颜色 - andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 - detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色 + detainCar: { // 扣车 + text: '扣', // 扣车显示内容 + direction: -1, // 扣车方向 + offset: {x: -8, y: -6}, // 扣车偏移量 + trainColor: '#E4EF50', // 车站扣车颜色 + centerTrainColor: '#FFFFFF', // 中心扣车颜色 + andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 + detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色 }, - stopTime: { // 停站时间 - direction: 1, // 运行时间方向 - offset: {x: -8, y: 26}, // 运行时间偏移量 - textColor: '#FFFFFF' // 停站时间字体颜色 + stopTime: { // 停站时间 + direction: 1, // 运行时间方向 + offset: {x: -8, y: 26}, // 运行时间偏移量 + textColor: '#FFFFFF' // 停站时间字体颜色 }, - level: { // 运行等级 - direction: 1, // 运行等级方向 - offset: {x: -8, y: 6}, // 运行等级偏移量 - textColor: '#FFFFFF' // 停站等级字体颜色 + level: { // 运行等级 + direction: 1, // 运行等级方向 + offset: {x: -8, y: 6}, // 运行等级偏移量 + textColor: '#FFFFFF' // 停站等级字体颜色 } }; + this[deviceType.StationControl] = { text: { - fontSize: 10, - fontFormat: 'consolas', - fontColor: '#ffffff', - fontWeight: 'normal', - textAlign: 'middle', - textVerticalAlign: 'top' + fontSize: 10, // 字体大小 + fontFormat: 'consolas', // 字体格式 + fontColor: '#ffffff', // 字体颜色 + fontWeight: 'normal', // 字体粗细 + textAlign: 'middle', // 字体水平对齐 + textVerticalAlign: 'top' // 字体垂直对齐 }, - singleControlNum: 2, - stationOffset: {x: 0, y: 0}, - arrowsShow: true, // 控制模式箭头显隐 - /** 控制模式字体大小*/ - stationControlTextSize: 10, - /** 控制模式灯的半径 */ - stationControlmodeR: 4, - /** 控制模式之间灯之间的距离*/ - stationControlDistance: 36, - /** 控制模式灰色*/ - stationControlGrayColor: '#7F7F7F', - /** 控制模式绿色*/ - stationControlGreenColor: '#00FF00', - /** 控制模式红色*/ - stationControlRedColor: '#FF0000', - /** 控制模式黄色*/ - stationControlYellowColor: '#FFFF00' + lamp: { + count: 2, // 控制模式的个数 + offset: {x: 0, y: 0}, // 偏移量 + radiusR: 4, // 控制模式灯的半径 + distance: 36, // 控制模式之间灯之间的距离 + grayColor: '#7F7F7F', // 控制模式灰色 + greenColor: '#00FF00', // 控制模式绿色 + redColor: '#FF0000', // 控制模式红色 + yellowColor: '#FFFF00' // 控制模式黄色 + }, + arrow: { + show: true // 控制模式箭头显隐 + } }; + this[deviceType.Station] = { - kilometerPosition: 'up' + kilometerPosition: 'up' // 公里标朝向 }; + this[deviceType.Switch] = { text: { - /** 道岔名称与区段距离*/ - switchNameDistance: 2, - /** 道岔边框颜色*/ - switchTextBorderColor: '#FE0000', - /** 道岔失去颜色*/ - switchTextLossColor: '#C00808', - /** 道岔定位颜色*/ - switchTextLocateColor: '#00FF00', - /** 道岔反位颜色*/ - switchInversionColor: '#FFFF00', - /** 道岔单锁颜色*/ - switchMonolockColor: '#FFFFFF' + distance: 2, // 道岔名称与区段距离 + borderColor: '#FE0000', // 道岔边框颜色 + lossColor: '#C00808', // 道岔失去颜色 + locateColor: '#00FF00', // 道岔定位颜色 + inversionColor: '#FFFF00', // 道岔反位颜色 + monolockColor: '#FFFFFF' // 道岔单锁颜色 }, core: { - /** 道岔单边长度 */ - switchLen: 6 + legnth: 6 // 道岔单边长度 } }; + this[deviceType.LcControl] = { text: { - fontSize: 10, - distance: 5 // 灯跟文字距离 + fontSize: 10, // 字体大小 + distance: 5 // 灯跟文字距离 }, lamp: { - radiusR: 6, - controlColor: '#FFFF00' + radiusR: 6, // 控制灯大小 + controlColor: '#FFFF00' // 控制灯颜色 } }; + this[deviceType.ZcControl] = { text: { - fontSize: 10, - distance: 5 // 灯跟文字距离 + fontSize: 10, // 字体大小 + distance: 5 // 灯跟文字距离 }, lamp: { - radiusR: 6, - controlColor: '#00FF00' + radiusR: 6, // 控制灯大小 + controlColor: '#00FF00' // 控制灯颜色 } }; + this[deviceType.LimitControl] = { text: { - fontSize: 10, - distance: 5 // 灯跟文字距离 + fontSize: 10, // 字体大小 + distance: 5 // 灯跟文字距离 }, lamp: { - radiusR: 6, - controlColor: '#ECE9D8' + radiusR: 6, // 控制灯大小 + controlColor: '#ECE9D8' // 控制灯颜色 } }; + + this[deviceType.Line] = { + lineColor: '#FFFFFF' // 线条颜色 + }; + + this[deviceType.TrainWindow] = { + trainWindowColor: '#4DD43F', // 车次窗颜色 + lineDash: null, // 车次窗虚线间隔 + trainWindowLineWidth: 1.5, // 车次窗线宽 + trainWindowSmooth: 0 // 车次窗矩形圆滑程度 + }; + this[deviceType.Train] = { /** 车身line宽 */ - trainBodyLineWidth: 0, + trainBodyLineWidth: 0.1, /** 车身鼠标悬浮事件 */ trainBodyOnMouseOver: {train: true, textTrainNumber: false, textTrainServer: false, textTrainTarget: false, textTrainTargetNumber: false}, /** 车身鼠标移出事件 */ trainBodyOnMouseOut: {train: true, textTrainNumber: false, textTrainServer: false, textTrainTarget: false, textTrainTargetNumber: false}, - /** 目的地码前缀*/ - targetCodePrefix: '000', - /** 默认目的地码 */ - defaultTargetCode: 'AAA', /** 服务号(表号)前缀 */ serviceNumberPrefix: '00', /** 默认服务号(表号) */ - defaultServiceNumber: 'BB', + defaultServiceNumber: 'AA', /** 车次号前缀 */ - tripNumberPrefix: '0000', - /** 默认车次号1 */ - defaultDirectionCode: 'D', + tripNumberPrefix: '000', /** 默认车次号2 */ - defaultTripNumber: 'CCC', - /** 车组号前缀 */ - groupNumberPrefix: '000', - /** 默认车组号 */ - defaultGroupNumber: 'EEE', + defaultTripNumber: 'DDD', /** 列车车头比车身高出的长度,上下相比车体伸出去的边框*/ - trainMoreLength: 1, + trainMoreLength: 0, /** 列车车头三角坐标1偏移量 */ - trainHeadTriangleFirst: { x: 0, y: 0}, + trainHeadTriangleFirst: { x: 7, y: 1}, /** 列车车头三角坐标2偏移量 */ - trainHeadTriangleSecond: { x: 4, y: 8.5}, + trainHeadTriangleSecond: { x: 13, y: 10}, /** 列车车头三角坐标3偏移量 */ - trainHeadTriangleThird: { x: 0, y: 15}, + trainHeadTriangleThird: { x: 7, y: 19}, /** 列车高度*/ - trainHeight: 17, + trainHeight: 20, /** 列车和车头之间的间距*/ - trainHeadDistance: 2, + trainHeadDistance: 4, /** 列车车头矩形高度 */ - trainHeadRectHeight: 15, + trainHeadRectHeight: 20, /** 列车长度*/ - trainWidth: 76, + trainWidth: 40, /** 列车竖杠的宽度*/ - trainConntWidth: 4, + trainConntWidth: 3, /** 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度 */ - changeTrainWidth: true, + changeTrainWidth: false, /** 是否根据nameFormat去动态加载车组号、服务号、车次号、目的地码 */ - dynamicLoadingDisplay: true, + dynamicLoadingDisplay: false, /** 特殊列车类型需设置显示格式 */ - specialTrainType: [{ type: '03', serviceNumber: 'MM', nameFormat: 'serviceNumber:groupNumber'}], + specialTrainType: [], /** 两边间隔 */ - lrPadding: 1, + lrPadding: 4, /** 上边距离 */ - upPadding: 1, + upPadding: 4, + /** HSDA两边间隔 */ + lrPaddingHSDA: 3, + /** HSDA上边距离 */ + upPaddingHSDA: 4, /** 列车字号*/ - trainTextFontSize: 15, - /** 目的地状态 01准点 02早点 03严重早点 04晚点 05严重晚点 06头码车 07ATP切除 */ + trainTextFontSize: 12, + /** 目的地状态 01准点 02早点 03晚点 04头码车 */ destinationStatus: [ {status: '01', showColor: '#FFFFFF'}, {status: '02', showColor: '#00FF00'}, - {status: '03', showColor: '#3265FF'}, - {status: '04', showColor: '#9B4A09'}, - {status: '05', showColor: '#EF0C08'}, - {status: '06', showColor: '#FFFFFF'}, - {status: '07', showColor: '#FFFF00'} + {status: '03', showColor: '#A0522D'}, + {status: '04', showColor: '#FFFF00'} ], + /** 默认目的地状态显示颜色 */ + defaultDestinationColor: '#FFFFFF', /** 目的地状态设置的对应哪个text的颜色 */ - destinationStatusSetText: 'trainServer', + destinationStatusSetText: 'trainTarget', /** 默认字体 族类*/ - textFontFormat: '宋体', + textFontFormat: 'consolas', /** 列车HDSA字号*/ - trainHSDATextFontSize: 8, - /** 服务号状态类型 eg:{type: '01', showColor: '#FFFFFF'} */ - serverNoType: [], - /** 运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行*/ + trainHSDATextFontSize: 9, + /** 服务号状态类型 01显示服务号 计划车 02显示车组号: 头码车与人工车 */ + serverNoType: [ + {type: '01', showColor: '#FFFFFF'}, + {type: '02', showColor: '#FFF000'} + ], + /** 默认服务号状态显示颜色 */ + defaultServerNoColor: '#FFFFFF', + /** 列车运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行*/ directionType: [ - {type: '01', lineLShow: false, lineRShow: false, arrowLShow: false, arrowRShow: false }, - {type: '02', lineLShow: false, lineRShow: false, arrowLShow: false, arrowRShow: true }, - {type: '03', lineLShow: false, lineRShow: false, arrowLShow: true, arrowRShow: false } + {type: '01', lineLShow: true, lineRShow: true, arrowLShow: false, arrowRShow: false }, + {type: '02', lineLShow: false, lineRShow: true, arrowLShow: false, arrowRShow: true }, + {type: '03', lineLShow: true, lineRShow: false, arrowLShow: true, arrowRShow: false } ], /** 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行 */ directionStopType: [ @@ -366,56 +334,60 @@ class SkinStyle extends defaultStyle { {type: '02', lineLShow: false, lineRShow: true}, {type: '03', lineLShow: true, lineRShow: false} ], - /** 列车运行模式对应车头颜色 01信号中断 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM + /** 列车运行模式对应车头颜色 01未知 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM * 04 限制人工驾驶模式RM 05 非限制人工驾驶模式RM*/ runModeStatus: [ - {status: '01', trainLColor: '#EF0C08', trainRColor: '#EF0C08'}, + {status: '01', trainLColor: '#FFFFFF', trainRColor: '#FFFFFF'}, {status: '02', trainLColor: '#00FF00', trainRColor: '#00FF00'}, {status: '03', trainLColor: '#FFFF00', trainRColor: '#FFFF00'}, - {status: '04', trainLColor: '#EA700D', trainRColor: '#EA700D'}, + {status: '04', trainLColor: '#A0522D', trainRColor: '#A0522D'}, {status: '05', trainLColor: '#A0522D', trainRColor: '#A0522D'} ], - /** 设置运行控制状态类型 eg:{status: '01', hShow: false, sShow: false}, */ - runControlStatus: [], - /** 设置车门状态类型 eg:{status: '01', dShow: false}, */ - doorStatus: [], - /** 设置通信状态 eg:{status: '01', trainColor:'#725A64'}, */ - communicationStatus: [], - /** 设置报警状态 eg:{status: '01', aShow: false}, */ - alarmStatus: [], + /** 设置运行控制状态类型 01正常 02扣车 03停跳 */ + runControlStatus: [ + {status: '01', hShow: false, sShow: false}, + {status: '02', hShow: true, sShow: false}, + {status: '03', hShow: false, sShow: true} + ], + /** 设置车门状态类型 01关门 02开门 */ + doorStatus: [ + {status: '01', dShow: false}, + {status: '02', dShow: true} + ], + /** 设置通信状态 01正常 02故障 */ + communicationStatus: [ + {status: '01', trainColor: '#725A64'}, + {status: '02', trainColor: '#C0C0C0'} + ], + /** 设置报警状态 01不报警 02报警 */ + alarmStatus: [ + {status: '01', aShow: false}, + {status: '02', aShow: true} + ], /** 列车车头矩形填充颜色 */ - trainHeadFillColor: '#EF0C08', + trainHeadFillColor: '#000000', /** 列车车身填充颜色 */ - trainBodyFillColor: '#000000', - /** 列车服务号偏移 */ - trainServerOffset: { x: -1, y: 1}, - /** 列车车次号偏移 */ - trainTargetOffset: { x: -1, y: 1}, - /** 列车显示格式 */ - trainNameFormat: 'targetCode:serviceNumber:tripNumber', - /** 字体大小 */ - nameFontSize: 10, - /** 目的地码文字显示位置 */ - trainTargetTextAlign: 'left', + trainBodyFillColor: '#725A64', + /** textH文本 */ + textHContent: 'H', + /** textS文本 */ + textSContent: 'S', + /** textD文本 */ + textDContent: 'D', + /** textA文本 */ + textAContent: 'A', /** 是否需创建textHSDA对象 */ - haveTextHSDA: false, + haveTextHSDA: true, /** 是否需创建arrowText对象 */ haveArrowText: true, /** 是否需创建trainBorder对象 */ - haveTrainBorder: false - }; - this[deviceType.TrainWindow] = { - /** 车次窗颜色*/ - trainWindowColor: '#4DD43F', - /** 车次窗虚线间隔 */ - lineDash: null, - /** 车次窗线宽 */ - trainWindowLineWidth: 1.5, - /** 车次窗矩形圆滑程度 */ - trainWindowSmooth: 0 - }; - this[deviceType.Line] = { - lineColor: '#FFFFFF' + haveTrainBorder: false, + /** 列车服务号偏移 */ + trainServerOffset: { x: 4, y: 4}, + /** 列车车次号偏移 */ + trainTargetOffset: { x: 36, y: 4}, + /** 目的地码文字显示位置 */ + trainTargetTextAlign: 'right' }; } } diff --git a/src/jmap/config/skinStyle/fuzhou_01.js b/src/jmap/config/skinStyle/fuzhou_01.js index a662e59ae..2301400c9 100644 --- a/src/jmap/config/skinStyle/fuzhou_01.js +++ b/src/jmap/config/skinStyle/fuzhou_01.js @@ -5,247 +5,222 @@ class SkinStyle extends defaultStyle { constructor() { super(); this[deviceType.Link] = { - /** line 颜色*/ - lineWidthColor: '#FFFFFF', - /** link 宽度*/ - linkWidth: 4.4, - /** link 线条颜色*/ - linkColor: '#3F3F3F', - /** link 字体颜色*/ - linkTextColor: '#FFFFFF' + lineWidthColor: '#FFFFFF', // line 颜色 + linkWidth: 4.4, // link 宽度 + linkColor: '#3F3F3F', // link 线条颜色 + linkTextColor: '#FFFFFF' // link 字体颜色 }; + this[deviceType.Section] = { - text: { // 区段文字属性 - fontSize: 10, // 字体大小 - fontColor: '#FFFFFF', // 字体颜色 - textAlign: 'center', // 水平对齐方式 - textPosition: 'inside', // 文字位置 - textVerticalAlign: 'middle', // 文字垂直对齐方式 - position: 0 // 区段名称位置 1 上行 -1 下面 0 默认 + text: { // 区段文字属性 + fontSize: 10, // 字体大小 + fontColor: '#FFFFFF', // 字体颜色 + textAlign: 'center', // 水平对齐方式 + textPosition: 'inside', // 文字位置 + textVerticalAlign: 'middle', // 文字垂直对齐方式 + position: 0 // 区段名称位置 1 上行 -1 下面 0 默认 }, line: { - width: 5, // 区段宽度 - beyondWidth: 1, // 区段宽超出宽度 - invadeColor: '#EF0C08', // 区段侵入颜色 - spareColor: '#3F3F3F', // 区段空闲颜色 - communicationOccupiedColor: '#FF329A', // 区段通信车占用颜色 - unCommunicationOccupiedColor: '#FE0000', // 区段非通讯车占用颜色 - routeLockColor: '#FFFFFF', // 区段路由锁定颜色 - faultLockColor: '#9B4A0A', // 区段故障锁定颜色 - undefinedColor: '#0071C1', // 区段未定义颜色 - protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用) - blockColor: '#800080', // 区段封锁颜色 - atcExcisionColor: '#A0522D', // 区段atc切除颜色 - atsExcisionColor: '#A0522D', // 区段ats切除颜色 - timeReleaseColor: '#3F3F3F', // 区段延时释放颜色 - protectiveLockColor: '#FFFF00', // 区段保护锁闭 - protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁 - logicalColor: '#FFFF00', // 逻辑区段颜色 (未用) - logicalTextColor: '#FFFFFF' // 逻辑区段名称颜色 (未用) + width: 5, // 区段宽度 + beyondWidth: 1, // 区段宽超出宽度 + invadeColor: '#EF0C08', // 区段侵入颜色 + spareColor: '#3F3F3F', // 区段空闲颜色 + communicationOccupiedColor: '#FF329A', // 区段通信车占用颜色 + unCommunicationOccupiedColor: '#FE0000', // 区段非通讯车占用颜色 + routeLockColor: '#FFFFFF', // 区段路由锁定颜色 + faultLockColor: '#9B4A0A', // 区段故障锁定颜色 + undefinedColor: '#0071C1', // 区段未定义颜色 + protectionLockedColor: '#FEFF00', // 保护区段锁闭(未用) + blockColor: '#800080', // 区段封锁颜色 + atcExcisionColor: '#A0522D', // 区段atc切除颜色 + atsExcisionColor: '#A0522D', // 区段ats切除颜色 + timeReleaseColor: '#3F3F3F', // 区段延时释放颜色 + protectiveLockColor: '#FFFF00', // 区段保护锁闭 + protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁 + logicalColor: '#FFFF00', // 逻辑区段颜色 (未用) + logicalTextColor: '#FFFFFF' // 逻辑区段名称颜色 (未用) }, axle: { - radius: 3, // 计轴 半径 - distance: 5, // 计轴和区段之间的距离 (未用) - color: '#FFFFFF', // 区段计轴颜色 - resetColor: '#00FFFF', // 区段计轴预复位颜色 - Failure: '#E6A23C' // #FFFF00 计轴失效 + radius: 3, // 计轴 半径 + distance: 5, // 计轴和区段之间的距离 (未用) + color: '#FFFFFF', // 区段计轴颜色 + resetColor: '#00FFFF', // 区段计轴预复位颜色 + Failure: '#E6A23C' // #FFFF00 计轴失效 }, - speedLimit: { // 限速元素 - width: 1, // 限速线的宽短 - Distance: 5, // 限速线距离区段距离 - lineColor: '#FFFF00' // 限速线颜色 + speedLimit: { // 限速元素 + width: 1, // 限速线的宽短 + Distance: 5, // 限速线距离区段距离 + lineColor: '#FFFF00' // 限速线颜色 }, separator: { - width: 1.2, // 分隔符宽度 - endWidth: 3.5, // 尽头分隔符宽度 - endColor: '#3F3F3F', // 尽头分隔符颜色 - color: '#3149C3' // 区段边界符颜色 + width: 1.2, // 分隔符宽度 + endWidth: 3.5, // 尽头分隔符宽度 + endColor: '#3F3F3F', // 尽头分隔符颜色 + color: '#3149C3' // 区段边界符颜色 } }; + this[deviceType.Signal] = { - /** 设备距离区段的距离*/ - signalDistance: 10, + signalDistance: 10, // 设备距离区段的距离 post: { - signalLampStandardColor: '#3149C3', - signalLampStandardWidth: 2 + standardColor: '#3149C3', // 灯珠颜色 + standardWidth: 2 // 灯珠宽度 }, text: { - /** 文字和灯杆的距离*/ - distance: 0, - /** 是否禁止旋转*/ - isNoRotation: true, - /** 信号字体对其方式*/ - isAlignCenter: true, - /** 信号机名称字体大小*/ - signalTextFontSize: 10, - /** 信号灯字体默认色*/ - signalDefaultTextColor: '#FFFFFF', - /** 信号灯字体锁定颜色*/ - signalTextBlockColor: '#EF0C08', - /** 信号字体*/ - signalTextblock: '#00FF00' + distance: 0, // 文字和灯杆的距离 + isNoRotation: true, // 是否禁止旋转 + isAlignCenter: true, // 信号字体对其方式 + fontSize: 10, // 信号机名称字体大小 + defaultColor: '#FFFFFF', // 信号灯字体默认色 + blockColor: '#EF0C08', // 信号灯字体锁定颜色 + checkColor: '#00FF00' // 信号字体 }, lamp: { - /** 禁止线宽度*/ - signalStopWidth: 2, - /** 信号灯边框线宽度*/ - signalBorderWidth: 0.5, - /** 信号灯边框线颜色*/ - signalBorderColor: '#3149C3', - /** 信号灯半径*/ - signalR: 6, - /** 信号灯锁闭*/ - signalBlockColor: '#EF0C08', - /** 信号灯灰色*/ - signalLampGrayColor: '#7F7F7F', - /** 信号灯红色*/ - signalLampRedColor: '#FF0000', - /** 信号灯绿色*/ - signalLampGreenColor: '#00FF00', - /** 信号灯黄色*/ - signalLampYellowColor: '#FFFF00', - /** 信号灯白色*/ - signalLampWhiteColor: '#FFFFFF', - /** 信号灯蓝色*/ - signalLampBlueColor: '#0070C0' + stopWidth: 2, // 禁止线宽度 + borderWidth: 0.5, // 信号灯边框线宽度 + borderColor: '#3149C3', // 信号灯边框线颜色 + radiusR: 6, // 信号灯半径 + blockColor: '#EF0C08', // 信号灯锁闭 + grayColor: '#7F7F7F', // 信号灯灰色 + redColor: '#FF0000', // 信号灯红色 + greenColor: '#00FF00', // 信号灯绿色 + yellowColor: '#FFFF00', // 信号灯黄色 + whiteColor: '#FFFFFF', // 信号灯白色 + blueColor: '#0070C0' // 信号灯蓝色 }, route: { - /** 自动进路方向*/ - signalRouteDirection: false, - /** 自动进路偏移量*/ - signalRouteOffset: { x: -4, y: 0 }, - /** 自动进路*/ - signalRouteColor: '#00FF00' + direction: false, // 自动进路方向 + offset: { x: -4, y: 0 }, // 自动进路偏移量 + routeColor: '#00FF00' // 自动进路 }, auto: { - /** 自动通过方向*/ - signalAutoDirection: false, - /** 自动通过偏移量*/ - signalAutoOffset: { x: -4, y: 0}, - /** 自动进路*/ - signalAutoRoute: '#00FF00', - /** 自动触发*/ - signalAutoTrigger: '#FFFF00' + direction: false, // 自动通过方向 + offset: { x: -4, y: 0}, // 自动通过偏移量 + autoRoute: '#00FF00', // 自动进路 + autoTrigger: '#FFFF00' // 自动触发 }, delay: { - /** 延迟解锁字体大小*/ - signalDelayTextFontSize: 9, - /** 延时解锁方向*/ - signalDelayDirection: true, - /** 延时解锁偏移量*/ - signalDelayOffset: { x: 15, y: -10}, - /** 延迟解锁颜色*/ - signalDelayTextColor: '#FF0000' + direction: true, // 延时解锁方向 + offset: { x: 15, y: -10}, // 延时解锁偏移量 + fontSize: 9, // 延迟解锁字体大小 + fontColor: '#FF0000' // 延迟解锁颜色 }, button: { - /** 信号灯按钮距离区段的距离*/ - signalButtonDistance: 5, - /** 信号灯按钮边线*/ - signalButtonDashColor: '#FFFFFF', - /** 信号灯按钮颜色*/ - signalButtonColor: 'darkgreen', - /** 信号灯按钮闪烁颜色*/ - signalButtonLightenColor: '#E4EF50' + distance: 5, // 信号灯按钮距离区段的距离 + borderDashColor: '#FFFFFF', // 信号灯按钮边线 + buttonColor: 'darkgreen', // 信号灯按钮颜色 + buttonLightenColor: '#E4EF50' // 信号灯按钮闪烁颜色 } }; + this[deviceType.StationStand] = { - common: { // 通用属性 - textFontSize: 10 // 站台默认字体大小 + common: { // 通用属性 + textFontSize: 10 // 站台默认字体大小 }, - safetyDoor: { // 屏蔽门 - height: 3, // 站台屏蔽门高度 - distance: 8, // 站台和屏蔽门之间的距离 - defaultColor: '#00FF00', // 屏蔽门默认颜色 - splitDoorColor: '#F61107' // 屏蔽门切除颜色 + safetyDoor: { // 屏蔽门 + height: 3, // 站台屏蔽门高度 + distance: 8, // 站台和屏蔽门之间的距离 + defaultColor: '#00FF00', // 屏蔽门默认颜色 + splitDoorColor: '#F61107' // 屏蔽门切除颜色 }, - stand: { // 站台 - headFontSize: 10, // 站台首端字体大小 - spareColor: '#606060', // 站台空闲颜色 - stopColor: '#FEFE00', // 站台列车停站颜色 - jumpStopColor: '#9A99FF', // 站台跳停颜色 - designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色 + stand: { // 站台 + headFontSize: 10, // 站台首端字体大小 + spareColor: '#606060', // 站台空闲颜色 + stopColor: '#FEFE00', // 站台列车停站颜色 + jumpStopColor: '#9A99FF', // 站台跳停颜色 + designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色 }, - standEmergent: { // 紧急关闭 - mergentR: 4, // 站台紧急关闭半径 - offset: {x: 0, y: 40}, // 站台紧急关闭偏移量 - closeColor: '#F61107' // 站台紧急关闭颜色 + standEmergent: { // 紧急关闭 + mergentR: 4, // 站台紧急关闭半径 + offset: {x: 0, y: 40}, // 站台紧急关闭偏移量 + closeColor: '#F61107' // 站台紧急关闭颜色 }, - reentry: { // 站台折返策略 - direction: 0, // 折返方向 - offset: {x: -16, y: 20}, // 折返偏移量 - noHumanColor: '#0F16DA', // 站台无人折返 - AutoChangeEndsColor: '#0BF400' // 站台自动换端 + reentry: { // 站台折返策略 + direction: 0, // 折返方向 + offset: {x: -16, y: 20}, // 折返偏移量 + noHumanColor: '#0F16DA', // 站台无人折返 + autoChangeEndsColor: '#0BF400' // 站台自动换端 }, - detainCar: { // 扣车 - text: 'H', // 扣车显示内容 - direction: -1, // 扣车方向 - offset: {x: -8, y: -6}, // 扣车偏移量 - trainColor: '#E4EF50', // 车站扣车颜色 - centerTrainColor: '#FFFFFF', // 中心扣车颜色 - andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 - detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色 + detainCar: { // 扣车 + text: 'H', // 扣车显示内容 + direction: -1, // 扣车方向 + offset: {x: -8, y: -6}, // 扣车偏移量 + trainColor: '#E4EF50', // 车站扣车颜色 + centerTrainColor: '#FFFFFF', // 中心扣车颜色 + andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 + detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色 }, - stopTime: { // 停站时间 - direction: 1, // 运行时间方向 - offset: {x: -8, y: 26}, // 运行时间偏移量 - textColor: '#FFFFFF' // 停站时间字体颜色 + stopTime: { // 停站时间 + direction: 1, // 运行时间方向 + offset: {x: -8, y: 26}, // 运行时间偏移量 + textColor: '#FFFFFF' // 停站时间字体颜色 }, - level: { // 运行等级 - direction: 1, // 运行等级方向 - offset: {x: -8, y: 6}, // 运行等级偏移量 - textColor: '#FFFFFF' // 停站等级字体颜色 + level: { // 运行等级 + direction: 1, // 运行等级方向 + offset: {x: -8, y: 6}, // 运行等级偏移量 + textColor: '#FFFFFF' // 停站等级字体颜色 } }; + this[deviceType.StationControl] = { text: { - fontSize: 10, - fontFormat: 'consolas', - fontColor: '#ffffff', - fontWeight: 'normal', - textAlign: 'middle', - textVerticalAlign: 'top' + fontSize: 10, // 字体大小 + fontFormat: 'consolas', // 字体格式 + fontColor: '#ffffff', // 字体颜色 + fontWeight: 'normal', // 字体粗细 + textAlign: 'middle', // 字体水平对齐 + textVerticalAlign: 'top' // 字体垂直对齐 }, - singleControlNum: 2, - stationOffset: {x: 0, y: 0}, - arrowsShow: true, // 控制模式箭头显隐 - /** 控制模式字体大小*/ - stationControlTextSize: 10, - /** 控制模式灯的半径 */ - stationControlmodeR: 4, - /** 控制模式之间灯之间的距离*/ - stationControlDistance: 36, - /** 控制模式灰色*/ - stationControlGrayColor: '#7F7F7F', - /** 控制模式绿色*/ - stationControlGreenColor: '#00FF00', - /** 控制模式红色*/ - stationControlRedColor: '#FF0000', - /** 控制模式黄色*/ - stationControlYellowColor: '#FFFF00' - }; - this[deviceType.Station] = { - kilometerPosition: 'up' - }; - this[deviceType.Switch] = { - text: { - /** 道岔名称与区段距离*/ - switchNameDistance: 2, - /** 道岔边框颜色*/ - switchTextBorderColor: '#FE0000', - /** 道岔失去颜色*/ - switchTextLossColor: '#FFFFFF', - /** 道岔定位颜色*/ - switchTextLocateColor: '#00FF00', - /** 道岔反位颜色*/ - switchInversionColor: '#9C9D09', - /** 道岔单锁颜色*/ - switchMonolockColor: '#870E10' + lamp: { + count: 2, // 控制模式灯个数 + offset: {x: 0, y: 0}, // 控制模式灯偏移量 + radiusR: 4, // 控制模式灯的半径 + distance: 36, // 控制模式之间灯之间的距离 + grayColor: '#7F7F7F', // 控制模式灰色 + greenColor: '#00FF00', // 控制模式绿色 + redColor: '#FF0000', // 控制模式红色 + yellowColor: '#FFFF00' // 控制模式黄色 }, - core: { - /** 道岔单边长度 */ - switchLen: 6 + arrow: { + show: true // 控制模式箭头显隐 } }; + + this[deviceType.Station] = { + kilometerPosition: 'up' // 公里标朝向 + }; + + this[deviceType.Switch] = { + text: { + distance: 2, // 道岔名称与区段距离 + borderColor: '#FE0000', // 道岔边框颜色 + lossColor: '#FFFFFF', // 道岔失去颜色 + locateColor: '#00FF00', // 道岔定位颜色 + inversionColor: '#9C9D09', // 道岔反位颜色 + monolockColor: '#870E10' // 道岔单锁颜色 + }, + core: { + legnth: 6 // 道岔单边长度 + } + }; + + this[deviceType.Line] = { + lineColor: '#FFFFFF' // 线条颜色 + }; + + this[deviceType.LcControl] = {}; + + this[deviceType.ZcControl] = {}; + + this[deviceType.LimitControl] = {}; + + this[deviceType.TrainWindow] = { + trainWindowColor: '#4DD43F', // 车次窗颜色 + lineDash: null, // 车次窗虚线间隔 + trainWindowLineWidth: 1.5, // 车次窗线宽 + trainWindowSmooth: 0 // 车次窗矩形圆滑程度 + }; + this[deviceType.Train] = { /** 车身line宽 */ trainBodyLineWidth: 0, @@ -369,22 +344,6 @@ class SkinStyle extends defaultStyle { /** 是否需创建trainBorder对象 */ haveTrainBorder: false }; - this[deviceType.TrainWindow] = { - /** 车次窗颜色*/ - trainWindowColor: '#4DD43F', - /** 车次窗虚线间隔 */ - lineDash: null, - /** 车次窗线宽 */ - trainWindowLineWidth: 1.5, - /** 车次窗矩形圆滑程度 */ - trainWindowSmooth: 0 - }; - this[deviceType.Line] = { - lineColor: '#FFFFFF' - }; - this[deviceType.LcControl] = {}; - this[deviceType.ZcControl] = {}; - this[deviceType.LimitControl] = {}; } } diff --git a/src/jmap/shape/Section/ELimitLines.js b/src/jmap/shape/Section/ELimitLines.js index 40ec936c3..ef212fda4 100644 --- a/src/jmap/shape/Section/ELimitLines.js +++ b/src/jmap/shape/Section/ELimitLines.js @@ -32,7 +32,7 @@ import JTriangle from '../../utils/JTriangle'; // ctx.bezierCurveTo(shape[`cpx1`], shape[`cpy1`], shape[`cpx2`], shape[`cpy2`], shape[`x2`], shape[`y2`]); // } // } else { -// const swPadding = model.style.Switch.core.switchLen; // 定位和反位时区段距离岔芯的距离 +// const swPadding = model.style.Switch.core.legnth; // 定位和反位时区段距离岔芯的距离 // var switchWidth = model.style.Section.line.width + model.style.Section.line.beyondWidth; // 道岔宽度 // const beg = Object.assign({}, model.points[0]); // const end = Object.assign({}, model.points[model.points.length - 1]); @@ -117,7 +117,7 @@ export default class ELimitLines extends Group { // const beg = Object.assign({}, model.points[0]); // const end = Object.assign({}, model.points[model.points.length - 1]); - const swPadding = model.style.Switch.core.switchLen; // 定位和反位时区段距离岔芯的距离 + const swPadding = model.style.Switch.core.legnth; // 定位和反位时区段距离岔芯的距离 var switchWidth = model.style.Section.line.width + model.style.Section.line.beyondWidth; // 道岔宽度 const beg = Object.assign({}, model.points[0]); const end = Object.assign({}, model.points[model.points.length - 1]); diff --git a/src/jmap/shape/Section/index.js b/src/jmap/shape/Section/index.js index 4fd334e54..ed76eb2df 100644 --- a/src/jmap/shape/Section/index.js +++ b/src/jmap/shape/Section/index.js @@ -4,11 +4,10 @@ import ERelease from './ERelease'; // 线段 (共有) import ELimitLines from './ELimitLines'; // 区段限速 (私有) import ELines from './ELines'; // 创建多线条 曲线 (私有) import ESeparator from './ESeparator'; // 分隔符 (私有) +import EMouse from './EMouse'; import { EAxle } from './EAxle'; // 创建计轴 (私有) import { EBackArrow } from './EBackArrow'; // 折返进路箭头 import JTriangle from '../../utils/JTriangle'; -import BoundingRect from 'zrender/src/core/BoundingRect'; -import EMouse from './EMouse'; /** 区段*/ export default class Section extends Group { @@ -72,7 +71,6 @@ export default class Section extends Group { } createTurnBack() { - // const radius = 3; const model = this.model; const style = this.style; @@ -210,7 +208,7 @@ export default class Section extends Group { // 创建区段名称 const fontSize = model.type == '02' ? style.Section.text.fontSize + 2: style.Section.text.fontSize; - this.sectionText = new ETextName({ + this.name = new ETextName({ zlevel: this.zlevel, z: this.z + 2, style: this.style, @@ -226,7 +224,7 @@ export default class Section extends Group { textPosition: style.Section.text.textPosition, textVerticalAlign: style.Section.text.textVerticalAlign }); - this.add(this.sectionText); + this.add(this.name); } /** 站台轨名称*/ @@ -742,8 +740,10 @@ export default class Section extends Group { } getBoundingRect() { - if (this.section) return this.section.getBoundingRect(); - if (this.sectionText) return this.sectionText.getBoundingRect(); - return new BoundingRect(); + if (this.section) { + return this.section.getBoundingRect(); + } else { + return super.getBoundingRect(); + } } } diff --git a/src/jmap/shape/Signal/ESigAuto.js b/src/jmap/shape/Signal/ESigAuto.js index d8e736860..e7d31d827 100644 --- a/src/jmap/shape/Signal/ESigAuto.js +++ b/src/jmap/shape/Signal/ESigAuto.js @@ -14,7 +14,7 @@ class ESigPass extends Group { const model = this.model; const style = this.model.style; const rotation = model.drict != 1? 0 : Math.PI; - const point = arrows(model.x, model.y, style.Signal.signalAutoWidth, style.Signal.lamp.signalR * 0.8); + const point = arrows(model.x, model.y, style.Signal.signalAutoWidth, style.Signal.lamp.radiusR * 0.8); this.isNew = true; this.arrows = new Polygon({ @@ -70,7 +70,7 @@ class ESigPass extends Group { // 显示 show() { this.create(); - this.arrows.show(); + this.arrow.show(); } } diff --git a/src/jmap/shape/Signal/ESigButton.js b/src/jmap/shape/Signal/ESigButton.js index 9507bbf9b..1d421edb1 100644 --- a/src/jmap/shape/Signal/ESigButton.js +++ b/src/jmap/shape/Signal/ESigButton.js @@ -16,7 +16,7 @@ class ESigButton extends Group { const model = this.model; const style = this.model.style; const padding = 1; - const r = style.Signal.lamp.signalR * 0.8; + const r = style.Signal.lamp.radiusR * 0.8; this.isNew = true; this.sigNormalButtom = new Rect({ @@ -25,15 +25,15 @@ class ESigButton extends Group { _subType: 'SignalButton', _val: '1', shape: { - x: model.x - style.Signal.lamp.signalR, + x: model.x - style.Signal.lamp.radiusR, y: model.y - r + r * model.posit, - width: style.Signal.lamp.signalR * 2, - height: style.Signal.lamp.signalR * 2 + width: style.Signal.lamp.radiusR * 2, + height: style.Signal.lamp.radiusR * 2 }, style: { lineWidth: 0.2, - stroke: style.Signal.button.signalButtonDashColor, - fill: style.Signal.button.signalButtonColor + stroke: style.Signal.button.borderDashColor, + fill: style.Signal.button.buttonColor } }); @@ -62,12 +62,12 @@ class ESigButton extends Group { shape: { cx: model.x, cy: model.y - 5 / 2 * r * model.posit, - r: style.Signal.lamp.signalR + r: style.Signal.lamp.radiusR }, style: { lineWidth: 0.2, - stroke: style.Signal.button.signalButtonDashColor, - fill: style.Signal.button.signalButtonColor + stroke: style.Signal.button.borderDashColor, + fill: style.Signal.button.buttonColor } }); diff --git a/src/jmap/shape/Signal/ESigLamp.js b/src/jmap/shape/Signal/ESigLamp.js index d55043681..d841864f0 100644 --- a/src/jmap/shape/Signal/ESigLamp.js +++ b/src/jmap/shape/Signal/ESigLamp.js @@ -22,12 +22,12 @@ class ESigLamp extends Group { shape: { cx: model.x, cy: model.y, - r: style.Signal.lamp.signalR + r: style.Signal.lamp.radiusR }, style: { - lineWidth: style.Signal.lamp.signalBorderWidth, + lineWidth: style.Signal.lamp.borderWidth, fill: style.backgroundColor, - stroke: style.Signal.post.signalLampStandardColor + stroke: style.Signal.post.standardColor } }); @@ -41,13 +41,13 @@ class ESigLamp extends Group { y: model.originY }, shape: { - x1: model.x + (style.Signal.lamp.signalR + 1) * Math.cos(Math.PI / 4), - y1: model.y + (style.Signal.lamp.signalR + 1) * Math.sin(Math.PI / 4), - x2: model.x - (style.Signal.lamp.signalR + 1) * Math.cos(Math.PI / 4), - y2: model.y - (style.Signal.lamp.signalR + 1) * Math.sin(Math.PI / 4) + x1: model.x + (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4), + y1: model.y + (style.Signal.lamp.radiusR + 1) * Math.sin(Math.PI / 4), + x2: model.x - (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4), + y2: model.y - (style.Signal.lamp.radiusR + 1) * Math.sin(Math.PI / 4) }, style: { - lineWidth: style.Signal.lamp.signalStopWidth, + lineWidth: style.Signal.lamp.stopWidth, stroke: style.backgroundColor } }); @@ -62,13 +62,13 @@ class ESigLamp extends Group { y: model.originY }, shape: { - x1: model.x + (style.Signal.lamp.signalR + 1) * Math.cos(Math.PI / 4), - y1: model.y + (style.Signal.lamp.signalR + 1) * (Math.sin(Math.PI / 4) - Math.sqrt(2)), - x2: model.x - (style.Signal.lamp.signalR + 1) * Math.cos(Math.PI / 4), - y2: model.y - (style.Signal.lamp.signalR + 1) * (Math.sin(Math.PI / 4) - Math.sqrt(2)) + x1: model.x + (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4), + y1: model.y + (style.Signal.lamp.radiusR + 1) * (Math.sin(Math.PI / 4) - Math.sqrt(2)), + x2: model.x - (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4), + y2: model.y - (style.Signal.lamp.radiusR + 1) * (Math.sin(Math.PI / 4) - Math.sqrt(2)) }, style: { - lineWidth: style.Signal.lamp.signalStopWidth, + lineWidth: style.Signal.lamp.stopWidth, stroke: style.backgroundColor } }); diff --git a/src/jmap/shape/Signal/ESigPost.js b/src/jmap/shape/Signal/ESigPost.js index 3ab6cabd3..a93a764db 100644 --- a/src/jmap/shape/Signal/ESigPost.js +++ b/src/jmap/shape/Signal/ESigPost.js @@ -19,13 +19,13 @@ class ESigPost extends Group { z: model.z, shape: { points: [ - [model.x, model.y + style.Signal.lamp.signalR * 1.2], - [model.x, model.y - style.Signal.lamp.signalR * 1.2] + [model.x, model.y + style.Signal.lamp.radiusR * 1.2], + [model.x, model.y - style.Signal.lamp.radiusR * 1.2] ] }, style: { - lineWidth: style.Signal.post.signalLampStandardWidth, - stroke: style.Signal.post.signalLampStandardColor + lineWidth: style.Signal.post.standardWidth, + stroke: style.Signal.post.standardColor } }); @@ -35,12 +35,12 @@ class ESigPost extends Group { shape: { points: [ [model.x, model.y], - [model.x + model.drict * style.Signal.lamp.signalR * 1.2, model.y] + [model.x + model.drict * style.Signal.lamp.radiusR * 1.2, model.y] ] }, style: { - lineWidth: style.Signal.post.signalLampStandardWidth, - stroke: style.Signal.post.signalLampStandardColor + lineWidth: style.Signal.post.standardWidth, + stroke: style.Signal.post.standardColor } }); @@ -55,12 +55,12 @@ class ESigPost extends Group { const style = this.model.style; if (type === '01') { return { - x: model.x + model.drict * style.Signal.lamp.signalR * 3 / 2, + x: model.x + model.drict * style.Signal.lamp.radiusR * 3 / 2, y: model.y }; } else { return { - x: this.hor.shape.points[1][0] + model.drict * style.Signal.lamp.signalR, + x: this.hor.shape.points[1][0] + model.drict * style.Signal.lamp.radiusR, y: this.hor.shape.points[1][1] }; } diff --git a/src/jmap/shape/Signal/ESigRoute.js b/src/jmap/shape/Signal/ESigRoute.js index 1ecc10ff4..ad6b13fc6 100644 --- a/src/jmap/shape/Signal/ESigRoute.js +++ b/src/jmap/shape/Signal/ESigRoute.js @@ -19,12 +19,12 @@ class ESigDrict extends Group { zlevel: model.zlevel, z: model.z, shape: { - points: triangular(model.x, model.y, model.drict, style.Signal.lamp.signalR) + points: triangular(model.x, model.y, model.drict, style.Signal.lamp.radiusR) }, style: { stroke: style.backgroundColor, lineWidth: 0.5, - fill: style.Signal.route.signalRouteColor + fill: style.Signal.route.routeColor } }); diff --git a/src/jmap/shape/Signal/index.js b/src/jmap/shape/Signal/index.js index e24cdd1be..28c3fd5f8 100644 --- a/src/jmap/shape/Signal/index.js +++ b/src/jmap/shape/Signal/index.js @@ -44,7 +44,7 @@ class Signal extends Group { drict: drict, type: model.lampPostType, x: model.position.x, - y: model.position.y + posit * (style.Signal.signalDistance + style.Section.line.width + style.Signal.lamp.signalR) + y: model.position.y + posit * (style.Signal.signalDistance + style.Section.line.width + style.Signal.lamp.radiusR) }); // 信号灯 @@ -57,7 +57,7 @@ class Signal extends Group { style: style, index: i + 1, drict: drict, - x: endPoint.x + i * drict * style.Signal.lamp.signalR * 2, + x: endPoint.x + i * drict * style.Signal.lamp.radiusR * 2, y: endPoint.y, originX: model.position.x, originY: model.position.y @@ -67,8 +67,8 @@ class Signal extends Group { } // 信号机名称 - const sigNameX = model.position.x - drict * (style.Signal.post.signalLampStandardWidth) + model.namePosition.x; - const sigNameY = model.position.y + posit * (style.Signal.signalDistance + style.Section.line.width + style.Signal.lamp.signalR * 2 + model.namePosition.y + style.Signal.text.distance); + const sigNameX = model.position.x - drict * (style.Signal.post.standardWidth) + model.namePosition.x; + const sigNameY = model.position.y + posit * (style.Signal.signalDistance + style.Section.line.width + style.Signal.lamp.radiusR * 2 + model.namePosition.y + style.Signal.text.distance); const textAlign = style.Signal.text.isAlignCenter ? 'middle': this.model.directionType == '01'? 'right': 'left'; const textVerticalAlign = posit == 1 ? 'top' : 'bottom'; this.sigName = new ESigName({ @@ -81,17 +81,17 @@ class Signal extends Group { y: sigNameY, text: model.name, fontWeight: 'normal', - fontSize: style.Signal.text.signalTextFontSize, + fontSize: style.Signal.text.fontSize, fontFamily: style.textFontFormat, - textFill: style.Signal.text.signalDefaultTextColor, + textFill: style.Signal.text.defaultColor, textAlign: textAlign, textVerticalAlign: textVerticalAlign }); // 自动进路 - const sigRouteH = style.Signal.route.signalRouteDirection ? this.count * style.Signal.lamp.signalR * 2 : -style.Signal.lamp.signalR * 2; - const sigRouteX = endPoint.x + (style.Signal.route.signalRouteOffset.x + sigRouteH) * drict; - const sigRouteY = endPoint.y + (style.Signal.route.signalRouteOffset.y); + const sigRouteH = style.Signal.route.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2; + const sigRouteX = endPoint.x + (style.Signal.route.offset.x + sigRouteH) * drict; + const sigRouteY = endPoint.y + (style.Signal.route.offset.y); this.sigRoute = new ESigRoute({ zlevel: this.zlevel, z: this.z, @@ -102,9 +102,9 @@ class Signal extends Group { }); // 自动通过 - const sigAutoH = style.Signal.auto.signalAutoDirection ? this.count * style.Signal.lamp.signalR * 2 : -style.Signal.lamp.signalR * 2; - const sigAutoX = endPoint.x + (style.Signal.auto.signalAutoOffset.x + sigAutoH) * drict; - const sigAutoY = endPoint.y + (style.Signal.auto.signalAutoOffset.y); + const sigAutoH = style.Signal.auto.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2; + const sigAutoX = endPoint.x + (style.Signal.auto.offset.x + sigAutoH) * drict; + const sigAutoY = endPoint.y + (style.Signal.auto.offset.y); this.sigAuto = new ESigAuto({ zlevel: this.zlevel, z: this.z, @@ -114,15 +114,15 @@ class Signal extends Group { x: sigAutoX, y: sigAutoY, width: style.Signal.signalAutoWidth, - fill: style.Signal.lamp.signalAutoRoute, + fill: style.Signal.lamp.autoRoute, lineWidth: 0.6, stroke: style.sidelineColor }); // 延迟解锁 - const sigDelayH = style.Signal.delay.signalDelayDirection ? this.count * style.Signal.lamp.signalR * 2 : -style.Signal.lamp.signalR * 2; - const sigDelayX = endPoint.x + (style.Signal.delay.signalDelayOffset.x + sigDelayH) * drict; - const sigDelayY = endPoint.y - (style.Signal.delay.signalDelayOffset.y) * posit; + const sigDelayH = style.Signal.delay.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2; + const sigDelayX = endPoint.x + (style.Signal.delay.offset.x + sigDelayH) * drict; + const sigDelayY = endPoint.y - (style.Signal.delay.offset.y) * posit; this.sigDelay = new ESigDelay({ zlevel: this.zlevel, z: this.z, @@ -130,10 +130,10 @@ class Signal extends Group { x: sigDelayX, y: sigDelayY, fontWeight: 'bold', - fontSize: style.Signal.delay.signalDelayTextFontSize, + fontSize: style.Signal.delay.fontSize, fontFamily: style.textFontFormat, text: this.model.delayCount || '0', - textFill: style.Signal.delay.signalDelayTextColor, + textFill: style.Signal.delay.fontColor, textAlign: drict > 0 ? 'right' : 'left', textVerticalAlign: 'middle' }); @@ -146,7 +146,7 @@ class Signal extends Group { posit: posit, show: model.buttonShow, x: model.buttonPosition.x, - y: model.buttonPosition.y - posit * (style.Signal.button.signalButtonDistance + style.Signal.lamp.signalR * 2) + y: model.buttonPosition.y - posit * (style.Signal.button.distance + style.Signal.lamp.radiusR * 2) }); this.add(this.sigPost); @@ -191,7 +191,7 @@ class Signal extends Group { if (this.count == 2 && this.model.lightType == '01') { // 双灯 物理点灯 if (this.lamps[0]) { this.lamps[0].setStop(false); - this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor); + this.lamps[0].setColor(this.style.Signal.lamp.redColor); } if (this.lamps[1]) { this.lamps[1].setStop(false); @@ -200,7 +200,7 @@ class Signal extends Group { } else if (this.count == 2 && this.model.lightType == '02') { // 双灯 逻辑点灯 if (this.lamps[0]) { this.lamps[0].setStop(true); - this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor); + this.lamps[0].setColor(this.style.Signal.lamp.redColor); } if (this.lamps[1]) { this.lamps[1].setStop(true); @@ -210,26 +210,26 @@ class Signal extends Group { if (this.lamps[0]) { this.lamps[0].setStop(false); if (this.model.useType == '05') { - this.lamps[0].setColor(this.style.Signal.lamp.signalLampBlueColor); + this.lamps[0].setColor(this.style.Signal.lamp.blueColor); } else { - this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor); + this.lamps[0].setColor(this.style.Signal.lamp.redColor); } } } else if (this.count == 1 && this.model.lightType == '02') { // 单灯 逻辑点灯 if (this.lamps[0]) { this.lamps[0].setStop(true); if (this.model.useType == '05') { - this.lamps[0].setColor(this.style.Signal.lamp.signalLampBlueColor); + this.lamps[0].setColor(this.style.Signal.lamp.blueColor); } else { - this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor); + this.lamps[0].setColor(this.style.Signal.lamp.redColor); } } } else if (this.count == 1) { if (this.lamps[0]) { if (this.model.useType == '05') { - this.lamps[0].setColor(this.style.Signal.lamp.signalLampBlueColor); + this.lamps[0].setColor(this.style.Signal.lamp.blueColor); } else { - this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor); + this.lamps[0].setColor(this.style.Signal.lamp.redColor); } } } @@ -240,7 +240,7 @@ class Signal extends Group { if (this.count == 2 && this.model.lightType == '01' && this.model.switchLocateType == '01') { // 双灯 物理点灯 道岔定位 if (this.lamps[0]) { this.lamps[0].setStop(false); - this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor); + this.lamps[0].setColor(this.style.Signal.lamp.greenColor); } if (this.lamps[1]) { this.lamps[1].setStop(false); @@ -249,7 +249,7 @@ class Signal extends Group { } else if (this.count == 2 && this.model.lightType == '02' && this.model.switchLocateType == '01') { // 双灯 逻辑点灯 道岔定位 if (this.lamps[0]) { this.lamps[0].setStop(true); - this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor); + this.lamps[0].setColor(this.style.Signal.lamp.greenColor); } if (this.lamps[1]) { this.lamps[1].setStop(true); @@ -262,7 +262,7 @@ class Signal extends Group { } if (this.lamps[1]) { this.lamps[1].setStop(false); - this.lamps[1].setColor(this.style.Signal.lamp.signalLampYellowColor); + this.lamps[1].setColor(this.style.Signal.lamp.yellowColor); } } else if (this.count == 2 && this.model.lightType == '02' && this.model.switchLocateType == '02') { // 双灯 逻辑点灯 道岔反位 if (this.lamps[0]) { @@ -271,32 +271,32 @@ class Signal extends Group { } if (this.lamps[1]) { this.lamps[1].setStop(true); - this.lamps[1].setColor(this.style.Signal.lamp.signalLampYellowColor); + this.lamps[1].setColor(this.style.Signal.lamp.yellowColor); } } else if (this.count == 1 && this.model.lightType == '01' && this.model.switchLocateType == '02') { // 单灯 物理点灯 允许调车 if (this.lamps[0]) { this.lamps[0].setStop(false); // 出站信号机/阻隔信号机 if (['02', '06'].includes(this.model.useType)) { - this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor); + this.lamps[0].setColor(this.style.Signal.lamp.greenColor); } else { - this.lamps[0].setColor(this.style.Signal.lamp.signalLampWhiteColor); + this.lamps[0].setColor(this.style.Signal.lamp.whiteColor); } } } else if (this.count == 1 && this.model.lightType == '01' && this.model.switchLocateType == '01') { if (this.lamps[0]) { this.lamps[0].setStop(false); - this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor); + this.lamps[0].setColor(this.style.Signal.lamp.greenColor); } } else if (this.count == 1 && this.model.lightType == '02' && this.model.switchLocateType == '02') { if (this.lamps[0]) { this.lamps[0].setStop(true); - this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor); + this.lamps[0].setColor(this.style.Signal.lamp.greenColor); } } else if (this.count == 1 && this.model.lightType == '02' && this.model.switchLocateType == '01' ) { if (this.lamps[0]) { this.lamps[0].setStop(true); - this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor); + this.lamps[0].setColor(this.style.Signal.lamp.greenColor); } } } @@ -305,7 +305,7 @@ class Signal extends Group { trainRoute() { if (this.count == 1) { /** 单灯 列兼调信号*/ - this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.signalLampYellowColor); + this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor); } } @@ -314,7 +314,7 @@ class Signal extends Group { if (this.count == 1) { /** 单灯 列兼调信号*/ /** 单灯 阻挡兼调车信号*/ - this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.signalLampWhiteColor); + this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.whiteColor); } } @@ -323,11 +323,11 @@ class Signal extends Group { if (this.count == 2 && this.model.lightType == '01') { // 双灯 物理点灯 允许引导信号 if (this.lamps[0]) { this.lamps[0].setStop(false); - this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor); + this.lamps[0].setColor(this.style.Signal.lamp.redColor); } if (this.lamps[1]) { this.lamps[1].setStop(false); - this.lamps[1].setColor(this.style.Signal.lamp.signalLampYellowColor); + this.lamps[1].setColor(this.style.Signal.lamp.yellowColor); } } } @@ -335,25 +335,25 @@ class Signal extends Group { // 封锁 block() { if (this.count == 1) { - this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor); + this.lamps[0].setColor(this.style.Signal.lamp.redColor); // this.siglamp.setNameBorder(1) } - this.sigName.setColor(this.style.Signal.text.signalTextBlockColor); + this.sigName.setColor(this.style.Signal.text.blockColor); } // 功能封锁 functionBlock() { if (this.count == 1) { - this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor); + this.lamps[0].setColor(this.style.Signal.lamp.redColor); // this.siglamp.setRectBlockByIndex(1, true); } } // 信号保护区段监视状态显示 - signalblock() { + signalCheck() { if (this.count == 1) { - this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor); - this.sigName.setColor(this.style.Signal.text.signalTextblock); + this.lamps[0].setColor(this.style.Signal.lamp.redColor); + this.sigName.setColor(this.style.Signal.text.checkColor); } } @@ -362,11 +362,11 @@ class Signal extends Group { if (this.count == 2 && this.model.lightType == '01') { // 双灯 物理点灯 if (this.lamps[0]) { this.lamps[0].setStop(false); - this.lamps[0].setColor(this.style.Signal.lamp.signalLampBlueColor); + this.lamps[0].setColor(this.style.Signal.lamp.blueColor); } if (this.lamps[1]) { this.lamps[1].setStop(false); - this.lamps[1].setColor(this.style.Signal.lamp.signalLampBlueColor); + this.lamps[1].setColor(this.style.Signal.lamp.blueColor); } } } @@ -389,7 +389,7 @@ class Signal extends Group { this.sigAuto.hide(); } - this.sigAuto.setColor(this.style.Signal.auto.signalAutoRoute); + this.sigAuto.setColor(this.style.Signal.auto.autoRoute); } // 信号机进路自动触发模式状态类型 @@ -400,7 +400,7 @@ class Signal extends Group { this.sigAuto.hide(); } - this.sigAuto.setColor(this.style.Signal.auto.signalAutoTrigger); + this.sigAuto.setColor(this.style.Signal.auto.autoTrigger); } // 设置自动信号模式状态类型 @@ -429,7 +429,7 @@ class Signal extends Group { recover() { this.sigDelay.hide(); this.sigAuto.animationRecover(); - this.sigName.setColor(this.style.Signal.text.signalDefaultTextColor); + this.sigName.setColor(this.style.Signal.text.defaultColor); } setState(model) { @@ -443,7 +443,7 @@ class Signal extends Group { case '04': this.block(); break; // 封锁 case '05': this.fault(); break; // 故障 case '06': this.block(); break; // 功能封锁 - case '07': this.signalblock(); break; // 信号保护区段检测 + case '07': this.signalCheck(); break; // 信号保护区段检测 } /** 进路性质类型*/ @@ -467,12 +467,12 @@ class Signal extends Group { } /** 延时解锁*/ - model.delayType = '02'; - switch (model.delayType) { - case '01': break; // 未延时解锁 - case '02': break; // 人工闭塞延时解锁 - case '03': break; // 自动闭塞延时解锁 - } + // model.delayType = '02'; + // switch (model.delayType) { + // case '01': this.setDelayUnlock(); break; // 未延时解锁 + // case '02': this.setDelayUnlock(); break; // 人工闭塞延时解锁 + // case '03': this.setDelayUnlock(); break; // 自动闭塞延时解锁 + // } /** 信号机进路办理,先停止动画,再判断当前颜色是否闪烁*/ if (model.routeSetting && (model.autoType == '03' || model.autoType == '04')) { @@ -491,7 +491,7 @@ class Signal extends Group { getShapeTipPoint(opts) { var rect = new BoundingRect(0, 0, 0, 0); var drict = this.model.directionType == '01' ? -1 : 1; // 朝向 左:右 - var offsetY = this.model.positionType == '01' ? this.style.Signal.text.signalTextFontSize : 0; // 位置 上:下 + var offsetY = this.model.positionType == '01' ? this.style.Signal.text.fontSize : 0; // 位置 上:下 if (opts.val == '1' || opts.val == '2') { rect = this.sigButton.getBoundingRect(); } else { @@ -499,7 +499,7 @@ class Signal extends Group { } return { - x: rect.x + drict * this.style.Signal.post.signalLampStandardWidth, + x: rect.x + drict * this.style.Signal.post.standardWidth, y: rect.y - offsetY }; } diff --git a/src/jmap/shape/StationControl/EMouse.js b/src/jmap/shape/StationControl/EMouse.js index 00c03aca2..cf95a0bf4 100644 --- a/src/jmap/shape/StationControl/EMouse.js +++ b/src/jmap/shape/StationControl/EMouse.js @@ -15,8 +15,8 @@ export default class EMouse extends Group { z: this.device.z+1, position: [0, 0], style: { - x: this.device.model.position.x - this.device.style.StationControl.stationControlDistance / 2 + this.device.style.StationControl.stationOffset.x, - y: this.device.model.position.y + this.device.style.StationControl.stationOffset.y + this.device.style.StationControl.stationControlmodeR + this.device.style.nameDistance-40, + x: this.device.model.position.x - this.device.style.StationControl.lamp.distance / 2 + this.device.style.StationControl.lamp.offset.x, + y: this.device.model.position.y + this.device.style.StationControl.lamp.offset.y + this.device.style.StationControl.lamp.radiusR + this.device.style.nameDistance-40, fontWeight: this.device.style.StationControl.mouseOverStyle.fontWeight, fontSize: this.device.style.StationControl.mouseOverStyle.fontSize, fontFamily: this.device.style.StationControl.mouseOverStyle.fontFormat, diff --git a/src/jmap/shape/StationControl/ESingleControl.js b/src/jmap/shape/StationControl/ESingleControl.js index b2e53cd9f..20f840d8b 100644 --- a/src/jmap/shape/StationControl/ESingleControl.js +++ b/src/jmap/shape/StationControl/ESingleControl.js @@ -33,12 +33,12 @@ export default class ESingleControl extends Group { shape: { cx: model.point.x, cy: model.point.y, - r: model.style.StationControl.stationControlmodeR + r: model.style.StationControl.lamp.radiusR }, style: { lineWidth: 0.5, - fill: model.style.StationControl.stationControlGrayColor, - stroke: model.style.StationControl.stationControlGrayColor + fill: model.style.StationControl.grayColor, + stroke: model.style.StationControl.grayColor } }); @@ -50,7 +50,7 @@ export default class ESingleControl extends Group { position: [0, 0], style: { x: model.point.x, - y: model.point.y + model.style.StationControl.stationControlmodeR + model.style.nameDistance, + y: model.point.y + model.style.StationControl.lamp.radiusR + model.style.nameDistance, fontWeight: model.style.StationControl.text.fontWeight, fontSize: model.style.StationControl.text.fontSize, fontFamily: model.style.StationControl.text.fontFormat, diff --git a/src/jmap/shape/StationControl/index.js b/src/jmap/shape/StationControl/index.js index 22eaa3eed..a127afed8 100644 --- a/src/jmap/shape/StationControl/index.js +++ b/src/jmap/shape/StationControl/index.js @@ -31,8 +31,8 @@ export default class StationControl extends Group { zlevel: this.zlevel, z: this.z, point: { - x: model.position.x - this.style.StationControl.stationControlDistance * 3 / 2 + this.style.StationControl.stationOffset.x, - y: model.position.y + this.style.StationControl.stationOffset.y + x: model.position.x - this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x, + y: model.position.y + this.style.StationControl.lamp.offset.y }, context: model.jjzkContent, pop: false @@ -44,8 +44,8 @@ export default class StationControl extends Group { zlevel: this.zlevel, z: this.z, point: { - x: model.position.x - this.style.StationControl.stationControlDistance / 2 + this.style.StationControl.stationOffset.x, - y: model.position.y + this.style.StationControl.stationOffset.y + x: model.position.x - this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x, + y: model.position.y + this.style.StationControl.lamp.offset.y }, context: model.zokContent, pop: false @@ -57,16 +57,16 @@ export default class StationControl extends Group { zlevel: this.zlevel, z: this.z, point: { - x: model.position.x + this.style.StationControl.stationControlDistance / 2 + this.style.StationControl.stationOffset.x, - y: model.position.y + this.style.StationControl.stationOffset.y + x: model.position.x + this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x, + y: model.position.y + this.style.StationControl.lamp.offset.y }, context: model.zakContent, pop: false }); // 箭头 - if (this.style.StationControl.arrowsShow) { - const point = arrows(this.model.position.x, this.model.position.y + this.style.StationControl.stationControlmodeR / 2, this.style.StationControl.stationControlDistance / 6, this.style.StationControl.stationControlmodeR * 0.8); + if (this.style.StationControl.arrow.show) { + const point = arrows(this.model.position.x, this.model.position.y + this.style.StationControl.lamp.radiusR / 2, this.style.StationControl.lamp.distance / 6, this.style.StationControl.lamp.radiusR * 0.8); this.arrowsControl = new EArrow({ zlevel: this.zlevel, z: this.z, @@ -74,9 +74,9 @@ export default class StationControl extends Group { count: this.count, drict: 1, point: point, - x: model.position.x + this.style.StationControl.stationOffset.x, - y: model.position.y + this.style.StationControl.stationControlmodeR / 2 + this.style.StationControl.stationOffset.y, - fill: this.style.StationControl.stationControlGrayColor, + x: model.position.x + this.style.StationControl.lamp.offset.x, + y: model.position.y + this.style.StationControl.lamp.radiusR / 2 + this.style.StationControl.lamp.offset.y, + fill: this.style.StationControl.lamp.grayColor, lineWidth: 1, stroke: this.style.sidelineColor }); @@ -85,7 +85,7 @@ export default class StationControl extends Group { this.add(this.substationControl); this.add(this.centerControl); - if (this.style.StationControl.singleControlNum == 3) { + if (this.style.StationControl.lamp.count == 3) { this.add(this.emergencyControl); } } @@ -95,24 +95,24 @@ export default class StationControl extends Group { this.model = model; switch (model.status) { case '00': // 无状态 - this.emergencyControl.setColor(this.style.StationControl.stationControlGrayColor); - this.substationControl.setColor(this.style.StationControl.stationControlGrayColor); - this.centerControl.setColor(this.style.StationControl.stationControlGrayColor); + this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor); + this.substationControl.setColor(this.style.StationControl.lamp.grayColor); + this.centerControl.setColor(this.style.StationControl.lamp.grayColor); break; case '01': // 中控 - this.emergencyControl.setColor(this.style.StationControl.stationControlGrayColor); - this.substationControl.setColor(this.style.StationControl.stationControlGrayColor); - this.centerControl.setColor(this.style.StationControl.stationControlGreenColor); + this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor); + this.substationControl.setColor(this.style.StationControl.lamp.grayColor); + this.centerControl.setColor(this.style.StationControl.lamp.greenColor); break; case '02': // 站控 - this.emergencyControl.setColor(this.style.StationControl.stationControlGrayColor); - this.substationControl.setColor(this.style.StationControl.stationControlYellowColor); - this.centerControl.setColor(this.style.StationControl.stationControlGrayColor); + this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor); + this.substationControl.setColor(this.style.StationControl.lamp.yellowColor); + this.centerControl.setColor(this.style.StationControl.lamp.grayColor); break; case '03': // 紧急站控 - this.emergencyControl.setColor(this.style.StationControl.stationControlRedColor); - this.substationControl.setColor(this.style.StationControl.stationControlGrayColor); - this.centerControl.setColor(this.style.StationControl.stationControlGrayColor); + this.emergencyControl.setColor(this.style.StationControl.lamp.redColor); + this.substationControl.setColor(this.style.StationControl.lamp.grayColor); + this.centerControl.setColor(this.style.StationControl.lamp.grayColor); break; } } diff --git a/src/jmap/shape/StationStand/index.js b/src/jmap/shape/StationStand/index.js index f521ca0c4..375e6efd8 100644 --- a/src/jmap/shape/StationStand/index.js +++ b/src/jmap/shape/StationStand/index.js @@ -273,7 +273,7 @@ class StationStand extends Group { /** 自动换端*/ autoChangeEnds() { this.reentry.show(); - this.reentry.setColor(this.style.StationStand.reentry.AutoChangeEndsColor); + this.reentry.setColor(this.style.StationStand.reentry.autoChangeEndsColor); } setState(model) { diff --git a/src/jmap/shape/Switch/ESwName.js b/src/jmap/shape/Switch/ESwName.js index 419edc0d6..96efdcfca 100644 --- a/src/jmap/shape/Switch/ESwName.js +++ b/src/jmap/shape/Switch/ESwName.js @@ -50,7 +50,7 @@ class ESwName extends Group { style: { lineWidth: 0, lineDash: [3, 3], - stroke: style.Switch.text.switchTextBorderColor, + stroke: style.Switch.text.borderColor, fill: style.transparentColor } }); diff --git a/src/jmap/shape/Switch/index.js b/src/jmap/shape/Switch/index.js index c5ac63f9b..dd27a903d 100644 --- a/src/jmap/shape/Switch/index.js +++ b/src/jmap/shape/Switch/index.js @@ -42,7 +42,7 @@ export default class Switch extends Group { let halfWidth = style.Section.line.width / 2; const switchWidth = style.Section.line.width + style.Section.line.beyondWidth*2 + 0.8; - const swPadding = style.Switch.core.switchLen; + const swPadding = style.Switch.core.legnth; const directx = this.triangle.drictx; const directy = this.triangle.dricty; const direct = -this.triangle.drictx * this.triangle.dricty; @@ -121,8 +121,8 @@ export default class Switch extends Group { const arrowTextX = model.intersection.x + 10; const arrowTextY = model.intersection.y + 15; - const nameTextX = model.namePosition.x + model.intersection.x + this.triangle.drictx * (style.Section.line.width * 3 + style.Switch.text.switchNameDistance) * this.triangle.getCotRate(); - const nameTextY = model.namePosition.y + model.intersection.y + this.triangle.dricty * (style.Switch.text.switchNameDistance); + const nameTextX = model.namePosition.x + model.intersection.x + this.triangle.drictx * (style.Section.line.width * 3 + style.Switch.text.distance) * this.triangle.getCotRate(); + const nameTextY = model.namePosition.y + model.intersection.y + this.triangle.dricty * (style.Switch.text.distance); this.name = new ESwName({ zlevel: this.zlevel, z: this.z, @@ -148,13 +148,13 @@ export default class Switch extends Group { nameTextAnimation() { this.name.getNameText().animateStyle(true) .when(0, { textFill: this.style.backgroundColor }) - .when(1000, { textFill: this.style.Switch.text.switchTextLossColor }) + .when(1000, { textFill: this.style.Switch.text.lossColor }) .when(2000, { textFill: this.style.backgroundColor }) .start(); this.name.getTextRect().animateStyle(true) .when(0, { textFill: this.style.backgroundColor }) - .when(1000, { textFill: this.style.Switch.text.switchTextBorderColor }) + .when(1000, { textFill: this.style.Switch.text.borderColor }) .when(2000, { textFill: this.style.backgroundColor }) .start(); } @@ -205,7 +205,7 @@ export default class Switch extends Group { this.setSwitchCoreInvisible(true); this.locShelter.show(); this.relocShelter.hide(); - this.setTextColor(this.style.Switch.text.switchTextLocateColor); + this.setTextColor(this.style.Switch.text.locateColor); } /** 反位*/ @@ -214,7 +214,7 @@ export default class Switch extends Group { this.setSwitchCoreInvisible(true); this.locShelter.hide(); this.relocShelter.show(); - this.setTextColor(this.style.Switch.text.switchInversionColor); + this.setTextColor(this.style.Switch.text.inversionColor); this.setSectionState(this.relocShelter.getSection(), 'fill', this.model.sectionAstatus); } @@ -224,7 +224,7 @@ export default class Switch extends Group { this.locShelter.hide(); this.relocShelter.hide(); this.setSwitchCoreInvisible(false); - this.setTextColor(this.style.Switch.text.switchTextLossColor); + this.setTextColor(this.style.Switch.text.lossColor); nameFlicker && this.nameTextAnimation(); } @@ -246,7 +246,7 @@ export default class Switch extends Group { /** 单锁*/ setMonolock() { - this.setTextColor(this.style.Switch.switchMonolockColor); + this.setTextColor(this.style.Switch.monolockColor); } /** 封锁 */ From 44a1d197cbe0c86a209c9596f0627408170a70c9 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 2 Aug 2019 17:06:37 +0800 Subject: [PATCH 05/16] =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9A=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 --- src/jmap/shape/StationControl/index.js | 17 ++++++++-- src/jmap/shape/StationStand/EJump.js | 7 ++-- src/jmap/shape/StationStand/index.js | 47 ++++++++++++++++---------- 3 files changed, 49 insertions(+), 22 deletions(-) diff --git a/src/jmap/shape/StationControl/index.js b/src/jmap/shape/StationControl/index.js index 22eaa3eed..8255c295a 100644 --- a/src/jmap/shape/StationControl/index.js +++ b/src/jmap/shape/StationControl/index.js @@ -63,7 +63,18 @@ export default class StationControl extends Group { context: model.zakContent, pop: false }); - + this.turnedAroundControl = new ESingleControl({ + _subType: 'turnedAround', + style: this.style, + zlevel: this.zlevel, + z: this.z, + point: { + x: model.position.x + this.style.StationControl.stationControlDistance * 3 / 2 + this.style.StationControl.stationOffset.x, + y: model.position.y + this.style.StationControl.stationOffset.y + }, + context: '按图折返', + pop: false + }); // 箭头 if (this.style.StationControl.arrowsShow) { const point = arrows(this.model.position.x, this.model.position.y + this.style.StationControl.stationControlmodeR / 2, this.style.StationControl.stationControlDistance / 6, this.style.StationControl.stationControlmodeR * 0.8); @@ -82,11 +93,13 @@ export default class StationControl extends Group { }); this.add(this.arrowsControl); } - this.add(this.substationControl); this.add(this.centerControl); if (this.style.StationControl.singleControlNum == 3) { this.add(this.emergencyControl); + } else if (this.style.StationControl.singleControlNum == 4) { + this.add(this.emergencyControl); + this.add(this.turnedAroundControl); } } diff --git a/src/jmap/shape/StationStand/EJump.js b/src/jmap/shape/StationStand/EJump.js index 7665c6567..12bc43583 100644 --- a/src/jmap/shape/StationStand/EJump.js +++ b/src/jmap/shape/StationStand/EJump.js @@ -8,7 +8,7 @@ class EJump extends Group { this.model = model; this.isNew = false; this.create(); - this.setStatus(); + this.setStatus(model.jumpStopStatus); } create() { @@ -57,12 +57,15 @@ class EJump extends Group { } setStatus(val) { switch (val) { - case '01': + case '03': this.jumpArc.show(); break; case '02': this.jumpArc.hide(); break; + case '01': + this.jumpArc.hide(); + break; } } setColor(color) { diff --git a/src/jmap/shape/StationStand/index.js b/src/jmap/shape/StationStand/index.js index 74bd525ed..ba6e18049 100644 --- a/src/jmap/shape/StationStand/index.js +++ b/src/jmap/shape/StationStand/index.js @@ -130,24 +130,27 @@ class StationStand extends Group { name: model.intervalRunTime || '5' }); /** 列车停跳 */ - // const jumpD = style.StationStand.jump.direction ? model.height - distance: -style.StationStand.safetyDoor.height; - // const jumpH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + jumpD; - // const jumpX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2); - // const jumpY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y) + drict * jumpH; - // const jumpCX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2 - style.StationStand.common.textFontSize/2); - // const jumpCY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y + style.StationStand.common.textFontSize / 2) + drict * jumpH; - // this.jump = new EJump({ - // zlevel: this.zlevel, - // z: this.z + 1, - // style: style, - // x: jumpX, - // y: jumpY, - // cx: jumpCX, - // cy: jumpCY, - // textAlign: 'middle', - // textVerticalAlign: 'top' - // }); - + if (style.StationStand.haveJumpShow) { + const jumpD = style.StationStand.jump.direction ? model.height - distance: -style.StationStand.safetyDoor.height; + const jumpH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + jumpD; + const jumpX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2); + const jumpY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y) + drict * jumpH; + const jumpCX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2); + const jumpCY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y - style.StationStand.common.textFontSize / 2) + drict * jumpH; + this.jump = new EJump({ + zlevel: this.zlevel, + z: this.z + 1, + style: style, + x: jumpX, + y: jumpY, + cx: jumpCX, + cy: jumpCY, + textAlign: 'middle', + textVerticalAlign: 'top', + jumpStopStatus: model.jumpStopStatus + }); + this.add(this.jump); + } this.add(this.safeDoor); this.add(this.safeStand); this.add(this.emergent); @@ -185,6 +188,7 @@ class StationStand extends Group { this.detain.hide(); this.reentry.hide(); this.emergent.hide(); + this.jump && this.jump.hide(); if (this.model.visible) { this.safeDoor.hasDoor(false); } this.safeDoor.setColor(this.style.StationStand.safetyDoor.defaultColor); } @@ -202,6 +206,8 @@ class StationStand extends Group { /** 指定列车跳站*/ designatedJumpStop() { this.safeStand.setColor(this.style.StationStand.stand.designatedJumpStopColor); + this.jump && this.jump.show(); + this.jump && this.jump.setStatus(this.model.jumpStopStatus); } /** 站台紧急关闭*/ @@ -212,11 +218,15 @@ class StationStand extends Group { /** 未设置跳停*/ unJumpStop() { + this.jump && this.jump.hide(); + this.jump && this.jump.setStatus(this.model.jumpStopStatus); } /** 站台跳停*/ jumpStop() { this.safeStand.setColor(this.style.StationStand.stand.jumpStopColor); + this.jump && this.jump.show(); + this.jump && this.jump.setStatus(this.model.jumpStopStatus); } /** 未设置扣车*/ @@ -319,6 +329,7 @@ class StationStand extends Group { /** 设置跳停*/ if (model.status == '01') { + console.log( 'jump', model.jumpStopStatus); switch (model.jumpStopStatus) { case '01': /** 未设置跳停*/ this.unJumpStop(); From b7e021d7375f44eff80ab051b0c2b1ca390b9aa5 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 2 Aug 2019 17:14:21 +0800 Subject: [PATCH 06/16] Merge branch 'master' of https://git.cloud.tencent.com/joylink/jl-nclient # Conflicts: # src/jmap/config/skinStyle/chengdu_03.js --- src/jmap/config/skinStyle/chengdu_03.js | 35 ++++++++++++++++--------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/src/jmap/config/skinStyle/chengdu_03.js b/src/jmap/config/skinStyle/chengdu_03.js index 6abd70b84..921201bbf 100644 --- a/src/jmap/config/skinStyle/chengdu_03.js +++ b/src/jmap/config/skinStyle/chengdu_03.js @@ -124,14 +124,14 @@ class SkinStyle extends defaultStyle { height: 3, // 站台屏蔽门高度 distance: 8, // 站台和屏蔽门之间的距离 defaultColor: '#00FF00', // 屏蔽门默认颜色 - splitDoorColor: '#F61107' // 屏蔽门切除颜色 + splitDoorColor: '#C00808' // 屏蔽门切除颜色 }, stand: { // 站台 headFontSize: 10, // 站台首端字体大小 - spareColor: '#606060', // 站台空闲颜色 - stopColor: '#FEFE00', // 站台列车停站颜色 - jumpStopColor: '#9A99FF', // 站台跳停颜色 - designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色 + spareColor: '#808080', // 站台空闲颜色 + stopColor: '#FFF000', // 站台列车停站颜色 + jumpStopColor: '#808080', // 站台跳停颜色 + designatedJumpStopColor: '#808080' // 站台指定列车跳停颜色 }, standEmergent: { // 紧急关闭 mergentR: 4, // 站台紧急关闭半径 @@ -147,21 +147,30 @@ class SkinStyle extends defaultStyle { detainCar: { // 扣车 text: '扣', // 扣车显示内容 direction: -1, // 扣车方向 - offset: {x: -8, y: -6}, // 扣车偏移量 - trainColor: '#E4EF50', // 车站扣车颜色 - centerTrainColor: '#FFFFFF', // 中心扣车颜色 - andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 + offset: {x: -8, y: -20}, // 扣车偏移量 + trainColor: '#FFFF00', // 车站扣车颜色 + centerTrainColor: '#C0C0C0', // 中心扣车颜色 + andCenterTrainColor: '#C0C0C0', // 车站+中心扣车颜色 detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色 }, stopTime: { // 停站时间 direction: 1, // 运行时间方向 - offset: {x: -8, y: 26}, // 运行时间偏移量 - textColor: '#FFFFFF' // 停站时间字体颜色 + offset: {x: -8, y: -4}, // 运行时间偏移量 + textColor: '#C0C0C0' // 停站时间字体颜色 + }, + jump: { + text: '跳', // 停跳显示内容 + direction: -1, // 停跳方向 + offset: {x: -8, y: 0}, + textColor: '#0000FF', // 停跳文字颜色 + arcColor: '#0000FF', // 停跳圆圈颜色 + fillColor: 'rgba(0,0,0,0)', // 透明填充颜色 + r: 8 // 圆半径大小 }, level: { // 运行等级 direction: 1, // 运行等级方向 - offset: {x: -8, y: 6}, // 运行等级偏移量 - textColor: '#FFFFFF' // 停站等级字体颜色 + offset: {x: -8, y: 30}, // 运行等级偏移量 + textColor: '#FFF000' // 停站等级字体颜色 } }; From ce5600c17346f1f5e2ac4b60d931082b84ca23e4 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 2 Aug 2019 17:22:23 +0800 Subject: [PATCH 07/16] =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9A=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmap/shape/StationControl/index.js | 4 ++-- src/jmap/shape/StationStand/index.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/jmap/shape/StationControl/index.js b/src/jmap/shape/StationControl/index.js index f7390cfb5..d50888b10 100644 --- a/src/jmap/shape/StationControl/index.js +++ b/src/jmap/shape/StationControl/index.js @@ -69,8 +69,8 @@ export default class StationControl extends Group { zlevel: this.zlevel, z: this.z, point: { - x: model.position.x + this.style.StationControl.stationControlDistance * 3 / 2 + this.style.StationControl.stationOffset.x, - y: model.position.y + this.style.StationControl.stationOffset.y + x: model.position.x + this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x, + y: model.position.y + this.style.StationControl.lamp.offset.y }, context: '按图折返', pop: false diff --git a/src/jmap/shape/StationStand/index.js b/src/jmap/shape/StationStand/index.js index 8f744481a..e41079d64 100644 --- a/src/jmap/shape/StationStand/index.js +++ b/src/jmap/shape/StationStand/index.js @@ -329,7 +329,6 @@ class StationStand extends Group { /** 设置跳停*/ if (model.status == '01') { - console.log( 'jump', model.jumpStopStatus); switch (model.jumpStopStatus) { case '01': /** 未设置跳停*/ this.unJumpStop(); From 7dec924ac426ff9422401599f65d517e5825b92b Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 2 Aug 2019 17:38:21 +0800 Subject: [PATCH 08/16] =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9A=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmap/config/skinStyle/chengdu_03.js | 7 ++++--- src/jmap/shape/StationStand/index.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/jmap/config/skinStyle/chengdu_03.js b/src/jmap/config/skinStyle/chengdu_03.js index 921201bbf..5e335d3ad 100644 --- a/src/jmap/config/skinStyle/chengdu_03.js +++ b/src/jmap/config/skinStyle/chengdu_03.js @@ -118,7 +118,8 @@ class SkinStyle extends defaultStyle { this[deviceType.StationStand] = { common: { // 通用属性 - textFontSize: 10 // 站台默认字体大小 + textFontSize: 10, // 站台默认字体大小 + haveJumpShow: true // 站台是否有列车停跳显示 }, safetyDoor: { // 屏蔽门 height: 3, // 站台屏蔽门高度 @@ -131,7 +132,7 @@ class SkinStyle extends defaultStyle { spareColor: '#808080', // 站台空闲颜色 stopColor: '#FFF000', // 站台列车停站颜色 jumpStopColor: '#808080', // 站台跳停颜色 - designatedJumpStopColor: '#808080' // 站台指定列车跳停颜色 + designatedJumpStopColor: '#808080' // 站台指定列车跳停颜色 }, standEmergent: { // 紧急关闭 mergentR: 4, // 站台紧急关闭半径 @@ -165,7 +166,7 @@ class SkinStyle extends defaultStyle { textColor: '#0000FF', // 停跳文字颜色 arcColor: '#0000FF', // 停跳圆圈颜色 fillColor: 'rgba(0,0,0,0)', // 透明填充颜色 - r: 8 // 圆半径大小 + r: 8 // 圆半径大小 }, level: { // 运行等级 direction: 1, // 运行等级方向 diff --git a/src/jmap/shape/StationStand/index.js b/src/jmap/shape/StationStand/index.js index e41079d64..7f9b53504 100644 --- a/src/jmap/shape/StationStand/index.js +++ b/src/jmap/shape/StationStand/index.js @@ -130,7 +130,7 @@ class StationStand extends Group { name: model.intervalRunTime || '5' }); /** 列车停跳 */ - if (style.StationStand.haveJumpShow) { + if (style.StationStand.common.haveJumpShow) { const jumpD = style.StationStand.jump.direction ? model.height - distance: -style.StationStand.safetyDoor.height; const jumpH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + jumpD; const jumpX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2); From e38570436042c166f477247a9bde33115e480eb4 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 2 Aug 2019 17:41:12 +0800 Subject: [PATCH 09/16] =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9A=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmap/config/skinStyle/fuzhou_01.js | 2 +- src/jmap/shape/StationControl/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jmap/config/skinStyle/fuzhou_01.js b/src/jmap/config/skinStyle/fuzhou_01.js index 2301400c9..19bab85a6 100644 --- a/src/jmap/config/skinStyle/fuzhou_01.js +++ b/src/jmap/config/skinStyle/fuzhou_01.js @@ -172,7 +172,7 @@ class SkinStyle extends defaultStyle { textVerticalAlign: 'top' // 字体垂直对齐 }, lamp: { - count: 2, // 控制模式灯个数 + count: 4, // 控制模式灯个数 offset: {x: 0, y: 0}, // 控制模式灯偏移量 radiusR: 4, // 控制模式灯的半径 distance: 36, // 控制模式之间灯之间的距离 diff --git a/src/jmap/shape/StationControl/index.js b/src/jmap/shape/StationControl/index.js index d50888b10..f0f37d187 100644 --- a/src/jmap/shape/StationControl/index.js +++ b/src/jmap/shape/StationControl/index.js @@ -97,7 +97,7 @@ export default class StationControl extends Group { this.add(this.centerControl); if (this.style.StationControl.lamp.count == 3) { this.add(this.emergencyControl); - } else if (this.style.StationControl.singleControlNum == 4) { + } else if (this.style.StationControl.lamp.count == 4) { this.add(this.emergencyControl); this.add(this.turnedAroundControl); } From 9c51e10ec127d6b4bf9b18b65162b3abca00fc09 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 2 Aug 2019 17:57:14 +0800 Subject: [PATCH 10/16] =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9A=E7=9A=AE?= =?UTF-8?q?=E8=82=A4=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmap/config/skinStyle/chengdu_03.js | 2 +- src/jmap/config/skinStyle/fuzhou_01.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jmap/config/skinStyle/chengdu_03.js b/src/jmap/config/skinStyle/chengdu_03.js index 5e335d3ad..8e68e401c 100644 --- a/src/jmap/config/skinStyle/chengdu_03.js +++ b/src/jmap/config/skinStyle/chengdu_03.js @@ -185,7 +185,7 @@ class SkinStyle extends defaultStyle { textVerticalAlign: 'top' // 字体垂直对齐 }, lamp: { - count: 2, // 控制模式的个数 + count: 4, // 控制模式的个数 offset: {x: 0, y: 0}, // 偏移量 radiusR: 4, // 控制模式灯的半径 distance: 36, // 控制模式之间灯之间的距离 diff --git a/src/jmap/config/skinStyle/fuzhou_01.js b/src/jmap/config/skinStyle/fuzhou_01.js index 19bab85a6..2301400c9 100644 --- a/src/jmap/config/skinStyle/fuzhou_01.js +++ b/src/jmap/config/skinStyle/fuzhou_01.js @@ -172,7 +172,7 @@ class SkinStyle extends defaultStyle { textVerticalAlign: 'top' // 字体垂直对齐 }, lamp: { - count: 4, // 控制模式灯个数 + count: 2, // 控制模式灯个数 offset: {x: 0, y: 0}, // 控制模式灯偏移量 radiusR: 4, // 控制模式灯的半径 distance: 36, // 控制模式之间灯之间的距离 From 77db948f68d08de9ff657fc66078974fcb360b98 Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Fri, 2 Aug 2019 18:05:08 +0800 Subject: [PATCH 11/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9A=AE=E8=82=A4?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmap/config/defaultStyle.js | 38 ++------------- src/jmap/config/skinStyle/bejing_01.js | 46 ++++++++++++------- src/jmap/config/skinStyle/chengdu_03.js | 25 +++++++++- src/jmap/config/skinStyle/fuzhou_01.js | 23 +++++++++- src/jmap/shape/Section/index.js | 18 ++++---- src/jmap/shape/Signal/index.js | 16 +++---- src/jmap/shape/StationControl/EMouse.js | 2 +- .../shape/StationControl/ESingleControl.js | 2 +- src/jmap/shape/StationCounter/index.js | 8 ++-- src/jmap/shape/StationDelayUnlock/index.js | 8 ++-- src/jmap/shape/Switch/ESwName.js | 8 ++-- src/jmap/shape/Train/TrainBody/index.js | 2 +- 12 files changed, 112 insertions(+), 84 deletions(-) diff --git a/src/jmap/config/defaultStyle.js b/src/jmap/config/defaultStyle.js index c0fbabf83..240481216 100644 --- a/src/jmap/config/defaultStyle.js +++ b/src/jmap/config/defaultStyle.js @@ -1,5 +1,8 @@ export default class defaultStyle { constructor() { + /** 透明填充 颜色*/ + this.transparentColor = 'rgba(0,0,0,0)'; + /** 默认背景 颜色*/ this.backgroundColor = '#000000'; @@ -9,9 +12,6 @@ export default class defaultStyle { /** 默认边线 颜色*/ this.sidelineColor = '#FFFFFF'; - /** 透明填充 颜色*/ - this.transparentColor = 'rgba(0,0,0,0)'; - /** 默认字体 大小*/ this.textFontSize = 10; @@ -21,36 +21,8 @@ export default class defaultStyle { /** 默认字体颜色*/ this.textFontColor = '#C0C0C0'; - /** 默认字体阴影颜色*/ - this.textShadowColor = '#FFFF00'; - - /** 默认名称和设备的距离*/ - this.nameDistance = 2; - - /** 计数器字体颜色*/ - this.stationCounterTextColor = '#FFFFFF'; - /** 计数器边框颜色*/ - this.stationCounterBorderColor = '#E4EF50'; - /** 延迟解锁倒计时和设备文字之间的距离*/ - this.stationDelayUnlockDistance = 3; - /** 延时解锁字体颜色*/ - this.stationDelayUnlockTextColor = '#FFFFFF'; - /** 延迟解锁边框颜色*/ - this.stationDelayUnlockBorderColor = '#FFFFFF'; - - /** 目的码字体颜色*/ - this.destinationTextFontColor = 'yellow'; - - /** 计数器字体颜色*/ - this.stationCounterTextColor = '#FFFFFF'; - /** 计数器边框颜色*/ - this.stationCounterBorderColor = '#E4EF50'; - /** 延迟解锁倒计时和设备文字之间的距离*/ - this.stationDelayUnlockDistance = 3; - /** 延时解锁字体颜色*/ - this.stationDelayUnlockTextColor = '#FFFFFF'; - /** 延迟解锁边框颜色*/ - this.stationDelayUnlockBorderColor = '#FFFFFF'; + /** 默认提示字体大小*/ + this.arrowFontSize = 10; /** 列车长度*/ this.trainWidth = 40; diff --git a/src/jmap/config/skinStyle/bejing_01.js b/src/jmap/config/skinStyle/bejing_01.js index b45add1a3..dbc523a27 100644 --- a/src/jmap/config/skinStyle/bejing_01.js +++ b/src/jmap/config/skinStyle/bejing_01.js @@ -13,9 +13,11 @@ class SkinStyle extends defaultStyle { this[deviceType.Section] = { text: { // 区段文字属性 + distance: 2, // 文字离区段距离 fontSize: 10, // 字体大小 fontFormat: 'consolas', // 字体族类 fontColor: '#C0C0C0', // 字体颜色 + destinationTextColor: 'yellow', // 目的地颜色 textAlign: 'center', // 水平对齐方式 textPosition: 'inside', // 文字位置 textVerticalAlign: 'middle', // 文字垂直对齐方式 @@ -67,7 +69,7 @@ class SkinStyle extends defaultStyle { }; this[deviceType.Signal] = { - signalDistance: 0, // 设备距离区段的距离 + distance: 0, // 设备距离区段的距离 post: { standardColor: '#5578B6', // 灯灯柱颜色 standardWidth: 1.5 // 灯柱宽度 @@ -180,6 +182,7 @@ class SkinStyle extends defaultStyle { this[deviceType.StationControl] = { text: { + distance: 2, // 灯和文字之间的距离 fontSize: 10, // 控制模式字体大小 fontFormat: 'consolas', // 控制模式字体格式 fontColor: '#ffffff', // 控制模式字体颜色 @@ -211,28 +214,39 @@ class SkinStyle extends defaultStyle { } }; + this[deviceType.StationCounter] = { + text: { + distance: 2, // 计数器名称和文字的距离 + fontColor: '#FFFFFF', // 计数器字体颜色 + borderColor: '#E4EF50' // 计数器边框颜色 + } + }; + + this[deviceType.StationDelayUnlock] = { + text: { + distance: 3, // 延迟解锁和设备之间的距离 + fontColor: '#FFFFFF', // 延时解锁字体颜色 + borderColor: '#FFFFFF' // 延迟解锁边框颜色 + } + }; + this[deviceType.Station] = { - kilometerPosition: 'down' // 公里标位置 + kilometerPosition: 'down' // 公里标位置 }; this[deviceType.Switch] = { text: { - /** 道岔名称与区段距离*/ - distance: 2, - /** 道岔边框颜色*/ - borderColor: '#FE0000', - /** 道岔失去颜色*/ - lossColor: '#FFFFFF', - /** 道岔定位颜色*/ - locateColor: '#00FF00', - /** 道岔反位颜色*/ - inversionColor: '#9C9D09', - /** 道岔单锁颜色*/ - monolockColor: '#870E10' + distance: 2, // 道岔名称与区段距离 + fontSize: 10, // 字体大小 + fontWeight: 'normal', // 字体粗细 + borderColor: '#FE0000', // 道岔边框颜色 + lossColor: '#FFFFFF', // 道岔失去颜色 + locateColor: '#00FF00', // 道岔定位颜色 + inversionColor: '#9C9D09', // 道岔反位颜色 + monolockColor: '#870E10' // 道岔单锁颜色 }, core: { - /** 道岔单边长度 */ - legnth: 6 + legnth: 6 // 道岔单边长度 }, mouseOverStyle: { borderBackgroundColor: '#22DFDF', // 边框背景色 diff --git a/src/jmap/config/skinStyle/chengdu_03.js b/src/jmap/config/skinStyle/chengdu_03.js index 6abd70b84..67cbe6dfa 100644 --- a/src/jmap/config/skinStyle/chengdu_03.js +++ b/src/jmap/config/skinStyle/chengdu_03.js @@ -12,9 +12,11 @@ class SkinStyle extends defaultStyle { }; this[deviceType.Section] = { text: { // 区段文字属性 + distance: 2, // 文字离区段距离 fontSize: 12, // 字体大小 fontFormat: 'consolas', // 字体族类 fontColor: '#FFFFFF', // 字体颜色 + destinationTextColor: 'yellow', // 目的地颜色 textAlign: 'center', // 水平对齐方式 textPosition: 'inside', // 文字位置 textVerticalAlign: 'middle', // 文字垂直对齐方式 @@ -61,7 +63,7 @@ class SkinStyle extends defaultStyle { }; this[deviceType.Signal] = { - signalDistance: 10, // 设备距离区段的距离 + distance: 10, // 设备距离区段的距离 post: { standardColor: '#FFFFFF', // 灯柱颜色 standardWidth: 2 // 灯柱宽度 @@ -104,7 +106,7 @@ class SkinStyle extends defaultStyle { delay: { direction: true, // 延时解锁方向 offset: { x: 15, y: -10}, // 延时解锁偏移量 - fontSize: 9, // 延迟解锁字体大小 + fontSize: 10, // 延迟解锁字体大小 fontColor: '#C00808' // 延迟解锁颜色 }, @@ -167,6 +169,7 @@ class SkinStyle extends defaultStyle { this[deviceType.StationControl] = { text: { + distance: 2, // 灯和文字之间的距离 fontSize: 10, // 字体大小 fontFormat: 'consolas', // 字体格式 fontColor: '#ffffff', // 字体颜色 @@ -189,6 +192,22 @@ class SkinStyle extends defaultStyle { } }; + this[deviceType.StationCounter] = { + text: { + distance: 2, // 计数器名称和文字的距离 + fontColor: '#FFFFFF', // 计数器字体颜色 + borderColor: '#E4EF50' // 计数器边框颜色 + } + }; + + this[deviceType.StationDelayUnlock] = { + text: { + distance: 3, // 延迟解锁和设备之间的距离 + fontColor: '#FFFFFF', // 延时解锁字体颜色 + borderColor: '#FFFFFF' // 延迟解锁边框颜色 + } + }; + this[deviceType.Station] = { kilometerPosition: 'up' // 公里标朝向 }; @@ -196,6 +215,8 @@ class SkinStyle extends defaultStyle { this[deviceType.Switch] = { text: { distance: 2, // 道岔名称与区段距离 + fontSize: 12, // 字体大小 + fontWeight: 'normal', // 字体粗细 borderColor: '#FE0000', // 道岔边框颜色 lossColor: '#C00808', // 道岔失去颜色 locateColor: '#00FF00', // 道岔定位颜色 diff --git a/src/jmap/config/skinStyle/fuzhou_01.js b/src/jmap/config/skinStyle/fuzhou_01.js index 2301400c9..81f12dc55 100644 --- a/src/jmap/config/skinStyle/fuzhou_01.js +++ b/src/jmap/config/skinStyle/fuzhou_01.js @@ -13,8 +13,10 @@ class SkinStyle extends defaultStyle { this[deviceType.Section] = { text: { // 区段文字属性 + distance: 2, // 文字离区段距离 fontSize: 10, // 字体大小 fontColor: '#FFFFFF', // 字体颜色 + destinationTextColor: 'yellow', // 目的地颜色 textAlign: 'center', // 水平对齐方式 textPosition: 'inside', // 文字位置 textVerticalAlign: 'middle', // 文字垂直对齐方式 @@ -61,7 +63,7 @@ class SkinStyle extends defaultStyle { }; this[deviceType.Signal] = { - signalDistance: 10, // 设备距离区段的距离 + distance: 10, // 设备距离区段的距离 post: { standardColor: '#3149C3', // 灯珠颜色 standardWidth: 2 // 灯珠宽度 @@ -164,6 +166,7 @@ class SkinStyle extends defaultStyle { this[deviceType.StationControl] = { text: { + distance: 2, // 灯和文字之间的距离 fontSize: 10, // 字体大小 fontFormat: 'consolas', // 字体格式 fontColor: '#ffffff', // 字体颜色 @@ -186,6 +189,22 @@ class SkinStyle extends defaultStyle { } }; + this[deviceType.StationCounter] = { + text: { + distance: 2, // 计数器名称和文字的距离 + fontColor: '#FFFFFF', // 计数器字体颜色 + borderColor: '#E4EF50' // 计数器边框颜色 + } + }; + + this[deviceType.StationDelayUnlock] = { + text: { + distance: 3, // 延迟解锁和设备之间的距离 + fontColor: '#FFFFFF', // 延时解锁字体颜色 + borderColor: '#FFFFFF' // 延迟解锁边框颜色 + } + }; + this[deviceType.Station] = { kilometerPosition: 'up' // 公里标朝向 }; @@ -193,6 +212,8 @@ class SkinStyle extends defaultStyle { this[deviceType.Switch] = { text: { distance: 2, // 道岔名称与区段距离 + fontSize: 10, // 字体大小 + fontWeight: 'normal', // 字体粗细 borderColor: '#FE0000', // 道岔边框颜色 lossColor: '#FFFFFF', // 道岔失去颜色 locateColor: '#00FF00', // 道岔定位颜色 diff --git a/src/jmap/shape/Section/index.js b/src/jmap/shape/Section/index.js index ed76eb2df..5c98834fe 100644 --- a/src/jmap/shape/Section/index.js +++ b/src/jmap/shape/Section/index.js @@ -187,12 +187,12 @@ export default class Section extends Group { if (model.trainPosType === '01') { tempy -= (style.Section.line.width * 1.5); if (model.type === '01') { - tempy += traingle.getCos(style.Section.text.fontSize * 0.8 + style.nameDistance) - style.Section.text.fontSize * 2; + tempy += traingle.getCos(style.Section.text.fontSize * 0.8 + style.Section.text.distance) - style.Section.text.fontSize * 2; } } else { tempy += (style.Section.line.width * 1.5); if (model.type === '01') { - tempy -= traingle.getCos(style.Section.text.fontSize * 0.8 + style.nameDistance) - style.Section.text.fontSize * 2; + tempy -= traingle.getCos(style.Section.text.fontSize * 0.8 + style.Section.text.distance) - style.Section.text.fontSize * 2; } } } @@ -202,7 +202,7 @@ export default class Section extends Group { // 如果不是逻辑区段,让名称和区段保持点距离 const traingle = new JTriangle(model.points[0], model.points[model.points.length - 1]); if (model.type === '01') { - tempx += traingle.getSin(style.Section.text.fontSize * 0.8 + style.nameDistance); + tempx += traingle.getSin(style.Section.text.fontSize * 0.8 + style.Section.text.distance); } } @@ -234,8 +234,8 @@ export default class Section extends Group { // 计算文字和物理区段的距离 const traingle = new JTriangle(model.points[0], model.points[model.points.length - 1]); - tempx += traingle.getSin(style.nameDistance); - tempy += traingle.getCos(style.nameDistance); + tempx += traingle.getSin(style.Section.text.distance); + tempy += traingle.getCos(style.Section.text.distance); // 创建站台轨名称 this.standTrackText = new ETextName({ @@ -263,7 +263,7 @@ export default class Section extends Group { zlevel: this.zlevel, z: this.z + 2, x: x + model.reentryTrackNamePosition.x, - y: y + model.reentryTrackNamePosition.y + style.nameDistance + style.Section.text.fontSize, + y: y + model.reentryTrackNamePosition.y + style.Section.text.distance + style.Section.text.fontSize, fontWeight: 'bold', fontSize: style.Section.text.fontSize, fontFamily: style.textFontFormat, @@ -284,7 +284,7 @@ export default class Section extends Group { zlevel: this.zlevel, z: this.z + 2, x: x + model.transferTrackNamePosition.x, - y: y + model.transferTrackNamePosition.y + style.nameDistance + style.Section.text.fontSize * 2, + y: y + model.transferTrackNamePosition.y + style.Section.text.distance + style.Section.text.fontSize * 2, fontWeight: 'bold', fontSize: style.Section.text.fontSize, fontFamily: style.textFontFormat, @@ -310,7 +310,7 @@ export default class Section extends Group { fontSize: style.Section.text.fontSize, fontFamily: style.textFontFormat, text: model.destinationCode, - textFill: style.destinationTextFontColor, + textFill: style.Section.text.destinationTextColor, textAlign: style.Section.text.textAlign, textPosition: style.Section.text.textPosition, style: this.style @@ -728,7 +728,7 @@ export default class Section extends Group { rect = this.section.getBoundingRect(); if (this.model.type !== '02' && this.model.nameShow) { if (this.model.trainPosType == '01') { - distance = distance + this.style.nameDistance + this.style.Section.text.fontSize; + distance = distance + this.style.Section.text.distance + this.style.Section.text.fontSize; } } } diff --git a/src/jmap/shape/Signal/index.js b/src/jmap/shape/Signal/index.js index 28c3fd5f8..181671a5a 100644 --- a/src/jmap/shape/Signal/index.js +++ b/src/jmap/shape/Signal/index.js @@ -44,7 +44,7 @@ class Signal extends Group { drict: drict, type: model.lampPostType, x: model.position.x, - y: model.position.y + posit * (style.Signal.signalDistance + style.Section.line.width + style.Signal.lamp.radiusR) + y: model.position.y + posit * (style.Signal.distance + style.Section.line.width + style.Signal.lamp.radiusR) }); // 信号灯 @@ -68,7 +68,7 @@ class Signal extends Group { // 信号机名称 const sigNameX = model.position.x - drict * (style.Signal.post.standardWidth) + model.namePosition.x; - const sigNameY = model.position.y + posit * (style.Signal.signalDistance + style.Section.line.width + style.Signal.lamp.radiusR * 2 + model.namePosition.y + style.Signal.text.distance); + const sigNameY = model.position.y + posit * (style.Signal.distance + style.Section.line.width + style.Signal.lamp.radiusR * 2 + model.namePosition.y + style.Signal.text.distance); const textAlign = style.Signal.text.isAlignCenter ? 'middle': this.model.directionType == '01'? 'right': 'left'; const textVerticalAlign = posit == 1 ? 'top' : 'bottom'; this.sigName = new ESigName({ @@ -467,12 +467,12 @@ class Signal extends Group { } /** 延时解锁*/ - // model.delayType = '02'; - // switch (model.delayType) { - // case '01': this.setDelayUnlock(); break; // 未延时解锁 - // case '02': this.setDelayUnlock(); break; // 人工闭塞延时解锁 - // case '03': this.setDelayUnlock(); break; // 自动闭塞延时解锁 - // } + model.delayType = '02'; + switch (model.delayType) { + case '01': this.setDelayUnlock(); break; // 未延时解锁 + case '02': this.setDelayUnlock(); break; // 人工闭塞延时解锁 + case '03': this.setDelayUnlock(); break; // 自动闭塞延时解锁 + } /** 信号机进路办理,先停止动画,再判断当前颜色是否闪烁*/ if (model.routeSetting && (model.autoType == '03' || model.autoType == '04')) { diff --git a/src/jmap/shape/StationControl/EMouse.js b/src/jmap/shape/StationControl/EMouse.js index cf95a0bf4..67017126b 100644 --- a/src/jmap/shape/StationControl/EMouse.js +++ b/src/jmap/shape/StationControl/EMouse.js @@ -16,7 +16,7 @@ export default class EMouse extends Group { position: [0, 0], style: { x: this.device.model.position.x - this.device.style.StationControl.lamp.distance / 2 + this.device.style.StationControl.lamp.offset.x, - y: this.device.model.position.y + this.device.style.StationControl.lamp.offset.y + this.device.style.StationControl.lamp.radiusR + this.device.style.nameDistance-40, + y: this.device.model.position.y + this.device.style.StationControl.lamp.offset.y + this.device.style.StationControl.lamp.radiusR + this.device.style.StationControl.text.distance-40, fontWeight: this.device.style.StationControl.mouseOverStyle.fontWeight, fontSize: this.device.style.StationControl.mouseOverStyle.fontSize, fontFamily: this.device.style.StationControl.mouseOverStyle.fontFormat, diff --git a/src/jmap/shape/StationControl/ESingleControl.js b/src/jmap/shape/StationControl/ESingleControl.js index 20f840d8b..d750049fa 100644 --- a/src/jmap/shape/StationControl/ESingleControl.js +++ b/src/jmap/shape/StationControl/ESingleControl.js @@ -50,7 +50,7 @@ export default class ESingleControl extends Group { position: [0, 0], style: { x: model.point.x, - y: model.point.y + model.style.StationControl.lamp.radiusR + model.style.nameDistance, + y: model.point.y + model.style.StationControl.lamp.radiusR + model.style.StationControl.text.distance, fontWeight: model.style.StationControl.text.fontWeight, fontSize: model.style.StationControl.text.fontSize, fontFamily: model.style.StationControl.text.fontFormat, diff --git a/src/jmap/shape/StationCounter/index.js b/src/jmap/shape/StationCounter/index.js index f737c46c4..2f4949562 100644 --- a/src/jmap/shape/StationCounter/index.js +++ b/src/jmap/shape/StationCounter/index.js @@ -32,7 +32,7 @@ export default class StationCounter extends Group { fontSize: style.textFontSize, fontFamily: style.textFontFormat, text: model.val, - textFill: style.stationCounterTextColor, + textFill: style.StationCounter.text.fontColor, textAlign: 'middle', textStrokeWidth: 1 } @@ -54,7 +54,7 @@ export default class StationCounter extends Group { [this.rect.x - this.lPadding, this.rect.y - this.vPadding]] }, style: { - stroke: style.stationCounterBorderColor + stroke: style.StationCounter.text.borderColor } }); @@ -64,12 +64,12 @@ export default class StationCounter extends Group { position: [0, 0], style: { x: model.position.x, - y: model.position.y + this.rect.width + this.vPadding + style.textFontSize + style.nameDistance, + y: model.position.y + this.rect.width + this.vPadding + style.textFontSize + style.StationCounter.text.distance, fontWeight: 'bold', fontSize: style.textFontSize, fontFamily: style.textFontFormat, text: model.name, - textFill: style.stationCounterTextColor, + textFill: style.StationCounter.text.fontColor, textAlign: 'middle', textVerticalAlign: 'top', textStrokeWidth: 1 diff --git a/src/jmap/shape/StationDelayUnlock/index.js b/src/jmap/shape/StationDelayUnlock/index.js index 7dd0e7006..61e6d6e7b 100644 --- a/src/jmap/shape/StationDelayUnlock/index.js +++ b/src/jmap/shape/StationDelayUnlock/index.js @@ -32,7 +32,7 @@ export default class StationDelayUnlock extends Group { fontSize: model.textFont, fontFamily: style.textFontFormat, text: model.deviceName + ' ', - textFill: style.stationDelayUnlockTextColor, + textFill: style.StationDelayUnlock.text.fontColor, textStrokeWidth: 1, textAlign: 'left' } @@ -45,12 +45,12 @@ export default class StationDelayUnlock extends Group { position: [0, 0], style: { x: model.position.x, - y: model.position.y + fontSize + style.stationDelayUnlockDistance, + y: model.position.y + fontSize + style.StationDelayUnlock.text.distance, fontWeight: 'normal', fontSize: model.textFont, fontFamily: style.textFontFormat, text: model.remainTime || '', - textFill: style.stationDelayUnlockTextColor, + textFill: style.StationDelayUnlock.text.fontColor, textStrokeWidth: 1, textAlign: 'left' } @@ -74,7 +74,7 @@ export default class StationDelayUnlock extends Group { height: this.rect.height + this.vPadding * 2 }, style: { - stroke: style.stationDelayUnlockBorderColor, + stroke: style.StationDelayUnlock.text.borderColor, fill: style.backgroundColor } }); diff --git a/src/jmap/shape/Switch/ESwName.js b/src/jmap/shape/Switch/ESwName.js index 96efdcfca..8bf190792 100644 --- a/src/jmap/shape/Switch/ESwName.js +++ b/src/jmap/shape/Switch/ESwName.js @@ -19,8 +19,8 @@ class ESwName extends Group { style: { x: model.nameTextX, y: model.nameTextY, - fontWeight: 'normal', - fontSize: style.textFontSize, + fontWeight: style.Switch.text.fontWeight, + fontSize: style.Switch.text.fontSize, fontFamily: style.textFontFormat, text: model.name, // textAlign: model.triangle.drictx === 1 ? 'left' : 'right', @@ -61,8 +61,8 @@ class ESwName extends Group { style: { x: model.arrowTextX, y: model.arrowTextY, - fontWeight: 'normal', - fontSize: 10, + fontSize: style.arrowFontSize, + fontWeight: style.Switch.text.fontWeight, fontFamily: style.textFontFormat, text: `道岔区段名称: ${model.sectionName}`, textFill: '#000', diff --git a/src/jmap/shape/Train/TrainBody/index.js b/src/jmap/shape/Train/TrainBody/index.js index 3b18016f9..28ddd10a4 100644 --- a/src/jmap/shape/Train/TrainBody/index.js +++ b/src/jmap/shape/Train/TrainBody/index.js @@ -39,7 +39,7 @@ export default class TrainBody extends Group { text: textContain, textFill: '#000', textAlign: 'left', - textFont: 10 + 'px consolas', + textFont: style.arrowFontSize + 'px consolas', textPadding: 3, textBackgroundColor: style.tipBackgroundColor }) : ''; From 1e6a5510acf6b198e1c7963d7281040905166441 Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Fri, 2 Aug 2019 18:09:25 +0800 Subject: [PATCH 12/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmap/config/deviceStyle.js | 4 ++-- src/jmap/config/skinStyle/bejing_01.js | 12 +++++----- src/jmap/config/skinStyle/chengdu_03.js | 31 +++++++++++++------------ src/jmap/config/skinStyle/fuzhou_01.js | 12 +++++----- 4 files changed, 30 insertions(+), 29 deletions(-) diff --git a/src/jmap/config/deviceStyle.js b/src/jmap/config/deviceStyle.js index adef27cac..b5babe4f6 100644 --- a/src/jmap/config/deviceStyle.js +++ b/src/jmap/config/deviceStyle.js @@ -1,8 +1,8 @@ const mapDeviceStyle = { // '01': 'chengdu_04', '02': 'fuzhou_01', - '03': 'bejing_01', - // '03': 'chengdu_03', + // '03': 'bejing_01', + '03': 'chengdu_03', '05': 'batong_01' // 暂时没有画北京八通线 }; diff --git a/src/jmap/config/skinStyle/bejing_01.js b/src/jmap/config/skinStyle/bejing_01.js index d7ce3aab7..d65068802 100644 --- a/src/jmap/config/skinStyle/bejing_01.js +++ b/src/jmap/config/skinStyle/bejing_01.js @@ -216,17 +216,17 @@ class SkinStyle extends defaultStyle { this[deviceType.StationCounter] = { text: { - distance: 2, // 计数器名称和文字的距离 - fontColor: '#FFFFFF', // 计数器字体颜色 - borderColor: '#E4EF50' // 计数器边框颜色 + distance: 2, // 计数器名称和文字的距离 + fontColor: '#FFFFFF', // 计数器字体颜色 + borderColor: '#E4EF50' // 计数器边框颜色 } }; this[deviceType.StationDelayUnlock] = { text: { - distance: 3, // 延迟解锁和设备之间的距离 - fontColor: '#FFFFFF', // 延时解锁字体颜色 - borderColor: '#FFFFFF' // 延迟解锁边框颜色 + distance: 3, // 延迟解锁和设备之间的距离 + fontColor: '#FFFFFF', // 延时解锁字体颜色 + borderColor: '#FFFFFF' // 延迟解锁边框颜色 } }; diff --git a/src/jmap/config/skinStyle/chengdu_03.js b/src/jmap/config/skinStyle/chengdu_03.js index 12d6cb57c..f81c4689a 100644 --- a/src/jmap/config/skinStyle/chengdu_03.js +++ b/src/jmap/config/skinStyle/chengdu_03.js @@ -10,6 +10,7 @@ class SkinStyle extends defaultStyle { linkColor: '#3F3F3F', // link 线条颜色 linkTextColor: '#FFFFFF' // link 字体颜色 }; + this[deviceType.Section] = { text: { // 区段文字属性 distance: 2, // 文字离区段距离 @@ -63,7 +64,7 @@ class SkinStyle extends defaultStyle { }; this[deviceType.Signal] = { - distance: 10, // 设备距离区段的距离 + distance: 10, // 设备距离区段的距离 post: { standardColor: '#FFFFFF', // 灯柱颜色 standardWidth: 2 // 灯柱宽度 @@ -121,7 +122,7 @@ class SkinStyle extends defaultStyle { this[deviceType.StationStand] = { common: { // 通用属性 textFontSize: 10, // 站台默认字体大小 - haveJumpShow: true // 站台是否有列车停跳显示 + haveJumpShow: true // 站台是否有列车停跳显示 }, safetyDoor: { // 屏蔽门 height: 3, // 站台屏蔽门高度 @@ -134,7 +135,7 @@ class SkinStyle extends defaultStyle { spareColor: '#808080', // 站台空闲颜色 stopColor: '#FFF000', // 站台列车停站颜色 jumpStopColor: '#808080', // 站台跳停颜色 - designatedJumpStopColor: '#808080' // 站台指定列车跳停颜色 + designatedJumpStopColor: '#808080' // 站台指定列车跳停颜色 }, standEmergent: { // 紧急关闭 mergentR: 4, // 站台紧急关闭半径 @@ -162,13 +163,13 @@ class SkinStyle extends defaultStyle { textColor: '#C0C0C0' // 停站时间字体颜色 }, jump: { - text: '跳', // 停跳显示内容 - direction: -1, // 停跳方向 + text: '跳', // 停跳显示内容 + direction: -1, // 停跳方向 offset: {x: -8, y: 0}, - textColor: '#0000FF', // 停跳文字颜色 - arcColor: '#0000FF', // 停跳圆圈颜色 - fillColor: 'rgba(0,0,0,0)', // 透明填充颜色 - r: 8 // 圆半径大小 + textColor: '#0000FF', // 停跳文字颜色 + arcColor: '#0000FF', // 停跳圆圈颜色 + fillColor: 'rgba(0,0,0,0)', // 透明填充颜色 + r: 8 // 圆半径大小 }, level: { // 运行等级 direction: 1, // 运行等级方向 @@ -204,17 +205,17 @@ class SkinStyle extends defaultStyle { this[deviceType.StationCounter] = { text: { - distance: 2, // 计数器名称和文字的距离 - fontColor: '#FFFFFF', // 计数器字体颜色 - borderColor: '#E4EF50' // 计数器边框颜色 + distance: 2, // 计数器名称和文字的距离 + fontColor: '#FFFFFF', // 计数器字体颜色 + borderColor: '#E4EF50' // 计数器边框颜色 } }; this[deviceType.StationDelayUnlock] = { text: { - distance: 3, // 延迟解锁和设备之间的距离 - fontColor: '#FFFFFF', // 延时解锁字体颜色 - borderColor: '#FFFFFF' // 延迟解锁边框颜色 + distance: 3, // 延迟解锁和设备之间的距离 + fontColor: '#FFFFFF', // 延时解锁字体颜色 + borderColor: '#FFFFFF' // 延迟解锁边框颜色 } }; diff --git a/src/jmap/config/skinStyle/fuzhou_01.js b/src/jmap/config/skinStyle/fuzhou_01.js index 81f12dc55..eb3141c78 100644 --- a/src/jmap/config/skinStyle/fuzhou_01.js +++ b/src/jmap/config/skinStyle/fuzhou_01.js @@ -191,17 +191,17 @@ class SkinStyle extends defaultStyle { this[deviceType.StationCounter] = { text: { - distance: 2, // 计数器名称和文字的距离 - fontColor: '#FFFFFF', // 计数器字体颜色 - borderColor: '#E4EF50' // 计数器边框颜色 + distance: 2, // 计数器名称和文字的距离 + fontColor: '#FFFFFF', // 计数器字体颜色 + borderColor: '#E4EF50' // 计数器边框颜色 } }; this[deviceType.StationDelayUnlock] = { text: { - distance: 3, // 延迟解锁和设备之间的距离 - fontColor: '#FFFFFF', // 延时解锁字体颜色 - borderColor: '#FFFFFF' // 延迟解锁边框颜色 + distance: 3, // 延迟解锁和设备之间的距离 + fontColor: '#FFFFFF', // 延时解锁字体颜色 + borderColor: '#FFFFFF' // 延迟解锁边框颜色 } }; From ee16c35aaa5db607f39cc45d37041a8ae4fcf18d Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 5 Aug 2019 08:42:45 +0800 Subject: [PATCH 13/16] =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9AstandControl?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmap/shape/StationControl/ESingleControl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jmap/shape/StationControl/ESingleControl.js b/src/jmap/shape/StationControl/ESingleControl.js index d750049fa..0fc00029e 100644 --- a/src/jmap/shape/StationControl/ESingleControl.js +++ b/src/jmap/shape/StationControl/ESingleControl.js @@ -37,8 +37,8 @@ export default class ESingleControl extends Group { }, style: { lineWidth: 0.5, - fill: model.style.StationControl.grayColor, - stroke: model.style.StationControl.grayColor + fill: model.style.StationControl.lamp.grayColor, + stroke: model.style.StationControl.lamp.grayColor } }); From 9f06837e48c2bb0b9a70ede80a20537cd156110f Mon Sep 17 00:00:00 2001 From: joylink_admin Date: Mon, 5 Aug 2019 01:35:41 +0000 Subject: [PATCH 14/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9jenkins=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile-test b/Jenkinsfile-test index ad09944fc..72aa8de00 100644 --- a/Jenkinsfile-test +++ b/Jenkinsfile-test @@ -17,7 +17,7 @@ pipeline { } stage('Publish') { steps { - sh 'cp -rf ./dist/* /usr/local/joylink/jlclient' + sh 'cp -rf ./dist/* /usr/local/joylink/jl-nclient' } } } From 711534599f1f0de9ee7816b61e98835b13198910 Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Mon, 5 Aug 2019 09:58:33 +0800 Subject: [PATCH 15/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmap/shape/Signal/ESigAuto.js | 18 +++++++++--------- src/jmap/shape/Signal/index.js | 13 +++++++------ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/jmap/shape/Signal/ESigAuto.js b/src/jmap/shape/Signal/ESigAuto.js index e7d31d827..70044bf00 100644 --- a/src/jmap/shape/Signal/ESigAuto.js +++ b/src/jmap/shape/Signal/ESigAuto.js @@ -1,6 +1,6 @@ import Polygon from 'zrender/src/graphic/shape/Polygon'; import Group from 'zrender/src/container/Group'; -import { arrows } from '../utils/ShapePoints'; +import { arrow } from '../utils/ShapePoints'; class ESigPass extends Group { constructor(model) { @@ -14,10 +14,10 @@ class ESigPass extends Group { const model = this.model; const style = this.model.style; const rotation = model.drict != 1? 0 : Math.PI; - const point = arrows(model.x, model.y, style.Signal.signalAutoWidth, style.Signal.lamp.radiusR * 0.8); + const point = arrow(model.x, model.y, style.Signal.signalAutoWidth, style.Signal.lamp.radiusR * 0.8); this.isNew = true; - this.arrows = new Polygon({ + this.arrow = new Polygon({ zlevel: model.zlevel, z: model.z, rotation: rotation, @@ -30,20 +30,20 @@ class ESigPass extends Group { fill: model.fill } }); - this.add(this.arrows); + this.add(this.arrow); } } // 停止动画 animationRecover() { this.create(); - this.arrows.stopAnimation(false); + this.arrow.stopAnimation(false); } // 箭头颜色 setColor(color) { this.create(); - this.arrows.setStyle('fill', color); + this.arrow.setStyle('fill', color); } // 箭头闪烁 @@ -51,9 +51,9 @@ class ESigPass extends Group { this.create(); const style = this.model.style; - const fill = this.arrows.style.Signal.fill; + const fill = this.arrow.style.fill; - this.arrows.animate(true) + this.arrow.animate(true) .when(1000, { fill: style.backgroundColor, stroke: style.style.backgroundColor }) .when(2000, { fill: fill, stroke: style.style.Signal.sidelineColor }) .when(3000, { fill: style.style.backgroundColor, stroke: style.style.backgroundColor }) @@ -64,7 +64,7 @@ class ESigPass extends Group { // 隐藏 hide() { this.create(); - this.arrows.hide(); + this.arrow.hide(); } // 显示 diff --git a/src/jmap/shape/Signal/index.js b/src/jmap/shape/Signal/index.js index 181671a5a..51a738823 100644 --- a/src/jmap/shape/Signal/index.js +++ b/src/jmap/shape/Signal/index.js @@ -459,6 +459,7 @@ class Signal extends Group { } /** 设置自动类型*/ + model.autoType = '04'; switch (model.autoType) { case '01': this.setAutoClose(); break; // 隐藏 隐藏自动信号和自动进路 case '02': this.setAutoSignalOpen(); break; // 显示 设置自动信号模式状态类型 @@ -467,12 +468,12 @@ class Signal extends Group { } /** 延时解锁*/ - model.delayType = '02'; - switch (model.delayType) { - case '01': this.setDelayUnlock(); break; // 未延时解锁 - case '02': this.setDelayUnlock(); break; // 人工闭塞延时解锁 - case '03': this.setDelayUnlock(); break; // 自动闭塞延时解锁 - } + // model.delayType = '02'; + // switch (model.delayType) { + // case '01': this.setDelayUnlock(); break; // 未延时解锁 + // case '02': this.setDelayUnlock(); break; // 人工闭塞延时解锁 + // case '03': this.setDelayUnlock(); break; // 自动闭塞延时解锁 + // } /** 信号机进路办理,先停止动画,再判断当前颜色是否闪烁*/ if (model.routeSetting && (model.autoType == '03' || model.autoType == '04')) { From 5e8f1899ff3927d9d05f4d1af8b2d3b77f5d01a3 Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Mon, 5 Aug 2019 09:59:08 +0800 Subject: [PATCH 16/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmap/config/skinStyle/chengdu_03.js | 22 +++++++++++----------- src/jmap/shape/StationControl/EArrow.js | 12 ++++++------ src/jmap/shape/StationControl/index.js | 4 ++-- src/jmap/shape/utils/ShapePoints.js | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/jmap/config/skinStyle/chengdu_03.js b/src/jmap/config/skinStyle/chengdu_03.js index f81c4689a..703d4a5f6 100644 --- a/src/jmap/config/skinStyle/chengdu_03.js +++ b/src/jmap/config/skinStyle/chengdu_03.js @@ -13,7 +13,7 @@ class SkinStyle extends defaultStyle { this[deviceType.Section] = { text: { // 区段文字属性 - distance: 2, // 文字离区段距离 + distance: 1, // 文字离区段距离 fontSize: 12, // 字体大小 fontFormat: 'consolas', // 字体族类 fontColor: '#FFFFFF', // 字体颜色 @@ -92,8 +92,8 @@ class SkinStyle extends defaultStyle { blueColor: '#0070C0' // 信号灯蓝色 }, route: { - direction: false, // 自动进路方向 - offset: { x: -4, y: 0 }, // 自动进路偏移量 + direction: true, // 自动通过方向 + offset: { x: 4, y: 0}, // 自动通过偏移量 routeColor: '#00FF00' // 自动进路 }, auto: { @@ -105,9 +105,9 @@ class SkinStyle extends defaultStyle { outConflict: '#C00808' // 出车冲突 }, delay: { - direction: true, // 延时解锁方向 - offset: { x: 15, y: -10}, // 延时解锁偏移量 - fontSize: 10, // 延迟解锁字体大小 + direction: false, // 延时解锁方向 + offset: { x: -5, y: 0}, // 延时解锁偏移量 + fontSize: 12, // 延迟解锁字体大小 fontColor: '#C00808' // 延迟解锁颜色 }, @@ -181,7 +181,7 @@ class SkinStyle extends defaultStyle { this[deviceType.StationControl] = { text: { distance: 2, // 灯和文字之间的距离 - fontSize: 10, // 字体大小 + fontSize: 12, // 字体大小 fontFormat: 'consolas', // 字体格式 fontColor: '#ffffff', // 字体颜色 fontWeight: 'normal', // 字体粗细 @@ -191,7 +191,7 @@ class SkinStyle extends defaultStyle { lamp: { count: 4, // 控制模式的个数 offset: {x: 0, y: 0}, // 偏移量 - radiusR: 4, // 控制模式灯的半径 + radiusR: 6, // 控制模式灯的半径 distance: 36, // 控制模式之间灯之间的距离 grayColor: '#7F7F7F', // 控制模式灰色 greenColor: '#00FF00', // 控制模式绿色 @@ -241,7 +241,7 @@ class SkinStyle extends defaultStyle { this[deviceType.LcControl] = { text: { - fontSize: 10, // 字体大小 + fontSize: 12, // 字体大小 distance: 5 // 灯跟文字距离 }, lamp: { @@ -252,7 +252,7 @@ class SkinStyle extends defaultStyle { this[deviceType.ZcControl] = { text: { - fontSize: 10, // 字体大小 + fontSize: 12, // 字体大小 distance: 5 // 灯跟文字距离 }, lamp: { @@ -263,7 +263,7 @@ class SkinStyle extends defaultStyle { this[deviceType.LimitControl] = { text: { - fontSize: 10, // 字体大小 + fontSize: 12, // 字体大小 distance: 5 // 灯跟文字距离 }, lamp: { diff --git a/src/jmap/shape/StationControl/EArrow.js b/src/jmap/shape/StationControl/EArrow.js index 18ad74628..1a86b4888 100644 --- a/src/jmap/shape/StationControl/EArrow.js +++ b/src/jmap/shape/StationControl/EArrow.js @@ -11,7 +11,7 @@ class ESigAuto extends Group { create() { const model = this.model; - this.arrows = new Polygon({ + this.arrow = new Polygon({ zlevel: model.zlevel, z: model.z, shape: { @@ -23,24 +23,24 @@ class ESigAuto extends Group { fill: model.fill } }); - this.add(this.arrows); + this.add(this.arrow); } // 停止动画 animationRecover() { - this.arrows.stopAnimation(false); + this.arrow.stopAnimation(false); } // 箭头颜色 setColor(color) { - this.arrows.setStyle('fill', color); + this.arrow.setStyle('fill', color); } // 箭头闪烁 arrowsAnimation() { const style = this.model.style; - const fill = this.arrows.style.Signal.fill; - this.arrows.animate(true) + const fill = this.arrow.style.Signal.fill; + this.arrow.animate(true) .when(1000, { fill: style.backgroundColor, stroke: style.style.backgroundColor }) .when(2000, { fill: fill, stroke: style.style.Signal.sidelineColor }) .when(3000, { fill: style.style.backgroundColor, stroke: style.style.backgroundColor }) diff --git a/src/jmap/shape/StationControl/index.js b/src/jmap/shape/StationControl/index.js index f0f37d187..dee41cabb 100644 --- a/src/jmap/shape/StationControl/index.js +++ b/src/jmap/shape/StationControl/index.js @@ -4,7 +4,7 @@ import Group from 'zrender/src/container/Group'; import ESingleControl from './ESingleControl'; // 单个信号灯 (私有) import EArrow from './EArrow'; -import { arrows } from '../utils/ShapePoints'; +import { arrow } from '../utils/ShapePoints'; import EMouse from './EMouse'; /** 控制模式*/ @@ -77,7 +77,7 @@ export default class StationControl extends Group { }); // 箭头 if (this.style.StationControl.arrow.show) { - const point = arrows(this.model.position.x, this.model.position.y + this.style.StationControl.lamp.radiusR / 2, this.style.StationControl.lamp.distance / 6, this.style.StationControl.lamp.radiusR * 0.8); + const point = arrow(this.model.position.x, this.model.position.y + this.style.StationControl.lamp.radiusR / 2, this.style.StationControl.lamp.distance / 6, this.style.StationControl.lamp.radiusR * 0.8); this.arrowsControl = new EArrow({ zlevel: this.zlevel, z: this.z, diff --git a/src/jmap/shape/utils/ShapePoints.js b/src/jmap/shape/utils/ShapePoints.js index 2d3c32c64..ffba459d6 100644 --- a/src/jmap/shape/utils/ShapePoints.js +++ b/src/jmap/shape/utils/ShapePoints.js @@ -1,7 +1,7 @@ import Path from 'zrender/src/graphic/Path'; /** 指向箭头坐标*/ -export function arrows(modelX, modelY, length, radius) { +export function arrow(modelX, modelY, length, radius) { return [ [modelX - length, modelY], [modelX - length + radius / 1.5, modelY - radius / 1.2],