各设备增加索引
This commit is contained in:
parent
d52c6e3732
commit
48a4874a94
@ -1 +1 @@
|
||||
Subproject commit 31212079c61ac18638a6b93fda81388f4ad5a733
|
||||
Subproject commit 5ead82f5bfc0fe13025cfc89d4a825c4a3105565
|
@ -7,9 +7,6 @@
|
||||
</q-card-section>
|
||||
<q-separator inset></q-separator>
|
||||
<q-card-section>
|
||||
<template v-if="drawStore.drawGraphicType === Link.Type">
|
||||
<link-template></link-template>
|
||||
</template>
|
||||
<template v-if="drawStore.drawGraphicType === Rect.Type">
|
||||
<rect-template></rect-template>
|
||||
</template>
|
||||
@ -42,9 +39,6 @@
|
||||
</template>
|
||||
<template v-else-if="drawStore.selectedGraphics.length === 1">
|
||||
<q-card-section>
|
||||
<link-property
|
||||
v-if="drawStore.selectedGraphicType === Link.Type"
|
||||
></link-property>
|
||||
<rect-property
|
||||
v-if="drawStore.selectedGraphicType === Rect.Type"
|
||||
></rect-property>
|
||||
@ -94,13 +88,11 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import LinkTemplate from './templates/LinkTemplate.vue';
|
||||
import RectTemplate from './templates/RectTemplate.vue';
|
||||
import PlatformTemplate from './templates/PlatformTemplate.vue';
|
||||
import StationTemplate from './templates/StationTemplate.vue';
|
||||
// import TrainTemplate from './templates/TrainTemplate.vue';
|
||||
import CanvasProperty from './properties/CanvasProperty.vue';
|
||||
import LinkProperty from './properties/LinkProperty.vue';
|
||||
import RectProperty from './properties/RectProperty.vue';
|
||||
import PlatformProperty from './properties/PlatformProperty.vue';
|
||||
import StationProperty from './properties/StationProperty.vue';
|
||||
|
@ -1,96 +0,0 @@
|
||||
<template>
|
||||
<q-form>
|
||||
<q-input outlined readonly v-model="linkModel.id" label="id" hint="" />
|
||||
<q-input
|
||||
outlined
|
||||
v-model.number="linkModel.lineWidth"
|
||||
type="number"
|
||||
@blur="onUpdate"
|
||||
label="线宽"
|
||||
lazy-rules
|
||||
:rules="[(val) => (val && val > 0) || '画布宽必须大于0']"
|
||||
/>
|
||||
|
||||
<q-input
|
||||
outlined
|
||||
v-model="linkModel.lineColor"
|
||||
@blur="onUpdate"
|
||||
label="线色"
|
||||
lazy-rules
|
||||
:rules="[(val) => (val && val.length > 0) || '线色不能为空']"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="colorize" class="cursor-pointer">
|
||||
<q-popup-proxy cover transition-show="scale" transition-hide="scale">
|
||||
<q-color
|
||||
v-model="linkModel.lineColor"
|
||||
@change="
|
||||
(val) => {
|
||||
linkModel.lineColor = val;
|
||||
onUpdate();
|
||||
}
|
||||
"
|
||||
/>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<!-- <q-btn-toggle
|
||||
disable
|
||||
v-model="linkModel.curve"
|
||||
:options="[
|
||||
{ label: '直线', value: false },
|
||||
{ label: '曲线', value: true },
|
||||
]"
|
||||
/> -->
|
||||
|
||||
<q-input
|
||||
v-if="linkModel.curve"
|
||||
outlined
|
||||
v-model.number="linkModel.segmentsCount"
|
||||
type="number"
|
||||
@blur="onUpdate"
|
||||
label="曲线分段数量"
|
||||
lazy-rules
|
||||
:rules="[(val) => (val && val > 0) || '曲线分段数量必须大于0']"
|
||||
/>
|
||||
</q-form>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { LinkData } from 'src/drawApp/graphics/LinkInteraction';
|
||||
import { Link } from 'src/graphics/link/Link';
|
||||
import { useDrawStore } from 'src/stores/draw-store';
|
||||
import { onMounted, reactive, watch } from 'vue';
|
||||
|
||||
const drawStore = useDrawStore();
|
||||
const linkModel = reactive(new LinkData());
|
||||
|
||||
drawStore.$subscribe;
|
||||
watch(
|
||||
() => drawStore.selectedGraphic,
|
||||
(val) => {
|
||||
if (val && val.type == Link.Type) {
|
||||
// console.log('link变更');
|
||||
linkModel.copyFrom(val.saveData() as LinkData);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
// console.log('link 属性表单 mounted');
|
||||
const link = drawStore.selectedGraphic as Link;
|
||||
if (link) {
|
||||
linkModel.copyFrom(link.saveData());
|
||||
}
|
||||
});
|
||||
|
||||
function onUpdate() {
|
||||
console.log('link 属性更新');
|
||||
const link = drawStore.selectedGraphic as Link;
|
||||
if (link) {
|
||||
drawStore.getDrawApp().updateGraphicAndRecord(link, linkModel);
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,6 +1,20 @@
|
||||
<template>
|
||||
<q-form>
|
||||
<q-input outlined readonly v-model="platformModel.id" label="id" hint="" />
|
||||
<q-input
|
||||
outlined
|
||||
v-model.number="platformModel.index"
|
||||
type="number"
|
||||
@blur="onUpdate"
|
||||
label="索引"
|
||||
/>
|
||||
<q-input
|
||||
outlined
|
||||
v-model.number="platformModel.refStationIndex"
|
||||
type="number"
|
||||
@blur="onUpdate"
|
||||
label="对应车站索引"
|
||||
/>
|
||||
<q-select
|
||||
outlined
|
||||
@blur="onUpdate"
|
||||
|
@ -12,7 +12,7 @@
|
||||
v-model.number="sectionLinkModel.index"
|
||||
type="number"
|
||||
@blur="onUpdate"
|
||||
label="编号"
|
||||
label="索引"
|
||||
/>
|
||||
<q-checkbox
|
||||
v-model="sectionLinkModel.up"
|
||||
|
@ -7,6 +7,13 @@
|
||||
@blur="onUpdate"
|
||||
label="编号"
|
||||
/>
|
||||
<q-input
|
||||
outlined
|
||||
v-model.number="signalModel.index"
|
||||
type="number"
|
||||
@blur="onUpdate"
|
||||
label="索引"
|
||||
/>
|
||||
<q-select
|
||||
outlined
|
||||
style="margin-top: 10px"
|
||||
|
@ -10,6 +10,13 @@
|
||||
lazy-rules
|
||||
autogrow
|
||||
/>
|
||||
<q-input
|
||||
outlined
|
||||
v-model.number="stationModel.index"
|
||||
type="number"
|
||||
@blur="onUpdate"
|
||||
label="索引"
|
||||
/>
|
||||
<q-select
|
||||
outlined
|
||||
style="margin-top: 10px"
|
||||
|
@ -7,6 +7,13 @@
|
||||
@blur="onUpdate"
|
||||
label="编号"
|
||||
/>
|
||||
<q-input
|
||||
outlined
|
||||
v-model.number="turnoutModel.index"
|
||||
type="number"
|
||||
@blur="onUpdate"
|
||||
label="索引"
|
||||
/>
|
||||
<q-select
|
||||
outlined
|
||||
style="margin-top: 10px"
|
||||
|
@ -1,96 +0,0 @@
|
||||
<template>
|
||||
<q-form>
|
||||
<q-input
|
||||
outlined
|
||||
v-model.number="template.lineWidth"
|
||||
type="number"
|
||||
@blur="onUpdate"
|
||||
label="线宽 *"
|
||||
lazy-rules
|
||||
:rules="[(val) => (val && val > 0) || '线宽必须大于0']"
|
||||
/>
|
||||
|
||||
<q-input
|
||||
outlined
|
||||
v-model="template.lineColor"
|
||||
@blur="onUpdate"
|
||||
label="线色 *"
|
||||
lazy-rules
|
||||
:rules="[(val) => (val && val.length > 0) || '线色不能为空']"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="colorize" class="cursor-pointer">
|
||||
<q-popup-proxy cover transition-show="scale" transition-hide="scale">
|
||||
<q-color
|
||||
v-model="template.lineColor"
|
||||
@change="
|
||||
(val) => {
|
||||
template.lineColor = val;
|
||||
onUpdate();
|
||||
}
|
||||
"
|
||||
/>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-btn-toggle
|
||||
v-model="template.curve"
|
||||
@update:model-value="onUpdate"
|
||||
:options="[
|
||||
{ label: '直线', value: false },
|
||||
{ label: '曲线', value: true },
|
||||
]"
|
||||
/>
|
||||
|
||||
<q-input
|
||||
v-if="template.curve"
|
||||
outlined
|
||||
v-model.number="template.segmentsCount"
|
||||
type="number"
|
||||
@blur="onUpdate"
|
||||
label="曲线分段数量 *"
|
||||
lazy-rules
|
||||
:rules="[(val) => (val && val > 0) || '曲线分段数量必须大于0']"
|
||||
/>
|
||||
</q-form>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { LinkTemplate } from 'src/graphics/link/Link';
|
||||
import { useDrawStore } from 'src/stores/draw-store';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
|
||||
const drawStore = useDrawStore();
|
||||
const template = reactive({
|
||||
lineWidth: 1,
|
||||
lineColor: '#0000ff',
|
||||
curve: false,
|
||||
segmentsCount: 10,
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
const type = drawStore.drawGraphicType;
|
||||
if (type) {
|
||||
const gt = drawStore.drawGraphicTemplate;
|
||||
if (gt) {
|
||||
const lt = gt as LinkTemplate;
|
||||
template.lineWidth = lt.lineWidth;
|
||||
template.lineColor = lt.lineColor;
|
||||
template.curve = lt.curve;
|
||||
template.segmentsCount = lt.segmentsCount;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function onUpdate() {
|
||||
const gt = drawStore.drawGraphicTemplate as LinkTemplate;
|
||||
if (gt) {
|
||||
gt.lineWidth = template.lineWidth;
|
||||
gt.lineColor = template.lineColor;
|
||||
gt.curve = template.curve;
|
||||
gt.segmentsCount = template.segmentsCount;
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,182 +0,0 @@
|
||||
import * as pb_1 from 'google-protobuf';
|
||||
import { IPointData, DisplayObject, FederatedMouseEvent } from 'pixi.js';
|
||||
import { ILinkData, Link } from 'src/graphics/link/Link';
|
||||
import { graphicData } from 'src/protos/stationLayoutGraphics';
|
||||
import { GraphicDataBase } from './GraphicDataBase';
|
||||
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
|
||||
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
|
||||
import {
|
||||
GraphicApp,
|
||||
GraphicInteractionPlugin,
|
||||
JlGraphic,
|
||||
} from 'src/jl-graphic';
|
||||
import {
|
||||
addWayPoint,
|
||||
clearWayPoint,
|
||||
getWaypointRangeIndex,
|
||||
PolylineEditPlugin,
|
||||
removeLineWayPoint,
|
||||
} from 'src/jl-graphic/plugins/GraphicEditPlugin';
|
||||
|
||||
export class LinkData extends GraphicDataBase implements ILinkData {
|
||||
constructor(data?: graphicData.Link) {
|
||||
let link;
|
||||
if (!data) {
|
||||
link = new graphicData.Link({
|
||||
common: GraphicDataBase.defaultCommonInfo(Link.Type),
|
||||
});
|
||||
} else {
|
||||
link = data;
|
||||
}
|
||||
super(link);
|
||||
}
|
||||
|
||||
public get data(): graphicData.Link {
|
||||
return this.getData<graphicData.Link>();
|
||||
}
|
||||
|
||||
get code(): string {
|
||||
return this.data.code;
|
||||
}
|
||||
set code(v: string) {
|
||||
this.data.code = v;
|
||||
}
|
||||
get curve(): boolean {
|
||||
return this.data.curve;
|
||||
}
|
||||
set curve(v: boolean) {
|
||||
this.data.curve = v;
|
||||
}
|
||||
get curveNumber(): number {
|
||||
return this.data.curve ? 1 : 0;
|
||||
}
|
||||
set curveNumber(v: number) {
|
||||
this.data.curve = v === 0 ? false : true;
|
||||
}
|
||||
get segmentsCount(): number {
|
||||
return this.data.segmentsCount;
|
||||
}
|
||||
set segmentsCount(v: number) {
|
||||
this.data.segmentsCount = v;
|
||||
}
|
||||
get points(): IPointData[] {
|
||||
return this.data.points;
|
||||
}
|
||||
set points(points: IPointData[]) {
|
||||
this.data.points = points.map(
|
||||
(p) => new graphicData.Point({ x: p.x, y: p.y })
|
||||
);
|
||||
}
|
||||
get lineWidth(): number {
|
||||
return this.data.lineWidth;
|
||||
}
|
||||
set lineWidth(v: number) {
|
||||
this.data.lineWidth = v;
|
||||
}
|
||||
get lineColor(): string {
|
||||
return this.data.lineColor;
|
||||
}
|
||||
set lineColor(v: string) {
|
||||
this.data.lineColor = v;
|
||||
}
|
||||
clone(): LinkData {
|
||||
return new LinkData(this.data.cloneMessage());
|
||||
}
|
||||
copyFrom(data: LinkData): void {
|
||||
pb_1.Message.copyInto(data.data, this.data);
|
||||
}
|
||||
eq(other: LinkData): boolean {
|
||||
return pb_1.Message.equals(this.data, other.data);
|
||||
}
|
||||
}
|
||||
|
||||
export const addWaypointConfig: MenuItemOptions = {
|
||||
name: '添加路径点',
|
||||
};
|
||||
export const removeWaypointConfig: MenuItemOptions = {
|
||||
name: '移除路径点',
|
||||
};
|
||||
export const clearWaypointsConfig: MenuItemOptions = {
|
||||
name: '清除所有路径点',
|
||||
};
|
||||
|
||||
const LinkEditMenu: ContextMenu = ContextMenu.init({
|
||||
name: '轨道编辑菜单',
|
||||
groups: [
|
||||
{
|
||||
items: [addWaypointConfig, clearWaypointsConfig],
|
||||
},
|
||||
],
|
||||
});
|
||||
const EpEditMenu: ContextMenu = ContextMenu.init({
|
||||
name: '轨道编辑菜单2',
|
||||
groups: [
|
||||
{
|
||||
items: [removeWaypointConfig, clearWaypointsConfig],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
export class DrawLinkPlugin extends GraphicInteractionPlugin<Link> {
|
||||
static Name = 'link_draw_right_menu';
|
||||
constructor(app: GraphicApp) {
|
||||
super(DrawLinkPlugin.Name, app);
|
||||
app.registerMenu(LinkEditMenu);
|
||||
app.registerMenu(EpEditMenu);
|
||||
}
|
||||
static init(app: GraphicApp) {
|
||||
return new DrawLinkPlugin(app);
|
||||
}
|
||||
filter(...grahpics: JlGraphic[]): Link[] | undefined {
|
||||
return grahpics.filter((g) => g.type === Link.Type).map((g) => g as Link);
|
||||
}
|
||||
bind(g: Link): void {
|
||||
g.on('_rightclick', this.onContextMenu, this);
|
||||
g.on('selected', this.onSelected, this);
|
||||
}
|
||||
|
||||
unbind(g: Link): void {
|
||||
g.off('_rightclick', this.onContextMenu, this);
|
||||
g.off('selected', this.onSelected, this);
|
||||
}
|
||||
|
||||
onSelected(g: DisplayObject) {
|
||||
const polylineEditPlugin = g.assistantAppendMap.get(
|
||||
PolylineEditPlugin.Name
|
||||
) as PolylineEditPlugin;
|
||||
const link = g.getGraphic() as Link;
|
||||
polylineEditPlugin.editedPoints.forEach((ep, index) => {
|
||||
ep.on('rightclick', (e: FederatedMouseEvent) => {
|
||||
this.app.registerMenu(EpEditMenu);
|
||||
removeWaypointConfig.handler = () => {
|
||||
removeLineWayPoint(link, index);
|
||||
};
|
||||
clearWaypointsConfig.handler = () => {
|
||||
clearWayPoint(link, false);
|
||||
};
|
||||
EpEditMenu.open(e.global);
|
||||
});
|
||||
});
|
||||
}
|
||||
onContextMenu(e: FederatedMouseEvent) {
|
||||
const target = e.target as DisplayObject;
|
||||
const link = target.getGraphic() as Link;
|
||||
this.app.updateSelected(link);
|
||||
|
||||
addWaypointConfig.handler = () => {
|
||||
const linePoints = link.linePoints;
|
||||
const p = link.screenToLocalPoint(e.global);
|
||||
const { start, end } = getWaypointRangeIndex(
|
||||
linePoints,
|
||||
false,
|
||||
p,
|
||||
link.datas.lineWidth
|
||||
);
|
||||
addWayPoint(link, false, start, end, p);
|
||||
};
|
||||
clearWaypointsConfig.handler = () => {
|
||||
clearWayPoint(link, false);
|
||||
};
|
||||
LinkEditMenu.open(e.global);
|
||||
}
|
||||
}
|
@ -51,6 +51,18 @@ export class PlatformData extends GraphicDataBase implements IPlatformData {
|
||||
set direction(v: string) {
|
||||
this.data.direction = v;
|
||||
}
|
||||
get index(): number {
|
||||
return this.data.index;
|
||||
}
|
||||
set index(v: number) {
|
||||
this.data.index = v;
|
||||
}
|
||||
get refStationIndex(): number {
|
||||
return this.data.refStationIndex;
|
||||
}
|
||||
set refStationIndex(v: number) {
|
||||
this.data.refStationIndex = v;
|
||||
}
|
||||
|
||||
clone(): PlatformData {
|
||||
return new PlatformData(this.data.cloneMessage());
|
||||
|
@ -50,6 +50,12 @@ export class SignalData extends GraphicDataBase implements ISignalData {
|
||||
set kilometerSystem(v: KilometerSystem) {
|
||||
this.data.kilometerSystem = new graphicData.KilometerSystem(v);
|
||||
}
|
||||
get index(): number {
|
||||
return this.data.index;
|
||||
}
|
||||
set index(v: number) {
|
||||
this.data.index = v;
|
||||
}
|
||||
clone(): SignalData {
|
||||
return new SignalData(this.data.cloneMessage());
|
||||
}
|
||||
|
@ -57,6 +57,12 @@ export class StationData extends GraphicDataBase implements IStationData {
|
||||
set concentrationStations(v: boolean) {
|
||||
this.data.concentrationStations = v;
|
||||
}
|
||||
get index(): number {
|
||||
return this.data.index;
|
||||
}
|
||||
set index(v: number) {
|
||||
this.data.index = v;
|
||||
}
|
||||
clone(): StationData {
|
||||
return new StationData(this.data.cloneMessage());
|
||||
}
|
||||
|
@ -86,6 +86,12 @@ export class TurnoutData extends GraphicDataBase implements ITurnoutData {
|
||||
(v) => new graphicData.KilometerSystem(v)
|
||||
);
|
||||
}
|
||||
get index(): number {
|
||||
return this.data.index;
|
||||
}
|
||||
set index(v: number) {
|
||||
this.data.index = v;
|
||||
}
|
||||
clone(): TurnoutData {
|
||||
return new TurnoutData(this.data.cloneMessage());
|
||||
}
|
||||
|
@ -17,6 +17,10 @@ export interface IPlatformData extends GraphicData {
|
||||
set hasdoor(v: boolean);
|
||||
get direction(): string; // 屏蔽门上下
|
||||
set direction(v: string);
|
||||
get index(): number;
|
||||
set index(v: number);
|
||||
get refStationIndex(): number;
|
||||
set refStationIndex(v: number);
|
||||
clone(): IPlatformData;
|
||||
copyFrom(data: IPlatformData): void;
|
||||
eq(other: IPlatformData): boolean;
|
||||
|
@ -24,6 +24,8 @@ export interface ISignalData extends GraphicData {
|
||||
set mirror(v: boolean);
|
||||
get kilometerSystem(): KilometerSystem;
|
||||
set kilometerSystem(v: KilometerSystem);
|
||||
get index(): number;
|
||||
set index(v: number);
|
||||
clone(): ISignalData;
|
||||
copyFrom(data: ISignalData): void;
|
||||
eq(other: ISignalData): boolean;
|
||||
|
@ -17,6 +17,8 @@ export interface IStationData extends GraphicData {
|
||||
set hasControl(v: boolean);
|
||||
get concentrationStations(): boolean; ////是否集中站
|
||||
set concentrationStations(v: boolean);
|
||||
get index(): number;
|
||||
set index(v: number);
|
||||
clone(): IStationData;
|
||||
copyFrom(data: IStationData): void;
|
||||
eq(other: IStationData): boolean;
|
||||
|
@ -35,6 +35,8 @@ export interface ITurnoutData extends GraphicData {
|
||||
set pcRef(ref: IRelatedRefData | undefined);
|
||||
get kilometerSystem(): KilometerSystem[];
|
||||
set kilometerSystem(v: KilometerSystem[]);
|
||||
get index(): number;
|
||||
set index(v: number);
|
||||
clone(): ITurnoutData;
|
||||
copyFrom(data: ITurnoutData): void;
|
||||
eq(other: ITurnoutData): boolean;
|
||||
|
@ -941,6 +941,8 @@ export namespace graphicData {
|
||||
code?: string;
|
||||
hasdoor?: boolean;
|
||||
direction?: string;
|
||||
index?: number;
|
||||
refStationIndex?: number;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
@ -957,6 +959,12 @@ export namespace graphicData {
|
||||
if ("direction" in data && data.direction != undefined) {
|
||||
this.direction = data.direction;
|
||||
}
|
||||
if ("index" in data && data.index != undefined) {
|
||||
this.index = data.index;
|
||||
}
|
||||
if ("refStationIndex" in data && data.refStationIndex != undefined) {
|
||||
this.refStationIndex = data.refStationIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
@ -986,11 +994,25 @@ export namespace graphicData {
|
||||
set direction(value: string) {
|
||||
pb_1.Message.setField(this, 4, value);
|
||||
}
|
||||
get index() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 5, 0) as number;
|
||||
}
|
||||
set index(value: number) {
|
||||
pb_1.Message.setField(this, 5, value);
|
||||
}
|
||||
get refStationIndex() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 6, 0) as number;
|
||||
}
|
||||
set refStationIndex(value: number) {
|
||||
pb_1.Message.setField(this, 6, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
hasdoor?: boolean;
|
||||
direction?: string;
|
||||
index?: number;
|
||||
refStationIndex?: number;
|
||||
}): Platform {
|
||||
const message = new Platform({});
|
||||
if (data.common != null) {
|
||||
@ -1005,6 +1027,12 @@ export namespace graphicData {
|
||||
if (data.direction != null) {
|
||||
message.direction = data.direction;
|
||||
}
|
||||
if (data.index != null) {
|
||||
message.index = data.index;
|
||||
}
|
||||
if (data.refStationIndex != null) {
|
||||
message.refStationIndex = data.refStationIndex;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -1013,6 +1041,8 @@ export namespace graphicData {
|
||||
code?: string;
|
||||
hasdoor?: boolean;
|
||||
direction?: string;
|
||||
index?: number;
|
||||
refStationIndex?: number;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
@ -1026,6 +1056,12 @@ export namespace graphicData {
|
||||
if (this.direction != null) {
|
||||
data.direction = this.direction;
|
||||
}
|
||||
if (this.index != null) {
|
||||
data.index = this.index;
|
||||
}
|
||||
if (this.refStationIndex != null) {
|
||||
data.refStationIndex = this.refStationIndex;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -1040,6 +1076,10 @@ export namespace graphicData {
|
||||
writer.writeBool(3, this.hasdoor);
|
||||
if (this.direction.length)
|
||||
writer.writeString(4, this.direction);
|
||||
if (this.index != 0)
|
||||
writer.writeInt32(5, this.index);
|
||||
if (this.refStationIndex != 0)
|
||||
writer.writeInt32(6, this.refStationIndex);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -1061,6 +1101,12 @@ export namespace graphicData {
|
||||
case 4:
|
||||
message.direction = reader.readString();
|
||||
break;
|
||||
case 5:
|
||||
message.index = reader.readInt32();
|
||||
break;
|
||||
case 6:
|
||||
message.refStationIndex = reader.readInt32();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
@ -1081,6 +1127,7 @@ export namespace graphicData {
|
||||
hasControl?: boolean;
|
||||
concentrationStations?: boolean;
|
||||
kilometerSystem?: KilometerSystem;
|
||||
index?: number;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
@ -1100,6 +1147,9 @@ export namespace graphicData {
|
||||
if ("kilometerSystem" in data && data.kilometerSystem != undefined) {
|
||||
this.kilometerSystem = data.kilometerSystem;
|
||||
}
|
||||
if ("index" in data && data.index != undefined) {
|
||||
this.index = data.index;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
@ -1138,12 +1188,19 @@ export namespace graphicData {
|
||||
get has_kilometerSystem() {
|
||||
return pb_1.Message.getField(this, 6) != null;
|
||||
}
|
||||
get index() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 7, 0) as number;
|
||||
}
|
||||
set index(value: number) {
|
||||
pb_1.Message.setField(this, 7, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
hasControl?: boolean;
|
||||
concentrationStations?: boolean;
|
||||
kilometerSystem?: ReturnType<typeof KilometerSystem.prototype.toObject>;
|
||||
index?: number;
|
||||
}): Station {
|
||||
const message = new Station({});
|
||||
if (data.common != null) {
|
||||
@ -1161,6 +1218,9 @@ export namespace graphicData {
|
||||
if (data.kilometerSystem != null) {
|
||||
message.kilometerSystem = KilometerSystem.fromObject(data.kilometerSystem);
|
||||
}
|
||||
if (data.index != null) {
|
||||
message.index = data.index;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -1170,6 +1230,7 @@ export namespace graphicData {
|
||||
hasControl?: boolean;
|
||||
concentrationStations?: boolean;
|
||||
kilometerSystem?: ReturnType<typeof KilometerSystem.prototype.toObject>;
|
||||
index?: number;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
@ -1186,6 +1247,9 @@ export namespace graphicData {
|
||||
if (this.kilometerSystem != null) {
|
||||
data.kilometerSystem = this.kilometerSystem.toObject();
|
||||
}
|
||||
if (this.index != null) {
|
||||
data.index = this.index;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -1202,6 +1266,8 @@ export namespace graphicData {
|
||||
writer.writeBool(4, this.concentrationStations);
|
||||
if (this.has_kilometerSystem)
|
||||
writer.writeMessage(6, this.kilometerSystem, () => this.kilometerSystem.serialize(writer));
|
||||
if (this.index != 0)
|
||||
writer.writeInt32(7, this.index);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -1226,6 +1292,9 @@ export namespace graphicData {
|
||||
case 6:
|
||||
reader.readMessage(message.kilometerSystem, () => message.kilometerSystem = KilometerSystem.deserialize(reader));
|
||||
break;
|
||||
case 7:
|
||||
message.index = reader.readInt32();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
@ -1531,6 +1600,7 @@ export namespace graphicData {
|
||||
pbRef?: RelatedRef;
|
||||
pcRef?: RelatedRef;
|
||||
kilometerSystem?: KilometerSystem[];
|
||||
index?: number;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6, 7, 8, 13], this.#one_of_decls);
|
||||
@ -1562,6 +1632,9 @@ export namespace graphicData {
|
||||
if ("kilometerSystem" in data && data.kilometerSystem != undefined) {
|
||||
this.kilometerSystem = data.kilometerSystem;
|
||||
}
|
||||
if ("index" in data && data.index != undefined) {
|
||||
this.index = data.index;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
@ -1630,6 +1703,12 @@ export namespace graphicData {
|
||||
set kilometerSystem(value: KilometerSystem[]) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 13, value);
|
||||
}
|
||||
get index() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 14, 0) as number;
|
||||
}
|
||||
set index(value: number) {
|
||||
pb_1.Message.setField(this, 14, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
@ -1640,6 +1719,7 @@ export namespace graphicData {
|
||||
pbRef?: ReturnType<typeof RelatedRef.prototype.toObject>;
|
||||
pcRef?: ReturnType<typeof RelatedRef.prototype.toObject>;
|
||||
kilometerSystem?: ReturnType<typeof KilometerSystem.prototype.toObject>[];
|
||||
index?: number;
|
||||
}): Turnout {
|
||||
const message = new Turnout({});
|
||||
if (data.common != null) {
|
||||
@ -1669,6 +1749,9 @@ export namespace graphicData {
|
||||
if (data.kilometerSystem != null) {
|
||||
message.kilometerSystem = data.kilometerSystem.map(item => KilometerSystem.fromObject(item));
|
||||
}
|
||||
if (data.index != null) {
|
||||
message.index = data.index;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -1682,6 +1765,7 @@ export namespace graphicData {
|
||||
pbRef?: ReturnType<typeof RelatedRef.prototype.toObject>;
|
||||
pcRef?: ReturnType<typeof RelatedRef.prototype.toObject>;
|
||||
kilometerSystem?: ReturnType<typeof KilometerSystem.prototype.toObject>[];
|
||||
index?: number;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
@ -1710,6 +1794,9 @@ export namespace graphicData {
|
||||
if (this.kilometerSystem != null) {
|
||||
data.kilometerSystem = this.kilometerSystem.map((item: KilometerSystem) => item.toObject());
|
||||
}
|
||||
if (this.index != null) {
|
||||
data.index = this.index;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -1734,6 +1821,8 @@ export namespace graphicData {
|
||||
writer.writeMessage(11, this.pcRef, () => this.pcRef.serialize(writer));
|
||||
if (this.kilometerSystem.length)
|
||||
writer.writeRepeatedMessage(13, this.kilometerSystem, (item: KilometerSystem) => item.serialize(writer));
|
||||
if (this.index != 0)
|
||||
writer.writeInt32(14, this.index);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -1770,6 +1859,9 @@ export namespace graphicData {
|
||||
case 13:
|
||||
reader.readMessage(message.kilometerSystem, () => pb_1.Message.addToRepeatedWrapperField(message, 13, KilometerSystem.deserialize(reader), KilometerSystem));
|
||||
break;
|
||||
case 14:
|
||||
message.index = reader.readInt32();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
@ -1879,6 +1971,7 @@ export namespace graphicData {
|
||||
code?: string;
|
||||
mirror?: boolean;
|
||||
kilometerSystem?: KilometerSystem;
|
||||
index?: number;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
@ -1895,6 +1988,9 @@ export namespace graphicData {
|
||||
if ("kilometerSystem" in data && data.kilometerSystem != undefined) {
|
||||
this.kilometerSystem = data.kilometerSystem;
|
||||
}
|
||||
if ("index" in data && data.index != undefined) {
|
||||
this.index = data.index;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
@ -1927,11 +2023,18 @@ export namespace graphicData {
|
||||
get has_kilometerSystem() {
|
||||
return pb_1.Message.getField(this, 6) != null;
|
||||
}
|
||||
get index() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 7, 0) as number;
|
||||
}
|
||||
set index(value: number) {
|
||||
pb_1.Message.setField(this, 7, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
mirror?: boolean;
|
||||
kilometerSystem?: ReturnType<typeof KilometerSystem.prototype.toObject>;
|
||||
index?: number;
|
||||
}): Signal {
|
||||
const message = new Signal({});
|
||||
if (data.common != null) {
|
||||
@ -1946,6 +2049,9 @@ export namespace graphicData {
|
||||
if (data.kilometerSystem != null) {
|
||||
message.kilometerSystem = KilometerSystem.fromObject(data.kilometerSystem);
|
||||
}
|
||||
if (data.index != null) {
|
||||
message.index = data.index;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -1954,6 +2060,7 @@ export namespace graphicData {
|
||||
code?: string;
|
||||
mirror?: boolean;
|
||||
kilometerSystem?: ReturnType<typeof KilometerSystem.prototype.toObject>;
|
||||
index?: number;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
@ -1967,6 +2074,9 @@ export namespace graphicData {
|
||||
if (this.kilometerSystem != null) {
|
||||
data.kilometerSystem = this.kilometerSystem.toObject();
|
||||
}
|
||||
if (this.index != null) {
|
||||
data.index = this.index;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -1981,6 +2091,8 @@ export namespace graphicData {
|
||||
writer.writeBool(3, this.mirror);
|
||||
if (this.has_kilometerSystem)
|
||||
writer.writeMessage(6, this.kilometerSystem, () => this.kilometerSystem.serialize(writer));
|
||||
if (this.index != 0)
|
||||
writer.writeInt32(7, this.index);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -2002,6 +2114,9 @@ export namespace graphicData {
|
||||
case 6:
|
||||
reader.readMessage(message.kilometerSystem, () => message.kilometerSystem = KilometerSystem.deserialize(reader));
|
||||
break;
|
||||
case 7:
|
||||
message.index = reader.readInt32();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user