This commit is contained in:
parent
1cee686c16
commit
ae68501483
|
|
@ -164,14 +164,21 @@
|
|||
var columsIndex = [1];//需要合并的列索引值 [2,3,5,6,14,15];
|
||||
merge(res, columsName, columsIndex);
|
||||
tableLoading && layer.close(tableLoading);
|
||||
cols.each(function (index, item) {
|
||||
if (index > 2 && index != cols.length - 1) {
|
||||
let dataId = $(this).data('field')
|
||||
if (item1[`${dataId}-file`] && item1[`${dataId}-file`]['fileName'] != '') {
|
||||
$(this).find('.layui-table-cell').append(`<i class="layui-icon layui-icon-file-b file-icon" data-index="${i}" data-id="${dataId}" style="margin-left:6px;cursor:pointer"></i> `)
|
||||
|
||||
var tableView = this.elem.next();
|
||||
|
||||
layui.each(res.data, function (i, item1) {
|
||||
var cols = tableView.find('tr[data-index=' + i + ']').find('td');
|
||||
cols.each(function (index, item) {
|
||||
if (index > 2 && index != cols.length - 1) {
|
||||
let dataId = $(this).data('field')
|
||||
if (item1[`${dataId}-file`] && item1[`${dataId}-file`]['fileName'] != '') {
|
||||
$(this).find('.layui-table-cell').append(`<i class="layui-icon layui-icon-file-b file-icon" data-index="${i}" data-id="${dataId}" style="margin-left:6px;cursor:pointer"></i> `)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
table.on('tool(test)', function (obj) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue