mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-06 09:26:46 +08:00
添加接口作业
This commit is contained in:
@@ -32,6 +32,7 @@ export const TASK_VOTE_DETAIL = '/stu/task/vote/detail'
|
||||
export const TASK_WORK_COMMIT = '/workSubmit/submitStudentWorkDetail post'
|
||||
export const TASK_WORK_DETAIL = '/workSubmit/getWorkDetailByTaskId'
|
||||
export const TASK_WORK_SUBMIT_LIST = '/workSubmit/queryWorkSubmitDetailById'
|
||||
export const SUB_STUDENT_DETAIL = `/workSubmit/submitStudentNoWorkDetail post`
|
||||
// 查询学员端是否导入了作业成绩
|
||||
export const WhetherImportHomeWorkScore = '/admin/student/whetherImportHomeWorkScore post'
|
||||
|
||||
|
||||
@@ -210,6 +210,22 @@ const answerTime = dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss");
|
||||
// 增加浏览量
|
||||
watch(dataInfo, () => {
|
||||
useRequest(EditVoteInvolvedAndBrowse, {operationType:'2', voteId:dataInfo.value.id });
|
||||
const noCommit = () => {
|
||||
let noCommitParams = {
|
||||
beginTime: answerTime,
|
||||
chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0,
|
||||
result: JSON.stringify(dataInfo.value),
|
||||
targetId: infoId, // 项目 路径图 id
|
||||
taskId: id,
|
||||
type: btype, // 1 项目 2 路径图
|
||||
voteId: dataInfo.value.id,
|
||||
voteName: dataInfo.value.voteName,
|
||||
studentId: userInfo.value.userId,
|
||||
studentName: userInfo.value.realName,
|
||||
}
|
||||
useRequest(NO_COMMIT, noCommitParams);
|
||||
}
|
||||
noCommit()
|
||||
})
|
||||
|
||||
// 选择题目
|
||||
@@ -268,22 +284,6 @@ const submitVote = () => {
|
||||
// 增加参与数目
|
||||
useRequest(EditVoteInvolvedAndBrowse, {operationType:'1', voteId:dataInfo.value.id });
|
||||
};
|
||||
const noCommit = () => {
|
||||
let noCommitParams = {
|
||||
beginTime: answerTime,
|
||||
chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0,
|
||||
result: JSON.stringify(dataInfo.value),
|
||||
targetId: infoId, // 项目 路径图 id
|
||||
taskId: id,
|
||||
type: btype, // 1 项目 2 路径图
|
||||
voteId: dataInfo.value.id,
|
||||
voteName: dataInfo.value.voteName,
|
||||
studentId: userInfo.value.userId,
|
||||
studentName: userInfo.value.realName,
|
||||
}
|
||||
useRequest(NO_COMMIT, noCommitParams);
|
||||
}
|
||||
noCommit()
|
||||
</script>
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -448,6 +448,7 @@ import {
|
||||
TASK_WORK_COMMIT,
|
||||
TASK_WORK_DETAIL,
|
||||
TASK_WORK_SUBMIT_LIST,
|
||||
SUB_STUDENT_DETAIL,
|
||||
WhetherImportHomeWorkScore,
|
||||
WORK_HISTROY,
|
||||
} from "@/api/api";
|
||||
@@ -571,7 +572,19 @@ const handleClick = () => {
|
||||
loading.value.close()
|
||||
});
|
||||
};
|
||||
|
||||
const handleSub = () => {
|
||||
request(SUB_STUDENT_DETAIL,{
|
||||
projectOrRouterLogo: type,
|
||||
workUploadContent: sbValue.value.content,
|
||||
workUploadAddress: fileList.value.map((e) => e.url).join(",") || "",
|
||||
workId,
|
||||
type,
|
||||
taskId: taskId || infoId,
|
||||
workScore: -1,
|
||||
submitStartTime:answerTime
|
||||
})
|
||||
}
|
||||
handleSub()
|
||||
function clearFiles() {
|
||||
uploadRef.value.clearFiles();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user