1、easyUI 的tree 修改节点:
我需要:切换语言状态,英文下, 修改根节点文本,显示英文。
操作位置:在tree的显示 $('#tree').tree(),onLoadSuccess事件方法中,参数:node,data(详见easyUI文档)
代码:                 var t = $(this);                 
                    if (data) {
                        var troot = t.tree("getRoot");
                        if (troot) {
                            troot.text = 'MechinalCategory';
                            t.tree("update", troot);
 
                        };}
与easyui 介绍的update方法有些不同,
easyui,文档update方法是这样介绍的
 
更新指定的节点,'param' 参数有下列属性:
target(DOM 对象,要被更新的节点)、id、text、iconCls、checked,等等。
 
代码实例:
// update the selected node text
var node = $('#tt').tree('getSelected');
if (node){
    $('#tt').tree('update', {
        target: node.target,
        text: 'new text'
    });
}
不过我在用时,总是报错typeError:无法获取指定的属性什么check之类的。
我当时是这么用的
             var troot = t.tree("getRoot");
                        if (troot) {
                            troot.text = 'MechinalCategory';
                            t.tree("update", {target:troot,text:'MechinalCategory'});
                            }
我也不是很清楚这是什么原因造成的,如果你知道,请一定要告诉我,谢谢!
2、查找所有子节点
with tab as
(
 select IsId,ParentId,CategoryName from tb_MechanicalEquipmentCategory where IsId=116--父节点
 union all
 select b.IsId,b.ParentId,b.CategoryName 
 from
  tab a,--父节点数据集
  tb_MechanicalEquipmentCategory b--子节点数据集 
 where b.ParentId= a.IsId --子节点数据集.ID=父节点数据集.parendID
 )
select * from tab
 
3、查找所有父节点
with tab as
(
 select Type_Id,ParentId,Type_Name from Sys_ParamType_V2_0 where Type_Id=316--子节点
 union all
 select b.Type_Id,b.ParentId,b.Type_Name 
 from
  tab a,--子节点数据集
  Sys_ParamType_V2_0 b  --父节点数据集
 where a.ParentId=b.Type_Id  --子节点数据集.parendID=父节点数据集.ID
)
select * from tab;
4、比较复杂的sql查询,主要是将查找所有子节点的数据,再分页。三部分之一:
with tab as (select IsId,ParentId,CategoryName from tb_MechanicalEquipmentCategory where IsId=4 union all select b.IsId,b.ParentId,b.CategoryName from tab a, tb_MechanicalEquipmentCategory b where b.ParentId= a.IsId) 
三部分之二:
 ,m as(select row_number() over(order by Guid  asc) rowid,* from VW_MechanicalEquipment where 1=1 and VW_MechanicalEquipment.CategoryId in(select isid from tab) )
最后
select * from m where rowid  between (1-1)*10+1 and 10*1
 

easyUI 的tree 修改节点,sql递归查询的更多相关文章

  1. EasyUI Tree判断节点是否是叶

    方法1:  $('#domaincatalog').tree('isLeaf', node.target); 返回true或false ,true表示是叶节点, false即不是 方法2:官方文档中: ...

  2. 如何让EasyUI的Tree或者ComboTree节点不显示图标?

    版本:jQuery EasyUI 1.3.2 通过测试,只需把节点的state属性设置为null即可使EasyUI的Tree或者ComboTree控件的节点不显示图标.

  3. easyui的tree节点的获取和选中

    1.设置选中tree的节点 var node = $('#tt').tree('find', 1);//找到id为”tt“这个树的节点id为”1“的对象$('#tt').tree('select', ...

  4. EasyUI Editable Tree

    效果如图: Create Tree <ul id="tt"></ul> $('#tt').etree({ url: 'tree_data.json', cr ...

  5. 第二百二十六节,jQuery EasyUI,Tree(树)组件

    jQuery EasyUI,Tree(树)组件 本节课重点了解 EasyUI 中 Tree(树)组件的使用方法,这个组件依赖于 Draggable(拖 动)和 Droppable(放置)组件. 一.加 ...

  6. 做权限树时 使用EasyUI中Tree

    符合EasyUI中Tree的Json格式,我们先看一下,格式是如何的 [{ "id":1, "text":"My Documents", & ...

  7. 【转】sql递归查询问题

    原文链接地址http://www.cnblogs.com/sweting/archive/2009/06/08/1498483.html 在工作中遇到一个问题,是需要sql递归查询的.不懂,于是到cs ...

  8. easyUI的tree

    前端使用easyUI,放了一个tree,搞死了. easyUI的tree,后端传过来的数据,是json格式:然后easyUI向后端提交.请求时,会自动将节点的id附在url后面. 主要有两个注意的地方 ...

  9. 使用EasyUI中Tree

    easyui里面的加载tree的两种方式 第一种: 使用EasyUI中Tree 符合EasyUI中Tree的Json格式,我们先看一下,格式是如何的 [{ , "text":&qu ...

随机推荐

  1. servlet的session为null?

    servlet的session(会话)显示为null,一般是web.xml中配置不对或者在浏览器输入的url不正确造成的. web.xml配置如下: <servlet> <servl ...

  2. TextView.setTextColor颜色值的理解

    TextView.setTextColor(int value),括号里是int型的值,可以填充的值有三种情况. 第一种:系统自带的颜色类,TextView.setTextColor(android. ...

  3. 初学git(一):创建本地“仓库”

    初学git(一):创建本地“仓库” 作为一个初学者,我是跟着廖学峰老师的官方博客学习,这里只是做个笔记,哈哈,关于git的历史.和其他版本控制的对比啥的,我就不说了.另外,我这里用的是Mac OS X ...

  4. 小心Java中封装类的值比较

    一般我们使用数值时,都是使用基本类型,如int.long等,但如果你喜欢使用Integer.Long的包装类,那有一点可就得注意了.先来看下这段代码: /** * * @author trytocat ...

  5. ExtJs知识点概述

    1.前言 ExtJS的前身是YUI(Yahoo User Interface).经过不断的发展与改进,ExtJS现在已经成功发布到了ExtJS 6版本,是一套目前最完整和最成熟的javascript基 ...

  6. UINavigationController push时,页面卡顿

    1.A push B A.view.backgroundColor 与 B.view.backgroundColor 不一致. 2. AssistiveTouch打开 关闭则不会出现卡顿情况 3.增加 ...

  7. 推荐一个winform 界面交互类库转

    // Copyright (c) 2008 CodeToast.com and Nicholas Brookins //This code is free to use in any applicat ...

  8. 我利用网上代码开发的JQuery图片插件

    我利用网上代码开发的JQuery图片插件 代码如下 (function($){ $.fn.FocusPic = function(options){ var defaults = { interval ...

  9. nginx编译模块详解

    –prefix= 指向安装目录–sbin-path 指向(执行)程序文件(nginx)–conf-path= 指向配置文件(nginx.conf)–error-log-path= 指向错误日志目录–p ...

  10. tkinter 在 x window 下的字体设置格式

    X Font Descriptors # X Font Descriptors are strings having the following format (the asterisks repre ...