* Fix bug for metric multipreview toggle feature.

This commit is contained in:
宋辰轩
2024-05-16 16:45:02 +08:00
parent 12cad741c6
commit 55f7d2fbb3
+13 -1
View File
@@ -284,7 +284,19 @@ class metric extends control
$checkedList = explode(',', $checkedList);
$filters = json_decode(base64_decode($filtersBase64), true);
if(!is_array($filters)) $filters = array();
$metrics = $scope == 'collect' ? $this->metric->getListByCollect('released') : $this->metric->getListByFilter($filters, 'released');
if($scope == 'collect')
{
$metrics = $this->metric->getListByCollect('released');
}
elseif(!empty($filters))
{
$metrics = $this->metric->getListByFilter($filters, 'released');
}
else
{
$metrics = $this->metric->getList($scope, 'released');
}
$this->view->groupMetrics = $this->metric->groupMetricByObject($metrics);
$this->view->checkedList = $checkedList;