Merge remote-tracking branch 'origin/develop' into local-test
All checks were successful
CI / Docker-Build (push) Successful in 2m54s
All checks were successful
CI / Docker-Build (push) Successful in 2m54s
# Conflicts: # src/protos/stationLayoutGraphics.ts
This commit is contained in:
commit
22f0e49845
@ -1 +1 @@
|
|||||||
Subproject commit e64115ada314a096debd061cf54ee774f1091aa7
|
Subproject commit 8117a06f1ebccc1e239e56cfc0a3137f499c8515
|
@ -491,3 +491,15 @@ export async function ckmUpdateParams(data: {
|
|||||||
}) {
|
}) {
|
||||||
return await api.put(`${UriBase}/ckm/operation`, data);
|
return await api.put(`${UriBase}/ckm/operation`, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function xcjUpdateParams(data: {
|
||||||
|
simulationId: string;
|
||||||
|
mapId: number;
|
||||||
|
deviceId: number;
|
||||||
|
operation: request.Xcj.Operation;
|
||||||
|
param: {
|
||||||
|
fault: request.Xcj.Fault;
|
||||||
|
};
|
||||||
|
}) {
|
||||||
|
return await api.put(`${UriBase}/xcj/operation`, data);
|
||||||
|
}
|
||||||
|
115
src/components/draw-app/dialogs/XcjOperation.vue
Normal file
115
src/components/draw-app/dialogs/XcjOperation.vue
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
<!-- eslint-disable vue/no-mutating-props -->
|
||||||
|
<template>
|
||||||
|
<draggable-dialog
|
||||||
|
v-model="showXcjOperation"
|
||||||
|
seamless
|
||||||
|
title="洗车机设置参数"
|
||||||
|
:width="380"
|
||||||
|
:height="0"
|
||||||
|
>
|
||||||
|
<template v-slot:footer>
|
||||||
|
<q-card>
|
||||||
|
<q-card-section>
|
||||||
|
<q-form ref="myForm" @submit="onCreate" class="q-gutter-md">
|
||||||
|
<q-input
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
readonly
|
||||||
|
label="名称"
|
||||||
|
v-model="props.code"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
class="q-gutter-sm"
|
||||||
|
style="border: 1px solid #ccc; border-radius: 3px"
|
||||||
|
>
|
||||||
|
<div>设置故障:</div>
|
||||||
|
<q-radio
|
||||||
|
v-for="option in xcjFaultOption"
|
||||||
|
:key="option.value"
|
||||||
|
v-model="xcjFault"
|
||||||
|
:val="option.value"
|
||||||
|
:label="option.label"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<q-card-actions align="right" class="text-primary">
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
label="取消"
|
||||||
|
@click="showXcjOperation = false"
|
||||||
|
v-close-popup
|
||||||
|
/>
|
||||||
|
<q-btn flat label="确认" type="submit" />
|
||||||
|
</q-card-actions>
|
||||||
|
</q-form>
|
||||||
|
</q-card-section>
|
||||||
|
</q-card>
|
||||||
|
</template>
|
||||||
|
</draggable-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { QForm } from 'quasar';
|
||||||
|
import { xcjUpdateParams } from 'src/api/Simulation';
|
||||||
|
import DraggableDialog from 'src/components/common/DraggableDialog.vue';
|
||||||
|
import { request } from 'src/protos/request';
|
||||||
|
import { useLineStore } from 'src/stores/line-store';
|
||||||
|
import { errorNotify } from 'src/utils/CommonNotify';
|
||||||
|
|
||||||
|
import { onMounted, onUnmounted, ref } from 'vue';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
id: {
|
||||||
|
type: Number,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
code: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
xcjFaultProp: {
|
||||||
|
type: Number,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const lineStore = useLineStore();
|
||||||
|
const showXcjOperation = ref(true);
|
||||||
|
const xcjFault = ref<request.Xcj.Fault>(0);
|
||||||
|
const xcjFaultOption = [
|
||||||
|
{
|
||||||
|
label: '无故障',
|
||||||
|
value: request.Xcj.Fault.FA_NONE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '故障',
|
||||||
|
value: request.Xcj.Fault.FA_Fault,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
xcjFault.value = props.xcjFaultProp;
|
||||||
|
});
|
||||||
|
|
||||||
|
const myForm = ref<QForm | null>(null);
|
||||||
|
function onCreate() {
|
||||||
|
myForm.value?.validate().then(async (res) => {
|
||||||
|
if (res) {
|
||||||
|
const obj = {
|
||||||
|
simulationId: lineStore?.simulationId || '',
|
||||||
|
mapId: lineStore.mapId as number,
|
||||||
|
deviceId: props.id,
|
||||||
|
operation: request.Xcj.Operation.SetParams,
|
||||||
|
param: {
|
||||||
|
fault: xcjFault.value,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
xcjUpdateParams(obj).catch((e) => errorNotify('操作失败:' + e.title, e));
|
||||||
|
showXcjOperation.value = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
lineStore.deviceOpreratDialogInstance = null;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style scoped></style>
|
@ -34,6 +34,9 @@
|
|||||||
<flood-gate-state
|
<flood-gate-state
|
||||||
v-else-if="lineStore.selectedGraphicType === FloodGate.Type"
|
v-else-if="lineStore.selectedGraphicType === FloodGate.Type"
|
||||||
></flood-gate-state>
|
></flood-gate-state>
|
||||||
|
<car-washing-state
|
||||||
|
v-else-if="lineStore.selectedGraphicType === CarWashing.Type"
|
||||||
|
></car-washing-state>
|
||||||
</div>
|
</div>
|
||||||
</q-scroll-area>
|
</q-scroll-area>
|
||||||
</template>
|
</template>
|
||||||
@ -66,6 +69,8 @@ import { GarageDoor } from 'src/graphics/garageDoor/GarageDoor';
|
|||||||
import GarageDoorState from './states/GarageDoorState.vue';
|
import GarageDoorState from './states/GarageDoorState.vue';
|
||||||
import { FloodGate } from 'src/graphics/floodGate/FloodGate';
|
import { FloodGate } from 'src/graphics/floodGate/FloodGate';
|
||||||
import FloodGateState from './states/FloodGateState.vue';
|
import FloodGateState from './states/FloodGateState.vue';
|
||||||
|
import CarWashingState from './states/CarWashingState.vue';
|
||||||
|
import { CarWashing } from 'src/graphics/carWashing/CarWashing';
|
||||||
|
|
||||||
const lineStore = useLineStore();
|
const lineStore = useLineStore();
|
||||||
</script>
|
</script>
|
||||||
|
182
src/components/line-app/states/CarWashingState.vue
Normal file
182
src/components/line-app/states/CarWashingState.vue
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
<template>
|
||||||
|
<q-card flat bordered>
|
||||||
|
<q-card-section class="flex justify-between">
|
||||||
|
<div class="text-h6">洗车机状态</div>
|
||||||
|
<q-btn-dropdown color="primary" label="操作">
|
||||||
|
<q-list>
|
||||||
|
<q-item
|
||||||
|
v-for="(item, index) in operationOptions"
|
||||||
|
:key="index"
|
||||||
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
@click="doCarWashingOperation(item)"
|
||||||
|
>
|
||||||
|
<q-item-section>
|
||||||
|
<q-item-label>{{ item.label }}</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
|
</q-btn-dropdown>
|
||||||
|
</q-card-section>
|
||||||
|
<q-separator inset />
|
||||||
|
<q-card-section>
|
||||||
|
<q-list dense>
|
||||||
|
<q-item v-for="(item, index) in list" :key="index">
|
||||||
|
<q-item-section>
|
||||||
|
<q-item-label>{{ item.label }}</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section side>
|
||||||
|
<q-item-label caption>{{
|
||||||
|
item.formatFn
|
||||||
|
? item.formatFn(carWashingState[item.key])
|
||||||
|
: carWashingState[item.key]
|
||||||
|
}}</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
|
</q-card-section>
|
||||||
|
</q-card>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { useLineStore } from 'src/stores/line-store';
|
||||||
|
import { ref, watch, onMounted, onUnmounted, toRaw } from 'vue';
|
||||||
|
import { request } from 'src/protos/request';
|
||||||
|
import { CarWashing } from 'src/graphics/carWashing/CarWashing';
|
||||||
|
import XcjOperation from 'src/components/draw-app/dialogs/XcjOperation.vue';
|
||||||
|
import { CarWashingState } from 'src/drawApp/graphics/CarWashingInteraction';
|
||||||
|
import { Dialog } from 'quasar';
|
||||||
|
|
||||||
|
const lineStore = useLineStore();
|
||||||
|
const carWashingState = ref<CarWashingState>(new CarWashingState());
|
||||||
|
const code = ref('');
|
||||||
|
const operationOptions = [
|
||||||
|
{
|
||||||
|
label: '设置参数',
|
||||||
|
value: request.Xcj.Operation.SetParams,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const carWashingFault = ref<request.Xcj.Fault>(0);
|
||||||
|
let copySelectGraphic: CarWashing | null = null;
|
||||||
|
|
||||||
|
interface KeyType {
|
||||||
|
label: string;
|
||||||
|
key: keyof CarWashingState;
|
||||||
|
formatFn?(v: CarWashingState[keyof CarWashingState]): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const list: KeyType[] = [
|
||||||
|
{ label: '洗车机索引', key: 'id' },
|
||||||
|
{ label: '洗车机名称', key: 'code', formatFn: getNameFormat },
|
||||||
|
{ label: '洗车请求', key: 'xqj', formatFn: getBoolFormat },
|
||||||
|
{ label: '是否停稳', key: 'twjList', formatFn: getTwFormat },
|
||||||
|
{ label: '通过请求', key: 'tgqj', formatFn: getBoolFormat },
|
||||||
|
{ label: '洗车就绪', key: 'xcjxj', formatFn: getBoolFormat },
|
||||||
|
{ label: '洗车允许', key: 'xcyxj', formatFn: getBoolFormat },
|
||||||
|
{ label: '移动允许', key: 'cfjList', formatFn: getYXFormat },
|
||||||
|
{ label: '紧急停车', key: 'jtj', formatFn: getBoolFormat },
|
||||||
|
{ label: '通过允许', key: 'tgyxj', formatFn: getBoolFormat },
|
||||||
|
];
|
||||||
|
watch(
|
||||||
|
() => lineStore.selectedGraphics,
|
||||||
|
(val, oldVal) => {
|
||||||
|
if (oldVal?.length == 1 && oldVal[0] instanceof CarWashing) {
|
||||||
|
unSubscribeState(oldVal[0]);
|
||||||
|
}
|
||||||
|
if (val?.length == 1 && val[0] instanceof CarWashing) {
|
||||||
|
copySelectGraphic = toRaw(val[0]);
|
||||||
|
initCarWashingState(val[0]);
|
||||||
|
} else {
|
||||||
|
copySelectGraphic = null;
|
||||||
|
carWashingState.value = new CarWashingState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
if (lineStore.selectedGraphics) {
|
||||||
|
initCarWashingState(lineStore.selectedGraphics[0] as CarWashing);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function getNameFormat() {
|
||||||
|
console.log(code.value, '1111111');
|
||||||
|
return code.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getBoolFormat(v: boolean) {
|
||||||
|
return v ? '是' : '否';
|
||||||
|
}
|
||||||
|
function getTwFormat(v: boolean[]) {
|
||||||
|
if (v.length === 2) {
|
||||||
|
return `头部${v[0] ? '停稳' : '未停稳'};尾部${v[1] ? '停稳' : '未停稳'};`;
|
||||||
|
} else if (v.length === 3) {
|
||||||
|
return `头部${v[0] ? '停稳' : '未停稳'};中部${
|
||||||
|
v[1] ? '停稳' : '未停稳'
|
||||||
|
};尾部${v[2] ? '停稳' : '未停稳'};`;
|
||||||
|
} else {
|
||||||
|
return '状态显示错误';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getYXFormat(v: boolean[]) {
|
||||||
|
if (v.length === 2) {
|
||||||
|
return `头部${v[0] ? '允许' : '不允许'};尾部${v[1] ? '允许' : '不允许'};`;
|
||||||
|
} else if (v.length === 3) {
|
||||||
|
return `头部${v[0] ? '允许' : '不允许'};中部${
|
||||||
|
v[1] ? '允许' : '不允许'
|
||||||
|
};尾部${v[2] ? '允许' : '不允许'};`;
|
||||||
|
} else {
|
||||||
|
return '状态显示错误';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function initCarWashingState(carWashing: CarWashing) {
|
||||||
|
copySelectGraphic = toRaw(carWashing);
|
||||||
|
code.value = carWashing.datas.code;
|
||||||
|
console.log(code.value, carWashing);
|
||||||
|
|
||||||
|
updateState(carWashing);
|
||||||
|
subscribeState(carWashing);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateState(carWashing: CarWashing) {
|
||||||
|
carWashingState.value = carWashing.states.clone() as CarWashingState;
|
||||||
|
carWashingFault.value = carWashingState.value.param.fault;
|
||||||
|
}
|
||||||
|
|
||||||
|
function doCarWashingOperation(item: {
|
||||||
|
label: string;
|
||||||
|
value: request.Xcj.Operation;
|
||||||
|
}) {
|
||||||
|
if (!lineStore.simulationId) return;
|
||||||
|
if (item.label == '设置参数') {
|
||||||
|
if (lineStore.deviceOpreratDialogInstance) return;
|
||||||
|
lineStore.deviceOpreratDialogInstance = Dialog.create({
|
||||||
|
component: XcjOperation,
|
||||||
|
componentProps: {
|
||||||
|
id: +carWashingState.value.id,
|
||||||
|
code: code.value,
|
||||||
|
xcjFaultProp: carWashingState.value.param.fault,
|
||||||
|
},
|
||||||
|
cancel: true,
|
||||||
|
persistent: true,
|
||||||
|
}).onCancel(() => {
|
||||||
|
lineStore.deviceOpreratDialogInstance = null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function subscribeState(g: CarWashing) {
|
||||||
|
g.on('stateupdate', updateState);
|
||||||
|
}
|
||||||
|
|
||||||
|
function unSubscribeState(g: CarWashing) {
|
||||||
|
g.off('stateupdate', updateState);
|
||||||
|
}
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
if (copySelectGraphic) {
|
||||||
|
unSubscribeState(copySelectGraphic);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
@ -104,7 +104,6 @@ watch(
|
|||||||
);
|
);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log('1111111111');
|
|
||||||
if (lineStore.selectedGraphics) {
|
if (lineStore.selectedGraphics) {
|
||||||
initFloodGateState(lineStore.selectedGraphics[0] as FloodGate);
|
initFloodGateState(lineStore.selectedGraphics[0] as FloodGate);
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ function getHost(): string {
|
|||||||
// return '192.168.3.7:9091';
|
// return '192.168.3.7:9091';
|
||||||
// return '192.168.3.47:9091';
|
// return '192.168.3.47:9091';
|
||||||
// return '192.168.3.37:9091';
|
// return '192.168.3.37:9091';
|
||||||
//return '192.168.33.207:9091'; // 张骞
|
return '192.168.33.207:9091'; // 张骞
|
||||||
// return '192.168.33.93:9091';
|
// return '192.168.33.93:9091';
|
||||||
// return '192.168.3.37:9091'; //卫志宏
|
// return '192.168.3.37:9091'; //卫志宏
|
||||||
// return 'test.joylink.club/bjrtsts-service'; // 测试
|
// return 'test.joylink.club/bjrtsts-service'; // 测试
|
||||||
|
@ -142,7 +142,10 @@ import { Dialog } from 'quasar';
|
|||||||
import { useDrawStore } from 'src/stores/draw-store';
|
import { useDrawStore } from 'src/stores/draw-store';
|
||||||
import { saveDraft } from 'src/api/DraftApi';
|
import { saveDraft } from 'src/api/DraftApi';
|
||||||
import { SignalDraw } from 'src/graphics/signal/SignalDrawAssistant';
|
import { SignalDraw } from 'src/graphics/signal/SignalDrawAssistant';
|
||||||
import { CarWashingData } from './graphics/CarWashingInteraction';
|
import {
|
||||||
|
CarWashingData,
|
||||||
|
CarWashingState,
|
||||||
|
} from './graphics/CarWashingInteraction';
|
||||||
import {
|
import {
|
||||||
CarWashing,
|
CarWashing,
|
||||||
CarWashingTemplate,
|
CarWashingTemplate,
|
||||||
@ -246,7 +249,10 @@ export function initCommonDrawApp(app: IDrawApp) {
|
|||||||
app,
|
app,
|
||||||
new ConcentrationDividingLineTemplate(new ConcentrationDividingLineData())
|
new ConcentrationDividingLineTemplate(new ConcentrationDividingLineData())
|
||||||
);
|
);
|
||||||
new CarWashingDraw(app, new CarWashingTemplate(new CarWashingData()));
|
new CarWashingDraw(
|
||||||
|
app,
|
||||||
|
new CarWashingTemplate(new CarWashingData(), new CarWashingState())
|
||||||
|
);
|
||||||
new GarageDoorDraw(
|
new GarageDoorDraw(
|
||||||
app,
|
app,
|
||||||
new GarageDoorTemplate(new GarageDoorData(), new GarageDoorState())
|
new GarageDoorTemplate(new GarageDoorData(), new GarageDoorState())
|
||||||
|
@ -1,13 +1,25 @@
|
|||||||
import * as pb_1 from 'google-protobuf';
|
import * as pb_1 from 'google-protobuf';
|
||||||
import { FederatedMouseEvent } from 'pixi.js';
|
import { FederatedMouseEvent, DisplayObject } from 'pixi.js';
|
||||||
import {
|
import {
|
||||||
CarWashing,
|
CarWashing,
|
||||||
ICarWashingData,
|
ICarWashingData,
|
||||||
|
ICarWashingState,
|
||||||
} from 'src/graphics/carWashing/CarWashing';
|
} from 'src/graphics/carWashing/CarWashing';
|
||||||
import { GraphicInteractionPlugin, JlGraphic, IGraphicScene } from 'jl-graphic';
|
import {
|
||||||
|
GraphicInteractionPlugin,
|
||||||
|
JlGraphic,
|
||||||
|
IGraphicScene,
|
||||||
|
MenuItemOptions,
|
||||||
|
ContextMenu,
|
||||||
|
} from 'jl-graphic';
|
||||||
|
|
||||||
import { graphicData } from 'src/protos/stationLayoutGraphics';
|
import { graphicData } from 'src/protos/stationLayoutGraphics';
|
||||||
import { GraphicDataBase } from './GraphicDataBase';
|
import { GraphicDataBase, GraphicStateBase } from './GraphicDataBase';
|
||||||
|
import { state } from 'src/protos/device_state';
|
||||||
|
import { request } from 'src/protos/request';
|
||||||
|
import { useLineStore } from 'src/stores/line-store';
|
||||||
|
import { Dialog } from 'quasar';
|
||||||
|
import XcjOperation from 'src/components/draw-app/dialogs/XcjOperation.vue';
|
||||||
|
|
||||||
export class CarWashingData extends GraphicDataBase implements ICarWashingData {
|
export class CarWashingData extends GraphicDataBase implements ICarWashingData {
|
||||||
constructor(data?: graphicData.CarWashing) {
|
constructor(data?: graphicData.CarWashing) {
|
||||||
@ -60,10 +72,110 @@ export class CarWashingData extends GraphicDataBase implements ICarWashingData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class CarWashingState
|
||||||
|
extends GraphicStateBase
|
||||||
|
implements ICarWashingState
|
||||||
|
{
|
||||||
|
constructor(proto?: state.XcjState) {
|
||||||
|
let states;
|
||||||
|
if (proto) {
|
||||||
|
states = proto;
|
||||||
|
} else {
|
||||||
|
states = new state.XcjState();
|
||||||
|
}
|
||||||
|
super(states, CarWashing.Type);
|
||||||
|
}
|
||||||
|
get code(): string {
|
||||||
|
return this.states.id + '';
|
||||||
|
}
|
||||||
|
get id(): number {
|
||||||
|
return this.states.id;
|
||||||
|
}
|
||||||
|
set id(id: number) {
|
||||||
|
this.states.id = id;
|
||||||
|
}
|
||||||
|
get param(): request.XcjParam {
|
||||||
|
return this.states.param;
|
||||||
|
}
|
||||||
|
set param(param: request.XcjParam) {
|
||||||
|
this.states.param = param;
|
||||||
|
}
|
||||||
|
get xqj(): boolean {
|
||||||
|
return this.states.xqj;
|
||||||
|
}
|
||||||
|
set xqj(v: boolean) {
|
||||||
|
this.states.xqj = v;
|
||||||
|
}
|
||||||
|
get twjList(): boolean[] {
|
||||||
|
return this.states.twjList;
|
||||||
|
}
|
||||||
|
set twjList(v: boolean[]) {
|
||||||
|
this.states.twjList = v;
|
||||||
|
}
|
||||||
|
get tgqj(): boolean {
|
||||||
|
return this.states.tgqj;
|
||||||
|
}
|
||||||
|
set tgqj(v: boolean) {
|
||||||
|
this.states.tgqj = v;
|
||||||
|
}
|
||||||
|
get xcjxj(): boolean {
|
||||||
|
return this.states.xcjxj;
|
||||||
|
}
|
||||||
|
set xcjxj(v: boolean) {
|
||||||
|
this.states.xcjxj = v;
|
||||||
|
}
|
||||||
|
get xcyxj(): boolean {
|
||||||
|
return this.states.xcyxj;
|
||||||
|
}
|
||||||
|
set xcyxj(v: boolean) {
|
||||||
|
this.states.xcyxj = v;
|
||||||
|
}
|
||||||
|
get cfjList(): boolean[] {
|
||||||
|
return this.states.cfjList;
|
||||||
|
}
|
||||||
|
set cfjList(v: boolean[]) {
|
||||||
|
this.states.cfjList = v;
|
||||||
|
}
|
||||||
|
get jtj(): boolean {
|
||||||
|
return this.states.jtj;
|
||||||
|
}
|
||||||
|
set jtj(v: boolean) {
|
||||||
|
this.states.jtj = v;
|
||||||
|
}
|
||||||
|
get tgyxj(): boolean {
|
||||||
|
return this.states.tgyxj;
|
||||||
|
}
|
||||||
|
set tgyxj(v: boolean) {
|
||||||
|
this.states.tgyxj = v;
|
||||||
|
}
|
||||||
|
get states(): state.XcjState {
|
||||||
|
return this.getState<state.XcjState>();
|
||||||
|
}
|
||||||
|
clone(): CarWashingState {
|
||||||
|
return new CarWashingState(this.states.cloneMessage());
|
||||||
|
}
|
||||||
|
copyFrom(data: GraphicStateBase): void {
|
||||||
|
pb_1.Message.copyInto(data._state, this._state);
|
||||||
|
}
|
||||||
|
eq(data: GraphicStateBase): boolean {
|
||||||
|
return pb_1.Message.equals(this._state, data._state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const setXcjParam: MenuItemOptions = { name: '设置参数' };
|
||||||
|
const xcjOperateMenu: ContextMenu = ContextMenu.init({
|
||||||
|
name: '洗车机操作菜单',
|
||||||
|
groups: [
|
||||||
|
{
|
||||||
|
items: [setXcjParam],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
export class CarWashingOperationInteraction extends GraphicInteractionPlugin<CarWashing> {
|
export class CarWashingOperationInteraction extends GraphicInteractionPlugin<CarWashing> {
|
||||||
static Name = 'car_washing_operation';
|
static Name = 'car_washing_operation';
|
||||||
constructor(scene: IGraphicScene) {
|
constructor(scene: IGraphicScene) {
|
||||||
super(CarWashingOperationInteraction.Name, scene);
|
super(CarWashingOperationInteraction.Name, scene);
|
||||||
|
scene.registerMenu(xcjOperateMenu);
|
||||||
}
|
}
|
||||||
static init(scene: IGraphicScene) {
|
static init(scene: IGraphicScene) {
|
||||||
return new CarWashingOperationInteraction(scene);
|
return new CarWashingOperationInteraction(scene);
|
||||||
@ -74,12 +186,16 @@ export class CarWashingOperationInteraction extends GraphicInteractionPlugin<Car
|
|||||||
bind(g: CarWashing): void {
|
bind(g: CarWashing): void {
|
||||||
g.eventMode = 'static';
|
g.eventMode = 'static';
|
||||||
g.cursor = 'pointer';
|
g.cursor = 'pointer';
|
||||||
|
g.selectable = true;
|
||||||
g.on('mousedown', this.onPress, this);
|
g.on('mousedown', this.onPress, this);
|
||||||
|
g.on('_rightclick', this.onContextMenu);
|
||||||
}
|
}
|
||||||
unbind(g: CarWashing): void {
|
unbind(g: CarWashing): void {
|
||||||
g.eventMode = 'none';
|
g.eventMode = 'none';
|
||||||
g.cursor = 'default';
|
g.cursor = 'default';
|
||||||
|
g.selectable = false;
|
||||||
g.off('mousedown', this.onPress, this);
|
g.off('mousedown', this.onPress, this);
|
||||||
|
g.off('_rightclick', this.onContextMenu);
|
||||||
}
|
}
|
||||||
onPress(e: FederatedMouseEvent) {
|
onPress(e: FederatedMouseEvent) {
|
||||||
const g = e.target as CarWashing;
|
const g = e.target as CarWashing;
|
||||||
@ -91,4 +207,25 @@ export class CarWashingOperationInteraction extends GraphicInteractionPlugin<Car
|
|||||||
g.off('mouseleave', this.onRelease, this);
|
g.off('mouseleave', this.onRelease, this);
|
||||||
g.off('mouseup', this.onRelease, this);
|
g.off('mouseup', this.onRelease, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onContextMenu(e: FederatedMouseEvent) {
|
||||||
|
const target = e.target as DisplayObject;
|
||||||
|
const carWashing = target.getGraphic<CarWashing>();
|
||||||
|
if (!carWashing) return;
|
||||||
|
const lineStore = useLineStore();
|
||||||
|
setXcjParam.handler = async () => {
|
||||||
|
if (lineStore.deviceOpreratDialogInstance) return;
|
||||||
|
lineStore.deviceOpreratDialogInstance = Dialog.create({
|
||||||
|
component: XcjOperation,
|
||||||
|
componentProps: {
|
||||||
|
id: carWashing.id,
|
||||||
|
code: carWashing.datas.code,
|
||||||
|
xcjFaultProp: carWashing.states.param.fault,
|
||||||
|
},
|
||||||
|
cancel: true,
|
||||||
|
persistent: true,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
xcjOperateMenu.open(e.global);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ import {
|
|||||||
} from 'src/graphics/signal/Signal';
|
} from 'src/graphics/signal/Signal';
|
||||||
import {
|
import {
|
||||||
CarWashingData,
|
CarWashingData,
|
||||||
|
CarWashingState,
|
||||||
CarWashingOperationInteraction,
|
CarWashingOperationInteraction,
|
||||||
} from './graphics/CarWashingInteraction';
|
} from './graphics/CarWashingInteraction';
|
||||||
import {
|
import {
|
||||||
@ -327,7 +328,7 @@ export function initLineScene(lineApp: IGraphicApp, sceneName: string) {
|
|||||||
new AutoReturnBoxData(),
|
new AutoReturnBoxData(),
|
||||||
new AutoReturnBoxState()
|
new AutoReturnBoxState()
|
||||||
),
|
),
|
||||||
new CarWashingTemplate(new CarWashingData()),
|
new CarWashingTemplate(new CarWashingData(), new CarWashingState()),
|
||||||
new GarageDoorTemplate(new GarageDoorData(), new GarageDoorState()),
|
new GarageDoorTemplate(new GarageDoorData(), new GarageDoorState()),
|
||||||
new FloodGateTemplate(new FloodGateData(), new FloodGateState()),
|
new FloodGateTemplate(new FloodGateData(), new FloodGateState()),
|
||||||
];
|
];
|
||||||
@ -464,6 +465,11 @@ function handleSubscribe(lineScene: IGraphicScene) {
|
|||||||
states.push(new FloodGateState(item));
|
states.push(new FloodGateState(item));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
storage.allStatus.xcjStates.forEach((item) => {
|
||||||
|
if (item.id) {
|
||||||
|
states.push(new CarWashingState(item));
|
||||||
|
}
|
||||||
|
});
|
||||||
storage.allStatus.trainState.forEach((item) => {
|
storage.allStatus.trainState.forEach((item) => {
|
||||||
// 列车
|
// 列车
|
||||||
if (!item.show) {
|
if (!item.show) {
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
import { Graphics } from 'pixi.js';
|
import { Graphics } from 'pixi.js';
|
||||||
import {
|
import {
|
||||||
GraphicData,
|
GraphicData,
|
||||||
|
GraphicState,
|
||||||
JlGraphic,
|
JlGraphic,
|
||||||
JlGraphicTemplate,
|
JlGraphicTemplate,
|
||||||
VectorText,
|
VectorText,
|
||||||
linePoint,
|
linePoint,
|
||||||
} from 'jl-graphic';
|
} from 'jl-graphic';
|
||||||
import { Section, SectionType } from '../section/Section';
|
import { Section, SectionType } from '../section/Section';
|
||||||
|
import { request } from 'src/protos/request';
|
||||||
|
|
||||||
export interface ICarWashingData extends GraphicData {
|
export interface ICarWashingData extends GraphicData {
|
||||||
get code(): string;
|
get code(): string;
|
||||||
@ -21,6 +23,28 @@ export interface ICarWashingData extends GraphicData {
|
|||||||
copyFrom(data: ICarWashingData): void;
|
copyFrom(data: ICarWashingData): void;
|
||||||
eq(other: ICarWashingData): boolean;
|
eq(other: ICarWashingData): boolean;
|
||||||
}
|
}
|
||||||
|
export interface ICarWashingState extends GraphicState {
|
||||||
|
get id(): number;
|
||||||
|
set id(v: number);
|
||||||
|
get param(): request.XcjParam;
|
||||||
|
set param(v: request.XcjParam);
|
||||||
|
get xqj(): boolean; //洗车请求
|
||||||
|
set xqj(v: boolean);
|
||||||
|
get twjList(): boolean[]; //停稳
|
||||||
|
set twjList(v: boolean[]);
|
||||||
|
get tgqj(): boolean; //通过请求
|
||||||
|
set tgqj(v: boolean);
|
||||||
|
get xcjxj(): boolean; //洗车就绪
|
||||||
|
set xcjxj(v: boolean);
|
||||||
|
get xcyxj(): boolean; //洗车允许
|
||||||
|
set xcyxj(v: boolean);
|
||||||
|
get cfjList(): boolean[]; //移动允许
|
||||||
|
set cfjList(v: boolean[]);
|
||||||
|
get jtj(): boolean; //紧急停车
|
||||||
|
set jtj(v: boolean);
|
||||||
|
get tgyxj(): boolean; //通过允许
|
||||||
|
set tgyxj(v: boolean);
|
||||||
|
}
|
||||||
|
|
||||||
const carWashingConsts = {
|
const carWashingConsts = {
|
||||||
codeFontSize: 12,
|
codeFontSize: 12,
|
||||||
@ -48,6 +72,9 @@ export class CarWashing extends JlGraphic {
|
|||||||
get datas(): ICarWashingData {
|
get datas(): ICarWashingData {
|
||||||
return this.getDatas<ICarWashingData>();
|
return this.getDatas<ICarWashingData>();
|
||||||
}
|
}
|
||||||
|
get states(): ICarWashingState {
|
||||||
|
return this.getStates<ICarWashingState>();
|
||||||
|
}
|
||||||
doRepaint(): void {
|
doRepaint(): void {
|
||||||
const codeGraph = this.codeGraph;
|
const codeGraph = this.codeGraph;
|
||||||
codeGraph.text = this.datas.code;
|
codeGraph.text = this.datas.code;
|
||||||
@ -106,12 +133,13 @@ export class CarWashing extends JlGraphic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class CarWashingTemplate extends JlGraphicTemplate<CarWashing> {
|
export class CarWashingTemplate extends JlGraphicTemplate<CarWashing> {
|
||||||
constructor(dataTemplate: ICarWashingData) {
|
constructor(dataTemplate: ICarWashingData, stateTemplate?: ICarWashingState) {
|
||||||
super(CarWashing.Type, { dataTemplate });
|
super(CarWashing.Type, { dataTemplate, stateTemplate });
|
||||||
}
|
}
|
||||||
new(): CarWashing {
|
new(): CarWashing {
|
||||||
const carWashing = new CarWashing();
|
const carWashing = new CarWashing();
|
||||||
carWashing.loadData(this.datas);
|
carWashing.loadData(this.datas);
|
||||||
|
carWashing.loadState(this.states);
|
||||||
return carWashing;
|
return carWashing;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -702,7 +702,7 @@ const garageDoorCjList = [
|
|||||||
const floodGateCjList = garageDoorCjList;
|
const floodGateCjList = garageDoorCjList;
|
||||||
|
|
||||||
//洗车机
|
//洗车机
|
||||||
const carWashingCjList = [
|
const threecarWashingCjList = [
|
||||||
{
|
{
|
||||||
code: 'XCJ1',
|
code: 'XCJ1',
|
||||||
refDeviceCodesAndPos: [
|
refDeviceCodesAndPos: [
|
||||||
@ -743,13 +743,13 @@ const carWashingCjList = [
|
|||||||
refDeviceCodesAndPos: [
|
refDeviceCodesAndPos: [
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
code: 'XCIXJ',
|
code: 'XCJXJ',
|
||||||
position: PostionType.Q,
|
position: PostionType.Q,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
code: 'XCIXJ',
|
code: 'XCJXJ',
|
||||||
position: PostionType.H,
|
position: PostionType.H,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -829,6 +829,24 @@ const carWashingCjList = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const twocarWashingCjList = threecarWashingCjList.map((cjData) => ({
|
||||||
|
code: cjData.code,
|
||||||
|
refDeviceCodesAndPos: cjData.refDeviceCodesAndPos
|
||||||
|
.map((device) =>
|
||||||
|
device.filter((item) => item.code !== 'TWJ3' && item.code !== 'CFJ3')
|
||||||
|
)
|
||||||
|
.filter((item) => item.length > 0),
|
||||||
|
}));
|
||||||
|
|
||||||
|
const onecarWashingCjList = twocarWashingCjList.map((cjData) => ({
|
||||||
|
code: cjData.code,
|
||||||
|
refDeviceCodesAndPos: cjData.refDeviceCodesAndPos
|
||||||
|
.map((device) =>
|
||||||
|
device.filter((item) => item.code !== 'TWJ2' && item.code !== 'CFJ2')
|
||||||
|
)
|
||||||
|
.filter((item) => item.length > 0),
|
||||||
|
}));
|
||||||
|
|
||||||
const DeviceType = graphicData.RelatedRef.DeviceType;
|
const DeviceType = graphicData.RelatedRef.DeviceType;
|
||||||
export const ciCjMap = new Map<string, CjData[]>([
|
export const ciCjMap = new Map<string, CjData[]>([
|
||||||
[
|
[
|
||||||
@ -872,6 +890,8 @@ export const ciCjMap = new Map<string, CjData[]>([
|
|||||||
[`${DeviceType.Breakers}+undefined`, breakersCjList],
|
[`${DeviceType.Breakers}+undefined`, breakersCjList],
|
||||||
[`${DeviceType.PowerScreen}+undefined`, powerScreenCjList],
|
[`${DeviceType.PowerScreen}+undefined`, powerScreenCjList],
|
||||||
[`${DeviceType.GarageDoor}+undefined`, garageDoorCjList],
|
[`${DeviceType.GarageDoor}+undefined`, garageDoorCjList],
|
||||||
[`${DeviceType.CarWashing}+undefined`, carWashingCjList],
|
[`${DeviceType.CarWashing}+3`, threecarWashingCjList],
|
||||||
|
[`${DeviceType.CarWashing}+2`, twocarWashingCjList],
|
||||||
|
[`${DeviceType.CarWashing}+1`, onecarWashingCjList],
|
||||||
[`${DeviceType.FloodGate}+undefined`, floodGateCjList],
|
[`${DeviceType.FloodGate}+undefined`, floodGateCjList],
|
||||||
]);
|
]);
|
||||||
|
@ -105,13 +105,27 @@ const garageDoorQdList = [
|
|||||||
|
|
||||||
const floodGateQdList = garageDoorQdList;
|
const floodGateQdList = garageDoorQdList;
|
||||||
|
|
||||||
const carWashingQdList = [
|
const threecarWashingQdList = [
|
||||||
{
|
{
|
||||||
code: 'XCJ1',
|
code: 'XCJ1',
|
||||||
refDeviceCodes: [['XQJ'], ['TWJ1'], ['TWJ2'], ['TWJ3'], ['TGQJ']],
|
refDeviceCodes: [['XQJ'], ['TWJ1'], ['TWJ2'], ['TWJ3'], ['TGQJ']],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const twocarWashingQdList = [
|
||||||
|
{
|
||||||
|
code: 'XCJ1',
|
||||||
|
refDeviceCodes: [['XQJ'], ['TWJ1'], ['TWJ2'], ['TGQJ']],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const onecarWashingQdList = [
|
||||||
|
{
|
||||||
|
code: 'XCJ1',
|
||||||
|
refDeviceCodes: [['XQJ'], ['TWJ1'], ['TGQJ']],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
watch(changeScreenDoorGroup, (group) => {
|
watch(changeScreenDoorGroup, (group) => {
|
||||||
downScreenDoorQdList[0].refDeviceCodes = [['XGMJ']];
|
downScreenDoorQdList[0].refDeviceCodes = [['XGMJ']];
|
||||||
if (group?.length == 1) {
|
if (group?.length == 1) {
|
||||||
@ -177,6 +191,8 @@ export const ciQdMap = new Map<string, QdData[]>([
|
|||||||
[`${DeviceType.ScreenDoor}+down`, downScreenDoorQdList],
|
[`${DeviceType.ScreenDoor}+down`, downScreenDoorQdList],
|
||||||
[`${DeviceType.ScreenDoor}+up`, upScreenDoorQdList],
|
[`${DeviceType.ScreenDoor}+up`, upScreenDoorQdList],
|
||||||
[`${DeviceType.GarageDoor}+undefined`, garageDoorQdList],
|
[`${DeviceType.GarageDoor}+undefined`, garageDoorQdList],
|
||||||
[`${DeviceType.CarWashing}+undefined`, carWashingQdList],
|
[`${DeviceType.CarWashing}+3`, threecarWashingQdList],
|
||||||
|
[`${DeviceType.CarWashing}+2`, twocarWashingQdList],
|
||||||
|
[`${DeviceType.CarWashing}+1`, onecarWashingQdList],
|
||||||
[`${DeviceType.FloodGate}+undefined`, floodGateQdList],
|
[`${DeviceType.FloodGate}+undefined`, floodGateQdList],
|
||||||
]);
|
]);
|
||||||
|
@ -468,7 +468,7 @@ const garageDoorCombinations = [
|
|||||||
const floodGateCombinations = garageDoorCombinations;
|
const floodGateCombinations = garageDoorCombinations;
|
||||||
|
|
||||||
//洗车机
|
//洗车机
|
||||||
const carWashingCombinations = [
|
const threeCarWashingCombinations = [
|
||||||
{
|
{
|
||||||
code: 'XCJ1',
|
code: 'XCJ1',
|
||||||
refDeviceCodesAndModel: [
|
refDeviceCodesAndModel: [
|
||||||
@ -498,7 +498,7 @@ const carWashingCombinations = [
|
|||||||
code: 'XCJ2',
|
code: 'XCJ2',
|
||||||
refDeviceCodesAndModel: [
|
refDeviceCodesAndModel: [
|
||||||
{
|
{
|
||||||
code: 'XCIXJ',
|
code: 'XCJXJ',
|
||||||
model: RelayModelType.JWXC_1700,
|
model: RelayModelType.JWXC_1700,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -529,6 +529,24 @@ const carWashingCombinations = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const twoCarWashingCombinations = threeCarWashingCombinations.map(
|
||||||
|
(combination) => ({
|
||||||
|
code: combination.code,
|
||||||
|
refDeviceCodesAndModel: combination.refDeviceCodesAndModel.filter(
|
||||||
|
(item) => item.code !== 'TWJ3' && item.code !== 'CFJ3'
|
||||||
|
),
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
const oneCarWashingCombinations = twoCarWashingCombinations.map(
|
||||||
|
(combination) => ({
|
||||||
|
code: combination.code,
|
||||||
|
refDeviceCodesAndModel: combination.refDeviceCodesAndModel.filter(
|
||||||
|
(item) => item.code !== 'TWJ2' && item.code !== 'CFJ2'
|
||||||
|
),
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
const DeviceType = graphicData.RelatedRef.DeviceType;
|
const DeviceType = graphicData.RelatedRef.DeviceType;
|
||||||
export const combinationsMap = new Map<string, Combinationtype[]>([
|
export const combinationsMap = new Map<string, Combinationtype[]>([
|
||||||
[
|
[
|
||||||
@ -572,6 +590,8 @@ export const combinationsMap = new Map<string, Combinationtype[]>([
|
|||||||
[`${DeviceType.Breakers}`, breakersCombinations],
|
[`${DeviceType.Breakers}`, breakersCombinations],
|
||||||
[`${DeviceType.PowerScreen}`, powerScreenCombinations],
|
[`${DeviceType.PowerScreen}`, powerScreenCombinations],
|
||||||
[`${DeviceType.GarageDoor}`, garageDoorCombinations],
|
[`${DeviceType.GarageDoor}`, garageDoorCombinations],
|
||||||
[`${DeviceType.CarWashing}`, carWashingCombinations],
|
[`${DeviceType.CarWashing + '+' + '3'}`, threeCarWashingCombinations],
|
||||||
|
[`${DeviceType.CarWashing + '+' + '2'}`, twoCarWashingCombinations],
|
||||||
|
[`${DeviceType.CarWashing + '+' + '1'}`, oneCarWashingCombinations],
|
||||||
[`${DeviceType.FloodGate}`, floodGateCombinations],
|
[`${DeviceType.FloodGate}`, floodGateCombinations],
|
||||||
]);
|
]);
|
||||||
|
@ -770,8 +770,9 @@ function oneClickGeneraterRelayLayout() {
|
|||||||
});
|
});
|
||||||
//洗车机
|
//洗车机
|
||||||
storage.carWashings.forEach((carWashing) => {
|
storage.carWashings.forEach((carWashing) => {
|
||||||
|
const duanNum = carWashing.duanNum || 3;
|
||||||
const deviceCombinations = combinationsMap.get(
|
const deviceCombinations = combinationsMap.get(
|
||||||
`${DeviceType.CarWashing}`
|
`${DeviceType.CarWashing}+${duanNum}`
|
||||||
);
|
);
|
||||||
if (
|
if (
|
||||||
carWashing.centralizedStations.includes(concentrationStation) &&
|
carWashing.centralizedStations.includes(concentrationStation) &&
|
||||||
@ -782,6 +783,10 @@ function oneClickGeneraterRelayLayout() {
|
|||||||
DeviceType.CarWashing,
|
DeviceType.CarWashing,
|
||||||
carWashing.code
|
carWashing.code
|
||||||
);
|
);
|
||||||
|
allDeviceModelMap.set(
|
||||||
|
`${DeviceType.CarWashing}+${carWashing.code}`,
|
||||||
|
`${carWashing.duanNum}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//信号机故障报警仪-电源屏-断路器
|
//信号机故障报警仪-电源屏-断路器
|
||||||
|
@ -6989,6 +6989,283 @@ export namespace state {
|
|||||||
return CkmState.deserialize(bytes);
|
return CkmState.deserialize(bytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
export class XcjState extends pb_1.Message {
|
||||||
|
#one_of_decls: number[][] = [];
|
||||||
|
constructor(data?: any[] | {
|
||||||
|
id?: number;
|
||||||
|
param?: dependency_3.request.XcjParam;
|
||||||
|
xqj?: boolean;
|
||||||
|
twjList?: boolean[];
|
||||||
|
tgqj?: boolean;
|
||||||
|
xcjxj?: boolean;
|
||||||
|
xcyxj?: boolean;
|
||||||
|
cfjList?: boolean[];
|
||||||
|
jtj?: boolean;
|
||||||
|
tgyxj?: boolean;
|
||||||
|
}) {
|
||||||
|
super();
|
||||||
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 8], this.#one_of_decls);
|
||||||
|
if (!Array.isArray(data) && typeof data == "object") {
|
||||||
|
if ("id" in data && data.id != undefined) {
|
||||||
|
this.id = data.id;
|
||||||
|
}
|
||||||
|
if ("param" in data && data.param != undefined) {
|
||||||
|
this.param = data.param;
|
||||||
|
}
|
||||||
|
if ("xqj" in data && data.xqj != undefined) {
|
||||||
|
this.xqj = data.xqj;
|
||||||
|
}
|
||||||
|
if ("twjList" in data && data.twjList != undefined) {
|
||||||
|
this.twjList = data.twjList;
|
||||||
|
}
|
||||||
|
if ("tgqj" in data && data.tgqj != undefined) {
|
||||||
|
this.tgqj = data.tgqj;
|
||||||
|
}
|
||||||
|
if ("xcjxj" in data && data.xcjxj != undefined) {
|
||||||
|
this.xcjxj = data.xcjxj;
|
||||||
|
}
|
||||||
|
if ("xcyxj" in data && data.xcyxj != undefined) {
|
||||||
|
this.xcyxj = data.xcyxj;
|
||||||
|
}
|
||||||
|
if ("cfjList" in data && data.cfjList != undefined) {
|
||||||
|
this.cfjList = data.cfjList;
|
||||||
|
}
|
||||||
|
if ("jtj" in data && data.jtj != undefined) {
|
||||||
|
this.jtj = data.jtj;
|
||||||
|
}
|
||||||
|
if ("tgyxj" in data && data.tgyxj != undefined) {
|
||||||
|
this.tgyxj = data.tgyxj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
get id() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
|
||||||
|
}
|
||||||
|
set id(value: number) {
|
||||||
|
pb_1.Message.setField(this, 1, value);
|
||||||
|
}
|
||||||
|
get param() {
|
||||||
|
return pb_1.Message.getWrapperField(this, dependency_3.request.XcjParam, 2) as dependency_3.request.XcjParam;
|
||||||
|
}
|
||||||
|
set param(value: dependency_3.request.XcjParam) {
|
||||||
|
pb_1.Message.setWrapperField(this, 2, value);
|
||||||
|
}
|
||||||
|
get has_param() {
|
||||||
|
return pb_1.Message.getField(this, 2) != null;
|
||||||
|
}
|
||||||
|
get xqj() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean;
|
||||||
|
}
|
||||||
|
set xqj(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 3, value);
|
||||||
|
}
|
||||||
|
get twjList() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 4, []) as boolean[];
|
||||||
|
}
|
||||||
|
set twjList(value: boolean[]) {
|
||||||
|
pb_1.Message.setField(this, 4, value);
|
||||||
|
}
|
||||||
|
get tgqj() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean;
|
||||||
|
}
|
||||||
|
set tgqj(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 5, value);
|
||||||
|
}
|
||||||
|
get xcjxj() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean;
|
||||||
|
}
|
||||||
|
set xcjxj(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 6, value);
|
||||||
|
}
|
||||||
|
get xcyxj() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 7, false) as boolean;
|
||||||
|
}
|
||||||
|
set xcyxj(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 7, value);
|
||||||
|
}
|
||||||
|
get cfjList() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 8, []) as boolean[];
|
||||||
|
}
|
||||||
|
set cfjList(value: boolean[]) {
|
||||||
|
pb_1.Message.setField(this, 8, value);
|
||||||
|
}
|
||||||
|
get jtj() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 9, false) as boolean;
|
||||||
|
}
|
||||||
|
set jtj(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 9, value);
|
||||||
|
}
|
||||||
|
get tgyxj() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean;
|
||||||
|
}
|
||||||
|
set tgyxj(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 10, value);
|
||||||
|
}
|
||||||
|
static fromObject(data: {
|
||||||
|
id?: number;
|
||||||
|
param?: ReturnType<typeof dependency_3.request.XcjParam.prototype.toObject>;
|
||||||
|
xqj?: boolean;
|
||||||
|
twjList?: boolean[];
|
||||||
|
tgqj?: boolean;
|
||||||
|
xcjxj?: boolean;
|
||||||
|
xcyxj?: boolean;
|
||||||
|
cfjList?: boolean[];
|
||||||
|
jtj?: boolean;
|
||||||
|
tgyxj?: boolean;
|
||||||
|
}): XcjState {
|
||||||
|
const message = new XcjState({});
|
||||||
|
if (data.id != null) {
|
||||||
|
message.id = data.id;
|
||||||
|
}
|
||||||
|
if (data.param != null) {
|
||||||
|
message.param = dependency_3.request.XcjParam.fromObject(data.param);
|
||||||
|
}
|
||||||
|
if (data.xqj != null) {
|
||||||
|
message.xqj = data.xqj;
|
||||||
|
}
|
||||||
|
if (data.twjList != null) {
|
||||||
|
message.twjList = data.twjList;
|
||||||
|
}
|
||||||
|
if (data.tgqj != null) {
|
||||||
|
message.tgqj = data.tgqj;
|
||||||
|
}
|
||||||
|
if (data.xcjxj != null) {
|
||||||
|
message.xcjxj = data.xcjxj;
|
||||||
|
}
|
||||||
|
if (data.xcyxj != null) {
|
||||||
|
message.xcyxj = data.xcyxj;
|
||||||
|
}
|
||||||
|
if (data.cfjList != null) {
|
||||||
|
message.cfjList = data.cfjList;
|
||||||
|
}
|
||||||
|
if (data.jtj != null) {
|
||||||
|
message.jtj = data.jtj;
|
||||||
|
}
|
||||||
|
if (data.tgyxj != null) {
|
||||||
|
message.tgyxj = data.tgyxj;
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
toObject() {
|
||||||
|
const data: {
|
||||||
|
id?: number;
|
||||||
|
param?: ReturnType<typeof dependency_3.request.XcjParam.prototype.toObject>;
|
||||||
|
xqj?: boolean;
|
||||||
|
twjList?: boolean[];
|
||||||
|
tgqj?: boolean;
|
||||||
|
xcjxj?: boolean;
|
||||||
|
xcyxj?: boolean;
|
||||||
|
cfjList?: boolean[];
|
||||||
|
jtj?: boolean;
|
||||||
|
tgyxj?: boolean;
|
||||||
|
} = {};
|
||||||
|
if (this.id != null) {
|
||||||
|
data.id = this.id;
|
||||||
|
}
|
||||||
|
if (this.param != null) {
|
||||||
|
data.param = this.param.toObject();
|
||||||
|
}
|
||||||
|
if (this.xqj != null) {
|
||||||
|
data.xqj = this.xqj;
|
||||||
|
}
|
||||||
|
if (this.twjList != null) {
|
||||||
|
data.twjList = this.twjList;
|
||||||
|
}
|
||||||
|
if (this.tgqj != null) {
|
||||||
|
data.tgqj = this.tgqj;
|
||||||
|
}
|
||||||
|
if (this.xcjxj != null) {
|
||||||
|
data.xcjxj = this.xcjxj;
|
||||||
|
}
|
||||||
|
if (this.xcyxj != null) {
|
||||||
|
data.xcyxj = this.xcyxj;
|
||||||
|
}
|
||||||
|
if (this.cfjList != null) {
|
||||||
|
data.cfjList = this.cfjList;
|
||||||
|
}
|
||||||
|
if (this.jtj != null) {
|
||||||
|
data.jtj = this.jtj;
|
||||||
|
}
|
||||||
|
if (this.tgyxj != null) {
|
||||||
|
data.tgyxj = this.tgyxj;
|
||||||
|
}
|
||||||
|
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.id != 0)
|
||||||
|
writer.writeUint32(1, this.id);
|
||||||
|
if (this.has_param)
|
||||||
|
writer.writeMessage(2, this.param, () => this.param.serialize(writer));
|
||||||
|
if (this.xqj != false)
|
||||||
|
writer.writeBool(3, this.xqj);
|
||||||
|
if (this.twjList.length)
|
||||||
|
writer.writePackedBool(4, this.twjList);
|
||||||
|
if (this.tgqj != false)
|
||||||
|
writer.writeBool(5, this.tgqj);
|
||||||
|
if (this.xcjxj != false)
|
||||||
|
writer.writeBool(6, this.xcjxj);
|
||||||
|
if (this.xcyxj != false)
|
||||||
|
writer.writeBool(7, this.xcyxj);
|
||||||
|
if (this.cfjList.length)
|
||||||
|
writer.writePackedBool(8, this.cfjList);
|
||||||
|
if (this.jtj != false)
|
||||||
|
writer.writeBool(9, this.jtj);
|
||||||
|
if (this.tgyxj != false)
|
||||||
|
writer.writeBool(10, this.tgyxj);
|
||||||
|
if (!w)
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
}
|
||||||
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): XcjState {
|
||||||
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new XcjState();
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup())
|
||||||
|
break;
|
||||||
|
switch (reader.getFieldNumber()) {
|
||||||
|
case 1:
|
||||||
|
message.id = reader.readUint32();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
reader.readMessage(message.param, () => message.param = dependency_3.request.XcjParam.deserialize(reader));
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
message.xqj = reader.readBool();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
message.twjList = reader.readPackedBool();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
message.tgqj = reader.readBool();
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
message.xcjxj = reader.readBool();
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
message.xcyxj = reader.readBool();
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
message.cfjList = reader.readPackedBool();
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
message.jtj = reader.readBool();
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
message.tgyxj = reader.readBool();
|
||||||
|
break;
|
||||||
|
default: reader.skipField();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
serializeBinary(): Uint8Array {
|
||||||
|
return this.serialize();
|
||||||
|
}
|
||||||
|
static deserializeBinary(bytes: Uint8Array): XcjState {
|
||||||
|
return XcjState.deserialize(bytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
export class VariationStatus extends pb_1.Message {
|
export class VariationStatus extends pb_1.Message {
|
||||||
#one_of_decls: number[][] = [];
|
#one_of_decls: number[][] = [];
|
||||||
constructor(data?: any[] | {
|
constructor(data?: any[] | {
|
||||||
@ -7166,9 +7443,10 @@ export namespace state {
|
|||||||
stationQc?: StationQc;
|
stationQc?: StationQc;
|
||||||
ckmStates?: CkmState[];
|
ckmStates?: CkmState[];
|
||||||
fymStates?: CkmState[];
|
fymStates?: CkmState[];
|
||||||
|
xcjStates?: XcjState[];
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16], this.#one_of_decls);
|
||||||
if (!Array.isArray(data) && typeof data == "object") {
|
if (!Array.isArray(data) && typeof data == "object") {
|
||||||
if ("trainState" in data && data.trainState != undefined) {
|
if ("trainState" in data && data.trainState != undefined) {
|
||||||
this.trainState = data.trainState;
|
this.trainState = data.trainState;
|
||||||
@ -7215,6 +7493,9 @@ export namespace state {
|
|||||||
if ("fymStates" in data && data.fymStates != undefined) {
|
if ("fymStates" in data && data.fymStates != undefined) {
|
||||||
this.fymStates = data.fymStates;
|
this.fymStates = data.fymStates;
|
||||||
}
|
}
|
||||||
|
if ("xcjStates" in data && data.xcjStates != undefined) {
|
||||||
|
this.xcjStates = data.xcjStates;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get trainState() {
|
get trainState() {
|
||||||
@ -7310,6 +7591,12 @@ export namespace state {
|
|||||||
set fymStates(value: CkmState[]) {
|
set fymStates(value: CkmState[]) {
|
||||||
pb_1.Message.setRepeatedWrapperField(this, 15, value);
|
pb_1.Message.setRepeatedWrapperField(this, 15, value);
|
||||||
}
|
}
|
||||||
|
get xcjStates() {
|
||||||
|
return pb_1.Message.getRepeatedWrapperField(this, XcjState, 16) as XcjState[];
|
||||||
|
}
|
||||||
|
set xcjStates(value: XcjState[]) {
|
||||||
|
pb_1.Message.setRepeatedWrapperField(this, 16, value);
|
||||||
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
trainState?: ReturnType<typeof TrainMapState.prototype.toObject>[];
|
trainState?: ReturnType<typeof TrainMapState.prototype.toObject>[];
|
||||||
switchState?: ReturnType<typeof SwitchState.prototype.toObject>[];
|
switchState?: ReturnType<typeof SwitchState.prototype.toObject>[];
|
||||||
@ -7326,6 +7613,7 @@ export namespace state {
|
|||||||
stationQc?: ReturnType<typeof StationQc.prototype.toObject>;
|
stationQc?: ReturnType<typeof StationQc.prototype.toObject>;
|
||||||
ckmStates?: ReturnType<typeof CkmState.prototype.toObject>[];
|
ckmStates?: ReturnType<typeof CkmState.prototype.toObject>[];
|
||||||
fymStates?: ReturnType<typeof CkmState.prototype.toObject>[];
|
fymStates?: ReturnType<typeof CkmState.prototype.toObject>[];
|
||||||
|
xcjStates?: ReturnType<typeof XcjState.prototype.toObject>[];
|
||||||
}): AllDevicesStatus {
|
}): AllDevicesStatus {
|
||||||
const message = new AllDevicesStatus({});
|
const message = new AllDevicesStatus({});
|
||||||
if (data.trainState != null) {
|
if (data.trainState != null) {
|
||||||
@ -7373,6 +7661,9 @@ export namespace state {
|
|||||||
if (data.fymStates != null) {
|
if (data.fymStates != null) {
|
||||||
message.fymStates = data.fymStates.map(item => CkmState.fromObject(item));
|
message.fymStates = data.fymStates.map(item => CkmState.fromObject(item));
|
||||||
}
|
}
|
||||||
|
if (data.xcjStates != null) {
|
||||||
|
message.xcjStates = data.xcjStates.map(item => XcjState.fromObject(item));
|
||||||
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
toObject() {
|
toObject() {
|
||||||
@ -7392,6 +7683,7 @@ export namespace state {
|
|||||||
stationQc?: ReturnType<typeof StationQc.prototype.toObject>;
|
stationQc?: ReturnType<typeof StationQc.prototype.toObject>;
|
||||||
ckmStates?: ReturnType<typeof CkmState.prototype.toObject>[];
|
ckmStates?: ReturnType<typeof CkmState.prototype.toObject>[];
|
||||||
fymStates?: ReturnType<typeof CkmState.prototype.toObject>[];
|
fymStates?: ReturnType<typeof CkmState.prototype.toObject>[];
|
||||||
|
xcjStates?: ReturnType<typeof XcjState.prototype.toObject>[];
|
||||||
} = {};
|
} = {};
|
||||||
if (this.trainState != null) {
|
if (this.trainState != null) {
|
||||||
data.trainState = this.trainState.map((item: TrainMapState) => item.toObject());
|
data.trainState = this.trainState.map((item: TrainMapState) => item.toObject());
|
||||||
@ -7438,6 +7730,9 @@ export namespace state {
|
|||||||
if (this.fymStates != null) {
|
if (this.fymStates != null) {
|
||||||
data.fymStates = this.fymStates.map((item: CkmState) => item.toObject());
|
data.fymStates = this.fymStates.map((item: CkmState) => item.toObject());
|
||||||
}
|
}
|
||||||
|
if (this.xcjStates != null) {
|
||||||
|
data.xcjStates = this.xcjStates.map((item: XcjState) => item.toObject());
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
serialize(): Uint8Array;
|
serialize(): Uint8Array;
|
||||||
@ -7474,6 +7769,8 @@ export namespace state {
|
|||||||
writer.writeRepeatedMessage(14, this.ckmStates, (item: CkmState) => item.serialize(writer));
|
writer.writeRepeatedMessage(14, this.ckmStates, (item: CkmState) => item.serialize(writer));
|
||||||
if (this.fymStates.length)
|
if (this.fymStates.length)
|
||||||
writer.writeRepeatedMessage(15, this.fymStates, (item: CkmState) => item.serialize(writer));
|
writer.writeRepeatedMessage(15, this.fymStates, (item: CkmState) => item.serialize(writer));
|
||||||
|
if (this.xcjStates.length)
|
||||||
|
writer.writeRepeatedMessage(16, this.xcjStates, (item: XcjState) => item.serialize(writer));
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -7528,6 +7825,9 @@ export namespace state {
|
|||||||
case 15:
|
case 15:
|
||||||
reader.readMessage(message.fymStates, () => pb_1.Message.addToRepeatedWrapperField(message, 15, CkmState.deserialize(reader), CkmState));
|
reader.readMessage(message.fymStates, () => pb_1.Message.addToRepeatedWrapperField(message, 15, CkmState.deserialize(reader), CkmState));
|
||||||
break;
|
break;
|
||||||
|
case 16:
|
||||||
|
reader.readMessage(message.xcjStates, () => pb_1.Message.addToRepeatedWrapperField(message, 16, XcjState.deserialize(reader), XcjState));
|
||||||
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2264,14 +2264,14 @@ export namespace request {
|
|||||||
return CkmParam.deserialize(bytes);
|
return CkmParam.deserialize(bytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export class CkmBoxOperationReq extends pb_1.Message {
|
export class XcjOperationReq extends pb_1.Message {
|
||||||
#one_of_decls: number[][] = [];
|
#one_of_decls: number[][] = [];
|
||||||
constructor(data?: any[] | {
|
constructor(data?: any[] | {
|
||||||
simulationId?: string;
|
simulationId?: string;
|
||||||
mapId?: number;
|
mapId?: number;
|
||||||
ckmBoxId?: number;
|
deviceId?: number;
|
||||||
buttonCode?: string;
|
operation?: Xcj.Operation;
|
||||||
down?: boolean;
|
param?: XcjParam;
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||||
@ -2282,14 +2282,14 @@ export namespace request {
|
|||||||
if ("mapId" in data && data.mapId != undefined) {
|
if ("mapId" in data && data.mapId != undefined) {
|
||||||
this.mapId = data.mapId;
|
this.mapId = data.mapId;
|
||||||
}
|
}
|
||||||
if ("ckmBoxId" in data && data.ckmBoxId != undefined) {
|
if ("deviceId" in data && data.deviceId != undefined) {
|
||||||
this.ckmBoxId = data.ckmBoxId;
|
this.deviceId = data.deviceId;
|
||||||
}
|
}
|
||||||
if ("buttonCode" in data && data.buttonCode != undefined) {
|
if ("operation" in data && data.operation != undefined) {
|
||||||
this.buttonCode = data.buttonCode;
|
this.operation = data.operation;
|
||||||
}
|
}
|
||||||
if ("down" in data && data.down != undefined) {
|
if ("param" in data && data.param != undefined) {
|
||||||
this.down = data.down;
|
this.param = data.param;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2305,46 +2305,49 @@ export namespace request {
|
|||||||
set mapId(value: number) {
|
set mapId(value: number) {
|
||||||
pb_1.Message.setField(this, 2, value);
|
pb_1.Message.setField(this, 2, value);
|
||||||
}
|
}
|
||||||
get ckmBoxId() {
|
get deviceId() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
|
return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
|
||||||
}
|
}
|
||||||
set ckmBoxId(value: number) {
|
set deviceId(value: number) {
|
||||||
pb_1.Message.setField(this, 3, value);
|
pb_1.Message.setField(this, 3, value);
|
||||||
}
|
}
|
||||||
get buttonCode() {
|
get operation() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
|
return pb_1.Message.getFieldWithDefault(this, 4, Xcj.Operation.Undefined) as Xcj.Operation;
|
||||||
}
|
}
|
||||||
set buttonCode(value: string) {
|
set operation(value: Xcj.Operation) {
|
||||||
pb_1.Message.setField(this, 4, value);
|
pb_1.Message.setField(this, 4, value);
|
||||||
}
|
}
|
||||||
get down() {
|
get param() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean;
|
return pb_1.Message.getWrapperField(this, XcjParam, 5) as XcjParam;
|
||||||
}
|
}
|
||||||
set down(value: boolean) {
|
set param(value: XcjParam) {
|
||||||
pb_1.Message.setField(this, 5, value);
|
pb_1.Message.setWrapperField(this, 5, value);
|
||||||
|
}
|
||||||
|
get has_param() {
|
||||||
|
return pb_1.Message.getField(this, 5) != null;
|
||||||
}
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
simulationId?: string;
|
simulationId?: string;
|
||||||
mapId?: number;
|
mapId?: number;
|
||||||
ckmBoxId?: number;
|
deviceId?: number;
|
||||||
buttonCode?: string;
|
operation?: Xcj.Operation;
|
||||||
down?: boolean;
|
param?: ReturnType<typeof XcjParam.prototype.toObject>;
|
||||||
}): CkmBoxOperationReq {
|
}): XcjOperationReq {
|
||||||
const message = new CkmBoxOperationReq({});
|
const message = new XcjOperationReq({});
|
||||||
if (data.simulationId != null) {
|
if (data.simulationId != null) {
|
||||||
message.simulationId = data.simulationId;
|
message.simulationId = data.simulationId;
|
||||||
}
|
}
|
||||||
if (data.mapId != null) {
|
if (data.mapId != null) {
|
||||||
message.mapId = data.mapId;
|
message.mapId = data.mapId;
|
||||||
}
|
}
|
||||||
if (data.ckmBoxId != null) {
|
if (data.deviceId != null) {
|
||||||
message.ckmBoxId = data.ckmBoxId;
|
message.deviceId = data.deviceId;
|
||||||
}
|
}
|
||||||
if (data.buttonCode != null) {
|
if (data.operation != null) {
|
||||||
message.buttonCode = data.buttonCode;
|
message.operation = data.operation;
|
||||||
}
|
}
|
||||||
if (data.down != null) {
|
if (data.param != null) {
|
||||||
message.down = data.down;
|
message.param = XcjParam.fromObject(data.param);
|
||||||
}
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
@ -2352,9 +2355,9 @@ export namespace request {
|
|||||||
const data: {
|
const data: {
|
||||||
simulationId?: string;
|
simulationId?: string;
|
||||||
mapId?: number;
|
mapId?: number;
|
||||||
ckmBoxId?: number;
|
deviceId?: number;
|
||||||
buttonCode?: string;
|
operation?: Xcj.Operation;
|
||||||
down?: boolean;
|
param?: ReturnType<typeof XcjParam.prototype.toObject>;
|
||||||
} = {};
|
} = {};
|
||||||
if (this.simulationId != null) {
|
if (this.simulationId != null) {
|
||||||
data.simulationId = this.simulationId;
|
data.simulationId = this.simulationId;
|
||||||
@ -2362,14 +2365,14 @@ export namespace request {
|
|||||||
if (this.mapId != null) {
|
if (this.mapId != null) {
|
||||||
data.mapId = this.mapId;
|
data.mapId = this.mapId;
|
||||||
}
|
}
|
||||||
if (this.ckmBoxId != null) {
|
if (this.deviceId != null) {
|
||||||
data.ckmBoxId = this.ckmBoxId;
|
data.deviceId = this.deviceId;
|
||||||
}
|
}
|
||||||
if (this.buttonCode != null) {
|
if (this.operation != null) {
|
||||||
data.buttonCode = this.buttonCode;
|
data.operation = this.operation;
|
||||||
}
|
}
|
||||||
if (this.down != null) {
|
if (this.param != null) {
|
||||||
data.down = this.down;
|
data.param = this.param.toObject();
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
@ -2381,17 +2384,17 @@ export namespace request {
|
|||||||
writer.writeString(1, this.simulationId);
|
writer.writeString(1, this.simulationId);
|
||||||
if (this.mapId != 0)
|
if (this.mapId != 0)
|
||||||
writer.writeInt32(2, this.mapId);
|
writer.writeInt32(2, this.mapId);
|
||||||
if (this.ckmBoxId != 0)
|
if (this.deviceId != 0)
|
||||||
writer.writeUint32(3, this.ckmBoxId);
|
writer.writeUint32(3, this.deviceId);
|
||||||
if (this.buttonCode.length)
|
if (this.operation != Xcj.Operation.Undefined)
|
||||||
writer.writeString(4, this.buttonCode);
|
writer.writeEnum(4, this.operation);
|
||||||
if (this.down != false)
|
if (this.has_param)
|
||||||
writer.writeBool(5, this.down);
|
writer.writeMessage(5, this.param, () => this.param.serialize(writer));
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CkmBoxOperationReq {
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): XcjOperationReq {
|
||||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CkmBoxOperationReq();
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new XcjOperationReq();
|
||||||
while (reader.nextField()) {
|
while (reader.nextField()) {
|
||||||
if (reader.isEndGroup())
|
if (reader.isEndGroup())
|
||||||
break;
|
break;
|
||||||
@ -2403,13 +2406,13 @@ export namespace request {
|
|||||||
message.mapId = reader.readInt32();
|
message.mapId = reader.readInt32();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
message.ckmBoxId = reader.readUint32();
|
message.deviceId = reader.readUint32();
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
message.buttonCode = reader.readString();
|
message.operation = reader.readEnum();
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
message.down = reader.readBool();
|
reader.readMessage(message.param, () => message.param = XcjParam.deserialize(reader));
|
||||||
break;
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
@ -2419,8 +2422,125 @@ export namespace request {
|
|||||||
serializeBinary(): Uint8Array {
|
serializeBinary(): Uint8Array {
|
||||||
return this.serialize();
|
return this.serialize();
|
||||||
}
|
}
|
||||||
static deserializeBinary(bytes: Uint8Array): CkmBoxOperationReq {
|
static deserializeBinary(bytes: Uint8Array): XcjOperationReq {
|
||||||
return CkmBoxOperationReq.deserialize(bytes);
|
return XcjOperationReq.deserialize(bytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export class Xcj 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: {}): Xcj {
|
||||||
|
const message = new Xcj({});
|
||||||
|
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): Xcj {
|
||||||
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Xcj();
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup())
|
||||||
|
break;
|
||||||
|
switch (reader.getFieldNumber()) {
|
||||||
|
default: reader.skipField();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
serializeBinary(): Uint8Array {
|
||||||
|
return this.serialize();
|
||||||
|
}
|
||||||
|
static deserializeBinary(bytes: Uint8Array): Xcj {
|
||||||
|
return Xcj.deserialize(bytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export namespace Xcj {
|
||||||
|
export enum Operation {
|
||||||
|
Undefined = 0,
|
||||||
|
SetParams = 1
|
||||||
|
}
|
||||||
|
export enum Fault {
|
||||||
|
FA_NONE = 0,
|
||||||
|
FA_Fault = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export class XcjParam extends pb_1.Message {
|
||||||
|
#one_of_decls: number[][] = [];
|
||||||
|
constructor(data?: any[] | {
|
||||||
|
fault?: Xcj.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 ("fault" in data && data.fault != undefined) {
|
||||||
|
this.fault = data.fault;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
get fault() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 1, Xcj.Fault.FA_NONE) as Xcj.Fault;
|
||||||
|
}
|
||||||
|
set fault(value: Xcj.Fault) {
|
||||||
|
pb_1.Message.setField(this, 1, value);
|
||||||
|
}
|
||||||
|
static fromObject(data: {
|
||||||
|
fault?: Xcj.Fault;
|
||||||
|
}): XcjParam {
|
||||||
|
const message = new XcjParam({});
|
||||||
|
if (data.fault != null) {
|
||||||
|
message.fault = data.fault;
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
toObject() {
|
||||||
|
const data: {
|
||||||
|
fault?: Xcj.Fault;
|
||||||
|
} = {};
|
||||||
|
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.fault != Xcj.Fault.FA_NONE)
|
||||||
|
writer.writeEnum(1, this.fault);
|
||||||
|
if (!w)
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
}
|
||||||
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): XcjParam {
|
||||||
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new XcjParam();
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup())
|
||||||
|
break;
|
||||||
|
switch (reader.getFieldNumber()) {
|
||||||
|
case 1:
|
||||||
|
message.fault = reader.readEnum();
|
||||||
|
break;
|
||||||
|
default: reader.skipField();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
serializeBinary(): Uint8Array {
|
||||||
|
return this.serialize();
|
||||||
|
}
|
||||||
|
static deserializeBinary(bytes: Uint8Array): XcjParam {
|
||||||
|
return XcjParam.deserialize(bytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user