双模态详情页: workspace(swiper+footer) / tree(只读流转树) 智能分流+一键切换

This commit is contained in:
2026-08-05 16:43:32 +08:00
parent 21aa608db3
commit 78559db1fa
2 changed files with 66 additions and 24 deletions

View File

@ -35,6 +35,7 @@
:currentUser="currentUser"
:currentUserId="currentUserId"
:currentUsername="currentUsername"
:readonly="readonly"
:isLast="idx === task.child_tasks.length - 1"
@action="(e) => $emit('action', e)"
@editRecord="(e) => $emit('editRecord', e)"
@ -85,6 +86,7 @@ export default {
currentUser: { type: Object, default: null },
currentUserId: { type: [String, Number], default: "" },
currentUsername: { type: String, default: "" },
readonly: { type: Boolean, default: false },
},
emits: ["action", "editRecord", "viewRecords"],
mounted() {
@ -94,6 +96,7 @@ export default {
},
computed: {
canEditRecord() {
if (this.readonly) return false;
if (this.task.assignee_id == this.currentUserId) return true;
if (this.task.assignee_id == this.currentUsername) return true;
if (this.currentUser && this.currentUser.id == this.task.assignee_id) return true;