关注JEECG发展历程 关注最新动态和版本, 记录JEECG成长点滴 更新日志 - 技术支持 - 招聘英才

JEECG最新版本下载 JEECG智能开发平台 - 显著提高开发效率 常见问题 - 入门视频 - 参与开源团队

商务QQ: 69893005、3102411850 商务热线(5*8小时): 010-64808099 官方邮箱: jeecgos@163.com

查看: 7018|回复: 1

如何在List界面添加N多标题,点击跳转或者查询当前页面

[复制链接]
发表于 2013-11-26 12:22:39 | 显示全部楼层 |阅读模式
本帖最后由 wangyucan1321 于 2013-11-26 12:23 编辑


1、就是上面红的框框,我想加一些标题,点击的时候对当前页面的grid进行加载,字段可能不一样,也就是跳转到其他页面。
2、点击上面的红色框框,字段是一样的,也就是对当前页面的查询?
这个功能能不能做?我现在不会的是如何加框框,其他都好弄。3.3.2

 楼主| 发表于 2013-11-28 15:22:06 | 显示全部楼层
这个东西偶弄出来了.
1、首先在List界面加这些
<t:datagrid name="projectInfoList" title= '项目信息管理&nbsp; &nbsp;&nbsp; &nbsp;
<a  id="state" style="cursor:pointer;" onclick="returnBase(0)" >新开</a> &nbsp; &nbsp;&nbsp;
<a  style="cursor:pointer;" onclick="returnBase(1)">开工</a>  &nbsp; &nbsp;&nbsp;
<a  style="cursor:pointer;" onclick="returnBase(2)">在建</a>  &nbsp; &nbsp;&nbsp;
<a  style="cursor:pointer;" onclick="returnBase(3)">竣工</a> &nbsp; &nbsp;&nbsp;
<a  style="cursor:pointer;" onclick="returnBase(4)">投产</a>                                                                                      actionUrl="projectInfoController.do?datagrid" idField="id" fit="true" checkbox="true">
2、然后写一个
function returnBase(id){
$('#projectInfoList').datagrid({
                url:'projectInfoController.do?datagrid&auditState='+id,
                pageNumber:1,       
        });
}
3、controller:
        private DataGrid dataGrid1;
@RequestMapping(params = "datagrid")
        public void datagrid(ProjectInfoEntity projectInfo,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
                //新的dataGrid1赋值
                if(dataGrid.getField() != null && !"".equals(dataGrid.getField())){
                        dataGrid1 = dataGrid;
                }else{
                        dataGrid = dataGrid1;
                }               
               
CriteriaQuery cq = new CriteriaQuery(ProjectInfoEntity.class, dataGrid);
//查询条件组装器
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, projectInfo,      request.getParameterMap());
this.projectInfoService.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid);
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表