This commit is contained in:
fuenmao
2026-08-25 13:54:25 +08:00
parent 49a1a3ee6a
commit aec6c1f36c
4 changed files with 60 additions and 1 deletions
+30
View File
@@ -106,6 +106,16 @@
>
撤销
</el-button>
<el-button
v-if="scope.row.taskStatus === 'revoked'"
link
type="danger"
icon="Delete"
@click="removeTask(scope.row)"
>
删除
</el-button>
</template>
</ProTable>
</div>
@@ -495,6 +505,14 @@
>
归档该任务
</el-button>
<el-button
v-if="detail.task.taskStatus === 'revoked'"
type="danger"
icon="Delete"
@click="removeTask(detail.task)"
>
删除该任务
</el-button>
<el-button @click="detailVisible = false">关闭</el-button>
</div>
</div>
@@ -1012,6 +1030,18 @@ async function revoke(row: OnboardingTask) {
proTable.value?.refresh();
}
async function removeTask(row: OnboardingTask) {
await ElMessageBox.confirm(
`确认永久删除已撤销的入职任务【${row.taskNo}】吗?此操作将清理该任务全部数据,且不可恢复。`,
"删除任务确认",
{ type: "error", confirmButtonText: "确定删除", cancelButtonText: "取消" }
);
await onboardingTaskApi.deleteTask(row.id);
ElMessage.success("入职任务已删除");
detailVisible.value = false;
proTable.value?.refresh();
}
onMounted(loadCompanies);
</script>