@model string

<div class="main">

    <table border=0 cellpadding=0 cellspacing=0 class="table table-bordered" id="tb_list">
        <thead>
            <tr>
                <td align="center" style="width:40px"><input type="checkbox" title="选择" class="ui-selectInvert" data-custom-params="isReverse:false"></td>
                <td align="left"><span>部门/</span><span class="ui-folder-switch">展开</span></td>
            </tr>
        </thead>
        <tr class="item list-template-item" id="item_{id}" data-parentId="{parentId}" data-isFinal="{isFinal}" data-level="{level}" data-id="{id}">
            <td align="center" style="width:40px"><input type="checkbox" value="{id}" class="ck checked-item ck_isfinal_{isFinal}"></td>
            <td align="left">{space}<span class="node node_{isFinal}"></span>{name}</td>
        </tr>
    </table>

    <div class="submit-footerbar">
        <label class="control-label"></label>
        <div class="controls">
            <button type="button" class="btn btn-primary btn-sm ui-closeDialog">确定</button>
            <button type="button" class="btn btn-sm btn-default ui-closeDialog">关闭</button>
        </div>
    </div>
</div>

<script type="text/javascript">
    var objName = Request("objname");
    function LoadedInit()
    {
        var defaultParams ={onlySelectFinal:false};
        var parentParams = parent.GetJqueryObj(objName).attr("data-custom-params");
        defaultParams = ExtendObject(defaultParams, parentParams);
        if (defaultParams.onlySelectFinal)
        {
          $(".ck_isfinal_0").attr("disabled", "disabled");
        }
        SetSelectedDisabled();
    }
    function LoadData() {
        var ajaxUrl = "@Url.ActionUrl("ListData")?_isload=1"
        $("#tb_list").TreeBind({url:ajaxUrl, callBack: "LoadedInit" });
    }
    LoadData();

</script>

<script src="/Js/selectData.js" type="text/javascript"></script>