getCountNum(text, row, index, key) { var data = JSON.parse(JSON.stringify(this.dataSource)) var colNum = 0 var now = row[key] if (index != 0) { var last = data[index - 1][key] if (now == last) { colNum = 0 } else { data.splice(0, index) try{ data.forEach(function(e) { if (e[key] == now) { colNum = colNum + 1 } if (e[key] != now) { throw new Error("不等于") } }) } catch(e) { } } } else { try{ data.forEach(function(e) { if (e[key] == now) { colNum = colNum + 1 } if (e[key] != now) { throw new Error("不等于") } }) } catch(e) { } } return colNum; }
- THE END -
最后修改:2022年6月24日