日期:2014-05-16 浏览次数:20534 次
/*
* 操作面板
*/
SimpleTreePanel = Ext.extend(Ext.tree.TreePanel, {
//菜单
menu : null,
//构造方法
constructor : function() {
this.menu = new Ext.menu.Menu({
items : [{
text : "添加" ,
handler : this.onInsertNode,
scope : this
},{
text : "删除" ,
handler : this.onDeleteNode,
scope : this
},{
text : "修改",
handler : this.onUpdateNode,
scope : this
}]
});
SimpleTreePanel.superclass.constructor.call(this, {
// 渲染
renderTo : Ext.getBody(),
// 宽度
width : 200,
// 高度
height : 400,
// 树的加载器
//loader : new Ext.tree.TreeLoader(),
// 根节点
root : new Ext.tree.AsyncTreeNode({
text : "人力资源管理系统", //根节点名称
id:"1", //节点编号(如果是远程数据源,这个id将会被隐式提交,而在服务端获取该id参数不是id,是node)
children : [{ //根节点的子节点
text : "人力资源档案管理",
children : [{ //当前节点的子节点
text : "登记",
leaf : true //指定
},{
text : "复核和查询",
leaf : true
},{
text : "变更和永久删除",
leaf : true
},{
text : "删除和恢复",
leaf : true
}]
},{
text: "招聘管理",
children : [{
text : "职位发布管理",
leaf : true
},{
text : "简历管理",
leaf : true
},{
text : "招聘考试管理",
leaf : true
},{
text : "招聘考试题库管理",
leaf : true
},{
text : "录用管理",
leaf : true
}]
},{
text: "薪酬管理",
children : [{
text : "薪酬发放管