项目管理员以查看所有项目的【项目任务】
This commit is contained in:
parent
74b163ccba
commit
5b0346b49a
@ -47,7 +47,12 @@ class Install
|
|||||||
//$code = $response->getCode();
|
//$code = $response->getCode();
|
||||||
$responseData = $response->getData();
|
$responseData = $response->getData();
|
||||||
if(isset($responseData['code']) && $responseData['code'] == 0){
|
if(isset($responseData['code']) && $responseData['code'] == 0){
|
||||||
|
if(isset($responseData['datas'])){
|
||||||
|
$logData = $responseData['datas'];
|
||||||
|
}
|
||||||
|
else{
|
||||||
$logData = $responseData['data'];
|
$logData = $responseData['data'];
|
||||||
|
}
|
||||||
$log_conf = get_config('log');
|
$log_conf = get_config('log');
|
||||||
$type_action = $log_conf['type_action'];
|
$type_action = $log_conf['type_action'];
|
||||||
if(isset($logData['logtype']) && isset($logData['id']) && isset($type_action[$logData['logtype']])){
|
if(isset($logData['logtype']) && isset($logData['id']) && isset($type_action[$logData['logtype']])){
|
||||||
|
@ -105,10 +105,8 @@ class Task extends BaseController
|
|||||||
$param = get_params();
|
$param = get_params();
|
||||||
$id = isset($param['id']) ? $param['id'] : 0;
|
$id = isset($param['id']) ? $param['id'] : 0;
|
||||||
$detail = (new TaskList())->detail($id);
|
$detail = (new TaskList())->detail($id);
|
||||||
if (empty($detail)) {
|
|
||||||
if (empty($detail)) {
|
if (empty($detail)) {
|
||||||
echo '<div style="text-align:center;color:red;margin-top:20%;">该任务不存在</div>';exit;
|
echo '<div style="text-align:center;color:red;margin-top:20%;">该任务不存在</div>';exit;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$role_uid = [$detail['admin_id'], $detail['director_uid']];
|
$role_uid = [$detail['admin_id'], $detail['director_uid']];
|
||||||
$role_edit = 'view';
|
$role_edit = 'view';
|
||||||
@ -116,7 +114,8 @@ class Task extends BaseController
|
|||||||
$role_edit = 'edit';
|
$role_edit = 'edit';
|
||||||
}
|
}
|
||||||
$project_ids = Db::name('ProjectUser')->where(['uid' => $this->uid, 'delete_time' => 0])->column('project_id');
|
$project_ids = Db::name('ProjectUser')->where(['uid' => $this->uid, 'delete_time' => 0])->column('project_id');
|
||||||
if (in_array($detail['project_id'], $project_ids) || in_array($this->uid, $role_uid) || in_array($this->uid, explode(",",$detail['assist_admin_ids']))) {
|
$auth = isAuth($this->uid,'project_admin');
|
||||||
|
if (in_array($detail['project_id'], $project_ids) || in_array($this->uid, $role_uid) || in_array($this->uid, explode(",",$detail['assist_admin_ids'])) || ($auth==1&&$detail['project_id']>0)) {
|
||||||
$file_array = Db::name('ProjectFile')
|
$file_array = Db::name('ProjectFile')
|
||||||
->field('mf.id,mf.topic_id,mf.admin_id,f.name,f.filesize,f.filepath,a.name as admin_name')
|
->field('mf.id,mf.topic_id,mf.admin_id,f.name,f.filesize,f.filepath,a.name as admin_name')
|
||||||
->alias('mf')
|
->alias('mf')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user