列车车组号显示调整

This commit is contained in:
dong 2023-11-01 10:27:31 +08:00
parent 50af8c6c52
commit 3bdb6304a1
2 changed files with 10 additions and 1 deletions

View File

@ -448,7 +448,12 @@ class TrainHoverLabel extends Container {
fill: labelConsts.textColor,
fontSize: labelConsts.codeFontSize,
};
const text = `列车类型:计划车\n来 源:人工标记\n车 组 号:${states.groupId}\n表 号:${states.trainId}\n车 次 号:${states.globalId}`;
let codeA = states.groupId;
const firstChar = codeA.substring(0, 1); // 获取首字符
if (+firstChar == states.lineId) {
codeA = codeA.substring(1); // 删除首字符是线路号的字符
}
const text = `列车类型:计划车\n来 源:人工标记\n车 组 号:${codeA}\n表 号:${states.trainId}\n车 次 号:${states.globalId}\n线 路 号:${states.lineId}`;
this.sText.text = text;
this.sText.style = style;
const { width: codeWidth, height: codeHeight } =

View File

@ -252,6 +252,10 @@ export class TrainBody extends Container {
const codeBGraph = this.codeBGraph;
// const codeRact = this.codeRact;
let codeA = states?.groupId;
const firstChar = codeA.substring(0, 1); // 获取首字符
if (+firstChar == states.lineId) {
codeA = codeA.substring(1); // 删除首字符是线路号的字符
}
const fillAColor = BBBColorEnum.schedule;
let fillBColor = BBBColorEnum.schedule;
if (states.mode?.ipModeTrainTypeSchedule) {