提交 d326d83a 编写于 作者: Shine-zwj's avatar Shine-zwj

表格分组--分组行

上级 065a8dce
......@@ -26,7 +26,7 @@ ${ctrl.render.code}
:cell-class-name="getCellClassName"
<#if ctrl.isEnableGroup()>
:span-method="arraySpanMethod"
:tree-props="{children: 'children', hasChildren: 'children.length>0'}"
:tree-props="{children: 'children', hasChildren: 'children?true:false'}"
row-key="groupById"
</#if>
<#if ctrl.isEnablePagingBar()>
......@@ -1421,7 +1421,7 @@ ${gridColumn.getName()}
*/
public arraySpanMethod({row, column, rowIndex, columnIndex} : any) {
let allColumns:Array<any> = [<#if ctrl.getPSDEGridColumns()??><#list ctrl.getPSDEGridColumns() as singleColumn>'${singleColumn.getCodeName()}'<#if singleColumn_has_next>,</#if></#list></#if>];
if(row && row.children && row.children.length>0) {
if(row && row.children) {
if(columnIndex == (this.isSingleSelect ? 0:1)) {
return [1, allColumns.length+1];
} else if(columnIndex > (this.isSingleSelect ? 0:1)) {
......@@ -1472,29 +1472,6 @@ ${gridColumn.getName()}
children.push(item);
}
});
if(children && children.length === 0){
children = [
{
groupById: Number((i+1)*100+(i+1) * 1),
group: '',
<#if ctrl.getPSDEGridColumns()??>
<#list ctrl.getPSDEGridColumns() as singleColumn>
<#if singleColumn.getColumnType()?? && singleColumn.getColumnType() == "UAGRIDCOLUMN">
<#if singleColumn.getPSDEUIActionGroup()?? && singleColumn.getPSDEUIActionGroup().getPSUIActions()??>
<#list singleColumn.getPSDEUIActionGroup().getPSUIActions() as singleUIAction>
${singleUIAction.getCodeName()}:{
visabled: false
},
</#list>
</#if>
<#else>
${singleColumn.getCodeName()}:'',
</#if>
</#list>
</#if>
}
]
}
const tree: any ={
groupById: Number((i+1)*100),
group: group.label,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册