fix: base ticketd_b 非操作人也显示出按钮

This commit is contained in:
caoqianming 2025-11-21 16:41:35 +08:00
parent a3b2913e1e
commit 2b63930012
1 changed files with 4 additions and 2 deletions

View File

@ -50,15 +50,17 @@ onMounted(async () => {
const ticketId = ref(null);
const actionShow = ref(false);
const init = async () => {
actionShow.value = false;
transitions.value = [];
if (props.ticket_ && props.ticket_.id) {
ticketId.value = props.ticket_.id;
const isParticipant =
(props.ticket_.participant_type === 1 && props.ticket_.participant === currentUser.value) ||
(props.ticket_.participant_type === 2 && props.ticket_.participant.includes(currentUser.value))
if (isParticipant) {
actionShow.value = true;
transitions.value = await API.wf.ticket.ticketTransitions.req(ticketId.value);
}
ticketId.value = props.ticket_.id;
transitions.value = await API.wf.ticket.ticketTransitions.req(ticketId.value);
}else if (props.workflow_key !=null && props.workflow_key != undefined) {
let res = await API.wf.workflow.initkey.req(props.workflow_key);
actionShow.value = true