guns 框架中 表格导出

1,一个按钮

<#button name="工单导出" icon="fa-check-circle"  space="true" id = "export"/>

2.需要导出的表格

<#table id="LogDistributionTaskTable"/>   

3.给按钮添加点击事件

    $("#export").click(function() {
        $("#ReceivingTaskTable").tableExport({//表ID
            exclude : ".noExl",
            name : "receivingTask",
            fileName : "工单接收日志数据",
            type : "excel",
            escape : "false"
        });
    });

4.添加JS文件

<script src="${ctxPath}/static/js/tableExport/tableExport.js"></script>

猜你喜欢

转载自blog.csdn.net/qq_35394891/article/details/82346958