$("#addNode").click(function () {
    layer.open({
        type: 2,
        title: '新增配置项',
        shadeClose: true,
        resize: false,
        shade: 0.3,
        area: ['430px', '350px'],
        maxmin: false,
        content: 'addareanode',
        scrollbar: false
    });
});

$(document).ready(function () {
    var index = 0;
    getTree();
    queryInfo(index);
})

function updateRpData(index) {
    layer.open({
        type: 2,
        title: '修改配置项信息',
        shadeClose: true,
        resize: false,
        area: ['380px', '300px'],
        offset: '0px',
        maxmin: false,
        content: 'modrpdata?rdIndex=' + index,
        scrollbar: false
    });
}

function deleteRpData(index) {
    layer.confirm('是否确认？', function () {
        $.ajax({
            method: "post",
            url: "/pqs9900/report/delRdInfo",
            data: {
                rdIndex: index
            },
            async: false,
            success: function (data) {
                if (data.code == 200) {
                    layer.msg('删除成功!', {icon: 1, time: 1000});
                    var tmp = 0;
                    getTree();
                    queryInfo(tmp);
                } else {
                    layer.msg('删除失败！', {icon: 2, time: 1000});
                }
            }
        })
    })
}