mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 03:01:12 +00:00
perf: 优化工作流获取
This commit is contained in:
parent
ee6cf05a92
commit
cc97d9f1ea
@ -2307,8 +2307,8 @@ class ProjectController extends AbstractController
|
|||||||
* @apiGroup project
|
* @apiGroup project
|
||||||
* @apiName task__flow
|
* @apiName task__flow
|
||||||
*
|
*
|
||||||
* @apiParam {Number} task_id 任务ID
|
* @apiParam {Number} [task_id] 任务ID
|
||||||
* @apiParam {Number} project_id 项目ID - 存在时只返回这个项目的
|
* @apiParam {Number} [project_id] 项目ID(存在时只返回这个项目的工作流,主要用于任务移动到其他项目时)
|
||||||
*
|
*
|
||||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||||
|
|||||||
@ -137,7 +137,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
flow() {
|
flow() {
|
||||||
return this.taskFlows.find(({task_id}) => task_id == this.task.id);
|
const item = this.taskFlows.find(({task_id}) => task_id == this.task.id);
|
||||||
|
if (item) {
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
return this.taskFlows.find(({flow_item_id}) => flow_item_id == this.task.flow_item_id);
|
||||||
},
|
},
|
||||||
|
|
||||||
turns() {
|
turns() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user