// 报表项目页外层(仅包含头部) // 因为调用的apicloud的刷新组件只能刷新整个页面, //所以将所有要进行刷新的页面分成两部分 apiready = function() { var ctrl = { init : {}, bind : {}, }; ctrl.init = function() { // 适配安卓状态栏 CommonModel.fitInStatusBar(); ctrl.time = api.pageParam.time; // 当前报表的时间 // 设置页面title 如9-18报表 var dateUtils = new DateUtils(); dateUtils.setDate(ctrl.time); var date = dateUtils.getFormattedDate('MM-dd'); $('#title').text(date + '报表'); ctrl.bind(); } ctrl.bind = function() { //点击返回按钮 $api.addEvt($api.dom("#back"), "touchend", function() { api.closeWin(); }) //打开frame var id = api.pageParam.id; //计算frame显示的位置和尺寸 var windowWidth = parseInt($api.cssVal($api.dom("body"), "width")); var windowHeight = parseInt($api.cssVal($api.dom("body"), "height")); var headerHeight = parseInt($api.cssVal($api.dom("#header"), "height")); var frameX = 0; var frameY = headerHeight; var frameWidth = windowWidth; var frameHeight = windowHeight - headerHeight; api.openFrame({ name: 'reportDdhListFrame', url: './reportDdhListFrame.html', rect: { x: frameX, y: frameY, w: frameWidth, h: frameHeight }, pageParam: { id: id, time: ctrl.time } }); } ctrl.init(); }