Merge branch 'sprint/zentaobiz10' into 'master'

Sprint/zentaobiz10

See merge request easycorp/zentaopms!4385
This commit is contained in:
刘刚
2022-07-06 09:08:05 +00:00
5 changed files with 32 additions and 3 deletions
+20
View File
@@ -312,6 +312,26 @@ class control extends baseControl
chdir($currentPWD);
}
/**
* 获取一个方法的输出内容,这样我们可以在一个方法里获取其他模块方法的内容。
* 如果模块名为空,则调用该模块、该方法;如果设置了模块名,调用指定模块指定方法。
*
* Get the output of one module's one method as a string, thus in one module's method, can fetch other module's content.
* If the module name is empty, then use the current module and method. If set, use the user defined module and method.
*
* @param string $moduleName module name.
* @param string $methodName method name.
* @param array $params params.
* @access public
* @return string the parsed html.
*/
public function fetch($moduleName = '', $methodName = '', $params = array(), $appName = '')
{
if($moduleName != $this->moduleName) $this->app->fetchModule = $moduleName;
return parent::fetch($moduleName, $methodName, $params, $appName);
}
/**
* Build operate menu of a method.
*
+9
View File
@@ -46,6 +46,15 @@ class router extends baseRouter
*/
public $isFlow = false;
/**
* Fetch的模块名。
* The fetched module name.
*
* @var string
* @access public
*/
public $fetchModule;
/**
* Get the $moduleRoot var.
*
+1 -1
View File
@@ -48,7 +48,7 @@ class dao extends baseDAO
/* Check current module is buildin workflow. */
if(isset($config->workflow->buildin->modules))
{
$currentModule = $app->rawModule;
$currentModule = $app->fetchModule ? $app->fetchModule : $app->rawModule;
foreach($config->workflow->buildin->modules as $appModules)
{
if(!empty($appModules->$currentModule))
+1 -1
View File
@@ -51,7 +51,7 @@ class fixer extends baseFixer
{
global $app, $dbh;
$flowFields = array();
$moduleName = $app->rawModule;
$moduleName = $app->fetchModule ? $app->fetchModule : $app->rawModule;
$stmt = $dbh->query("SELECT * FROM " . TABLE_WORKFLOWFIELD . " WHERE `module` = '{$moduleName}' and `buildin` = '0'");
while($flowField = $stmt->fetch()) $flowFields[$flowField->field] = $flowField;
+1 -1
View File
@@ -32,7 +32,7 @@
<div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox" data-module='workFeedback'></div>
<?php if(empty($feedbacks)):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->noData;?></span></p>
<p><span class="text-muted"><?php echo $lang->feedback->noFeedback;?></span></p>
</div>
<?php else:?>
<?php