feat: base 优化ticket_b_start

This commit is contained in:
caoqianming 2025-09-23 15:11:24 +08:00
parent 83edbad12d
commit 9ebf3e232b
1 changed files with 3 additions and 3 deletions

View File

@ -27,11 +27,11 @@ const props = defineProps({
const workflow = ref(null); const workflow = ref(null);
const transitions = ref([]); const transitions = ref([]);
onMounted(async () => { onMounted(async () => {
if (props.ticketId) { if (props.ticketId != null && props.ticketId != undefined) {
API.wf.ticket.ticketTransitions.req(props.ticketId).then(res => { API.wf.ticket.ticketTransitions.req(props.ticketId).then(res => {
transitions.value = res; transitions.value = res;
}); });
}else if (props.workflow_key) { }else if (props.workflow_key !=null && props.workflow_key != undefined) {
let res = await API.wf.workflow.initkey.req(props.workflow_key); let res = await API.wf.workflow.initkey.req(props.workflow_key);
transitions.value = res.transitions; transitions.value = res.transitions;
workflow.value = res.workflow workflow.value = res.workflow
@ -49,7 +49,7 @@ const submit = async (transition_id) => {
if (props.submit_b_func) { if (props.submit_b_func) {
await props.submit_b_func(); await props.submit_b_func();
} }
if (props.ticketId != null) { if (props.ticketId != null && props.ticketId != undefined) {
let params = new Object(); let params = new Object();
params.transition = transition_id; params.transition = transition_id;
if (props.ticket_data) { if (props.ticket_data) {