Merge branch 'master-500-dev-xwx' into 'master-500-dev'
报表管理sheet修改回调展示优化 See merge request !997
Showing
1 changed file
with
18 additions
and
1 deletions
@@ -549,12 +549,18 @@ layui.define(['table', 'form', 'laydate', 'laytpl', 'common', 'sessions', 'xmSel | @@ -549,12 +549,18 @@ layui.define(['table', 'form', 'laydate', 'laytpl', 'common', 'sessions', 'xmSel | ||
549 | sheetinfo.tableHead = tableHead; | 549 | sheetinfo.tableHead = tableHead; |
550 | sheetinfo.lastRowCell = lastRowCell; | 550 | sheetinfo.lastRowCell = lastRowCell; |
551 | sheetinfo.lockCols = lockCols; | 551 | sheetinfo.lockCols = lockCols; |
552 | + let line = ''; | ||
552 | let collist = []; | 553 | let collist = []; |
553 | let $excelcol = $($head.find("input.col-excelname")) | 554 | let $excelcol = $($head.find("input.col-excelname")) |
554 | let $querycol = $($body.find("select.col-queryname")) | 555 | let $querycol = $($body.find("select.col-queryname")) |
555 | $.each($excelcol, function (i, e) { | 556 | $.each($excelcol, function (i, e) { |
556 | let colinfo = {}; | 557 | let colinfo = {}; |
557 | colinfo.excelColName = e.value; | 558 | colinfo.excelColName = e.value; |
559 | + if(line.length>0){ | ||
560 | + line+=','+colinfo.excelColName; | ||
561 | + }else { | ||
562 | + line=colinfo.excelColName; | ||
563 | + } | ||
558 | colinfo.queryColName = $querycol[i].value | 564 | colinfo.queryColName = $querycol[i].value |
559 | if ($($excelcol[i]).hasClass("table-head-checked")) { | 565 | if ($($excelcol[i]).hasClass("table-head-checked")) { |
560 | colinfo.autoFlag = '1' | 566 | colinfo.autoFlag = '1' |
@@ -563,6 +569,7 @@ layui.define(['table', 'form', 'laydate', 'laytpl', 'common', 'sessions', 'xmSel | @@ -563,6 +569,7 @@ layui.define(['table', 'form', 'laydate', 'laytpl', 'common', 'sessions', 'xmSel | ||
563 | } | 569 | } |
564 | collist.push(colinfo) | 570 | collist.push(colinfo) |
565 | }) | 571 | }) |
572 | + sheetinfo.line = line; | ||
566 | sheetinfo.headInfo = JSON.stringify(collist); | 573 | sheetinfo.headInfo = JSON.stringify(collist); |
567 | var index = $.inArray(sheetName, sheetNameCollection); | 574 | var index = $.inArray(sheetName, sheetNameCollection); |
568 | if (index >= 0) { | 575 | if (index >= 0) { |
@@ -580,7 +587,17 @@ layui.define(['table', 'form', 'laydate', 'laytpl', 'common', 'sessions', 'xmSel | @@ -580,7 +587,17 @@ layui.define(['table', 'form', 'laydate', 'laytpl', 'common', 'sessions', 'xmSel | ||
580 | {type: 'checkbox', width: '3%'} | 587 | {type: 'checkbox', width: '3%'} |
581 | , {field: 'sheetName', title: 'sheet页名称', width: '20%'} | 588 | , {field: 'sheetName', title: 'sheet页名称', width: '20%'} |
582 | , {field: 'pollName', title: '数据源标识', width: '20%'} | 589 | , {field: 'pollName', title: '数据源标识', width: '20%'} |
583 | - , {field: 'headInfo', title: '列信息', width: '50%'} | 590 | + , {field: 'headInfo', title: '列信息', width: '50%', |
591 | + templet: function (d) { | ||
592 | + if (d.line) { | ||
593 | + var array = []; | ||
594 | + $.each(d.line.split(','), function (i, v) { | ||
595 | + array.push(`<span class="layui-badge layui-bg-blue" style="margin:2px">${v}</span>`); | ||
596 | + }); | ||
597 | + return array.join("") | ||
598 | + } | ||
599 | + } | ||
600 | + } | ||
584 | , { | 601 | , { |
585 | title: '操作', width: '7%', align: 'center', | 602 | title: '操作', width: '7%', align: 'center', |
586 | toolbar: '<div><span class="link" lay-event="sheetEdit">编辑</span></div>' | 603 | toolbar: '<div><span class="link" lay-event="sheetEdit">编辑</span></div>' |
-
Please register or login to post a comment