From 0ee779c8aceca750ff32561a6ab8591e83fde08e Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Wed, 24 Jul 2024 05:06:01 +0000 Subject: [PATCH] * [story#60342,doing,1h] process drill config. --- module/screen/model.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/module/screen/model.php b/module/screen/model.php index 37c22de89b..9ab115111e 100644 --- a/module/screen/model.php +++ b/module/screen/model.php @@ -1024,14 +1024,31 @@ class screenModel extends model } } - $align = array(); - $headers = array(); + $align = array(); + $headers = array(); + $groupCount = 0; + $drillConfigs = array(); foreach($options->cols as $cols) { $count = 1; $header = array(); foreach($cols as $data) { + $colspan = zget($data, 'colspan', 0); + $isDrilling = zget($data, 'isDrilling', false); + $conditions = zget($data, 'condition', array()); + $drillField = zget($data, 'drillField', ''); + $isGroup = zget($data, 'isGroup', false); + + if($isGroup) + { + $groupCount += 1; + } + else if($colspan == 1) + { + $drillConfigs[] = $isDrilling ? array('drillField' => $drillField, 'conditions' => $conditions) : false; + } + $header[] = $data; if($count == 1) $align[] = 'center'; }