Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cocktail-party-server
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
cocktail-party
cocktail-party-server
Commits
9ae5edaa
提交
9ae5edaa
authored
9月 04, 2021
作者:
RuoYi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
菜单&部门新增展开/折叠功能
上级
14c6c796
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
48 行增加
和
1 行删除
+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
没有找到文件。
ruoyi-ui/src/views/system/dept/index.vue
浏览文件 @
9ae5edaa
...
@@ -37,14 +37,24 @@
...
@@ -37,14 +37,24 @@
v-hasPermi=
"['system:dept:add']"
v-hasPermi=
"['system:dept:add']"
>
新增
</el-button>
>
新增
</el-button>
</el-col>
</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>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
<el-table
<el-table
v-if=
"refreshTable"
v-loading=
"loading"
v-loading=
"loading"
:data=
"deptList"
:data=
"deptList"
row-key=
"deptId"
row-key=
"deptId"
default-expand-all
:default-expand-all=
"isExpandAll"
:tree-props=
"
{children: 'children', hasChildren: 'hasChildren'}"
:tree-props=
"
{children: 'children', hasChildren: 'hasChildren'}"
>
>
<el-table-column
prop=
"deptName"
label=
"部门名称"
width=
"260"
></el-table-column>
<el-table-column
prop=
"deptName"
label=
"部门名称"
width=
"260"
></el-table-column>
...
@@ -164,6 +174,12 @@ export default {
...
@@ -164,6 +174,12 @@ export default {
title
:
""
,
title
:
""
,
// 是否显示弹出层
// 是否显示弹出层
open
:
false
,
open
:
false
,
// 是否展开,默认全部展开
isExpandAll
:
true
,
// 重新渲染表格状态
refreshTable
:
true
,
// 是否展开
expand
:
false
,
// 状态数据字典
// 状态数据字典
statusOptions
:
[],
statusOptions
:
[],
// 查询参数
// 查询参数
...
@@ -267,6 +283,14 @@ export default {
...
@@ -267,6 +283,14 @@ export default {
this
.
deptOptions
=
this
.
handleTree
(
response
.
data
,
"deptId"
);
this
.
deptOptions
=
this
.
handleTree
(
response
.
data
,
"deptId"
);
});
});
},
},
/** 展开/折叠操作 */
toggleExpandAll
()
{
this
.
refreshTable
=
false
;
this
.
isExpandAll
=
!
this
.
isExpandAll
;
this
.
$nextTick
(()
=>
{
this
.
refreshTable
=
true
;
});
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
reset
();
this
.
reset
();
...
...
ruoyi-ui/src/views/system/menu/index.vue
浏览文件 @
9ae5edaa
...
@@ -37,13 +37,24 @@
...
@@ -37,13 +37,24 @@
v-hasPermi=
"['system:menu:add']"
v-hasPermi=
"['system:menu:add']"
>
新增
</el-button>
>
新增
</el-button>
</el-col>
</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>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
</el-row>
<el-table
<el-table
v-if=
"refreshTable"
v-loading=
"loading"
v-loading=
"loading"
:data=
"menuList"
:data=
"menuList"
row-key=
"menuId"
row-key=
"menuId"
:default-expand-all=
"isExpandAll"
:tree-props=
"
{children: 'children', hasChildren: 'hasChildren'}"
:tree-props=
"
{children: 'children', hasChildren: 'hasChildren'}"
>
>
<el-table-column
prop=
"menuName"
label=
"菜单名称"
:show-overflow-tooltip=
"true"
width=
"160"
></el-table-column>
<el-table-column
prop=
"menuName"
label=
"菜单名称"
:show-overflow-tooltip=
"true"
width=
"160"
></el-table-column>
...
@@ -275,6 +286,10 @@ export default {
...
@@ -275,6 +286,10 @@ export default {
title
:
""
,
title
:
""
,
// 是否显示弹出层
// 是否显示弹出层
open
:
false
,
open
:
false
,
// 是否展开,默认全部折叠
isExpandAll
:
false
,
// 重新渲染表格状态
refreshTable
:
true
,
// 显示状态数据字典
// 显示状态数据字典
visibleOptions
:
[],
visibleOptions
:
[],
// 菜单状态数据字典
// 菜单状态数据字典
...
@@ -384,6 +399,14 @@ export default {
...
@@ -384,6 +399,14 @@ export default {
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"添加菜单"
;
this
.
title
=
"添加菜单"
;
},
},
/** 展开/折叠操作 */
toggleExpandAll
()
{
this
.
refreshTable
=
false
;
this
.
isExpandAll
=
!
this
.
isExpandAll
;
this
.
$nextTick
(()
=>
{
this
.
refreshTable
=
true
;
});
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
reset
();
this
.
reset
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论