WEB/JS/zii.report.js

(开头部分) 1KB

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

var windowWdith = $(window).width();
var windowHeight = $(window).height();

/*
* 设置皮肤
* 
*/
function setSkin() {
    var skinName = getCookie('skinname');
    if (skinName) {
        $('#skinlink').attr('href', '/skin/' + skinName + '.css');
    }
}

/**
 * 数据表格
 * 
 */
function datagridInit(){
	var $datagrid = $('#datagrid-report');
	var $fixed = $datagrid.find('.datagrid-fixed');
	var $scroll = $datagrid.find('.datagrid-scroll');

	var headHeight = $(".datagrid-header").eq(0).height();
	var footHeight = $(".datagrid-footer").eq(0).height();
	var fixedHeadHeight = $(".datagrid-scroll-head").eq(0).height();
	var totalWidth = 0;

	var fixWidth = $fixed.length > 0 ? $fixed.width() : 0;

	$scroll.css({ marginLeft: fixWidth });
	$(".datagrid-scroll-body, .datagrid-fixed-body").css({
	    "height": windowHeight - headHeight - footHeight - fixedHeadHeight,
	    "top": fixedHeadHeight
    });

	//自动生成选择框固定列
	if ($datagrid.hasClass('datagrid-auto-check') && !$datagrid.hasClass('auto-checked')) {
	    $datagrid.addClass('auto-checked');
		var checkstr = '';
		$('.datagrid-scroll-body tr').each(function () {
			checkstr += '<tr><td><input type="checkbox" name="selectThis" id="checkbox' + $(this).find('td').first().attr('data-id') + '" /></td></tr>';
		});
        $(checkstr).appendTo($('.datagrid-fixed-body table').eq(0));
    }

    //滚动区域高宽
    if ($(".datagrid-scroll-head col").length) {
        $(".datagrid-scroll-head col").each(function (i) {
            totalWidth += parseInt($(this).attr('width')) + 1;
            //$('.datagrid-scroll-body td').eq(i).width($(this).attr('width'));
        });
    } else {
        $(".datagrid-scroll-head th").each(function (i) {
            totalWidth += parseInt($(this).attr('width')) + 1;
            $('.datagrid-scroll-body td').eq(i).width($(this).attr('width'));
        });
    }

    $(".datagrid-scroll-head-inner, .datagrid-scroll-head table, .datagrid-scroll-body table").width(totalWidth);

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

AI 解读

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

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