diff --git a/src/views/wf/ticketd.vue b/src/views/wf/ticketd.vue index 79776c22..8743901c 100644 --- a/src/views/wf/ticketd.vue +++ b/src/views/wf/ticketd.vue @@ -81,7 +81,7 @@ const ticketLog = ref([]); const ticketId = ref(null); onMounted(() => { // 立即处理初始值 - if (props.ticket_ && Object.keys(props.ticket_).length > 0) { + if (props.ticket_ && props.ticket_.id) { ticketId.value = props.ticket_.id getTicketDetail() getTicketLog() diff --git a/src/views/wf/ticketd_b.vue b/src/views/wf/ticketd_b.vue index 85bb726b..7ecc3c6f 100644 --- a/src/views/wf/ticketd_b.vue +++ b/src/views/wf/ticketd_b.vue @@ -50,7 +50,7 @@ onMounted(async () => { const ticketId = ref(null); const actionShow = ref(false); const init = async () => { - if (props.ticket_ && Object.keys(props.ticket_).length > 0) { + if (props.ticket_ && 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))