mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-06 17:36:45 +08:00
Merge branch 'zcwy-zsx' into 'master-0628'
Zcwy zsx See merge request !47
This commit is contained in:
@@ -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 TASK_OFFCOURSE_SIGN = '/stu/task/offcourse/sign post'
|
||||||
export const LINK_DETAILS = `/link/getOne`
|
export const LINK_DETAILS = `/link/getOne`
|
||||||
export const STUDY_RECORD = '/stu/task/thirdTask/submit post'
|
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 TASK_WORK_SUBMIT_LIST = '/workSubmit/queryWorkSubmitDetailById'
|
||||||
|
export const SUB_STUDENT_DETAIL = `/workSubmit/submitStudentNoWorkDetail post`
|
||||||
export const WORK_HISTROY = '/workSubmit/queryWorkDetailListByStuId'
|
export const WORK_HISTROY = '/workSubmit/queryWorkDetailListByStuId'
|
||||||
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 FILE_UPLOAD_ANNEX = import.meta.env.VITE_BASE_API + '/file/stuUploadAnnex'
|
export const FILE_UPLOAD_ANNEX = import.meta.env.VITE_BASE_API + '/file/stuUploadAnnex'
|
||||||
export const ROUTER_DETAILS = '/admin/router/detail'
|
export const ROUTER_DETAILS = '/admin/router/detail'
|
||||||
export const TASK_LIST = '/stu/tasks'
|
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 QueryEvaluationTaskStatusOne = `/evaluation/queryEvaluationTaskStatusOne`
|
||||||
// 投票浏览和参与数目
|
// 投票浏览和参与数目
|
||||||
export const EditVoteInvolvedAndBrowse = `/vote/editVoteInvolvedAndBrowse post`
|
export const EditVoteInvolvedAndBrowse = `/vote/editVoteInvolvedAndBrowse post`
|
||||||
|
export const NO_COMMIT = `/voteSubmit/vote/nocommit post`
|
||||||
//任务是否删除
|
//任务是否删除
|
||||||
export const checkStudentExist = `/admin/taskmanage/checkStudentExist post`
|
export const checkStudentExist = `/admin/taskmanage/checkStudentExist post`
|
||||||
@@ -181,6 +181,7 @@ import {
|
|||||||
VOTE_DETAIL3,
|
VOTE_DETAIL3,
|
||||||
VOTE_DETAIL_SUBMIT,
|
VOTE_DETAIL_SUBMIT,
|
||||||
EditVoteInvolvedAndBrowse,
|
EditVoteInvolvedAndBrowse,
|
||||||
|
NO_COMMIT,
|
||||||
checkStudentExist,
|
checkStudentExist,
|
||||||
} from "@/api/api";
|
} from "@/api/api";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
@@ -230,6 +231,18 @@ watch(data, () => {
|
|||||||
useRequest(EditVoteInvolvedAndBrowse, {
|
useRequest(EditVoteInvolvedAndBrowse, {
|
||||||
operationType: "2",
|
operationType: "2",
|
||||||
voteId: data.value.id,
|
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);
|
console.log("投票基本信息", data);
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ import {
|
|||||||
TASK_WORK_COMMIT,
|
TASK_WORK_COMMIT,
|
||||||
TASK_WORK_DETAIL,
|
TASK_WORK_DETAIL,
|
||||||
TASK_WORK_SUBMIT_LIST,
|
TASK_WORK_SUBMIT_LIST,
|
||||||
|
SUB_STUDENT_DETAIL,
|
||||||
WORK_HISTROY,
|
WORK_HISTROY,
|
||||||
checkStudentExist,
|
checkStudentExist,
|
||||||
} from "@/api/api";
|
} from "@/api/api";
|
||||||
@@ -272,6 +273,17 @@ const dohomework = () => {
|
|||||||
// function reUpload(i) {
|
// function reUpload(i) {
|
||||||
// uploadRef.value.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()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||||
|
|||||||
@@ -266,6 +266,7 @@ import { request, usePage, useRequest } from "@/api/request";
|
|||||||
import {
|
import {
|
||||||
ASSESSMENT_QUERY,
|
ASSESSMENT_QUERY,
|
||||||
ASSESSMENT_SUBMIT,
|
ASSESSMENT_SUBMIT,
|
||||||
|
TASK_NO_COMMIT,
|
||||||
checkStudentExist,
|
checkStudentExist,
|
||||||
} from "@/api/api";
|
} from "@/api/api";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
@@ -416,6 +417,15 @@ onMounted(() => {
|
|||||||
chapterOrStageId,
|
chapterOrStageId,
|
||||||
targetId: infoId ? infoId : 0,
|
targetId: infoId ? infoId : 0,
|
||||||
},(res)=>{
|
},(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) {
|
if (res.data.isSubmit) {
|
||||||
open();
|
open();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<div class="submitbtn" @click="goOuterChain">去查看</div>
|
<div class="submitbtn" @click="goOuterChain(data.linkAddress)">去查看</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -57,7 +57,7 @@ import ReturnHead from "@/components/ReturnHead.vue";
|
|||||||
import { computed, reactive, toRefs, onUnmounted, ref, watch } from "vue";
|
import { computed, reactive, toRefs, onUnmounted, ref, watch } from "vue";
|
||||||
import img from "@/assets/image/uploadimg.png";
|
import img from "@/assets/image/uploadimg.png";
|
||||||
import { request, useRequest } from "@/api/request";
|
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 { useRoute } from "vue-router/dist/vue-router";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useUserInfo } from "@/api/utils";
|
import { useUserInfo } from "@/api/utils";
|
||||||
@@ -105,19 +105,36 @@ const { data } = useRequest(LINK_DETAILS, { linkId, type }, (e) => {
|
|||||||
|
|
||||||
console.log("外链信息", data);
|
console.log("外链信息", data);
|
||||||
const userInfo = computed(() => store.state.userInfo);
|
const userInfo = computed(() => store.state.userInfo);
|
||||||
const goOuterChain = () => {
|
const goOuterChain = async (url) => {
|
||||||
console.log("userInfo", userInfo);
|
console.log("userInfo", userInfo);
|
||||||
request(STUDY_RECORD, {
|
// request(STUDY_RECORD, {
|
||||||
studentId: userInfo.value.id,
|
// studentId: userInfo.value.id,
|
||||||
targetId: infoId,
|
// targetId: infoId,
|
||||||
logo: type,
|
// logo: type,
|
||||||
stageOrChapterId: chapterOrStageId,
|
// stageOrChapterId: chapterOrStageId,
|
||||||
taskId: taskId,
|
// taskId: taskId,
|
||||||
type: type,
|
// type: type,
|
||||||
taskType: 7,
|
// taskType: 7,
|
||||||
});
|
// });
|
||||||
|
if(url.includes('umu.cn')){
|
||||||
window.open(data.value.linkAddress, "_top");
|
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");
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -236,6 +236,8 @@ import {
|
|||||||
SubmitExternalExam,
|
SubmitExternalExam,
|
||||||
UPDATE_CURRENT_TASK,
|
UPDATE_CURRENT_TASK,
|
||||||
checkStudentExist,
|
checkStudentExist,
|
||||||
|
EvaluationToLearn,
|
||||||
|
QueryEvaluationTaskStatusOne
|
||||||
} from "@/api/api";
|
} from "@/api/api";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
@@ -565,6 +567,73 @@ function toFinish(d, sName, chapterOrStageId,studyModel) {
|
|||||||
return;
|
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]) {
|
if (!TASK_TYPES.path[d.type]) {
|
||||||
ElMessage.error("暂时未开放");
|
ElMessage.error("暂时未开放");
|
||||||
|
|||||||
Reference in New Issue
Block a user