From c34ecffd046a52db7e83b0c08d0185ff974bccf1 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 17 Aug 2022 11:29:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E9=93=81=E7=BA=BF=E8=B7=AF=20?= =?UTF-8?q?=E5=8C=BA=E6=AE=B5=E6=B7=BB=E5=8A=A0=E5=81=9C=E8=BD=A6=E7=82=B9?= =?UTF-8?q?=E5=81=8F=E7=A7=BB=E5=9D=90=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en/map.js | 1 + src/i18n/langs/zh/map.js | 1 + src/jmapNew/shape/graph/Section/index.js | 27 ++++++++++++++----- src/jmapNew/shape/graph/StationStand/index.js | 8 ------ src/jmapNew/theme/datie_02/menus/index.vue | 13 ++++----- src/scripts/translate.js | 1 + .../newMap/newMapdraft/mapoperate/models.js | 1 + .../newMapdraft/mapoperate/section/index.vue | 4 +++ 8 files changed, 35 insertions(+), 21 deletions(-) diff --git a/src/i18n/langs/en/map.js b/src/i18n/langs/en/map.js index e06cea63c..2b11be327 100644 --- a/src/i18n/langs/en/map.js +++ b/src/i18n/langs/en/map.js @@ -271,6 +271,7 @@ export default { isStandTrack: 'Platform rail:', standTrackName: 'Platform track name:', standTrackNamePosition: 'Platform track name offset:', + stopCDPosition:'stopCD offset', relStandCode: 'The platform code:', isReentryTrack: 'Whether to return to orbit:', reentryTrackName: 'Name of reentrant rail:', diff --git a/src/i18n/langs/zh/map.js b/src/i18n/langs/zh/map.js index 489bee208..3024fb1a3 100644 --- a/src/i18n/langs/zh/map.js +++ b/src/i18n/langs/zh/map.js @@ -255,6 +255,7 @@ export default { isStandTrack: '是否站台轨:', standTrackName: '站台轨名称:', standTrackNamePosition: '站台轨名称偏移量:', + stopCDPosition:'停车倒计时偏移量', relStandCode: '站台编码:', isReentryTrack: '是否折返轨:', reentryTrackName: '折返轨名称:', diff --git a/src/jmapNew/shape/graph/Section/index.js b/src/jmapNew/shape/graph/Section/index.js index 8b2137fff..a96acd7ca 100644 --- a/src/jmapNew/shape/graph/Section/index.js +++ b/src/jmapNew/shape/graph/Section/index.js @@ -135,7 +135,8 @@ export default class Section extends Group { this.add(this[element]); }); - if (this.style.Section.remainTime && (this.model.standTrack || this.model.reentryTrack || this.model.transferTrack)) { + if (this.style.Section.remainTime && this.model.standTrack) { + const stopCDPosition = this.model.stopCDPosition || {x:0, y:0}; const computedPoints = this.computedPoints; const drict = model.trainPosType != '01' ? 1 : -1; const x = Math.min(computedPoints[0].x, computedPoints[computedPoints.length - 1].x) + Math.abs(computedPoints[computedPoints.length - 1].x - computedPoints[0].x) / 2; @@ -146,8 +147,8 @@ export default class Section extends Group { z: this.z, silent: model.silent || false, style: { - x: x, - y: y - 23 * drict, + x: x + stopCDPosition.x, + y: y - 23 * drict + stopCDPosition.y, fontWeight: 'normal', fontSize: 13, fontFamily:style.fontFamily, @@ -163,8 +164,8 @@ export default class Section extends Group { zlevel: this.zlevel, z: this.z, shape: { - cx: x - 18, - cy: y - 23 * drict, + cx: x - 18 + stopCDPosition.x, + cy: y - 23 * drict + stopCDPosition.y, r: 6 }, style: { @@ -175,8 +176,11 @@ export default class Section extends Group { }); this.add(this.remainTimeText); this.add(this.remainTimeCircle); - this.remainTimeText.hide(); - this.remainTimeCircle.hide(); + const path = window.location.href; + if (!path.includes('/map/draw')) { // 公里标是否显示 + this.remainTimeText.hide(); + this.remainTimeCircle.hide(); + } } } @@ -592,6 +596,15 @@ export default class Section extends Group { // 分路不良 // model.shuntingTypeList.length > 0 && model.badShunt && this.badShuntStatus(); + // 停车倒计时 + if (this.remainTimeText) { + if (model.stopCountDown) { + this.showRemainTime(model.stopCountDown); + } else { + this.hideRemainTime(); + } + } + } } diff --git a/src/jmapNew/shape/graph/StationStand/index.js b/src/jmapNew/shape/graph/StationStand/index.js index 8ba770b7a..12c635464 100644 --- a/src/jmapNew/shape/graph/StationStand/index.js +++ b/src/jmapNew/shape/graph/StationStand/index.js @@ -189,14 +189,6 @@ class StationStand extends Group { this.upDetainLamp && this.upDetainLamp.show(); this.downDetainLamp && this.downDetainLamp.show(); } - if (this.style.Section.remainTime) { - const section = this.mapDevice[model.standTrackCode]; - if (model.trainParking && model.remainTime) { - section.instance && section.instance.showRemainTime(model.remainTime); - } else { - section.instance && section.instance.hideRemainTime(); - } - } } } diff --git a/src/jmapNew/theme/datie_02/menus/index.vue b/src/jmapNew/theme/datie_02/menus/index.vue index 735557018..a3f33f84c 100644 --- a/src/jmapNew/theme/datie_02/menus/index.vue +++ b/src/jmapNew/theme/datie_02/menus/index.vue @@ -1054,19 +1054,20 @@ export default { .simulationTellInfo{ position: absolute; width: 328px; - height: 100px; top: 50px; - right:10px; - padding: 0px 0px 5px 0px; - overflow:auto; + right: 10px; + padding: 0px 0px 0px 0px; + overflow: auto; background: #c3c3c3; z-index: 2; + display: inline-block; + font-size: 0; } .simulationDeviceInfo{ position: absolute; width: 328px; - height: 100px; - top: 152px; + height: 100px; + top: 83px; right:10px; padding: 5px; overflow:auto; diff --git a/src/scripts/translate.js b/src/scripts/translate.js index f9f46434c..6ec0f3539 100644 --- a/src/scripts/translate.js +++ b/src/scripts/translate.js @@ -264,6 +264,7 @@ export const translate = { { key: 'destinationCodePoint', tHeader: '目的地码坐标', formatter: (val) => { return val ? JSON.parse(val) : ''; } }, { key: 'standTrackName', tHeader: '站台轨名称', formatter: (val) => { return val || ''; } }, { key: 'standTrackNamePosition', tHeader: '站台轨名称坐标', formatter: (val) => { return val ? JSON.parse(val) : ''; } }, + { key: 'stopCDPosition', tHeader: '停车倒计时偏移量', formatter: (val) => { return val ? JSON.parse(val) : ''; } }, { key: 'transferTrackName', tHeader: '转换轨名称', formatter: (val) => { return val || ''; } }, { key: 'transferTrackNamePosition', tHeader: '转换轨名称坐标', formatter: (val) => { return val ? JSON.parse(val) : ''; } }, { key: 'isCurve', tHeader: '是否曲线', formatter: (val) => { return val || false; } } diff --git a/src/views/newMap/newMapdraft/mapoperate/models.js b/src/views/newMap/newMapdraft/mapoperate/models.js index 746a88fc8..48f960026 100644 --- a/src/views/newMap/newMapdraft/mapoperate/models.js +++ b/src/views/newMap/newMapdraft/mapoperate/models.js @@ -23,6 +23,7 @@ class Model { this.standTrack = false; // 是否站台轨 this.standTrackName = ''; this.standTrackNamePosition = { x: 0, y: 0 }; + this.stopCDPosition = {x: 0, y: 0}; // 停车倒计时偏移量 this.reentryTrack = false; // 是否折返轨 this.reentryTrackName = ''; this.reentryTrackNamePosition = { x: 0, y: 0 }; diff --git a/src/views/newMap/newMapdraft/mapoperate/section/index.vue b/src/views/newMap/newMapdraft/mapoperate/section/index.vue index 59ae93370..9a62f4b22 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/index.vue @@ -167,6 +167,10 @@ export default { { prop: 'standTrackNamePosition.x', firstLevel: 'standTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' }, { prop: 'standTrackNamePosition.y', firstLevel: 'standTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' } ] }, + { prop: 'stopCDPosition', label: this.$t('map.stopCDPosition'), type: 'coordinate', width: '150px', isHidden: !this.isstandTrackNameShow, children: [ + { prop: 'stopCDPosition.x', firstLevel: 'stopCDPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' }, + { prop: 'stopCDPosition.y', firstLevel: 'stopCDPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' } + ] }, { prop: 'reentryTrack', label: this.$t('map.isReentryTrack'), type: 'checkbox', isHidden: !this.isReentryTrackShow }, // 是否折返轨 { prop: 'firstTurnBack', label: '是否优先折返:', type: 'checkbox', isHidden: !this.isreentryTrackName }, { prop: 'reentryTrackName', label: this.$t('map.reentryTrackName'), type: 'input', isHidden: !this.isreentryTrackName }, // 折返轨名称