mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-11 11:56:48 +08:00
fix: 解决提交作业重复提交问题
This commit is contained in:
@@ -321,10 +321,10 @@ const postAdd = () => {
|
|||||||
return ElMessage.warning("评论标题为空");
|
return ElMessage.warning("评论标题为空");
|
||||||
}
|
}
|
||||||
loading.value = ElLoading.service({
|
loading.value = ElLoading.service({
|
||||||
lock: true,
|
lock: true,
|
||||||
text: "Loading",
|
text: "Loading",
|
||||||
background: "rgba(0, 0, 0, 0.7)",
|
background: "rgba(0, 0, 0, 0.7)",
|
||||||
});
|
});
|
||||||
console.log('用户信息', userInfo.value)
|
console.log('用户信息', userInfo.value)
|
||||||
let obj = {
|
let obj = {
|
||||||
"collectionNum": 0,
|
"collectionNum": 0,
|
||||||
|
|||||||
@@ -456,8 +456,10 @@ import FileTypeImg from "@/components/FileTypeImg.vue";
|
|||||||
import { useRoute } from "vue-router/dist/vue-router";
|
import { useRoute } from "vue-router/dist/vue-router";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import {useTaskPage} from "@/api/useCommon";
|
import {useTaskPage} from "@/api/useCommon";
|
||||||
|
import {ElLoading} from "element-plus";
|
||||||
//import AlertSuccess from "@/components/alert/AlertSuccess.vue";
|
//import AlertSuccess from "@/components/alert/AlertSuccess.vue";
|
||||||
|
|
||||||
|
const loading = ref(false);
|
||||||
const fileList = ref([]);
|
const fileList = ref([]);
|
||||||
const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
||||||
const uploadRef = ref();
|
const uploadRef = ref();
|
||||||
@@ -530,6 +532,12 @@ const handleClick = () => {
|
|||||||
return ElMessage.warning("请输入作业内容");
|
return ElMessage.warning("请输入作业内容");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loading.value = ElLoading.service({
|
||||||
|
lock: true,
|
||||||
|
text: "Loading",
|
||||||
|
background: "rgba(0, 0, 0, 0.7)",
|
||||||
|
});
|
||||||
request(TASK_WORK_COMMIT, {
|
request(TASK_WORK_COMMIT, {
|
||||||
projectOrRouterLogo: type,
|
projectOrRouterLogo: type,
|
||||||
workUploadContent: sbValue.value.content,
|
workUploadContent: sbValue.value.content,
|
||||||
@@ -545,6 +553,11 @@ const handleClick = () => {
|
|||||||
fileList.value = [];
|
fileList.value = [];
|
||||||
remove(0);
|
remove(0);
|
||||||
clearFiles();
|
clearFiles();
|
||||||
|
loading.value.close();
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err)
|
||||||
|
ElMessage.error("提交失败");
|
||||||
|
loading.value.close()
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user