mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-11 03:46:48 +08:00
-- fix bug
This commit is contained in:
@@ -335,7 +335,7 @@
|
|||||||
{{item.name}}
|
{{item.name}}
|
||||||
</div>
|
</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;">
|
||||||
{{tabValue==1?item.pointsCount:item.rateStr}}
|
{{tabValue==1?item?.pointsCount:item?.rateStr}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -369,10 +369,10 @@
|
|||||||
style="width: 28px; height: 28px;border-radius: 28px;"
|
style="width: 28px; height: 28px;border-radius: 28px;"
|
||||||
:src="tableRankData[myIndex-1]?.avatar"
|
:src="tableRankData[myIndex-1]?.avatar"
|
||||||
/>
|
/>
|
||||||
{{tableRankData[myIndex-1].name}}
|
{{tableRankData[myIndex-1]?.name}}
|
||||||
</div>
|
</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;">
|
||||||
{{tabValue==1?tableRankData[myIndex-1].pointsCount:tableRankData[myIndex-1].rateStr}}
|
{{tabValue==1?tableRankData[myIndex-1]?.pointsCount:tableRankData[myIndex-1]?.rateStr}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -607,9 +607,10 @@ function judgeTaskIsEnd(type, endTimes, status) {
|
|||||||
case 1:
|
case 1:
|
||||||
status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
|
status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
|
||||||
break;
|
break;
|
||||||
case 3:
|
//案例么有时间限制
|
||||||
status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
|
// case 3:
|
||||||
break;
|
// status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
|
||||||
|
// break;
|
||||||
case 5:
|
case 5:
|
||||||
status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
|
status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
|
||||||
break;
|
break;
|
||||||
@@ -623,226 +624,226 @@ function judgeTaskIsEnd(type, endTimes, status) {
|
|||||||
return isEnd;
|
return isEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
function toFinish(d, sName, chapterOrStageId) {
|
async function toFinish(d, sName, chapterOrStageId) {
|
||||||
console.log("dddddd", d, sName, chapterOrStageId);
|
console.log("dddddd", d, sName, chapterOrStageId);
|
||||||
if(judgeTaskIsEnd(d.type ,data.value.endTime, data.value.status)){
|
if (judgeTaskIsEnd(d.type, data.value.endTime, data.value.status)) {
|
||||||
ElMessage.error("当前任务已结束")
|
ElMessage.error("当前任务已结束")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (d.type == 2) {
|
if (d.type == 2) {
|
||||||
let date1 = new Date(d.endTime).getTime();
|
let date1 = new Date(d.endTime).getTime();
|
||||||
let date2 = new Date().getTime();
|
let date2 = new Date().getTime();
|
||||||
if (date1 < date2) {
|
if (date1 < date2) {
|
||||||
dialogVisibleTip.value = '当前面授课已结束';
|
dialogVisibleTip.value = '当前面授课已结束';
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
|
|
||||||
//return
|
//return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 作业过期判断
|
// 作业过期判断
|
||||||
if (d.type == 4) {
|
if (d.type == 4) {
|
||||||
let date1 = new Date(d.endTime).getTime();
|
let date1 = new Date(d.endTime).getTime();
|
||||||
let date2 = new Date().getTime();
|
let date2 = new Date().getTime();
|
||||||
if (date1 < date2) {
|
if (date1 < date2) {
|
||||||
dialogVisibleTip.value = '当前作业已结束';
|
dialogVisibleTip.value = '当前作业已结束';
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
|
|
||||||
//return
|
//return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 直播结束时间
|
// 直播结束时间
|
||||||
if (d.type == 6) {
|
if (d.type == 6) {
|
||||||
let date1 = new Date(d.endTime).getTime();
|
let date1 = new Date(d.endTime).getTime();
|
||||||
let date2 = new Date().getTime();
|
let date2 = new Date().getTime();
|
||||||
if (date1 < date2) {
|
if (date1 < date2) {
|
||||||
dialogVisibleTip.value = '当前直播已结束';
|
dialogVisibleTip.value = '当前直播已结束';
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
//return
|
//return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 考试 停用
|
// 考试 停用
|
||||||
if (d.type == 5) {
|
if (d.type == 5) {
|
||||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||||
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||||
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 此处判断外部考试跳转
|
// 此处判断外部考试跳转
|
||||||
if(d.examType==2){
|
if (d.examType == 2) {
|
||||||
|
|
||||||
// 点击即更新状态 进行中
|
// 点击即更新状态 进行中
|
||||||
request(SubmitExternalExam, {
|
request(SubmitExternalExam, {
|
||||||
"chapterId": chapterOrStageId,
|
"chapterId": chapterOrStageId,
|
||||||
"externalId": d.courseId,
|
"externalId": d.courseId,
|
||||||
"externalName": d.name,
|
"externalName": d.name,
|
||||||
"targetId": data.value.projectId,
|
"targetId": data.value.projectId,
|
||||||
"studentNo": userInfo.value.userNo
|
"studentNo": userInfo.value.userNo
|
||||||
}).then(res=>{
|
}).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
}).catch(err=>{
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
|
|
||||||
router.push({
|
router.push({
|
||||||
path: '/externalexamination',
|
path: '/externalexamination',
|
||||||
query: {
|
query: {
|
||||||
id: d.projectTaskId,
|
id: d.projectTaskId,
|
||||||
type: PROJECT,
|
type: PROJECT,
|
||||||
infoId: data.value.projectId,
|
infoId: data.value.projectId,
|
||||||
courseId: d.courseId,
|
courseId: d.courseId,
|
||||||
pName: data.value.name,
|
pName: data.value.name,
|
||||||
sName,
|
sName,
|
||||||
chapterOrStageId,
|
chapterOrStageId,
|
||||||
exname: d.name, // 考试名称
|
exname: d.name, // 考试名称
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 评估 停用
|
// 评估 停用
|
||||||
if (d.type == 11) {
|
if (d.type == 11) {
|
||||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||||
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||||
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 其他活动 结束时间
|
// 其他活动 结束时间
|
||||||
if (d.type == 9) {
|
if (d.type == 9) {
|
||||||
let date1 = new Date(d.endTime).getTime();
|
let date1 = new Date(d.endTime).getTime();
|
||||||
let date2 = new Date().getTime();
|
let date2 = new Date().getTime();
|
||||||
if (date1 < date2) {
|
if (date1 < date2) {
|
||||||
dialogVisibleTip.value = '当前活动已结束';
|
dialogVisibleTip.value = '当前活动已结束';
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
//return
|
//return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 在线课 停用 -- 暂时没有在线课停用标记
|
// 在线课 停用 -- 暂时没有在线课停用标记
|
||||||
if (d.type == 1) {
|
if (d.type == 1) {
|
||||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||||
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||||
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 面授课 停用
|
// 面授课 停用
|
||||||
if (d.type == 2) {
|
if (d.type == 2) {
|
||||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||||
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||||
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 2023-02-04
|
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 2023-02-04
|
||||||
if(d.type == 10) {
|
if (d.type == 10) {
|
||||||
// 此处判断测评跳转详情界面
|
// 此处判断测评跳转详情界面
|
||||||
router.push({
|
router.push({
|
||||||
path: '/evaluation',
|
path: '/evaluation',
|
||||||
query: {
|
query: {
|
||||||
id: d.projectTaskId,
|
id: d.projectTaskId,
|
||||||
type: PROJECT,
|
type: PROJECT,
|
||||||
infoId: data.value.projectId,
|
infoId: data.value.projectId,
|
||||||
courseId: d.courseId,
|
courseId: d.courseId,
|
||||||
pName: data.value.name,
|
pName: data.value.name,
|
||||||
sName,
|
sName,
|
||||||
chapterOrStageId,
|
chapterOrStageId,
|
||||||
exname: d.name, // 测评名称
|
exname: d.name, // 测评名称
|
||||||
btype: 1 // 1项目 2 路径图
|
btype: 1 // 1项目 2 路径图
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return
|
return
|
||||||
|
|
||||||
// 调用接口 跳转页面
|
// 调用接口 跳转页面
|
||||||
console.log('我是查询测评跳转链接所传递得参数',{
|
console.log('我是查询测评跳转链接所传递得参数', {
|
||||||
"businessType": "project",
|
"businessType": "project",
|
||||||
"chapterId": chapterOrStageId,
|
"chapterId": chapterOrStageId,
|
||||||
"courseId": d.courseId,
|
"courseId": d.courseId,
|
||||||
"quizKid": d.targetId,
|
"quizKid": d.targetId,
|
||||||
"routerOrProjectId": projectId,
|
"routerOrProjectId": projectId,
|
||||||
"studentId": userInfo.value.id,
|
"studentId": userInfo.value.id,
|
||||||
"studentName": userInfo.value.realName
|
"studentName": userInfo.value.realName
|
||||||
})
|
})
|
||||||
request(EvaluationToLearn, {
|
request(EvaluationToLearn, {
|
||||||
"businessType": "project",
|
"businessType": "project",
|
||||||
"chapterId": chapterOrStageId,
|
"chapterId": chapterOrStageId,
|
||||||
"courseId": d.courseId,
|
"courseId": d.courseId,
|
||||||
"quizKid": d.targetId,
|
"quizKid": d.targetId,
|
||||||
"routerOrProjectId": projectId,
|
"routerOrProjectId": projectId,
|
||||||
"studentId": userInfo.value.id,
|
"studentId": userInfo.value.id,
|
||||||
"studentName": userInfo.value.realName
|
"studentName": userInfo.value.realName
|
||||||
}).then(res=>{
|
}).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if(res.code==200){
|
if (res.code == 200) {
|
||||||
let jumpUrl = res.data.quizUrl
|
let jumpUrl = res.data.quizUrl
|
||||||
// 此处写跳转url
|
// 此处写跳转url
|
||||||
window.open( jumpUrl, '_top')
|
window.open(jumpUrl, '_top')
|
||||||
}
|
}
|
||||||
}).catch(err=>{
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!types.value.path[d.type]) {
|
if (!types.value.path[d.type]) {
|
||||||
ElMessage.error("暂时未开放");
|
ElMessage.error("暂时未开放");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//更新学员当前任务
|
//更新学员当前任务
|
||||||
request(UPDATE_CURRENT_TASK,{id:d.projectTaskId,type:PROJECT,pid:projectId,name:d.name})
|
await request(UPDATE_CURRENT_TASK, {id: d.projectTaskId, type: PROJECT, pid: projectId, name: d.name})
|
||||||
if (d.type == 3 || d.type == 7) {
|
if (d.type == 3 || d.type == 7) {
|
||||||
d.status!==1 && request(STUDY_RECORD, {
|
d.status !== 1 && await request(STUDY_RECORD, {
|
||||||
studentId: userInfo.value.id,
|
studentId: userInfo.value.id,
|
||||||
targetId: data.value.routerId,
|
targetId: data.value.routerId,
|
||||||
logo: PROJECT,
|
logo: PROJECT,
|
||||||
stageOrChapterId: chapterOrStageId,
|
stageOrChapterId: chapterOrStageId,
|
||||||
taskId: d.projectTaskId,
|
taskId: d.projectTaskId,
|
||||||
taskType: d.type,
|
taskType: d.type,
|
||||||
});
|
});
|
||||||
// 此处判断外链跳转详情界面
|
// 此处判断外链跳转详情界面
|
||||||
if(d.type==7){
|
if (d.type == 7) {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/outerchain',
|
path: '/outerchain',
|
||||||
query: {
|
query: {
|
||||||
id: d.projectTaskId,
|
id: d.projectTaskId,
|
||||||
type: PROJECT,
|
type: PROJECT,
|
||||||
infoId: data.value.projectId,
|
infoId: data.value.projectId,
|
||||||
courseId: d.courseId,
|
courseId: d.courseId,
|
||||||
pName: data.value.name,
|
pName: data.value.name,
|
||||||
sName,
|
sName,
|
||||||
chapterOrStageId,
|
chapterOrStageId,
|
||||||
exname: d.name, // 外链名称
|
exname: d.name, // 外链名称
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof types.value.path[d.type] === "string") {
|
if (typeof types.value.path[d.type] === "string") {
|
||||||
types.value.path[d.type] &&
|
types.value.path[d.type] &&
|
||||||
types.value.path[d.type].startsWith("http") &&
|
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] &&
|
||||||
types.value.path[d.type].startsWith("/") &&
|
types.value.path[d.type].startsWith("/") &&
|
||||||
router.push({
|
router.push({
|
||||||
path: types.value.path[d.type],
|
path: types.value.path[d.type],
|
||||||
query: {
|
query: {
|
||||||
id: d.projectTaskId,
|
id: d.projectTaskId,
|
||||||
type: PROJECT,
|
type: PROJECT,
|
||||||
infoId: data.value.projectId,
|
infoId: data.value.projectId,
|
||||||
courseId: d.courseId,
|
courseId: d.courseId,
|
||||||
pName: data.value.name,
|
pName: data.value.name,
|
||||||
sName,
|
sName,
|
||||||
chapterOrStageId,
|
chapterOrStageId,
|
||||||
btype: 1
|
btype: 1
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else if (typeof types.value.path[d.type] === "function") {
|
} else if (typeof types.value.path[d.type] === "function") {
|
||||||
types.value.path[d.type](d);
|
types.value.path[d.type](d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function whiteTypes(type) {
|
function whiteTypes(type) {
|
||||||
return import.meta.env.VITE_TASK_WHITE_TYPE.includes("-" + type + "-");
|
return import.meta.env.VITE_TASK_WHITE_TYPE.includes("-" + type + "-");
|
||||||
|
|||||||
Reference in New Issue
Block a user