双模态详情页: workspace(swiper+footer) / tree(只读流转树) 智能分流+一键切换
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user