diff --git a/ui/dasadmin/src/components/container/index.vue b/ui/dasadmin/src/components/container/index.vue index fe06bb47..bdc2ec9b 100644 --- a/ui/dasadmin/src/components/container/index.vue +++ b/ui/dasadmin/src/components/container/index.vue @@ -31,7 +31,9 @@ import { ref } from 'vue' import { ElContainer, ElAside, ElHeader, ElMain } from 'element-plus' -const props = defineProps<{ hasAside: boolean }>() +const props = withDefaults(defineProps<{ hasAside: boolean }>(), { + hasAside: false, +}) diff --git a/ui/dasadmin/src/views/backend/node/type.ts b/ui/dasadmin/src/views/backend/node/type.ts index 35feb8b3..4d079e92 100644 --- a/ui/dasadmin/src/views/backend/node/type.ts +++ b/ui/dasadmin/src/views/backend/node/type.ts @@ -49,7 +49,8 @@ export enum linkKeyEnum { export type linkType = { id?: string linkName: string - protocol: string + protocol?: number + protocolName?:string params: string nodeName: string nodeId: string @@ -66,3 +67,65 @@ export type addLinkType = Pick export type delLinkType = Pick + +export type netWorkOptionType = { + bindAddr?: string + bindPort?: string + targetAddr?: string + targetPort?: string + socketType?: '0' | '1' + ignoredSource?: boolean +} + +export type timeOutOptionType = { + t0?: number + t1?: number + t2?: number + t3?: number +} + +export type otherOptionType = { + k?: number + w?: number + t5?: string + irn?: string + t4?: boolean + useCycleInterrogationCommand?: string + ycType?: '0' | '1' | '2' | '3' + sendTestType?: '0' | '1' + useSendTest?: boolean + useSendEndOfInitialisation?: boolean + sendStartDt?: boolean + useNsNrCheck?: boolean + name?: string + state?: string + baud?: number + data?: number + parity?: number + stop?: number + timeout?: number +} +export type protocolFormType = netWorkOptionType & timeOutOptionType & otherOptionType + +type paramsType = { + key: keyof protocolFormType + data: { + label: string + type: string + value: number | string | boolean + isSeconds?: boolean + list?: { label: string; value: string | number }[] + cardTitle?: ['网络设置', '超时设置'] + } +} +export type formColumnType = { + protocol: number + label: string + cardTitle: ['网络设置', '超时设置'] + params: { + netWorkOption: paramsType[] + timeOutOption: paramsType[] + otherOption: paramsType[] + } +} +export type formColumnKeyType = keyof formColumnType['params']