easyUI的treegrid列表添加查询
一些数据使用treegrid显示,添加筛选条件,
首先创建treegrid列表
var tree = $("#TreeGrid").treegrid({ url:"chargeTree.action?dt="+(new Date()).getTime(), method:'post', idField:'id', //定义关键字段来标识树节点,与数据库中id对应,后台可以访问到id treeField:'itemname', fit:true, fitColumns:true, collapsible: true, rowNumbers:false, striped:false,//隔行变色 onClickRow:function(node){ // 单击行事件 }, columns:[[ {title:'项目id',field:'id',width:200,hidden:true}, {title:'项目名称',field:'itemname',width:200}, {title:'项目编号',field:'standardcord',width:120}, {title:'项目内涵',field:'itemcontent',width:180,align:'center'}, {title:'除外内容',field:'addcontent',width:200,align:'center'}, {title:'单位',field:'priceunit',width:80,align:'center'}, {title:'价格)',field:'price',width:130,align:'center'}, {title:'说明',field:'itemexplain',width:200,align:'center'}, {title:'机构id',field:'pid',width:0,align:'center',hidden:true} ]], });
添加传参属性:queryParams
queryParams:{ // 参数名:传值 itemName:$scope.itemName, provinceid:$scope.provinceID },
记,前端成长路上的一事。