mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-07 01:46:46 +08:00
添加接口
This commit is contained in:
@@ -55,7 +55,7 @@ export const VOTE_DETAIL2 = `/voteSubmit/queryVoteTaskDetailById post`
|
|||||||
export const VOTE_DETAIL3 = voteId => `/vote/queryVoteById?voteId=${voteId}`
|
export const VOTE_DETAIL3 = voteId => `/vote/queryVoteById?voteId=${voteId}`
|
||||||
// 投票详情接口
|
// 投票详情接口
|
||||||
export const VOTE_DETAIL_SUBMIT = `/voteSubmit/vote/commit post`
|
export const VOTE_DETAIL_SUBMIT = `/voteSubmit/vote/commit post`
|
||||||
|
export const NO_COMMIT = `/voteSubmit/vote/nocommit post`
|
||||||
export const COMMENT_ADD = '/comment/add post'
|
export const COMMENT_ADD = '/comment/add post'
|
||||||
export const COMMENT_PRAISE = '/comment/praise'
|
export const COMMENT_PRAISE = '/comment/praise'
|
||||||
export const COMMENT_COLLECTION = '/comment/collection post'
|
export const COMMENT_COLLECTION = '/comment/collection post'
|
||||||
@@ -63,7 +63,7 @@ export const COMMENT_COLLECTION = '/comment/collection post'
|
|||||||
export const ASSESSMENT_SUBMIT_QUERY = assessmentId => `/assessmentSubmit/queryAssessmentSubmitDetailById?assessmentSubmitId=${assessmentId} post`
|
export const ASSESSMENT_SUBMIT_QUERY = assessmentId => `/assessmentSubmit/queryAssessmentSubmitDetailById?assessmentSubmitId=${assessmentId} post`
|
||||||
export const ASSESSMENT_QUERY = assessmentId => `/stu/task/queryAssessmentDetailById`
|
export const ASSESSMENT_QUERY = assessmentId => `/stu/task/queryAssessmentDetailById`
|
||||||
export const ASSESSMENT_SUBMIT = '/stu/task/evaluate/commit post'
|
export const ASSESSMENT_SUBMIT = '/stu/task/evaluate/commit post'
|
||||||
|
export const TASK_NO_COMMIT = `/stu/task/evaluate/nocommit post`
|
||||||
export const ACTIVITY = '/activity'
|
export const ACTIVITY = '/activity'
|
||||||
|
|
||||||
export const STUDY_RECORD = '/stu/task/thirdTask/submit post'
|
export const STUDY_RECORD = '/stu/task/thirdTask/submit post'
|
||||||
|
|||||||
@@ -187,7 +187,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {useRequest} from "@/api/request";
|
import {useRequest} from "@/api/request";
|
||||||
import {VOTE_DETAIL3, VOTE_DETAIL_SUBMIT, EditVoteInvolvedAndBrowse} from "@/api/api";
|
import {VOTE_DETAIL3, VOTE_DETAIL_SUBMIT, EditVoteInvolvedAndBrowse,NO_COMMIT} from "@/api/api";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
@@ -268,6 +268,22 @@ const submitVote = () => {
|
|||||||
// 增加参与数目
|
// 增加参与数目
|
||||||
useRequest(EditVoteInvolvedAndBrowse, {operationType:'1', voteId:dataInfo.value.id });
|
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>
|
</script>
|
||||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ import checkbox from "@/assets/image/checkbox.png";
|
|||||||
import checkbox2 from "@/assets/image/checkbox2.png";
|
import checkbox2 from "@/assets/image/checkbox2.png";
|
||||||
import {useRoute, useRouter} from "vue-router/dist/vue-router";
|
import {useRoute, useRouter} from "vue-router/dist/vue-router";
|
||||||
import {request, usePage, useRequest} from "@/api/request";
|
import {request, usePage, useRequest} from "@/api/request";
|
||||||
import {ASSESSMENT_QUERY, ASSESSMENT_SUBMIT} from "@/api/api";
|
import {ASSESSMENT_QUERY, ASSESSMENT_SUBMIT,TASK_NO_COMMIT} from "@/api/api";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import {ref, watch,onMounted,nextTick } from "vue";
|
import {ref, watch,onMounted,nextTick } from "vue";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
@@ -361,6 +361,18 @@ function submit() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
const noCommit = () => {
|
||||||
|
useRequest(TASK_NO_COMMIT, {
|
||||||
|
targetId: infoId ? infoId : 0, // 项目、路径图或开课的Id
|
||||||
|
chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0, // 关卡或者阶段Id 关卡Id不允许为空
|
||||||
|
assessmentId: courseId,
|
||||||
|
taskId: taskId ? taskId : 0,
|
||||||
|
type,
|
||||||
|
result: JSON.stringify(data.value),
|
||||||
|
beginTime: answerTime
|
||||||
|
})
|
||||||
|
}
|
||||||
|
noCommit()
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.selectonlineface{
|
.selectonlineface{
|
||||||
|
|||||||
Reference in New Issue
Block a user