mirror of
https://github.com/imdap/ruoyi-plus-vben5.git
synced 2026-05-07 02:31:58 +08:00
refactor: 新增后跳转到未发布流程
This commit is contained in:
@@ -15,7 +15,7 @@ import {
|
||||
|
||||
import { modalSchema } from './data';
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
const emit = defineEmits<{ reload: [type: 'add' | 'update'] }>();
|
||||
|
||||
const isUpdate = ref(false);
|
||||
const title = computed(() => {
|
||||
@@ -96,10 +96,13 @@ async function handleConfirm() {
|
||||
return;
|
||||
}
|
||||
const data = cloneDeep(await formApi.getValues());
|
||||
await (isUpdate.value
|
||||
? workflowDefinitionUpdate(data)
|
||||
: workflowDefinitionAdd(data));
|
||||
emit('reload');
|
||||
if (isUpdate.value) {
|
||||
await workflowDefinitionUpdate(data);
|
||||
emit('reload', 'update');
|
||||
} else {
|
||||
await workflowDefinitionAdd(data);
|
||||
emit('reload', 'add');
|
||||
}
|
||||
await handleCancel();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
Reference in New Issue
Block a user