diff --git a/app/Http/Controllers/Api/FileController.php b/app/Http/Controllers/Api/FileController.php
index 8fb628def..166731f23 100755
--- a/app/Http/Controllers/Api/FileController.php
+++ b/app/Http/Controllers/Api/FileController.php
@@ -623,6 +623,8 @@ public function content__upload()
'asp', 'properties', 'gitignore', 'log', 'bas', 'prg', 'python', 'ftl', 'aspx' => "code",
'mp3', 'wav', 'mp4', 'flv',
'avi', 'mov', 'wmv', 'mkv', '3gp', 'rm' => "media",
+ 'xmind' => "xmind",
+ 'rp' => "axure",
default => "",
};
$file = File::createInstance([
diff --git a/app/Http/Controllers/Api/ProjectController.php b/app/Http/Controllers/Api/ProjectController.php
index ef50befa1..8070c53e3 100755
--- a/app/Http/Controllers/Api/ProjectController.php
+++ b/app/Http/Controllers/Api/ProjectController.php
@@ -1328,72 +1328,6 @@ public function task__update()
return Base::retSuccess('修改成功', $data);
}
- /**
- * @api {post} api/project/task/upload 27. 上传文件
- *
- * @apiDescription 需要token身份(限:项目、任务负责人)
- * @apiVersion 1.0.0
- * @apiGroup project
- * @apiName task__upload
- *
- * @apiParam {Number} task_id 任务ID
- * @apiParam {String} [filename] post-文件名称
- * @apiParam {String} [image64] post-base64图片(二选一)
- * @apiParam {File} [files] post-文件对象(二选一)
- *
- * @apiSuccess {Number} ret 返回状态码(1正确、0错误)
- * @apiSuccess {String} msg 返回信息(错误描述)
- * @apiSuccess {Object} data 返回数据
- */
- public function task__upload()
- {
- $user = User::auth();
- //
- $task_id = Base::getPostInt('task_id');
- //
- $task = ProjectTask::userTask($task_id, true, true);
- //
- $path = "uploads/task/" . $task->id . "/";
- $image64 = Base::getPostValue('image64');
- $fileName = Base::getPostValue('filename');
- if ($image64) {
- $data = Base::image64save([
- "image64" => $image64,
- "path" => $path,
- "fileName" => $fileName,
- ]);
- } else {
- $data = Base::upload([
- "file" => Request::file('files'),
- "type" => 'file',
- "path" => $path,
- "fileName" => $fileName,
- ]);
- }
- //
- if (Base::isError($data)) {
- return Base::retError($data['msg']);
- } else {
- $fileData = $data['data'];
- $file = ProjectTaskFile::createInstance([
- 'project_id' => $task->project_id,
- 'task_id' => $task->id,
- 'name' => $fileData['name'],
- 'size' => $fileData['size'] * 1024,
- 'ext' => $fileData['ext'],
- 'path' => $fileData['path'],
- 'thumb' => Base::unFillUrl($fileData['thumb']),
- 'userid' => $user->userid,
- ]);
- $file->save();
- //
- $file = ProjectTaskFile::find($file->id);
- $task->addLog("上传文件:" . $file->name);
- $task->pushMsg('upload', $file);
- return Base::retSuccess("上传成功", $file);
- }
- }
-
/**
* @api {get} api/project/task/dialog 28. 创建/获取聊天室
*
@@ -1653,7 +1587,7 @@ public function task__flow()
/**
* @api {get} api/project/flow/list 33. 工作流列表
*
- * @apiDescription 需要token身份(限:项目负责人)
+ * @apiDescription 需要token身份
* @apiVersion 1.0.0
* @apiGroup project
* @apiName flow__list
@@ -1669,9 +1603,8 @@ public function flow__list()
User::auth();
//
$project_id = intval(Request::input('project_id'));
- $is_filter = intval(Request::input('is_filter',0));
//
- $project = Project::userProject($project_id, true, true, $is_filter);
+ $project = Project::userProject($project_id, true);
//
$list = ProjectFlow::with(['ProjectFlowItem'])->whereProjectId($project->id)->get();
return Base::retSuccess('success', $list);
diff --git a/app/Models/Project.php b/app/Models/Project.php
index 0b1bab82a..76e452a30 100644
--- a/app/Models/Project.php
+++ b/app/Models/Project.php
@@ -354,11 +354,10 @@ public function pushMsg($action, $data = null, $userid = null)
* 获取项目信息(用于判断会员是否存在项目内)
* @param int $project_id
* @param null|bool $archived true:仅限未归档, false:仅限已归档, null:不限制
- * @param null $mustOwner true:仅限项目负责人, false:仅限非项目负责人, null:不限制
- * @param int $is_filter 是否是用筛选列表
+ * @param null|bool $mustOwner true:仅限项目负责人, false:仅限非项目负责人, null:不限制
* @return self
*/
- public static function userProject($project_id, $archived = true, $mustOwner = null, $is_filter = 0)
+ public static function userProject($project_id, $archived = true, $mustOwner = null)
{
$project = self::authData()->where('projects.id', intval($project_id))->first();
if (empty($project)) {
@@ -370,10 +369,10 @@ public static function userProject($project_id, $archived = true, $mustOwner = n
if ($archived === false && $project->archived_at == null) {
throw new ApiException('项目未归档', [ 'project_id' => $project_id ]);
}
- if ($mustOwner === true && !$project->owner && $is_filter === 0) {
+ if ($mustOwner === true && !$project->owner) {
throw new ApiException('仅限项目负责人操作', [ 'project_id' => $project_id ]);
}
- if ($mustOwner === false && $project->owner && $is_filter === 0) {
+ if ($mustOwner === false && $project->owner) {
throw new ApiException('禁止项目负责人操作', [ 'project_id' => $project_id ]);
}
return $project;
diff --git a/app/Models/WebSocketDialogMsg.php b/app/Models/WebSocketDialogMsg.php
index 23b6b6335..46d7d1b3a 100644
--- a/app/Models/WebSocketDialogMsg.php
+++ b/app/Models/WebSocketDialogMsg.php
@@ -46,9 +46,6 @@ class WebSocketDialogMsg extends AbstractModel
'updated_at',
];
- const MSG_TYPE_TEXT = "text";
- const MSG_TYPE_FILE = "file";
-
/**
* 阅读占比
* @return int|mixed
diff --git a/app/Module/Base.php b/app/Module/Base.php
index 6a8c3049c..55e02e6da 100755
--- a/app/Module/Base.php
+++ b/app/Module/Base.php
@@ -2263,7 +2263,8 @@ public static function upload($param)
'asp', 'properties', 'gitignore', 'log', 'bas', 'prg', 'python', 'ftl', 'aspx',
'mp3', 'wav', 'mp4', 'flv',
'avi', 'mov', 'wmv', 'mkv', '3gp', 'rm',
- 'xmind', 'rp',
+ 'xmind',
+ 'rp',
];
break;
default:
diff --git a/resources/assets/js/pages/login.vue b/resources/assets/js/pages/login.vue
index 1ab24536e..b1193fc37 100644
--- a/resources/assets/js/pages/login.vue
+++ b/resources/assets/js/pages/login.vue
@@ -13,15 +13,8 @@
-
-