|
@@ -12,6 +12,7 @@ namespace App\Http\Logic\Aside\Com; |
|
@@ -12,6 +12,7 @@ namespace App\Http\Logic\Aside\Com; |
|
12
|
use App\Http\Logic\Aside\BaseLogic;
|
12
|
use App\Http\Logic\Aside\BaseLogic;
|
|
13
|
use App\Models\Manage\Manage;
|
13
|
use App\Models\Manage\Manage;
|
|
14
|
use App\Models\OaNotice\OaNotice;
|
14
|
use App\Models\OaNotice\OaNotice;
|
|
|
|
15
|
+use App\Models\Project\Project;
|
|
15
|
|
16
|
|
|
16
|
class OaNoticeLogic extends BaseLogic
|
17
|
class OaNoticeLogic extends BaseLogic
|
|
17
|
{
|
18
|
{
|
|
@@ -34,6 +35,10 @@ class OaNoticeLogic extends BaseLogic |
|
@@ -34,6 +35,10 @@ class OaNoticeLogic extends BaseLogic |
|
34
|
*/
|
35
|
*/
|
|
35
|
public function saveOaNotice(){
|
36
|
public function saveOaNotice(){
|
|
36
|
$this->param['operator_id'] = $this->manager['id'];
|
37
|
$this->param['operator_id'] = $this->manager['id'];
|
|
|
|
38
|
+ $project_str = trim($this->param['project_str'],',');
|
|
|
|
39
|
+ if($project_str != 'all'){
|
|
|
|
40
|
+ $this->param['project_str'] = ','.$project_str.',';
|
|
|
|
41
|
+ }
|
|
37
|
if(isset($this->param['id']) && !empty($this->param['id'])){
|
42
|
if(isset($this->param['id']) && !empty($this->param['id'])){
|
|
38
|
$id = $this->param['id'];
|
43
|
$id = $this->param['id'];
|
|
39
|
$this->model->edit($this->param,['id'=>$id]);
|
44
|
$this->model->edit($this->param,['id'=>$id]);
|
|
@@ -68,6 +73,13 @@ class OaNoticeLogic extends BaseLogic |
|
@@ -68,6 +73,13 @@ class OaNoticeLogic extends BaseLogic |
|
68
|
if($info == false){
|
73
|
if($info == false){
|
|
69
|
$this->fail('当前数据不存在或已被删除');
|
74
|
$this->fail('当前数据不存在或已被删除');
|
|
70
|
}
|
75
|
}
|
|
|
|
76
|
+ $info['project_str'] = trim($info['project_str'],',');
|
|
|
|
77
|
+ if(strtolower($info['project_str']) != 'all'){
|
|
|
|
78
|
+ $projectModel = new Project();
|
|
|
|
79
|
+ $info['project_title'] = $projectModel->formatQuery(['id'=>['in',explode(',',$info['project_str'])]])->pluck('title')->toArray();
|
|
|
|
80
|
+ }else{
|
|
|
|
81
|
+ $info['project_title'] = '所有';
|
|
|
|
82
|
+ }
|
|
71
|
$info['operator_name'] = (new Manage())->getName($info['operator_id']);
|
83
|
$info['operator_name'] = (new Manage())->getName($info['operator_id']);
|
|
72
|
return $this->success($info);
|
84
|
return $this->success($info);
|
|
73
|
}
|
85
|
}
|