merge
This commit is contained in:
@@ -25,10 +25,10 @@ const handle = (row: Record<string, any>, formData: any[]) => {
|
||||
|
||||
defineExpose({ handle });
|
||||
const emit = defineEmits(['taskSubmitEvent']);
|
||||
|
||||
const submitLoading = ref(false);
|
||||
const submit = () => {
|
||||
let value = currentOpenFlowForm.value;
|
||||
|
||||
submitLoading.value = true;
|
||||
const formData: Record<string, any> = {};
|
||||
for (const item of value) {
|
||||
formData[item.id] = item.props.value;
|
||||
@@ -59,11 +59,16 @@ const submit = () => {
|
||||
},
|
||||
};
|
||||
|
||||
completeTask(param).then((res) => {
|
||||
dialogVisible.value = false;
|
||||
mittBus.emit('updateApproveNum', -1);
|
||||
emit('taskSubmitEvent');
|
||||
});
|
||||
completeTask(param)
|
||||
.then((res) => {
|
||||
submitLoading.value = false;
|
||||
dialogVisible.value = false;
|
||||
mittBus.emit('updateApproveNum', -1);
|
||||
emit('taskSubmitEvent');
|
||||
})
|
||||
.catch(() => {
|
||||
submitLoading.value = false;
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -79,7 +84,7 @@ const submit = () => {
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">{{ $t('TableDialog.index.7634846-1') }}</el-button>
|
||||
<el-button type="primary" @click="submit"> {{ $t('TableDialog.index.7634846-2') }} </el-button>
|
||||
<el-button type="primary" :loading="submitLoading" @click="submit"> {{ $t('TableDialog.index.7634846-2') }} </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
Reference in New Issue
Block a user