From 8d5a14dd359906ab4cd896982d4cf1a33bc6f052 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Wed, 8 Nov 2023 13:05:28 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=8C=BA=E6=AE=B5?= =?UTF-8?q?=E7=A0=81=E4=BD=8D=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/draw-app/properties/SectionCodePointConfig.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/draw-app/properties/SectionCodePointConfig.vue b/src/components/draw-app/properties/SectionCodePointConfig.vue index 2516c20..a5f316a 100644 --- a/src/components/draw-app/properties/SectionCodePointConfig.vue +++ b/src/components/draw-app/properties/SectionCodePointConfig.vue @@ -47,6 +47,9 @@ active-class="bg-teal-1 text-grey-8" @click.stop="clickSectionId(item)" > + + {{ index }} + {{ getSectionById(item).code }} From 0adbbfb1ba825664f8c85852e168a0008869fc7e Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 8 Nov 2023 13:07:25 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=BB=84=E5=90=88?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=88=97=E8=A1=A8+=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=85=B3=E8=81=94=E8=AE=BE=E5=A4=87=E7=B1=BB=E5=9E=8B=E6=96=AD?= =?UTF-8?q?=E8=B7=AF=E5=99=A8=E5=92=8C=E7=94=B5=E6=BA=90=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/draw-app/dialogs/CiCjList.vue | 8 +- src/components/draw-app/dialogs/CiQdList.vue | 6 +- .../draw-app/dialogs/CombinationtypeList.vue | 147 ------------ .../dialogs/DeviceRelateRelayList.vue | 4 +- .../properties/CombinationTypeConfig.vue | 220 ------------------ .../draw-app/properties/RelateRelayConfig.vue | 9 + src/drawApp/relayCabinetLayoutApp.ts | 50 ---- src/layouts/RelayCabinetLayout.vue | 31 --- src/protos/relayCabinetLayoutGraphics.ts | 25 +- src/protos/stationLayoutGraphics.ts | 4 +- src/stores/relayCabinet-store.ts | 2 - 11 files changed, 20 insertions(+), 486 deletions(-) delete mode 100644 src/components/draw-app/dialogs/CombinationtypeList.vue delete mode 100644 src/components/draw-app/properties/CombinationTypeConfig.vue 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, From 7a321008aee0dbf9829afef56b7a256d30531727 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Wed, 8 Nov 2023 13:10:20 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/draw-app/properties/SectionCodePointConfig.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/draw-app/properties/SectionCodePointConfig.vue b/src/components/draw-app/properties/SectionCodePointConfig.vue index a5f316a..ecff651 100644 --- a/src/components/draw-app/properties/SectionCodePointConfig.vue +++ b/src/components/draw-app/properties/SectionCodePointConfig.vue @@ -54,7 +54,7 @@ >{{ getSectionById(item).code }} -
+