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 || '设备类型不能为空']" /> (); -export const combinationListMap = new Map(); - export function initDrawApp(): IDrawApp { drawApp = newDrawApp({ dataLoader: loadDrawDatas, @@ -137,11 +135,6 @@ export function initDrawApp(): IDrawApp { }); }); }); - combinationTypeList.forEach((combination) => { - combination.refRelays.forEach((relayId) => { - combinationListMap.set(relayId, combination.code); - }); - }); const relays = app.queryStore.queryByType(Relay.Type); relays.forEach((relay) => { relay.refDevice.text = refRelaysListMap @@ -160,9 +153,7 @@ export function initDrawApp(): IDrawApp { }); app.on('destroy', () => { refRelaysList = []; - combinationTypeList = []; refRelaysListMap.clear(); - combinationListMap.clear(); }); return drawApp; } @@ -241,7 +232,6 @@ export function saveDrawDatas(app: IDrawApp) { } }); storage.deviceRelateRelayList = refRelaysList; - storage.combinationtypeList = combinationTypeList; storage.UniqueIdPrefix = UniqueIdPrefix; storage.ciCjList = ciCjList; storage.ciQdList = ciQdList; @@ -276,7 +266,6 @@ export async function loadDrawDatas(): Promise { datas.push(new SignalFaultAlarmData(signalFaultAlarm)); }); refRelaysList = storage.deviceRelateRelayList; - combinationTypeList = storage.combinationtypeList; UniqueIdPrefix = storage.UniqueIdPrefix; ciCjList = storage.ciCjList; ciQdList = storage.ciQdList; @@ -343,45 +332,6 @@ export function deleteDeviceRelateRelay(row: RelateRelaylistItem) { } } -//组合类型列表的增删改查 -export interface CombinationTypeListItem { - code: string; - refRelays: string[]; - refRelaysCode?: string[]; -} - -let combinationTypeList: relayCabinetGraphicData.Combinationtype[] = []; -export function loadCombinationtypeList() { - return combinationTypeList; -} - -export function creatCombinationtype( - row: relayCabinetGraphicData.Combinationtype -) { - combinationTypeList.push(row); -} - -export function editCombinationtype( - editRow: CombinationTypeListItem, - newData: relayCabinetGraphicData.Combinationtype -) { - for (let i = 0; i < combinationTypeList.length; i++) { - if (combinationTypeList[i].code == editRow.code) { - combinationTypeList[i] = newData; - break; - } - } -} - -export function deleteCombinationtype(row: CombinationTypeListItem) { - for (let i = 0; i < combinationTypeList.length; i++) { - if (combinationTypeList[i].code == row.code) { - combinationTypeList.splice(i, 1); - break; - } - } -} - //所属集中站 let UniqueIdPrefix: relayCabinetGraphicData.UniqueIdType; export function loadUniqueIdPrefix() { diff --git a/src/layouts/RelayCabinetLayout.vue b/src/layouts/RelayCabinetLayout.vue index 46281ea..ec1c0d3 100644 --- a/src/layouts/RelayCabinetLayout.vue +++ b/src/layouts/RelayCabinetLayout.vue @@ -86,7 +86,6 @@ - @@ -178,8 +173,6 @@ import DrawRelayCabinetProperties from 'src/components/draw-app/DrawRelayCabinet import BatchBuildRelayCabinetOrRelay from 'src/components/draw-app/dialogs/BatchBuildRelayCabinetOrRelay.vue'; import DeviceRelateRelayList from 'src/components/draw-app/dialogs/DeviceRelateRelayList.vue'; import RelateRelayConfig from 'src/components/draw-app/properties/RelateRelayConfig.vue'; -import CombinationtypeList from 'src/components/draw-app/dialogs/CombinationtypeList.vue'; -import CombinationTypeConfig from 'src/components/draw-app/properties/CombinationTypeConfig.vue'; import CiCjList from 'src/components/draw-app/dialogs/CiCjList.vue'; import CiQdList from 'src/components/draw-app/dialogs/CiQdList.vue'; import CiCjConfig from 'src/components/draw-app/properties/CiCjConfig.vue'; @@ -189,7 +182,6 @@ import { saveDrawDatas, checkDataToServer, RelateRelaylistItem, - CombinationTypeListItem, saveDrawToServer, loadUniqueIdPrefix, setUniqueIdPrefix, @@ -256,7 +248,6 @@ const leftMenuConfig = [ //数据管理下拉按钮 const dataManageConfig = [ { label: '设备关联继电器列表', click: openDeviceRelateRelayList }, - { label: '组合类型列表', click: openCombinationTypeList }, { label: '采集列表', click: openCiCjList }, { label: '驱动列表', click: openCiQdList }, ]; @@ -425,25 +416,6 @@ function openDeviceRelateRelayList() { }); } -let combinationTypeDialogInstance: DialogChainObject | null = null; -const combinationTypeConfigEdit = - ref>(); -function openCombinationTypeList() { - if (combinationTypeDialogInstance) return; - combinationTypeDialogInstance = $q - .dialog({ - component: CombinationtypeList, - componentProps: { - onEditClick: (row: CombinationTypeListItem) => { - combinationTypeConfigEdit.value?.editRelateRelays(row); - }, - }, - }) - .onCancel(() => { - combinationTypeDialogInstance = null; - }); -} - let ciCjListDialogInstance: DialogChainObject | null = null; function openCiCjList() { if (ciCjListDialogInstance) return; @@ -483,9 +455,6 @@ onUnmounted(() => { if (relateRelayDialogInstance) { relateRelayDialogInstance.hide(); } - if (combinationTypeDialogInstance) { - combinationTypeDialogInstance.hide(); - } if (ciCjListDialogInstance) { ciCjListDialogInstance.hide(); } 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..8bf09a8 100644 --- a/src/protos/stationLayoutGraphics.ts +++ b/src/protos/stationLayoutGraphics.ts @@ -3539,7 +3539,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,