Compare commits
3 Commits
22d3a1794a
...
d843e81fd4
Author | SHA1 | Date | |
---|---|---|---|
|
d843e81fd4 | ||
|
82fabffdb8 | ||
|
ec135451d4 |
@ -32,6 +32,11 @@
|
|||||||
<path d="M14.4091 23V11.3636H18.3409C19.2538 11.3636 20 11.5284 20.5795 11.858C21.1629 12.1837 21.5947 12.625 21.875 13.1818C22.1553 13.7386 22.2955 14.3598 22.2955 15.0455C22.2955 15.7311 22.1553 16.3542 21.875 16.9148C21.5985 17.4754 21.1705 17.9223 20.5909 18.2557C20.0114 18.5852 19.2689 18.75 18.3636 18.75H15.5455V17.5H18.3182C18.9432 17.5 19.4451 17.392 19.8239 17.1761C20.2027 16.9602 20.4773 16.6686 20.6477 16.3011C20.822 15.9299 20.9091 15.5114 20.9091 15.0455C20.9091 14.5795 20.822 14.1629 20.6477 13.7955C20.4773 13.428 20.2008 13.1402 19.8182 12.9318C19.4356 12.7197 18.928 12.6136 18.2955 12.6136H15.8182V23H14.4091Z" fill="white"/>
|
<path d="M14.4091 23V11.3636H18.3409C19.2538 11.3636 20 11.5284 20.5795 11.858C21.1629 12.1837 21.5947 12.625 21.875 13.1818C22.1553 13.7386 22.2955 14.3598 22.2955 15.0455C22.2955 15.7311 22.1553 16.3542 21.875 16.9148C21.5985 17.4754 21.1705 17.9223 20.5909 18.2557C20.0114 18.5852 19.2689 18.75 18.3636 18.75H15.5455V17.5H18.3182C18.9432 17.5 19.4451 17.392 19.8239 17.1761C20.2027 16.9602 20.4773 16.6686 20.6477 16.3011C20.822 15.9299 20.9091 15.5114 20.9091 15.0455C20.9091 14.5795 20.822 14.1629 20.6477 13.7955C20.4773 13.428 20.2008 13.1402 19.8182 12.9318C19.4356 12.7197 18.928 12.6136 18.2955 12.6136H15.8182V23H14.4091Z" fill="white"/>
|
||||||
<line y1="32" x2="35" y2="32" stroke="white" stroke-width="4"/>
|
<line y1="32" x2="35" y2="32" stroke="white" stroke-width="4"/>
|
||||||
</symbol>
|
</symbol>
|
||||||
|
<symbol id="icon-garage-door-box" viewBox="0 0 35 34" fill="none">
|
||||||
|
<rect x="1" y="1" width="33" height="32" stroke="white" stroke-width="2"/>
|
||||||
|
<path d="M17.1932 14C17.0838 13.6652 16.9396 13.3653 16.7607 13.1001C16.585 12.8317 16.3745 12.603 16.1293 12.4141C15.8873 12.2251 15.6122 12.081 15.304 11.9815C14.9957 11.8821 14.6577 11.8324 14.2898 11.8324C13.6866 11.8324 13.138 11.9882 12.6442 12.2997C12.1503 12.6113 11.7576 13.0703 11.4659 13.6768C11.1742 14.2834 11.0284 15.0275 11.0284 15.9091C11.0284 16.7907 11.1759 17.5348 11.4709 18.1413C11.7659 18.7479 12.1652 19.2069 12.669 19.5185C13.1728 19.83 13.7396 19.9858 14.3693 19.9858C14.9527 19.9858 15.4664 19.8615 15.9105 19.6129C16.358 19.361 16.706 19.0064 16.9545 18.549C17.2064 18.0883 17.3324 17.5464 17.3324 16.9233L17.7102 17.0028H14.6477V15.9091H18.5256V17.0028C18.5256 17.8414 18.3466 18.5705 17.9886 19.1903C17.634 19.8101 17.1435 20.2907 16.517 20.6321C15.8939 20.9702 15.178 21.1392 14.3693 21.1392C13.4678 21.1392 12.6757 20.9271 11.9929 20.5028C11.3134 20.0786 10.7831 19.4754 10.402 18.6932C10.0241 17.911 9.83523 16.983 9.83523 15.9091C9.83523 15.1037 9.94295 14.3795 10.1584 13.7365C10.3771 13.0902 10.6854 12.54 11.0831 12.0859C11.4808 11.6319 11.9515 11.2839 12.495 11.0419C13.0386 10.8 13.6368 10.679 14.2898 10.679C14.8267 10.679 15.3272 10.7602 15.7912 10.9226C16.2585 11.0817 16.6745 11.3087 17.0391 11.6037C17.407 11.8954 17.7135 12.245 17.9588 12.6527C18.2041 13.0571 18.3731 13.5062 18.4659 14H17.1932Z" fill="white"/>
|
||||||
|
<line y1="32" x2="35" y2="32" stroke="white" stroke-width="4"/>
|
||||||
|
</symbol>
|
||||||
<symbol id="icon-esb-button" viewBox="0 0 35 34" fill="none">
|
<symbol id="icon-esb-button" viewBox="0 0 35 34" fill="none">
|
||||||
<rect x="1" y="1" width="33" height="32" stroke="white" stroke-width="2"/>
|
<rect x="1" y="1" width="33" height="32" stroke="white" stroke-width="2"/>
|
||||||
<line y1="32" x2="35" y2="32" stroke="white" stroke-width="4"/>
|
<line y1="32" x2="35" y2="32" stroke="white" stroke-width="4"/>
|
||||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
@ -1 +1 @@
|
|||||||
Subproject commit 6dff8221d5e43e87727328fcd3260559ff13a2a3
|
Subproject commit a1534096aa1ed2566b93ffe7bfde76750de10a60
|
@ -148,6 +148,9 @@
|
|||||||
<garage-door-property
|
<garage-door-property
|
||||||
v-else-if="drawStore.selectedGraphicType === GarageDoor.Type"
|
v-else-if="drawStore.selectedGraphicType === GarageDoor.Type"
|
||||||
></garage-door-property>
|
></garage-door-property>
|
||||||
|
<garage-door-box-property
|
||||||
|
v-else-if="drawStore.selectedGraphicType === GarageDoorBox.Type"
|
||||||
|
></garage-door-box-property>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="drawStore.selectedGraphics.length > 1">
|
<template v-else-if="drawStore.selectedGraphics.length > 1">
|
||||||
@ -232,6 +235,8 @@ import GarageDoorProperty from './properties/GarageDoorProperty.vue';
|
|||||||
import { GarageDoor } from 'src/graphics/garageDoor/GarageDoor';
|
import { GarageDoor } from 'src/graphics/garageDoor/GarageDoor';
|
||||||
import CarWashingProperty from './properties/CarWashingProperty.vue';
|
import CarWashingProperty from './properties/CarWashingProperty.vue';
|
||||||
import { CarWashing } from 'src/graphics/carWashing/CarWashing';
|
import { CarWashing } from 'src/graphics/carWashing/CarWashing';
|
||||||
|
import GarageDoorBoxProperty from './properties/GarageDoorBoxProperty.vue';
|
||||||
|
import { GarageDoorBox } from 'src/graphics/garageDoorBox/GarageDoorBox';
|
||||||
|
|
||||||
const drawStore = useDrawStore();
|
const drawStore = useDrawStore();
|
||||||
</script>
|
</script>
|
||||||
|
78
src/components/draw-app/properties/GarageDoorBoxProperty.vue
Normal file
78
src/components/draw-app/properties/GarageDoorBoxProperty.vue
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
<template>
|
||||||
|
<q-form>
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
readonly
|
||||||
|
v-model="garageDoorBoxModel.id"
|
||||||
|
label="id"
|
||||||
|
hint=""
|
||||||
|
/>
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
class="q-mt-sm"
|
||||||
|
v-model="garageDoorBoxModel.code"
|
||||||
|
@blur="onUpdate"
|
||||||
|
label="编号"
|
||||||
|
/>
|
||||||
|
<q-select
|
||||||
|
outlined
|
||||||
|
class="q-mt-sm"
|
||||||
|
style="margin-top: 10px"
|
||||||
|
v-model="garageDoorBoxModel.refGarageDoorId"
|
||||||
|
:options="garageDoorList"
|
||||||
|
:map-options="true"
|
||||||
|
:emit-value="true"
|
||||||
|
@update:model-value="onUpdate"
|
||||||
|
label="关联屏蔽门"
|
||||||
|
></q-select>
|
||||||
|
<q-select
|
||||||
|
outlined
|
||||||
|
class="q-mt-sm"
|
||||||
|
@blur="onUpdate"
|
||||||
|
v-model="garageDoorBoxModel.refPslMapCode"
|
||||||
|
:options="pslNameList"
|
||||||
|
label="关联PSL地图"
|
||||||
|
/>
|
||||||
|
</q-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { GarageDoorBoxData } from 'src/drawApp/graphics/GarageDoorBoxInteraction';
|
||||||
|
import { useFormData } from 'src/components/DrawAppFormUtils';
|
||||||
|
import { useDrawStore } from 'src/stores/draw-store';
|
||||||
|
import { onMounted, reactive, ref } from 'vue';
|
||||||
|
import { getPublishList } from 'src/api/PublishApi';
|
||||||
|
import { PictureType } from 'src/protos/picture';
|
||||||
|
import { GarageDoor } from 'src/graphics/garageDoor/GarageDoor';
|
||||||
|
|
||||||
|
const { data: garageDoorBoxModel, onUpdate } = useFormData(
|
||||||
|
new GarageDoorBoxData(),
|
||||||
|
useDrawStore().getDrawApp()
|
||||||
|
);
|
||||||
|
|
||||||
|
const garageDoorList: { label: string; value: number }[] = reactive([]);
|
||||||
|
const pslNameList = ref<string[]>([]);
|
||||||
|
onMounted(() => {
|
||||||
|
const list2: string[] = [];
|
||||||
|
getPublishList({
|
||||||
|
type: PictureType.Psl,
|
||||||
|
category: useDrawStore().categoryType,
|
||||||
|
}).then((pslMapList) => {
|
||||||
|
if (pslMapList && pslMapList.length) {
|
||||||
|
pslMapList.forEach((item) => {
|
||||||
|
list2.push(item.name);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
pslNameList.value = list2;
|
||||||
|
});
|
||||||
|
const garageDoors = useDrawStore()
|
||||||
|
.getDrawApp()
|
||||||
|
.queryStore.queryByType<GarageDoor>(GarageDoor.Type);
|
||||||
|
garageDoors.forEach((p) => {
|
||||||
|
garageDoorList.push({
|
||||||
|
value: p.id,
|
||||||
|
label: `${p.datas.code}[${p.datas.id}]`,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
@ -24,6 +24,7 @@ import { PslBox } from 'src/graphics/pslBox/PslBox';
|
|||||||
import { GarageDoor } from 'src/graphics/garageDoor/GarageDoor';
|
import { GarageDoor } from 'src/graphics/garageDoor/GarageDoor';
|
||||||
import { CarWashing } from 'src/graphics/carWashing/CarWashing';
|
import { CarWashing } from 'src/graphics/carWashing/CarWashing';
|
||||||
import { FloodGate } from 'src/graphics/floodGate/FloodGate';
|
import { FloodGate } from 'src/graphics/floodGate/FloodGate';
|
||||||
|
import { GarageDoorBox } from 'src/graphics/garageDoorBox/GarageDoorBox';
|
||||||
|
|
||||||
export const drawCommonLayerList = [
|
export const drawCommonLayerList = [
|
||||||
// 图层列表 默认显示的图层defaultShow: true
|
// 图层列表 默认显示的图层defaultShow: true
|
||||||
@ -61,4 +62,5 @@ export const drawCommonLayerList = [
|
|||||||
{ label: '车库门', value: GarageDoor.Type, defaultShow: true },
|
{ label: '车库门', value: GarageDoor.Type, defaultShow: true },
|
||||||
{ label: '防淹门', value: FloodGate.Type, defaultShow: true },
|
{ label: '防淹门', value: FloodGate.Type, defaultShow: true },
|
||||||
{ label: '洗车机', value: CarWashing.Type, defaultShow: true },
|
{ label: '洗车机', value: CarWashing.Type, defaultShow: true },
|
||||||
|
{ label: '车库门设置', value: GarageDoorBox.Type, defaultShow: true },
|
||||||
];
|
];
|
||||||
|
@ -96,6 +96,15 @@ import {
|
|||||||
GatedBoxData,
|
GatedBoxData,
|
||||||
DrawGatedBoxInteraction,
|
DrawGatedBoxInteraction,
|
||||||
} from './graphics/GatedBoxInteraction';
|
} from './graphics/GatedBoxInteraction';
|
||||||
|
import {
|
||||||
|
GarageDoorBox,
|
||||||
|
GarageDoorBoxTemplate,
|
||||||
|
} from 'src/graphics/garageDoorBox/GarageDoorBox';
|
||||||
|
import {
|
||||||
|
GarageDoorBoxData,
|
||||||
|
DrawGarageDoorBoxInteraction,
|
||||||
|
} from './graphics/GarageDoorBoxInteraction';
|
||||||
|
import { GarageDoorBoxDraw } from 'src/graphics/garageDoorBox/GarageDoorBoxAssistant';
|
||||||
// import { EsbButton, EsbButtonTemplate } from 'src/graphics/esbButton/EsbButton';
|
// import { EsbButton, EsbButtonTemplate } from 'src/graphics/esbButton/EsbButton';
|
||||||
// import {
|
// import {
|
||||||
// EsbButtonData,
|
// EsbButtonData,
|
||||||
@ -223,6 +232,10 @@ export function initCommonDrawApp(app: IDrawApp) {
|
|||||||
new StopPositionDraw(app, new StopPositionTemplate(new StopPositionData()));
|
new StopPositionDraw(app, new StopPositionTemplate(new StopPositionData()));
|
||||||
new SpksSwitchDraw(app, new SpksSwitchTemplate(new SpksSwitchData()));
|
new SpksSwitchDraw(app, new SpksSwitchTemplate(new SpksSwitchData()));
|
||||||
new GatedBoxDraw(app, new GatedBoxTemplate(new GatedBoxData()));
|
new GatedBoxDraw(app, new GatedBoxTemplate(new GatedBoxData()));
|
||||||
|
new GarageDoorBoxDraw(
|
||||||
|
app,
|
||||||
|
new GarageDoorBoxTemplate(new GarageDoorBoxData())
|
||||||
|
);
|
||||||
// new EsbButtonDraw(
|
// new EsbButtonDraw(
|
||||||
// app,
|
// app,
|
||||||
// new EsbButtonTemplate(new EsbButtonData(), new EsbButtonState())
|
// new EsbButtonTemplate(new EsbButtonData(), new EsbButtonState())
|
||||||
@ -250,6 +263,7 @@ export function initCommonDrawApp(app: IDrawApp) {
|
|||||||
DrawStopPositionInteraction.init(app);
|
DrawStopPositionInteraction.init(app);
|
||||||
DrawSpksSwitchInteraction.init(app);
|
DrawSpksSwitchInteraction.init(app);
|
||||||
DrawGatedBoxInteraction.init(app);
|
DrawGatedBoxInteraction.init(app);
|
||||||
|
DrawGarageDoorBoxInteraction.init(app);
|
||||||
// DrawEsbButtonInteraction.init(app);
|
// DrawEsbButtonInteraction.init(app);
|
||||||
|
|
||||||
// 画布右键菜单
|
// 画布右键菜单
|
||||||
@ -431,6 +445,9 @@ export function loadCommonDrawDatas(
|
|||||||
storage.gateBoxs.forEach((gatedBox) => {
|
storage.gateBoxs.forEach((gatedBox) => {
|
||||||
datas.push(new GatedBoxData(gatedBox));
|
datas.push(new GatedBoxData(gatedBox));
|
||||||
});
|
});
|
||||||
|
storage.garageDoorBoxes.forEach((garageDoorBox) => {
|
||||||
|
datas.push(new GarageDoorBoxData(garageDoorBox));
|
||||||
|
});
|
||||||
// storage.esbButtons.forEach((esbButton) => {
|
// storage.esbButtons.forEach((esbButton) => {
|
||||||
// datas.push(new EsbButtonData(esbButton));
|
// datas.push(new EsbButtonData(esbButton));
|
||||||
// });
|
// });
|
||||||
@ -523,6 +540,11 @@ export function saveCommonDrawDatas(app: IDrawApp) {
|
|||||||
// } else if (EsbButton.Type === g.type) {
|
// } else if (EsbButton.Type === g.type) {
|
||||||
// const esbButtonData = (g as EsbButton).saveData();
|
// const esbButtonData = (g as EsbButton).saveData();
|
||||||
// storage.esbButtons.push((esbButtonData as EsbButtonData).data);
|
// storage.esbButtons.push((esbButtonData as EsbButtonData).data);
|
||||||
|
} else if (GarageDoorBox.Type === g.type) {
|
||||||
|
const garageDoorBoxData = (g as GarageDoorBox).saveData();
|
||||||
|
storage.garageDoorBoxes.push(
|
||||||
|
(garageDoorBoxData as GarageDoorBoxData).data
|
||||||
|
);
|
||||||
} else if (Transponder.Type === g.type) {
|
} else if (Transponder.Type === g.type) {
|
||||||
const transponderData = (g as Transponder).saveData();
|
const transponderData = (g as Transponder).saveData();
|
||||||
storage.transponders.push((transponderData as TransponderData).data);
|
storage.transponders.push((transponderData as TransponderData).data);
|
||||||
|
150
src/drawApp/graphics/GarageDoorBoxInteraction.ts
Normal file
150
src/drawApp/graphics/GarageDoorBoxInteraction.ts
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
import * as pb_1 from 'google-protobuf';
|
||||||
|
import { DisplayObject, FederatedMouseEvent } from 'pixi.js';
|
||||||
|
import {
|
||||||
|
GarageDoorBox,
|
||||||
|
IGarageDoorBox,
|
||||||
|
} from 'src/graphics/garageDoorBox/GarageDoorBox';
|
||||||
|
import {
|
||||||
|
IGraphicApp,
|
||||||
|
GraphicInteractionPlugin,
|
||||||
|
JlGraphic,
|
||||||
|
IGraphicScene,
|
||||||
|
MenuItemOptions,
|
||||||
|
ContextMenu,
|
||||||
|
} from 'jl-graphic';
|
||||||
|
|
||||||
|
import { graphicData } from 'src/protos/stationLayoutGraphics';
|
||||||
|
import { GraphicDataBase } from './GraphicDataBase';
|
||||||
|
import { usePslStore } from 'src/stores/psl-store';
|
||||||
|
|
||||||
|
export class GarageDoorBoxData
|
||||||
|
extends GraphicDataBase
|
||||||
|
implements IGarageDoorBox
|
||||||
|
{
|
||||||
|
constructor(data?: graphicData.GarageDoorBox) {
|
||||||
|
let garageDoorBox;
|
||||||
|
if (!data) {
|
||||||
|
garageDoorBox = new graphicData.GarageDoorBox({
|
||||||
|
common: GraphicDataBase.defaultCommonInfo(GarageDoorBox.Type),
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
garageDoorBox = data;
|
||||||
|
}
|
||||||
|
super(garageDoorBox);
|
||||||
|
}
|
||||||
|
|
||||||
|
public get data(): graphicData.GarageDoorBox {
|
||||||
|
return this.getData<graphicData.GarageDoorBox>();
|
||||||
|
}
|
||||||
|
get code(): string {
|
||||||
|
return this.data.code;
|
||||||
|
}
|
||||||
|
set code(v: string) {
|
||||||
|
this.data.code = v;
|
||||||
|
}
|
||||||
|
get flip(): boolean {
|
||||||
|
return this.data.flip;
|
||||||
|
}
|
||||||
|
set flip(v: boolean) {
|
||||||
|
this.data.flip = v;
|
||||||
|
}
|
||||||
|
get refGarageDoorId(): number {
|
||||||
|
return this.data.refGarageDoorId;
|
||||||
|
}
|
||||||
|
set refGarageDoorId(v: number) {
|
||||||
|
this.data.refGarageDoorId = v;
|
||||||
|
}
|
||||||
|
get refPslMapCode(): string {
|
||||||
|
return this.data.refPslMapCode;
|
||||||
|
}
|
||||||
|
set refPslMapCode(v: string) {
|
||||||
|
this.data.refPslMapCode = v;
|
||||||
|
}
|
||||||
|
clone(): GarageDoorBoxData {
|
||||||
|
return new GarageDoorBoxData(this.data.cloneMessage());
|
||||||
|
}
|
||||||
|
copyFrom(data: GarageDoorBoxData): void {
|
||||||
|
pb_1.Message.copyInto(data.data, this.data);
|
||||||
|
}
|
||||||
|
eq(other: GarageDoorBoxData): boolean {
|
||||||
|
return pb_1.Message.equals(this.data, other.data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const flipConfig: MenuItemOptions = {
|
||||||
|
name: '上下翻转',
|
||||||
|
};
|
||||||
|
const GarageDoorBoxEditMenu: ContextMenu = ContextMenu.init({
|
||||||
|
name: '设置车库门编辑菜单',
|
||||||
|
groups: [
|
||||||
|
{
|
||||||
|
items: [flipConfig],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
export class DrawGarageDoorBoxInteraction extends GraphicInteractionPlugin<GarageDoorBox> {
|
||||||
|
static Name = 'garage_door_box_draw_right_menu';
|
||||||
|
constructor(app: IGraphicApp) {
|
||||||
|
super(DrawGarageDoorBoxInteraction.Name, app);
|
||||||
|
app.registerMenu(GarageDoorBoxEditMenu);
|
||||||
|
}
|
||||||
|
static init(app: IGraphicApp) {
|
||||||
|
return new DrawGarageDoorBoxInteraction(app);
|
||||||
|
}
|
||||||
|
filter(...grahpics: JlGraphic[]): GarageDoorBox[] | undefined {
|
||||||
|
return grahpics
|
||||||
|
.filter((g) => g.type === GarageDoorBox.Type)
|
||||||
|
.map((g) => g as GarageDoorBox);
|
||||||
|
}
|
||||||
|
bind(g: GarageDoorBox): void {
|
||||||
|
g.on('_rightclick', this.onContextMenu, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
unbind(g: GarageDoorBox): void {
|
||||||
|
g.off('_rightclick', this.onContextMenu, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
onContextMenu(e: FederatedMouseEvent) {
|
||||||
|
const target = e.target as DisplayObject;
|
||||||
|
const garageDoorBox = target.getGraphic() as GarageDoorBox;
|
||||||
|
this.app.updateSelected(garageDoorBox);
|
||||||
|
flipConfig.handler = () => {
|
||||||
|
garageDoorBox.datas.flip = !garageDoorBox.datas.flip;
|
||||||
|
garageDoorBox.repaint();
|
||||||
|
};
|
||||||
|
GarageDoorBoxEditMenu.open(e.global);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class GarageDoorBoxOperateInteraction extends GraphicInteractionPlugin<GarageDoorBox> {
|
||||||
|
static Name = 'garage_door_box_operate_menu';
|
||||||
|
constructor(app: IGraphicScene) {
|
||||||
|
super(GarageDoorBoxOperateInteraction.Name, app);
|
||||||
|
}
|
||||||
|
static init(app: IGraphicScene) {
|
||||||
|
return new GarageDoorBoxOperateInteraction(app);
|
||||||
|
}
|
||||||
|
filter(...grahpics: JlGraphic[]): GarageDoorBox[] | undefined {
|
||||||
|
return grahpics
|
||||||
|
.filter((g) => g.type === GarageDoorBox.Type)
|
||||||
|
.map((g) => g as GarageDoorBox);
|
||||||
|
}
|
||||||
|
bind(g: GarageDoorBox): void {
|
||||||
|
g.eventMode = 'static';
|
||||||
|
g.cursor = 'pointer';
|
||||||
|
g.on('_leftclick', this.onLeftClick, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
unbind(g: GarageDoorBox): void {
|
||||||
|
g.eventMode = 'none';
|
||||||
|
g.off('_leftclick', this.onLeftClick, this);
|
||||||
|
}
|
||||||
|
onLeftClick(e: FederatedMouseEvent) {
|
||||||
|
const target = e.target as DisplayObject;
|
||||||
|
const garageDoorBox = target.getGraphic() as GarageDoorBox;
|
||||||
|
usePslStore().setPslParam(
|
||||||
|
garageDoorBox.datas.id,
|
||||||
|
garageDoorBox.datas.refPslMapCode
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -128,6 +128,11 @@ import {
|
|||||||
SpksSwitchOperationInteraction,
|
SpksSwitchOperationInteraction,
|
||||||
} from './graphics/SpksSwitchInteraction';
|
} from './graphics/SpksSwitchInteraction';
|
||||||
import { GatedBoxData } from './graphics/GatedBoxInteraction';
|
import { GatedBoxData } from './graphics/GatedBoxInteraction';
|
||||||
|
import { GarageDoorBoxData } from './graphics/GarageDoorBoxInteraction';
|
||||||
|
import {
|
||||||
|
GarageDoorBox,
|
||||||
|
GarageDoorBoxTemplate,
|
||||||
|
} from 'src/graphics/garageDoorBox/GarageDoorBox';
|
||||||
import {
|
import {
|
||||||
EsbButtonData,
|
EsbButtonData,
|
||||||
EsbButtonOperationInteraction,
|
EsbButtonOperationInteraction,
|
||||||
@ -169,6 +174,7 @@ import {
|
|||||||
} from 'src/graphics/trackLogicSection/TrackLogicSection';
|
} from 'src/graphics/trackLogicSection/TrackLogicSection';
|
||||||
import { TrackLogicSectionData } from './graphics/TrackLogicSectionInteraction';
|
import { TrackLogicSectionData } from './graphics/TrackLogicSectionInteraction';
|
||||||
import { GatedBoxOperateInteraction } from './graphics/GatedBoxInteraction';
|
import { GatedBoxOperateInteraction } from './graphics/GatedBoxInteraction';
|
||||||
|
import { GarageDoorBoxOperateInteraction } from './graphics/GarageDoorBoxInteraction';
|
||||||
import { CategoryType } from 'src/components/CategoryType';
|
import { CategoryType } from 'src/components/CategoryType';
|
||||||
import {
|
import {
|
||||||
AutoReturnBox,
|
AutoReturnBox,
|
||||||
@ -257,6 +263,7 @@ export const layerList = [
|
|||||||
{ label: '车库门', value: GarageDoor.Type, defaultShow: true },
|
{ label: '车库门', value: GarageDoor.Type, defaultShow: true },
|
||||||
{ label: '防淹门', value: FloodGate.Type, defaultShow: true },
|
{ label: '防淹门', value: FloodGate.Type, defaultShow: true },
|
||||||
{ label: '洗车机', value: CarWashing.Type, defaultShow: true },
|
{ label: '洗车机', value: CarWashing.Type, defaultShow: true },
|
||||||
|
{ label: '车库门设置', value: GarageDoorBox.Type, defaultShow: true },
|
||||||
];
|
];
|
||||||
|
|
||||||
let lineScene: IGraphicScene;
|
let lineScene: IGraphicScene;
|
||||||
@ -328,6 +335,7 @@ export function initLineScene(lineApp: IGraphicApp, sceneName: string) {
|
|||||||
new CarWashingTemplate(new CarWashingData()),
|
new CarWashingTemplate(new CarWashingData()),
|
||||||
new GarageDoorTemplate(new GarageDoorData()),
|
new GarageDoorTemplate(new GarageDoorData()),
|
||||||
new FloodGateTemplate(new FloodGateData()),
|
new FloodGateTemplate(new FloodGateData()),
|
||||||
|
new GarageDoorBoxTemplate(new GarageDoorBoxData()),
|
||||||
];
|
];
|
||||||
lineScene.registerGraphicTemplates(...graphicTemplate);
|
lineScene.registerGraphicTemplates(...graphicTemplate);
|
||||||
SignalOperateInteraction.init(lineScene);
|
SignalOperateInteraction.init(lineScene);
|
||||||
@ -347,6 +355,7 @@ export function initLineScene(lineApp: IGraphicApp, sceneName: string) {
|
|||||||
CarWashingOperationInteraction.init(lineScene);
|
CarWashingOperationInteraction.init(lineScene);
|
||||||
GarageDoorOperationInteraction.init(lineScene);
|
GarageDoorOperationInteraction.init(lineScene);
|
||||||
FloodGateOperationInteraction.init(lineScene);
|
FloodGateOperationInteraction.init(lineScene);
|
||||||
|
GarageDoorBoxOperateInteraction.init(lineScene);
|
||||||
if (categoryType === CategoryType.TH) {
|
if (categoryType === CategoryType.TH) {
|
||||||
GatedBoxOperateInteraction.init(lineScene);
|
GatedBoxOperateInteraction.init(lineScene);
|
||||||
}
|
}
|
||||||
@ -651,6 +660,9 @@ export async function loadLineDatas(): Promise<IGraphicStorage> {
|
|||||||
storage.floodGates.forEach((floodGate) => {
|
storage.floodGates.forEach((floodGate) => {
|
||||||
datas.push(new FloodGateData(floodGate));
|
datas.push(new FloodGateData(floodGate));
|
||||||
});
|
});
|
||||||
|
storage.garageDoorBoxes.forEach((garageDoorBox) => {
|
||||||
|
datas.push(new GarageDoorBoxData(garageDoorBox));
|
||||||
|
});
|
||||||
// const linkIdGenerator = new IdGenerator(Link.Type);
|
// const linkIdGenerator = new IdGenerator(Link.Type);
|
||||||
// storage.CalculateLink.forEach((link) => {
|
// storage.CalculateLink.forEach((link) => {
|
||||||
// const g = new LinkData(link);
|
// const g = new LinkData(link);
|
||||||
|
110
src/graphics/garageDoorBox/GarageDoorBox.ts
Normal file
110
src/graphics/garageDoorBox/GarageDoorBox.ts
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
import { Graphics } from 'pixi.js';
|
||||||
|
import {
|
||||||
|
GraphicData,
|
||||||
|
JlGraphic,
|
||||||
|
JlGraphicTemplate,
|
||||||
|
VectorText,
|
||||||
|
} from 'jl-graphic';
|
||||||
|
|
||||||
|
export interface IGarageDoorBox extends GraphicData {
|
||||||
|
get code(): string;
|
||||||
|
set code(v: string);
|
||||||
|
get flip(): boolean;
|
||||||
|
set flip(v: boolean);
|
||||||
|
get refGarageDoorId(): number;
|
||||||
|
set refGarageDoorId(v: number);
|
||||||
|
get refPslMapCode(): string;
|
||||||
|
set refPslMapCode(v: string);
|
||||||
|
clone(): IGarageDoorBox;
|
||||||
|
copyFrom(data: IGarageDoorBox): void;
|
||||||
|
eq(other: IGarageDoorBox): boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
const garageDoorBoxConsts = {
|
||||||
|
codeFontSize: 12,
|
||||||
|
codeColor: 0xffffff,
|
||||||
|
bodyLineColor: 0xffffff,
|
||||||
|
bodyLineWidth: 4,
|
||||||
|
bodyRectLineColor: 0xffffff,
|
||||||
|
bodyRectLineWidth: 2,
|
||||||
|
bodyRectWidth: 20,
|
||||||
|
bodyRectHeight: 20,
|
||||||
|
bodyColor: 0x000000,
|
||||||
|
};
|
||||||
|
export class GarageDoorBox extends JlGraphic {
|
||||||
|
static Type = 'garageDoorBox';
|
||||||
|
codeGraph: VectorText = new VectorText('');
|
||||||
|
rectBody: Graphics = new Graphics();
|
||||||
|
lineBody: Graphics = new Graphics();
|
||||||
|
textGraph: VectorText = new VectorText('G');
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super(GarageDoorBox.Type);
|
||||||
|
this.addChild(this.codeGraph);
|
||||||
|
this.addChild(this.rectBody);
|
||||||
|
this.addChild(this.lineBody);
|
||||||
|
this.addChild(this.textGraph);
|
||||||
|
this.codeGraph.name = 'g_d_b_code';
|
||||||
|
}
|
||||||
|
get code(): string {
|
||||||
|
return this.datas.code;
|
||||||
|
}
|
||||||
|
get datas(): IGarageDoorBox {
|
||||||
|
return this.getDatas<IGarageDoorBox>();
|
||||||
|
}
|
||||||
|
doRepaint(): void {
|
||||||
|
const codeGraph = this.codeGraph;
|
||||||
|
codeGraph.text = this.datas.code;
|
||||||
|
codeGraph.style.fill = garageDoorBoxConsts.codeColor;
|
||||||
|
codeGraph.setVectorFontSize(garageDoorBoxConsts.codeFontSize);
|
||||||
|
const codeTransform = this.datas?.childTransforms?.find(
|
||||||
|
(item) => item.name === 'g_d_b_code'
|
||||||
|
);
|
||||||
|
if (codeTransform) {
|
||||||
|
const position = codeTransform?.transform.position;
|
||||||
|
const rotation = codeTransform?.transform?.rotation;
|
||||||
|
codeGraph.position.set(position?.x, position?.y);
|
||||||
|
codeGraph.rotation = rotation || 0;
|
||||||
|
} else {
|
||||||
|
codeGraph.position.set(20, 0);
|
||||||
|
}
|
||||||
|
codeGraph.anchor.set(0.5);
|
||||||
|
this.textGraph.style.fill = garageDoorBoxConsts.codeColor;
|
||||||
|
this.textGraph.setVectorFontSize(garageDoorBoxConsts.codeFontSize);
|
||||||
|
this.textGraph.anchor.set(0.5);
|
||||||
|
this.rectBody.clear();
|
||||||
|
this.rectBody.beginFill(garageDoorBoxConsts.bodyColor, 0);
|
||||||
|
this.rectBody.lineStyle(
|
||||||
|
garageDoorBoxConsts.bodyRectLineWidth,
|
||||||
|
garageDoorBoxConsts.bodyRectLineColor
|
||||||
|
);
|
||||||
|
this.rectBody.drawRect(
|
||||||
|
-garageDoorBoxConsts.bodyRectWidth / 2,
|
||||||
|
-garageDoorBoxConsts.bodyRectHeight / 2,
|
||||||
|
garageDoorBoxConsts.bodyRectWidth,
|
||||||
|
garageDoorBoxConsts.bodyRectHeight
|
||||||
|
);
|
||||||
|
this.rectBody.endFill();
|
||||||
|
this.lineBody.clear();
|
||||||
|
const lineY = this.datas.flip
|
||||||
|
? garageDoorBoxConsts.bodyRectHeight / 2
|
||||||
|
: -garageDoorBoxConsts.bodyRectHeight / 2;
|
||||||
|
this.lineBody.lineStyle(
|
||||||
|
garageDoorBoxConsts.bodyLineWidth,
|
||||||
|
garageDoorBoxConsts.bodyLineColor
|
||||||
|
);
|
||||||
|
this.lineBody.moveTo(-garageDoorBoxConsts.bodyRectWidth / 2, lineY);
|
||||||
|
this.lineBody.lineTo(garageDoorBoxConsts.bodyRectWidth / 2, lineY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class GarageDoorBoxTemplate extends JlGraphicTemplate<GarageDoorBox> {
|
||||||
|
constructor(dataTemplate: IGarageDoorBox) {
|
||||||
|
super(GarageDoorBox.Type, { dataTemplate });
|
||||||
|
}
|
||||||
|
new(): GarageDoorBox {
|
||||||
|
const garageDoorBox = new GarageDoorBox();
|
||||||
|
garageDoorBox.loadData(this.datas);
|
||||||
|
return garageDoorBox;
|
||||||
|
}
|
||||||
|
}
|
132
src/graphics/garageDoorBox/GarageDoorBoxAssistant.ts
Normal file
132
src/graphics/garageDoorBox/GarageDoorBoxAssistant.ts
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
import { DisplayObject, FederatedMouseEvent, Point } from 'pixi.js';
|
||||||
|
import {
|
||||||
|
AbsorbableLine,
|
||||||
|
AbsorbablePosition,
|
||||||
|
GraphicDrawAssistant,
|
||||||
|
GraphicInteractionPlugin,
|
||||||
|
GraphicTransformEvent,
|
||||||
|
IDrawApp,
|
||||||
|
JlGraphic,
|
||||||
|
} from 'jl-graphic';
|
||||||
|
import {
|
||||||
|
GarageDoorBox,
|
||||||
|
GarageDoorBoxTemplate,
|
||||||
|
IGarageDoorBox,
|
||||||
|
} from './GarageDoorBox';
|
||||||
|
|
||||||
|
export interface IGarageDoorBoxDrawOptions {
|
||||||
|
newData: () => IGarageDoorBox;
|
||||||
|
}
|
||||||
|
export class GarageDoorBoxDraw extends GraphicDrawAssistant<
|
||||||
|
GarageDoorBoxTemplate,
|
||||||
|
IGarageDoorBox
|
||||||
|
> {
|
||||||
|
_garageDoorBox: GarageDoorBox | null = null;
|
||||||
|
constructor(app: IDrawApp, template: GarageDoorBoxTemplate) {
|
||||||
|
super(
|
||||||
|
app,
|
||||||
|
template,
|
||||||
|
'svguse:../../drawIcon.svg#icon-garage-door-box',
|
||||||
|
'设置车库门GarageDoorBox'
|
||||||
|
);
|
||||||
|
GarageDoorBoxInteraction.init(app);
|
||||||
|
}
|
||||||
|
public get garageDoorBox(): GarageDoorBox {
|
||||||
|
if (!this._garageDoorBox) {
|
||||||
|
this._garageDoorBox = this.graphicTemplate.new();
|
||||||
|
this._garageDoorBox.loadData(this.graphicTemplate.datas);
|
||||||
|
this.container.addChild(this._garageDoorBox);
|
||||||
|
}
|
||||||
|
return this._garageDoorBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
onLeftUp(e: FederatedMouseEvent): void {
|
||||||
|
this.container.position.copyFrom(this.toCanvasCoordinates(e.global));
|
||||||
|
this.createAndStore(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
redraw(p: Point): void {
|
||||||
|
this.garageDoorBox.repaint();
|
||||||
|
this.container.position.set(p.x, p.y);
|
||||||
|
}
|
||||||
|
|
||||||
|
prepareData(data: IGarageDoorBox): boolean {
|
||||||
|
data.transform = this.container.saveTransform();
|
||||||
|
data.code = 'G';
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 构建吸附线
|
||||||
|
* @param garageDoorBox
|
||||||
|
*/
|
||||||
|
function buildAbsorbablePositions(
|
||||||
|
garageDoorBox: GarageDoorBox
|
||||||
|
): AbsorbablePosition[] {
|
||||||
|
const aps: AbsorbablePosition[] = [];
|
||||||
|
const garageDoorBoxs = garageDoorBox.queryStore.queryByType<GarageDoorBox>(
|
||||||
|
GarageDoorBox.Type
|
||||||
|
);
|
||||||
|
const canvas = garageDoorBox.getCanvas();
|
||||||
|
garageDoorBoxs.forEach((item) => {
|
||||||
|
if (item.id === garageDoorBox.id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const ala = new AbsorbableLine(
|
||||||
|
new Point(item.x, 0),
|
||||||
|
new Point(item.x, canvas.height)
|
||||||
|
);
|
||||||
|
const alb = new AbsorbableLine(
|
||||||
|
new Point(0, item.y),
|
||||||
|
new Point(canvas.width, item.y)
|
||||||
|
);
|
||||||
|
aps.push(ala);
|
||||||
|
aps.push(alb);
|
||||||
|
});
|
||||||
|
return aps;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class GarageDoorBoxInteraction extends GraphicInteractionPlugin<GarageDoorBox> {
|
||||||
|
static Name = 'garage_door_box_transform';
|
||||||
|
constructor(app: IDrawApp) {
|
||||||
|
super(GarageDoorBoxInteraction.Name, app);
|
||||||
|
}
|
||||||
|
static init(app: IDrawApp) {
|
||||||
|
return new GarageDoorBoxInteraction(app);
|
||||||
|
}
|
||||||
|
filter(...grahpics: JlGraphic[]): GarageDoorBox[] | undefined {
|
||||||
|
return grahpics
|
||||||
|
.filter((g) => g.type === GarageDoorBox.Type)
|
||||||
|
.map((g) => g as GarageDoorBox);
|
||||||
|
}
|
||||||
|
bind(g: GarageDoorBox): void {
|
||||||
|
g.eventMode = 'static';
|
||||||
|
g.cursor = 'pointer';
|
||||||
|
g.scalable = true;
|
||||||
|
g.rotatable = true;
|
||||||
|
g.codeGraph.draggable = true;
|
||||||
|
g.codeGraph.selectable = true;
|
||||||
|
g.codeGraph.rotatable = true;
|
||||||
|
g.codeGraph.transformSave = true;
|
||||||
|
g.codeGraph.eventMode = 'static';
|
||||||
|
g.on('transformstart', this.transformstart, this);
|
||||||
|
}
|
||||||
|
unbind(g: GarageDoorBox): void {
|
||||||
|
g.eventMode = 'none';
|
||||||
|
g.scalable = false;
|
||||||
|
g.rotatable = false;
|
||||||
|
g.codeGraph.draggable = false;
|
||||||
|
g.codeGraph.selectable = false;
|
||||||
|
g.codeGraph.rotatable = false;
|
||||||
|
g.codeGraph.transformSave = false;
|
||||||
|
g.codeGraph.eventMode = 'none';
|
||||||
|
g.off('transformstart', this.transformstart, this);
|
||||||
|
}
|
||||||
|
transformstart(e: GraphicTransformEvent) {
|
||||||
|
const target = e.target as DisplayObject;
|
||||||
|
const garageDoorBox = target.getGraphic() as GarageDoorBox;
|
||||||
|
garageDoorBox.getGraphicApp().setOptions({
|
||||||
|
absorbablePositions: buildAbsorbablePositions(garageDoorBox),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -277,6 +277,7 @@ import { PslBox } from 'src/graphics/pslBox/PslBox';
|
|||||||
import { CarWashing } from 'src/graphics/carWashing/CarWashing';
|
import { CarWashing } from 'src/graphics/carWashing/CarWashing';
|
||||||
import { FloodGate } from 'src/graphics/floodGate/FloodGate';
|
import { FloodGate } from 'src/graphics/floodGate/FloodGate';
|
||||||
import { GarageDoor } from 'src/graphics/garageDoor/GarageDoor';
|
import { GarageDoor } from 'src/graphics/garageDoor/GarageDoor';
|
||||||
|
import { GarageDoorBox } from 'src/graphics/garageDoorBox/GarageDoorBox';
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@ -445,6 +446,7 @@ onMounted(() => {
|
|||||||
CarWashing.Type,
|
CarWashing.Type,
|
||||||
FloodGate.Type,
|
FloodGate.Type,
|
||||||
GarageDoor.Type,
|
GarageDoor.Type,
|
||||||
|
GarageDoorBox.Type,
|
||||||
];
|
];
|
||||||
switch (drawStore.categoryType) {
|
switch (drawStore.categoryType) {
|
||||||
case CategoryType.TH:
|
case CategoryType.TH:
|
||||||
|
@ -1957,4 +1957,470 @@ export namespace request {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
export class CkmOperationReq extends pb_1.Message {
|
||||||
|
#one_of_decls: number[][] = [];
|
||||||
|
constructor(data?: any[] | {
|
||||||
|
simulationId?: string;
|
||||||
|
mapId?: number;
|
||||||
|
deviceId?: number;
|
||||||
|
operation?: Ckm.Operation;
|
||||||
|
param?: CkmParam;
|
||||||
|
}) {
|
||||||
|
super();
|
||||||
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||||
|
if (!Array.isArray(data) && typeof data == "object") {
|
||||||
|
if ("simulationId" in data && data.simulationId != undefined) {
|
||||||
|
this.simulationId = data.simulationId;
|
||||||
|
}
|
||||||
|
if ("mapId" in data && data.mapId != undefined) {
|
||||||
|
this.mapId = data.mapId;
|
||||||
|
}
|
||||||
|
if ("deviceId" in data && data.deviceId != undefined) {
|
||||||
|
this.deviceId = data.deviceId;
|
||||||
|
}
|
||||||
|
if ("operation" in data && data.operation != undefined) {
|
||||||
|
this.operation = data.operation;
|
||||||
|
}
|
||||||
|
if ("param" in data && data.param != undefined) {
|
||||||
|
this.param = data.param;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
get simulationId() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
||||||
|
}
|
||||||
|
set simulationId(value: string) {
|
||||||
|
pb_1.Message.setField(this, 1, value);
|
||||||
|
}
|
||||||
|
get mapId() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
|
||||||
|
}
|
||||||
|
set mapId(value: number) {
|
||||||
|
pb_1.Message.setField(this, 2, value);
|
||||||
|
}
|
||||||
|
get deviceId() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
|
||||||
|
}
|
||||||
|
set deviceId(value: number) {
|
||||||
|
pb_1.Message.setField(this, 3, value);
|
||||||
|
}
|
||||||
|
get operation() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 4, Ckm.Operation.Undefined) as Ckm.Operation;
|
||||||
|
}
|
||||||
|
set operation(value: Ckm.Operation) {
|
||||||
|
pb_1.Message.setField(this, 4, value);
|
||||||
|
}
|
||||||
|
get param() {
|
||||||
|
return pb_1.Message.getWrapperField(this, CkmParam, 5) as CkmParam;
|
||||||
|
}
|
||||||
|
set param(value: CkmParam) {
|
||||||
|
pb_1.Message.setWrapperField(this, 5, value);
|
||||||
|
}
|
||||||
|
get has_param() {
|
||||||
|
return pb_1.Message.getField(this, 5) != null;
|
||||||
|
}
|
||||||
|
static fromObject(data: {
|
||||||
|
simulationId?: string;
|
||||||
|
mapId?: number;
|
||||||
|
deviceId?: number;
|
||||||
|
operation?: Ckm.Operation;
|
||||||
|
param?: ReturnType<typeof CkmParam.prototype.toObject>;
|
||||||
|
}): CkmOperationReq {
|
||||||
|
const message = new CkmOperationReq({});
|
||||||
|
if (data.simulationId != null) {
|
||||||
|
message.simulationId = data.simulationId;
|
||||||
|
}
|
||||||
|
if (data.mapId != null) {
|
||||||
|
message.mapId = data.mapId;
|
||||||
|
}
|
||||||
|
if (data.deviceId != null) {
|
||||||
|
message.deviceId = data.deviceId;
|
||||||
|
}
|
||||||
|
if (data.operation != null) {
|
||||||
|
message.operation = data.operation;
|
||||||
|
}
|
||||||
|
if (data.param != null) {
|
||||||
|
message.param = CkmParam.fromObject(data.param);
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
toObject() {
|
||||||
|
const data: {
|
||||||
|
simulationId?: string;
|
||||||
|
mapId?: number;
|
||||||
|
deviceId?: number;
|
||||||
|
operation?: Ckm.Operation;
|
||||||
|
param?: ReturnType<typeof CkmParam.prototype.toObject>;
|
||||||
|
} = {};
|
||||||
|
if (this.simulationId != null) {
|
||||||
|
data.simulationId = this.simulationId;
|
||||||
|
}
|
||||||
|
if (this.mapId != null) {
|
||||||
|
data.mapId = this.mapId;
|
||||||
|
}
|
||||||
|
if (this.deviceId != null) {
|
||||||
|
data.deviceId = this.deviceId;
|
||||||
|
}
|
||||||
|
if (this.operation != null) {
|
||||||
|
data.operation = this.operation;
|
||||||
|
}
|
||||||
|
if (this.param != null) {
|
||||||
|
data.param = this.param.toObject();
|
||||||
|
}
|
||||||
|
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.simulationId.length)
|
||||||
|
writer.writeString(1, this.simulationId);
|
||||||
|
if (this.mapId != 0)
|
||||||
|
writer.writeInt32(2, this.mapId);
|
||||||
|
if (this.deviceId != 0)
|
||||||
|
writer.writeUint32(3, this.deviceId);
|
||||||
|
if (this.operation != Ckm.Operation.Undefined)
|
||||||
|
writer.writeEnum(4, this.operation);
|
||||||
|
if (this.has_param)
|
||||||
|
writer.writeMessage(5, this.param, () => this.param.serialize(writer));
|
||||||
|
if (!w)
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
}
|
||||||
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CkmOperationReq {
|
||||||
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CkmOperationReq();
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup())
|
||||||
|
break;
|
||||||
|
switch (reader.getFieldNumber()) {
|
||||||
|
case 1:
|
||||||
|
message.simulationId = reader.readString();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
message.mapId = reader.readInt32();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
message.deviceId = reader.readUint32();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
message.operation = reader.readEnum();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
reader.readMessage(message.param, () => message.param = CkmParam.deserialize(reader));
|
||||||
|
break;
|
||||||
|
default: reader.skipField();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
serializeBinary(): Uint8Array {
|
||||||
|
return this.serialize();
|
||||||
|
}
|
||||||
|
static deserializeBinary(bytes: Uint8Array): CkmOperationReq {
|
||||||
|
return CkmOperationReq.deserialize(bytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export class Ckm 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: {}): Ckm {
|
||||||
|
const message = new Ckm({});
|
||||||
|
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): Ckm {
|
||||||
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Ckm();
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup())
|
||||||
|
break;
|
||||||
|
switch (reader.getFieldNumber()) {
|
||||||
|
default: reader.skipField();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
serializeBinary(): Uint8Array {
|
||||||
|
return this.serialize();
|
||||||
|
}
|
||||||
|
static deserializeBinary(bytes: Uint8Array): Ckm {
|
||||||
|
return Ckm.deserialize(bytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export namespace Ckm {
|
||||||
|
export enum Operation {
|
||||||
|
Undefined = 0,
|
||||||
|
SetParams = 1
|
||||||
|
}
|
||||||
|
export enum Force {
|
||||||
|
F_NONE = 0,
|
||||||
|
F_KM = 1,
|
||||||
|
F_GM = 2
|
||||||
|
}
|
||||||
|
export enum Fault {
|
||||||
|
FA_NONE = 0,
|
||||||
|
FA_State_Loss = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export class CkmParam extends pb_1.Message {
|
||||||
|
#one_of_decls: number[][] = [];
|
||||||
|
constructor(data?: any[] | {
|
||||||
|
force?: Ckm.Force;
|
||||||
|
fault?: Ckm.Fault;
|
||||||
|
}) {
|
||||||
|
super();
|
||||||
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||||
|
if (!Array.isArray(data) && typeof data == "object") {
|
||||||
|
if ("force" in data && data.force != undefined) {
|
||||||
|
this.force = data.force;
|
||||||
|
}
|
||||||
|
if ("fault" in data && data.fault != undefined) {
|
||||||
|
this.fault = data.fault;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
get force() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 1, Ckm.Force.F_NONE) as Ckm.Force;
|
||||||
|
}
|
||||||
|
set force(value: Ckm.Force) {
|
||||||
|
pb_1.Message.setField(this, 1, value);
|
||||||
|
}
|
||||||
|
get fault() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 2, Ckm.Fault.FA_NONE) as Ckm.Fault;
|
||||||
|
}
|
||||||
|
set fault(value: Ckm.Fault) {
|
||||||
|
pb_1.Message.setField(this, 2, value);
|
||||||
|
}
|
||||||
|
static fromObject(data: {
|
||||||
|
force?: Ckm.Force;
|
||||||
|
fault?: Ckm.Fault;
|
||||||
|
}): CkmParam {
|
||||||
|
const message = new CkmParam({});
|
||||||
|
if (data.force != null) {
|
||||||
|
message.force = data.force;
|
||||||
|
}
|
||||||
|
if (data.fault != null) {
|
||||||
|
message.fault = data.fault;
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
toObject() {
|
||||||
|
const data: {
|
||||||
|
force?: Ckm.Force;
|
||||||
|
fault?: Ckm.Fault;
|
||||||
|
} = {};
|
||||||
|
if (this.force != null) {
|
||||||
|
data.force = this.force;
|
||||||
|
}
|
||||||
|
if (this.fault != null) {
|
||||||
|
data.fault = this.fault;
|
||||||
|
}
|
||||||
|
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.force != Ckm.Force.F_NONE)
|
||||||
|
writer.writeEnum(1, this.force);
|
||||||
|
if (this.fault != Ckm.Fault.FA_NONE)
|
||||||
|
writer.writeEnum(2, this.fault);
|
||||||
|
if (!w)
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
}
|
||||||
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CkmParam {
|
||||||
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CkmParam();
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup())
|
||||||
|
break;
|
||||||
|
switch (reader.getFieldNumber()) {
|
||||||
|
case 1:
|
||||||
|
message.force = reader.readEnum();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
message.fault = reader.readEnum();
|
||||||
|
break;
|
||||||
|
default: reader.skipField();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
serializeBinary(): Uint8Array {
|
||||||
|
return this.serialize();
|
||||||
|
}
|
||||||
|
static deserializeBinary(bytes: Uint8Array): CkmParam {
|
||||||
|
return CkmParam.deserialize(bytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export class CkmBoxOperationReq extends pb_1.Message {
|
||||||
|
#one_of_decls: number[][] = [];
|
||||||
|
constructor(data?: any[] | {
|
||||||
|
simulationId?: string;
|
||||||
|
mapId?: number;
|
||||||
|
ckmBoxId?: number;
|
||||||
|
buttonCode?: string;
|
||||||
|
down?: boolean;
|
||||||
|
}) {
|
||||||
|
super();
|
||||||
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||||
|
if (!Array.isArray(data) && typeof data == "object") {
|
||||||
|
if ("simulationId" in data && data.simulationId != undefined) {
|
||||||
|
this.simulationId = data.simulationId;
|
||||||
|
}
|
||||||
|
if ("mapId" in data && data.mapId != undefined) {
|
||||||
|
this.mapId = data.mapId;
|
||||||
|
}
|
||||||
|
if ("ckmBoxId" in data && data.ckmBoxId != undefined) {
|
||||||
|
this.ckmBoxId = data.ckmBoxId;
|
||||||
|
}
|
||||||
|
if ("buttonCode" in data && data.buttonCode != undefined) {
|
||||||
|
this.buttonCode = data.buttonCode;
|
||||||
|
}
|
||||||
|
if ("down" in data && data.down != undefined) {
|
||||||
|
this.down = data.down;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
get simulationId() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
||||||
|
}
|
||||||
|
set simulationId(value: string) {
|
||||||
|
pb_1.Message.setField(this, 1, value);
|
||||||
|
}
|
||||||
|
get mapId() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
|
||||||
|
}
|
||||||
|
set mapId(value: number) {
|
||||||
|
pb_1.Message.setField(this, 2, value);
|
||||||
|
}
|
||||||
|
get ckmBoxId() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
|
||||||
|
}
|
||||||
|
set ckmBoxId(value: number) {
|
||||||
|
pb_1.Message.setField(this, 3, value);
|
||||||
|
}
|
||||||
|
get buttonCode() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
|
||||||
|
}
|
||||||
|
set buttonCode(value: string) {
|
||||||
|
pb_1.Message.setField(this, 4, value);
|
||||||
|
}
|
||||||
|
get down() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean;
|
||||||
|
}
|
||||||
|
set down(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 5, value);
|
||||||
|
}
|
||||||
|
static fromObject(data: {
|
||||||
|
simulationId?: string;
|
||||||
|
mapId?: number;
|
||||||
|
ckmBoxId?: number;
|
||||||
|
buttonCode?: string;
|
||||||
|
down?: boolean;
|
||||||
|
}): CkmBoxOperationReq {
|
||||||
|
const message = new CkmBoxOperationReq({});
|
||||||
|
if (data.simulationId != null) {
|
||||||
|
message.simulationId = data.simulationId;
|
||||||
|
}
|
||||||
|
if (data.mapId != null) {
|
||||||
|
message.mapId = data.mapId;
|
||||||
|
}
|
||||||
|
if (data.ckmBoxId != null) {
|
||||||
|
message.ckmBoxId = data.ckmBoxId;
|
||||||
|
}
|
||||||
|
if (data.buttonCode != null) {
|
||||||
|
message.buttonCode = data.buttonCode;
|
||||||
|
}
|
||||||
|
if (data.down != null) {
|
||||||
|
message.down = data.down;
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
toObject() {
|
||||||
|
const data: {
|
||||||
|
simulationId?: string;
|
||||||
|
mapId?: number;
|
||||||
|
ckmBoxId?: number;
|
||||||
|
buttonCode?: string;
|
||||||
|
down?: boolean;
|
||||||
|
} = {};
|
||||||
|
if (this.simulationId != null) {
|
||||||
|
data.simulationId = this.simulationId;
|
||||||
|
}
|
||||||
|
if (this.mapId != null) {
|
||||||
|
data.mapId = this.mapId;
|
||||||
|
}
|
||||||
|
if (this.ckmBoxId != null) {
|
||||||
|
data.ckmBoxId = this.ckmBoxId;
|
||||||
|
}
|
||||||
|
if (this.buttonCode != null) {
|
||||||
|
data.buttonCode = this.buttonCode;
|
||||||
|
}
|
||||||
|
if (this.down != null) {
|
||||||
|
data.down = this.down;
|
||||||
|
}
|
||||||
|
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.simulationId.length)
|
||||||
|
writer.writeString(1, this.simulationId);
|
||||||
|
if (this.mapId != 0)
|
||||||
|
writer.writeInt32(2, this.mapId);
|
||||||
|
if (this.ckmBoxId != 0)
|
||||||
|
writer.writeUint32(3, this.ckmBoxId);
|
||||||
|
if (this.buttonCode.length)
|
||||||
|
writer.writeString(4, this.buttonCode);
|
||||||
|
if (this.down != false)
|
||||||
|
writer.writeBool(5, this.down);
|
||||||
|
if (!w)
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
}
|
||||||
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CkmBoxOperationReq {
|
||||||
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CkmBoxOperationReq();
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup())
|
||||||
|
break;
|
||||||
|
switch (reader.getFieldNumber()) {
|
||||||
|
case 1:
|
||||||
|
message.simulationId = reader.readString();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
message.mapId = reader.readInt32();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
message.ckmBoxId = reader.readUint32();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
message.buttonCode = reader.readString();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
message.down = reader.readBool();
|
||||||
|
break;
|
||||||
|
default: reader.skipField();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
serializeBinary(): Uint8Array {
|
||||||
|
return this.serialize();
|
||||||
|
}
|
||||||
|
static deserializeBinary(bytes: Uint8Array): CkmBoxOperationReq {
|
||||||
|
return CkmBoxOperationReq.deserialize(bytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,9 +55,10 @@ export namespace graphicData {
|
|||||||
carWashings?: CarWashing[];
|
carWashings?: CarWashing[];
|
||||||
garageDoors?: GarageDoor[];
|
garageDoors?: GarageDoor[];
|
||||||
floodGates?: FloodGate[];
|
floodGates?: FloodGate[];
|
||||||
|
garageDoorBoxes?: GarageDoorBox[];
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 32, 33, 34, 35, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 32, 33, 34, 35, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], this.#one_of_decls);
|
||||||
if (!Array.isArray(data) && typeof data == "object") {
|
if (!Array.isArray(data) && typeof data == "object") {
|
||||||
if ("canvas" in data && data.canvas != undefined) {
|
if ("canvas" in data && data.canvas != undefined) {
|
||||||
this.canvas = data.canvas;
|
this.canvas = data.canvas;
|
||||||
@ -185,6 +186,9 @@ export namespace graphicData {
|
|||||||
if ("floodGates" in data && data.floodGates != undefined) {
|
if ("floodGates" in data && data.floodGates != undefined) {
|
||||||
this.floodGates = data.floodGates;
|
this.floodGates = data.floodGates;
|
||||||
}
|
}
|
||||||
|
if ("garageDoorBoxes" in data && data.garageDoorBoxes != undefined) {
|
||||||
|
this.garageDoorBoxes = data.garageDoorBoxes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get canvas() {
|
get canvas() {
|
||||||
@ -451,6 +455,12 @@ export namespace graphicData {
|
|||||||
set floodGates(value: FloodGate[]) {
|
set floodGates(value: FloodGate[]) {
|
||||||
pb_1.Message.setRepeatedWrapperField(this, 47, value);
|
pb_1.Message.setRepeatedWrapperField(this, 47, value);
|
||||||
}
|
}
|
||||||
|
get garageDoorBoxes() {
|
||||||
|
return pb_1.Message.getRepeatedWrapperField(this, GarageDoorBox, 48) as GarageDoorBox[];
|
||||||
|
}
|
||||||
|
set garageDoorBoxes(value: GarageDoorBox[]) {
|
||||||
|
pb_1.Message.setRepeatedWrapperField(this, 48, value);
|
||||||
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
canvas?: ReturnType<typeof Canvas.prototype.toObject>;
|
canvas?: ReturnType<typeof Canvas.prototype.toObject>;
|
||||||
Platforms?: ReturnType<typeof Platform.prototype.toObject>[];
|
Platforms?: ReturnType<typeof Platform.prototype.toObject>[];
|
||||||
@ -494,6 +504,7 @@ export namespace graphicData {
|
|||||||
carWashings?: ReturnType<typeof CarWashing.prototype.toObject>[];
|
carWashings?: ReturnType<typeof CarWashing.prototype.toObject>[];
|
||||||
garageDoors?: ReturnType<typeof GarageDoor.prototype.toObject>[];
|
garageDoors?: ReturnType<typeof GarageDoor.prototype.toObject>[];
|
||||||
floodGates?: ReturnType<typeof FloodGate.prototype.toObject>[];
|
floodGates?: ReturnType<typeof FloodGate.prototype.toObject>[];
|
||||||
|
garageDoorBoxes?: ReturnType<typeof GarageDoorBox.prototype.toObject>[];
|
||||||
}): RtssGraphicStorage {
|
}): RtssGraphicStorage {
|
||||||
const message = new RtssGraphicStorage({});
|
const message = new RtssGraphicStorage({});
|
||||||
if (data.canvas != null) {
|
if (data.canvas != null) {
|
||||||
@ -622,6 +633,9 @@ export namespace graphicData {
|
|||||||
if (data.floodGates != null) {
|
if (data.floodGates != null) {
|
||||||
message.floodGates = data.floodGates.map(item => FloodGate.fromObject(item));
|
message.floodGates = data.floodGates.map(item => FloodGate.fromObject(item));
|
||||||
}
|
}
|
||||||
|
if (data.garageDoorBoxes != null) {
|
||||||
|
message.garageDoorBoxes = data.garageDoorBoxes.map(item => GarageDoorBox.fromObject(item));
|
||||||
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
toObject() {
|
toObject() {
|
||||||
@ -668,6 +682,7 @@ export namespace graphicData {
|
|||||||
carWashings?: ReturnType<typeof CarWashing.prototype.toObject>[];
|
carWashings?: ReturnType<typeof CarWashing.prototype.toObject>[];
|
||||||
garageDoors?: ReturnType<typeof GarageDoor.prototype.toObject>[];
|
garageDoors?: ReturnType<typeof GarageDoor.prototype.toObject>[];
|
||||||
floodGates?: ReturnType<typeof FloodGate.prototype.toObject>[];
|
floodGates?: ReturnType<typeof FloodGate.prototype.toObject>[];
|
||||||
|
garageDoorBoxes?: ReturnType<typeof GarageDoorBox.prototype.toObject>[];
|
||||||
} = {};
|
} = {};
|
||||||
if (this.canvas != null) {
|
if (this.canvas != null) {
|
||||||
data.canvas = this.canvas.toObject();
|
data.canvas = this.canvas.toObject();
|
||||||
@ -795,6 +810,9 @@ export namespace graphicData {
|
|||||||
if (this.floodGates != null) {
|
if (this.floodGates != null) {
|
||||||
data.floodGates = this.floodGates.map((item: FloodGate) => item.toObject());
|
data.floodGates = this.floodGates.map((item: FloodGate) => item.toObject());
|
||||||
}
|
}
|
||||||
|
if (this.garageDoorBoxes != null) {
|
||||||
|
data.garageDoorBoxes = this.garageDoorBoxes.map((item: GarageDoorBox) => item.toObject());
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
serialize(): Uint8Array;
|
serialize(): Uint8Array;
|
||||||
@ -885,6 +903,8 @@ export namespace graphicData {
|
|||||||
writer.writeRepeatedMessage(46, this.garageDoors, (item: GarageDoor) => item.serialize(writer));
|
writer.writeRepeatedMessage(46, this.garageDoors, (item: GarageDoor) => item.serialize(writer));
|
||||||
if (this.floodGates.length)
|
if (this.floodGates.length)
|
||||||
writer.writeRepeatedMessage(47, this.floodGates, (item: FloodGate) => item.serialize(writer));
|
writer.writeRepeatedMessage(47, this.floodGates, (item: FloodGate) => item.serialize(writer));
|
||||||
|
if (this.garageDoorBoxes.length)
|
||||||
|
writer.writeRepeatedMessage(48, this.garageDoorBoxes, (item: GarageDoorBox) => item.serialize(writer));
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -1020,6 +1040,9 @@ export namespace graphicData {
|
|||||||
case 47:
|
case 47:
|
||||||
reader.readMessage(message.floodGates, () => pb_1.Message.addToRepeatedWrapperField(message, 47, FloodGate.deserialize(reader), FloodGate));
|
reader.readMessage(message.floodGates, () => pb_1.Message.addToRepeatedWrapperField(message, 47, FloodGate.deserialize(reader), FloodGate));
|
||||||
break;
|
break;
|
||||||
|
case 48:
|
||||||
|
reader.readMessage(message.garageDoorBoxes, () => pb_1.Message.addToRepeatedWrapperField(message, 48, GarageDoorBox.deserialize(reader), GarageDoorBox));
|
||||||
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10135,4 +10158,166 @@ export namespace graphicData {
|
|||||||
return OtherLine.deserialize(bytes);
|
return OtherLine.deserialize(bytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
export class GarageDoorBox extends pb_1.Message {
|
||||||
|
#one_of_decls: number[][] = [];
|
||||||
|
constructor(data?: any[] | {
|
||||||
|
common?: CommonInfo;
|
||||||
|
code?: string;
|
||||||
|
refPslMapCode?: string;
|
||||||
|
refGarageDoorId?: number;
|
||||||
|
flip?: boolean;
|
||||||
|
}) {
|
||||||
|
super();
|
||||||
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||||
|
if (!Array.isArray(data) && typeof data == "object") {
|
||||||
|
if ("common" in data && data.common != undefined) {
|
||||||
|
this.common = data.common;
|
||||||
|
}
|
||||||
|
if ("code" in data && data.code != undefined) {
|
||||||
|
this.code = data.code;
|
||||||
|
}
|
||||||
|
if ("refPslMapCode" in data && data.refPslMapCode != undefined) {
|
||||||
|
this.refPslMapCode = data.refPslMapCode;
|
||||||
|
}
|
||||||
|
if ("refGarageDoorId" in data && data.refGarageDoorId != undefined) {
|
||||||
|
this.refGarageDoorId = data.refGarageDoorId;
|
||||||
|
}
|
||||||
|
if ("flip" in data && data.flip != undefined) {
|
||||||
|
this.flip = data.flip;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
get common() {
|
||||||
|
return pb_1.Message.getWrapperField(this, CommonInfo, 1) as CommonInfo;
|
||||||
|
}
|
||||||
|
set common(value: CommonInfo) {
|
||||||
|
pb_1.Message.setWrapperField(this, 1, value);
|
||||||
|
}
|
||||||
|
get has_common() {
|
||||||
|
return pb_1.Message.getField(this, 1) != null;
|
||||||
|
}
|
||||||
|
get code() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
||||||
|
}
|
||||||
|
set code(value: string) {
|
||||||
|
pb_1.Message.setField(this, 2, value);
|
||||||
|
}
|
||||||
|
get refPslMapCode() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
||||||
|
}
|
||||||
|
set refPslMapCode(value: string) {
|
||||||
|
pb_1.Message.setField(this, 3, value);
|
||||||
|
}
|
||||||
|
get refGarageDoorId() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 4, 0) as number;
|
||||||
|
}
|
||||||
|
set refGarageDoorId(value: number) {
|
||||||
|
pb_1.Message.setField(this, 4, value);
|
||||||
|
}
|
||||||
|
get flip() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean;
|
||||||
|
}
|
||||||
|
set flip(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 5, value);
|
||||||
|
}
|
||||||
|
static fromObject(data: {
|
||||||
|
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
|
||||||
|
code?: string;
|
||||||
|
refPslMapCode?: string;
|
||||||
|
refGarageDoorId?: number;
|
||||||
|
flip?: boolean;
|
||||||
|
}): GarageDoorBox {
|
||||||
|
const message = new GarageDoorBox({});
|
||||||
|
if (data.common != null) {
|
||||||
|
message.common = CommonInfo.fromObject(data.common);
|
||||||
|
}
|
||||||
|
if (data.code != null) {
|
||||||
|
message.code = data.code;
|
||||||
|
}
|
||||||
|
if (data.refPslMapCode != null) {
|
||||||
|
message.refPslMapCode = data.refPslMapCode;
|
||||||
|
}
|
||||||
|
if (data.refGarageDoorId != null) {
|
||||||
|
message.refGarageDoorId = data.refGarageDoorId;
|
||||||
|
}
|
||||||
|
if (data.flip != null) {
|
||||||
|
message.flip = data.flip;
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
toObject() {
|
||||||
|
const data: {
|
||||||
|
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
|
||||||
|
code?: string;
|
||||||
|
refPslMapCode?: string;
|
||||||
|
refGarageDoorId?: number;
|
||||||
|
flip?: boolean;
|
||||||
|
} = {};
|
||||||
|
if (this.common != null) {
|
||||||
|
data.common = this.common.toObject();
|
||||||
|
}
|
||||||
|
if (this.code != null) {
|
||||||
|
data.code = this.code;
|
||||||
|
}
|
||||||
|
if (this.refPslMapCode != null) {
|
||||||
|
data.refPslMapCode = this.refPslMapCode;
|
||||||
|
}
|
||||||
|
if (this.refGarageDoorId != null) {
|
||||||
|
data.refGarageDoorId = this.refGarageDoorId;
|
||||||
|
}
|
||||||
|
if (this.flip != null) {
|
||||||
|
data.flip = this.flip;
|
||||||
|
}
|
||||||
|
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.has_common)
|
||||||
|
writer.writeMessage(1, this.common, () => this.common.serialize(writer));
|
||||||
|
if (this.code.length)
|
||||||
|
writer.writeString(2, this.code);
|
||||||
|
if (this.refPslMapCode.length)
|
||||||
|
writer.writeString(3, this.refPslMapCode);
|
||||||
|
if (this.refGarageDoorId != 0)
|
||||||
|
writer.writeUint32(4, this.refGarageDoorId);
|
||||||
|
if (this.flip != false)
|
||||||
|
writer.writeBool(5, this.flip);
|
||||||
|
if (!w)
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
}
|
||||||
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GarageDoorBox {
|
||||||
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GarageDoorBox();
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup())
|
||||||
|
break;
|
||||||
|
switch (reader.getFieldNumber()) {
|
||||||
|
case 1:
|
||||||
|
reader.readMessage(message.common, () => message.common = CommonInfo.deserialize(reader));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
message.code = reader.readString();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
message.refPslMapCode = reader.readString();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
message.refGarageDoorId = reader.readUint32();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
message.flip = reader.readBool();
|
||||||
|
break;
|
||||||
|
default: reader.skipField();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
serializeBinary(): Uint8Array {
|
||||||
|
return this.serialize();
|
||||||
|
}
|
||||||
|
static deserializeBinary(bytes: Uint8Array): GarageDoorBox {
|
||||||
|
return GarageDoorBox.deserialize(bytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user