From 6da3bb96e0ec69a4ae2c2b66f0d8ff14fc64c430 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 28 Oct 2025 14:49:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20base=20=E4=BC=98=E5=8C=96ticket?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/wf/ticketd.vue | 23 +++++++++++------------ pages/wf/ticketd_b.vue | 17 +++++++++++------ 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/pages/wf/ticketd.vue b/pages/wf/ticketd.vue index 8025b7b..6c9f9b4 100644 --- a/pages/wf/ticketd.vue +++ b/pages/wf/ticketd.vue @@ -90,19 +90,18 @@ const ticket_f = ref({}); const isOwn = ref(false); - watch( - () => props.ticket_, - async (newVal) => { - if (newVal && Object.keys(newVal).length > 0) { - if(props.ticket_.create_by === uni.getStorageSync("userInfo").id){ - isOwn.value = true; - } - } - }, - { immediate: false } - ) onMounted(() => { - + watch( + () => props.ticket_, + async (newVal) => { + if (newVal && Object.keys(newVal).length > 0) { + if(props.ticket_.create_by === uni.getStorageSync("userInfo").id){ + isOwn.value = true; + } + } + }, + { immediate: false, deep: true } + ) }) const popup = ref(null); diff --git a/pages/wf/ticketd_b.vue b/pages/wf/ticketd_b.vue index 64a73cf..ba6ac49 100644 --- a/pages/wf/ticketd_b.vue +++ b/pages/wf/ticketd_b.vue @@ -36,8 +36,17 @@ const props = defineProps({ const workflow = ref(null); const transitions = ref([]); onMounted(async () => { - await getUser() - setTimeout(()=>{init()}, 500) + // setTimeout(()=>{init()}, 500) + await init(); + watch( + () => props.ticket_, + async (newVal) => { + if (newVal && Object.keys(newVal).length > 0) { + await init(); + } + }, + { deep: true } + ) }) const actionShow = ref(false); const suggestion = ref("") @@ -66,10 +75,6 @@ const init = async () => { }) } } -const currentUser = ref(null); -const getUser = async() =>{ - currentUser.value = uni.getStorageSync("userInfo").id -} const isSaveing = ref(false);