Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
Project
Project
Details
Activity
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
poc
poc-fe
Commits
54aec989
Commit
54aec989
authored
Apr 30, 2025
by
tyyin lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(数据库): 数据表展示优化
parent
8ded08e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
personal-db-table.vue
...ws/personal-space/personal-db-table/personal-db-table.vue
+13
-6
No files found.
src/views/personal-space/personal-db-table/personal-db-table.vue
View file @
54aec989
...
@@ -8,10 +8,11 @@ import useTableScrollY from '@/composables/useTableScrollY'
...
@@ -8,10 +8,11 @@ import useTableScrollY from '@/composables/useTableScrollY'
import
{
createDatabaseColumn
}
from
'./columns.tsx'
import
{
createDatabaseColumn
}
from
'./columns.tsx'
import
{
DBTableItemInterface
}
from
'./type'
import
{
DBTableItemInterface
}
from
'./type'
import
{
fetchGetDataBaseDetail
}
from
'@/apis/database.ts'
import
{
fetchGetDataBaseDetail
}
from
'@/apis/database.ts'
import
{
useRoute
}
from
'vue-router'
import
{
useRoute
,
useRouter
}
from
'vue-router'
const
{
t
}
=
useI18n
()
const
{
t
}
=
useI18n
()
const
route
=
useRoute
()
const
route
=
useRoute
()
const
router
=
useRouter
()
const
{
pageContentWrapRef
,
tableContentY
}
=
useTableScrollY
(
46
+
48
+
33
)
const
{
pageContentWrapRef
,
tableContentY
}
=
useTableScrollY
(
46
+
48
+
33
)
// const { paginationData, handlePageNoChange, handlePageSizeChange } = usePagination()
// const { paginationData, handlePageNoChange, handlePageSizeChange } = usePagination()
...
@@ -40,7 +41,7 @@ const emptyTableDataText = computed(() => {
...
@@ -40,7 +41,7 @@ const emptyTableDataText = computed(() => {
function
getDBTableList
()
{
function
getDBTableList
()
{
fetchGetDataBaseDetail
<
{
fetchGetDataBaseDetail
<
{
title
:
string
title
:
string
tableInfos
:
{
table
Name
:
string
;
tableComment
:
string
;
tableRows
:
number
;
tableColumn
:
number
}[]
tableInfos
:
{
table
_NAME
:
string
;
table_COMMENT
:
string
;
table_ROWS
:
number
;
table_COLUMN
:
number
}[]
}
>
(
route
.
params
.
id
as
string
)
}
>
(
route
.
params
.
id
as
string
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
!==
0
)
return
''
if
(
res
.
code
!==
0
)
return
''
...
@@ -49,9 +50,9 @@ function getDBTableList() {
...
@@ -49,9 +50,9 @@ function getDBTableList() {
const
tableData
:
DBTableItemInterface
[]
=
res
.
data
.
tableInfos
.
map
((
dataItem
)
=>
{
const
tableData
:
DBTableItemInterface
[]
=
res
.
data
.
tableInfos
.
map
((
dataItem
)
=>
{
return
{
return
{
name
:
dataItem
.
table
Name
,
name
:
dataItem
.
table
_NAME
,
docs
:
dataItem
.
table
Comment
,
docs
:
dataItem
.
table
_COMMENT
,
dataSize
:
`
${
dataItem
.
table
Rows
||
'-'
}
行,
${
dataItem
.
tableColumn
||
'-'
}
列`
,
dataSize
:
`
${
dataItem
.
table
_ROWS
||
'-'
}
行,
${
dataItem
.
table_COLUMN
||
'-'
}
列`
,
}
}
})
})
...
@@ -61,6 +62,12 @@ function getDBTableList() {
...
@@ -61,6 +62,12 @@ function getDBTableList() {
dbTableListLoading
.
value
=
false
dbTableListLoading
.
value
=
false
})
})
}
}
function
handleNavBack
()
{
router
.
replace
({
name
:
'PersonalSpaceDatabase'
,
})
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -73,7 +80,7 @@ function getDBTableList() {
...
@@ -73,7 +80,7 @@ function getDBTableList() {
</n-input>
</n-input>
</div>
-->
</div>
-->
<div
class=
"mb-[12px]"
>
<div
class=
"mb-[12px]"
>
<span
class=
"cursor-pointer select-none text-[14px]"
>
<span
class=
"cursor-pointer select-none text-[14px]"
@
click=
"handleNavBack"
>
<i
class=
"iconfont icon-left mr-[6px] text-[12px]"
></i>
<i
class=
"iconfont icon-left mr-[6px] text-[12px]"
></i>
<span>
{{ dbTitle || '返回数据库列表' }}
</span>
<span>
{{ dbTitle || '返回数据库列表' }}
</span>
</span>
</span>
...
...
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