测试站台

This commit is contained in:
joylink_zhaoerwei 2024-01-03 09:30:56 +08:00
parent 50f8614df2
commit 023058ebb0
9 changed files with 26 additions and 28 deletions

View File

@ -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;
}

View File

@ -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();

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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();

View File

@ -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>();

View File

@ -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;

View File

@ -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>();