diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index 8b0c646bf..03e6c8f8d 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -135,6 +135,9 @@ class SkinCode extends defaultStyle { }, block: { special: false, // 区段特殊显示 + }, + trainPosition:{ + display: false // 列车实时位置显示 } }; @@ -207,6 +210,32 @@ class SkinCode extends defaultStyle { } }; + this[deviceType.MapCycleButtonVO] = { + // 是否显示 + visible: true, + text: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 5 // 灯跟文字距离 + }, + subtitleText: { + fontSize: 11, // 字体大小 + fontWeight: 'normal', // 字体粗细 + distance: 17 // 等于副标题距离 + }, + lamp: { + lineDash: null, // 灯的包围框 + borderShow: false, // 是否显示边框 + stroke: '#FFFFFF', // 框的颜色 + fill: 'rgba(0,0,0,0)', // 填充色 + radiusR: 6, // 控制灯大小 + controlColor: '#b5b3b3' // 控制灯颜色 (灰色) + }, + OutFrame: { + + } + }; + this[deviceType.StationStand] = { common: { // 通用属性 textFontSize: 8, // 站台默认字体大小 @@ -603,24 +632,11 @@ class SkinCode extends defaultStyle { trainRColor: '#A0522D' } ], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM - runControlStatus: [ - { status: '01', hShow: false, sShow: false }, - { status: '02', hShow: true, sShow: false }, - { status: '03', hShow: false, sShow: true } - ], // 设置运行控制状态类型 01正常 02扣车 03停跳 - doorStatus: [ - {status: true, dShow: false}, - {status: false, dShow: true} - ], // 设置车门状态类型 true车门关闭且锁闭 communicationStatus: [ {status: 'CBTC', trainColor: '#725A64'}, {status: 'ITC', trainColor: '#C0C0C0'}, {status: 'IL', trainColor: '#C0C0C0'} ], // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL - alarmStatus: [ - { status: '01', aShow: false }, - { status: '02', aShow: true } - ], // 设置报警状态 01不报警 02报警 serverNoType: [ { type: '01', showColor: '#FFFFFF' }, { type: '02', showColor: '#FFF000' } diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js index 4a7f7c0c2..3fc506cf9 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -135,6 +135,9 @@ class SkinCode extends defaultStyle { }, block: { special: false, // 区段特殊显示 + }, + trainPosition:{ + display: true // 列车实时位置显示 } }; @@ -205,7 +208,7 @@ class SkinCode extends defaultStyle { this[deviceType.StationStand] = { common: { // 通用属性 textFontSize: 10, // 站台默认字体大小 - haveJumpShow: true, // 站台是否有列车停跳显示 + haveJumpShow: false, // 站台是否有列车停跳显示 functionButtonShow: [] // 功能灯按钮显示条件(prdType) }, safetyDoor: { // 屏蔽门 @@ -233,9 +236,9 @@ class SkinCode extends defaultStyle { autoChangeEndsColor: '#0BF400' // 站台自动换端 }, detainCar: { // 扣车 - text: '扣', // 扣车显示内容 + text: 'H', // 扣车显示内容 position: -1, // 扣车方向 - offset: {x: -8, y: -20}, // 扣车偏移量 + offset: {x: -8, y: 13}, // 扣车偏移量 trainColor: 'yellow', // 车站扣车颜色 centerTrainColor: 'white', // 中心扣车颜色 andCenterTrainColor: 'red', // 车站+中心扣车颜色 @@ -570,36 +573,11 @@ class SkinCode extends defaultStyle { trainRColor: '#A0522D' } ], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM - runControlStatus: [ - { - status: '01', - hShow: false, - sShow: false - }, - { - status: '02', - hShow: true, - sShow: false - }, - { - status: '03', - hShow: false, - sShow: true - } - ], // 设置运行控制状态类型 01正常 02扣车 03停跳 - doorStatus: [ - {status: true, dShow: false}, - {status: false, dShow: true} - ], // 设置车门状态类型 true车门关闭且锁闭 communicationStatus: [ {status: 'CBTC', trainColor: '#000099'}, {status: 'ITC', trainColor: '#747474'}, {status: 'IL', trainColor: '#747474'} - ], // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL - alarmStatus: [ - {status: '01', aShow: false}, - {status: '02', aShow: true} - ] // 设置报警状态 01不报警 02报警 + ] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL } }; } diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index 4ef903b5d..34d802344 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -138,6 +138,9 @@ class SkinCode extends defaultStyle { }, block: { special: false, // 区段特殊显示 + }, + trainPosition:{ + display: false // 列车实时位置显示 } }; @@ -239,7 +242,7 @@ class SkinCode extends defaultStyle { detainCar: { // 扣车 text: '扣', // 扣车显示内容 position: -1, // 扣车方向 - offset: {x: -8, y: -20}, // 扣车偏移量 + offset: {x: -8, y: 13}, // 扣车偏移量 trainColor: '#FFFF00', // 车站扣车颜色 centerTrainColor: '#C0C0C0', // 中心扣车颜色 andCenterTrainColor: '#C0C0C0', // 车站+中心扣车颜色 @@ -255,8 +258,8 @@ class SkinCode extends defaultStyle { text: '跳', // 停跳显示内容 position: -1, // 停跳方向 offset: {x: -8, y: 10}, - textColor: '#0000FF', // 停跳文字颜色 - arcColor: '#0000FF', // 停跳圆圈颜色 + textColor: '#00ffcc', // 停跳文字颜色 + arcColor: '#00ffcc', // 停跳圆圈颜色 fillColor: 'rgba(0,0,0,0)', // 透明填充颜色 r: 8 // 圆半径大小 }, @@ -607,36 +610,11 @@ class SkinCode extends defaultStyle { trainRColor: '#FF0000' } ], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM - runControlStatus: [ - { - status: '01', - hShow: false, - sShow: false - }, - { - status: '02', - hShow: true, - sShow: false - }, - { - status: '03', - hShow: false, - sShow: true - } - ], // 设置运行控制状态类型 01正常 02扣车 03停跳 - doorStatus: [ - {status: true, dShow: false}, - {status: false, dShow: true} - ], // 设置车门状态类型 true车门关闭且锁闭 communicationStatus: [ {status: 'CBTC', trainColor: '#000099'}, {status: 'ITC', trainColor: '#747474'}, {status: 'IL', trainColor: '#747474'} - ], // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL - alarmStatus: [ - {status: '01', aShow: false}, - {status: '02', aShow: true} - ] // 设置报警状态 01不报警 02报警 + ] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL } }; } diff --git a/src/jmapNew/config/skinCode/fuzhou_01.js b/src/jmapNew/config/skinCode/fuzhou_01.js index 6a3c1dff6..4bc15dab7 100644 --- a/src/jmapNew/config/skinCode/fuzhou_01.js +++ b/src/jmapNew/config/skinCode/fuzhou_01.js @@ -128,6 +128,9 @@ class SkinCode extends defaultStyle { }, block: { special: false, // 区段特殊显示 + }, + trainPosition:{ + display: false // 列车实时位置显示 } }; diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index 76851b190..2041f1767 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -128,6 +128,9 @@ class SkinCode extends defaultStyle { }, block: { special: true, // 区段特殊显示 + }, + trainPosition:{ + display: false // 列车实时位置显示 } }; @@ -234,7 +237,7 @@ class SkinCode extends defaultStyle { position: -1, // 扣车方向 offset: { x: -8, y: -6 }, // 扣车偏移量 trainColor: '#E4EF50', // 车站扣车颜色 - centerTrainColor: '#FFFFFF', // 中心扣车颜色 + centerTrainColor: 'red', // 中心扣车颜色 andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色 }, diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 76614087b..c1147d784 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -136,6 +136,9 @@ class SkinCode extends defaultStyle { block: { special: false, // 区段特殊显示 blockGlint: true, // 区段封锁闪烁显示 + }, + trainPosition:{ + display: false // 列车实时位置显示 } }; @@ -217,6 +220,7 @@ class SkinCode extends defaultStyle { distance: 17 // 等于副标题距离 }, lamp: { + borderShow: true, // 是否显示边框 lineDash: null, // 灯的包围框 stroke: '#FFFFFF', // 框的颜色 fill: 'rgba(0,0,0,0)', // 填充色 @@ -353,7 +357,7 @@ class SkinCode extends defaultStyle { lamp: { count: 4, // 控制模式的个数 offset: { x: 20, y: 0 }, // 偏移量 - radiusR: 5, // 控制模式灯的半径 + radiusR: 6, // 控制模式灯的半径 distance: 46, // 控制模式之间灯之间的距离 grayColor: '#C0C0C0', // 控制模式灰色 greenColor: 'green', // 控制模式绿色 @@ -488,10 +492,10 @@ class SkinCode extends defaultStyle { lrPaddingHSDA: 3, // HSDA两边间隔 upPaddingHSDA: 4, // HSDA上边距离 trainHSDATextFontSize: 8, // 列车HDSA字号 - textHContent: '扣', // textH文本 - textSContent: '跳', // textS文本 - textDContent: '门', // textD文本 - textAContent: '警' // textA文本 + textHContent: 'H', // textH文本 + textSContent: 'S', // textS文本 + textDContent: 'D', // textD文本 + textAContent: 'A' // textA文本 }, trainNumber: { targetCodePrefix: '000', // 目的地码前缀 @@ -613,33 +617,8 @@ class SkinCode extends defaultStyle { // trainRColor: '#A0522D' // } ], // 列车运行模式对应车头颜色 ATO自动驾驶模式AM ATP监控下的人工驾驶模式CM 限制人工驾驶模式RM 非限制人工驾驶模式NRM - runControlStatus: [ - { - status: '01', - hShow: false, - sShow: false - }, - { - status: '02', - hShow: true, - sShow: false - }, - { - status: '03', - hShow: false, - sShow: true - } - ], // 设置运行控制状态类型 01正常 02扣车 03停跳 - doorStatus: [ - { status: true, dShow: false }, - { status: false, dShow: true } - ], // 设置车门状态类型 true车门关闭且锁闭 communicationStatus: [ - ], // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL - alarmStatus: [ - { status: '01', aShow: false }, - { status: '02', aShow: true } - ] // 设置报警状态 01不报警 02报警 + ] // 设置通信状态 cbtc级别CBTC 点式通信ITC 联锁级IL } }; } diff --git a/src/jmapNew/constant/stateTransition.js b/src/jmapNew/constant/stateTransition.js index db974c772..0c8316ae5 100644 --- a/src/jmapNew/constant/stateTransition.js +++ b/src/jmapNew/constant/stateTransition.js @@ -1,4 +1,5 @@ import { deepAssign } from '@/utils/index'; +import deviceType from './deviceType'; // 所有默认状态在这里都要有 用来转换后台发送的数据状态 class Status { @@ -118,6 +119,9 @@ class Status { handleOutFrame(device) { this.statusObj = { }; } + handleText(device) { + this.statusObj = { }; + } getStatus() { return this.statusObj; } diff --git a/src/jmapNew/painter.js b/src/jmapNew/painter.js index dc81d8a36..d1c7af375 100644 --- a/src/jmapNew/painter.js +++ b/src/jmapNew/painter.js @@ -148,7 +148,7 @@ class Painter { try { if (device._dispose) { this.delete(device); - } else if (deviceType.Train == device._type) { + } else if (deviceType.Train.toUpperCase() == device.deviceType) { this.updateTrain(device); } else { const instance = device.instance; diff --git a/src/jmapNew/shape/Automactic/index.js b/src/jmapNew/shape/Automactic/index.js index f1bfbde4e..a7e7fcc63 100644 --- a/src/jmapNew/shape/Automactic/index.js +++ b/src/jmapNew/shape/Automactic/index.js @@ -76,21 +76,24 @@ export default class Automactic extends Group { }); this.add(this.subtitleText); } - const arcRect = this.getArcBoundingRect(); - this.arcBorder = new Rect({ - zlevel: this.zlevel, - z: this.z, - silent: true, - shape: arcRect, - style: { - lineDash: this.style.MapCycleButtonVO.lamp.lineDash, - stroke: this.style.MapCycleButtonVO.lamp.stroke, - fill: this.style.MapCycleButtonVO.lamp.fill - } - }); + + if (this.style.MapCycleButtonVO.lamp.borderShow) { + const arcRect = this.getArcBoundingRect(); + this.arcBorder = new Rect({ + zlevel: this.zlevel, + z: this.z, + silent: true, + shape: arcRect, + style: { + lineDash: this.style.MapCycleButtonVO.lamp.lineDash, + stroke: this.style.MapCycleButtonVO.lamp.stroke, + fill: this.style.MapCycleButtonVO.lamp.fill + } + }); + this.add(this.arcBorder); + } this.add(this.control); this.add(this.text); - this.add(this.arcBorder); } // 设置状态 diff --git a/src/jmapNew/shape/Psd/index.js b/src/jmapNew/shape/Psd/index.js index 310f9a0b8..e479a92b5 100644 --- a/src/jmapNew/shape/Psd/index.js +++ b/src/jmapNew/shape/Psd/index.js @@ -22,7 +22,7 @@ export default class Line2 extends Group { const style = this.style; this.safeDoor = new ESafeDoor({ zlevel: this.zlevel, - z: this.z, + z: this.z + 1, style: style, x: model.position.x, y: model.position.y - (model.height / 2), diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index ba09dd050..b9f7ce994 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -20,18 +20,22 @@ export default class Station extends Group { this.z = 40; this.model = model; this.style = style; - const arr = window.location.href.split('?')[1].split('&'); - this.prdType = ''; - arr.forEach(elem => { - if (elem.split('=')[0] === 'prdType') { - this.prdType = elem.split('=')[1]; - } - }); + this.create(); this.createTurnBack(); // 创建按图折返 - if (!this.prdType || style.Station.functionButtonShow.indexOf(this.prdType) !== -1) { + const path = window.location.href; + if (!path.includes('/map/draw')) { this.createGuideTotalLock(); // 创建引导总锁 } + this.prdType = ''; + if (path.includes('?')) { + const arr = window.location.href.split('?')[1].split('&'); + arr.forEach(elem => { + if (elem.split('=')[0] === 'prdType') { + this.prdType = elem.split('=')[1]; + } + }); + } this.createControlMode(); this.setState(model); this.checkIsDrawMap(); @@ -117,7 +121,7 @@ export default class Station extends Group { createGuideTotalLock() { // 创建引导总锁 const model = this.model; const style = this.style; - if (model.guideTotalLock) { + if (model.guideTotalLock || (!this.prdType && style.Station.functionButtonShow.indexOf(this.prdType) !== -1 && model.guideTotalLockPoint)) { this.guideLamp = new EControl({ zlevel: this.zlevel, z: this.z, diff --git a/src/jmapNew/shape/StationStand/EDetain.js b/src/jmapNew/shape/StationStand/EDetain.js index 16d67df09..1fbd77f74 100644 --- a/src/jmapNew/shape/StationStand/EDetain.js +++ b/src/jmapNew/shape/StationStand/EDetain.js @@ -42,6 +42,7 @@ class EDetain extends Group { position = -model.width / 4 - gagX; } } + console.log(textName); this.detain = new Text({ zlevel: model.zlevel, z: model.z, @@ -90,9 +91,13 @@ class EDetain extends Group { this.detain.hide(); } - show() { - this.create('H'); - this.detain.show(); + show(nameText) { + if (this.model.style.StationStand.common.special && nameText) { + this.detain.setStyle('text', nameText); + } else { + this.create(); + this.detain.show(); + } } } diff --git a/src/jmapNew/shape/StationStand/index.js b/src/jmapNew/shape/StationStand/index.js index 98d270187..49a9e7aae 100644 --- a/src/jmapNew/shape/StationStand/index.js +++ b/src/jmapNew/shape/StationStand/index.js @@ -23,16 +23,19 @@ class StationStand extends Group { this.zlevel = model.zlevel; this.z = 1; this.doors = new Group(); - const arr = window.location.href.split('?')[1].split('&'); this.prdType = ''; - arr.forEach(elem => { - if (elem.split('=')[0] === 'prdType') { - this.prdType = elem.split('=')[1]; - } - }); + const path = window.location.href; + if (path.includes('?')) { + const arr = window.location.href.split('?')[1].split('&'); + arr.forEach(elem => { + if (elem.split('=')[0] === 'prdType') { + this.prdType = elem.split('=')[1]; + } + }); + } this.create(); this.createMouseEvent(); - if (!this.prdType || this.style.StationStand.common.functionButtonShow.indexOf(this.prdType) !== -1 ) { + if (!this.prdType || (this.style.StationStand.common.functionButtonShow.indexOf(this.prdType) !== -1 && model.guideTotalLockPoint)) { this.createFunctionButton(); } this.setVisible(model.visible); @@ -413,19 +416,31 @@ class StationStand extends Group { /** 车站扣车*/ standDetainTrain() { - this.detain && this.detain.show(); + if (this.style.StationStand.common.special) { + this.detain && this.detain.show('H'); + } else { + this.detain && this.detain.show(); + } this.detain && this.detain.setColor(this.style.StationStand.detainCar.detainTrainTextColor); } /** 中心扣车*/ centerDetainTrain() { - this.detain && this.detain.show(); + if (this.style.StationStand.common.special) { + this.detain && this.detain.show('H'); + } else { + this.detain && this.detain.show(); + } this.detain && this.detain.setColor(this.style.StationStand.detainCar.centerTrainColor); } /** 中心+车站扣车*/ standAndCenterDetainTrain() { - this.detain && this.detain.show(); + if (this.style.StationStand.common.special) { + this.detain && this.detain.show('H'); + } else { + this.detain && this.detain.show(); + } this.detain && this.detain.setColor(this.style.StationStand.detainCar.andCenterTrainColor); } @@ -473,11 +488,12 @@ class StationStand extends Group { } /** 设置跳停*/ - // this.unJumpStop(); // 未设置跳停 + // model.assignSkip = 1; model.assignSkip && this.designatedJumpStop(); // 指定站台跳停 model.allSkip && this.jumpStop(); // 站台全部跳停 /** 设置扣车*/ + // model.centerHoldTrain = 1; if (model.stationHoldTrain && model.centerHoldTrain) { this.standAndCenterDetainTrain(); // 中心+车站扣车 } else if (model.stationHoldTrain) { diff --git a/src/jmapNew/shape/Train/EMouse.js b/src/jmapNew/shape/Train/EMouse.js index b4d8d7211..f0a1ab761 100644 --- a/src/jmapNew/shape/Train/EMouse.js +++ b/src/jmapNew/shape/Train/EMouse.js @@ -27,9 +27,9 @@ class EMouse extends Group { } let text = ''; if (LangStorage.getLang() == 'en') { - text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${this.device.model.directionType == '02' ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.runControlStatus == '01' ? 'Normal' : this.device.model.runControlStatus == '03' ? 'Skip to continue moving' : 'Detained'}\n Stationary: ${this.device.model.runStatus == '02' ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`; + text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${this.device.model.directionType == '02' ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${!this.device.model.hold ? 'Normal' : 'Detained'}\n \n 跳停状态: ${!this.device.model.jump ? 'Normal' : 'Skip to continue moving'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`; } else { - text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.runControlStatus == '01' ? '正常' : this.device.model.runControlStatus == '03' ? '跳停' : '扣车'}\n停稳状态: ${this.device.model.runStatus == '02' ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`; + text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${ !this.device.model.hold ? '正常' : '扣车'}\n 跳停状态: ${!this.device.model.jump ? '正常' : '跳停'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`; } // 文字描述 this.arrowText = new Text({ diff --git a/src/jmapNew/shape/Train/index.js b/src/jmapNew/shape/Train/index.js index 4d97249ea..82d26edd4 100644 --- a/src/jmapNew/shape/Train/index.js +++ b/src/jmapNew/shape/Train/index.js @@ -3,6 +3,8 @@ import TrainHead from './TrainHead'; import TrainBody from './TrainBody'; import BoundingRect from 'zrender/src/core/BoundingRect'; import Rect from 'zrender/src/graphic/shape/Rect'; +import { deepAssign } from '@/utils/index'; +import store from '@/store'; /** 列车 */ export default class Train extends Group { @@ -69,7 +71,6 @@ export default class Train extends Group { directionType: model.directionType, directionCode: model.directionCode, sectionModel: model.sectionModel, - runControlStatus: model.runControlStatus, runStatus: model.runStatus, fontSize: this.fontSize, nameFormat: this.nameFormat, @@ -115,6 +116,20 @@ export default class Train extends Group { getShapeTipPoint() { } + updateSection() { + const train = this.model; + if (train.physicalCode && train.offsetp) { + const data = train.physicalCode; + const oldmodel = store.getters['map/getDeviceByCode'](data); + oldmodel.offsetp = train.offsetp; + oldmodel.right = train.right; + let models = []; + const model = deepAssign(oldmodel, {_type: 'Section'}); // 修改元素model + models = [model]; + store.dispatch('map/updateMapDevices', models); + } + } + // 恢复颜色状态 recover() { this.trainB && this.trainB.setHShow(false); @@ -238,27 +253,35 @@ export default class Train extends Group { }); } } - // 设置运行控制状态类型 - setRunControlStatus(status) { - if (this.style.Train.trainStatusStyle.runControlStatus.length > 0) { - this.style.Train.trainStatusStyle.runControlStatus.some((item) => { - if (status === item.status) { - this.trainB && this.trainB.setHShow(item.hShow); - this.trainB && this.trainB.setSShow(item.sShow); - return true; - } - }); + + // 设置扣车状态 + setHoldStatus(status) { + if (status) { + this.trainB && this.trainB.setHShow(true); + } else { + this.trainB && this.trainB.setHShow(false); } } + + // 设置跳停状态 + setJumpStatus(status) { + if (status) { + this.trainB && this.trainB.setSShow(true); + } else { + this.trainB && this.trainB.setSShow(false); + } + } + // 设置车门状态类型 setDoorStatus(status) { - if (this.style.Train.trainStatusStyle.doorStatus.length > 0) { - this.style.Train.trainStatusStyle.doorStatus.some((item) => { - if (status === item.status) { - this.trainB && this.trainB.setDShow(item.dShow); - return true; - } - }); + if (status != undefined) { + if (status) { + this.trainB && this.trainB.setDShow(false); + } else { + this.trainB && this.trainB.setDShow(true); + } + } else { + this.trainB && this.trainB.setDShow(false); } } // 设置通信状态类型 @@ -274,13 +297,10 @@ export default class Train extends Group { } // 设置报警状态 setAlarmStatus(status) { - if (this.style.Train.trainStatusStyle.alarmStatus.length > 0) { - this.style.Train.trainStatusStyle.alarmStatus.some((item) => { - if (status === item.status) { - this.trainB && this.trainB.setAShow(item.aShow); - return true; - } - }); + if (status) { + this.trainB && this.trainB.setAShow(true); + } else { + this.trainB && this.trainB.setAShow(false); } } setTrainTypeStatus(type) { @@ -309,6 +329,15 @@ export default class Train extends Group { this.setCommunicationStatus(model.runLevel); // this.setTrainTypeStatus(model.type); 配合早晚点设置 this.setDoorStatus(model.doorCloseLock); + this.setAlarmStatus(model.alarmStatus); + this.setHoldStatus(model.hold); + this.setJumpStatus(model.jump); + + const style = this.style; + if (style.Section.trainPosition.display) { + this.updateSection(); + } + } // let points = []; // if (model) { diff --git a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue index e585b0181..68d334a51 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue @@ -153,7 +153,6 @@ export default { }, watch: { '$store.state.menuOperation.menuCount': function (val) { - debugger; if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) { this.doShow(this.$store.state.menuOperation.menuPosition); } else { diff --git a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue index bce77aaa9..202a8a862 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue @@ -191,7 +191,6 @@ export default { break; } case OperationEvent.Switch.lock.button.operation: { - debugger; // 道岔单锁 if (!selectType.singleLock) { this.lock(selectType); diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue index cc3d499ca..5377545e0 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue @@ -388,7 +388,6 @@ export default { this.stationName = station.name; } } - debugger; if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) { this.radio = selected.direction; } else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) { diff --git a/src/views/newMap/newMapdraft/mapoperate/psdDraft.vue b/src/views/newMap/newMapdraft/mapoperate/psdDraft.vue index 9c6dcab01..deb243708 100644 --- a/src/views/newMap/newMapdraft/mapoperate/psdDraft.vue +++ b/src/views/newMap/newMapdraft/mapoperate/psdDraft.vue @@ -52,6 +52,25 @@ + +
+ + + + + + + + + + + {{ $t('global.set') }} + + + + +
+
@@ -92,6 +111,10 @@ export default { width: 60, height: 3, doorLocationType: '01' // 显示方向朝上或朝下 + }, + allModel: { + width: '', + height: '', } }; }, @@ -260,6 +283,17 @@ export default { _that.$message.info(this.$t('tip.cancelledDelete')); }); } + }, + // 批量设置 + batchSettings() { + let models = []; + this.psdList.forEach(psd => { + const model = deepAssign({}, psd); + model.width = this.allModel.width; + model.height = this.allModel.height; + models.push(model); + }) + this.$emit('updateMapModel', models); } } }; diff --git a/src/views/newMap/newMapdraft/mapoperate/station.vue b/src/views/newMap/newMapdraft/mapoperate/station.vue index 323065578..e73146ce2 100644 --- a/src/views/newMap/newMapdraft/mapoperate/station.vue +++ b/src/views/newMap/newMapdraft/mapoperate/station.vue @@ -66,10 +66,30 @@ + +
+ + + + + + + + + + + {{ $t('global.set') }} + + + + +
+