Squashed commit of the following:
All checks were successful
CI / Docker-Build (push) Successful in 3m9s
All checks were successful
CI / Docker-Build (push) Successful in 3m9s
commit059a333370
Author: joylink_zhaoerwei <Bob_Engineer@163.com> Date: Mon Jun 24 21:08:58 2024 +0800 生成继电器增加展示编号配置 commitad7a1a8451
Author: joylink_zhaoerwei <Bob_Engineer@163.com> Date: Mon Jun 24 18:35:14 2024 +0800 增加IBP盘扣车继电器(IKCJ)、增加GDJ(计轴电源故障继电器)和ZFWJ commitb7a3200560
Author: joylink_zhaoerwei <Bob_Engineer@163.com> Date: Mon Jun 24 08:41:16 2024 +0800 道岔物理区段也生成GJ继电器 commit3a372610cf
Author: joylink_zhaoerwei <Bob_Engineer@163.com> Date: Thu Jun 20 17:41:27 2024 +0800 集中区分割线代码优化(风格线位于边界处一侧未关联区段) commitd784e2f0e6
Author: joylink_zhaoerwei <Bob_Engineer@163.com> Date: Wed Jun 19 10:56:19 2024 +0800 一键关联集中站加道岔物理区段也关联 commit00d413d494
Author: joylink_zhaoerwei <Bob_Engineer@163.com> Date: Wed Jun 19 09:56:52 2024 +0800 1.生成计轴时删除区段有问题的计轴(区段延伸处)2.隐藏使用集中区分割线的其他线边界处3.隐藏数据校验
This commit is contained in:
parent
36e7a532d6
commit
99a7cdfae0
@ -70,6 +70,8 @@ const deviceTypeMap = {
|
||||
11: '车库门',
|
||||
12: '洗车机',
|
||||
13: '防淹门',
|
||||
14: '站台',
|
||||
15: '零散',
|
||||
};
|
||||
const columns: QTable['columns'] = [
|
||||
{
|
||||
|
@ -90,12 +90,15 @@ const optionsType = [
|
||||
{ label: '洗车机', value: graphicData.RelatedRef.DeviceType.CarWashing },
|
||||
{ label: '防淹门', value: graphicData.RelatedRef.DeviceType.FloodGate },
|
||||
{ label: '区段', value: graphicData.RelatedRef.DeviceType.Section },
|
||||
{ label: '站台', value: graphicData.RelatedRef.DeviceType.Platform },
|
||||
{ label: '零散', value: graphicData.RelatedRef.DeviceType.LS },
|
||||
];
|
||||
|
||||
const noShowType = [
|
||||
graphicData.RelatedRef.DeviceType.SignalFaultAlarm,
|
||||
graphicData.RelatedRef.DeviceType.Breakers,
|
||||
graphicData.RelatedRef.DeviceType.PowerScreen,
|
||||
graphicData.RelatedRef.DeviceType.LS,
|
||||
];
|
||||
|
||||
onMounted(() => {
|
||||
|
@ -10,6 +10,15 @@
|
||||
label="编号"
|
||||
lazy-rules
|
||||
/>
|
||||
<q-input
|
||||
outlined
|
||||
v-model="relayModel.showCode"
|
||||
@blur="onUpdate"
|
||||
:emit-value="true"
|
||||
@update:model-value="onUpdate"
|
||||
label="展示的编号"
|
||||
lazy-rules
|
||||
/>
|
||||
<q-select
|
||||
outlined
|
||||
v-model="relayModel.newModel"
|
||||
|
@ -46,6 +46,12 @@ export class RelayData extends GraphicDataBase implements IRelayData {
|
||||
set newModel(v: relayCabinetGraphicData.Relay.ModelType) {
|
||||
this.data.newModel = v;
|
||||
}
|
||||
get showCode(): string {
|
||||
return this.data.showCode;
|
||||
}
|
||||
set showCode(v: string) {
|
||||
this.data.showCode = v;
|
||||
}
|
||||
clone(): RelayData {
|
||||
return new RelayData(this.data.cloneMessage());
|
||||
}
|
||||
|
@ -12,6 +12,8 @@ export interface IRelayData extends GraphicData {
|
||||
set code(v: string);
|
||||
get newModel(): relayCabinetGraphicData.Relay.ModelType; // 型号
|
||||
set newModel(v: relayCabinetGraphicData.Relay.ModelType);
|
||||
get showCode(): string; // 展示的编号
|
||||
set showCode(v: string);
|
||||
clone(): IRelayData;
|
||||
copyFrom(data: IRelayData): void;
|
||||
eq(other: IRelayData): boolean;
|
||||
@ -57,7 +59,11 @@ export class Relay extends JlGraphic {
|
||||
}
|
||||
|
||||
doRepaint(): void {
|
||||
this.labelGraphic.text = this.datas.code;
|
||||
if (this.datas.showCode) {
|
||||
this.labelGraphic.text = this.datas.showCode;
|
||||
} else {
|
||||
this.labelGraphic.text = this.datas.code;
|
||||
}
|
||||
this.labelGraphic.position.set(0, 20);
|
||||
this.refDevice.position.set(0, -20);
|
||||
const relayGraphic = this.relayGraphic;
|
||||
|
@ -814,6 +814,42 @@ const sectionCjList = [
|
||||
},
|
||||
];
|
||||
|
||||
//IBP盘扣车继电器
|
||||
const platformCjList = [
|
||||
{
|
||||
code: 'IKC',
|
||||
refDeviceCodesAndPos: [
|
||||
[
|
||||
{
|
||||
code: 'IKCJ',
|
||||
position: PostionType.Q,
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
//GDJ(计轴电源故障继电器)ZFWJ
|
||||
const LSCjList = [
|
||||
{
|
||||
code: 'LS',
|
||||
refDeviceCodesAndPos: [
|
||||
[
|
||||
{
|
||||
code: 'GDJ',
|
||||
position: PostionType.Q,
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
code: 'ZFWJ',
|
||||
position: PostionType.Q,
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const DeviceType = graphicData.RelatedRef.DeviceType;
|
||||
export const ciCjMap = new Map<string, CjData[]>([
|
||||
[
|
||||
@ -860,4 +896,6 @@ export const ciCjMap = new Map<string, CjData[]>([
|
||||
[`${DeviceType.CarWashing}+undefined`, carWashingCjList],
|
||||
[`${DeviceType.FloodGate}+undefined`, floodGateCjList],
|
||||
[`${DeviceType.Section}+undefined`, sectionCjList],
|
||||
[`${DeviceType.Platform}+undefined`, platformCjList],
|
||||
[`${DeviceType.LS}+undefined`, LSCjList],
|
||||
]);
|
||||
|
@ -24,6 +24,7 @@ export interface GenerateRelaysCongig {
|
||||
combinationCode: string;
|
||||
type?: GenerateDeviceType;
|
||||
deviceCode?: string;
|
||||
showCode?: string;
|
||||
}
|
||||
|
||||
export function generateRelayCabinet(
|
||||
@ -79,6 +80,9 @@ export function generateRelays(
|
||||
generateDevice.id = relaysInfo.id;
|
||||
generateDevice.datas.code = relaysInfo.code;
|
||||
generateDevice.datas.newModel = relaysInfo.model;
|
||||
if (relaysInfo.showCode) {
|
||||
generateDevice.datas.showCode = relaysInfo.showCode;
|
||||
}
|
||||
relaysInfos.shift();
|
||||
}
|
||||
} else {
|
||||
@ -122,6 +126,9 @@ function generateRelaysFormat(
|
||||
generateDevice.id = relaysInfo.id;
|
||||
generateDevice.datas.code = relaysInfo.code;
|
||||
generateDevice.datas.newModel = relaysInfo.model;
|
||||
if (relaysInfo.showCode) {
|
||||
generateDevice.datas.showCode = relaysInfo.showCode;
|
||||
}
|
||||
}
|
||||
generateDevice.position.set(
|
||||
relayCabinet.x -
|
||||
|
@ -4,50 +4,23 @@ import { ref, watch } from 'vue';
|
||||
|
||||
export const RelayModelType = relayCabinetGraphicData.Relay.ModelType;
|
||||
export type GenerateDeviceType = 'Relay' | 'PhaseFailureProtector';
|
||||
export enum ShowCodeType {
|
||||
NO,
|
||||
zhonghe,
|
||||
}
|
||||
export interface Combinationtype {
|
||||
code: string;
|
||||
refDeviceCodesAndModel: {
|
||||
code: string;
|
||||
model: relayCabinetGraphicData.Relay.ModelType;
|
||||
type?: GenerateDeviceType;
|
||||
showCode?: {
|
||||
zhonghe?: string;
|
||||
};
|
||||
}[];
|
||||
}
|
||||
|
||||
//道岔组合类型
|
||||
const turoutRefDeviceCodesAndModel = [
|
||||
{
|
||||
code: '1DQJ',
|
||||
model: RelayModelType.JWJXC_H125_80,
|
||||
},
|
||||
{
|
||||
code: '1DQJF',
|
||||
model: RelayModelType.JWJXC_480,
|
||||
},
|
||||
{
|
||||
code: '2DQJ',
|
||||
model: RelayModelType.JYJXC_160_260,
|
||||
},
|
||||
{
|
||||
code: 'BHJ',
|
||||
model: RelayModelType.JWXC_1700,
|
||||
},
|
||||
{
|
||||
code: 'DBJ',
|
||||
model: RelayModelType.JPXC_1000,
|
||||
},
|
||||
{
|
||||
code: 'FBJ',
|
||||
model: RelayModelType.JPXC_1000,
|
||||
},
|
||||
{
|
||||
code: 'QDJ',
|
||||
model: RelayModelType.JWXC_1700,
|
||||
},
|
||||
{
|
||||
code: 'ZBHJ',
|
||||
model: RelayModelType.JWXC_1700,
|
||||
},
|
||||
];
|
||||
const singleTuroutCombinations = [
|
||||
{
|
||||
code: 'moban',
|
||||
@ -89,7 +62,44 @@ const doubleTuroutCombinations = [
|
||||
{
|
||||
code: 'TDFJ1',
|
||||
refDeviceCodesAndModel: [
|
||||
...turoutRefDeviceCodesAndModel,
|
||||
{
|
||||
code: '1DQJ',
|
||||
model: RelayModelType.JWJXC_H125_80,
|
||||
},
|
||||
{
|
||||
code: '1DQJF',
|
||||
model: RelayModelType.JWJXC_480,
|
||||
},
|
||||
{
|
||||
code: '2DQJ',
|
||||
model: RelayModelType.JYJXC_160_260,
|
||||
},
|
||||
{
|
||||
code: 'BHJ',
|
||||
model: RelayModelType.JWXC_1700,
|
||||
},
|
||||
{
|
||||
code: 'DBJ',
|
||||
model: RelayModelType.JPXC_1000,
|
||||
showCode: {
|
||||
zhonghe: 'DBJ1',
|
||||
},
|
||||
},
|
||||
{
|
||||
code: 'FBJ',
|
||||
model: RelayModelType.JPXC_1000,
|
||||
showCode: {
|
||||
zhonghe: 'FBJ1',
|
||||
},
|
||||
},
|
||||
{
|
||||
code: 'QDJ',
|
||||
model: RelayModelType.JWXC_1700,
|
||||
},
|
||||
{
|
||||
code: 'ZBHJ',
|
||||
model: RelayModelType.JWXC_1700,
|
||||
},
|
||||
{
|
||||
code: 'DBQ',
|
||||
model: RelayModelType.Unknown,
|
||||
@ -100,7 +110,36 @@ const doubleTuroutCombinations = [
|
||||
{
|
||||
code: 'TDFJ2',
|
||||
refDeviceCodesAndModel: [
|
||||
...turoutRefDeviceCodesAndModel.slice(0, 6),
|
||||
{
|
||||
code: '1DQJ',
|
||||
model: RelayModelType.JWJXC_H125_80,
|
||||
},
|
||||
{
|
||||
code: '1DQJF',
|
||||
model: RelayModelType.JWJXC_480,
|
||||
},
|
||||
{
|
||||
code: '2DQJ',
|
||||
model: RelayModelType.JYJXC_160_260,
|
||||
},
|
||||
{
|
||||
code: 'BHJ',
|
||||
model: RelayModelType.JWXC_1700,
|
||||
},
|
||||
{
|
||||
code: 'DBJ',
|
||||
model: RelayModelType.JPXC_1000,
|
||||
showCode: {
|
||||
zhonghe: 'DBJ2',
|
||||
},
|
||||
},
|
||||
{
|
||||
code: 'FBJ',
|
||||
model: RelayModelType.JPXC_1000,
|
||||
showCode: {
|
||||
zhonghe: 'FBJ2',
|
||||
},
|
||||
},
|
||||
{
|
||||
code: 'DBQ',
|
||||
model: RelayModelType.Unknown,
|
||||
@ -127,6 +166,9 @@ const signalRefDeviceCodesAndModel = [
|
||||
{
|
||||
code: 'LXJ',
|
||||
model: RelayModelType.JWXC_1700,
|
||||
showCode: {
|
||||
zhonghe: 'LJ',
|
||||
},
|
||||
},
|
||||
{
|
||||
code: 'YXJ',
|
||||
@ -135,6 +177,9 @@ const signalRefDeviceCodesAndModel = [
|
||||
{
|
||||
code: 'ZXJ',
|
||||
model: RelayModelType.JWXC_1700,
|
||||
showCode: {
|
||||
zhonghe: 'UJ',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@ -288,10 +333,16 @@ const PSDRefDeviceCodesAndModel = [
|
||||
{
|
||||
code: 'XMGJ',
|
||||
model: RelayModelType.JWXC_1700,
|
||||
showCode: {
|
||||
zhonghe: 'GSJ',
|
||||
},
|
||||
},
|
||||
{
|
||||
code: 'XMPLJ',
|
||||
model: RelayModelType.JWXC_1700,
|
||||
showCode: {
|
||||
zhonghe: 'PLJ',
|
||||
},
|
||||
},
|
||||
];
|
||||
const downScreenDoorCombinations = [
|
||||
@ -303,6 +354,9 @@ const downScreenDoorCombinations = [
|
||||
code: string;
|
||||
model: relayCabinetGraphicData.Relay.ModelType;
|
||||
type?: GenerateDeviceType;
|
||||
showCode?: {
|
||||
zhonghe?: string;
|
||||
};
|
||||
}[],
|
||||
},
|
||||
{
|
||||
@ -376,6 +430,7 @@ watch(changeScreenDoorGroup, (group) => {
|
||||
return {
|
||||
code: item.code.replace('X', 'S'),
|
||||
model: item.model,
|
||||
showCode: item.showCode,
|
||||
};
|
||||
});
|
||||
});
|
||||
@ -427,6 +482,23 @@ const powerScreenCombinations = [
|
||||
},
|
||||
];
|
||||
|
||||
//LS
|
||||
const LSCombinations = [
|
||||
{
|
||||
code: 'LS',
|
||||
refDeviceCodesAndModel: [
|
||||
{
|
||||
code: 'GDJ',
|
||||
model: RelayModelType.JWXC_1700,
|
||||
},
|
||||
{
|
||||
code: 'ZFWJ',
|
||||
model: RelayModelType.JWXC_1700,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
//车库门
|
||||
const garageDoorCombinations = [
|
||||
{
|
||||
@ -526,6 +598,19 @@ const sectionCombinations = [
|
||||
},
|
||||
];
|
||||
|
||||
//IBP盘扣车继电器
|
||||
const platformCombinations = [
|
||||
{
|
||||
code: 'IKC',
|
||||
refDeviceCodesAndModel: [
|
||||
{
|
||||
code: 'IKCJ',
|
||||
model: RelayModelType.JWXC_1700,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const DeviceType = graphicData.RelatedRef.DeviceType;
|
||||
export const combinationsMap = new Map<string, Combinationtype[]>([
|
||||
[
|
||||
@ -572,4 +657,6 @@ export const combinationsMap = new Map<string, Combinationtype[]>([
|
||||
[`${DeviceType.CarWashing}`, carWashingCombinations],
|
||||
[`${DeviceType.FloodGate}`, floodGateCombinations],
|
||||
[`${DeviceType.Section}`, sectionCombinations],
|
||||
[`${DeviceType.Platform}`, platformCombinations],
|
||||
[`${DeviceType.LS}`, LSCombinations],
|
||||
]);
|
||||
|
@ -197,6 +197,14 @@
|
||||
label="集中站"
|
||||
:rules="[(val) => val != '' || '集中站不能为空']"
|
||||
></q-select>
|
||||
<q-select
|
||||
outlined
|
||||
v-model="generaterRelayLayout.showCodeType"
|
||||
:options="showCodeTypeOption"
|
||||
emitValue
|
||||
mapOptions
|
||||
label="展示编号的类型"
|
||||
/>
|
||||
<q-toggle
|
||||
v-model="generaterRelayLayout.generateCJQD"
|
||||
label="是否覆盖采集驱动数据"
|
||||
@ -205,6 +213,10 @@
|
||||
v-model="generaterRelayLayout.generateSectionRelay"
|
||||
label="是否生成区段继电器"
|
||||
/>
|
||||
<q-toggle
|
||||
v-model="generaterRelayLayout.generateIKCJRelay"
|
||||
label="是否生成IBP盘扣车继电器"
|
||||
/>
|
||||
<div class="q-gutter-sm q-pa-md row justify-center">
|
||||
<q-btn
|
||||
label="确定"
|
||||
@ -264,6 +276,7 @@ import {
|
||||
combinationsMap,
|
||||
RelayModelType,
|
||||
changeScreenDoorGroup,
|
||||
ShowCodeType,
|
||||
} from './GeneraterRelayLayoutConfig';
|
||||
import { generateRelayLayout, GenerateRelaysCongig } from './GeneraterDevice';
|
||||
import { getPublishMapInfoById, pageQuery } from 'src/api/PublishApi';
|
||||
@ -478,11 +491,15 @@ const generaterRelayLayout = ref<{
|
||||
centralizedStation: number;
|
||||
generateCJQD: boolean;
|
||||
generateSectionRelay: boolean;
|
||||
generateIKCJRelay: boolean;
|
||||
showCodeType: ShowCodeType;
|
||||
}>({
|
||||
publishId: '',
|
||||
centralizedStation: 0,
|
||||
generateCJQD: true,
|
||||
generateSectionRelay: false,
|
||||
generateIKCJRelay: false,
|
||||
showCodeType: ShowCodeType.NO,
|
||||
});
|
||||
|
||||
let publishIdOption = ref<{ label: string; value: number }[]>();
|
||||
@ -490,6 +507,17 @@ let centralizedStationsOption = ref<{ label: string; value: number }[]>([
|
||||
{ label: '', value: 0 },
|
||||
]);
|
||||
|
||||
let showCodeTypeOption = [
|
||||
{
|
||||
label: '无',
|
||||
value: ShowCodeType.NO,
|
||||
},
|
||||
{
|
||||
label: '众合',
|
||||
value: ShowCodeType.zhonghe,
|
||||
},
|
||||
];
|
||||
|
||||
async function openGeneraterRelayLayoutDialog() {
|
||||
generaterRelayLayoutDialog.value = true;
|
||||
const response = await pageQuery({
|
||||
@ -624,6 +652,20 @@ function oneClickGeneraterRelayLayout() {
|
||||
stationManagePlatformsRefEsb = Array.from(
|
||||
new Set(stationManagePlatformsRefEsb)
|
||||
);
|
||||
//站台--关联的扣车继电器
|
||||
const deviceCombinationsOfPlatform = combinationsMap.get(
|
||||
`${DeviceType.Platform}`
|
||||
);
|
||||
if (
|
||||
generaterRelayLayout.value.generateIKCJRelay &&
|
||||
deviceCombinationsOfPlatform
|
||||
) {
|
||||
creatDeviceRelateRelays(
|
||||
deviceCombinationsOfPlatform,
|
||||
DeviceType.Platform,
|
||||
platform.code
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
const stationManageScreenDoor: number[] = [];
|
||||
@ -632,48 +674,24 @@ function oneClickGeneraterRelayLayout() {
|
||||
stationManageScreenDoor.push(screenDoor.common.id);
|
||||
}
|
||||
});
|
||||
for (let i = 0; i < storage.esbButtons.length; i++) {
|
||||
if (
|
||||
stationManagePlatformsId.includes(storage.esbButtons[i].refStand)
|
||||
) {
|
||||
hasEMP_MKX_SPKS.hasEMP = true;
|
||||
handleEMPCombination();
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < storage.gateBoxs.length; i++) {
|
||||
if (
|
||||
stationManageScreenDoor.includes(
|
||||
storage.gateBoxs[i].refScreenDoor
|
||||
)
|
||||
) {
|
||||
hasEMP_MKX_SPKS.hasMKX = true;
|
||||
handleDeviceCombinations.push(deviceCombinations[0]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < storage.spksSwitchs.length; i++) {
|
||||
if (
|
||||
stationManagePlatformsId.includes(storage.spksSwitchs[i].refStand)
|
||||
) {
|
||||
hasEMP_MKX_SPKS.hasSPKS = true;
|
||||
handleDeviceCombinations.push(deviceCombinations[1]);
|
||||
break;
|
||||
}
|
||||
//站台关联的紧急停车继电器的编号
|
||||
if (stationManagePlatformsRefEsb.length) {
|
||||
hasEMP_MKX_SPKS.hasEMP = true;
|
||||
handleEMPCombination();
|
||||
}
|
||||
//有画pslBox
|
||||
for (let i = 0; i < storage.pslBoxs.length; i++) {
|
||||
if (
|
||||
stationManagePlatformsId.includes(
|
||||
storage.pslBoxs[i].refPlatformId
|
||||
)
|
||||
) {
|
||||
hasEMP_MKX_SPKS.hasEMP = true;
|
||||
handleEMPCombination();
|
||||
hasEMP_MKX_SPKS.hasMKX = true;
|
||||
handleDeviceCombinations.push(deviceCombinations[0]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//有画ibpBox且对应的ibp图中有相关spks按钮
|
||||
for (let i = 0; i < storage.ibpBoxs.length; i++) {
|
||||
if (station.common.id == storage.ibpBoxs[i].refStationId) {
|
||||
hasEMP_MKX_SPKS.hasSPKS = true;
|
||||
@ -836,7 +854,7 @@ function oneClickGeneraterRelayLayout() {
|
||||
}
|
||||
});
|
||||
}
|
||||
//信号机故障报警仪-电源屏-断路器
|
||||
//信号机故障报警仪-电源屏-断路器-LS设备
|
||||
const aboveCombinations = [
|
||||
{
|
||||
combinations: combinationsMap.get(`${DeviceType.SignalFaultAlarm}`),
|
||||
@ -850,6 +868,10 @@ function oneClickGeneraterRelayLayout() {
|
||||
combinations: combinationsMap.get(`${DeviceType.PowerScreen}`),
|
||||
deviceType: DeviceType.PowerScreen,
|
||||
},
|
||||
{
|
||||
combinations: combinationsMap.get(`${DeviceType.LS}`),
|
||||
deviceType: DeviceType.LS,
|
||||
},
|
||||
];
|
||||
aboveCombinations.forEach((aboveCombination) => {
|
||||
if (aboveCombination.combinations) {
|
||||
@ -1054,6 +1076,12 @@ function oneClickGeneraterRelayLayout() {
|
||||
combinationtype.refDeviceCodesAndModel.forEach((relay) => {
|
||||
const id = GraphicIdGenerator.next();
|
||||
refRelayIds.push(id);
|
||||
let showCode = undefined;
|
||||
if (
|
||||
generaterRelayLayout.value.showCodeType == ShowCodeType.zhonghe
|
||||
) {
|
||||
showCode = relay.showCode?.zhonghe;
|
||||
}
|
||||
generateRelays.push({
|
||||
id,
|
||||
code: relay.code,
|
||||
@ -1061,6 +1089,7 @@ function oneClickGeneraterRelayLayout() {
|
||||
type: relay.type,
|
||||
deviceCode,
|
||||
combinationCode: combinationtype.code,
|
||||
showCode,
|
||||
});
|
||||
if (deviceCode) {
|
||||
generateRelaysMap.set(
|
||||
|
@ -368,6 +368,7 @@ export namespace relayCabinetGraphicData {
|
||||
common?: dependency_1.graphicData.CommonInfo;
|
||||
code?: string;
|
||||
newModel?: Relay.ModelType;
|
||||
showCode?: string;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
@ -381,6 +382,9 @@ export namespace relayCabinetGraphicData {
|
||||
if ("newModel" in data && data.newModel != undefined) {
|
||||
this.newModel = data.newModel;
|
||||
}
|
||||
if ("showCode" in data && data.showCode != undefined) {
|
||||
this.showCode = data.showCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
@ -404,10 +408,17 @@ export namespace relayCabinetGraphicData {
|
||||
set newModel(value: Relay.ModelType) {
|
||||
pb_1.Message.setField(this, 4, value);
|
||||
}
|
||||
get showCode() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
|
||||
}
|
||||
set showCode(value: string) {
|
||||
pb_1.Message.setField(this, 5, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof dependency_1.graphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
newModel?: Relay.ModelType;
|
||||
showCode?: string;
|
||||
}): Relay {
|
||||
const message = new Relay({});
|
||||
if (data.common != null) {
|
||||
@ -419,6 +430,9 @@ export namespace relayCabinetGraphicData {
|
||||
if (data.newModel != null) {
|
||||
message.newModel = data.newModel;
|
||||
}
|
||||
if (data.showCode != null) {
|
||||
message.showCode = data.showCode;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -426,6 +440,7 @@ export namespace relayCabinetGraphicData {
|
||||
common?: ReturnType<typeof dependency_1.graphicData.CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
newModel?: Relay.ModelType;
|
||||
showCode?: string;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
@ -436,6 +451,9 @@ export namespace relayCabinetGraphicData {
|
||||
if (this.newModel != null) {
|
||||
data.newModel = this.newModel;
|
||||
}
|
||||
if (this.showCode != null) {
|
||||
data.showCode = this.showCode;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -448,6 +466,8 @@ export namespace relayCabinetGraphicData {
|
||||
writer.writeString(2, this.code);
|
||||
if (this.newModel != Relay.ModelType.Unknown)
|
||||
writer.writeEnum(4, this.newModel);
|
||||
if (this.showCode.length)
|
||||
writer.writeString(5, this.showCode);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -466,6 +486,9 @@ export namespace relayCabinetGraphicData {
|
||||
case 4:
|
||||
message.newModel = reader.readEnum();
|
||||
break;
|
||||
case 5:
|
||||
message.showCode = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
|
@ -4709,7 +4709,9 @@ export namespace graphicData {
|
||||
PowerScreen = 10,
|
||||
GarageDoor = 11,
|
||||
CarWashing = 12,
|
||||
FloodGate = 13
|
||||
FloodGate = 13,
|
||||
Platform = 14,
|
||||
LS = 15
|
||||
}
|
||||
export enum DevicePort {
|
||||
A = 0,
|
||||
|
Loading…
Reference in New Issue
Block a user