65 lines
1.8 KiB
TypeScript
65 lines
1.8 KiB
TypeScript
|
import { GraphicData } from "jl-graphic";
|
||
|
export interface ITrainConstsConfig {
|
||
|
bodyWidth: number;
|
||
|
bodyHeight: number;
|
||
|
bodyPadding: number;
|
||
|
borderWidth: number;
|
||
|
codeFontSize: number;
|
||
|
textFontSize: number;
|
||
|
textMarginY: number;
|
||
|
statusTextList: EnumStatusText[];
|
||
|
marginX: number;
|
||
|
pauseW: number;
|
||
|
bodyBgColor?: string;
|
||
|
codeColor: string;
|
||
|
borderColor: string;
|
||
|
arrowDefaultColor: string;
|
||
|
pauseDefaultColor: string;
|
||
|
DiriveModelColorEnum: DiriveModelColor;
|
||
|
typeColorEnum: TypeColor;
|
||
|
statusTextColor: IStatusTextColor;
|
||
|
statusTextTransform?: IStatusTextColor;
|
||
|
arrowPauseOnlyOne: boolean;
|
||
|
hasBodyRact: boolean;
|
||
|
}
|
||
|
export type UpdateTrainConsts = Partial<ITrainConstsConfig>;
|
||
|
export declare enum EnumDiriveModel {
|
||
|
AM = "AM",// ATO自动驾驶
|
||
|
SM = "SM",// ATP 监控下的人工驾驶模式
|
||
|
RM = "RM",// 限制人工驾驶模式
|
||
|
NRM = "NRM",// 非限制人工驾驶模式
|
||
|
red = "red"
|
||
|
}
|
||
|
export type DiriveModelColor = {
|
||
|
[key in EnumDiriveModel]: string;
|
||
|
};
|
||
|
export declare enum EnumTrainType {
|
||
|
accuracy = "accuracy",// 准点
|
||
|
early = "early",// 早点
|
||
|
late = "late",// 晚点
|
||
|
schedule = "schedule",// 计划车
|
||
|
head = "head",// 头码车
|
||
|
manual = "manual",// 人工车
|
||
|
special = "special"
|
||
|
}
|
||
|
export type TypeColor = {
|
||
|
[key in EnumTrainType]: string;
|
||
|
};
|
||
|
export declare enum EnumStatusText {
|
||
|
H = "H",// H扣车
|
||
|
S = "S",// S跳停
|
||
|
D = "D",// D开门
|
||
|
A = "A"
|
||
|
}
|
||
|
export type IStatusTextColor = {
|
||
|
[key in EnumStatusText]: string;
|
||
|
};
|
||
|
export interface ITrainData extends GraphicData {
|
||
|
get code(): string;
|
||
|
set code(v: string);
|
||
|
clone(): ITrainData;
|
||
|
copyFrom(data: ITrainData): void;
|
||
|
eq(other: ITrainData): boolean;
|
||
|
}
|
||
|
export declare function getTrainConsts(): ITrainConstsConfig;
|