From bc9c1318a5409393c0691e3d0a8c341fc504f00c Mon Sep 17 00:00:00 2001 From: qianmoQ Date: Thu, 18 Apr 2024 16:52:46 +0800 Subject: [PATCH] [Core] [Source] [Metadata] Refactor metadata er diagram --- core/datacap-ui/src/model/table.ts | 1 + core/datacap-ui/src/router/default.ts | 9 ++++ .../metadata/components/MetadataContent.vue | 8 ++-- ...ErDiagram.vue => SourceTableErDiagram.vue} | 43 ++++++++----------- .../pages/admin/source/SourceTableInfo.vue | 3 +- 5 files changed, 34 insertions(+), 30 deletions(-) rename core/datacap-ui/src/views/pages/admin/source/{components/TableErDiagram.vue => SourceTableErDiagram.vue} (61%) diff --git a/core/datacap-ui/src/model/table.ts b/core/datacap-ui/src/model/table.ts index 6a99b9de..8ebb0a0d 100644 --- a/core/datacap-ui/src/model/table.ts +++ b/core/datacap-ui/src/model/table.ts @@ -21,6 +21,7 @@ export interface TableModel autoIncrement?: string database?: DatabaseModel columns?: Array + code?: string } export class TableRequest diff --git a/core/datacap-ui/src/router/default.ts b/core/datacap-ui/src/router/default.ts index 3a88ff52..e5a98f69 100644 --- a/core/datacap-ui/src/router/default.ts +++ b/core/datacap-ui/src/router/default.ts @@ -266,6 +266,15 @@ const createAdminRouter = (router: any) => { type: 'statement' }, component: () => import('@/views/pages/admin/source/SourceTableStatement.vue') + }, + { + path: 'd/:database/t/erDiagram/:table', + meta: { + title: 'common.source', + isRoot: false, + type: 'erDiagram' + }, + component: () => import('@/views/pages/admin/source/SourceTableErDiagram.vue') } ] }, diff --git a/core/datacap-ui/src/views/layouts/metadata/components/MetadataContent.vue b/core/datacap-ui/src/views/layouts/metadata/components/MetadataContent.vue index 26c2ba63..5f273203 100644 --- a/core/datacap-ui/src/views/layouts/metadata/components/MetadataContent.vue +++ b/core/datacap-ui/src/views/layouts/metadata/components/MetadataContent.vue @@ -27,9 +27,11 @@ {{ $t('source.common.statement') }} - - - {{ $t('source.common.erDiagram') }} + +
+ + {{ $t('source.common.erDiagram') }} +
diff --git a/core/datacap-ui/src/views/pages/admin/source/components/TableErDiagram.vue b/core/datacap-ui/src/views/pages/admin/source/SourceTableErDiagram.vue similarity index 61% rename from core/datacap-ui/src/views/pages/admin/source/components/TableErDiagram.vue rename to core/datacap-ui/src/views/pages/admin/source/SourceTableErDiagram.vue index 8d22cc48..7a3760d9 100644 --- a/core/datacap-ui/src/views/pages/admin/source/components/TableErDiagram.vue +++ b/core/datacap-ui/src/views/pages/admin/source/SourceTableErDiagram.vue @@ -8,26 +8,14 @@