* [bug#59335,done,0.5h] fix error of pivot in screen.

This commit is contained in:
zhouxin
2025-01-17 17:06:02 +08:00
committed by 宋辰轩
parent c42776972d
commit 26e52b2271
+10 -3
View File
@@ -262,12 +262,19 @@ class screen extends control
}
else
{
$sourceId = $params->sourceID;
$sourceID = $params->sourceID;
$field = $params->field;
$saveAs = isset($params->saveAs) ? $params->saveAs : '';
$table = $this->config->objectTables[$type];
$chart = $this->dao->select('*')->from($table)->where('id')->eq($sourceId)->fetch();
if($type == 'pivot')
{
$chart = $this->loadModel('pivot')->getPivotDataByID($sourceID);
}
else
{
$table = $this->config->objectTables[$type];
$chart = $this->dao->select('*')->from($table)->where('id')->eq($sourceID)->fetch();
}
$fields = json_decode($chart->fields, true);
$fieldObj = zget($fields, $field);