diff --git a/src/frontend/src/views/link-data-manage/link-data-create/components/components/scheme-input/event-log.vue b/src/frontend/src/views/link-data-manage/link-data-create/components/components/scheme-input/event-log.vue index 8b8af360..03096d08 100644 --- a/src/frontend/src/views/link-data-manage/link-data-create/components/components/scheme-input/event-log.vue +++ b/src/frontend/src/views/link-data-manage/link-data-create/components/components/scheme-input/event-log.vue @@ -24,6 +24,8 @@ import { + computed, onMounted, ref, } from 'vue'; @@ -68,12 +71,33 @@ type ModelValue = LinkDataDetailModel['config']['links'][0]['left_table'] | LinkDataDetailModel['config']['links'][0]['right_table'] + interface Props { + links: LinkDataDetailModel['config']['links'] + } + + const props = defineProps(); const modelValue = defineModel({ required: true, }); const { t } = useI18n(); const statusSystems = ref>>([]); + const firstSystemIds = computed(() => { + if (props.links.length > 1) { + const leftSystemIds = props.links[0].left_table.system_ids; + const rightSystemIds = props.links[0].right_table.system_ids; + if (leftSystemIds && leftSystemIds.length) { + return leftSystemIds; + } if (rightSystemIds && rightSystemIds.length) { + return rightSystemIds; + } + return []; + } + return []; + }); + + const isDisabled = computed(() => firstSystemIds.value.length > 0); + // 获取rt_id const { data: tableData, @@ -116,6 +140,9 @@ name: item.name, status: result[item.id].status, })); + if (isDisabled.value) { + modelValue.value.system_ids = firstSystemIds.value; + } statusSystems.value.sort((a, b) => { if (a.status !== 'unset') return -1; if (b.status !== 'unset') return 1; diff --git a/src/frontend/src/views/link-data-manage/link-data-create/components/components/scheme-input/other.vue b/src/frontend/src/views/link-data-manage/link-data-create/components/components/scheme-input/other.vue index 4fadffb0..c484e43a 100644 --- a/src/frontend/src/views/link-data-manage/link-data-create/components/components/scheme-input/other.vue +++ b/src/frontend/src/views/link-data-manage/link-data-create/components/components/scheme-input/other.vue @@ -15,33 +15,33 @@ to the current version of the project delivered to anyone in the future. -->