|
楼主 |
发表于 2020-2-25 15:56:57
|
显示全部楼层
已搞定,关键代码如下:
- Model.prototype.gridMainReload = function(event) {
- //return;
- var grid = event.source;
- var fExceutorPsnId = null, rowSpanId = null, rowSpanNum = 1;
- this.comp("dataMain").each(function(option) {
- var row = option.row;
- if (fExceutorPsnId === row.val("fExceutorPsnId")) {
- rowSpanNum++;
- $(grid.getCell(row.getID(), 'fExceutorPsnId')).hide();
- } else {
- if (rowSpanId && rowSpanNum > 1) {
- $(grid.getCell(rowSpanId, 'fExceutorPsnId')).attr('rowspan', rowSpanNum);
- }
- fExceutorPsnId = row.val("fExceutorPsnId");
- rowSpanId = row.getID();
- rowSpanNum = 1;
- }
- });
- if (rowSpanId && rowSpanNum > 1) {
- $(grid.getCell(rowSpanId, 'fExceutorPsnId')).attr('rowspan', rowSpanNum);
- }
- };
复制代码 结贴。
|
|