Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
王刘锁
/
jianlin-tms-view
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a50f2785
authored
Sep 07, 2022
by
郑艺斌
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix: 新增任务执行清单状态接口
parent
7ef7034d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
7 deletions
src/api/taskPlan/TaskChainList.js
src/views/modules/taskPlan/taskChainList/index.vue
src/api/taskPlan/TaskChainList.js
View file @
a50f2785
...
@@ -9,6 +9,7 @@ export default class TaskChainList {
...
@@ -9,6 +9,7 @@ export default class TaskChainList {
data
,
data
,
});
});
}
}
// 任务执行清单子任务
getTaskListSub
(
id
)
{
getTaskListSub
(
id
)
{
return
request
({
return
request
({
url
:
`/task/taskList/getSub`
,
url
:
`/task/taskList/getSub`
,
...
@@ -16,4 +17,12 @@ export default class TaskChainList {
...
@@ -16,4 +17,12 @@ export default class TaskChainList {
params
:
{
id
:
id
},
params
:
{
id
:
id
},
});
});
}
}
// 任务执行清单状态
setUpdateStatus
(
data
)
{
return
request
({
url
:
`/task/taskList/updateStatus`
,
method
:
"post"
,
data
,
});
}
}
}
src/views/modules/taskPlan/taskChainList/index.vue
View file @
a50f2785
...
@@ -47,9 +47,9 @@
...
@@ -47,9 +47,9 @@
<vxe-column
field=
"taskType"
title=
"任务类型"
align=
"center"
></vxe-column>
<vxe-column
field=
"taskType"
title=
"任务类型"
align=
"center"
></vxe-column>
<vxe-column
field=
"taskStatus"
title=
"任务状态"
align=
"center"
>
<vxe-column
field=
"taskStatus"
title=
"任务状态"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.taskStatus === '
0
'"
style=
"color: #333333;font-weight: bold;"
>
已暂停
</span>
<span
v-if=
"scope.row.taskStatus === '
2
'"
style=
"color: #333333;font-weight: bold;"
>
已暂停
</span>
<span
v-else-if=
"scope.row.taskStatus === '1'"
style=
"color: #e1750f;font-weight: bold;"
>
执行中
</span>
<span
v-else-if=
"scope.row.taskStatus === '1'"
style=
"color: #e1750f;font-weight: bold;"
>
执行中
</span>
<span
v-else-if=
"scope.row.taskStatus === '
2
'"
style=
"color: #999999;font-weight: bold;"
>
已取消
</span>
<span
v-else-if=
"scope.row.taskStatus === '
4
'"
style=
"color: #999999;font-weight: bold;"
>
已取消
</span>
<span
v-else-if=
"scope.row.taskStatus === '3'"
style=
"color: #249601;font-weight: bold;"
>
已完成
</span>
<span
v-else-if=
"scope.row.taskStatus === '3'"
style=
"color: #249601;font-weight: bold;"
>
已完成
</span>
</
template
>
</
template
>
</vxe-column>
</vxe-column>
...
@@ -99,15 +99,18 @@
...
@@ -99,15 +99,18 @@
<el-button
slot=
"reference"
type=
"text"
size=
"mini"
@
click=
"taskListDetails(scope.row)"
>
子任务详情
<el-button
slot=
"reference"
type=
"text"
size=
"mini"
@
click=
"taskListDetails(scope.row)"
>
子任务详情
</el-button>
</el-button>
</el-popover>
</el-popover>
<
!-- <el-divider direction="vertical" v-if="scope.row.taskStatus === '1' || scope.row.taskStatus === '0
'">
<
el-divider
direction=
"vertical"
v-if=
"scope.row.taskStatus === '1' || scope.row.taskStatus === '2
'"
>
</el-divider>
</el-divider>
<el-button v-if="scope.row.taskStatus === '1'" type="text" size="mini" @click="">暂停
<el-button
v-if=
"scope.row.taskStatus === '1'"
type=
"text"
size=
"mini"
@
click=
"setTaskStatus(scope.row,'2')"
>
暂停
</el-button>
</el-button>
<el-button v-else-if="scope.row.taskStatus === '0'" type="text" size="mini" @click="">恢复
<el-button
v-else-if=
"scope.row.taskStatus === '2'"
type=
"text"
size=
"mini"
@
click=
"setTaskStatus(scope.row,'1')"
>
恢复
</el-button>
</el-button>
<el-divider
direction=
"vertical"
v-if=
"scope.row.taskStatus === '1'"
></el-divider>
<el-divider
direction=
"vertical"
v-if=
"scope.row.taskStatus === '1'"
></el-divider>
<el-button type="text" size="mini" @click="" v-if="scope.row.taskStatus === '1'">取消
<el-button
type=
"text"
size=
"mini"
v-if=
"scope.row.taskStatus === '1'"
</el-button> -->
@
click=
"setTaskStatus(scope.row,'4')"
>
取消
</el-button>
</template>
</template>
</vxe-column>
</vxe-column>
</vxe-table>
</vxe-table>
...
@@ -197,7 +200,17 @@ export default {
...
@@ -197,7 +200,17 @@ export default {
this
.
TaskChainList
.
getTaskListSub
(
row
.
id
).
then
(({
data
})
=>
{
this
.
TaskChainList
.
getTaskListSub
(
row
.
id
).
then
(({
data
})
=>
{
this
.
subtaskData
=
data
this
.
subtaskData
=
data
})
})
},
// 设置任务状态
setTaskStatus
(
row
,
taskStatus
)
{
const
can
=
{
id
:
row
.
id
,
taskStatus
}
}
this
.
TaskChainList
.
setUpdateStatus
(
can
).
then
(({
data
})
=>
{
this
.
$set
(
row
,
'taskStatus'
,
taskStatus
)
})
},
},
},
created
()
{
created
()
{
this
.
TaskChainList
=
new
TaskChainList
()
this
.
TaskChainList
=
new
TaskChainList
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment