diff --git a/src/components/draw-app/dialogs/DeviceRelateRelayList.vue b/src/components/draw-app/dialogs/DeviceRelateRelayList.vue index c6bde20..3738197 100644 --- a/src/components/draw-app/dialogs/DeviceRelateRelayList.vue +++ b/src/components/draw-app/dialogs/DeviceRelateRelayList.vue @@ -59,14 +59,14 @@ const relayCabinetStore = useRelayCabinetStore(); const $q = useQuasar(); const tableRef = ref(); const deviceTypeMap = { - Turnout: '道岔', - signal: '信号机', + 1: '道岔', + 5: '信号机', }; const columns: QTable['columns'] = [ { - name: 'type', + name: 'deviceType', label: '设备类型', - field: (row) => deviceTypeMap[row.type as keyof typeof deviceTypeMap], + field: (row) => deviceTypeMap[row.deviceType as keyof typeof deviceTypeMap], align: 'center', }, { name: 'code', label: '设备编号', field: 'code', align: 'center' }, diff --git a/src/components/draw-app/properties/RelateRelayConfig.vue b/src/components/draw-app/properties/RelateRelayConfig.vue index 1e8165f..adb240e 100644 --- a/src/components/draw-app/properties/RelateRelayConfig.vue +++ b/src/components/draw-app/properties/RelateRelayConfig.vue @@ -8,12 +8,12 @@ ({ - type: '', + deviceType: undefined, code: '', combinationtypes: [ { code: '组合类型', refRelays: [], refRelaysCode: [], expanded: false }, @@ -129,8 +128,8 @@ const relateRelayConfig = ref<{ const handleState = ref('新建设备关联继电器'); const optionsType = [ - { label: '道岔', value: Turnout.Type }, - { label: '信号机', value: Signal.Type }, + { label: '道岔', value: graphicData.RelatedRef.DeviceType.Turnout }, + { label: '信号机', value: graphicData.RelatedRef.DeviceType.signal }, ]; let selectGraphic: JlGraphic[] = []; @@ -175,7 +174,7 @@ async function onSubmit() { }); const deviceRelateRelay = new relayCabinetGraphicData.DeviceRelateRelay( { - type: relateRelayConfig.value.type, + deviceType: relateRelayConfig.value.deviceType, code: relateRelayConfig.value.code, combinationtypes: combinationtypes, } @@ -216,7 +215,7 @@ async function editRelateRelays(row: RelateRelaylistItem) { selectGraphic = []; drawApp.updateSelected(); editRow = row; - relateRelayConfig.value.type = row.type; + relateRelayConfig.value.deviceType = row.deviceType; relateRelayConfig.value.code = row.code; row.combinationtypes.forEach((combinationtype) => { const refCode: string[] = []; @@ -305,7 +304,7 @@ function onReset() { clickIndex = null; handleState.value = '新建设备关联继电器'; relateRelayConfig.value = { - type: '', + deviceType: undefined, code: '', combinationtypes: [ { code: '组合类型', refRelays: [], refRelaysCode: [], expanded: false }, diff --git a/src/components/draw-app/properties/RelayProperty.vue b/src/components/draw-app/properties/RelayProperty.vue index 55bcbff..15790a8 100644 --- a/src/components/draw-app/properties/RelayProperty.vue +++ b/src/components/draw-app/properties/RelayProperty.vue @@ -25,7 +25,7 @@