From 4ddcb21ebf8d2ee2e2ea62809699e6295001109b Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Tue, 25 Jun 2024 08:27:45 +0000 Subject: [PATCH] + [story#54149,doing,0.1h,3.4h] add convertDataForDtable. --- module/bi/model.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/module/bi/model.php b/module/bi/model.php index 6bc224c3f7..99394fc0db 100644 --- a/module/bi/model.php +++ b/module/bi/model.php @@ -1201,6 +1201,20 @@ class biModel extends model $index++; } + $lastRow = count($data->array) - 1; + $hasGroup = isset($data->groups); + $hasColumnTotal = !empty($data->columnTotal) && $data->columnTotal != 'noShow'; + foreach($data->array as $rowKey => $rowData) + { + $index = 0; + $rowData = array_values($rowData); + } + + foreach($columns as $field => $column) + { + $columns[$field]['width'] = 16 * $columnMaxLen[$field]; + } + return array($columns, $rows, $cellSpan); }