修改阶段状态

This commit is contained in:
yuping
2023-02-18 12:54:42 +08:00
parent 5dc9c0ef0d
commit e75e61d337
2 changed files with 1054 additions and 1016 deletions

View File

@@ -18,21 +18,11 @@
<div v-if="i.stageId == '0' && i.taskProcessList.length == 0"></div>
<div v-else class="title">
<div class="titleL">{{ i.stageName }}</div>
<!-- 当前任务已结束的时候显示下面 -->
<div v-if="i.status==3" class="titleR" :style="{ display: 'flex' }">
<div style="width:8px;height:8px;border-radius:8px;border:2px solid #999;"></div>
<div class="titleRT" style="color:#999;">已结束</div>
</div>
<!-- 未开始 -->
<div v-else-if="i.status==2" class="titleR" :style="{ display: 'flex' }">
<div style="width:8px;height:8px;border-radius:8px;border:2px solid #999;"></div>
<div class="titleRT" style="color:#999;">未开始</div>
</div>
<!-- 默认进行中状态 -->
<div v-else class="titleR" :style="{ display: 'flex' }">
<img src="../../assets/image/pathdetails/circle.png" />
<div class="titleRT">
{{ queryAllStatus(i.taskProcessList) ? '已完成' : '进行中' }}
<div class="titleR" :style="{ display: 'flex' }">
<img src="../../assets/image/pathdetails/circle.png"/>
<div class="titleRT"
:style="(i.stageStatusName === '未开始' || i.stageStatusName === '已结束') && 'color:#999'">
{{ i.stageStatusName }}
</div>
</div>
<!-- <div class="titleR" :style="{ display: i.status === 2 ? 'flex' : 'none' }">
@@ -149,7 +139,9 @@
align-items: center;
margin-bottom: 15px;">
<!-- <img :src="value.img" style="width: 22px; height: 26px"/> -->
<FileTypeImg :v-model="value.name? value.name : value.slice(value.lastIndexOf('/')+1,value.indexOf('-')) + value.slice(value.lastIndexOf('.'))" :style="{width: '22px',height: '26px'}"></FileTypeImg>
<FileTypeImg
:v-model="value.name? value.name : value.slice(value.lastIndexOf('/')+1,value.indexOf('-')) + value.slice(value.lastIndexOf('.'))"
:style="{width: '22px',height: '26px'}"></FileTypeImg>
<div class="sharedocname">{{ value.name }}</div>
<div class="download">
<img
@@ -168,13 +160,13 @@
<div class="detailRB">
<div class="info">
<div class="title">
<img style="width: 21px; height: 20px" src="../../assets/image/pathdetails/info.png" />
<img style="width: 21px; height: 20px" src="../../assets/image/pathdetails/info.png"/>
<div class="text" style="margin-left: 7px">个人信息</div>
<div class="box"></div>
</div>
<!-- todo #路径详情 个人信息缺少img和介绍-->
<div class="teacheritem" :style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }">
<img class="peopleimg" :src="userInfo?.avatar" />
<img class="peopleimg" :src="userInfo?.avatar"/>
<div style="margin-left: 17px">
<div class="teacherName">
<div style="margin-right: 5px">
@@ -187,7 +179,7 @@
</div>
<div class="info" style="padding-top: 20px">
<div class="title">
<img style="width: 18px; height: 17px" src="../../assets/image/pathdetails/study.png" />
<img style="width: 18px; height: 17px" src="../../assets/image/pathdetails/study.png"/>
<div class="text" style="margin-left: 9px">学习进度</div>
<div class="box"></div>
</div>
@@ -212,7 +204,7 @@
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.totalProgress * 100) / 20)]
" />
"/>
</div>
<div style="font-size: 14px; font-weight: 500; margin-left: 10px;color:#677d86;">
{{ parseInt(data.totalProgress * 100) }}%
@@ -235,7 +227,7 @@
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.compulsoryProgress * 100) / 20)]
" />
"/>
</div>
<div style="
font-size: 14px;
@@ -253,12 +245,14 @@
<!-- 学员积分及个人完成度排行榜 -->
<div class="detailRB">
<div class="info">
<div style="display:flex;justify-content: space-between;align-items: center;height: 56px;padding-left: 27px;padding-right: 27px;">
<div
style="display:flex;justify-content: space-between;align-items: center;height: 56px;padding-left: 27px;padding-right: 27px;">
<div
@click="tabChange(1)"
style="font-size: 14px;color: rgba(51, 51, 51, 1);font-weight: 600;cursor: pointer;"
:style="{}"
>积分排行榜</div>
>积分排行榜
</div>
<!-- <div style="font-size: 14px;color: rgba(51, 51, 51, 1);font-weight: 600;">完成度排行榜</div> -->
<el-select
@change="choiceStatus"
@@ -279,24 +273,33 @@
<div style="display: flex;height: 1px;background-color: #ecf5ff;justify-content: space-between;">
<div v-if="tabValue==1" style="width:90px;height: 2px;background-color: #409EFF;margin-left: 18px;"></div>
<div v-else style="width:90px;height: 2px;background-color: rgba(0,0,0,0);margin-left: 18px;"></div>
<div v-if="tabValue!==1" style="width:146px;height: 2px;background-color: #409EFF;margin-right: 18px;"></div>
<div v-if="tabValue!==1"
style="width:146px;height: 2px;background-color: #409EFF;margin-right: 18px;"></div>
<div v-else style="width:146px;height: 2px;background-color: rgba(0,0,0,0);margin-right: 18px;"></div>
</div>
<!-- line -->
<div style="width: 100%;display: flex;flex-direction: column;height: 66px;justify-content: center;">
<div style="display: flex;justify-content: space-between;">
<div style="width:90px;margin-left: 50px;font-size: 14px;color: rgba(103, 125, 134, 1);">我的排名:{{ myIndex }}</div>
<div style="width:90px;margin-left: 50px;font-size: 14px;color: rgba(103, 125, 134, 1);">
我的排名:{{ myIndex }}
</div>
<div style="width:146px;margin-right: -30px;font-size: 14px;color: rgba(103, 125, 134, 1);">
{{tabValue==1?"项目积分 ":"完成度 "}} {{ tabValue==1? myPoint : myRateStr }}
{{ tabValue == 1 ? "项目积分 " : "完成度 " }} {{ tabValue == 1 ? myPoint : myRateStr }}
</div>
</div>
</div>
<!-- 排行榜列表 -->
<div style="display: flex;padding-top: 30px;padding-bottom: 100px;background: linear-gradient(0deg, rgba(36,120,255,0) 0%, rgba(36,120,255,0.15) 100%);">
<div
style="display: flex;padding-top: 30px;padding-bottom: 100px;background: linear-gradient(0deg, rgba(36,120,255,0) 0%, rgba(36,120,255,0.15) 100%);">
<div style="display: flex;justify-content: center;align-items: center;width: 100%;">
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;">排名</div>
<div style="margin-left: 110px;margin-right: 110px;font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;">名称</div>
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;">{{tabValue==1?"积分":"进度"}}</div>
<div
style="margin-left: 110px;margin-right: 110px;font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;">
名称
</div>
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;">
{{ tabValue == 1 ? "积分" : "进度" }}
</div>
</div>
</div>
<!-- 学员列表 -->
@@ -304,8 +307,9 @@
<div
v-for="(item,i) in tableRankData" :key="i"
style="display: flex;justify-content: center;align-items: center;width: 100%;position: relative;top:-60px;margin-bottom: 38px;">
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;position: relative;">
{{ i + 1 == 1 || i + 1 == 2 || i + 1 == 3 ? '': i + 1 }}
<div
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;position: relative;">
{{ i + 1 == 1 || i + 1 == 2 || i + 1 == 3 ? '' : i + 1 }}
<img
v-if="i + 1 == 1"
style="width: 24px; height: 24px;"
@@ -327,15 +331,17 @@
src="../../assets/image/rankme.png"
/>
</div>
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
<div
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
<img
style="width: 28px; height: 28px;border-radius: 28px;"
:src="item?.avatar"
/>
{{item.name}}
{{ item.name }}
</div>
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
{{tabValue==1?item?.pointsCount:item?.rateStr}}
<div
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
{{ tabValue == 1 ? item?.pointsCount : item?.rateStr }}
</div>
</div>
@@ -343,36 +349,42 @@
<div
v-if="myIndex > tableRankData.length"
style="display: flex;justify-content: center;align-items: center;width: 100%;position: relative;top:-60px;margin-bottom: 38px;">
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
<div
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
{{ '...' }}
</div>
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
{{''}}
<div
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
{{ '' }}
</div>
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
{{''}}
<div
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
{{ '' }}
</div>
</div>
<div
v-if="myIndex > tableRankData.length"
style="display: flex;justify-content: center;align-items: center;width: 100%;position: relative;top:-60px;margin-bottom: 38px;">
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
<div
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
{{ myIndex }}
<img
style="width: 24px; height: 24px;position: absolute;left:110px;"
src="../../assets/image/rankme.png"
/>
</div>
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
<div
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
<img
style="width: 28px; height: 28px;border-radius: 28px;"
:src="tableRankData[myIndex-1]?.avatar"
/>
{{tableRankData[myIndex-1]?.name}}
{{ tableRankData[myIndex - 1]?.name }}
</div>
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
{{tabValue==1?tableRankData[myIndex-1]?.pointsCount:tableRankData[myIndex-1]?.rateStr}}
<div
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
{{ tabValue == 1 ? tableRankData[myIndex - 1]?.pointsCount : tableRankData[myIndex - 1]?.rateStr }}
</div>
</div>
@@ -397,10 +409,10 @@
</div>
</template>
<script setup>
import { computed, reactive, ref } from "vue";
import { ElLoading } from 'element-plus'
import {computed, reactive, ref, watch} from "vue";
import {ElLoading} from 'element-plus'
import img from "@/assets/image/uploadimg.png";
import { useRequest, request } from "@/api/request";
import {useRequest, request} from "@/api/request";
import {
PROJECT_PROCESS,
ONLINE_PROCESS,
@@ -412,30 +424,35 @@ import {
PointList,
SubmitExternalExam
} from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import {useRoute, useRouter} from "vue-router";
import store from "@/store";
import { ElMessage } from "element-plus";
import {ElMessage} from "element-plus";
import {PROJECT} from "@/api/CONST";
import FileTypeImg from "@/components/FileTypeImg.vue";
import {UPDATE_CURRENT_TASK} from "../../api/api";
import dayjs from "dayjs";
const {
query: { courseId, projectId },
query: {courseId, projectId},
} = useRoute();
const router = useRouter();
const { data } = useRequest(PROJECT_PROCESS, {
const {data} = useRequest(PROJECT_PROCESS, {
projectId: projectId || courseId,
});
watch(() => data.value.stageProcessList, () => {
data.value.stageProcessList.forEach((t)=>{t.stageStatusName = getTaskStatus(t)})
}, {deep: true})
const studyProgress = [
{
value:2,
label:"个人完成度"
value: 2,
label: "个人完成度"
},
{
value:3,
label:"小组完成度"
value: 3,
label: "小组完成度"
}
];
const stateValue = ref(undefined)
@@ -446,30 +463,30 @@ const choiceStatus = (e) => {
console.log(e)
tabValue.value = e
stateValue.value = e
if(e==2){
if (e == 2) {
// 获取个人完成度
request(CompletionList, {projectId:projectId,type:0}).then(res=>{
request(CompletionList, {projectId: projectId, type: 0}).then(res => {
console.log('获取个人完成度---》', res)
if(res.code==200){
if (res.code == 200) {
tableRankData.value = res.data.datas
myIndex.value = res.data.myIndex
myRate.value = res.data.myRate
myRateStr.value = res.data.myRateStr
}
}).catch(err=>{
}).catch(err => {
console.log(err)
});
}else{
} else {
// 获取小组完成度
request(CompletionList, {projectId:projectId,type:1}).then(res=>{
request(CompletionList, {projectId: projectId, type: 1}).then(res => {
console.log('获取小组完成度---》', res)
if(res.code==200){
if (res.code == 200) {
tableRankData.value = res.data.datas
myIndex.value = res.data.myIndex
myRate.value = res.data.myRate
myRateStr.value = res.data.myRateStr
}
}).catch(err=>{
}).catch(err => {
console.log(err)
});
}
@@ -481,14 +498,14 @@ const tabChange = (tabs) => {
stateValue.value = undefined;
tabValue.value = tabs;
// 获取项目积分
request(PointList, {projectId:projectId}).then(res=>{
request(PointList, {projectId: projectId}).then(res => {
console.log('我是获取的项目积分---》', res)
if(res.code==200){
if (res.code == 200) {
tableRankData.value = res.data.datas
myIndex.value = res.data.myIndex
myPoint.value = res.data.myPointsCount
}
}).catch(err=>{
}).catch(err => {
console.log(err)
});
}
@@ -496,19 +513,33 @@ const tableRankData = ref([])
const myIndex = ref('')
const myPoint = ref('')
// 获取项目积分
request(PointList, {projectId:projectId}).then(res=>{
request(PointList, {projectId: projectId}).then(res => {
console.log('我是获取的项目积分---》', res)
if(res.code==200){
if (res.code == 200) {
tableRankData.value = res.data.datas
myIndex.value = res.data.myIndex
myPoint.value = res.data.myPointsCount
}
}).catch(err=>{
}).catch(err => {
console.log(err)
});
});
console.log("datadata", data);
function getTaskStatus(d){
if (data.value.status !== 3) {
return '已结束'
}
if (dayjs().isBefore(dayjs(d.beginTime)) || !d.taskProcessList?.filter(t => t.status === 1)?.length) {
return '未开始'
}
if (dayjs().isAfter(dayjs(data.value.endTime))) {
return '已结束'
}
if (d.taskProcessList?.filter(t => t.status === 1)?.length === d.taskProcessList?.length) {
return '已完成'
}
return '进行中'
}
const loading = ref(false);
loading.value = ElLoading.service({
@@ -539,7 +570,7 @@ const activeName = ref("first");
const handleClick = (tab, event) => {
console.log(tab, event);
};
const path = { 1: "path" };
const path = {1: "path"};
const types = ref({
typeName: {
1: "在线",
@@ -573,20 +604,20 @@ const types = ref({
},
path: {
1: window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
2: ({ courseId }) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${courseId}`, '_top'),
2: ({courseId}) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${courseId}`, '_top'),
3: window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
4: "/homeworkpage",
5: window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
6: "/livebroadcast",
7: ({ targetId }) => window.open(targetId, '_top'),
7: ({targetId}) => window.open(targetId, '_top'),
8: "/discusspage",
9: "/moreactive",
10: ({ evaType, targetId }) =>
10: ({evaType, targetId}) =>
window.open(
evaType == 0
? window.location.protocol + import.meta.env.VITE_BOE_TEST_DETAIL_URL+ targetId
: window.location.protocol + import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL+targetId+`&quizTaskKid=${projectId}&channelCode=project`
,'_top'), //测评
? window.location.protocol + import.meta.env.VITE_BOE_TEST_DETAIL_URL + targetId
: window.location.protocol + import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL + targetId + `&quizTaskKid=${projectId}&channelCode=project`
, '_top'), //测评
11: "/surveydetail",
12: "/ballotpage",
13: "/projectdetails",
@@ -845,15 +876,17 @@ async function toFinish(d, sName, chapterOrStageId) {
types.value.path[d.type](d);
}
}
function whiteTypes(type) {
return import.meta.env.VITE_TASK_WHITE_TYPE.includes("-" + type + "-");
}
// 查询当前阶段所有任务是否都完成
const queryAllStatus = (data) => {
// status === 1 已完成
console.log(data)
for(let i=0;i<data.length;i++) {
if(data[i].status!==1){
for (let i = 0; i < data.length; i++) {
if (data[i].status !== 1) {
return false
}
}
@@ -861,15 +894,15 @@ const queryAllStatus = (data) => {
}
// 共享文档下载
function downloadFile(url){
function downloadFile(url) {
window.open(url);
}
// 继续学习
function continueLearn(lastLearnedId){
data.value.stageProcessList.forEach(stage=>{
stage?.taskProcessList?.forEach(d=>{
if(d.projectTaskId == lastLearnedId){
function continueLearn(lastLearnedId) {
data.value.stageProcessList.forEach(stage => {
stage?.taskProcessList?.forEach(d => {
if (d.projectTaskId == lastLearnedId) {
toFinish(d, stage.stageName, stage.stageId)
}
})

View File

@@ -20,16 +20,10 @@
<div class="titleL">{{ data.currentStageName }}</div>
<div class="titleR" :style="{ display: 'flex' }">
<img :src="data.currentChapterCnt ? circle : circle2" />
<div class="titleRT">
<!-- <div class="titleRT" :style="{ color: data.currentChapterCnt ? '' : 'rgba(102, 102, 102, 1)' }"> -->
<!-- {{ data.currentChapterCnt ? '进行中' : '未开始' }} -->
进行中
<div class="titleRT" :style="(stageStatusName === '未开始' || stageStatusName === '已结束') && 'color:#999'">{{stageStatusName}}</div>
</div>
</div>
</div>
<div class="course" v-for="(value, index) in data.taskBoList?.filter(
(e) => !whiteTypes(e.type)
)" :key="index">
<div class="course" v-for="(value, index) in data.taskBoList?.filter((e) => !whiteTypes(e.type))" :key="index">
<div style="width: 70%">
<div v-if="value.name.length > 50" class="coursename" :title="value.name">
<el-popover ref="popover" placement="right" trigger="hover" :width="300" :content="value.name">
@@ -294,9 +288,20 @@ const returnclick = () => {
};
const { data } = useRequest(ROUTER_PROCESS, { routerId });
const userInfo = computed(() => store.state.userInfo);
console.log('lalalallala', data)
const activeName = ref("first");
const stageStatusName = computed(()=>{
if(data.value.status !== 1){
return '已结束'
}
if(!data.value.taskBoList?.filter(t=>t.status===1)?.length){
return '未开始'
}
if(data.value.taskBoList.filter(t=>t.status===1).length === data.value.taskBoList.length){
return '已完成'
}
return '进行中'
});
const handleClick = (tab, event) => {
console.log(tab, event);
};
@@ -369,9 +374,9 @@ function judgeTaskIsEnd(type, endTimes, status) {
case 1:
status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
break;
case 3:
status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
break;
// case 3:
// status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
// break;
case 5:
status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
break;
@@ -385,11 +390,11 @@ function judgeTaskIsEnd(type, endTimes, status) {
return isEnd;
}
function toFinish(d) {
async function toFinish(d) {
console.log(d)
console.log(data.value.currentStageId, routerId)
if(judgeTaskIsEnd(d.type ,data.value.endTime, data.value.status)){
if (judgeTaskIsEnd(d.type, data.value.endTime, data.value.status)) {
ElMessage.error("当前任务已结束")
return
}
@@ -437,7 +442,7 @@ function toFinish(d) {
return
}
// 此处判断外部考试跳转
if(d.examType==2){
if (d.examType == 2) {
// 点击即更新状态 进行中
request(SubmitExternalExam, {
@@ -446,16 +451,16 @@ function toFinish(d) {
"externalName": d.name,
"targetId": routerId,
"studentNo": userInfo.value.userNo
}).then(res=>{
}).then(res => {
console.log(res)
}).catch(err=>{
}).catch(err => {
console.log(err)
})
router.push({
path: '/externalexamination',
query: {
id: d.routerTaskId,
id: d.id,
type: ROUTER,
infoId: routerId,
courseId: d.courseId,
@@ -506,22 +511,22 @@ function toFinish(d) {
}
}
//更新学员当前任务
request(UPDATE_CURRENT_TASK,{id:d.routerTaskId,type:ROUTER,pid:routerId,name:d.name})
await request(UPDATE_CURRENT_TASK, {id: d.id, type: ROUTER, pid: routerId, name: d.name})
if (d.type === 3 || d.type === 7) {
d.status!==1 && request(STUDY_RECORD, {
d.status !== 1 && await request(STUDY_RECORD, {
studentId: userInfo.value.id,
targetId: data.value.routerId,
logo: ROUTER,
stageOrChapterId: data.value.currentStageId,
taskId: d.routerTaskId,
taskId: d.id,
});
// 此处判断外链跳转详情界面
if(d.type==7){
if (d.type == 7) {
router.push({
path: '/outerchain',
query: {
id: d.routerTaskId,
id: d.id,
type: ROUTER,
infoId: routerId,
courseId: d.courseId,
@@ -536,14 +541,14 @@ function toFinish(d) {
}
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 2023-02-04
if(d.type == 10) {
if (d.type == 10) {
// 此处判断测评跳转详情界面
router.push({
path: '/evaluation',
query: {
id: d.routerTaskId,
id: d.id,
type: ROUTER,
infoId: routerId,
courseId: d.courseId,
@@ -557,7 +562,7 @@ function toFinish(d) {
return
// 调用接口 跳转页面
console.log('我是查询测评跳转链接所传递得参数',{
console.log('我是查询测评跳转链接所传递得参数', {
"businessType": "learningpath",
"chapterId": data.value.currentStageId,
"courseId": d.courseId,
@@ -574,14 +579,14 @@ function toFinish(d) {
"routerOrProjectId": routerId,
"studentId": userInfo.value.id,
"studentName": userInfo.value.realName
}).then(res=>{
}).then(res => {
console.log(res)
if(res.code==200){
if (res.code == 200) {
let jumpUrl = res.data.quizUrl
// 此处写跳转url
window.open( jumpUrl, '_top')
window.open(jumpUrl, '_top')
}
}).catch(err=>{
}).catch(err => {
console.log(err)
})
return
@@ -590,13 +595,13 @@ function toFinish(d) {
if (typeof types.value.path[d.type] === "string") {
types.value.path[d.type] &&
types.value.path[d.type].startsWith("http") &&
window.open(types.value.path[d.type] + d.targetId,'_top');
window.open(types.value.path[d.type] + d.targetId, '_top');
types.value.path[d.type] &&
types.value.path[d.type].startsWith("/") &&
router.push({
path: types.value.path[d.type],
query: {
id: d.routerTaskId,
id: d.id,
type: ROUTER,
infoId: routerId,
courseId: d.courseId,