Fix workflow action initialization order

This commit is contained in:
caoqianming 2026-07-27 14:46:43 +08:00
parent 34d3c43784
commit be1d702334
1 changed files with 14 additions and 11 deletions

View File

@ -65,17 +65,6 @@ const tryInit = () => {
init(); init();
} }
}; };
watch(
() => [
props.ticket_?.id,
props.ticket_?.state,
props.ticket_?.participant,
props.ticket_?.update_time,
props.workflow_key,
],
tryInit,
{ deep: true, immediate: true },
);
const ticketId = ref(null); const ticketId = ref(null);
const actionShow = ref(false); const actionShow = ref(false);
@ -106,6 +95,20 @@ const init = async () => {
ElMessage.error("缺少workflow_key或ticketId"); ElMessage.error("缺少workflow_key或ticketId");
} }
} }
// immediate watcher init
// const init
watch(
() => [
props.ticket_?.id,
props.ticket_?.state,
props.ticket_?.participant,
props.ticket_?.update_time,
props.workflow_key,
],
tryInit,
{ deep: true, immediate: true },
);
const isSaveing = ref(false); const isSaveing = ref(false);
const isAccepting = ref(false); const isAccepting = ref(false);