Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pm
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
roadside
pm
Commits
ac5e1408
Commit
ac5e1408
authored
Apr 22, 2026
by
pengxianhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉机构管理分页
parent
ea45b1cd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
59 deletions
+3
-59
index.vue
src/views/platform/institution/index.vue
+2
-58
index.vue
src/views/workbench/order/index.vue
+1
-1
No files found.
src/views/platform/institution/index.vue
View file @
ac5e1408
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
</ArtTableHeader>
</ArtTableHeader>
<ElTable
<ElTable
:data=
"
pagedTreeData
"
:data=
"
filteredTree
"
row-key=
"id"
row-key=
"id"
border
border
default-expand-all
default-expand-all
...
@@ -137,19 +137,6 @@
...
@@ -137,19 +137,6 @@
</ElTableColumn>
</ElTableColumn>
</ElTable>
</ElTable>
<!-- 分页 -->
<div
class=
"pagination-wrapper"
>
<ElPagination
v-model:current-page=
"pagination.current"
v-model:page-size=
"pagination.size"
:total=
"pagination.total"
:page-sizes=
"[10, 20, 30, 50, 100]"
:background=
"true"
layout=
"total, prev, pager, next, sizes, jumper"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</div>
</ElCard>
</ElCard>
<ElDialog
<ElDialog
...
@@ -572,45 +559,7 @@ const statsCards = computed(() => [
...
@@ -572,45 +559,7 @@ const statsCards = computed(() => [
}
}
])
])
// 分页状态
const
pagination
=
ref
({
current
:
1
,
size
:
20
,
total
:
0
})
// 分页后的树形数据(仅在表格展示层处理分页,不修改原始树结构)
const
pagedTreeData
=
computed
(()
=>
{
const
allData
=
flattenInstitutions
(
filteredTree
.
value
)
pagination
.
value
.
total
=
allData
.
length
const
start
=
(
pagination
.
value
.
current
-
1
)
*
pagination
.
value
.
size
const
end
=
start
+
pagination
.
value
.
size
const
pagedIds
=
new
Set
(
allData
.
slice
(
start
,
end
).
map
((
item
)
=>
item
.
id
))
// 递归保留命中的节点及其祖先节点
const
filterTree
=
(
nodes
:
InstitutionItem
[]):
InstitutionItem
[]
=>
{
return
nodes
.
map
((
node
)
=>
{
const
children
=
node
.
children
?
filterTree
(
node
.
children
)
:
[]
const
selfMatched
=
pagedIds
.
has
(
node
.
id
)
if
(
selfMatched
||
children
.
length
)
{
return
{
...
node
,
children
:
children
.
length
?
children
:
undefined
}
}
return
null
})
.
filter
(
Boolean
)
as
InstitutionItem
[]
}
return
filterTree
(
institutionTree
.
value
)
})
function
handleSizeChange
()
{
pagination
.
value
.
current
=
1
}
function
handleCurrentChange
()
{
// 页码变化后由 computed 自动处理
}
function
flattenInstitutions
(
list
:
InstitutionItem
[]):
InstitutionItem
[]
{
function
flattenInstitutions
(
list
:
InstitutionItem
[]):
InstitutionItem
[]
{
return
list
.
flatMap
((
item
)
=>
[
item
,
...(
item
.
children
?
flattenInstitutions
(
item
.
children
)
:
[])])
return
list
.
flatMap
((
item
)
=>
[
item
,
...(
item
.
children
?
flattenInstitutions
(
item
.
children
)
:
[])])
...
@@ -720,7 +669,6 @@ function handleReset() {
...
@@ -720,7 +669,6 @@ function handleReset() {
}
}
function
handleRefresh
()
{
function
handleRefresh
()
{
pagination
.
value
.
current
=
1
ElMessage
.
success
(
'机构列表已刷新'
)
ElMessage
.
success
(
'机构列表已刷新'
)
}
}
...
@@ -1002,11 +950,7 @@ function formatNow() {
...
@@ -1002,11 +950,7 @@ function formatNow() {
}
}
}
}
.pagination-wrapper
{
display
:
flex
;
justify-content
:
flex-end
;
margin-top
:
16px
;
}
.default-password-tip
{
.default-password-tip
{
display
:
flex
;
display
:
flex
;
...
...
src/views/workbench/order/index.vue
View file @
ac5e1408
...
@@ -280,7 +280,7 @@
...
@@ -280,7 +280,7 @@
// @ts-nocheck
// @ts-nocheck
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
import
ArtStatsCard
from
'@/components/core/cards/art-stats-card/index.vue'
import
ArtStatsCard
from
'@/components/core/cards/art-stats-card/index.vue'
import
ArtButtonTable
from
'@/components/core/
table
s/art-button-table/index.vue'
import
ArtButtonTable
from
'@/components/core/
form
s/art-button-table/index.vue'
defineOptions
({
name
:
'Order'
})
defineOptions
({
name
:
'Order'
})
...
...
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