diff --git a/src/api/RunconfigApi.ts b/src/api/RunconfigApi.ts index 9ae939e..16a899d 100644 --- a/src/api/RunconfigApi.ts +++ b/src/api/RunconfigApi.ts @@ -78,3 +78,30 @@ export async function getRunconfigList(): Promise> { const response = await api.get(`${UriBase}/list`); return response.data; } + +export enum typeStr { + map = 'map', + array = 'array', + string = 'string', + int = 'int', + bool = 'bool', +} + +export interface Description { + fieldName: string; + description: string; + type: typeStr; + itemTypeFields: Description[] | null; + // eslint-disable-next-line + val?: any; +} + +/** + * 获取项目运行环境信息结构说明 + * @param + * @returns + */ +export async function getRunconfigDescription(): Promise { + const response = await api.get(`${UriBase}/description`); + return response.data; +} diff --git a/src/components/ConfigData.vue b/src/components/ConfigData.vue new file mode 100644 index 0000000..2d2ba51 --- /dev/null +++ b/src/components/ConfigData.vue @@ -0,0 +1,103 @@ + + + diff --git a/src/components/draw-app/dialogs/CiCjList.vue b/src/components/draw-app/dialogs/CiCjList.vue index b82302c..4ee6634 100644 --- a/src/components/draw-app/dialogs/CiCjList.vue +++ b/src/components/draw-app/dialogs/CiCjList.vue @@ -85,7 +85,6 @@ import { loadCiCjList, creatCiCjList, refRelaysListMap, - combinationListMap, } from 'src/drawApp/relayCabinetLayoutApp'; import { relayCabinetGraphicData } from 'src/protos/relayCabinetLayoutGraphics'; import { Relay } from 'src/graphics/relay/Relay'; @@ -158,7 +157,6 @@ function updateMap() { cjDataSet.bitList.forEach((cjData, j) => { const ref = cjData.refRelays.map((refRelay) => { const refDeviceData = refRelaysListMap.get(refRelay.relayId); - const conbinationData = combinationListMap.get(refRelay.relayId); const relay = relayCabinetStore .getDrawApp() .queryStore.queryById(refRelay.relayId); @@ -166,10 +164,10 @@ function updateMap() { refRelay.position == relayCabinetGraphicData.CjDataItem.PostionType.Q ? 'Q' : 'H'; - if (refDeviceData) { - return `${refDeviceData.device}_${refDeviceData.combinationtype}_${relay.datas.code}_${pos}`; + if (refDeviceData?.device) { + return `${refDeviceData.device}_${refDeviceData?.combinationtype}_${relay.datas.code}_${pos}`; } else { - return `${conbinationData}_${relay.datas.code}_${pos}`; + return `${refDeviceData?.combinationtype}_${relay.datas.code}_${pos}`; } }); map.set(`${j + 1}-${i + 1}`, ref.join('/')); diff --git a/src/components/draw-app/dialogs/CiQdList.vue b/src/components/draw-app/dialogs/CiQdList.vue index d5cfadc..e008ac1 100644 --- a/src/components/draw-app/dialogs/CiQdList.vue +++ b/src/components/draw-app/dialogs/CiQdList.vue @@ -85,7 +85,6 @@ import { loadCiQdList, creatCiQdList, refRelaysListMap, - combinationListMap, } from 'src/drawApp/relayCabinetLayoutApp'; import { relayCabinetGraphicData } from 'src/protos/relayCabinetLayoutGraphics'; import { Relay } from 'src/graphics/relay/Relay'; @@ -158,14 +157,13 @@ function updateMap() { cjDataSet.bitList.forEach((cjData, j) => { const ref = cjData.refRelays.map((refRelay) => { const refDeviceData = refRelaysListMap.get(refRelay); - const conbinationData = combinationListMap.get(refRelay); const relay = relayCabinetStore .getDrawApp() .queryStore.queryById(refRelay); - if (refDeviceData) { + if (refDeviceData?.device) { return `${refDeviceData.device}_${refDeviceData.combinationtype}_${relay.datas.code}`; } else { - return `${conbinationData}_${relay.datas.code}`; + return `${refDeviceData?.combinationtype}_${relay.datas.code}`; } }); map.set(`${j + 1}-${i + 1}`, ref.join('/')); diff --git a/src/components/draw-app/dialogs/CombinationtypeList.vue b/src/components/draw-app/dialogs/CombinationtypeList.vue deleted file mode 100644 index c3b6c91..0000000 --- a/src/components/draw-app/dialogs/CombinationtypeList.vue +++ /dev/null @@ -1,147 +0,0 @@ - - - - - diff --git a/src/components/draw-app/dialogs/DeviceRelateRelayList.vue b/src/components/draw-app/dialogs/DeviceRelateRelayList.vue index c6d787b..1db842d 100644 --- a/src/components/draw-app/dialogs/DeviceRelateRelayList.vue +++ b/src/components/draw-app/dialogs/DeviceRelateRelayList.vue @@ -64,6 +64,8 @@ const deviceTypeMap = { 6: '车站', 7: '屏蔽门', 8: '信号机故障报警仪', + 9: '断路器', + 10: '电源屏', }; const columns: QTable['columns'] = [ { @@ -119,7 +121,6 @@ const props = defineProps<{ }>(); function onEdit(row: RelateRelaylistItem) { - relayCabinetStore.showCombinationTypeConfig = false; relayCabinetStore.showRelateRelayConfig = true; setTimeout(() => { props.onEditClick(row); @@ -127,7 +128,6 @@ function onEdit(row: RelateRelaylistItem) { } function creatData() { - relayCabinetStore.showCombinationTypeConfig = false; relayCabinetStore.showRelateRelayConfig = true; } diff --git a/src/components/draw-app/properties/CombinationTypeConfig.vue b/src/components/draw-app/properties/CombinationTypeConfig.vue deleted file mode 100644 index 0a7f831..0000000 --- a/src/components/draw-app/properties/CombinationTypeConfig.vue +++ /dev/null @@ -1,220 +0,0 @@ - - - diff --git a/src/components/draw-app/properties/RelateRelayConfig.vue b/src/components/draw-app/properties/RelateRelayConfig.vue index 780656a..ebc5d62 100644 --- a/src/components/draw-app/properties/RelateRelayConfig.vue +++ b/src/components/draw-app/properties/RelateRelayConfig.vue @@ -16,6 +16,7 @@ :rules="[(val) => val != undefined || '设备类型不能为空']" /> + + +
屏蔽门相关配置
+
+ + + + + + + + + + + + +
+ + +
+
+ + + diff --git a/src/components/draw-app/properties/ScreenDoorProperty.vue b/src/components/draw-app/properties/ScreenDoorProperty.vue index a08ac14..af398de 100644 --- a/src/components/draw-app/properties/ScreenDoorProperty.vue +++ b/src/components/draw-app/properties/ScreenDoorProperty.vue @@ -10,63 +10,6 @@ lazy-rules autogrow /> - - - - - - - - -
- - -
-
-
-
-
- @@ -89,7 +32,6 @@ import { useDrawStore } from 'src/stores/draw-store'; import { computed } from 'vue'; import { ScreenDoor } from 'src/graphics/screenDoor/ScreenDoor'; import { Platform } from 'src/graphics/platform/Platform'; -import { graphicData } from 'src/protos/stationLayoutGraphics'; const drawStore = useDrawStore(); const { data: screenDoorModel, onUpdate } = useFormData( @@ -110,19 +52,4 @@ const platformRelation = computed(() => { } return refStation; }); - -function addScreenDoorGroup() { - screenDoorModel.screenDoorGroupList = [ - ...screenDoorModel.screenDoorGroupList, - new graphicData.ScreenDoorGroup(), - ]; -} - -function deleteScreenDoorGroup(index: number) { - const screenDoor = drawStore.selectedGraphic as ScreenDoor; - const data = screenDoor.datas.clone().screenDoorGroupList; - data.splice(index, 1); - screenDoor.datas.screenDoorGroupList = data; - screenDoorModel.screenDoorGroupList = data; -} diff --git a/src/components/draw-app/properties/SectionCodePointConfig.vue b/src/components/draw-app/properties/SectionCodePointConfig.vue index 2516c20..ecff651 100644 --- a/src/components/draw-app/properties/SectionCodePointConfig.vue +++ b/src/components/draw-app/properties/SectionCodePointConfig.vue @@ -47,11 +47,14 @@ active-class="bg-teal-1 text-grey-8" @click.stop="clickSectionId(item)" > + + {{ index }} + {{ getSectionById(item).code }} -
+
- 门控箱继电器状态 + 门控箱继电器状态 ({{ platformState.mkxJState.code }}) - - {{ item.code }} + diff --git a/src/components/line-app/states/RelayState.vue b/src/components/line-app/states/RelayState.vue index 34ea1d4..aa560ab 100644 --- a/src/components/line-app/states/RelayState.vue +++ b/src/components/line-app/states/RelayState.vue @@ -26,11 +26,11 @@ diff --git a/src/protos/device_state.ts b/src/protos/device_state.ts index cb9cae5..ed4846c 100644 --- a/src/protos/device_state.ts +++ b/src/protos/device_state.ts @@ -774,10 +774,10 @@ export namespace state { id?: string; empj?: boolean; spksState?: ReplyState[]; - mkxJState?: MkxJState[]; + mkxJState?: MkxJState; }) { super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 4], this.#one_of_decls); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("id" in data && data.id != undefined) { this.id = data.id; @@ -812,16 +812,19 @@ export namespace state { pb_1.Message.setRepeatedWrapperField(this, 3, value); } get mkxJState() { - return pb_1.Message.getRepeatedWrapperField(this, MkxJState, 4) as MkxJState[]; + return pb_1.Message.getWrapperField(this, MkxJState, 4) as MkxJState; } - set mkxJState(value: MkxJState[]) { - pb_1.Message.setRepeatedWrapperField(this, 4, value); + set mkxJState(value: MkxJState) { + pb_1.Message.setWrapperField(this, 4, value); + } + get has_mkxJState() { + return pb_1.Message.getField(this, 4) != null; } static fromObject(data: { id?: string; empj?: boolean; spksState?: ReturnType[]; - mkxJState?: ReturnType[]; + mkxJState?: ReturnType; }): PlatformState { const message = new PlatformState({}); if (data.id != null) { @@ -834,7 +837,7 @@ export namespace state { message.spksState = data.spksState.map(item => ReplyState.fromObject(item)); } if (data.mkxJState != null) { - message.mkxJState = data.mkxJState.map(item => MkxJState.fromObject(item)); + message.mkxJState = MkxJState.fromObject(data.mkxJState); } return message; } @@ -843,7 +846,7 @@ export namespace state { id?: string; empj?: boolean; spksState?: ReturnType[]; - mkxJState?: ReturnType[]; + mkxJState?: ReturnType; } = {}; if (this.id != null) { data.id = this.id; @@ -855,7 +858,7 @@ export namespace state { data.spksState = this.spksState.map((item: ReplyState) => item.toObject()); } if (this.mkxJState != null) { - data.mkxJState = this.mkxJState.map((item: MkxJState) => item.toObject()); + data.mkxJState = this.mkxJState.toObject(); } return data; } @@ -869,8 +872,8 @@ export namespace state { writer.writeBool(2, this.empj); if (this.spksState.length) writer.writeRepeatedMessage(3, this.spksState, (item: ReplyState) => item.serialize(writer)); - if (this.mkxJState.length) - writer.writeRepeatedMessage(4, this.mkxJState, (item: MkxJState) => item.serialize(writer)); + if (this.has_mkxJState) + writer.writeMessage(4, this.mkxJState, () => this.mkxJState.serialize(writer)); if (!w) return writer.getResultBuffer(); } @@ -890,7 +893,7 @@ export namespace state { reader.readMessage(message.spksState, () => pb_1.Message.addToRepeatedWrapperField(message, 3, ReplyState.deserialize(reader), ReplyState)); break; case 4: - reader.readMessage(message.mkxJState, () => pb_1.Message.addToRepeatedWrapperField(message, 4, MkxJState.deserialize(reader), MkxJState)); + reader.readMessage(message.mkxJState, () => message.mkxJState = MkxJState.deserialize(reader)); break; default: reader.skipField(); } diff --git a/src/protos/relayCabinetLayoutGraphics.ts b/src/protos/relayCabinetLayoutGraphics.ts index b2a880a..aa94d46 100644 --- a/src/protos/relayCabinetLayoutGraphics.ts +++ b/src/protos/relayCabinetLayoutGraphics.ts @@ -15,13 +15,12 @@ export namespace relayCabinetGraphicData { deviceRelateRelayList?: DeviceRelateRelay[]; UniqueIdPrefix?: UniqueIdType; phaseFailureProtectors?: PhaseFailureProtector[]; - combinationtypeList?: Combinationtype[]; signalFaultAlarms?: SignalFaultAlarm[]; ciCjList?: CiCj; ciQdList?: CiQd; }) { super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4, 7, 8, 9], this.#one_of_decls); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3, 4, 7, 9], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("canvas" in data && data.canvas != undefined) { this.canvas = data.canvas; @@ -41,9 +40,6 @@ export namespace relayCabinetGraphicData { if ("phaseFailureProtectors" in data && data.phaseFailureProtectors != undefined) { this.phaseFailureProtectors = data.phaseFailureProtectors; } - if ("combinationtypeList" in data && data.combinationtypeList != undefined) { - this.combinationtypeList = data.combinationtypeList; - } if ("signalFaultAlarms" in data && data.signalFaultAlarms != undefined) { this.signalFaultAlarms = data.signalFaultAlarms; } @@ -97,12 +93,6 @@ export namespace relayCabinetGraphicData { set phaseFailureProtectors(value: PhaseFailureProtector[]) { pb_1.Message.setRepeatedWrapperField(this, 7, value); } - get combinationtypeList() { - return pb_1.Message.getRepeatedWrapperField(this, Combinationtype, 8) as Combinationtype[]; - } - set combinationtypeList(value: Combinationtype[]) { - pb_1.Message.setRepeatedWrapperField(this, 8, value); - } get signalFaultAlarms() { return pb_1.Message.getRepeatedWrapperField(this, SignalFaultAlarm, 9) as SignalFaultAlarm[]; } @@ -134,7 +124,6 @@ export namespace relayCabinetGraphicData { deviceRelateRelayList?: ReturnType[]; UniqueIdPrefix?: ReturnType; phaseFailureProtectors?: ReturnType[]; - combinationtypeList?: ReturnType[]; signalFaultAlarms?: ReturnType[]; ciCjList?: ReturnType; ciQdList?: ReturnType; @@ -158,9 +147,6 @@ export namespace relayCabinetGraphicData { if (data.phaseFailureProtectors != null) { message.phaseFailureProtectors = data.phaseFailureProtectors.map(item => PhaseFailureProtector.fromObject(item)); } - if (data.combinationtypeList != null) { - message.combinationtypeList = data.combinationtypeList.map(item => Combinationtype.fromObject(item)); - } if (data.signalFaultAlarms != null) { message.signalFaultAlarms = data.signalFaultAlarms.map(item => SignalFaultAlarm.fromObject(item)); } @@ -180,7 +166,6 @@ export namespace relayCabinetGraphicData { deviceRelateRelayList?: ReturnType[]; UniqueIdPrefix?: ReturnType; phaseFailureProtectors?: ReturnType[]; - combinationtypeList?: ReturnType[]; signalFaultAlarms?: ReturnType[]; ciCjList?: ReturnType; ciQdList?: ReturnType; @@ -203,9 +188,6 @@ export namespace relayCabinetGraphicData { if (this.phaseFailureProtectors != null) { data.phaseFailureProtectors = this.phaseFailureProtectors.map((item: PhaseFailureProtector) => item.toObject()); } - if (this.combinationtypeList != null) { - data.combinationtypeList = this.combinationtypeList.map((item: Combinationtype) => item.toObject()); - } if (this.signalFaultAlarms != null) { data.signalFaultAlarms = this.signalFaultAlarms.map((item: SignalFaultAlarm) => item.toObject()); } @@ -233,8 +215,6 @@ export namespace relayCabinetGraphicData { writer.writeMessage(6, this.UniqueIdPrefix, () => this.UniqueIdPrefix.serialize(writer)); if (this.phaseFailureProtectors.length) writer.writeRepeatedMessage(7, this.phaseFailureProtectors, (item: PhaseFailureProtector) => item.serialize(writer)); - if (this.combinationtypeList.length) - writer.writeRepeatedMessage(8, this.combinationtypeList, (item: Combinationtype) => item.serialize(writer)); if (this.signalFaultAlarms.length) writer.writeRepeatedMessage(9, this.signalFaultAlarms, (item: SignalFaultAlarm) => item.serialize(writer)); if (this.has_ciCjList) @@ -268,9 +248,6 @@ export namespace relayCabinetGraphicData { case 7: reader.readMessage(message.phaseFailureProtectors, () => pb_1.Message.addToRepeatedWrapperField(message, 7, PhaseFailureProtector.deserialize(reader), PhaseFailureProtector)); break; - case 8: - reader.readMessage(message.combinationtypeList, () => pb_1.Message.addToRepeatedWrapperField(message, 8, Combinationtype.deserialize(reader), Combinationtype)); - break; case 9: reader.readMessage(message.signalFaultAlarms, () => pb_1.Message.addToRepeatedWrapperField(message, 9, SignalFaultAlarm.deserialize(reader), SignalFaultAlarm)); break; diff --git a/src/protos/stationLayoutGraphics.ts b/src/protos/stationLayoutGraphics.ts index 455c69a..5c34bae 100644 --- a/src/protos/stationLayoutGraphics.ts +++ b/src/protos/stationLayoutGraphics.ts @@ -41,6 +41,7 @@ export namespace graphicData { screenDoors?: ScreenDoor[]; stationRelateDeviceList?: StationRelateDevice[]; sectionCodePointList?: SectionCodePoint[]; + screenDoorConfig?: ScreenDoorConfig; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 5, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35], this.#one_of_decls); @@ -132,6 +133,9 @@ export namespace graphicData { if ("sectionCodePointList" in data && data.sectionCodePointList != undefined) { this.sectionCodePointList = data.sectionCodePointList; } + if ("screenDoorConfig" in data && data.screenDoorConfig != undefined) { + this.screenDoorConfig = data.screenDoorConfig; + } } } get canvas() { @@ -314,6 +318,15 @@ export namespace graphicData { set sectionCodePointList(value: SectionCodePoint[]) { pb_1.Message.setRepeatedWrapperField(this, 35, value); } + get screenDoorConfig() { + return pb_1.Message.getWrapperField(this, ScreenDoorConfig, 36) as ScreenDoorConfig; + } + set screenDoorConfig(value: ScreenDoorConfig) { + pb_1.Message.setWrapperField(this, 36, value); + } + get has_screenDoorConfig() { + return pb_1.Message.getField(this, 36) != null; + } static fromObject(data: { canvas?: ReturnType; Platforms?: ReturnType[]; @@ -344,6 +357,7 @@ export namespace graphicData { screenDoors?: ReturnType[]; stationRelateDeviceList?: ReturnType[]; sectionCodePointList?: ReturnType[]; + screenDoorConfig?: ReturnType; }): RtssGraphicStorage { const message = new RtssGraphicStorage({}); if (data.canvas != null) { @@ -433,6 +447,9 @@ export namespace graphicData { if (data.sectionCodePointList != null) { message.sectionCodePointList = data.sectionCodePointList.map(item => SectionCodePoint.fromObject(item)); } + if (data.screenDoorConfig != null) { + message.screenDoorConfig = ScreenDoorConfig.fromObject(data.screenDoorConfig); + } return message; } toObject() { @@ -466,6 +483,7 @@ export namespace graphicData { screenDoors?: ReturnType[]; stationRelateDeviceList?: ReturnType[]; sectionCodePointList?: ReturnType[]; + screenDoorConfig?: ReturnType; } = {}; if (this.canvas != null) { data.canvas = this.canvas.toObject(); @@ -554,6 +572,9 @@ export namespace graphicData { if (this.sectionCodePointList != null) { data.sectionCodePointList = this.sectionCodePointList.map((item: SectionCodePoint) => item.toObject()); } + if (this.screenDoorConfig != null) { + data.screenDoorConfig = this.screenDoorConfig.toObject(); + } return data; } serialize(): Uint8Array; @@ -618,6 +639,8 @@ export namespace graphicData { writer.writeRepeatedMessage(34, this.stationRelateDeviceList, (item: StationRelateDevice) => item.serialize(writer)); if (this.sectionCodePointList.length) writer.writeRepeatedMessage(35, this.sectionCodePointList, (item: SectionCodePoint) => item.serialize(writer)); + if (this.has_screenDoorConfig) + writer.writeMessage(36, this.screenDoorConfig, () => this.screenDoorConfig.serialize(writer)); if (!w) return writer.getResultBuffer(); } @@ -714,6 +737,9 @@ export namespace graphicData { case 35: reader.readMessage(message.sectionCodePointList, () => pb_1.Message.addToRepeatedWrapperField(message, 35, SectionCodePoint.deserialize(reader), SectionCodePoint)); break; + case 36: + reader.readMessage(message.screenDoorConfig, () => message.screenDoorConfig = ScreenDoorConfig.deserialize(reader)); + break; default: reader.skipField(); } } @@ -1499,12 +1525,10 @@ export namespace graphicData { constructor(data?: any[] | { common?: CommonInfo; code?: string; - sonDoorAmount?: number; refPlatformId?: string; - screenDoorGroupList?: ScreenDoorGroup[]; }) { super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls); + 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; @@ -1512,15 +1536,9 @@ export namespace graphicData { if ("code" in data && data.code != undefined) { this.code = data.code; } - if ("sonDoorAmount" in data && data.sonDoorAmount != undefined) { - this.sonDoorAmount = data.sonDoorAmount; - } if ("refPlatformId" in data && data.refPlatformId != undefined) { this.refPlatformId = data.refPlatformId; } - if ("screenDoorGroupList" in data && data.screenDoorGroupList != undefined) { - this.screenDoorGroupList = data.screenDoorGroupList; - } } } get common() { @@ -1538,30 +1556,16 @@ export namespace graphicData { set code(value: string) { pb_1.Message.setField(this, 2, value); } - get sonDoorAmount() { - return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; - } - set sonDoorAmount(value: number) { - pb_1.Message.setField(this, 3, value); - } get refPlatformId() { return pb_1.Message.getFieldWithDefault(this, 4, "") as string; } set refPlatformId(value: string) { pb_1.Message.setField(this, 4, value); } - get screenDoorGroupList() { - return pb_1.Message.getRepeatedWrapperField(this, ScreenDoorGroup, 5) as ScreenDoorGroup[]; - } - set screenDoorGroupList(value: ScreenDoorGroup[]) { - pb_1.Message.setRepeatedWrapperField(this, 5, value); - } static fromObject(data: { common?: ReturnType; code?: string; - sonDoorAmount?: number; refPlatformId?: string; - screenDoorGroupList?: ReturnType[]; }): ScreenDoor { const message = new ScreenDoor({}); if (data.common != null) { @@ -1570,24 +1574,16 @@ export namespace graphicData { if (data.code != null) { message.code = data.code; } - if (data.sonDoorAmount != null) { - message.sonDoorAmount = data.sonDoorAmount; - } if (data.refPlatformId != null) { message.refPlatformId = data.refPlatformId; } - if (data.screenDoorGroupList != null) { - message.screenDoorGroupList = data.screenDoorGroupList.map(item => ScreenDoorGroup.fromObject(item)); - } return message; } toObject() { const data: { common?: ReturnType; code?: string; - sonDoorAmount?: number; refPlatformId?: string; - screenDoorGroupList?: ReturnType[]; } = {}; if (this.common != null) { data.common = this.common.toObject(); @@ -1595,15 +1591,9 @@ export namespace graphicData { if (this.code != null) { data.code = this.code; } - if (this.sonDoorAmount != null) { - data.sonDoorAmount = this.sonDoorAmount; - } if (this.refPlatformId != null) { data.refPlatformId = this.refPlatformId; } - if (this.screenDoorGroupList != null) { - data.screenDoorGroupList = this.screenDoorGroupList.map((item: ScreenDoorGroup) => item.toObject()); - } return data; } serialize(): Uint8Array; @@ -1614,12 +1604,8 @@ export namespace graphicData { writer.writeMessage(1, this.common, () => this.common.serialize(writer)); if (this.code.length) writer.writeString(2, this.code); - if (this.sonDoorAmount != 0) - writer.writeInt32(3, this.sonDoorAmount); if (this.refPlatformId.length) writer.writeString(4, this.refPlatformId); - if (this.screenDoorGroupList.length) - writer.writeRepeatedMessage(5, this.screenDoorGroupList, (item: ScreenDoorGroup) => item.serialize(writer)); if (!w) return writer.getResultBuffer(); } @@ -1635,15 +1621,9 @@ export namespace graphicData { case 2: message.code = reader.readString(); break; - case 3: - message.sonDoorAmount = reader.readInt32(); - break; case 4: message.refPlatformId = reader.readString(); break; - case 5: - reader.readMessage(message.screenDoorGroupList, () => pb_1.Message.addToRepeatedWrapperField(message, 5, ScreenDoorGroup.deserialize(reader), ScreenDoorGroup)); - break; default: reader.skipField(); } } @@ -1656,6 +1636,96 @@ export namespace graphicData { return ScreenDoor.deserialize(bytes); } } + export class ScreenDoorConfig extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + sonDoorAmount?: number; + screenDoorGroupList?: ScreenDoorGroup[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("sonDoorAmount" in data && data.sonDoorAmount != undefined) { + this.sonDoorAmount = data.sonDoorAmount; + } + if ("screenDoorGroupList" in data && data.screenDoorGroupList != undefined) { + this.screenDoorGroupList = data.screenDoorGroupList; + } + } + } + get sonDoorAmount() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set sonDoorAmount(value: number) { + pb_1.Message.setField(this, 1, value); + } + get screenDoorGroupList() { + return pb_1.Message.getRepeatedWrapperField(this, ScreenDoorGroup, 2) as ScreenDoorGroup[]; + } + set screenDoorGroupList(value: ScreenDoorGroup[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + sonDoorAmount?: number; + screenDoorGroupList?: ReturnType[]; + }): ScreenDoorConfig { + const message = new ScreenDoorConfig({}); + if (data.sonDoorAmount != null) { + message.sonDoorAmount = data.sonDoorAmount; + } + if (data.screenDoorGroupList != null) { + message.screenDoorGroupList = data.screenDoorGroupList.map(item => ScreenDoorGroup.fromObject(item)); + } + return message; + } + toObject() { + const data: { + sonDoorAmount?: number; + screenDoorGroupList?: ReturnType[]; + } = {}; + if (this.sonDoorAmount != null) { + data.sonDoorAmount = this.sonDoorAmount; + } + if (this.screenDoorGroupList != null) { + data.screenDoorGroupList = this.screenDoorGroupList.map((item: ScreenDoorGroup) => item.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.sonDoorAmount != 0) + writer.writeInt32(1, this.sonDoorAmount); + if (this.screenDoorGroupList.length) + writer.writeRepeatedMessage(2, this.screenDoorGroupList, (item: ScreenDoorGroup) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ScreenDoorConfig { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ScreenDoorConfig(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.sonDoorAmount = reader.readInt32(); + break; + case 2: + reader.readMessage(message.screenDoorGroupList, () => pb_1.Message.addToRepeatedWrapperField(message, 2, ScreenDoorGroup.deserialize(reader), ScreenDoorGroup)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ScreenDoorConfig { + return ScreenDoorConfig.deserialize(bytes); + } + } export class ScreenDoorGroup extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { @@ -3539,7 +3609,9 @@ export namespace graphicData { signal = 5, station = 6, ScreenDoor = 7, - SignalFaultAlarm = 8 + SignalFaultAlarm = 8, + Breakers = 9, + PowerScreen = 10 } export enum DevicePort { A = 0, diff --git a/src/stores/relayCabinet-store.ts b/src/stores/relayCabinet-store.ts index 6723110..cc34c85 100644 --- a/src/stores/relayCabinet-store.ts +++ b/src/stores/relayCabinet-store.ts @@ -20,8 +20,6 @@ export const useRelayCabinetStore = defineStore('relayCabinet', { draftId: null as number | null, showRelateRelayConfig: false, table: undefined as QTable | undefined, - showCombinationTypeConfig: false, - tableOfCombinationType: undefined as QTable | undefined, updateCiCjList: false, editCiCjConfigIndex: null as CiCjConfigCeil | null, showCiCjConfig: false,