运行线增加虚线部位

This commit is contained in:
fan 2023-07-20 15:51:41 +08:00
parent 346303f33e
commit 31459c06b4
7 changed files with 451 additions and 50 deletions

View File

@ -0,0 +1,64 @@
<!-- eslint-disable vue/no-mutating-props -->
<template>
<q-dialog ref="dialogRef" style="width 800px;">
<q-card
style="max-width: 900px"
:style="{ width: `${80 * props.runLinePoints.length}px` }"
>
<q-card-section> <div class="text-h6">划定端点</div> </q-card-section>
<q-card-section class="q-pt-none">
<q-range
class="q-mt-xl"
v-model="model"
color="purple"
style="padding: 0px 30px; font-size: 10px"
markers
:marker-labels="objMarkerLabel"
:min="0"
:max="props.runLinePoints.length - 1"
/>
</q-card-section>
<q-card-actions align="right" class="text-primary">
<q-btn flat label="取消" @click="onDialogCancel" v-close-popup />
<q-btn flat label="确认" @click="onDialogOK(model)" v-close-popup />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script setup lang="ts">
import { IPointData } from 'pixi.js';
import { useDialogPluginComponent } from 'quasar';
import { ref, onMounted } from 'vue';
const props = defineProps({
runLinePoints: {
type: Array<IPointData>,
required: true,
},
dashPointIndexs: {
type: Array<number>,
required: true,
},
});
const objMarkerLabel = (val: number) =>
`P${val}[${props.runLinePoints[val].x},${props.runLinePoints[val].y}]`;
const model = ref({
min: 0,
max: 0,
});
onMounted(() => {
if (props.dashPointIndexs.length) {
model.value = {
min: props.dashPointIndexs[0],
max: props.dashPointIndexs[props.dashPointIndexs.length - 1],
};
}
});
defineEmits([...useDialogPluginComponent.emits]);
const { dialogRef, onDialogOK, onDialogCancel } = useDialogPluginComponent();
</script>
<style scoped></style>

View File

@ -22,6 +22,8 @@ import {
removeLineWayPoint,
} from 'src/jl-graphic/plugins/GraphicEditPlugin';
import { RunLineGraphicHitArea } from 'src/graphics/runLine/RunLineDrawAssistant';
import { Dialog } from 'quasar';
import SetDashLineDialog from '../../components/draw-app/dialogs/SetDashLineDialog.vue';
export class RunLineData extends GraphicDataBase implements IRunLineData {
constructor(data?: graphicData.RunLine) {
@ -82,6 +84,12 @@ export class RunLineData extends GraphicDataBase implements IRunLineData {
set lineId(v: string) {
this.data.lineId = v;
}
get dashPointIndexs(): number[] {
return this.data.dashPointIndexs;
}
set dashPointIndexs(v: number[]) {
this.data.dashPointIndexs = v;
}
clone(): RunLineData {
return new RunLineData(this.data.cloneMessage());
}
@ -102,12 +110,15 @@ export const removeWaypointConfig: MenuItemOptions = {
export const clearWaypointsConfig: MenuItemOptions = {
name: '清除所有路径点',
};
export const setDashLineConfig: MenuItemOptions = {
name: '设置虚线段',
};
const RunLineEditMenu: ContextMenu = ContextMenu.init({
name: '运行线编辑菜单',
groups: [
{
items: [addWaypointConfig, clearWaypointsConfig],
items: [addWaypointConfig, clearWaypointsConfig, setDashLineConfig],
},
],
});
@ -182,6 +193,28 @@ export class DrawRunLinePlugin extends GraphicInteractionPlugin<RunLine> {
clearWaypointsConfig.handler = () => {
clearWayPoint(runLine, false);
};
setDashLineConfig.handler = () => {
Dialog.create({
title: '创建列车',
message: '',
component: SetDashLineDialog,
componentProps: {
runLinePoints: runLine.datas.points,
dashPointIndexs: runLine.datas.dashPointIndexs,
},
cancel: true,
persistent: true,
}).onOk((data: { min: number; max: number }) => {
const indexList = [];
if (data.min !== data.max) {
for (let i = data.min; i <= data.max; i++) {
indexList.push(i);
}
}
runLine.datas.dashPointIndexs = indexList;
runLine.doRepaint();
});
};
RunLineEditMenu.open(e.global);
}
}

View File

@ -7,6 +7,7 @@ import {
movePointAlongNormal,
getIntersectionPoint,
distance,
DashedLine,
} from 'src/jl-graphic';
import { RunLineName } from './RunLineName';
import { PathLine } from '../pathLine/PathLine';
@ -30,6 +31,8 @@ export interface IRunLineData extends GraphicData {
set linkPathLines(v: string[]);
get lineId(): string;
set lineId(v: string);
get dashPointIndexs(): number[];
set dashPointIndexs(v: number[]);
clone(): IRunLineData;
copyFrom(data: IRunLineData): void;
@ -65,7 +68,12 @@ export class RunLine extends JlGraphic {
get datas(): IRunLineData {
return this.getDatas<IRunLineData>();
}
getUnitVector(p1: IPointData, p2: IPointData) {
const dx = p2.x - p1.x;
const dy = p2.y - p1.y;
const length = Math.sqrt(dx * dx + dy * dy);
return [dx / length, dy / length];
}
doRepaint(): void {
if (this.datas.points.length < 2) {
throw new Error('RunLine坐标数据异常');
@ -83,6 +91,26 @@ export class RunLine extends JlGraphic {
this.lineBody.lineTo(p.x, p.y);
}
const bgColor = '0X' + this.getCanvas().backgroundColor.substring(1);
const dashPoints: IPointData[] = [];
this.datas.dashPointIndexs.forEach((i) => {
dashPoints.push(this.datas.points[i]);
});
if (this.children.length > 3) {
this.removeChildren(3);
}
for (let i = 0; i < dashPoints.length - 1; i++) {
const lineMask = new DashedLine(dashPoints[i], dashPoints[i + 1], {
length: 4,
startSpace: 4,
space: 11,
lineWidth: runLineConsts.runLineWidth,
color: bgColor,
});
lineMask.pivot.set(0, 0);
this.addChild(lineMask);
}
this.leftRunLineName.paint(
this.getStartPoint().x - runLineConsts.nameOffsetX,
this.getStartPoint().y,

View File

@ -11,13 +11,13 @@ export namespace state {
constructor(data?: any[] | {
id?: string;
code?: string;
type?: dependency_1.graphicData.Section.SectionType;
children?: Section[];
childrenId?: string[];
kilometerSystem?: dependency_1.graphicData.KilometerSystem[];
convertKilometer?: number[];
physicalSectionId?: string;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 5, 7], this.#one_of_decls);
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 4, 5], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("id" in data && data.id != undefined) {
this.id = data.id;
@ -25,11 +25,8 @@ export namespace state {
if ("code" in data && data.code != undefined) {
this.code = data.code;
}
if ("type" in data && data.type != undefined) {
this.type = data.type;
}
if ("children" in data && data.children != undefined) {
this.children = data.children;
if ("childrenId" in data && data.childrenId != undefined) {
this.childrenId = data.childrenId;
}
if ("kilometerSystem" in data && data.kilometerSystem != undefined) {
this.kilometerSystem = data.kilometerSystem;
@ -37,6 +34,9 @@ export namespace state {
if ("convertKilometer" in data && data.convertKilometer != undefined) {
this.convertKilometer = data.convertKilometer;
}
if ("physicalSectionId" in data && data.physicalSectionId != undefined) {
this.physicalSectionId = data.physicalSectionId;
}
}
}
get id() {
@ -51,37 +51,37 @@ export namespace state {
set code(value: string) {
pb_1.Message.setField(this, 2, value);
}
get type() {
return pb_1.Message.getFieldWithDefault(this, 3, dependency_1.graphicData.Section.SectionType.Physical) as dependency_1.graphicData.Section.SectionType;
get childrenId() {
return pb_1.Message.getFieldWithDefault(this, 3, []) as string[];
}
set type(value: dependency_1.graphicData.Section.SectionType) {
set childrenId(value: string[]) {
pb_1.Message.setField(this, 3, value);
}
get children() {
return pb_1.Message.getRepeatedWrapperField(this, Section, 4) as Section[];
}
set children(value: Section[]) {
pb_1.Message.setRepeatedWrapperField(this, 4, value);
}
get kilometerSystem() {
return pb_1.Message.getRepeatedWrapperField(this, dependency_1.graphicData.KilometerSystem, 5) as dependency_1.graphicData.KilometerSystem[];
return pb_1.Message.getRepeatedWrapperField(this, dependency_1.graphicData.KilometerSystem, 4) as dependency_1.graphicData.KilometerSystem[];
}
set kilometerSystem(value: dependency_1.graphicData.KilometerSystem[]) {
pb_1.Message.setRepeatedWrapperField(this, 5, value);
pb_1.Message.setRepeatedWrapperField(this, 4, value);
}
get convertKilometer() {
return pb_1.Message.getFieldWithDefault(this, 7, []) as number[];
return pb_1.Message.getFieldWithDefault(this, 5, []) as number[];
}
set convertKilometer(value: number[]) {
pb_1.Message.setField(this, 7, value);
pb_1.Message.setField(this, 5, value);
}
get physicalSectionId() {
return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
}
set physicalSectionId(value: string) {
pb_1.Message.setField(this, 6, value);
}
static fromObject(data: {
id?: string;
code?: string;
type?: dependency_1.graphicData.Section.SectionType;
children?: ReturnType<typeof Section.prototype.toObject>[];
childrenId?: string[];
kilometerSystem?: ReturnType<typeof dependency_1.graphicData.KilometerSystem.prototype.toObject>[];
convertKilometer?: number[];
physicalSectionId?: string;
}): Section {
const message = new Section({});
if (data.id != null) {
@ -90,11 +90,8 @@ export namespace state {
if (data.code != null) {
message.code = data.code;
}
if (data.type != null) {
message.type = data.type;
}
if (data.children != null) {
message.children = data.children.map(item => Section.fromObject(item));
if (data.childrenId != null) {
message.childrenId = data.childrenId;
}
if (data.kilometerSystem != null) {
message.kilometerSystem = data.kilometerSystem.map(item => dependency_1.graphicData.KilometerSystem.fromObject(item));
@ -102,16 +99,19 @@ export namespace state {
if (data.convertKilometer != null) {
message.convertKilometer = data.convertKilometer;
}
if (data.physicalSectionId != null) {
message.physicalSectionId = data.physicalSectionId;
}
return message;
}
toObject() {
const data: {
id?: string;
code?: string;
type?: dependency_1.graphicData.Section.SectionType;
children?: ReturnType<typeof Section.prototype.toObject>[];
childrenId?: string[];
kilometerSystem?: ReturnType<typeof dependency_1.graphicData.KilometerSystem.prototype.toObject>[];
convertKilometer?: number[];
physicalSectionId?: string;
} = {};
if (this.id != null) {
data.id = this.id;
@ -119,11 +119,8 @@ export namespace state {
if (this.code != null) {
data.code = this.code;
}
if (this.type != null) {
data.type = this.type;
}
if (this.children != null) {
data.children = this.children.map((item: Section) => item.toObject());
if (this.childrenId != null) {
data.childrenId = this.childrenId;
}
if (this.kilometerSystem != null) {
data.kilometerSystem = this.kilometerSystem.map((item: dependency_1.graphicData.KilometerSystem) => item.toObject());
@ -131,6 +128,9 @@ export namespace state {
if (this.convertKilometer != null) {
data.convertKilometer = this.convertKilometer;
}
if (this.physicalSectionId != null) {
data.physicalSectionId = this.physicalSectionId;
}
return data;
}
serialize(): Uint8Array;
@ -141,14 +141,14 @@ export namespace state {
writer.writeString(1, this.id);
if (this.code.length)
writer.writeString(2, this.code);
if (this.type != dependency_1.graphicData.Section.SectionType.Physical)
writer.writeEnum(3, this.type);
if (this.children.length)
writer.writeRepeatedMessage(4, this.children, (item: Section) => item.serialize(writer));
if (this.childrenId.length)
writer.writeRepeatedString(3, this.childrenId);
if (this.kilometerSystem.length)
writer.writeRepeatedMessage(5, this.kilometerSystem, (item: dependency_1.graphicData.KilometerSystem) => item.serialize(writer));
writer.writeRepeatedMessage(4, this.kilometerSystem, (item: dependency_1.graphicData.KilometerSystem) => item.serialize(writer));
if (this.convertKilometer.length)
writer.writePackedInt64(7, this.convertKilometer);
writer.writePackedInt64(5, this.convertKilometer);
if (this.physicalSectionId.length)
writer.writeString(6, this.physicalSectionId);
if (!w)
return writer.getResultBuffer();
}
@ -165,17 +165,17 @@ export namespace state {
message.code = reader.readString();
break;
case 3:
message.type = reader.readEnum();
pb_1.Message.addToRepeatedField(message, 3, reader.readString());
break;
case 4:
reader.readMessage(message.children, () => pb_1.Message.addToRepeatedWrapperField(message, 4, Section.deserialize(reader), Section));
reader.readMessage(message.kilometerSystem, () => pb_1.Message.addToRepeatedWrapperField(message, 4, dependency_1.graphicData.KilometerSystem.deserialize(reader), dependency_1.graphicData.KilometerSystem));
break;
case 5:
reader.readMessage(message.kilometerSystem, () => pb_1.Message.addToRepeatedWrapperField(message, 5, dependency_1.graphicData.KilometerSystem.deserialize(reader), dependency_1.graphicData.KilometerSystem));
break;
case 7:
message.convertKilometer = reader.readPackedInt64();
break;
case 6:
message.physicalSectionId = reader.readString();
break;
default: reader.skipField();
}
}

View File

@ -1540,6 +1540,14 @@ export namespace state {
ipSingleSwitchStusReverse?: boolean;
ipSingleSwitchStusBlocked1?: boolean;
ipSingleSwitchStusJammed?: boolean;
ipSingleSwitchStusExpectLock?: boolean;
ipSingleSwitchStusExpectUnlock?: boolean;
ipSingleSwitchStusExpectNormal?: boolean;
ipSingleSwitchStusExpectReverse?: boolean;
ipSingleSwitchStusExpectBlock?: boolean;
ipSingleSwitchStusExpectUnblock?: boolean;
ipSingleSwitchStusInRoute?: boolean;
ipSingleSwitchStusManualMode?: boolean;
ipSingleSwitchStusCut?: boolean;
ipSingleSwitchStusAtcInvalid?: boolean;
ipSingleSwitchStusOverlap?: boolean;
@ -1581,6 +1589,30 @@ export namespace state {
if ("ipSingleSwitchStusJammed" in data && data.ipSingleSwitchStusJammed != undefined) {
this.ipSingleSwitchStusJammed = data.ipSingleSwitchStusJammed;
}
if ("ipSingleSwitchStusExpectLock" in data && data.ipSingleSwitchStusExpectLock != undefined) {
this.ipSingleSwitchStusExpectLock = data.ipSingleSwitchStusExpectLock;
}
if ("ipSingleSwitchStusExpectUnlock" in data && data.ipSingleSwitchStusExpectUnlock != undefined) {
this.ipSingleSwitchStusExpectUnlock = data.ipSingleSwitchStusExpectUnlock;
}
if ("ipSingleSwitchStusExpectNormal" in data && data.ipSingleSwitchStusExpectNormal != undefined) {
this.ipSingleSwitchStusExpectNormal = data.ipSingleSwitchStusExpectNormal;
}
if ("ipSingleSwitchStusExpectReverse" in data && data.ipSingleSwitchStusExpectReverse != undefined) {
this.ipSingleSwitchStusExpectReverse = data.ipSingleSwitchStusExpectReverse;
}
if ("ipSingleSwitchStusExpectBlock" in data && data.ipSingleSwitchStusExpectBlock != undefined) {
this.ipSingleSwitchStusExpectBlock = data.ipSingleSwitchStusExpectBlock;
}
if ("ipSingleSwitchStusExpectUnblock" in data && data.ipSingleSwitchStusExpectUnblock != undefined) {
this.ipSingleSwitchStusExpectUnblock = data.ipSingleSwitchStusExpectUnblock;
}
if ("ipSingleSwitchStusInRoute" in data && data.ipSingleSwitchStusInRoute != undefined) {
this.ipSingleSwitchStusInRoute = data.ipSingleSwitchStusInRoute;
}
if ("ipSingleSwitchStusManualMode" in data && data.ipSingleSwitchStusManualMode != undefined) {
this.ipSingleSwitchStusManualMode = data.ipSingleSwitchStusManualMode;
}
if ("ipSingleSwitchStusCut" in data && data.ipSingleSwitchStusCut != undefined) {
this.ipSingleSwitchStusCut = data.ipSingleSwitchStusCut;
}
@ -1670,6 +1702,54 @@ export namespace state {
set ipSingleSwitchStusJammed(value: boolean) {
pb_1.Message.setField(this, 8, value);
}
get ipSingleSwitchStusExpectLock() {
return pb_1.Message.getFieldWithDefault(this, 9, false) as boolean;
}
set ipSingleSwitchStusExpectLock(value: boolean) {
pb_1.Message.setField(this, 9, value);
}
get ipSingleSwitchStusExpectUnlock() {
return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean;
}
set ipSingleSwitchStusExpectUnlock(value: boolean) {
pb_1.Message.setField(this, 10, value);
}
get ipSingleSwitchStusExpectNormal() {
return pb_1.Message.getFieldWithDefault(this, 11, false) as boolean;
}
set ipSingleSwitchStusExpectNormal(value: boolean) {
pb_1.Message.setField(this, 11, value);
}
get ipSingleSwitchStusExpectReverse() {
return pb_1.Message.getFieldWithDefault(this, 12, false) as boolean;
}
set ipSingleSwitchStusExpectReverse(value: boolean) {
pb_1.Message.setField(this, 12, value);
}
get ipSingleSwitchStusExpectBlock() {
return pb_1.Message.getFieldWithDefault(this, 13, false) as boolean;
}
set ipSingleSwitchStusExpectBlock(value: boolean) {
pb_1.Message.setField(this, 13, value);
}
get ipSingleSwitchStusExpectUnblock() {
return pb_1.Message.getFieldWithDefault(this, 14, false) as boolean;
}
set ipSingleSwitchStusExpectUnblock(value: boolean) {
pb_1.Message.setField(this, 14, value);
}
get ipSingleSwitchStusInRoute() {
return pb_1.Message.getFieldWithDefault(this, 15, false) as boolean;
}
set ipSingleSwitchStusInRoute(value: boolean) {
pb_1.Message.setField(this, 15, value);
}
get ipSingleSwitchStusManualMode() {
return pb_1.Message.getFieldWithDefault(this, 16, false) as boolean;
}
set ipSingleSwitchStusManualMode(value: boolean) {
pb_1.Message.setField(this, 16, value);
}
get ipSingleSwitchStusCut() {
return pb_1.Message.getFieldWithDefault(this, 17, false) as boolean;
}
@ -1757,6 +1837,14 @@ export namespace state {
ipSingleSwitchStusReverse?: boolean;
ipSingleSwitchStusBlocked1?: boolean;
ipSingleSwitchStusJammed?: boolean;
ipSingleSwitchStusExpectLock?: boolean;
ipSingleSwitchStusExpectUnlock?: boolean;
ipSingleSwitchStusExpectNormal?: boolean;
ipSingleSwitchStusExpectReverse?: boolean;
ipSingleSwitchStusExpectBlock?: boolean;
ipSingleSwitchStusExpectUnblock?: boolean;
ipSingleSwitchStusInRoute?: boolean;
ipSingleSwitchStusManualMode?: boolean;
ipSingleSwitchStusCut?: boolean;
ipSingleSwitchStusAtcInvalid?: boolean;
ipSingleSwitchStusOverlap?: boolean;
@ -1796,6 +1884,30 @@ export namespace state {
if (data.ipSingleSwitchStusJammed != null) {
message.ipSingleSwitchStusJammed = data.ipSingleSwitchStusJammed;
}
if (data.ipSingleSwitchStusExpectLock != null) {
message.ipSingleSwitchStusExpectLock = data.ipSingleSwitchStusExpectLock;
}
if (data.ipSingleSwitchStusExpectUnlock != null) {
message.ipSingleSwitchStusExpectUnlock = data.ipSingleSwitchStusExpectUnlock;
}
if (data.ipSingleSwitchStusExpectNormal != null) {
message.ipSingleSwitchStusExpectNormal = data.ipSingleSwitchStusExpectNormal;
}
if (data.ipSingleSwitchStusExpectReverse != null) {
message.ipSingleSwitchStusExpectReverse = data.ipSingleSwitchStusExpectReverse;
}
if (data.ipSingleSwitchStusExpectBlock != null) {
message.ipSingleSwitchStusExpectBlock = data.ipSingleSwitchStusExpectBlock;
}
if (data.ipSingleSwitchStusExpectUnblock != null) {
message.ipSingleSwitchStusExpectUnblock = data.ipSingleSwitchStusExpectUnblock;
}
if (data.ipSingleSwitchStusInRoute != null) {
message.ipSingleSwitchStusInRoute = data.ipSingleSwitchStusInRoute;
}
if (data.ipSingleSwitchStusManualMode != null) {
message.ipSingleSwitchStusManualMode = data.ipSingleSwitchStusManualMode;
}
if (data.ipSingleSwitchStusCut != null) {
message.ipSingleSwitchStusCut = data.ipSingleSwitchStusCut;
}
@ -1847,6 +1959,14 @@ export namespace state {
ipSingleSwitchStusReverse?: boolean;
ipSingleSwitchStusBlocked1?: boolean;
ipSingleSwitchStusJammed?: boolean;
ipSingleSwitchStusExpectLock?: boolean;
ipSingleSwitchStusExpectUnlock?: boolean;
ipSingleSwitchStusExpectNormal?: boolean;
ipSingleSwitchStusExpectReverse?: boolean;
ipSingleSwitchStusExpectBlock?: boolean;
ipSingleSwitchStusExpectUnblock?: boolean;
ipSingleSwitchStusInRoute?: boolean;
ipSingleSwitchStusManualMode?: boolean;
ipSingleSwitchStusCut?: boolean;
ipSingleSwitchStusAtcInvalid?: boolean;
ipSingleSwitchStusOverlap?: boolean;
@ -1885,6 +2005,30 @@ export namespace state {
if (this.ipSingleSwitchStusJammed != null) {
data.ipSingleSwitchStusJammed = this.ipSingleSwitchStusJammed;
}
if (this.ipSingleSwitchStusExpectLock != null) {
data.ipSingleSwitchStusExpectLock = this.ipSingleSwitchStusExpectLock;
}
if (this.ipSingleSwitchStusExpectUnlock != null) {
data.ipSingleSwitchStusExpectUnlock = this.ipSingleSwitchStusExpectUnlock;
}
if (this.ipSingleSwitchStusExpectNormal != null) {
data.ipSingleSwitchStusExpectNormal = this.ipSingleSwitchStusExpectNormal;
}
if (this.ipSingleSwitchStusExpectReverse != null) {
data.ipSingleSwitchStusExpectReverse = this.ipSingleSwitchStusExpectReverse;
}
if (this.ipSingleSwitchStusExpectBlock != null) {
data.ipSingleSwitchStusExpectBlock = this.ipSingleSwitchStusExpectBlock;
}
if (this.ipSingleSwitchStusExpectUnblock != null) {
data.ipSingleSwitchStusExpectUnblock = this.ipSingleSwitchStusExpectUnblock;
}
if (this.ipSingleSwitchStusInRoute != null) {
data.ipSingleSwitchStusInRoute = this.ipSingleSwitchStusInRoute;
}
if (this.ipSingleSwitchStusManualMode != null) {
data.ipSingleSwitchStusManualMode = this.ipSingleSwitchStusManualMode;
}
if (this.ipSingleSwitchStusCut != null) {
data.ipSingleSwitchStusCut = this.ipSingleSwitchStusCut;
}
@ -1946,6 +2090,22 @@ export namespace state {
writer.writeBool(7, this.ipSingleSwitchStusBlocked1);
if (this.ipSingleSwitchStusJammed != false)
writer.writeBool(8, this.ipSingleSwitchStusJammed);
if (this.ipSingleSwitchStusExpectLock != false)
writer.writeBool(9, this.ipSingleSwitchStusExpectLock);
if (this.ipSingleSwitchStusExpectUnlock != false)
writer.writeBool(10, this.ipSingleSwitchStusExpectUnlock);
if (this.ipSingleSwitchStusExpectNormal != false)
writer.writeBool(11, this.ipSingleSwitchStusExpectNormal);
if (this.ipSingleSwitchStusExpectReverse != false)
writer.writeBool(12, this.ipSingleSwitchStusExpectReverse);
if (this.ipSingleSwitchStusExpectBlock != false)
writer.writeBool(13, this.ipSingleSwitchStusExpectBlock);
if (this.ipSingleSwitchStusExpectUnblock != false)
writer.writeBool(14, this.ipSingleSwitchStusExpectUnblock);
if (this.ipSingleSwitchStusInRoute != false)
writer.writeBool(15, this.ipSingleSwitchStusInRoute);
if (this.ipSingleSwitchStusManualMode != false)
writer.writeBool(16, this.ipSingleSwitchStusManualMode);
if (this.ipSingleSwitchStusCut != false)
writer.writeBool(17, this.ipSingleSwitchStusCut);
if (this.ipSingleSwitchStusAtcInvalid != false)
@ -2005,6 +2165,30 @@ export namespace state {
case 8:
message.ipSingleSwitchStusJammed = reader.readBool();
break;
case 9:
message.ipSingleSwitchStusExpectLock = reader.readBool();
break;
case 10:
message.ipSingleSwitchStusExpectUnlock = reader.readBool();
break;
case 11:
message.ipSingleSwitchStusExpectNormal = reader.readBool();
break;
case 12:
message.ipSingleSwitchStusExpectReverse = reader.readBool();
break;
case 13:
message.ipSingleSwitchStusExpectBlock = reader.readBool();
break;
case 14:
message.ipSingleSwitchStusExpectUnblock = reader.readBool();
break;
case 15:
message.ipSingleSwitchStusInRoute = reader.readBool();
break;
case 16:
message.ipSingleSwitchStusManualMode = reader.readBool();
break;
case 17:
message.ipSingleSwitchStusCut = reader.readBool();
break;

View File

@ -1706,6 +1706,8 @@ export namespace graphicData {
code?: string;
hasdoor?: boolean;
direction?: string;
upAndDown?: string;
refStation?: string;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
@ -1722,6 +1724,12 @@ export namespace graphicData {
if ("direction" in data && data.direction != undefined) {
this.direction = data.direction;
}
if ("upAndDown" in data && data.upAndDown != undefined) {
this.upAndDown = data.upAndDown;
}
if ("refStation" in data && data.refStation != undefined) {
this.refStation = data.refStation;
}
}
}
get common() {
@ -1751,11 +1759,25 @@ export namespace graphicData {
set direction(value: string) {
pb_1.Message.setField(this, 4, value);
}
get upAndDown() {
return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
}
set upAndDown(value: string) {
pb_1.Message.setField(this, 5, value);
}
get refStation() {
return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
}
set refStation(value: string) {
pb_1.Message.setField(this, 6, value);
}
static fromObject(data: {
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
code?: string;
hasdoor?: boolean;
direction?: string;
upAndDown?: string;
refStation?: string;
}): Platform {
const message = new Platform({});
if (data.common != null) {
@ -1770,6 +1792,12 @@ export namespace graphicData {
if (data.direction != null) {
message.direction = data.direction;
}
if (data.upAndDown != null) {
message.upAndDown = data.upAndDown;
}
if (data.refStation != null) {
message.refStation = data.refStation;
}
return message;
}
toObject() {
@ -1778,6 +1806,8 @@ export namespace graphicData {
code?: string;
hasdoor?: boolean;
direction?: string;
upAndDown?: string;
refStation?: string;
} = {};
if (this.common != null) {
data.common = this.common.toObject();
@ -1791,6 +1821,12 @@ export namespace graphicData {
if (this.direction != null) {
data.direction = this.direction;
}
if (this.upAndDown != null) {
data.upAndDown = this.upAndDown;
}
if (this.refStation != null) {
data.refStation = this.refStation;
}
return data;
}
serialize(): Uint8Array;
@ -1805,6 +1841,10 @@ export namespace graphicData {
writer.writeBool(3, this.hasdoor);
if (this.direction.length)
writer.writeString(4, this.direction);
if (this.upAndDown.length)
writer.writeString(5, this.upAndDown);
if (this.refStation.length)
writer.writeString(6, this.refStation);
if (!w)
return writer.getResultBuffer();
}
@ -1826,6 +1866,12 @@ export namespace graphicData {
case 4:
message.direction = reader.readString();
break;
case 5:
message.upAndDown = reader.readString();
break;
case 6:
message.refStation = reader.readString();
break;
default: reader.skipField();
}
}
@ -1846,6 +1892,7 @@ export namespace graphicData {
hasControl?: boolean;
concentrationStations?: boolean;
kilometerSystem?: KilometerSystem;
name?: string;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
@ -1865,6 +1912,9 @@ export namespace graphicData {
if ("kilometerSystem" in data && data.kilometerSystem != undefined) {
this.kilometerSystem = data.kilometerSystem;
}
if ("name" in data && data.name != undefined) {
this.name = data.name;
}
}
}
get common() {
@ -1903,12 +1953,19 @@ export namespace graphicData {
get has_kilometerSystem() {
return pb_1.Message.getField(this, 6) != null;
}
get name() {
return pb_1.Message.getFieldWithDefault(this, 7, "") as string;
}
set name(value: string) {
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>;
name?: string;
}): Station {
const message = new Station({});
if (data.common != null) {
@ -1926,6 +1983,9 @@ export namespace graphicData {
if (data.kilometerSystem != null) {
message.kilometerSystem = KilometerSystem.fromObject(data.kilometerSystem);
}
if (data.name != null) {
message.name = data.name;
}
return message;
}
toObject() {
@ -1935,6 +1995,7 @@ export namespace graphicData {
hasControl?: boolean;
concentrationStations?: boolean;
kilometerSystem?: ReturnType<typeof KilometerSystem.prototype.toObject>;
name?: string;
} = {};
if (this.common != null) {
data.common = this.common.toObject();
@ -1951,6 +2012,9 @@ export namespace graphicData {
if (this.kilometerSystem != null) {
data.kilometerSystem = this.kilometerSystem.toObject();
}
if (this.name != null) {
data.name = this.name;
}
return data;
}
serialize(): Uint8Array;
@ -1967,6 +2031,8 @@ export namespace graphicData {
writer.writeBool(4, this.concentrationStations);
if (this.has_kilometerSystem)
writer.writeMessage(6, this.kilometerSystem, () => this.kilometerSystem.serialize(writer));
if (this.name.length)
writer.writeString(7, this.name);
if (!w)
return writer.getResultBuffer();
}
@ -1991,6 +2057,9 @@ export namespace graphicData {
case 6:
reader.readMessage(message.kilometerSystem, () => message.kilometerSystem = KilometerSystem.deserialize(reader));
break;
case 7:
message.name = reader.readString();
break;
default: reader.skipField();
}
}
@ -3185,9 +3254,10 @@ export namespace graphicData {
containSta?: string[];
linkPathLines?: string[];
lineId?: string;
dashPointIndexs?: number[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 8, 9], this.#one_of_decls);
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 8, 9, 11], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("common" in data && data.common != undefined) {
this.common = data.common;
@ -3213,6 +3283,9 @@ export namespace graphicData {
if ("lineId" in data && data.lineId != undefined) {
this.lineId = data.lineId;
}
if ("dashPointIndexs" in data && data.dashPointIndexs != undefined) {
this.dashPointIndexs = data.dashPointIndexs;
}
}
}
get common() {
@ -3266,6 +3339,12 @@ export namespace graphicData {
set lineId(value: string) {
pb_1.Message.setField(this, 10, value);
}
get dashPointIndexs() {
return pb_1.Message.getFieldWithDefault(this, 11, []) as number[];
}
set dashPointIndexs(value: number[]) {
pb_1.Message.setField(this, 11, value);
}
static fromObject(data: {
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
code?: string;
@ -3275,6 +3354,7 @@ export namespace graphicData {
containSta?: string[];
linkPathLines?: string[];
lineId?: string;
dashPointIndexs?: number[];
}): RunLine {
const message = new RunLine({});
if (data.common != null) {
@ -3301,6 +3381,9 @@ export namespace graphicData {
if (data.lineId != null) {
message.lineId = data.lineId;
}
if (data.dashPointIndexs != null) {
message.dashPointIndexs = data.dashPointIndexs;
}
return message;
}
toObject() {
@ -3313,6 +3396,7 @@ export namespace graphicData {
containSta?: string[];
linkPathLines?: string[];
lineId?: string;
dashPointIndexs?: number[];
} = {};
if (this.common != null) {
data.common = this.common.toObject();
@ -3338,6 +3422,9 @@ export namespace graphicData {
if (this.lineId != null) {
data.lineId = this.lineId;
}
if (this.dashPointIndexs != null) {
data.dashPointIndexs = this.dashPointIndexs;
}
return data;
}
serialize(): Uint8Array;
@ -3360,6 +3447,8 @@ export namespace graphicData {
writer.writeRepeatedString(9, this.linkPathLines);
if (this.lineId.length)
writer.writeString(10, this.lineId);
if (this.dashPointIndexs.length)
writer.writePackedInt32(11, this.dashPointIndexs);
if (!w)
return writer.getResultBuffer();
}
@ -3393,6 +3482,9 @@ export namespace graphicData {
case 10:
message.lineId = reader.readString();
break;
case 11:
message.dashPointIndexs = reader.readPackedInt32();
break;
default: reader.skipField();
}
}

@ -1 +1 @@
Subproject commit f1dfb5e4bdcce8df58c34c0c2cbce545db559a68
Subproject commit bdcbbf2c048dbf70cdd92b25f0012c676ccd9b04