From 4d88ce0636d7213a62b917ac4c338a9766edf3aa Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 28 Oct 2025 12:59:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20base=20=E4=BC=98=E5=8C=96ticketd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wf/ticketd.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/views/wf/ticketd.vue b/src/views/wf/ticketd.vue index d361898f..515ce988 100644 --- a/src/views/wf/ticketd.vue +++ b/src/views/wf/ticketd.vue @@ -79,12 +79,18 @@ const ticketDetail = ref({ }); const ticketLog = ref([]); const ticketId = ref(null); +watch( + () => props.ticket_, + async (newVal) => { + if (newVal && Object.keys(newVal).length > 0) { + ticketId.value = newVal.id + getTicketDetail() + getTicketLog() + } + }, + { immediate: false } +) onMounted(() => { - if (props.ticket_) { - ticketId.value = props.ticket_.id; - getTicketDetail(); - getTicketLog(); - } }); const emit = defineEmits(['success']); const refreshTicket = async () => { @@ -103,7 +109,6 @@ const getTicketDetail = () => { if (isCreator) { isOwn.value = true } - }); };