项目管理员以查看所有项目的【项目任务】

This commit is contained in:
hdm 2023-03-29 14:53:48 +08:00
parent 74b163ccba
commit 5b0346b49a
2 changed files with 9 additions and 5 deletions

View File

@ -47,7 +47,12 @@ class Install
//$code = $response->getCode();
$responseData = $response->getData();
if(isset($responseData['code']) && $responseData['code'] == 0){
$logData = $responseData['data'];
if(isset($responseData['datas'])){
$logData = $responseData['datas'];
}
else{
$logData = $responseData['data'];
}
$log_conf = get_config('log');
$type_action = $log_conf['type_action'];
if(isset($logData['logtype']) && isset($logData['id']) && isset($type_action[$logData['logtype']])){

View File

@ -106,9 +106,7 @@ class Task extends BaseController
$id = isset($param['id']) ? $param['id'] : 0;
$detail = (new TaskList())->detail($id);
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 {
$role_uid = [$detail['admin_id'], $detail['director_uid']];
$role_edit = 'view';
@ -116,7 +114,8 @@ class Task extends BaseController
$role_edit = 'edit';
}
$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')
->field('mf.id,mf.topic_id,mf.admin_id,f.name,f.filesize,f.filepath,a.name as admin_name')
->alias('mf')