文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 24d181ba by 李严凡

放弃任务功能

parent 4b047a37
......@@ -2,8 +2,16 @@
<div class="task-container">
<div class="task-panel">
<h2>{{task.name}}</h2>
<p>发布者:{{task.creator}}</p>
<p>发布时间:{{task.date|formatDate}}</p>
<p><el-row>发布者:{{task.creator}}</el-row></p>
<p><el-row>
<el-col span="8">
发布时间:{{task.date|formatDate}}
</el-col>
<el-col offset="11" span="5">
<el-button type="primary" plain>提交标注</el-button>
<el-button plain @click="giveUpTask">放弃任务</el-button>
</el-col>
</el-row></p>
<el-divider></el-divider>
<pieces-table :task-id="task.id" showProgress withExecutor>
<template v-slot:option="slotProps">
......@@ -71,6 +79,44 @@ export default {
} else if (piece.type === '图层') {
download('/layer/export', relationId)
}
},
giveUpTask(){
// alert(1)
// console.log(this.task.id)
this.$confirm('此操作将放弃该任务标注', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.axios({
methd:'post',
url:'task/giveUpTask',
params:{
userId:this.$store.state.userInfo.userId,
taskId:this.task.id
}
}).then(res=>{
if(res.code == 1){
this.$message({
type: 'info',
message: '任务已放弃标注'
});
this.$router.push({ path: "/ongoingtask" });
}
else{
this.$message({
type: 'info',
message: '放弃失败'
});
}
}
)
}).catch(() => {
this.$message({
type: 'info',
message: '已取消放弃任务'
});
});
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment