示例#1
0
        eles.click(function () {
            var target = $(this), i = target.attr('stype');

            eles.removeClass('current');
            target.addClass('current');

            box.html(tpl.loading);

            if (i == 2) {
                $('#office_user').show();
                var arg = {creater_id: creater_id};
            } else {
                $('#office_user').hide();
                var arg = 'del creater_id';
            }

            getHTML(arg, function (data) {
                if (data.html[i]) {
                    box.html(data.html[i]);
                } else {
                    box.html(tpl.nodata);
                }
                index = i;
            });
        });
示例#2
0
        office_process_drop.delegate('li', 'click', function () {
            var target = $(this),
                data = target.find('a').attr('node_data'),
                box = $('#show_office_list');

            box.html(tpl.loading);
            $('#office_process').html(target.html());
            typeClassify.find('span').eq(1).removeClass('ico-angle-up').addClass('ico-angle-down');

            getHTML(queryToJson(data), function (data) {
                if (data.html[index]) {
                    box.html(data.html[index]);
                } else {
                    box.html(tpl.nodata);
                }
            }, '', function (args) {
                $('#export').attr('href','/index.php?mod=shenpi&op=index&act=application_indexOutput&' + jsonToQuery(args));
            });
        });
示例#3
0
    //初始换页面内容
    function createHTML() {
        getHTML({}, function (data) {
            var html = data.html, count = data.length;

            //渲染待我审批的数据
            if (html[0]) {
                var approve_need_me = $('#approve_need_me');
                approve_need_me.find('[node_type="count"]').html(count[0]);
                approve_need_me.find('[node_type="list"]').html(html[0]);
                approve_need_me.show();
            }

            if (html[1]) {
                $('#show_office_list').html(html[1]);
                $('#my_office_count').html(count[1]);
            } else {
                $('#show_office_list').html(tpl.nodata);
            }

            if (html[2]) {
                $('#my_done_count').html(count[2]);
            }

            if (html[3].creater_list) {
                if (html[3].creater_list.length != 0) {
                    var arr = ['<ul class="dropdown-box">', '<li><a href="javascript:;" node_data="creater_id=0" node_type="change_type">全部</a></li>'];
                    $.each(html[3].creater_list, function (i, item) {
                        arr.push('<li><a href="javascript:;" node_type="change_type" node_data="creater_id=' + item.id + '">' + item.name + '</a></li>');
                    });
                    arr.push('</ul>');
                    $('#office_user_drop').html(arr.join(''));
                } else {
                    $('#office_user').remove();
                }
            }
        });
    }