Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
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
liyang
sts网站
Commits
9ae5edaa
Commit
9ae5edaa
authored
Sep 04, 2021
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜单&部门新增展开/折叠功能
parent
14c6c796
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
1 deletion
+48
-1
index.vue
ruoyi-ui/src/views/system/dept/index.vue
+25
-1
index.vue
ruoyi-ui/src/views/system/menu/index.vue
+23
-0
No files found.
ruoyi-ui/src/views/system/dept/index.vue
View file @
9ae5edaa
...
...
@@ -37,14 +37,24 @@
v-hasPermi=
"['system:dept:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
icon=
"el-icon-sort"
size=
"mini"
@
click=
"toggleExpandAll"
>
展开/折叠
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-if=
"refreshTable"
v-loading=
"loading"
:data=
"deptList"
row-key=
"deptId"
default-expand-all
:default-expand-all=
"isExpandAll"
:tree-props=
"
{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column
prop=
"deptName"
label=
"部门名称"
width=
"260"
></el-table-column>
...
...
@@ -164,6 +174,12 @@ export default {
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 是否展开,默认全部展开
isExpandAll
:
true
,
// 重新渲染表格状态
refreshTable
:
true
,
// 是否展开
expand
:
false
,
// 状态数据字典
statusOptions
:
[],
// 查询参数
...
...
@@ -267,6 +283,14 @@ export default {
this
.
deptOptions
=
this
.
handleTree
(
response
.
data
,
"deptId"
);
});
},
/** 展开/折叠操作 */
toggleExpandAll
()
{
this
.
refreshTable
=
false
;
this
.
isExpandAll
=
!
this
.
isExpandAll
;
this
.
$nextTick
(()
=>
{
this
.
refreshTable
=
true
;
});
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
...
...
ruoyi-ui/src/views/system/menu/index.vue
View file @
9ae5edaa
...
...
@@ -37,13 +37,24 @@
v-hasPermi=
"['system:menu:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
icon=
"el-icon-sort"
size=
"mini"
@
click=
"toggleExpandAll"
>
展开/折叠
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-if=
"refreshTable"
v-loading=
"loading"
:data=
"menuList"
row-key=
"menuId"
:default-expand-all=
"isExpandAll"
:tree-props=
"
{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column
prop=
"menuName"
label=
"菜单名称"
:show-overflow-tooltip=
"true"
width=
"160"
></el-table-column>
...
...
@@ -275,6 +286,10 @@ export default {
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 是否展开,默认全部折叠
isExpandAll
:
false
,
// 重新渲染表格状态
refreshTable
:
true
,
// 显示状态数据字典
visibleOptions
:
[],
// 菜单状态数据字典
...
...
@@ -384,6 +399,14 @@ export default {
this
.
open
=
true
;
this
.
title
=
"添加菜单"
;
},
/** 展开/折叠操作 */
toggleExpandAll
()
{
this
.
refreshTable
=
false
;
this
.
isExpandAll
=
!
this
.
isExpandAll
;
this
.
$nextTick
(()
=>
{
this
.
refreshTable
=
true
;
});
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
...
...
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