提交 eadde555 编写于 作者: tony001's avatar tony001

调整表格分组问题

上级 b1381d5a
......@@ -53,7 +53,7 @@ ${ctrl.render.code}
</template>
<#if ctrl.isEnableGroup()>
<template>
<el-table-column show-overflow-tooltip prop="group" label="分组" :min-width="80">
<el-table-column show-overflow-tooltip prop="group" :label="$t('app.gridpage.group')" :min-width="80">
<template v-slot="{row,column,$index}">
<span>{{ row.group }}</span>
</template>
......@@ -1331,7 +1331,7 @@ import { Environment } from '@/environments/environment';
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 && columnIndex >= (this.isSingleSelect ? 0:1)) {
return [1, allColumns.length];
return [1, allColumns.length+1];
}
}
......@@ -1351,6 +1351,9 @@ import { Environment } from '@/environments/environment';
});
let groupTree:Array<any> = [];
allGroup = [...new Set(allGroup)];
if(allGroup.length == 0){
console.warn("分组数据无效");
}
// 组装数据
allGroup.forEach((group: any, groupIndex: number)=>{
let children:Array<any> = [];
......@@ -1361,7 +1364,7 @@ import { Environment } from '@/environments/environment';
children.push(item);
}
});
group = group ? group : '其他';
group = group ? group : this.$t('app.gridpage.other');
const tree: any ={
groupById: Number((groupIndex+1)*10),
group: group,
......
......@@ -47,6 +47,8 @@ export default {
totle: "totle",
noData: "No data",
valueVail: "Value cannot be empty",
group:"Group",
other:"Other",
notConfig: {
fetchAction: "The view table fetchaction parameter is not configured",
removeAction: "The view table removeaction parameter is not configured",
......
......@@ -47,6 +47,8 @@ export default {
totle: "共",
noData: "无数据",
valueVail: "值不能为空",
group:"分组",
other:"其他",
notConfig: {
fetchAction: "视图表格fetchAction参数未配置",
removeAction: "视图表格removeAction参数未配置",
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册