- 注册时间
- 2012-11-21
- 最后登录
- 2013-11-22
- 阅读权限
- 10
- 积分
- 14
- 精华
- 0
- 帖子
- 2
|
我的表格:
<div property="columns">
<div type="indexcolumn" ></div>
<div field="year" width="40" headerAlign="center" allowSort="true">年度</div>
<div field="month" width="30" headerAlign="center" allowSort="true">月份</div>
<div field="sum_acc1" width="70" headerAlign="center" allowSort="true">个人评分小计</div>
<div field="sum_acc2" width="70" headerAlign="center" allowSort="true">处室评分小计</div>
<div field="sum_acc3" width="70" headerAlign="center" allowSort="true">中心评分小计</div>
<div field="sum_plan" width="70" headerAlign="center" allowSort="true"> 本月计划工作量</div>
<div field="sum_new" width="70" headerAlign="center" allowSort="true"> 本月实际工作量</div>
<div field="total" width="70" headerAlign="center" allowSort="true">当月实际得分汇总</div>
<div field="ave" width="90" headerAlign="center" allowSort="true">当月平均得分/最终考核分</div>
<div field="status" width="50" headerAlign="center" >考评状态</div>
<div field="action" width="50" headerAlign="center" >操作</div>
</div>
我的JSON数据
$data=array();
for ($i=1;$i<=12;$i++){
$row['id']=$i;
$row['year']=$year;
$row['month']=$i;
$row['sum_acc1']=$mission->sumMonthAcc($uid,$year,$i,'acc1');
$row['sum_acc2']=$mission->sumMonthAcc($uid,$year,$i,'acc2');
$row['sum_acc3']=$mission->sumMonthAcc($uid,$year,$i,'acc3');
$row['sum_plan']=$mission->getMonthPlanNum($uid,$year,$i);
$row['sum_new']=$mission->getMonthMission($uid,$year,$i);
$row['total']=$mission->sumMonthAcc($uid,$year,$i,'all');
$row['ave']=$mission->aveMission($uid,$year,$i);
$row['status']='考评状态';
$row['action']='更多';
array_push($data,$row);
}
$total = count($data);
$start =$pageIndex * $pageSize;
$end = $start + $pageSize;
if($start > count($data)){
$start = count($data);
}
if($end > count($data)){
$end = count($data);
}
$pagingData = array_slice($data,$start,$end);
$resultData = array("total"=>$total,"data"=>$pagingData);
echo json_encode($resultData);
这样 前台表格 不加载 ,但是显示了总条数,这里我的JSON数据需要注意什么特别的吗? |
|