Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
多鱼的夏天
RuoYi-Cloud-Docker
提交
d2de744c
R
RuoYi-Cloud-Docker
项目概览
多鱼的夏天
/
RuoYi-Cloud-Docker
通知
209
Star
7
Fork
6
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
RuoYi-Cloud-Docker
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d2de744c
编写于
9月 04, 2021
作者:
R
RuoYi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
菜单&部门新增展开/折叠功能
上级
655249d6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
49 addition
and
2 deletion
+49
-2
ruoyi-ui/src/views/system/dept/index.vue
ruoyi-ui/src/views/system/dept/index.vue
+26
-2
ruoyi-ui/src/views/system/menu/index.vue
ruoyi-ui/src/views/system/menu/index.vue
+23
-0
未找到文件。
ruoyi-ui/src/views/system/dept/index.vue
浏览文件 @
d2de744c
...
...
@@ -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
();
...
...
@@ -314,4 +338,4 @@ export default {
}
}
};
</
script
>
\ No newline at end of file
</
script
>
ruoyi-ui/src/views/system/menu/index.vue
浏览文件 @
d2de744c
...
...
@@ -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
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录