Browse Source

fix:投诉举报重复提交问题

feature/tsjb-1.0
buaixuexideshitongxue 2 weeks ago
parent
commit
1b01eda9a2
  1. 2
      src/components/data/complaintformdialog.vue
  2. 5
      src/views/data/ComplaintCollection.vue

2
src/components/data/complaintformdialog.vue

@ -328,7 +328,7 @@
<template #footer>
<div class="dialog-footer">
<el-button @click="visibleProxy = false" size="large">取消</el-button>
<el-button type="primary" @click="onSubmit" size="large" :loading="submitLoading">
<el-button type="primary" @click="onSubmit" size="large" :loading="loading || submitLoading">
{{ mode === 'add' ? '添加' : '修改' }}
</el-button>
</div>

5
src/views/data/ComplaintCollection.vue

@ -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()
}
}

Loading…
Cancel
Save