|
|
|
|
@ -378,6 +378,7 @@
|
|
|
|
|
mode="add" |
|
|
|
|
:model="addForm" |
|
|
|
|
:rules="addRules" |
|
|
|
|
:loading="submitting" |
|
|
|
|
@submit="submitAdd" |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
@ -546,6 +547,7 @@ const createEmptyAddForm = () => ({
|
|
|
|
|
approvalFlow: '', |
|
|
|
|
}); |
|
|
|
|
const addShow = ref(false); |
|
|
|
|
const submitting = ref(false); // 提交锁,防止重复提交 |
|
|
|
|
const addForm = ref(createEmptyAddForm()); |
|
|
|
|
// 添加按钮 |
|
|
|
|
const add = async () => { |
|
|
|
|
@ -555,6 +557,8 @@ const add = async () => {
|
|
|
|
|
|
|
|
|
|
// 添加提交 |
|
|
|
|
const submitAdd = async () => { |
|
|
|
|
if (submitting.value) return // 防止重复提交 |
|
|
|
|
submitting.value = true |
|
|
|
|
try { |
|
|
|
|
const body = {...addForm.value} |
|
|
|
|
let res = await addComplaintCollection(body); |
|
|
|
|
@ -569,6 +573,7 @@ const submitAdd = async () => {
|
|
|
|
|
console.error(e); |
|
|
|
|
feedback.notifyError("操作失败"); |
|
|
|
|
} finally { |
|
|
|
|
submitting.value = false |
|
|
|
|
getList() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|