权限树节点的定义
data:[{
id:"node1", //node id
text:"node 1", //node text for display.
value:"1", //node value
showcheck:false, //whether to show checkbox
checkstate:0, //Checkbox checking state. 0 for unchecked, 1 for partial checked, 2 for checked.
hasChildren:true, //If hasChildren and complete set to true, and ChildNodes is empty, tree will request server to get sub node.
isexpand:false, //Expand or collapse.
complete:false, //See hasChildren.
ChildNodes:[] // child nodes
}]
创建节点
function createNode(id,text) {
var node = {
"id": id,
"text": text,
"value": id,
"showcheck": true,
complete: true,
"isexpand": true,
"checkstate": 0,
"hasChildren": true
};
return node;
}
function createLeafNode(id,text) {
var leaf = {
"id": id,
"text": text,
"value": id,
"showcheck": true,
complete: true,
"isexpand": true,
"checkstate": 0,
"hasChildren": false
};
return leaf;
}
数据库的设计
权限表Mission
字段名称 数据类型 约束条件 说明
MenuId CHAR(20), 主键,NOT NULL 菜单ID
MenuTitle CHAR(20) NOT NULL 菜单标题