fix: base ticketd_b 非操作人也显示出按钮
This commit is contained in:
parent
a3b2913e1e
commit
2b63930012
|
|
@ -50,15 +50,17 @@ onMounted(async () => {
|
||||||
const ticketId = ref(null);
|
const ticketId = ref(null);
|
||||||
const actionShow = ref(false);
|
const actionShow = ref(false);
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
|
actionShow.value = false;
|
||||||
|
transitions.value = [];
|
||||||
if (props.ticket_ && props.ticket_.id) {
|
if (props.ticket_ && props.ticket_.id) {
|
||||||
|
ticketId.value = props.ticket_.id;
|
||||||
const isParticipant =
|
const isParticipant =
|
||||||
(props.ticket_.participant_type === 1 && props.ticket_.participant === currentUser.value) ||
|
(props.ticket_.participant_type === 1 && props.ticket_.participant === currentUser.value) ||
|
||||||
(props.ticket_.participant_type === 2 && props.ticket_.participant.includes(currentUser.value))
|
(props.ticket_.participant_type === 2 && props.ticket_.participant.includes(currentUser.value))
|
||||||
if (isParticipant) {
|
if (isParticipant) {
|
||||||
actionShow.value = true;
|
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) {
|
}else if (props.workflow_key !=null && props.workflow_key != undefined) {
|
||||||
let res = await API.wf.workflow.initkey.req(props.workflow_key);
|
let res = await API.wf.workflow.initkey.req(props.workflow_key);
|
||||||
actionShow.value = true
|
actionShow.value = true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue