diff --git a/src/api/api.js b/src/api/api.js index 6a24190..9898423 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -34,10 +34,14 @@ export const TASK_OFFCOURSE_NOTASK_SIGN = '/stu/task/offcourse/notask/sign post' export const TASK_OFFCOURSE_SIGN = '/stu/task/offcourse/sign post' export const LINK_DETAILS = `/link/getOne` export const STUDY_RECORD = '/stu/task/thirdTask/submit post' +export const LEARN = `/xboe/m/boe/umu/enterprise/learn post` +export const NOLOGINURL = `/xboe/m/boe/hongshan/noLoginUrl post` export const TASK_WORK_SUBMIT_LIST = '/workSubmit/queryWorkSubmitDetailById' +export const SUB_STUDENT_DETAIL = `/workSubmit/submitStudentNoWorkDetail post` export const WORK_HISTROY = '/workSubmit/queryWorkDetailListByStuId' export const ASSESSMENT_QUERY = assessmentId => `/stu/task/queryAssessmentDetailById` export const ASSESSMENT_SUBMIT = '/stu/task/evaluate/commit post' +export const TASK_NO_COMMIT = `/stu/task/evaluate/nocommit post` export const FILE_UPLOAD_ANNEX = import.meta.env.VITE_BASE_API + '/file/stuUploadAnnex' export const ROUTER_DETAILS = '/admin/router/detail' export const TASK_LIST = '/stu/tasks' @@ -88,5 +92,6 @@ export const FILE_UPLOAD_IMG = import.meta.env.VITE_BASE_API + '/file/img' export const QueryEvaluationTaskStatusOne = `/evaluation/queryEvaluationTaskStatusOne` // 投票浏览和参与数目 export const EditVoteInvolvedAndBrowse = `/vote/editVoteInvolvedAndBrowse post` +export const NO_COMMIT = `/voteSubmit/vote/nocommit post` //任务是否删除 export const checkStudentExist = `/admin/taskmanage/checkStudentExist post` \ No newline at end of file diff --git a/src/views/ballotpage/BallotPage.vue b/src/views/ballotpage/BallotPage.vue index 56b956c..ba84e72 100644 --- a/src/views/ballotpage/BallotPage.vue +++ b/src/views/ballotpage/BallotPage.vue @@ -181,6 +181,7 @@ import { VOTE_DETAIL3, VOTE_DETAIL_SUBMIT, EditVoteInvolvedAndBrowse, + NO_COMMIT, checkStudentExist, } from "@/api/api"; import dayjs from "dayjs"; @@ -230,6 +231,18 @@ watch(data, () => { useRequest(EditVoteInvolvedAndBrowse, { operationType: "2", voteId: data.value.id, + },(res)=>{ + let noCommitParams = { + beginTime: answerTime, + chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0, + result: JSON.stringify(data.value), + targetId: infoId, // 项目 路径图 id + taskId: id, + type: btype, // 1 项目 2 路径图 + voteId: data.value.id, + voteName: data.value.voteName, + } + useRequest(NO_COMMIT, noCommitParams); }); }); console.log("投票基本信息", data); diff --git a/src/views/homeworkpage/HomeworkPage.vue b/src/views/homeworkpage/HomeworkPage.vue index 32d5935..49b4412 100644 --- a/src/views/homeworkpage/HomeworkPage.vue +++ b/src/views/homeworkpage/HomeworkPage.vue @@ -99,6 +99,7 @@ import { TASK_WORK_COMMIT, TASK_WORK_DETAIL, TASK_WORK_SUBMIT_LIST, + SUB_STUDENT_DETAIL, WORK_HISTROY, checkStudentExist, } from "@/api/api"; @@ -272,6 +273,17 @@ const dohomework = () => { // function reUpload(i) { // uploadRef.value.reUpload(i); // } +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, + }) +} +handleSub() diff --git a/src/views/investigat/InvestigatPage.vue b/src/views/investigat/InvestigatPage.vue index c02189f..a983329 100644 --- a/src/views/investigat/InvestigatPage.vue +++ b/src/views/investigat/InvestigatPage.vue @@ -266,6 +266,7 @@ import { request, usePage, useRequest } from "@/api/request"; import { ASSESSMENT_QUERY, ASSESSMENT_SUBMIT, + TASK_NO_COMMIT, checkStudentExist, } from "@/api/api"; import { ElMessage } from "element-plus"; @@ -416,6 +417,15 @@ onMounted(() => { chapterOrStageId, targetId: infoId ? infoId : 0, },(res)=>{ + 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, + }) if (res.data.isSubmit) { open(); } diff --git a/src/views/outerchain/OuterChain.vue b/src/views/outerchain/OuterChain.vue index 2057e65..0c8ed89 100644 --- a/src/views/outerchain/OuterChain.vue +++ b/src/views/outerchain/OuterChain.vue @@ -46,7 +46,7 @@
-
去查看
+
去查看
@@ -57,7 +57,7 @@ import ReturnHead from "@/components/ReturnHead.vue"; import { computed, reactive, toRefs, onUnmounted, ref, watch } from "vue"; import img from "@/assets/image/uploadimg.png"; import { request, useRequest } from "@/api/request"; -import { LINK_DETAILS, STUDY_RECORD, checkStudentExist } from "@/api/api"; +import { LINK_DETAILS, STUDY_RECORD, checkStudentExist,LEARN,NOLOGINURL } from "@/api/api"; import { useRoute } from "vue-router/dist/vue-router"; import { useRouter } from "vue-router"; import { useUserInfo } from "@/api/utils"; @@ -105,19 +105,36 @@ const { data } = useRequest(LINK_DETAILS, { linkId, type }, (e) => { console.log("外链信息", data); const userInfo = computed(() => store.state.userInfo); -const goOuterChain = () => { +const goOuterChain = async (url) => { console.log("userInfo", userInfo); - request(STUDY_RECORD, { - studentId: userInfo.value.id, - targetId: infoId, - logo: type, - stageOrChapterId: chapterOrStageId, - taskId: taskId, - type: type, - taskType: 7, - }); - - window.open(data.value.linkAddress, "_top"); + // request(STUDY_RECORD, { + // studentId: userInfo.value.id, + // targetId: infoId, + // logo: type, + // stageOrChapterId: chapterOrStageId, + // taskId: taskId, + // type: type, + // taskType: 7, + // }); + if(url.includes('umu.cn')){ + await request(LEARN, {url,userId:userInfo.value.userId}).then(res=>{ + console.log(res,'res') + if(res.code == 200){ + window.open(res.data, "_top") + } + }) + return + } + if(url.includes('firacademy.com')){ + await request(NOLOGINURL, {url,userId:userInfo.value.userId}).then(res=>{ + if(res.code == 200){ + window.open(res.data, "_top") + } + }) + return + } + window.open(url); + // window.open(data.value.linkAddress, "_top"); }; diff --git a/src/views/projectdetails/projectDetails.vue b/src/views/projectdetails/projectDetails.vue index c6fa130..99e5499 100644 --- a/src/views/projectdetails/projectDetails.vue +++ b/src/views/projectdetails/projectDetails.vue @@ -236,6 +236,8 @@ import { SubmitExternalExam, UPDATE_CURRENT_TASK, checkStudentExist, + EvaluationToLearn, + QueryEvaluationTaskStatusOne } from "@/api/api"; import { useRoute, useRouter } from "vue-router"; import store from "@/store"; @@ -565,6 +567,73 @@ function toFinish(d, sName, chapterOrStageId,studyModel) { return; } } + // if (d.type == 10) { + // if (d.quizTaskId == null) { + // // 肯定没有完成测评 + // // 调用接口 跳转页面 + // request(EvaluationToLearn, { + // "businessType": "project", + // "chapterId": chapterOrStageId, + // "courseId": d.courseId, + // "quizKid": d.targetId, + // "routerOrProjectId": projectId, + // "studentId": userInfo.value.id, + // "studentName": userInfo.value.realName + // }).then(res => { + // console.log(res) + // if (res.code == 200) { + // let jumpUrl = res.data.quizUrl + // // 此处写跳转url + // window.open(jumpUrl, '_top') + // } + // }).catch(err => { + // console.log(err) + // }) + // return + // } else { + // // 进行中 或者 已完成 + // // 调用接口 判断当前测评状态 跳转页面 + // console.log('我是查询测评跳转链接所传递得参数', { + // "quizTaskId": d.quizTaskId + // }) + // request(QueryEvaluationTaskStatusOne, { + // "quizTaskId": d.quizTaskId + // }).then(res => { + // console.log(res) + // if (res.code == 200) { + // if (res.data.complete_status == 2) { + // ElMessage.error("您已完成测评") + // return + // } else { + // // 重新查询跳转 + // // 调用接口 跳转页面 + // request(EvaluationToLearn, { + // "businessType": "project", + // "chapterId": chapterOrStageId, + // "courseId": d.courseId, + // "quizKid": d.targetId, + // "routerOrProjectId": projectId, + // "studentId": userInfo.value.id, + // "studentName": userInfo.value.realName + // }).then(res => { + // console.log(res) + // if (res.code == 200) { + // let jumpUrl = res.data.quizUrl + // // 此处写跳转url + // window.open(jumpUrl, '_top') + // } + // }).catch(err => { + // console.log(err) + // }) + // return + // } + // } + // }).catch(err => { + // console.log(err) + // }) + // return + // } + // } if (!TASK_TYPES.path[d.type]) { ElMessage.error("暂时未开放");