去掉protoPort2Data
This commit is contained in:
parent
78453c82ab
commit
c120822467
1
components/common/common.d.ts
vendored
1
components/common/common.d.ts
vendored
@ -36,4 +36,3 @@ export interface IRelatedRef {
|
||||
export declare namespace IRelatedRef {
|
||||
function create(type: string, id: number, port: DevicePort): IRelatedRef;
|
||||
}
|
||||
export declare function protoPort2Data(port: DevicePort): "A" | "B" | "C" | undefined;
|
||||
|
@ -37,13 +37,5 @@ var IRelatedRef;
|
||||
}
|
||||
IRelatedRef.create = create;
|
||||
})(IRelatedRef || (IRelatedRef = {}));
|
||||
function protoPort2Data(port) {
|
||||
if (port === DevicePort.A)
|
||||
return 'A';
|
||||
if (port === DevicePort.B)
|
||||
return 'B';
|
||||
if (port === DevicePort.C)
|
||||
return 'C';
|
||||
}
|
||||
|
||||
export { DevicePort, DeviceType, Direction, IRelatedRef, protoPort2Data };
|
||||
export { DevicePort, DeviceType, Direction, IRelatedRef };
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { JlGraphic, GraphicRelationParam, JlGraphicTemplate } from 'jl-graphic';
|
||||
import { protoPort2Data } from '../../common/common.js';
|
||||
import { DevicePort } from '../../common/common.js';
|
||||
import { Container, Graphics, Color } from 'pixi.js';
|
||||
|
||||
var TypeDetectionPoint;
|
||||
@ -73,7 +73,7 @@ class AxleCounting extends JlGraphic {
|
||||
loadRelations() {
|
||||
if (this.datas.axleCountingRef.length) {
|
||||
this.datas.axleCountingRef.forEach((device) => {
|
||||
this.relationManage.addRelation(new GraphicRelationParam(this, 'A'), new GraphicRelationParam(this.queryStore.queryById(device.id), protoPort2Data(device.devicePort)));
|
||||
this.relationManage.addRelation(new GraphicRelationParam(this, 'A'), new GraphicRelationParam(this.queryStore.queryById(device.id), DevicePort[device.devicePort]));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -54,9 +54,3 @@ export namespace IRelatedRef {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export function protoPort2Data(port: DevicePort) {
|
||||
if (port === DevicePort.A) return 'A';
|
||||
if (port === DevicePort.B) return 'B';
|
||||
if (port === DevicePort.C) return 'C';
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import {
|
||||
JlGraphic,
|
||||
JlGraphicTemplate,
|
||||
} from 'jl-graphic';
|
||||
import { IRelatedRef, KilometerSystem, protoPort2Data } from 'common/common';
|
||||
import { DevicePort, IRelatedRef, KilometerSystem } from 'common/common';
|
||||
import { Container, Graphics, Color } from 'pixi.js';
|
||||
|
||||
enum TypeDetectionPoint {
|
||||
@ -100,7 +100,7 @@ export class AxleCounting extends JlGraphic {
|
||||
new GraphicRelationParam(this, 'A'),
|
||||
new GraphicRelationParam(
|
||||
this.queryStore.queryById(device.id),
|
||||
protoPort2Data(device.devicePort),
|
||||
DevicePort[device.devicePort],
|
||||
),
|
||||
);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user