diff --git a/application/common/Model/Task.php b/application/common/Model/Task.php index 67afe44..337e45a 100755 --- a/application/common/Model/Task.php +++ b/application/common/Model/Task.php @@ -350,6 +350,13 @@ class Task extends CommonModel TaskTag::setTag($tagCode, $data['code']); } } + if(isset($data['file_list']) && $data['file_list']){ + $file_list= explode(',',$data['file_list']); + $arr= File::whereIn('code',$file_list)->select(); + foreach ($arr as $v){ + \app\common\Model\SourceLink::createSource('file', $v['code'], 'task', $data['code']); + } + } } //todo 添加任务动态 diff --git a/application/project/controller/Task.php b/application/project/controller/Task.php index 3d93e10..4ee413d 100755 --- a/application/project/controller/Task.php +++ b/application/project/controller/Task.php @@ -155,7 +155,7 @@ class Task extends BasicApi */ public function save(Request $request) { - $data = $request::only('name,stage_code,project_code,assign_to,pcode,exchangeList,description,end_time,pri,executor,copied_list,department_code,liasion_code'); + $data = $request::only('name,stage_code,project_code,assign_to,pcode,exchangeList,description,end_time,pri,executor,copied_list,department_code,liasion_code,file_list'); if (!isset($data['assign_to'])) { $data['assign_to'] = ''; }