mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-12 04:16:50 +08:00
fix -- bug
This commit is contained in:
@@ -19,14 +19,15 @@
|
|||||||
<div class="title">
|
<div class="title">
|
||||||
<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="(data.statusName === '已完成' || data.statusName === '进行中') ? 'color:#0060ff' : 'color:#999'">
|
:style="(data.statusName === '已完成' || data.statusName === '进行中') ? 'color:#0060ff' : 'color:#999'">
|
||||||
{{ data.statusName || (data.unlockMode === 1 ? '未开始' : '未解锁') }}
|
{{ data.statusName || (data.unlockMode === 1 ? "未开始" : "未解锁") }}
|
||||||
</div>
|
</div>
|
||||||
</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 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">
|
||||||
@@ -61,7 +62,8 @@
|
|||||||
<div>当前进度</div>
|
<div>当前进度</div>
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div style="width: 291px">
|
<div style="width: 291px">
|
||||||
<el-progress :percentage="parseInt(value.currentRatio)" :show-text="false" :stroke-width="8" :color="
|
<el-progress :percentage="parseInt(value.currentRatio)" :show-text="false" :stroke-width="8"
|
||||||
|
:color="
|
||||||
{
|
{
|
||||||
0: 'rgba(238, 112, 108, 1)',
|
0: 'rgba(238, 112, 108, 1)',
|
||||||
1: 'rgba(255, 151, 38, 1)',
|
1: 'rgba(255, 151, 38, 1)',
|
||||||
@@ -70,7 +72,7 @@
|
|||||||
4: 'rgba(57, 219, 183, 1)',
|
4: 'rgba(57, 219, 183, 1)',
|
||||||
5: 'rgba(57, 219, 183, 1)',
|
5: 'rgba(57, 219, 183, 1)',
|
||||||
}[parseInt(parseInt(value.currentRatio) / 20)]
|
}[parseInt(parseInt(value.currentRatio) / 20)]
|
||||||
" />
|
"/>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 14px;font-weight: 500;color: #277aff;margin-left: 10px;" :style="{
|
<div style="font-size: 14px;font-weight: 500;color: #277aff;margin-left: 10px;" :style="{
|
||||||
color: {
|
color: {
|
||||||
@@ -90,7 +92,7 @@
|
|||||||
<div class="goclass"
|
<div class="goclass"
|
||||||
:style="{ background: (value.statusName !== '已结束' && (value.statusName || data.unlockMode === 1)) ? '#2478ff' : '#999' }"
|
:style="{ background: (value.statusName !== '已结束' && (value.statusName || data.unlockMode === 1)) ? '#2478ff' : '#999' }"
|
||||||
@click="toFinish(value)">
|
@click="toFinish(value)">
|
||||||
{{ value.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[value.type] : '未解锁') }}
|
{{ value.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[value.type] : "未解锁") }}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
|
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
|
||||||
<!-- <div-->
|
<!-- <div-->
|
||||||
@@ -132,7 +134,7 @@
|
|||||||
:style="{ width: '22px', height: '26px' }"></FileTypeImg>
|
:style="{ width: '22px', height: '26px' }"></FileTypeImg>
|
||||||
<div class="sharedocname">{{ value.name }}</div>
|
<div class="sharedocname">{{ value.name }}</div>
|
||||||
<div class="download">
|
<div class="download">
|
||||||
<img src="../../assets/image/download.png" style="width: 16px; height: 15px" />
|
<img src="../../assets/image/download.png" style="width: 16px; height: 15px"/>
|
||||||
<div style="margin-left: 7px" @click="downloadFile(value.response.data)">下载</div>
|
<div style="margin-left: 7px" @click="downloadFile(value.response.data)">下载</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -145,13 +147,13 @@
|
|||||||
<div class="detailRB">
|
<div class="detailRB">
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="title">
|
<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="text" style="margin-left: 7px">个人信息</div>
|
||||||
<div class="box"></div>
|
<div class="box"></div>
|
||||||
</div>
|
</div>
|
||||||
<!-- todo #路径详情 个人信息缺少img和介绍-->
|
<!-- todo #路径详情 个人信息缺少img和介绍-->
|
||||||
<div class="teacheritem" :style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }">
|
<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 style="margin-left: 17px">
|
||||||
<div class="teacherName">
|
<div class="teacherName">
|
||||||
<div style="margin-right: 5px">
|
<div style="margin-right: 5px">
|
||||||
@@ -167,7 +169,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="info" style="padding-top: 20px">
|
<div class="info" style="padding-top: 20px">
|
||||||
<div class="title">
|
<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="text" style="margin-left: 9px">学习进度</div>
|
||||||
<div class="box"></div>
|
<div class="box"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -184,7 +186,7 @@
|
|||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div style="width: 291px">
|
<div style="width: 291px">
|
||||||
<el-progress
|
<el-progress
|
||||||
:percentage="parseInt((data.currentChapterCnt ? data.currentChapterCnt : 0 / data.totalChapterCnt ? data.totalChapterCn : 0) * 100)"
|
:percentage="parseInt((data.currentChapterCnt || 0) / (data.totalChapterCnt || 1) * 100)"
|
||||||
:show-text="false" :stroke-width="8" :color="
|
:show-text="false" :stroke-width="8" :color="
|
||||||
{
|
{
|
||||||
0: 'rgba(238, 112, 108, 1)',
|
0: 'rgba(238, 112, 108, 1)',
|
||||||
@@ -193,8 +195,8 @@
|
|||||||
3: 'rgba(59, 94, 251, 1)',
|
3: 'rgba(59, 94, 251, 1)',
|
||||||
4: 'rgba(57, 219, 183, 1)',
|
4: 'rgba(57, 219, 183, 1)',
|
||||||
5: 'rgba(57, 219, 183, 1)',
|
5: 'rgba(57, 219, 183, 1)',
|
||||||
}[(parseInt(data.currentChapterCnt ? data.currentChapterCnt : 0 / data.totalChapterCnt ? data.totalChapterCnt : 0) * 100) / 20]
|
}[parseInt((data.currentChapterCnt || 0) / (data.totalChapterCnt || 1) * 100) / 20]
|
||||||
" />
|
"/>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 14px; font-weight: 500; margin-left: 10px" :style="{
|
<div style="font-size: 14px; font-weight: 500; margin-left: 10px" :style="{
|
||||||
color: {
|
color: {
|
||||||
@@ -204,12 +206,9 @@
|
|||||||
3: 'rgba(59, 94, 251, 1)',
|
3: 'rgba(59, 94, 251, 1)',
|
||||||
4: 'rgba(57, 219, 183, 1)',
|
4: 'rgba(57, 219, 183, 1)',
|
||||||
5: 'rgba(57, 219, 183, 1)',
|
5: 'rgba(57, 219, 183, 1)',
|
||||||
}[parseInt(((data.currentChapterCnt ? data.currentChapterCnt : 0 / data.totalChapterCnt ? data.totalChapterCnt : 0) * 100) / 20)],
|
}[parseInt((data.currentChapterCnt || 0) / (data.totalChapterCnt || 1) * 100) / 20],
|
||||||
}">
|
}">
|
||||||
{{ parseInt((data.currentChapterCnt ? data.currentChapterCnt : 0 /
|
{{ parseInt((data.currentChapterCnt || 0) / (data.totalChapterCnt || 1) * 100) }}%
|
||||||
data.totalChapterCnt ? data.totalChapterCnt : 0) > 1 ? 1 : (data.currentChapterCnt ?
|
|
||||||
data.currentChapterCnt : 0 /
|
|
||||||
data.totalChapterCnt ? data.totalChapterCnt : 0) * 100) }}%
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -220,7 +219,7 @@
|
|||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div style="width: 291px">
|
<div style="width: 291px">
|
||||||
<el-progress
|
<el-progress
|
||||||
:percentage="parseInt((data.currentReqCnt ? data.currentReqCnt : 0 / data.totalReqCnt ? data.totalReqCnt : 0) * 100)"
|
:percentage="parseInt((((data.currentReqCnt || 0) / (data.totalReqCnt || 1)) * 100) / 20)"
|
||||||
:show-text="false" :stroke-width="8" :color="
|
:show-text="false" :stroke-width="8" :color="
|
||||||
{
|
{
|
||||||
0: 'rgba(238, 112, 108, 1)',
|
0: 'rgba(238, 112, 108, 1)',
|
||||||
@@ -229,8 +228,8 @@
|
|||||||
3: 'rgba(59, 94, 251, 1)',
|
3: 'rgba(59, 94, 251, 1)',
|
||||||
4: 'rgba(57, 219, 183, 1)',
|
4: 'rgba(57, 219, 183, 1)',
|
||||||
5: 'rgba(57, 219, 183, 1)',
|
5: 'rgba(57, 219, 183, 1)',
|
||||||
}[parseInt(((data.currentReqCnt ? data.currentReqCnt : 0 / data.totalReqCnt ? data.totalReqCnt : 0) * 100) / 20)]
|
}[parseInt((((data.currentReqCnt || 0) / (data.totalReqCnt || 1)) * 100) / 20)]
|
||||||
" />
|
"/>
|
||||||
</div>
|
</div>
|
||||||
<div style="
|
<div style="
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -245,11 +244,9 @@
|
|||||||
3: 'rgba(59, 94, 251, 1)',
|
3: 'rgba(59, 94, 251, 1)',
|
||||||
4: 'rgba(57, 219, 183, 1)',
|
4: 'rgba(57, 219, 183, 1)',
|
||||||
5: 'rgba(57, 219, 183, 1)',
|
5: 'rgba(57, 219, 183, 1)',
|
||||||
}[parseInt(((data.currentReqCnt ? data.currentReqCnt : 0 / data.totalReqCnt ? data.totalReqCnt : 0) * 100) / 20)],
|
}[parseInt((((data.currentReqCnt || 0) / (data.totalReqCnt || 1)) * 100) / 20)],
|
||||||
}">
|
}">
|
||||||
{{ parseInt((data.currentReqCnt ? data.currentReqCnt : 0 / data.totalReqCnt ? data.totalReqCnt :
|
{{ parseInt((data.currentReqCnt || 0) / (data.totalReqCnt || 1) * 100) }}%
|
||||||
0) > 1 ? 1 : (data.currentReqCnt ? data.currentReqCnt : 0 / data.totalReqCnt ? data.totalReqCnt : 0) *
|
|
||||||
100) }}%
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -274,16 +271,22 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, onMounted, ref } from "vue";
|
import {computed, onMounted, ref} from "vue";
|
||||||
import circle from '@/assets/image/pathdetails/circle.png';
|
import circle from "@/assets/image/pathdetails/circle.png";
|
||||||
import circle2 from '@/assets/image/pathdetails/circle2.png';
|
import circle2 from "@/assets/image/pathdetails/circle2.png";
|
||||||
import { request } from "@/api/request";
|
import {request} from "@/api/request";
|
||||||
import { STUDY_RECORD, UPDATE_CURRENT_TASK, QueryEvaluationTaskStatusOne, EvaluationToLearn, SubmitExternalExam } from "@/api/api";
|
import {
|
||||||
import { useRoute, useRouter } from "vue-router";
|
STUDY_RECORD,
|
||||||
import { ElMessage } from "element-plus";
|
UPDATE_CURRENT_TASK,
|
||||||
import { ROUTER, TASK_TYPES } from "@/api/CONST";
|
QueryEvaluationTaskStatusOne,
|
||||||
|
EvaluationToLearn,
|
||||||
|
SubmitExternalExam
|
||||||
|
} from "@/api/api";
|
||||||
|
import {useRoute, useRouter} from "vue-router";
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
import {ROUTER, TASK_TYPES} from "@/api/CONST";
|
||||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||||
import { useStore } from "vuex";
|
import {useStore} from "vuex";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
query: { routerId, routerName },
|
query: { routerId, routerName },
|
||||||
@@ -293,15 +296,15 @@ const returnclick = () => {
|
|||||||
router.back();
|
router.back();
|
||||||
};
|
};
|
||||||
|
|
||||||
const { commit, dispatch, state } = useStore()
|
const { commit, dispatch, state } = useStore();
|
||||||
const userInfo = computed(() => state.userInfo)
|
const userInfo = computed(() => state.userInfo);
|
||||||
const data = computed(() => state.routerInfo)
|
const data = computed(() => state.routerInfo);
|
||||||
console.log(data)
|
console.log(data);
|
||||||
const activeName = ref("first");
|
const activeName = ref("first");
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
dispatch('getRouterInfo', { routerId })
|
dispatch("getRouterInfo", { routerId });
|
||||||
})
|
});
|
||||||
|
|
||||||
const handleClick = (tab, event) => {
|
const handleClick = (tab, event) => {
|
||||||
console.log(tab, event);
|
console.log(tab, event);
|
||||||
@@ -309,7 +312,7 @@ const handleClick = (tab, event) => {
|
|||||||
const path = { 1: "path" };
|
const path = { 1: "path" };
|
||||||
|
|
||||||
const dialogVisible = ref(false);
|
const dialogVisible = ref(false);
|
||||||
const dialogVisibleTip = ref('');
|
const dialogVisibleTip = ref("");
|
||||||
|
|
||||||
// 判断当前任务已结束及时间意义上的结束 提示用户
|
// 判断当前任务已结束及时间意义上的结束 提示用户
|
||||||
function judgeTaskIsEnd(type, endTimes, status) {
|
function judgeTaskIsEnd(type, endTimes, status) {
|
||||||
@@ -340,12 +343,12 @@ function judgeTaskIsEnd(type, endTimes, status) {
|
|||||||
|
|
||||||
async function toFinish(d) {
|
async function toFinish(d) {
|
||||||
if (data.value.unlockMode !== 1 && !d.statusName) {
|
if (data.value.unlockMode !== 1 && !d.statusName) {
|
||||||
ElMessage.warning("当前未解锁")
|
ElMessage.warning("当前未解锁");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
if (data.value.endTime && judgeTaskIsEnd(d.type, data.value.endTime, data.value.status)) {
|
if (data.value.endTime && judgeTaskIsEnd(d.type, data.value.endTime, data.value.status)) {
|
||||||
ElMessage.error("当前任务已结束")
|
ElMessage.error("当前任务已结束");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!TASK_TYPES.path[d.type]) {
|
if (!TASK_TYPES.path[d.type]) {
|
||||||
@@ -356,7 +359,7 @@ async function toFinish(d) {
|
|||||||
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
|
||||||
@@ -366,7 +369,7 @@ async function toFinish(d) {
|
|||||||
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
|
||||||
@@ -377,7 +380,7 @@ async function toFinish(d) {
|
|||||||
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
|
||||||
}
|
}
|
||||||
@@ -386,9 +389,9 @@ async function toFinish(d) {
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 此处判断外部考试跳转
|
// 此处判断外部考试跳转
|
||||||
@@ -403,13 +406,13 @@ async function toFinish(d) {
|
|||||||
"targetId": routerId,
|
"targetId": routerId,
|
||||||
"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.id,
|
id: d.id,
|
||||||
type: ROUTER,
|
type: ROUTER,
|
||||||
@@ -421,16 +424,16 @@ async function toFinish(d) {
|
|||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 其他活动 结束时间
|
// 其他活动 结束时间
|
||||||
@@ -438,7 +441,7 @@ async function toFinish(d) {
|
|||||||
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
|
||||||
}
|
}
|
||||||
@@ -447,24 +450,24 @@ async function toFinish(d) {
|
|||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//更新学员当前任务
|
//更新学员当前任务
|
||||||
await request(UPDATE_CURRENT_TASK, { id: d.id, 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.type === 5 && d.examType === 2)) {
|
if (d.type === 3 || d.type === 7 || (d.type === 5 && d.examType === 2)) {
|
||||||
console.log(d, data.value)
|
console.log(d, data.value);
|
||||||
d.status !== 1 && await request(STUDY_RECORD, {
|
d.status !== 1 && await request(STUDY_RECORD, {
|
||||||
studentId: userInfo.value.id,
|
studentId: userInfo.value.id,
|
||||||
targetId: data.value.id,
|
targetId: data.value.id,
|
||||||
@@ -480,7 +483,7 @@ async function toFinish(d) {
|
|||||||
if (d.quizTaskId == null) {
|
if (d.quizTaskId == null) {
|
||||||
// 肯定没有完成测评
|
// 肯定没有完成测评
|
||||||
// 调用接口 跳转页面
|
// 调用接口 跳转页面
|
||||||
console.log('我是查询测评跳转链接所传递得参数', {
|
console.log("我是查询测评跳转链接所传递得参数", {
|
||||||
"businessType": "learningpath",
|
"businessType": "learningpath",
|
||||||
"chapterId": data.value.currentStageId,
|
"chapterId": data.value.currentStageId,
|
||||||
"courseId": d.courseId,
|
"courseId": d.courseId,
|
||||||
@@ -488,7 +491,7 @@ async function toFinish(d) {
|
|||||||
"routerOrProjectId": routerId,
|
"routerOrProjectId": routerId,
|
||||||
"studentId": userInfo.value.id,
|
"studentId": userInfo.value.id,
|
||||||
"studentName": userInfo.value.realName
|
"studentName": userInfo.value.realName
|
||||||
})
|
});
|
||||||
request(EvaluationToLearn, {
|
request(EvaluationToLearn, {
|
||||||
"businessType": "learningpath",
|
"businessType": "learningpath",
|
||||||
"chapterId": data.value.currentStageId,
|
"chapterId": data.value.currentStageId,
|
||||||
@@ -498,34 +501,34 @@ async function toFinish(d) {
|
|||||||
"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;
|
||||||
} else {
|
} else {
|
||||||
// 进行中 或者 已完成
|
// 进行中 或者 已完成
|
||||||
// 调用接口 判断当前测评状态 跳转页面
|
// 调用接口 判断当前测评状态 跳转页面
|
||||||
console.log('我是查询测评跳转链接所传递得参数', {
|
console.log("我是查询测评跳转链接所传递得参数", {
|
||||||
"quizTaskId": d.quizTaskId
|
"quizTaskId": d.quizTaskId
|
||||||
})
|
});
|
||||||
request(QueryEvaluationTaskStatusOne, {
|
request(QueryEvaluationTaskStatusOne, {
|
||||||
"quizTaskId": d.quizTaskId
|
"quizTaskId": d.quizTaskId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
console.log(res);
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if (res.data.complete_status == 2) {
|
if (res.data.complete_status == 2) {
|
||||||
ElMessage.error("您已完成测评")
|
ElMessage.error("您已完成测评");
|
||||||
return
|
return;
|
||||||
} else {
|
} else {
|
||||||
// 重新查询跳转
|
// 重新查询跳转
|
||||||
// 调用接口 跳转页面
|
// 调用接口 跳转页面
|
||||||
console.log('我是查询测评跳转链接所传递得参数', {
|
console.log("我是查询测评跳转链接所传递得参数", {
|
||||||
"businessType": "learningpath",
|
"businessType": "learningpath",
|
||||||
"chapterId": data.value.currentStageId,
|
"chapterId": data.value.currentStageId,
|
||||||
"courseId": d.courseId,
|
"courseId": d.courseId,
|
||||||
@@ -533,7 +536,7 @@ async function toFinish(d) {
|
|||||||
"routerOrProjectId": routerId,
|
"routerOrProjectId": routerId,
|
||||||
"studentId": userInfo.value.id,
|
"studentId": userInfo.value.id,
|
||||||
"studentName": userInfo.value.realName
|
"studentName": userInfo.value.realName
|
||||||
})
|
});
|
||||||
request(EvaluationToLearn, {
|
request(EvaluationToLearn, {
|
||||||
"businessType": "learningpath",
|
"businessType": "learningpath",
|
||||||
"chapterId": data.value.currentStageId,
|
"chapterId": data.value.currentStageId,
|
||||||
@@ -543,22 +546,22 @@ async function toFinish(d) {
|
|||||||
"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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err);
|
||||||
})
|
});
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -566,15 +569,15 @@ async function toFinish(d) {
|
|||||||
if (d.type == 13) {
|
if (d.type == 13) {
|
||||||
// 此处判断跳转项目详情界面
|
// 此处判断跳转项目详情界面
|
||||||
router.push({
|
router.push({
|
||||||
path: '/projectdetails',
|
path: "/projectdetails",
|
||||||
query: {
|
query: {
|
||||||
projectId: d.courseId
|
projectId: d.courseId
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
const path = typeof TASK_TYPES.path[d.type] === "string" ? TASK_TYPES.path[d.type] : TASK_TYPES.path[d.type](d);
|
const path = typeof TASK_TYPES.path[d.type] === "string" ? TASK_TYPES.path[d.type] : TASK_TYPES.path[d.type](d);
|
||||||
path && path.startsWith("http") ? window.open(path + d.targetId, '_top') : path.startsWith("/") ?
|
path && path.startsWith("http") ? window.open(path + d.targetId, "_top") : path.startsWith("/") ?
|
||||||
router.push({
|
router.push({
|
||||||
path,
|
path,
|
||||||
query: {
|
query: {
|
||||||
@@ -587,33 +590,32 @@ async function toFinish(d) {
|
|||||||
chapterOrStageId: data.value.currentStageId,
|
chapterOrStageId: data.value.currentStageId,
|
||||||
btype: 2
|
btype: 2
|
||||||
},
|
},
|
||||||
}) : ''
|
}) : "";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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 + "-");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 共享文档下载
|
// 共享文档下载
|
||||||
function downloadFile(url) {
|
function downloadFile(url) {
|
||||||
console.log(import.meta.env.VITE_FILE_PATH + url)
|
console.log(import.meta.env.VITE_FILE_PATH + url);
|
||||||
window.open(import.meta.env.VITE_FILE_PATH + url);
|
window.open(import.meta.env.VITE_FILE_PATH + 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];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(jumpinfo)
|
console.log(jumpinfo);
|
||||||
toFinish(jumpinfo)
|
toFinish(jumpinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user