* [perf] refactor: enhance task search form building functionality

- Add productID parameter to buildTaskSearchForm method to support better filtering
- Introduce module parameter to handle different search contexts (task, programplanTask, projectTask)
- Refactor search configuration to be more modular and context-aware
- Remove hardcoded search module configurations and pass them as parameters
- Simplify search form initialization across execution, programplan, and project modules
- Improve code reusability by centralizing search configuration logic
- Add conditional field filtering based on execution type and search context
This commit is contained in:
liugang
2025-08-18 09:09:10 +08:00
parent a2227c2e0d
commit ab4ecfb7af
4 changed files with 45 additions and 29 deletions
+1 -5
View File
@@ -441,12 +441,8 @@ class programplanZen extends programplan
if($hasSearch)
{
/* Build the search form. */
$this->config->execution->search['module'] = 'projectTask';
$actionURL = $this->createLink('programplan', 'browse', "projectID=$projectID&productID=$productID&type=$type&orderBy=$orderBy&baselineID=$baselineID&browseType=bysearch&queryID=myQueryID");
unset($this->config->execution->search['fields']['project']);
$executions = $this->programplan->getPairs($projectID, $productID, 'all');
$this->loadModel('execution')->buildTaskSearchForm($projectID, $executions, $queryID, $actionURL);
$this->loadModel('execution')->buildTaskSearchForm($projectID, $productID, $executions, $queryID, $actionURL, 'programplanTask');
}
$this->view->title = $this->lang->programplan->browse;