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
d9108881
提交
d9108881
authored
4月 07, 2022
作者:
RuoYi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码生成树表新增(展开/折叠)
上级
db2dfee6
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
44 行增加
和
2 行删除
+44
-2
index-tree.vue.vm
ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
+23
-1
index-tree.vue.vm
...-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm
+21
-1
没有找到文件。
ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
浏览文件 @
d9108881
...
...
@@ -78,14 +78,24 @@
v-hasPermi="['${moduleName}:${businessName}: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="${businessName}List"
row-key="${treeCode}"
default-expand-all
:default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
#foreach($column in $columns)
...
...
@@ -293,6 +303,10 @@ export default {
title: "",
// 是否显示弹出层
open: false,
// 是否展开,默认全部展开
isExpandAll: true,
// 重新渲染表格状态
refreshTable: true,
#foreach ($column in $columns)
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
...
...
@@ -423,6 +437,14 @@ export default {
this.open = true;
this.title = "添加${functionName}";
},
/** 展开/折叠操作 */
toggleExpandAll() {
this.refreshTable = false;
this.isExpandAll = !this.isExpandAll;
this.$nextTick(() => {
this.refreshTable = true;
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
...
...
ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm
浏览文件 @
d9108881
...
...
@@ -76,14 +76,23 @@
v-hasPermi=
"['${moduleName}:${businessName}:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
icon=
"Sort"
@
click=
"toggleExpandAll"
>
展开/折叠
</el-button>
</el-col>
<right-toolbar
v-model:showSearch=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-if=
"refreshTable"
v-loading=
"loading"
:data=
"${businessName}List"
row-key=
"${treeCode}"
default-expand-all
:default-expand-all=
"isExpandAll"
:tree-props=
"{children: 'children', hasChildren: 'hasChildren'}"
>
#foreach($column in $columns)
...
...
@@ -283,6 +292,8 @@ const open = ref(false);
const
loading
=
ref
(
true
);
const
showSearch
=
ref
(
true
);
const
title
=
ref
(
""
);
const
isExpandAll
=
ref
(
true
);
const
refreshTable
=
ref
(
true
);
#
foreach
(
$column
in
$columns
)
#
if
(
$column
.
htmlType
==
"datetime"
&&
$column
.
queryType
==
"BETWEEN"
)
#
set
(
$AttrName
=
$column
.
javaField
.
substring
(
0
,
1
).
toUpperCase
()
+
$
{
column
.
javaField
.
substring
(
1
)})
...
...
@@ -405,6 +416,15 @@ async function handleAdd(row) {
title
.
value
=
"添加${functionName}"
;
}
/** 展开/折叠操作 */
function
toggleExpandAll
()
{
refreshTable
.
value
=
false
;
isExpandAll
.
value
=
!
isExpandAll
.
value
;
nextTick
(()
=>
{
refreshTable
.
value
=
true
;
});
}
/** 修改按钮操作 */
async
function
handleUpdate
(
row
)
{
reset
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论