diff --git a/pages/wf/ticketd_b.vue b/pages/wf/ticketd_b.vue index 746bf31..e79239b 100644 --- a/pages/wf/ticketd_b.vue +++ b/pages/wf/ticketd_b.vue @@ -36,8 +36,8 @@ const props = defineProps({ const workflow = ref(null); const transitions = ref([]); onMounted(async () => { - await getUser() - await init() + await getUser() + await init() }) watch( () => props.ticket_, @@ -45,8 +45,7 @@ watch( if (newVal && Object.keys(newVal).length > 0) { await init() } - }, - { immediate: false } + } ) const actionShow = ref(false); const suggestion = ref("") @@ -54,7 +53,7 @@ const isOwn = ref(false) const init = async () => { transitions.value = []; actionShow.value = false; - if (props.ticket_ != null && props.ticket_ != undefined) { + if (props.ticket_ && Object.keys(props.ticket_).length > 0) { isOwn.value = props.ticket_.create_by === currentUser.value; const isParticipant = (props.ticket_.participant_type === 1 && props.ticket_.participant === currentUser.value) ||