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
a97f88e5
Commit
a97f88e5
authored
Nov 11, 2024
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改元数据
parent
2f4ed1b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
10 deletions
+52
-10
data.ts
src/views/metadata/data.ts
+17
-0
databaseModal.vue
src/views/metadata/databaseModal.vue
+18
-10
metadataData.ts
src/views/metadata/metadataData.ts
+17
-0
No files found.
src/views/metadata/data.ts
View file @
a97f88e5
...
@@ -843,3 +843,20 @@ export const versionNumSchema: FormSchema[] = [
...
@@ -843,3 +843,20 @@ export const versionNumSchema: FormSchema[] = [
required
:
true
,
required
:
true
,
},
},
];
];
export
const
viewColumns
:
BasicColumn
[]
=
[
{
title
:
'视图名称'
,
dataIndex
:
'name'
,
width
:
120
,
},
{
title
:
'描述'
,
dataIndex
:
'remark'
,
width
:
120
,
},
{
title
:
'SQL语句'
,
dataIndex
:
'sql'
,
width
:
120
,
},
];
src/views/metadata/databaseModal.vue
View file @
a97f88e5
...
@@ -16,7 +16,9 @@
...
@@ -16,7 +16,9 @@
</BasicTable>
</BasicTable>
</a-tab-pane>
</a-tab-pane>
<a-tab-pane
key=
"2"
tab=
"视图"
>
<a-tab-pane
key=
"2"
tab=
"视图"
>
<div
v-if=
"page === '2'"
>
视图
</div>
<div
v-if=
"page === '2'"
>
<BasicTable
@
register=
"registerViewTable"
/>
</div>
</a-tab-pane>
</a-tab-pane>
<a-tab-pane
key=
"3"
tab=
"存储过程"
>
<a-tab-pane
key=
"3"
tab=
"存储过程"
>
<div
v-if=
"page === '3'"
>
存储过程
</div>
<div
v-if=
"page === '3'"
>
存储过程
</div>
...
@@ -35,8 +37,13 @@
...
@@ -35,8 +37,13 @@
import
{
ref
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
import
{
Tabs
}
from
'ant-design-vue'
;
import
{
Tabs
}
from
'ant-design-vue'
;
import
{
useModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
useModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
tbColumns
,
tbSearchFormSchema
}
from
'@/views/metadata/data'
;
import
{
import
{
tbData
}
from
'@/views/metadata/metadataData'
;
partitionColumns
,
tbColumns
,
tbSearchFormSchema
,
viewColumns
}
from
'@/views/metadata/data'
;
import
{
partitionData
,
tbData
,
viewData
}
from
'@/views/metadata/metadataData'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
TableModal
from
'@/views/metadata/tableModal.vue'
;
import
TableModal
from
'@/views/metadata/tableModal.vue'
;
...
@@ -88,15 +95,16 @@
...
@@ -88,15 +95,16 @@
const
[
registerDbModal
,
{
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
const
[
registerDbModal
,
{
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
title
.
value
=
data
.
workSpaceName
;
title
.
value
=
data
.
workSpaceName
;
tableTitle
.
value
=
data
.
dbName
;
tableTitle
.
value
=
data
.
dbName
;
tableData
.
value
=
tbData
.
filter
(
tableData
.
value
=
tbData
.
filter
((
item
)
=>
item
.
dbName
===
tableTitle
.
value
);
(
item
)
=>
item
.
dbName
===
tableTitle
.
value
,
);
await
reload
();
await
reload
();
});
});
function
handleNew
()
{
const
[
registerViewTable
]
=
useTable
({
createMessage
.
warning
(
'暂未完成,敬请期待'
);
dataSource
:
viewData
,
}
columns
:
viewColumns
,
pagination
:
false
,
showIndexColumn
:
false
,
scroll
:
{
y
:
300
},
});
function
handleCreate
(
record
)
{
function
handleCreate
(
record
)
{
// console.log(record);
// console.log(record);
openModal
(
true
,
{
openModal
(
true
,
{
...
...
src/views/metadata/metadataData.ts
View file @
a97f88e5
...
@@ -1076,3 +1076,20 @@ export const bucketingTableData: any[] = [
...
@@ -1076,3 +1076,20 @@ export const bucketingTableData: any[] = [
index
:
'DESC'
,
index
:
'DESC'
,
},
},
];
];
export
const
viewData
:
any
[]
=
[
{
name
:
'员工信息视图'
,
remark
:
'包含所有员工的基本信息'
,
sql
:
'SELECT id, name, department FROM employees'
,
},
{
name
:
'销售记录视图'
,
remark
:
'显示每月销售总额'
,
sql
:
'SELECT month, SUM(amount) AS total_sales FROM sales GROUP BY month'
,
},
{
name
:
'库存状态视图'
,
remark
:
'监控产品库存水平'
,
sql
:
'SELECT product_id, stock_level FROM inventory WHERE stock_level < 10'
,
},
];
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