关联门控箱地图&关联IBP地图
This commit is contained in:
parent
7a3b0c1603
commit
7d8ab9c0b1
@ -1 +1 @@
|
||||
Subproject commit 5604ad84ed5c6af4206937f5bbba9b2debfbfb6f
|
||||
Subproject commit b33cc6eee0d88f566a6370e12633da50883b4d34
|
@ -31,6 +31,15 @@ export async function pageQuery(
|
||||
});
|
||||
return response.data;
|
||||
}
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
export async function listQuery(type: number) {
|
||||
const response = await api.get(`${DraftUriBase}/list`, {
|
||||
params: { type },
|
||||
});
|
||||
return response.data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建草稿
|
||||
|
@ -1,4 +1,6 @@
|
||||
import { api } from 'src/boot/axios';
|
||||
import { CategoryType } from 'src/components/CategoryType';
|
||||
import { PictureType } from 'src/protos/picture';
|
||||
import { PageDto, PageQueryDto } from './ApiCommon';
|
||||
|
||||
const PublishUriBase = '/api/v1/publishedGi';
|
||||
@ -34,8 +36,11 @@ export function publishDraft(data: {
|
||||
* @param params
|
||||
* @returns
|
||||
*/
|
||||
export async function getPublishList(): Promise<PublishItem[]> {
|
||||
const response = await api.get(`${PublishUriBase}/list`);
|
||||
export async function getPublishList(params?: {
|
||||
type: PictureType;
|
||||
category: CategoryType | null;
|
||||
}): Promise<PublishItem[]> {
|
||||
const response = await api.get(`${PublishUriBase}/list`, { params });
|
||||
return response.data;
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,7 @@
|
||||
></screenDoor-property>
|
||||
<station-property
|
||||
v-if="drawStore.selectedGraphicType === Station.Type"
|
||||
:ibpNameList="ibpNameList"
|
||||
></station-property>
|
||||
<!-- <train-property
|
||||
v-if="drawStore.selectedGraphicType === Train.Type"
|
||||
@ -89,6 +90,7 @@
|
||||
></spks-switch-property>
|
||||
<gated-box-property
|
||||
v-else-if="drawStore.selectedGraphicType === GatedBox.Type"
|
||||
:pslNameList="pslNameList"
|
||||
></gated-box-property>
|
||||
<esb-button-property
|
||||
v-else-if="drawStore.selectedGraphicType === EsbButton.Type"
|
||||
@ -181,6 +183,31 @@ import { TrackSection } from 'src/graphics/trackSection/TrackSection';
|
||||
import TrackLogicSectionProperty from './properties/TrackLogicSectionProperty.vue';
|
||||
import { TrackLogicSection } from 'src/graphics/trackLogicSection/TrackLogicSection';
|
||||
import MultipleSelectProperty from './properties/multipleSelectProperty.vue';
|
||||
import { onMounted } from 'vue';
|
||||
import { getPublishList } from 'src/api/PublishApi';
|
||||
import { PictureType } from 'src/protos/picture';
|
||||
|
||||
const drawStore = useDrawStore();
|
||||
const ibpNameList: string[] = [];
|
||||
const pslNameList: string[] = [];
|
||||
onMounted(async () => {
|
||||
const ibpMapList = await getPublishList({
|
||||
type: PictureType.IBP,
|
||||
category: drawStore.categoryType,
|
||||
});
|
||||
const pslMapList = await getPublishList({
|
||||
type: PictureType.Psl,
|
||||
category: drawStore.categoryType,
|
||||
});
|
||||
if (ibpMapList && ibpMapList.length) {
|
||||
ibpMapList.forEach((item) => {
|
||||
ibpNameList.push(item.name);
|
||||
});
|
||||
}
|
||||
if (pslMapList && pslMapList.length) {
|
||||
pslMapList.forEach((item) => {
|
||||
pslNameList.push(item.name);
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@ -17,6 +17,7 @@
|
||||
/>
|
||||
<q-select
|
||||
outlined
|
||||
class="q-mt-sm"
|
||||
style="margin-top: 10px"
|
||||
v-model="gatedBoxModel.refScreenDoor"
|
||||
:options="screenDoorList"
|
||||
@ -25,6 +26,14 @@
|
||||
@update:model-value="onUpdate"
|
||||
label="关联屏蔽门"
|
||||
></q-select>
|
||||
<q-select
|
||||
outlined
|
||||
class="q-mt-sm"
|
||||
@blur="onUpdate"
|
||||
v-model="gatedBoxModel.refGatedBoxMapCode"
|
||||
:options="props.pslNameList"
|
||||
label="关联IBP地图"
|
||||
/>
|
||||
</q-form>
|
||||
</template>
|
||||
|
||||
@ -32,13 +41,21 @@
|
||||
import { GatedBoxData } from 'src/drawApp/graphics/GatedBoxInteraction';
|
||||
import { useFormData } from 'src/components/DrawAppFormUtils';
|
||||
import { useDrawStore } from 'src/stores/draw-store';
|
||||
import { onMounted, reactive } from 'vue';
|
||||
import { onMounted, reactive, defineProps } from 'vue';
|
||||
import { ScreenDoor } from 'src/graphics/screenDoor/ScreenDoor';
|
||||
|
||||
const { data: gatedBoxModel, onUpdate } = useFormData(
|
||||
new GatedBoxData(),
|
||||
useDrawStore().getDrawApp()
|
||||
);
|
||||
|
||||
const props = defineProps({
|
||||
pslNameList: {
|
||||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const screenDoorList: { label: string; value: string }[] = reactive([]);
|
||||
|
||||
onMounted(() => {
|
||||
|
@ -171,10 +171,10 @@ async function onSubmit() {
|
||||
myForm.value?.validate().then(async (res) => {
|
||||
if (res) {
|
||||
try {
|
||||
const combinationtypes: pslGraphicData.Combinationtype[] = [];
|
||||
const combinationtypes: graphicData.DeviceCombinationtype[] = [];
|
||||
relateDeviceConfig.value.combinationtypes.forEach((combinationtype) => {
|
||||
combinationtypes.push(
|
||||
new pslGraphicData.Combinationtype({
|
||||
new graphicData.DeviceCombinationtype({
|
||||
code: combinationtype.code,
|
||||
refDevices: combinationtype.refDevices,
|
||||
})
|
||||
|
@ -48,6 +48,7 @@
|
||||
></q-select>
|
||||
<q-select
|
||||
outlined
|
||||
class="q-mt-md"
|
||||
@blur="onUpdate"
|
||||
v-model="stationModel.concentrationStations"
|
||||
:options="optionsControl"
|
||||
@ -55,6 +56,14 @@
|
||||
emit-value
|
||||
label="是否集中站"
|
||||
/>
|
||||
<q-select
|
||||
outlined
|
||||
class="q-mt-md"
|
||||
@blur="onUpdate"
|
||||
v-model="stationModel.refIbpMapCode"
|
||||
:options="props.ibpNameList"
|
||||
label="关联IBP地图"
|
||||
/>
|
||||
</template>
|
||||
</q-form>
|
||||
</template>
|
||||
@ -63,9 +72,17 @@
|
||||
import { useFormData } from 'src/components/DrawAppFormUtils';
|
||||
import { StationData } from 'src/drawApp/graphics/StationInteraction';
|
||||
import { useDrawStore } from 'src/stores/draw-store';
|
||||
import { defineProps } from 'vue';
|
||||
|
||||
const drawStore = useDrawStore();
|
||||
|
||||
const props = defineProps({
|
||||
ibpNameList: {
|
||||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const { data: stationModel, onUpdate } = useFormData(
|
||||
new StationData(),
|
||||
drawStore.getDrawApp()
|
||||
|
@ -163,10 +163,10 @@ async function onSubmit() {
|
||||
myForm.value?.validate().then(async (res) => {
|
||||
if (res) {
|
||||
try {
|
||||
const combinationtypes: graphicData.Combinationtype[] = [];
|
||||
const combinationtypes: graphicData.DeviceCombinationtype[] = [];
|
||||
relateDeviceConfig.value.combinationtypes.forEach((combinationtype) => {
|
||||
combinationtypes.push(
|
||||
new graphicData.Combinationtype({
|
||||
new graphicData.DeviceCombinationtype({
|
||||
code: combinationtype.code,
|
||||
refDevices: combinationtype.refDevices,
|
||||
})
|
||||
|
@ -52,6 +52,12 @@ export class GatedBoxData extends GraphicDataBase implements IGatedBox {
|
||||
set refScreenDoor(v: string) {
|
||||
this.data.refScreenDoor = v;
|
||||
}
|
||||
get refGatedBoxMapCode(): string {
|
||||
return this.data.refGatedBoxMapCode;
|
||||
}
|
||||
set refGatedBoxMapCode(v: string) {
|
||||
this.data.refGatedBoxMapCode = v;
|
||||
}
|
||||
clone(): GatedBoxData {
|
||||
return new GatedBoxData(this.data.cloneMessage());
|
||||
}
|
||||
|
@ -61,6 +61,12 @@ export class StationData extends GraphicDataBase implements IStationData {
|
||||
set index(v: number) {
|
||||
this.data.index = v;
|
||||
}
|
||||
get refIbpMapCode(): string {
|
||||
return this.data.refIbpMapCode;
|
||||
}
|
||||
set refIbpMapCode(v: string) {
|
||||
this.data.refIbpMapCode = v;
|
||||
}
|
||||
clone(): StationData {
|
||||
return new StationData(this.data.cloneMessage());
|
||||
}
|
||||
|
@ -15,6 +15,8 @@ export interface IGatedBox extends GraphicData {
|
||||
set index(v: number);
|
||||
get refScreenDoor(): string;
|
||||
set refScreenDoor(v: string);
|
||||
get refGatedBoxMapCode(): string;
|
||||
set refGatedBoxMapCode(v: string);
|
||||
clone(): IGatedBox;
|
||||
copyFrom(data: IGatedBox): void;
|
||||
eq(other: IGatedBox): boolean;
|
||||
|
@ -185,7 +185,7 @@ export class LampMainBody extends JlGraphic {
|
||||
color: string,
|
||||
lampIndex: number
|
||||
): GraphicAnimation {
|
||||
const bgColor = '0X' + this.getCanvas().backgroundColor.substring(1);
|
||||
const bgColor = '0X000000';
|
||||
const flashAnmiation = GraphicAnimation.init({
|
||||
name: name,
|
||||
run: (dt: number) => {
|
||||
|
@ -16,6 +16,8 @@ export interface IStationData extends GraphicData {
|
||||
set concentrationStations(v: boolean);
|
||||
get index(): number;
|
||||
set index(v: number);
|
||||
get refIbpMapCode(): string;
|
||||
set refIbpMapCode(v: string);
|
||||
clone(): IStationData;
|
||||
copyFrom(data: IStationData): void;
|
||||
eq(other: IStationData): boolean;
|
||||
|
@ -160,6 +160,66 @@
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog
|
||||
v-model="refGatedBoxDialog"
|
||||
persistent
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
>
|
||||
<q-card style="width: 300px">
|
||||
<q-card-section>
|
||||
<div class="text-h6">批量关联门控箱</div>
|
||||
</q-card-section>
|
||||
<q-card-section>
|
||||
<q-select
|
||||
outlined
|
||||
class="q-mt-sm"
|
||||
v-model="refGatedBoxMapCode"
|
||||
:options="gatedBoxMapList"
|
||||
label="关联门控箱地图:"
|
||||
></q-select>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions align="right">
|
||||
<q-btn color="primary" label="提交" @click="saveRefGated()" />
|
||||
<q-btn
|
||||
label="取消"
|
||||
v-close-popup
|
||||
@click="() => refGatedBoxDialog === false"
|
||||
/>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog
|
||||
v-model="refIbpDialog"
|
||||
persistent
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
>
|
||||
<q-card style="width: 300px">
|
||||
<q-card-section>
|
||||
<div class="text-h6">批量关联IBP</div>
|
||||
</q-card-section>
|
||||
<q-card-section>
|
||||
<q-select
|
||||
outlined
|
||||
class="q-mt-sm"
|
||||
v-model="refIbpMapCode"
|
||||
:options="ibpMapList"
|
||||
label="关联IBP地图:"
|
||||
></q-select>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions align="right">
|
||||
<q-btn color="primary" label="提交" @click="saveRefIbp()" />
|
||||
<q-btn
|
||||
label="取消"
|
||||
v-close-popup
|
||||
@click="() => refIbpDialog === false"
|
||||
/>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-resize-observer @resize="onResize" />
|
||||
</q-layout>
|
||||
</template>
|
||||
@ -172,6 +232,7 @@ import {
|
||||
loadUniqueIdPrefix,
|
||||
setUniqueIdPrefix,
|
||||
} from 'src/drawApp/commonApp';
|
||||
import { getPublishList } from 'src/api/PublishApi';
|
||||
import { saveJkDrawDatas, loadLinkDatas } from 'src/drawApp/jkApp';
|
||||
import { RelateDevicelistItem, saveThDrawDatas } from 'src/drawApp/thApp';
|
||||
import { useDrawStore } from 'src/stores/draw-store';
|
||||
@ -205,12 +266,14 @@ import { TrackSectionDraw } from 'src/graphics/trackSection/TrackSectionDrawAssi
|
||||
import { Platform } from 'src/graphics/platform/Platform';
|
||||
import { ScreenDoor } from 'src/graphics/screenDoor/ScreenDoor';
|
||||
import { Station } from 'src/graphics/station/Station';
|
||||
import { StationData } from 'src/drawApp/graphics/StationInteraction';
|
||||
import { Signal } from 'src/graphics/signal/Signal';
|
||||
import { Turnout } from 'src/graphics/turnout/Turnout';
|
||||
import { Transponder } from 'src/graphics/transponder/Transponder';
|
||||
import { StopPosition } from 'src/graphics/stopPosition/StopPosition';
|
||||
import { SpksSwitch } from 'src/graphics/spksSwitch/SpksSwitch';
|
||||
import { GatedBox } from 'src/graphics/gatedBox/GatedBox';
|
||||
import { GatedBoxData } from 'src/drawApp/graphics/GatedBoxInteraction';
|
||||
import { EsbButton } from 'src/graphics/esbButton/EsbButton';
|
||||
import { SlopeKiloMarker } from 'src/graphics/slopeKiloMarker/SlopeKiloMarker';
|
||||
import { CurvatureKiloMarker } from 'src/graphics/curvatureKiloMarker/CurvatureKiloMarker';
|
||||
@ -220,6 +283,7 @@ import KilometerConvertList from 'src/components/draw-app/dialogs/KilometerConve
|
||||
import KilometerConvertConfig from 'src/components/draw-app/properties/KilometerConvertConfig.vue';
|
||||
import StationRelateDeviceConfig from 'src/components/draw-app/properties/StationRelateDeviceConfig.vue';
|
||||
import StationRelateDeviceList from 'src/components/draw-app/dialogs/StationRelateDeviceList.vue';
|
||||
import { PictureType } from 'src/protos/picture';
|
||||
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
@ -305,7 +369,6 @@ const leftMenuConfig = [
|
||||
label: '一键修改公里标方向',
|
||||
click: onClickChangeKilometerDirection,
|
||||
},
|
||||
{ label: '关联门控箱', click: handleRefGatedBox },
|
||||
];
|
||||
|
||||
onMounted(() => {
|
||||
@ -350,10 +413,14 @@ onMounted(() => {
|
||||
});
|
||||
switch (drawStore.categoryType) {
|
||||
case CategoryType.TH:
|
||||
leftMenuConfig.push({
|
||||
label: '一键生成轨道区段',
|
||||
click: oneClickTrackSection,
|
||||
});
|
||||
leftMenuConfig.push(
|
||||
{
|
||||
label: '一键生成轨道区段',
|
||||
click: oneClickTrackSection,
|
||||
},
|
||||
{ label: '批量关联门控箱', click: handleRefGatedBox },
|
||||
{ label: '批量关联IBP', click: handleRefIbp }
|
||||
);
|
||||
break;
|
||||
case CategoryType.JK:
|
||||
leftMenuConfig.push(
|
||||
@ -509,9 +576,57 @@ function onClickChangeKilometerDirection() {
|
||||
}
|
||||
});
|
||||
}
|
||||
function handleRefGatedBox() {
|
||||
const tst = 'p';
|
||||
|
||||
const refGatedBoxDialog = ref(false);
|
||||
const refGatedBoxMapCode = ref('');
|
||||
const gatedBoxMapList: string[] = [];
|
||||
async function handleRefGatedBox() {
|
||||
const response = await getPublishList({
|
||||
type: PictureType.Psl,
|
||||
category: drawStore.categoryType,
|
||||
});
|
||||
response.forEach((item) => {
|
||||
gatedBoxMapList.push(item.name);
|
||||
});
|
||||
refGatedBoxDialog.value = true;
|
||||
}
|
||||
function saveRefGated() {
|
||||
const gatedBoxs = drawStore
|
||||
.getDrawApp()
|
||||
.queryStore.queryByType<GatedBox>(GatedBox.Type);
|
||||
gatedBoxs.forEach((gatedBox: GatedBox) => {
|
||||
const data = gatedBox.saveData() as GatedBoxData;
|
||||
data.refGatedBoxMapCode = refGatedBoxMapCode.value;
|
||||
gatedBox.updateData(data);
|
||||
});
|
||||
refGatedBoxDialog.value = false;
|
||||
}
|
||||
|
||||
const refIbpDialog = ref(false);
|
||||
const refIbpMapCode = ref('');
|
||||
const ibpMapList: string[] = [];
|
||||
async function handleRefIbp() {
|
||||
const response = await getPublishList({
|
||||
type: PictureType.IBP,
|
||||
category: drawStore.categoryType,
|
||||
});
|
||||
response.forEach((item) => {
|
||||
ibpMapList.push(item.name);
|
||||
});
|
||||
refIbpDialog.value = true;
|
||||
}
|
||||
function saveRefIbp() {
|
||||
const stations = drawStore
|
||||
.getDrawApp()
|
||||
.queryStore.queryByType<Station>(Station.Type);
|
||||
stations.forEach((station: Station) => {
|
||||
const data = station.saveData() as StationData;
|
||||
data.refIbpMapCode = refIbpMapCode.value;
|
||||
station.updateData(data);
|
||||
});
|
||||
refIbpDialog.value = false;
|
||||
}
|
||||
|
||||
function oneClickCurvature() {
|
||||
//一键生成曲度
|
||||
const curvatureDraw = drawStore
|
||||
|
@ -68,6 +68,7 @@ import { layerList } from 'src/drawApp/lineScene';
|
||||
import { IGraphicScene } from 'src/jl-graphic';
|
||||
import { ISceneName, getSceneName } from 'src/drawApp/lineApp';
|
||||
import { useTestManageStore } from 'src/stores/testManage-store';
|
||||
import { CategoryType } from 'src/components/CategoryType';
|
||||
|
||||
const $q = useQuasar();
|
||||
const canvasWidth = ref(0);
|
||||
@ -124,14 +125,20 @@ onMounted(async () => {
|
||||
try {
|
||||
if (projectId) {
|
||||
const res = await getProjectLinkInfo(+projectId);
|
||||
console.log(res, '====');
|
||||
projectInfo.name = res.name;
|
||||
projectInfo.pid = res.pid + '';
|
||||
projectInfo.mapInfoLinks = res.mapInfoLinks;
|
||||
projectInfo.trainSizeLinks = res.trainSizeLinks;
|
||||
let category = '';
|
||||
const find = projectInfo.mapInfoLinks?.find((item) => {
|
||||
category = item.category;
|
||||
return item.id == lineStore.mapId;
|
||||
});
|
||||
if (CategoryType.JK === category) {
|
||||
lineStore.setCategoryType(CategoryType.JK);
|
||||
} else if (CategoryType.TH === category) {
|
||||
lineStore.setCategoryType(CategoryType.TH);
|
||||
}
|
||||
if (find) {
|
||||
sceneInfo.value = find;
|
||||
sceneName = getSceneNameFn(find);
|
||||
@ -163,6 +170,7 @@ onUnmounted(() => {
|
||||
if (dialogInstance.value && lineStore.showLayerDialog) {
|
||||
dialogInstance.value.hide();
|
||||
}
|
||||
lineStore.setCategoryType(null);
|
||||
lineStore.setSimulationId(null);
|
||||
lineStore.destroy();
|
||||
});
|
||||
@ -274,6 +282,7 @@ function pslShow() {
|
||||
}
|
||||
|
||||
function pslHide() {
|
||||
const pslApp = usePslStore().initLineApp();
|
||||
pslApp.unbindDom();
|
||||
pslApp.destroy();
|
||||
pslDialog.value = false;
|
||||
|
@ -440,6 +440,58 @@ export namespace state {
|
||||
return SignalState.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class Signal extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
if (!Array.isArray(data) && typeof data == "object") { }
|
||||
}
|
||||
static fromObject(data: {}): Signal {
|
||||
const message = new Signal({});
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {} = {};
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Signal {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Signal();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): Signal {
|
||||
return Signal.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export namespace Signal {
|
||||
export enum Aspect {
|
||||
OFF = 0,
|
||||
ON = 1,
|
||||
L = 2,
|
||||
H = 3,
|
||||
U = 4,
|
||||
HU = 5,
|
||||
B = 6,
|
||||
A = 7
|
||||
}
|
||||
}
|
||||
export class PlatformState extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
|
@ -4,6 +4,7 @@
|
||||
* source: ibpGraphics.proto
|
||||
* git: https://github.com/thesayyn/protoc-gen-ts */
|
||||
import * as dependency_1 from "./stationLayoutGraphics";
|
||||
import * as dependency_2 from "./relayCabinetLayoutGraphics";
|
||||
import * as pb_1 from "google-protobuf";
|
||||
export namespace ibpGraphicData {
|
||||
export class IBPGraphicStorage extends pb_1.Message {
|
||||
@ -15,7 +16,7 @@ export namespace ibpGraphicData {
|
||||
ibpKeys?: IbpKey[];
|
||||
ibpArrows?: IbpArrow[];
|
||||
IBPTexts?: IBPText[];
|
||||
UniqueIdPrefix?: UniqueIdType;
|
||||
UniqueIdPrefix?: dependency_2.relayCabinetGraphicData.UniqueIdType;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4, 5, 6], this.#one_of_decls);
|
||||
@ -83,9 +84,9 @@ export namespace ibpGraphicData {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 6, value);
|
||||
}
|
||||
get UniqueIdPrefix() {
|
||||
return pb_1.Message.getWrapperField(this, UniqueIdType, 7) as UniqueIdType;
|
||||
return pb_1.Message.getWrapperField(this, dependency_2.relayCabinetGraphicData.UniqueIdType, 7) as dependency_2.relayCabinetGraphicData.UniqueIdType;
|
||||
}
|
||||
set UniqueIdPrefix(value: UniqueIdType) {
|
||||
set UniqueIdPrefix(value: dependency_2.relayCabinetGraphicData.UniqueIdType) {
|
||||
pb_1.Message.setWrapperField(this, 7, value);
|
||||
}
|
||||
get has_UniqueIdPrefix() {
|
||||
@ -98,7 +99,7 @@ export namespace ibpGraphicData {
|
||||
ibpKeys?: ReturnType<typeof IbpKey.prototype.toObject>[];
|
||||
ibpArrows?: ReturnType<typeof IbpArrow.prototype.toObject>[];
|
||||
IBPTexts?: ReturnType<typeof IBPText.prototype.toObject>[];
|
||||
UniqueIdPrefix?: ReturnType<typeof UniqueIdType.prototype.toObject>;
|
||||
UniqueIdPrefix?: ReturnType<typeof dependency_2.relayCabinetGraphicData.UniqueIdType.prototype.toObject>;
|
||||
}): IBPGraphicStorage {
|
||||
const message = new IBPGraphicStorage({});
|
||||
if (data.canvas != null) {
|
||||
@ -120,7 +121,7 @@ export namespace ibpGraphicData {
|
||||
message.IBPTexts = data.IBPTexts.map(item => IBPText.fromObject(item));
|
||||
}
|
||||
if (data.UniqueIdPrefix != null) {
|
||||
message.UniqueIdPrefix = UniqueIdType.fromObject(data.UniqueIdPrefix);
|
||||
message.UniqueIdPrefix = dependency_2.relayCabinetGraphicData.UniqueIdType.fromObject(data.UniqueIdPrefix);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
@ -132,7 +133,7 @@ export namespace ibpGraphicData {
|
||||
ibpKeys?: ReturnType<typeof IbpKey.prototype.toObject>[];
|
||||
ibpArrows?: ReturnType<typeof IbpArrow.prototype.toObject>[];
|
||||
IBPTexts?: ReturnType<typeof IBPText.prototype.toObject>[];
|
||||
UniqueIdPrefix?: ReturnType<typeof UniqueIdType.prototype.toObject>;
|
||||
UniqueIdPrefix?: ReturnType<typeof dependency_2.relayCabinetGraphicData.UniqueIdType.prototype.toObject>;
|
||||
} = {};
|
||||
if (this.canvas != null) {
|
||||
data.canvas = this.canvas.toObject();
|
||||
@ -203,7 +204,7 @@ export namespace ibpGraphicData {
|
||||
reader.readMessage(message.IBPTexts, () => pb_1.Message.addToRepeatedWrapperField(message, 6, IBPText.deserialize(reader), IBPText));
|
||||
break;
|
||||
case 7:
|
||||
reader.readMessage(message.UniqueIdPrefix, () => message.UniqueIdPrefix = UniqueIdType.deserialize(reader));
|
||||
reader.readMessage(message.UniqueIdPrefix, () => message.UniqueIdPrefix = dependency_2.relayCabinetGraphicData.UniqueIdType.deserialize(reader));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
@ -713,102 +714,12 @@ export namespace ibpGraphicData {
|
||||
return IbpKey.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class Point extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
x?: number;
|
||||
y?: number;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("x" in data && data.x != undefined) {
|
||||
this.x = data.x;
|
||||
}
|
||||
if ("y" in data && data.y != undefined) {
|
||||
this.y = data.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
get x() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
|
||||
}
|
||||
set x(value: number) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get y() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
|
||||
}
|
||||
set y(value: number) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
x?: number;
|
||||
y?: number;
|
||||
}): Point {
|
||||
const message = new Point({});
|
||||
if (data.x != null) {
|
||||
message.x = data.x;
|
||||
}
|
||||
if (data.y != null) {
|
||||
message.y = data.y;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
x?: number;
|
||||
y?: number;
|
||||
} = {};
|
||||
if (this.x != null) {
|
||||
data.x = this.x;
|
||||
}
|
||||
if (this.y != null) {
|
||||
data.y = this.y;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.x != 0)
|
||||
writer.writeFloat(1, this.x);
|
||||
if (this.y != 0)
|
||||
writer.writeFloat(2, this.y);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Point {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Point();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.x = reader.readFloat();
|
||||
break;
|
||||
case 2:
|
||||
message.y = reader.readFloat();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): Point {
|
||||
return Point.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class IbpArrow extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
common?: dependency_1.graphicData.CommonInfo;
|
||||
code?: string;
|
||||
points?: Point[];
|
||||
points?: dependency_1.graphicData.Point[];
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls);
|
||||
@ -840,15 +751,15 @@ export namespace ibpGraphicData {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
get points() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, Point, 3) as Point[];
|
||||
return pb_1.Message.getRepeatedWrapperField(this, dependency_1.graphicData.Point, 3) as dependency_1.graphicData.Point[];
|
||||
}
|
||||
set points(value: Point[]) {
|
||||
set points(value: dependency_1.graphicData.Point[]) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 3, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof dependency_1.graphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
points?: ReturnType<typeof Point.prototype.toObject>[];
|
||||
points?: ReturnType<typeof dependency_1.graphicData.Point.prototype.toObject>[];
|
||||
}): IbpArrow {
|
||||
const message = new IbpArrow({});
|
||||
if (data.common != null) {
|
||||
@ -858,7 +769,7 @@ export namespace ibpGraphicData {
|
||||
message.code = data.code;
|
||||
}
|
||||
if (data.points != null) {
|
||||
message.points = data.points.map(item => Point.fromObject(item));
|
||||
message.points = data.points.map(item => dependency_1.graphicData.Point.fromObject(item));
|
||||
}
|
||||
return message;
|
||||
}
|
||||
@ -866,7 +777,7 @@ export namespace ibpGraphicData {
|
||||
const data: {
|
||||
common?: ReturnType<typeof dependency_1.graphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
points?: ReturnType<typeof Point.prototype.toObject>[];
|
||||
points?: ReturnType<typeof dependency_1.graphicData.Point.prototype.toObject>[];
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
@ -875,7 +786,7 @@ export namespace ibpGraphicData {
|
||||
data.code = this.code;
|
||||
}
|
||||
if (this.points != null) {
|
||||
data.points = this.points.map((item: Point) => item.toObject());
|
||||
data.points = this.points.map((item: dependency_1.graphicData.Point) => item.toObject());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
@ -888,7 +799,7 @@ export namespace ibpGraphicData {
|
||||
if (this.code.length)
|
||||
writer.writeString(2, this.code);
|
||||
if (this.points.length)
|
||||
writer.writeRepeatedMessage(3, this.points, (item: Point) => item.serialize(writer));
|
||||
writer.writeRepeatedMessage(3, this.points, (item: dependency_1.graphicData.Point) => item.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -905,7 +816,7 @@ export namespace ibpGraphicData {
|
||||
message.code = reader.readString();
|
||||
break;
|
||||
case 3:
|
||||
reader.readMessage(message.points, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Point.deserialize(reader), Point));
|
||||
reader.readMessage(message.points, () => pb_1.Message.addToRepeatedWrapperField(message, 3, dependency_1.graphicData.Point.deserialize(reader), dependency_1.graphicData.Point));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
@ -919,117 +830,4 @@ export namespace ibpGraphicData {
|
||||
return IbpArrow.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class UniqueIdType extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
city?: string;
|
||||
lineId?: string;
|
||||
belongsStation?: string;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("city" in data && data.city != undefined) {
|
||||
this.city = data.city;
|
||||
}
|
||||
if ("lineId" in data && data.lineId != undefined) {
|
||||
this.lineId = data.lineId;
|
||||
}
|
||||
if ("belongsStation" in data && data.belongsStation != undefined) {
|
||||
this.belongsStation = data.belongsStation;
|
||||
}
|
||||
}
|
||||
}
|
||||
get city() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
||||
}
|
||||
set city(value: string) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get lineId() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
||||
}
|
||||
set lineId(value: string) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
get belongsStation() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
||||
}
|
||||
set belongsStation(value: string) {
|
||||
pb_1.Message.setField(this, 3, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
city?: string;
|
||||
lineId?: string;
|
||||
belongsStation?: string;
|
||||
}): UniqueIdType {
|
||||
const message = new UniqueIdType({});
|
||||
if (data.city != null) {
|
||||
message.city = data.city;
|
||||
}
|
||||
if (data.lineId != null) {
|
||||
message.lineId = data.lineId;
|
||||
}
|
||||
if (data.belongsStation != null) {
|
||||
message.belongsStation = data.belongsStation;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
city?: string;
|
||||
lineId?: string;
|
||||
belongsStation?: string;
|
||||
} = {};
|
||||
if (this.city != null) {
|
||||
data.city = this.city;
|
||||
}
|
||||
if (this.lineId != null) {
|
||||
data.lineId = this.lineId;
|
||||
}
|
||||
if (this.belongsStation != null) {
|
||||
data.belongsStation = this.belongsStation;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.city.length)
|
||||
writer.writeString(1, this.city);
|
||||
if (this.lineId.length)
|
||||
writer.writeString(2, this.lineId);
|
||||
if (this.belongsStation.length)
|
||||
writer.writeString(3, this.belongsStation);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): UniqueIdType {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new UniqueIdType();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.city = reader.readString();
|
||||
break;
|
||||
case 2:
|
||||
message.lineId = reader.readString();
|
||||
break;
|
||||
case 3:
|
||||
message.belongsStation = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): UniqueIdType {
|
||||
return UniqueIdType.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -687,7 +687,7 @@ export namespace pslGraphicData {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
code?: string;
|
||||
combinationtypes?: Combinationtype[];
|
||||
combinationtypes?: dependency_1.graphicData.DeviceCombinationtype[];
|
||||
deviceType?: dependency_1.graphicData.RelatedRef.DeviceType;
|
||||
}) {
|
||||
super();
|
||||
@ -711,9 +711,9 @@ export namespace pslGraphicData {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get combinationtypes() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, Combinationtype, 2) as Combinationtype[];
|
||||
return pb_1.Message.getRepeatedWrapperField(this, dependency_1.graphicData.DeviceCombinationtype, 2) as dependency_1.graphicData.DeviceCombinationtype[];
|
||||
}
|
||||
set combinationtypes(value: Combinationtype[]) {
|
||||
set combinationtypes(value: dependency_1.graphicData.DeviceCombinationtype[]) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 2, value);
|
||||
}
|
||||
get deviceType() {
|
||||
@ -724,7 +724,7 @@ export namespace pslGraphicData {
|
||||
}
|
||||
static fromObject(data: {
|
||||
code?: string;
|
||||
combinationtypes?: ReturnType<typeof Combinationtype.prototype.toObject>[];
|
||||
combinationtypes?: ReturnType<typeof dependency_1.graphicData.DeviceCombinationtype.prototype.toObject>[];
|
||||
deviceType?: dependency_1.graphicData.RelatedRef.DeviceType;
|
||||
}): GatedRelateDevice {
|
||||
const message = new GatedRelateDevice({});
|
||||
@ -732,7 +732,7 @@ export namespace pslGraphicData {
|
||||
message.code = data.code;
|
||||
}
|
||||
if (data.combinationtypes != null) {
|
||||
message.combinationtypes = data.combinationtypes.map(item => Combinationtype.fromObject(item));
|
||||
message.combinationtypes = data.combinationtypes.map(item => dependency_1.graphicData.DeviceCombinationtype.fromObject(item));
|
||||
}
|
||||
if (data.deviceType != null) {
|
||||
message.deviceType = data.deviceType;
|
||||
@ -742,14 +742,14 @@ export namespace pslGraphicData {
|
||||
toObject() {
|
||||
const data: {
|
||||
code?: string;
|
||||
combinationtypes?: ReturnType<typeof Combinationtype.prototype.toObject>[];
|
||||
combinationtypes?: ReturnType<typeof dependency_1.graphicData.DeviceCombinationtype.prototype.toObject>[];
|
||||
deviceType?: dependency_1.graphicData.RelatedRef.DeviceType;
|
||||
} = {};
|
||||
if (this.code != null) {
|
||||
data.code = this.code;
|
||||
}
|
||||
if (this.combinationtypes != null) {
|
||||
data.combinationtypes = this.combinationtypes.map((item: Combinationtype) => item.toObject());
|
||||
data.combinationtypes = this.combinationtypes.map((item: dependency_1.graphicData.DeviceCombinationtype) => item.toObject());
|
||||
}
|
||||
if (this.deviceType != null) {
|
||||
data.deviceType = this.deviceType;
|
||||
@ -763,7 +763,7 @@ export namespace pslGraphicData {
|
||||
if (this.code.length)
|
||||
writer.writeString(1, this.code);
|
||||
if (this.combinationtypes.length)
|
||||
writer.writeRepeatedMessage(2, this.combinationtypes, (item: Combinationtype) => item.serialize(writer));
|
||||
writer.writeRepeatedMessage(2, this.combinationtypes, (item: dependency_1.graphicData.DeviceCombinationtype) => item.serialize(writer));
|
||||
if (this.deviceType != dependency_1.graphicData.RelatedRef.DeviceType.Section)
|
||||
writer.writeEnum(3, this.deviceType);
|
||||
if (!w)
|
||||
@ -779,7 +779,7 @@ export namespace pslGraphicData {
|
||||
message.code = reader.readString();
|
||||
break;
|
||||
case 2:
|
||||
reader.readMessage(message.combinationtypes, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Combinationtype.deserialize(reader), Combinationtype));
|
||||
reader.readMessage(message.combinationtypes, () => pb_1.Message.addToRepeatedWrapperField(message, 2, dependency_1.graphicData.DeviceCombinationtype.deserialize(reader), dependency_1.graphicData.DeviceCombinationtype));
|
||||
break;
|
||||
case 3:
|
||||
message.deviceType = reader.readEnum();
|
||||
@ -796,94 +796,4 @@ export namespace pslGraphicData {
|
||||
return GatedRelateDevice.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class Combinationtype extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
code?: string;
|
||||
refDevices?: string[];
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("code" in data && data.code != undefined) {
|
||||
this.code = data.code;
|
||||
}
|
||||
if ("refDevices" in data && data.refDevices != undefined) {
|
||||
this.refDevices = data.refDevices;
|
||||
}
|
||||
}
|
||||
}
|
||||
get code() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
||||
}
|
||||
set code(value: string) {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get refDevices() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 2, []) as string[];
|
||||
}
|
||||
set refDevices(value: string[]) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
code?: string;
|
||||
refDevices?: string[];
|
||||
}): Combinationtype {
|
||||
const message = new Combinationtype({});
|
||||
if (data.code != null) {
|
||||
message.code = data.code;
|
||||
}
|
||||
if (data.refDevices != null) {
|
||||
message.refDevices = data.refDevices;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
code?: string;
|
||||
refDevices?: string[];
|
||||
} = {};
|
||||
if (this.code != null) {
|
||||
data.code = this.code;
|
||||
}
|
||||
if (this.refDevices != null) {
|
||||
data.refDevices = this.refDevices;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
serialize(w: pb_1.BinaryWriter): void;
|
||||
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
||||
const writer = w || new pb_1.BinaryWriter();
|
||||
if (this.code.length)
|
||||
writer.writeString(1, this.code);
|
||||
if (this.refDevices.length)
|
||||
writer.writeRepeatedString(2, this.refDevices);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Combinationtype {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Combinationtype();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
message.code = reader.readString();
|
||||
break;
|
||||
case 2:
|
||||
pb_1.Message.addToRepeatedField(message, 2, reader.readString());
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): Combinationtype {
|
||||
return Combinationtype.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1731,6 +1731,7 @@ export namespace graphicData {
|
||||
concentrationStations?: boolean;
|
||||
kilometerSystem?: KilometerSystem;
|
||||
index?: number;
|
||||
refIbpMapCode?: string;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
@ -1750,6 +1751,9 @@ export namespace graphicData {
|
||||
if ("index" in data && data.index != undefined) {
|
||||
this.index = data.index;
|
||||
}
|
||||
if ("refIbpMapCode" in data && data.refIbpMapCode != undefined) {
|
||||
this.refIbpMapCode = data.refIbpMapCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
@ -1788,12 +1792,19 @@ export namespace graphicData {
|
||||
set index(value: number) {
|
||||
pb_1.Message.setField(this, 7, value);
|
||||
}
|
||||
get refIbpMapCode() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
|
||||
}
|
||||
set refIbpMapCode(value: string) {
|
||||
pb_1.Message.setField(this, 8, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
concentrationStations?: boolean;
|
||||
kilometerSystem?: ReturnType<typeof KilometerSystem.prototype.toObject>;
|
||||
index?: number;
|
||||
refIbpMapCode?: string;
|
||||
}): Station {
|
||||
const message = new Station({});
|
||||
if (data.common != null) {
|
||||
@ -1811,6 +1822,9 @@ export namespace graphicData {
|
||||
if (data.index != null) {
|
||||
message.index = data.index;
|
||||
}
|
||||
if (data.refIbpMapCode != null) {
|
||||
message.refIbpMapCode = data.refIbpMapCode;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -1820,6 +1834,7 @@ export namespace graphicData {
|
||||
concentrationStations?: boolean;
|
||||
kilometerSystem?: ReturnType<typeof KilometerSystem.prototype.toObject>;
|
||||
index?: number;
|
||||
refIbpMapCode?: string;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
@ -1836,6 +1851,9 @@ export namespace graphicData {
|
||||
if (this.index != null) {
|
||||
data.index = this.index;
|
||||
}
|
||||
if (this.refIbpMapCode != null) {
|
||||
data.refIbpMapCode = this.refIbpMapCode;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -1852,6 +1870,8 @@ export namespace graphicData {
|
||||
writer.writeMessage(6, this.kilometerSystem, () => this.kilometerSystem.serialize(writer));
|
||||
if (this.index != 0)
|
||||
writer.writeInt32(7, this.index);
|
||||
if (this.refIbpMapCode.length)
|
||||
writer.writeString(8, this.refIbpMapCode);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -1876,6 +1896,9 @@ export namespace graphicData {
|
||||
case 7:
|
||||
message.index = reader.readInt32();
|
||||
break;
|
||||
case 8:
|
||||
message.refIbpMapCode = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
@ -5577,6 +5600,7 @@ export namespace graphicData {
|
||||
flip?: boolean;
|
||||
index?: number;
|
||||
refScreenDoor?: string;
|
||||
refGatedBoxMapCode?: string;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
@ -5596,6 +5620,9 @@ export namespace graphicData {
|
||||
if ("refScreenDoor" in data && data.refScreenDoor != undefined) {
|
||||
this.refScreenDoor = data.refScreenDoor;
|
||||
}
|
||||
if ("refGatedBoxMapCode" in data && data.refGatedBoxMapCode != undefined) {
|
||||
this.refGatedBoxMapCode = data.refGatedBoxMapCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
@ -5631,12 +5658,19 @@ export namespace graphicData {
|
||||
set refScreenDoor(value: string) {
|
||||
pb_1.Message.setField(this, 5, value);
|
||||
}
|
||||
get refGatedBoxMapCode() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
|
||||
}
|
||||
set refGatedBoxMapCode(value: string) {
|
||||
pb_1.Message.setField(this, 6, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
flip?: boolean;
|
||||
index?: number;
|
||||
refScreenDoor?: string;
|
||||
refGatedBoxMapCode?: string;
|
||||
}): GatedBox {
|
||||
const message = new GatedBox({});
|
||||
if (data.common != null) {
|
||||
@ -5654,6 +5688,9 @@ export namespace graphicData {
|
||||
if (data.refScreenDoor != null) {
|
||||
message.refScreenDoor = data.refScreenDoor;
|
||||
}
|
||||
if (data.refGatedBoxMapCode != null) {
|
||||
message.refGatedBoxMapCode = data.refGatedBoxMapCode;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -5663,6 +5700,7 @@ export namespace graphicData {
|
||||
flip?: boolean;
|
||||
index?: number;
|
||||
refScreenDoor?: string;
|
||||
refGatedBoxMapCode?: string;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
@ -5679,6 +5717,9 @@ export namespace graphicData {
|
||||
if (this.refScreenDoor != null) {
|
||||
data.refScreenDoor = this.refScreenDoor;
|
||||
}
|
||||
if (this.refGatedBoxMapCode != null) {
|
||||
data.refGatedBoxMapCode = this.refGatedBoxMapCode;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -5695,6 +5736,8 @@ export namespace graphicData {
|
||||
writer.writeInt32(4, this.index);
|
||||
if (this.refScreenDoor.length)
|
||||
writer.writeString(5, this.refScreenDoor);
|
||||
if (this.refGatedBoxMapCode.length)
|
||||
writer.writeString(6, this.refGatedBoxMapCode);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -5719,6 +5762,9 @@ export namespace graphicData {
|
||||
case 5:
|
||||
message.refScreenDoor = reader.readString();
|
||||
break;
|
||||
case 6:
|
||||
message.refGatedBoxMapCode = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
@ -6783,7 +6829,7 @@ export namespace graphicData {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
code?: string;
|
||||
combinationtypes?: Combinationtype[];
|
||||
combinationtypes?: DeviceCombinationtype[];
|
||||
deviceType?: RelatedRef.DeviceType;
|
||||
}) {
|
||||
super();
|
||||
@ -6807,9 +6853,9 @@ export namespace graphicData {
|
||||
pb_1.Message.setField(this, 1, value);
|
||||
}
|
||||
get combinationtypes() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, Combinationtype, 2) as Combinationtype[];
|
||||
return pb_1.Message.getRepeatedWrapperField(this, DeviceCombinationtype, 2) as DeviceCombinationtype[];
|
||||
}
|
||||
set combinationtypes(value: Combinationtype[]) {
|
||||
set combinationtypes(value: DeviceCombinationtype[]) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 2, value);
|
||||
}
|
||||
get deviceType() {
|
||||
@ -6820,7 +6866,7 @@ export namespace graphicData {
|
||||
}
|
||||
static fromObject(data: {
|
||||
code?: string;
|
||||
combinationtypes?: ReturnType<typeof Combinationtype.prototype.toObject>[];
|
||||
combinationtypes?: ReturnType<typeof DeviceCombinationtype.prototype.toObject>[];
|
||||
deviceType?: RelatedRef.DeviceType;
|
||||
}): StationRelateDevice {
|
||||
const message = new StationRelateDevice({});
|
||||
@ -6828,7 +6874,7 @@ export namespace graphicData {
|
||||
message.code = data.code;
|
||||
}
|
||||
if (data.combinationtypes != null) {
|
||||
message.combinationtypes = data.combinationtypes.map(item => Combinationtype.fromObject(item));
|
||||
message.combinationtypes = data.combinationtypes.map(item => DeviceCombinationtype.fromObject(item));
|
||||
}
|
||||
if (data.deviceType != null) {
|
||||
message.deviceType = data.deviceType;
|
||||
@ -6838,14 +6884,14 @@ export namespace graphicData {
|
||||
toObject() {
|
||||
const data: {
|
||||
code?: string;
|
||||
combinationtypes?: ReturnType<typeof Combinationtype.prototype.toObject>[];
|
||||
combinationtypes?: ReturnType<typeof DeviceCombinationtype.prototype.toObject>[];
|
||||
deviceType?: RelatedRef.DeviceType;
|
||||
} = {};
|
||||
if (this.code != null) {
|
||||
data.code = this.code;
|
||||
}
|
||||
if (this.combinationtypes != null) {
|
||||
data.combinationtypes = this.combinationtypes.map((item: Combinationtype) => item.toObject());
|
||||
data.combinationtypes = this.combinationtypes.map((item: DeviceCombinationtype) => item.toObject());
|
||||
}
|
||||
if (this.deviceType != null) {
|
||||
data.deviceType = this.deviceType;
|
||||
@ -6859,7 +6905,7 @@ export namespace graphicData {
|
||||
if (this.code.length)
|
||||
writer.writeString(1, this.code);
|
||||
if (this.combinationtypes.length)
|
||||
writer.writeRepeatedMessage(2, this.combinationtypes, (item: Combinationtype) => item.serialize(writer));
|
||||
writer.writeRepeatedMessage(2, this.combinationtypes, (item: DeviceCombinationtype) => item.serialize(writer));
|
||||
if (this.deviceType != RelatedRef.DeviceType.Section)
|
||||
writer.writeEnum(3, this.deviceType);
|
||||
if (!w)
|
||||
@ -6875,7 +6921,7 @@ export namespace graphicData {
|
||||
message.code = reader.readString();
|
||||
break;
|
||||
case 2:
|
||||
reader.readMessage(message.combinationtypes, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Combinationtype.deserialize(reader), Combinationtype));
|
||||
reader.readMessage(message.combinationtypes, () => pb_1.Message.addToRepeatedWrapperField(message, 2, DeviceCombinationtype.deserialize(reader), DeviceCombinationtype));
|
||||
break;
|
||||
case 3:
|
||||
message.deviceType = reader.readEnum();
|
||||
@ -6892,7 +6938,7 @@ export namespace graphicData {
|
||||
return StationRelateDevice.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class Combinationtype extends pb_1.Message {
|
||||
export class DeviceCombinationtype extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
code?: string;
|
||||
@ -6924,8 +6970,8 @@ export namespace graphicData {
|
||||
static fromObject(data: {
|
||||
code?: string;
|
||||
refDevices?: string[];
|
||||
}): Combinationtype {
|
||||
const message = new Combinationtype({});
|
||||
}): DeviceCombinationtype {
|
||||
const message = new DeviceCombinationtype({});
|
||||
if (data.code != null) {
|
||||
message.code = data.code;
|
||||
}
|
||||
@ -6958,8 +7004,8 @@ export namespace graphicData {
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Combinationtype {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Combinationtype();
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DeviceCombinationtype {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DeviceCombinationtype();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
@ -6978,8 +7024,8 @@ export namespace graphicData {
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): Combinationtype {
|
||||
return Combinationtype.deserialize(bytes);
|
||||
static deserializeBinary(bytes: Uint8Array): DeviceCombinationtype {
|
||||
return DeviceCombinationtype.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ import {
|
||||
} from 'src/drawApp/lineApp';
|
||||
import { markRaw } from 'vue';
|
||||
import { MapInfo } from 'src/api/ProjectLinkApi';
|
||||
import { CategoryType } from 'src/components/CategoryType';
|
||||
|
||||
export const useLineStore = defineStore('line', {
|
||||
state: () => ({
|
||||
@ -27,6 +28,7 @@ export const useLineStore = defineStore('line', {
|
||||
showLayerDialog: false, // 显示图层控制弹窗(草稿和发布图公用)
|
||||
mapId: null as number | null,
|
||||
sceneName: '', // 场景名称
|
||||
categoryType: null as CategoryType | null,
|
||||
}),
|
||||
getters: {
|
||||
selectedGraphicType: (state) => {
|
||||
@ -98,5 +100,8 @@ export const useLineStore = defineStore('line', {
|
||||
setSceneName(sceneName: string) {
|
||||
this.sceneName = sceneName;
|
||||
},
|
||||
setCategoryType(type: CategoryType | null) {
|
||||
this.categoryType = type;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user