Authored by 王涛

Merge branch 'master-500-dev-xwx' into 'master-500-dev'

报表管理sheet修改回调展示优化



See merge request !997
... ... @@ -549,12 +549,18 @@ layui.define(['table', 'form', 'laydate', 'laytpl', 'common', 'sessions', 'xmSel
sheetinfo.tableHead = tableHead;
sheetinfo.lastRowCell = lastRowCell;
sheetinfo.lockCols = lockCols;
let line = '';
let collist = [];
let $excelcol = $($head.find("input.col-excelname"))
let $querycol = $($body.find("select.col-queryname"))
$.each($excelcol, function (i, e) {
let colinfo = {};
colinfo.excelColName = e.value;
if(line.length>0){
line+=','+colinfo.excelColName;
}else {
line=colinfo.excelColName;
}
colinfo.queryColName = $querycol[i].value
if ($($excelcol[i]).hasClass("table-head-checked")) {
colinfo.autoFlag = '1'
... ... @@ -563,6 +569,7 @@ layui.define(['table', 'form', 'laydate', 'laytpl', 'common', 'sessions', 'xmSel
}
collist.push(colinfo)
})
sheetinfo.line = line;
sheetinfo.headInfo = JSON.stringify(collist);
var index = $.inArray(sheetName, sheetNameCollection);
if (index >= 0) {
... ... @@ -580,7 +587,17 @@ layui.define(['table', 'form', 'laydate', 'laytpl', 'common', 'sessions', 'xmSel
{type: 'checkbox', width: '3%'}
, {field: 'sheetName', title: 'sheet页名称', width: '20%'}
, {field: 'pollName', title: '数据源标识', width: '20%'}
, {field: 'headInfo', title: '列信息', width: '50%'}
, {field: 'headInfo', title: '列信息', width: '50%',
templet: function (d) {
if (d.line) {
var array = [];
$.each(d.line.split(','), function (i, v) {
array.push(`<span class="layui-badge layui-bg-blue" style="margin:2px">${v}</span>`);
});
return array.join("")
}
}
}
, {
title: '操作', width: '7%', align: 'center',
toolbar: '<div><span class="link" lay-event="sheetEdit">编辑</span></div>'
... ...