From bb204dd72ab783c54d9d158142183198aafd5d56 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 6 Mar 2020 20:47:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=BD=A6=20=E8=B7=B3=E5=81=9C=20?= =?UTF-8?q?=E6=89=A3=E8=BD=A6=20=E8=BD=A6=E9=97=A8=20=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=BB=A3=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/jmapNew/config/skinCode/bejing_01.js | 13 ------ src/jmapNew/config/skinCode/chengdu_01.js | 27 +---------- src/jmapNew/config/skinCode/chengdu_03.js | 27 +---------- src/jmapNew/config/skinCode/ningbo_01.js | 35 ++------------ src/jmapNew/shape/Train/index.js | 56 +++++++++++++---------- 5 files changed, 38 insertions(+), 120 deletions(-) diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index a31ff309a..03e6c8f8d 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -632,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 93ae793ac..ead8d4f72 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -573,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 72b5297d2..6dd0bff81 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -610,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/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 48049fcd5..c1147d784 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -492,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', // 目的地码前缀 @@ -617,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/shape/Train/index.js b/src/jmapNew/shape/Train/index.js index 0bd0a63cc..71f8e42ee 100644 --- a/src/jmapNew/shape/Train/index.js +++ b/src/jmapNew/shape/Train/index.js @@ -71,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, @@ -122,6 +121,8 @@ export default class Train extends Group { 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]; @@ -252,27 +253,31 @@ 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) { + this.trainB && this.trainB.setDShow(true); + } else { + this.trainB && this.trainB.setDShow(false); } } // 设置通信状态类型 @@ -288,13 +293,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) { @@ -323,11 +325,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) {