diff --git a/module/execution/model.php b/module/execution/model.php index f8d9e2f2d3..61f61b991f 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -4179,9 +4179,13 @@ class executionModel extends model */ public function buildTaskSearchForm(int $executionID, int $productID, array $executions, int $queryID, string $actionURL, string $module = 'task', bool $cacheSearchParams = true) { - if($cacheSearchParams) return $this->cacheSearchParams($module, __METHOD__, func_get_args()); - $searchConfig = $this->config->execution->search; + if($cacheSearchParams) + { + $this->cacheSearchParams($module, __METHOD__, func_get_args()); + return $searchConfig; + } + $searchConfig['module'] = $module; $searchConfig['actionURL'] = $actionURL; $searchConfig['queryID'] = $queryID; diff --git a/module/my/control.php b/module/my/control.php index ee7173a6c9..dc565f531d 100755 --- a/module/my/control.php +++ b/module/my/control.php @@ -434,7 +434,7 @@ class my extends control $tasks = $this->myZen->buildTaskData($tasks); $actionURL = $this->createLink('my', $this->app->rawMethod, "mode=task&browseType=bySearch&queryID=myQueryID"); - $this->my->buildTaskSearchForm($queryID, $actionURL, $this->app->rawMethod); + $this->my->buildTaskSearchForm($queryID, $actionURL, $this->app->rawMethod . 'Task'); $this->myZen->showWorkCount($recTotal, $recPerPage, $pageID); diff --git a/module/my/model.php b/module/my/model.php index 86334685dc..86e7a56af5 100644 --- a/module/my/model.php +++ b/module/my/model.php @@ -448,24 +448,26 @@ class myModel extends model * * @param int $queryID * @param string $actionURL - * @param string $rawMethod + * @param string $module * @param bool $cacheSearchParams 是否缓存搜索参数。默认缓存可以提高性能,构造搜索表单时再加载真实值。 * @access public * @return void */ - public function buildTaskSearchForm(int $queryID, string $actionURL, string $rawMethod, bool $cacheSearchParams = true) + public function buildTaskSearchForm(int $queryID, string $actionURL, string $module, bool $cacheSearchParams = true) { - $module = $rawMethod . 'Task'; - if($cacheSearchParams) return $this->cacheSearchParams($module, __METHOD__, func_get_args()); - $this->loadModel('execution'); - $searchConfig = $this->config->execution->search; + if($cacheSearchParams) + { + $this->cacheSearchParams($module, __METHOD__, func_get_args()); + return $searchConfig; + } + $searchConfig['module'] = $module; $searchConfig['actionURL'] = $actionURL; $searchConfig['queryID'] = $queryID; - if($rawMethod == 'work') + if($module == 'workTask') { unset($searchConfig['fields']['closedReason']); unset($searchConfig['fields']['closedBy']);