easyui插件用法

$('#cata_tree').tree({
        url: "/" + domainUniqueName + "/basic/Resource/GetCatalogRoot",
        onClick: function (node) {

            clicknode(node);
        },
        onLoadSuccess: function (node, data) {
            // window.console.log("load success")
            // $("#unitPId").combotree('loadData',$('#tt').tree('getRoots')) ;

        },
        onBeforeExpand: function (node) {

            var children = $('#cata_tree').tree('getChildren', node.target);

            if (children[0].id == -1) {

                $('#cata_tree').tree('remove', children[0].target);

                $.ajax({
                    type: "post",
                    async: false,
                    url: "/" + domainUniqueName + "/basic/Resource/GetCatalogChildren",
                    data: { parentGuid: node.id, level: 1 },
                    success: function (data) {

                        $('#cata_tree').tree('append', {
                            parent: (node ? node.target : null),
                            data: data
                        });

                    }
                });


            }

        }

    });


$('#cata_p_guid').combotree({
        url: "/" + domainUniqueName + "/basic/Resource/GetCatalogRoot",
        width: 154,
        onClick: function (node) {
            parentNode = node;


        },
        onLoadSuccess: function () {
            var tr = $('#cata_p_guid').combotree('tree');
            var node = tr.tree("getRoot");

            if (node) {
                $('#cata_p_guid').combotree('setValue', node.id);

            }

        },
        onBeforeExpand: function (node) {

            var tr = $('#cata_p_guid').combotree('tree');
            var children = tr.tree('getChildren', node.target);

            if (children[0].id == -1) {
                tr.tree('remove', children[0].target);
                $.ajax({
                    type: "post",
                    async: false,
                    url: "/" + domainUniqueName + "/basic/Resource/GetCatalogChildren",
                    data: { parentGuid: node.id, level: 1 },
                    success: function (data) {

                        tr.tree('append', {
                            parent: (node ? node.target : null),
                            data: data
                        });

                    }
                });
            }
        }
    });

$('#noblind_resource').datagrid({
        title: '未分配的资源',
        iconCls: 'icon-save',
        height: 360, width: 709,
        rownumbers: true,
        striped: true,
        idField: 'Guid',
        url: "/" + domainUniqueName + "/basic/Resource/GetUnbindResources",
        queryParams: params,
        columns: [[
                 { field: 'ck', checkbox: true },
                { field: 'Title', title: '标题', width: 100, formatter: unbindLink },
                { field: 'Teacher', title: '主讲人', width: 60 },
                { field: 'FromDomainName', title: '来源', width: 80 },
                { field: 'SubjectName', title: '学科', width: 50 },
                { field: 'GradeName', title: '年级', width: 80 },
                { field: 'TypeCode', title: '类型', width: 60, formatter: resType },
                { field: 'Description', title: '描述', width: 80 }



                ]],
        pagination: true,
        onLoadSuccess: function () {



        },
        loadFilter: function (data) {
            if (data.Success) {



                return data.Data;



            } else {
                alert(data.Message);
            }
        }
    });

var flag = false;
        var resGuids = "";

        for (var i = 0; i < rows.length; i++) {
            if (flag) {
                resGuids += ',';

            }

            resGuids += rows[i].Guid;

            flag = true;
        }
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值