feat: base submit_b_func需要在add和edit都能调用

This commit is contained in:
zty 2025-10-16 10:52:15 +08:00
parent c90321a264
commit 0cc43d62e0
1 changed files with 8 additions and 8 deletions

View File

@ -58,6 +58,14 @@ const isSaveing = ref(false);
const emit = defineEmits(["success"]);
const submit = async (transition_id) => {
isSaveing.value = true;
if (props.submit_b_func) {
try{
await props.submit_b_func();
}catch (e) {
isSaveing.value = false;
return;
}
}
if (ticketId.value) {
let params = new Object();
params.transition = transition_id;
@ -76,14 +84,6 @@ const submit = async (transition_id) => {
return;
}
} else {
if (props.submit_b_func) {
try{
await props.submit_b_func();
}catch (e) {
isSaveing.value = false;
return;
}
}
let ticket = {};
ticket.title = props.title;
ticket.workflow = workflow.value;