移除列车调整
This commit is contained in:
parent
f126cef711
commit
c5f033a598
@ -225,7 +225,8 @@ export function initLineApp(lineId: number): IGraphicApp {
|
|||||||
const trainStorage = state.WsLineTrainMessage.deserialize(message);
|
const trainStorage = state.WsLineTrainMessage.deserialize(message);
|
||||||
// console.log(trainStorage, '222');
|
// console.log(trainStorage, '222');
|
||||||
trainStorage.trainInfo.forEach((item) => {
|
trainStorage.trainInfo.forEach((item) => {
|
||||||
if (item.rtuId !== 81 && item.rtuId !== 82 && item.rtuId) {
|
// if (item.rtuId !== 81 && item.rtuId !== 82 && item.rtuId) {
|
||||||
|
if (item.rtuId) {
|
||||||
states.push(new TrainState(item));
|
states.push(new TrainState(item));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -421,10 +421,17 @@ export class Train extends JlGraphic {
|
|||||||
this.states.devName,
|
this.states.devName,
|
||||||
deviceTypeString.get(this.states.devType)
|
deviceTypeString.get(this.states.devType)
|
||||||
);
|
);
|
||||||
if (!dev) {
|
const rtuIdArr = [81, 82];
|
||||||
|
const hasRtuId = rtuIdArr.includes(this.states.rtuId);
|
||||||
|
if (!dev || hasRtuId) {
|
||||||
// 移除列车
|
// 移除列车
|
||||||
const app = this.getGraphicApp();
|
const app = this.getGraphicApp();
|
||||||
app.deleteGraphics(this);
|
app.deleteGraphics(this);
|
||||||
|
console.warn(
|
||||||
|
'移除列车:',
|
||||||
|
!dev ? `没有找到${this.states.devName}区段!` : '',
|
||||||
|
hasRtuId ? `错误集中站${this.states.rtuId}` : ''
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let window = null;
|
let window = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user