增加任务移动动态
Signed-off-by: vilson <545522390@qq.com>
This commit is contained in:
parent
c8290558b1
commit
53ad9f0c0c
@ -425,6 +425,9 @@ class Task extends CommonModel
|
|||||||
* @param $stageCode string 移到的任务列表code
|
* @param $stageCode string 移到的任务列表code
|
||||||
* @param $codes array 经过排序的任务code列表
|
* @param $codes array 经过排序的任务code列表
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws DataNotFoundException
|
||||||
|
* @throws DbException
|
||||||
|
* @throws ModelNotFoundException
|
||||||
*/
|
*/
|
||||||
public function sort($stageCode, $codes)
|
public function sort($stageCode, $codes)
|
||||||
{
|
{
|
||||||
@ -432,8 +435,13 @@ class Task extends CommonModel
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($codes) {
|
if ($codes) {
|
||||||
|
$stage = TaskStages::where(['code' => $stageCode])->find();
|
||||||
foreach ($codes as $key => $code) {
|
foreach ($codes as $key => $code) {
|
||||||
|
$task = self::where(['code' => $code])->find();
|
||||||
self::update(['sort' => $key, 'stage_code' => $stageCode], ['code' => $code]);
|
self::update(['sort' => $key, 'stage_code' => $stageCode], ['code' => $code]);
|
||||||
|
if ($task['stage_code'] != $stageCode) {
|
||||||
|
self::taskHook(getCurrentMember()['code'], $code, 'move', '', '', '', '', '', ['stageName' => $stage['name']]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,11 @@ class Task
|
|||||||
$remark = '更新了内容 ';
|
$remark = '更新了内容 ';
|
||||||
$content = $task['name'];
|
$content = $task['name'];
|
||||||
break;
|
break;
|
||||||
|
case 'move':
|
||||||
|
$icon = 'drag';
|
||||||
|
$remark = '将任务移动到 ' . $data['data']['stageName'];
|
||||||
|
$content = $task['name'];
|
||||||
|
break;
|
||||||
case 'content':
|
case 'content':
|
||||||
$icon = 'file-text';
|
$icon = 'file-text';
|
||||||
$remark = '更新了备注 ';
|
$remark = '更新了备注 ';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user