* [bug#52514,done,1h] fix export module bug.

This commit is contained in:
sunguangming
2024-07-11 16:11:47 +08:00
committed by 曹延义
parent 8358f5b2d6
commit cb3c520565
2 changed files with 19 additions and 1 deletions
+18
View File
@@ -2067,4 +2067,22 @@ class bugModel extends model
->page($pager)
->fetchAll();
}
/**
* 为 datatable 获取模块。
* Get modules for datatable.
*
* @param int $productID
* @access public
* @return void
*/
public function getDatatableModules(int $productID): array
{
$branches = $this->loadModel('branch')->getPairs($productID);
$modules = $this->loadModel('tree')->getOptionMenu($productID, 'bug', 0);
if(count($branches) <= 1) return $modules;
foreach($branches as $branchID => $branchName) $modules += $this->tree->getOptionMenu($productID, 'bug', 0, (string)$branchID);
return $modules;
}
}