测试站台
This commit is contained in:
parent
50f8614df2
commit
023058ebb0
|
@ -1,11 +1,10 @@
|
|||
import { GraphicState } from 'jl-graphic';
|
||||
import { CategoryType } from './PlatformConfig';
|
||||
import { JlPlatform } from './JlPlatform';
|
||||
export interface IBeiJingPlatformState extends GraphicState {
|
||||
id?: number;
|
||||
}
|
||||
export declare class BeiJingPlatform extends JlPlatform {
|
||||
constructor(categoryType: CategoryType);
|
||||
constructor();
|
||||
get states(): IBeiJingPlatformState;
|
||||
doRepaint(): void;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { BeiJingConsts } from './PlatformConfig.js';
|
||||
import { CategoryType, BeiJingConsts } from './PlatformConfig.js';
|
||||
import { JlPlatform } from './JlPlatform.js';
|
||||
|
||||
class BeiJingPlatform extends JlPlatform {
|
||||
constructor(categoryType) {
|
||||
super(categoryType);
|
||||
constructor() {
|
||||
super(CategoryType.BeiJing);
|
||||
}
|
||||
get states() {
|
||||
return this.getStates();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { JlGraphicTemplate } from "jl-graphic";
|
||||
import { JlPlatform } from "./JlPlatform";
|
||||
import { CategoryType, IPlatformData } from "./PlatformConfig";
|
||||
import { IXiAnPlatformState } from "./XiAnPlatform";
|
||||
import { IBeiJingPlatformState } from "./BeiJingPlatform";
|
||||
import { JlGraphicTemplate } from 'jl-graphic';
|
||||
import { JlPlatform } from './JlPlatform';
|
||||
import { CategoryType, IPlatformData } from './PlatformConfig';
|
||||
import { IXiAnPlatformState } from './XiAnPlatform';
|
||||
import { IBeiJingPlatformState } from './BeiJingPlatform';
|
||||
export declare class PlatformTemplate extends JlGraphicTemplate<JlPlatform> {
|
||||
hasdoor?: boolean;
|
||||
direction?: string;
|
||||
|
|
|
@ -21,12 +21,12 @@ class PlatformTemplate extends JlGraphicTemplate {
|
|||
new() {
|
||||
switch (this.categoryType) {
|
||||
case CategoryType.BeiJing:
|
||||
const BeiJing = new BeiJingPlatform(CategoryType.BeiJing);
|
||||
const BeiJing = new BeiJingPlatform();
|
||||
BeiJing.loadData(this.datas);
|
||||
BeiJing.loadState(this.states);
|
||||
return BeiJing;
|
||||
default:
|
||||
const XiAn = new XiAnPlatform(CategoryType.XiAn);
|
||||
const XiAn = new XiAnPlatform();
|
||||
XiAn.loadData(this.datas);
|
||||
XiAn.loadState(this.states);
|
||||
return XiAn;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { GraphicState } from 'jl-graphic';
|
||||
import { CategoryType } from './PlatformConfig';
|
||||
import { JlPlatform } from './JlPlatform';
|
||||
export interface IXiAnPlatformState extends GraphicState {
|
||||
get emergstop(): boolean;
|
||||
|
@ -38,7 +37,7 @@ export interface IXiAnPlatformState extends GraphicState {
|
|||
set rtuId(v: number);
|
||||
}
|
||||
export declare class XiAnPlatform extends JlPlatform {
|
||||
constructor(categoryType: CategoryType);
|
||||
constructor();
|
||||
get states(): IXiAnPlatformState;
|
||||
doRepaint(): void;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { XiAnConsts } from './PlatformConfig.js';
|
||||
import { CategoryType, XiAnConsts } from './PlatformConfig.js';
|
||||
import { JlPlatform } from './JlPlatform.js';
|
||||
|
||||
class XiAnPlatform extends JlPlatform {
|
||||
constructor(categoryType) {
|
||||
super(categoryType);
|
||||
constructor() {
|
||||
super(CategoryType.XiAn);
|
||||
}
|
||||
get states() {
|
||||
return this.getStates();
|
||||
|
|
|
@ -7,8 +7,8 @@ export interface IBeiJingPlatformState extends GraphicState {
|
|||
}
|
||||
|
||||
export class BeiJingPlatform extends JlPlatform {
|
||||
constructor(categoryType: CategoryType) {
|
||||
super(categoryType);
|
||||
constructor() {
|
||||
super(CategoryType.BeiJing);
|
||||
}
|
||||
get states(): IBeiJingPlatformState {
|
||||
return this.getStates<IBeiJingPlatformState>();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { JlGraphicTemplate } from "jl-graphic";
|
||||
import { JlPlatform } from "./JlPlatform";
|
||||
import { CategoryType, IPlatformData } from "./PlatformConfig";
|
||||
import { IXiAnPlatformState, XiAnPlatform } from "./XiAnPlatform";
|
||||
import { BeiJingPlatform, IBeiJingPlatformState } from "./BeiJingPlatform";
|
||||
import { JlGraphicTemplate } from 'jl-graphic';
|
||||
import { JlPlatform } from './JlPlatform';
|
||||
import { CategoryType, IPlatformData } from './PlatformConfig';
|
||||
import { IXiAnPlatformState, XiAnPlatform } from './XiAnPlatform';
|
||||
import { BeiJingPlatform, IBeiJingPlatformState } from './BeiJingPlatform';
|
||||
|
||||
export class PlatformTemplate extends JlGraphicTemplate<JlPlatform> {
|
||||
hasdoor?: boolean;
|
||||
|
@ -25,12 +25,12 @@ export class PlatformTemplate extends JlGraphicTemplate<JlPlatform> {
|
|||
new(): JlPlatform {
|
||||
switch (this.categoryType) {
|
||||
case CategoryType.BeiJing:
|
||||
const BeiJing = new BeiJingPlatform(CategoryType.BeiJing);
|
||||
const BeiJing = new BeiJingPlatform();
|
||||
BeiJing.loadData(this.datas);
|
||||
BeiJing.loadState(this.states);
|
||||
return BeiJing;
|
||||
default:
|
||||
const XiAn = new XiAnPlatform(CategoryType.XiAn);
|
||||
const XiAn = new XiAnPlatform();
|
||||
XiAn.loadData(this.datas);
|
||||
XiAn.loadState(this.states);
|
||||
return XiAn;
|
||||
|
|
|
@ -40,8 +40,8 @@ export interface IXiAnPlatformState extends GraphicState {
|
|||
}
|
||||
|
||||
export class XiAnPlatform extends JlPlatform {
|
||||
constructor(categoryType: CategoryType) {
|
||||
super(categoryType);
|
||||
constructor() {
|
||||
super(CategoryType.XiAn);
|
||||
}
|
||||
get states(): IXiAnPlatformState {
|
||||
return this.getStates<IXiAnPlatformState>();
|
||||
|
|
Loading…
Reference in New Issue