Song.Site/Manage/Sys/Scripts/Purview.js

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。


$(function () {
    var type = $().getPara("type");
    //载入树形菜单的数据
    $().SoapAjax("ManageMenu", "GetPurViewTree", { type: type }, funcc, loading, unloading);
});
//数据载入完成后的事件
//data:完整数据源,webservice输出
function funcc(data) {
    var area = $("#TreeAreaPanel");
    var html = data.find("string").text();
    area.html(html);
    initLoadSuccess();
}
//初始载入成功
function initLoadSuccess() {
    //树形总区域
    var area = $("#TreeAreaPanel");
    var h = document.documentElement.clientHeight;
    area.height(h - $("#contTop").height() - $(".pageWinBtn").height() - 50);
    var w = document.documentElement.clientWidth;
    //单个树形区域
    var treebox = $(".TreeBox");
    treebox.width(w / treebox.size() * .86);
    treebox.height(area.height() * .95);
    //界面初始化
    initloyout();
    //获取已经拥有的权限
    var id = $().getPara("id");
    var type = $().getPara("type");
    $().SoapAjax("Purview", "GetPurView", { memberId: id, type: type }, setPur, null, unloading);
}
//页面初始化布局
function initloyout() {
    var type = $().getPara("type");
    var typename = $("#typeName");
    if (type == "posi") typename.text("角色");
    if (type == "group") typename.text("工作组");
    if (type == "organ") typename.text("机构");
    //保存按钮
    $("input[name$='btnEnter']").click(function () {
        //提交编辑数据
        var state = getTreeState();
        state = encodeURIComponent(state);
        $().SoapAjax("Purview", "AcceptPurView", { xml: state },
                function () {
                    alert("保存权限成功!");
                },
                loading, unloading);
        return false;
    });

}
//设置权限
function setPur(data) {
    var pur = data.find("Purview");
    pur.each(function () {
        var mmid = $(this).find("MM_Id").text();
        var state = $(this).find("Pur_State").text();
        var node = $("div[type='select'][nodeId='" + mmid + "']");
后面还有 32 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。