Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
bigDataSystem
Commits
8da9fcb0
Commit
8da9fcb0
authored
Nov 12, 2024
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改元数据
parent
1aca171f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
200 additions
and
11 deletions
+200
-11
data.ts
src/views/metadata/data.ts
+108
-3
databaseModal.vue
src/views/metadata/databaseModal.vue
+54
-5
metaDataModal.vue
src/views/metadata/metaDataModal.vue
+13
-3
metadataData.ts
src/views/metadata/metadataData.ts
+25
-0
No files found.
src/views/metadata/data.ts
View file @
8da9fcb0
...
...
@@ -840,12 +840,28 @@ export const versionNumSchema: FormSchema[] = [
},
defaultValue
:
'1'
,
colProps
:
{
lg
:
6
,
md
:
6
},
required
:
true
,
},
];
export
const
viewColumns
:
BasicColumn
[]
=
[
{
title
:
'视图名称'
,
title
:
'名称'
,
dataIndex
:
'name'
,
width
:
60
,
},
{
title
:
'描述'
,
dataIndex
:
'remark'
,
width
:
120
,
},
{
title
:
'SQL'
,
dataIndex
:
'sql'
,
width
:
180
,
},
];
export
const
storedColumns
:
BasicColumn
[]
=
[
{
title
:
'存储过程名称'
,
dataIndex
:
'name'
,
width
:
120
,
},
...
...
@@ -855,8 +871,97 @@ export const viewColumns: BasicColumn[] = [
width
:
120
,
},
{
title
:
'
SQL语句
'
,
title
:
'
包头
'
,
dataIndex
:
'sql'
,
width
:
120
,
},
{
title
:
'参数类型'
,
dataIndex
:
'type'
,
width
:
120
,
},
];
export
const
metaDataSchema
:
DescItem
[]
=
[
{
field
:
'dataSource'
,
label
:
'数据源'
,
},
{
field
:
'type'
,
label
:
'资产类型'
,
},
{
field
:
'owner'
,
label
:
'拥有者'
,
},
{
field
:
'storageType'
,
label
:
'存储类型'
,
},
{
field
:
'createTime'
,
label
:
'创建时间'
,
},
{
field
:
'updateTime'
,
label
:
'更新时间'
,
},
{
field
:
'remark'
,
label
:
'注释'
,
},
{
field
:
'description'
,
label
:
'描述'
,
},
];
export
const
dataBaseSchema
:
DescItem
[]
=
[
{
field
:
'dataSource'
,
label
:
'数据源'
,
},
{
field
:
'size'
,
label
:
'存储大小'
,
},
{
field
:
'type'
,
label
:
'资产类型'
,
},
{
field
:
'owner'
,
label
:
'拥有者'
,
},
{
field
:
'dataFrom'
,
label
:
'元数据来源'
,
},
{
field
:
'storageType'
,
label
:
'存储类型'
,
},
{
field
:
'createTime'
,
label
:
'创建时间'
,
},
{
field
:
'updateTime'
,
label
:
'更新时间'
,
},
{
field
:
'safeLevel'
,
label
:
'安全等级'
,
},
{
field
:
'remark'
,
label
:
'注释'
,
},
{
field
:
'storagePath'
,
label
:
'存储路径'
,
},
{
field
:
'description'
,
label
:
'描述'
,
},
];
src/views/metadata/databaseModal.vue
View file @
8da9fcb0
...
...
@@ -21,10 +21,34 @@
</div>
</a-tab-pane>
<a-tab-pane
key=
"3"
tab=
"存储过程"
>
<div
v-if=
"page === '3'"
>
存储过程
</div>
<div
v-if=
"page === '3'"
>
<BasicTable
@
register=
"registerStoredTable"
>
<
template
#
bodyCell=
"{ column }"
>
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
label: '查看',
onClick: handleEdit.bind(null),
},
]"
/>
</
template
>
</template>
</BasicTable>
</div>
</a-tab-pane>
<a-tab-pane
key=
"4"
tab=
"基本信息"
>
<div
v-if=
"page === '4'"
>
基本信息
</div>
<div
v-if=
"page === '4'"
>
<Description
size=
"middle"
title=
"基本信息"
:bordered=
"false"
:column=
"3"
:data=
"refundData"
:schema=
"dataBaseSchema"
/>
</div>
</a-tab-pane>
</Tabs>
</div>
...
...
@@ -32,20 +56,30 @@
<TableModal
@
register=
"registerTableModal"
/>
</template>
<
script
setup
lang=
"ts"
>
import
{
BasicTable
,
useTable
}
from
'@/components/Table'
;
import
{
BasicTable
,
TableAction
,
useTable
}
from
'@/components/Table'
;
import
BasicModal
from
'@/components/Modal/src/BasicModal.vue'
;
import
{
ref
}
from
'vue'
;
import
{
Tabs
}
from
'ant-design-vue'
;
import
{
useModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
dataBaseSchema
,
partitionColumns
,
refundSchema
,
storedColumns
,
tbColumns
,
tbSearchFormSchema
,
viewColumns
viewColumns
,
}
from
'@/views/metadata/data'
;
import
{
partitionData
,
tbData
,
viewData
}
from
'@/views/metadata/metadataData'
;
import
{
partitionData
,
refundData
,
storedData
,
tbData
,
viewData
,
}
from
'@/views/metadata/metadataData'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
TableModal
from
'@/views/metadata/tableModal.vue'
;
import
{
Description
}
from
'@/components/Description'
;
const
{
createMessage
}
=
useMessage
();
const
page
=
ref
(
'1'
);
...
...
@@ -105,11 +139,26 @@
showIndexColumn
:
false
,
scroll
:
{
y
:
300
},
});
const
[
registerStoredTable
]
=
useTable
({
dataSource
:
storedData
,
columns
:
storedColumns
,
pagination
:
false
,
showIndexColumn
:
false
,
scroll
:
{
y
:
300
},
actionColumn
:
{
width
:
150
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
});
function
handleCreate
(
record
)
{
// console.log(record);
openModal
(
true
,
{
...
record
,
});
}
function
handleEdit
()
{
createMessage
.
success
(
'解绑成功'
);
}
</
script
>
<
style
scoped
lang=
"less"
></
style
>
src/views/metadata/metaDataModal.vue
View file @
8da9fcb0
...
...
@@ -13,7 +13,16 @@
</BasicTable>
</a-tab-pane>
<a-tab-pane
key=
"2"
tab=
"基本信息"
>
<div
v-if=
"page === '2'"
>
基本信息
</div>
<div
v-if=
"page === '2'"
>
<Description
size=
"middle"
title=
"基本信息"
:bordered=
"false"
:column=
"3"
:data=
"metaData"
:schema=
"metaDataSchema"
/>
</div>
</a-tab-pane>
</Tabs>
</div>
...
...
@@ -26,10 +35,11 @@
import
{
ref
}
from
'vue'
;
import
{
Tabs
}
from
'ant-design-vue'
;
import
{
useModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
dbColumns
,
dbSearchFormSchema
}
from
'@/views/metadata/data'
;
import
{
dbData
}
from
'@/views/metadata/metadataData'
;
import
{
dbColumns
,
dbSearchFormSchema
,
metaDataSchema
}
from
'@/views/metadata/data'
;
import
{
dbData
,
metaData
}
from
'@/views/metadata/metadataData'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
DatabaseModal
from
'@/views/metadata/databaseModal.vue'
;
import
{
Description
}
from
'@/components/Description'
;
const
{
createMessage
}
=
useMessage
();
const
page
=
ref
(
'1'
);
...
...
src/views/metadata/metadataData.ts
View file @
8da9fcb0
...
...
@@ -1093,3 +1093,28 @@ export const viewData: any[] = [
sql
:
'SELECT product_id, stock_level FROM inventory WHERE stock_level < 10'
,
},
];
export
const
storedData
:
any
[]
=
[
{
name
:
'hello_word'
,
remark
:
''
,
sql
:
''
,
type
:
'void'
,
},
];
export
const
metaData
=
{
dataSource
:
'mysql24.connector_foundation1.tb_1'
,
size
:
'254K'
,
type
:
'MySQL'
,
owner
:
'张三'
,
dataFrom
:
'mysql24.connector_foundation1.tb_1'
,
zType
:
'ORC'
,
changeTime
:
'2023-06-14 10:04:04'
,
isWork
:
'是'
,
storageType
:
'ORC'
,
createTime
:
'2023-06-14 10:04:04'
,
updateTime
:
'2023-06-14 10:04:04'
,
safeLevel
:
'高'
,
remark
:
'无'
,
storagePath
:
'mysql24.connector_foundation1.tb_1'
,
description
:
'无'
,
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment