mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-12 12:26:49 +08:00
修改阶段状态
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -20,16 +20,10 @@
|
|||||||
<div class="titleL">{{ data.currentStageName }}</div>
|
<div class="titleL">{{ data.currentStageName }}</div>
|
||||||
<div class="titleR" :style="{ display: 'flex' }">
|
<div class="titleR" :style="{ display: 'flex' }">
|
||||||
<img :src="data.currentChapterCnt ? circle : circle2" />
|
<img :src="data.currentChapterCnt ? circle : circle2" />
|
||||||
<div class="titleRT">
|
<div class="titleRT" :style="(stageStatusName === '未开始' || stageStatusName === '已结束') && 'color:#999'">{{stageStatusName}}</div>
|
||||||
<!-- <div class="titleRT" :style="{ color: data.currentChapterCnt ? '' : 'rgba(102, 102, 102, 1)' }"> -->
|
|
||||||
<!-- {{ data.currentChapterCnt ? '进行中' : '未开始' }} -->
|
|
||||||
进行中
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="course" v-for="(value, index) in data.taskBoList?.filter(
|
<div class="course" v-for="(value, index) in data.taskBoList?.filter((e) => !whiteTypes(e.type))" :key="index">
|
||||||
(e) => !whiteTypes(e.type)
|
|
||||||
)" :key="index">
|
|
||||||
<div style="width: 70%">
|
<div style="width: 70%">
|
||||||
<div v-if="value.name.length > 50" class="coursename" :title="value.name">
|
<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">
|
<el-popover ref="popover" placement="right" trigger="hover" :width="300" :content="value.name">
|
||||||
@@ -123,8 +117,8 @@
|
|||||||
{{ data.remark || "暂无说明" }}
|
{{ data.remark || "暂无说明" }}
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="共享文档" name="second">
|
<el-tab-pane label="共享文档" name="second">
|
||||||
<div style="padding: 19px 30px 17px 28px">
|
<div style="padding: 19px 30px 17px 28px">
|
||||||
<div
|
<div
|
||||||
v-for="(value, index) in JSON.parse(data.attach?data.attach:'[]')"
|
v-for="(value, index) in JSON.parse(data.attach?data.attach:'[]')"
|
||||||
@@ -179,7 +173,7 @@
|
|||||||
<div class="text" style="margin-left: 9px">学习进度</div>
|
<div class="text" style="margin-left: 9px">学习进度</div>
|
||||||
<div class="box"></div>
|
<div class="box"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="rate">
|
<div class="rate">
|
||||||
<div class="ratetext">上次学到:{{ data.lastLearned }}</div>
|
<div class="ratetext">上次学到:{{ data.lastLearned }}</div>
|
||||||
<div v-if="data.lastLearned" class="ratebtn" @click="continueLearn(data.lastLearned, data.taskBoList)">继续学习</div>
|
<div v-if="data.lastLearned" class="ratebtn" @click="continueLearn(data.lastLearned, data.taskBoList)">继续学习</div>
|
||||||
@@ -294,9 +288,20 @@ const returnclick = () => {
|
|||||||
};
|
};
|
||||||
const { data } = useRequest(ROUTER_PROCESS, { routerId });
|
const { data } = useRequest(ROUTER_PROCESS, { routerId });
|
||||||
const userInfo = computed(() => store.state.userInfo);
|
const userInfo = computed(() => store.state.userInfo);
|
||||||
console.log('lalalallala', data)
|
|
||||||
const activeName = ref("first");
|
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) => {
|
const handleClick = (tab, event) => {
|
||||||
console.log(tab, event);
|
console.log(tab, event);
|
||||||
};
|
};
|
||||||
@@ -369,9 +374,9 @@ 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:
|
// case 3:
|
||||||
status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
|
// status == 3 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
|
||||||
break;
|
// 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;
|
||||||
@@ -385,232 +390,232 @@ function judgeTaskIsEnd(type, endTimes, status) {
|
|||||||
return isEnd;
|
return isEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
function toFinish(d) {
|
async function toFinish(d) {
|
||||||
console.log(d)
|
console.log(d)
|
||||||
console.log(data.value.currentStageId, routerId)
|
console.log(data.value.currentStageId, routerId)
|
||||||
|
|
||||||
if(judgeTaskIsEnd(d.type ,data.value.endTime, data.value.status)){
|
|
||||||
ElMessage.error("当前任务已结束")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!types.value.path[d.type]) {
|
if (judgeTaskIsEnd(d.type, data.value.endTime, data.value.status)) {
|
||||||
ElMessage.error("暂时未开放");
|
ElMessage.error("当前任务已结束")
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
if (d.type == 2) {
|
|
||||||
let date1 = new Date(d.endTime).getTime();
|
|
||||||
let date2 = new Date().getTime();
|
|
||||||
if (date1 < date2) {
|
|
||||||
dialogVisibleTip.value = '当前面授课已结束';
|
|
||||||
dialogVisible.value = true;
|
|
||||||
|
|
||||||
//return
|
if (!types.value.path[d.type]) {
|
||||||
}
|
ElMessage.error("暂时未开放");
|
||||||
}
|
return;
|
||||||
if (d.type == 4) {
|
}
|
||||||
let date1 = new Date(d.endTime).getTime();
|
if (d.type == 2) {
|
||||||
let date2 = new Date().getTime();
|
let date1 = new Date(d.endTime).getTime();
|
||||||
if (date1 < date2) {
|
let date2 = new Date().getTime();
|
||||||
dialogVisibleTip.value = '当前作业已结束';
|
if (date1 < date2) {
|
||||||
dialogVisible.value = true;
|
dialogVisibleTip.value = '当前面授课已结束';
|
||||||
|
dialogVisible.value = true;
|
||||||
|
|
||||||
//return
|
//return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 直播结束时间
|
if (d.type == 4) {
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 考试 停用
|
|
||||||
if (d.type == 5) {
|
|
||||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
|
||||||
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
|
||||||
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
|
||||||
dialogVisible.value = true;
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 此处判断外部考试跳转
|
|
||||||
if(d.examType==2){
|
|
||||||
|
|
||||||
// 点击即更新状态 进行中
|
//return
|
||||||
request(SubmitExternalExam, {
|
}
|
||||||
"chapterId": data.value.currentStageId,
|
}
|
||||||
"externalId": d.courseId,
|
// 直播结束时间
|
||||||
"externalName": d.name,
|
if (d.type == 6) {
|
||||||
"targetId": routerId,
|
let date1 = new Date(d.endTime).getTime();
|
||||||
"studentNo": userInfo.value.userNo
|
let date2 = new Date().getTime();
|
||||||
}).then(res=>{
|
if (date1 < date2) {
|
||||||
console.log(res)
|
dialogVisibleTip.value = '当前直播已结束';
|
||||||
}).catch(err=>{
|
dialogVisible.value = true;
|
||||||
console.log(err)
|
//return
|
||||||
})
|
}
|
||||||
|
}
|
||||||
router.push({
|
// 考试 停用
|
||||||
path: '/externalexamination',
|
if (d.type == 5) {
|
||||||
query: {
|
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||||
id: d.routerTaskId,
|
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||||
type: ROUTER,
|
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
||||||
infoId: routerId,
|
dialogVisible.value = true;
|
||||||
courseId: d.courseId,
|
return
|
||||||
pName: data.value.name,
|
}
|
||||||
sName: data.value.currentStageName,
|
// 此处判断外部考试跳转
|
||||||
chapterOrStageId: data.value.currentStageId,
|
if (d.examType == 2) {
|
||||||
exname: d.name, // 考试名称
|
|
||||||
},
|
// 点击即更新状态 进行中
|
||||||
});
|
request(SubmitExternalExam, {
|
||||||
return
|
"chapterId": data.value.currentStageId,
|
||||||
}
|
"externalId": d.courseId,
|
||||||
}
|
"externalName": d.name,
|
||||||
// 评估 停用
|
"targetId": routerId,
|
||||||
if (d.type == 11) {
|
"studentNo": userInfo.value.userNo
|
||||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
}).then(res => {
|
||||||
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
console.log(res)
|
||||||
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
}).catch(err => {
|
||||||
dialogVisible.value = true;
|
console.log(err)
|
||||||
return
|
})
|
||||||
}
|
|
||||||
}
|
router.push({
|
||||||
// 其他活动 结束时间
|
path: '/externalexamination',
|
||||||
if (d.type == 9) {
|
query: {
|
||||||
let date1 = new Date(d.endTime).getTime();
|
id: d.id,
|
||||||
let date2 = new Date().getTime();
|
type: ROUTER,
|
||||||
if (date1 < date2) {
|
infoId: routerId,
|
||||||
dialogVisibleTip.value = '当前活动已结束';
|
courseId: d.courseId,
|
||||||
dialogVisible.value = true;
|
pName: data.value.name,
|
||||||
//return
|
sName: data.value.currentStageName,
|
||||||
}
|
chapterOrStageId: data.value.currentStageId,
|
||||||
}
|
exname: d.name, // 考试名称
|
||||||
// 在线课 停用 -- 暂时没有在线课停用标记
|
},
|
||||||
if (d.type == 1) {
|
});
|
||||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
return
|
||||||
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
}
|
||||||
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
}
|
||||||
dialogVisible.value = true;
|
// 评估 停用
|
||||||
return
|
if (d.type == 11) {
|
||||||
}
|
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||||
}
|
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||||
// 面授课 停用
|
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
||||||
if (d.type == 2) {
|
dialogVisible.value = true;
|
||||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
return
|
||||||
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
}
|
||||||
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
}
|
||||||
dialogVisible.value = true;
|
// 其他活动 结束时间
|
||||||
return
|
if (d.type == 9) {
|
||||||
}
|
let date1 = new Date(d.endTime).getTime();
|
||||||
}
|
let date2 = new Date().getTime();
|
||||||
|
if (date1 < date2) {
|
||||||
|
dialogVisibleTip.value = '当前活动已结束';
|
||||||
|
dialogVisible.value = true;
|
||||||
|
//return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 在线课 停用 -- 暂时没有在线课停用标记
|
||||||
|
if (d.type == 1) {
|
||||||
|
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||||
|
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||||
|
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
||||||
|
dialogVisible.value = true;
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 面授课 停用
|
||||||
|
if (d.type == 2) {
|
||||||
|
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||||
|
// ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||||
|
dialogVisibleTip.value = '该任务无法学习,请联系管理员进行替换!';
|
||||||
|
dialogVisible.value = true;
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
//更新学员当前任务
|
//更新学员当前任务
|
||||||
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) {
|
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: ROUTER,
|
logo: ROUTER,
|
||||||
stageOrChapterId: data.value.currentStageId,
|
stageOrChapterId: data.value.currentStageId,
|
||||||
taskId: d.routerTaskId,
|
taskId: d.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 此处判断外链跳转详情界面
|
// 此处判断外链跳转详情界面
|
||||||
if(d.type==7){
|
if (d.type == 7) {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/outerchain',
|
path: '/outerchain',
|
||||||
query: {
|
query: {
|
||||||
id: d.routerTaskId,
|
id: d.id,
|
||||||
type: ROUTER,
|
type: ROUTER,
|
||||||
infoId: routerId,
|
infoId: routerId,
|
||||||
courseId: d.courseId,
|
courseId: d.courseId,
|
||||||
pName: data.value.name,
|
pName: data.value.name,
|
||||||
sName: data.value.currentStageName,
|
sName: data.value.currentStageName,
|
||||||
chapterOrStageId: data.value.currentStageId,
|
chapterOrStageId: data.value.currentStageId,
|
||||||
exname: d.name, // 外链名称
|
exname: d.name, // 外链名称
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 2023-02-04
|
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 2023-02-04
|
||||||
if(d.type == 10) {
|
if (d.type == 10) {
|
||||||
|
|
||||||
|
|
||||||
// 此处判断测评跳转详情界面
|
|
||||||
router.push({
|
|
||||||
path: '/evaluation',
|
|
||||||
query: {
|
|
||||||
id: d.routerTaskId,
|
|
||||||
type: ROUTER,
|
|
||||||
infoId: routerId,
|
|
||||||
courseId: d.courseId,
|
|
||||||
pName: data.value.name,
|
|
||||||
sName: data.value.currentStageName,
|
|
||||||
chapterOrStageId: data.value.currentStageId,
|
|
||||||
exname: d.name, // 测评名称
|
|
||||||
btype: 2 // 1项目 2 路径图
|
|
||||||
},
|
|
||||||
});
|
|
||||||
return
|
|
||||||
|
|
||||||
// 调用接口 跳转页面
|
// 此处判断测评跳转详情界面
|
||||||
console.log('我是查询测评跳转链接所传递得参数',{
|
router.push({
|
||||||
"businessType": "learningpath",
|
path: '/evaluation',
|
||||||
"chapterId": data.value.currentStageId,
|
query: {
|
||||||
"courseId": d.courseId,
|
id: d.id,
|
||||||
"quizKid": d.targetId,
|
type: ROUTER,
|
||||||
"routerOrProjectId": routerId,
|
infoId: routerId,
|
||||||
"studentId": userInfo.value.id,
|
courseId: d.courseId,
|
||||||
"studentName": userInfo.value.realName
|
pName: data.value.name,
|
||||||
})
|
sName: data.value.currentStageName,
|
||||||
request(EvaluationToLearn, {
|
chapterOrStageId: data.value.currentStageId,
|
||||||
"businessType": "learningpath",
|
exname: d.name, // 测评名称
|
||||||
"chapterId": data.value.currentStageId,
|
btype: 2 // 1项目 2 路径图
|
||||||
"courseId": d.courseId,
|
},
|
||||||
"quizKid": d.targetId,
|
});
|
||||||
"routerOrProjectId": routerId,
|
return
|
||||||
"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
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof types.value.path[d.type] === "string") {
|
// 调用接口 跳转页面
|
||||||
types.value.path[d.type] &&
|
console.log('我是查询测评跳转链接所传递得参数', {
|
||||||
types.value.path[d.type].startsWith("http") &&
|
"businessType": "learningpath",
|
||||||
window.open(types.value.path[d.type] + d.targetId,'_top');
|
"chapterId": data.value.currentStageId,
|
||||||
types.value.path[d.type] &&
|
"courseId": d.courseId,
|
||||||
types.value.path[d.type].startsWith("/") &&
|
"quizKid": d.targetId,
|
||||||
router.push({
|
"routerOrProjectId": routerId,
|
||||||
path: types.value.path[d.type],
|
"studentId": userInfo.value.id,
|
||||||
query: {
|
"studentName": userInfo.value.realName
|
||||||
id: d.routerTaskId,
|
})
|
||||||
type: ROUTER,
|
request(EvaluationToLearn, {
|
||||||
infoId: routerId,
|
"businessType": "learningpath",
|
||||||
courseId: d.courseId,
|
"chapterId": data.value.currentStageId,
|
||||||
pName: data.value.name,
|
"courseId": d.courseId,
|
||||||
sName: data.value.currentStageName,
|
"quizKid": d.targetId,
|
||||||
chapterOrStageId: data.value.currentStageId,
|
"routerOrProjectId": routerId,
|
||||||
btype: 2
|
"studentId": userInfo.value.id,
|
||||||
},
|
"studentName": userInfo.value.realName
|
||||||
});
|
}).then(res => {
|
||||||
} else if (typeof types.value.path[d.type] === "function") {
|
console.log(res)
|
||||||
console.log("ddddddd", d);
|
if (res.code == 200) {
|
||||||
types.value.path[d.type](d);
|
let jumpUrl = res.data.quizUrl
|
||||||
// console.log("types.value.path[d.type](d)", d);
|
// 此处写跳转url
|
||||||
}
|
window.open(jumpUrl, '_top')
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
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');
|
||||||
|
types.value.path[d.type] &&
|
||||||
|
types.value.path[d.type].startsWith("/") &&
|
||||||
|
router.push({
|
||||||
|
path: types.value.path[d.type],
|
||||||
|
query: {
|
||||||
|
id: d.id,
|
||||||
|
type: ROUTER,
|
||||||
|
infoId: routerId,
|
||||||
|
courseId: d.courseId,
|
||||||
|
pName: data.value.name,
|
||||||
|
sName: data.value.currentStageName,
|
||||||
|
chapterOrStageId: data.value.currentStageId,
|
||||||
|
btype: 2
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else if (typeof types.value.path[d.type] === "function") {
|
||||||
|
console.log("ddddddd", d);
|
||||||
|
types.value.path[d.type](d);
|
||||||
|
// console.log("types.value.path[d.type](d)", d);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -627,7 +632,7 @@ function downloadFile(url){
|
|||||||
function continueLearn(taskname, datas){
|
function continueLearn(taskname, datas){
|
||||||
console.log('我是当前的列表展示信息',data)
|
console.log('我是当前的列表展示信息',data)
|
||||||
console.log(datas)
|
console.log(datas)
|
||||||
let jumpinfo
|
let jumpinfo
|
||||||
for(let i=0; i<datas.length; i++){
|
for(let i=0; i<datas.length; i++){
|
||||||
if(datas[i].name==taskname){
|
if(datas[i].name==taskname){
|
||||||
jumpinfo = datas[i]
|
jumpinfo = datas[i]
|
||||||
|
|||||||
Reference in New Issue
Block a user