task.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * 指派后返回响应。
  4. * Response after assignto.
  5. *
  6. * @param int $taskID
  7. * @param string $from ''|taskkanban
  8. * @param string $message
  9. * @access protected
  10. * @return array
  11. */
  12. protected function responseAfterAssignTo($taskID, $from, $message = '')
  13. {
  14. /* 如果使调研任务,则返回当前页面。*/
  15. /* If it is a research task, return the current page. */
  16. if(in_array($this->app->rawModule, array('researchtask', 'marketresearch'))) return array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'load' => true);
  17. return parent::responseAfterAssignTo($taskID, $from, $message);
  18. }
  19. /**
  20. * 记录工时后返回响应。
  21. * Response after record
  22. *
  23. * @param object $task
  24. * @param array $changes
  25. * @param string $from
  26. * @access protected
  27. * @return int|array
  28. */
  29. protected function responseAfterRecord($task, $changes, $from)
  30. {
  31. /* 如果使调研任务,则返回当前页面。*/
  32. /* If it is a research task, return the current page. */
  33. if(in_array($this->app->rawModule, array('researchtask', 'marketresearch'))) return array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'load' => true);
  34. return parent::responseAfterRecord($task, $changes, $from);
  35. }