zoukankan      html  css  js  c++  java
  • 导出模块化使用手册

    一、后台方法

    1.复制ExportController至项目内作为通用导出控制

    @RequestParam(value = "exportid") String exportid,//配置文件中定义的调用参数的key前缀
    @RequestParam(value = "exportheaders") String headers,
    @RequestParam(value = "exportfilename") String filename,
    @RequestParam(value = "exporttype") String type

    以上4个参数为必要元素

    2.定义CommonResourse.properties中导出所指向的取数类及方法

    ####
    001.class=com.intime.model.workflow.impl.ExportServiceImpl
    001.method=queryGroupTypeList

    二、前端调用方法

    1.调用common.export.jsp

    <script src="lib/js/common.export.js?t=<%=versioncode %>" type="text/javascript"></script>

    2.页面定义按钮

    <div class="searchbutton">
          <input type="button" id="search" value="查询" />
          <input type="reset" value="重置"/>
          <input type="button" id="export" value="导出" />
    </div>

    红色为示例按钮

    3.js中定义导出

    $.common.export({
        expid:"001",
        btn:"#export",
        type:"xls",
        firstrow:null,
        lastrow:null,
        action:"<%=basePath%>export.htm",
        form:"#searchform",
        grid:"#gridcontent",
        filename:"测试"
    })

    参数解释如下:

    common.export
    expid 后端配置文件中的对应的导出编号,前端与后端需约定好
    btn  页面中定义的导出按钮的id,使用#
     type  导出类型,现只支持xls
     firstrow  默认无
     lastrow  最后一行,可自定义内容,字段需和jqgrid匹配(默认无)
     action  导出后台url
     form

     指向的查询formID,使用#

     grid  指向的jqgrid的ID,使用#
     filename  导出的命名
       
  • 相关阅读:
    Extending Markov to Hidden Markov
    Logistic Regression – Geometric Intuition
    【计算机视觉】会议投稿相关推荐
    NP难问题求解综述
    PCA的数学原理
    Brief History of Machine Learning
    图像局部特征点检测算法综述【修正排版】
    thinkphp输出表格
    1503162139-ny-分数拆分
    C++中经常使用到宏
  • 原文地址:https://www.cnblogs.com/inncho/p/5240976.html
Copyright © 2011-2022 走看看