fix: 已完成/已驳回/已入库/已撤回任务禁止编辑删除记录

This commit is contained in:
2026-08-07 16:48:12 +08:00
parent beea543fbd
commit b834b24c24
2 changed files with 4 additions and 1 deletions

View File

@ -67,6 +67,9 @@ export default {
computed: {
canEdit() {
if (!this.currentUser || !this.task) return false;
// 已完成/已驳回/已入库/已撤回 的任务禁止编辑
const frozen = ["COMPLETED", "REJECTED", "ARCHIVED", "CANCELED"];
if (frozen.includes(this.task.status)) return false;
return (
this.currentUser.id == this.task.assignee_id ||
this.currentUser.username == this.task.assignee_id