Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
yuping
2023-02-23 15:00:12 +08:00
2 changed files with 253 additions and 304 deletions

View File

@@ -5,7 +5,7 @@
<div class="pdname">
{{ data.name }}
<el-popover v-if="data.remark" ref="popover" popper-class="jianjie" placement="right" trigger="hover" :width="300"
:content="data.remark">
:content="data.remark">
<template #reference><span style="font-size: 16px;font-weight: 600;">简介></span></template>
</el-popover>
</div>
@@ -18,19 +18,17 @@
<div v-else class="title">
<div class="titleL">{{ i.stageName }}</div>
<div class="titleR" :style="{ display: 'flex' }">
<img src="../../assets/image/pathdetails/circle.png"/>
<img src="../../assets/image/pathdetails/circle.png" />
<div class="titleRT"
:style="(i.statusName === '已完成' || i.statusName === '进行中') ? 'color:#0060ff' : 'color:#999'">
:style="(i.statusName === '已完成' || i.statusName === '进行中') ? 'color:#0060ff' : 'color:#999'">
{{ i.statusName || (data.unlockMode === 1 ? '未开始' : '未解锁') }}
</div>
</div>
</div>
<div v-if="i.id == '0' && i.taskProcessList?.length == 0"></div>
<div v-else class="course"
v-for="(value, index) in (i.taskProcessList.sort((a,b)=>{ return a.id - b.id; })).filter(
(e) => !whiteTypes(e.type)
)"
:key="index">
<div v-else class="course" v-for="(value, index) in (i.taskProcessList.sort((a, b) => { return a.id - b.id; })).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">
@@ -62,20 +60,16 @@
<div>当前进度</div>
<div class="progress">
<div style="width: 291px">
<el-progress
:percentage="parseInt(value.currentRatio)"
:show-text="false"
:stroke-width="8"
:color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(parseInt(value.currentRatio) / 20)]
"/>
<el-progress :percentage="parseInt(value.currentRatio)" :show-text="false" :stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(parseInt(value.currentRatio) / 20)]
" />
</div>
<div style="font-size: 14px;font-weight: 500;color: #277aff;margin-left: 10px;color:#677d86;">
{{ parseInt(value.currentRatio) }}%
@@ -84,7 +78,7 @@
</div>
</div>
<div class="goclass" @click="toFinish(value, i.stageName, i.id)"
:style="{background:(value.statusName !=='已结束' && (value.statusName || data.unlockMode === 1)) ?'#2478ff':'#999'}">
:style="{ background: (value.statusName !== '已结束' && (value.statusName || data.unlockMode === 1)) ? '#2478ff' : '#999' }">
{{ value.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[value.type] : '未解锁') }}
</div>
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
@@ -119,23 +113,17 @@
</el-tab-pane>
<el-tab-pane label="共享文档" name="second">
<div style="padding: 19px 30px 17px 28px">
<div
v-for="(value, index) in JSON.parse(data.attach?data.attach:'[]')"
:key="index"
style="
display: flex;
align-items: center;
margin-bottom: 15px;">
<div v-for="(value, index) in JSON.parse(data.attach ? data.attach : '[]')" :key="index" style="
display: flex;
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>
: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
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>
</div>
@@ -148,13 +136,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">
@@ -167,7 +155,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>
@@ -182,20 +170,20 @@
<div>总进度</div>
<div class="progress">
<div style="width: 291px">
<el-progress :percentage="parseInt(data.totalProgress * 100)" :show-text="false" :stroke-width="8"
:color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.totalProgress * 100) / 20)]
"/>
<el-progress :percentage="parseInt((data.totalProgress ? data.totalProgress : 0) * 100)"
:show-text="false" :stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(((data.totalProgress ? data.totalProgress : 0) * 100) / 20)]
" />
</div>
<div style="font-size: 14px; font-weight: 500; margin-left: 10px;color:#677d86;">
{{ parseInt(data.totalProgress * 100) }}%
{{ parseInt(data.totalProgress ? data.totalProgress > 1 ? 1 : data.totalProgress : 0 * 100) }}%
</div>
</div>
</div>
@@ -205,24 +193,26 @@
<div>必修进度</div>
<div class="progress">
<div style="width: 291px">
<el-progress :percentage="parseInt(data.compulsoryProgress * 100)" :show-text="false"
:stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.compulsoryProgress * 100) / 20)]
"/>
<el-progress :percentage="parseInt((data.compulsoryProgress ? data.compulsoryProgress : 0) * 100)"
:show-text="false" :stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(((data.compulsoryProgress ? data.compulsoryProgress : 0) * 100) / 20)]
" />
</div>
<div style="
font-size: 14px;
font-weight: 500;
color: #277aff;
margin-left: 10px;color:#677d86;">
{{ parseInt(data.compulsoryProgress * 100) }}%
font-size: 14px;
font-weight: 500;
color: #277aff;
margin-left: 10px;color:#677d86;">
{{
parseInt(((data.compulsoryProgress ? data.compulsoryProgress : 0) > 1 ? 1 : (data.compulsoryProgress ? data.compulsoryProgress : 0))
* 100) }}%
</div>
</div>
</div>
@@ -234,35 +224,22 @@
<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
@click="tabChange(1)"
style="font-size: 14px;color: rgba(51, 51, 51, 1);font-weight: 600;cursor: pointer;"
:style="{}"
>积分排行榜
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 style="font-size: 14px;color: rgba(51, 51, 51, 1);font-weight: 600;">完成度排行榜</div> -->
<el-select
@change="choiceStatus"
v-model="stateValue"
class="m-2"
mode="tags"
placeholder="完成度排行榜"
style="width: 130px;border: 0px solid red !important; box-shadow:none !important; ">
<el-option
v-for="item in studyProgress"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-select @change="choiceStatus" v-model="stateValue" class="m-2" mode="tags" placeholder="完成度排行榜"
style="width: 130px;border: 0px solid red !important; box-shadow:none !important; ">
<el-option v-for="item in studyProgress" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
<!-- line -->
<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-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 -->
@@ -278,11 +255,11 @@
</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%);">
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;">
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;">
@@ -292,86 +269,60 @@
</div>
<!-- 学员列表 -->
<div>
<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 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;">
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;"
src="../../assets/image/rank1.png"
/>
<img
v-if="i + 1 == 2"
style="width: 24px; height: 24px;"
src="../../assets/image/rank2.png"
/>
<img
v-if="i + 1 == 3"
style="width: 24px; height: 24px;"
src="../../assets/image/rank3.png"
/>
<img
v-if="i + 1 == myIndex"
style="width: 24px; height: 24px;position: absolute;left:110px;"
src="../../assets/image/rankme.png"
/>
<img v-if="i + 1 == 1" style="width: 24px; height: 24px;" src="../../assets/image/rank1.png" />
<img v-if="i + 1 == 2" style="width: 24px; height: 24px;" src="../../assets/image/rank2.png" />
<img v-if="i + 1 == 3" style="width: 24px; height: 24px;" src="../../assets/image/rank3.png" />
<img v-if="i + 1 == myIndex" 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;">
<img
style="width: 28px; height: 28px;border-radius: 28px;"
:src="item?.avatar"
/>
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 }}
</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;">
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>
<!-- 我的排名 -->
<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 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;">
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;">
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;">
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 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;">
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"
/>
<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;">
<img
style="width: 28px; height: 28px;border-radius: 28px;"
:src="tableRankData[myIndex-1]?.avatar"
/>
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 }}
</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;">
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>
@@ -386,37 +337,37 @@
<!-- 详细信息 -->
<!-- 弹框提示信息 -->
<el-dialog title="" top="347px" v-model="dialogVisible" :show-close="false"
style="display:flex;justify-content:center;align-items:center;height: 283px;padding:0;border-radius: 4px;"
width="502px">
style="display:flex;justify-content:center;align-items:center;height: 283px;padding:0;border-radius: 4px;"
width="502px">
<div style="width:288px;color:#333333;font-size: 22px;font-weight: 600;">{{ dialogVisibleTip }}</div>
<span slot="footer" style="display:inline-block;margin-top:60px;">
<el-button @click="dialogVisible = false" style="width:140px;height:40px;margin-right: 22px;">取消</el-button>
<el-button type="primary" @click="dialogVisible = false" style="width:140px;height:40px;">确定</el-button>
</span>
<el-button @click="dialogVisible = false" style="width:140px;height:40px;margin-right: 22px;">取消</el-button>
<el-button type="primary" @click="dialogVisible = false" style="width:140px;height:40px;">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script setup>
import {computed, onMounted, ref, watch} from "vue";
import {ElLoading, ElMessage} from 'element-plus'
import {request} from "@/api/request";
import {CompletionList, EvaluationToLearn, PointList, STUDY_RECORD, SubmitExternalExam, QueryEvaluationTaskStatusOne} from "@/api/api";
import {useRoute, useRouter} from "vue-router";
import {PROJECT, TASK_TYPES} from "@/api/CONST";
import { computed, onMounted, ref, watch } from "vue";
import { ElLoading, ElMessage } from 'element-plus'
import { request } from "@/api/request";
import { CompletionList, EvaluationToLearn, PointList, STUDY_RECORD, SubmitExternalExam, QueryEvaluationTaskStatusOne } from "@/api/api";
import { useRoute, useRouter } from "vue-router";
import { PROJECT, TASK_TYPES } from "@/api/CONST";
import FileTypeImg from "@/components/FileTypeImg.vue";
import {UPDATE_CURRENT_TASK} from "@/api/api";
import {useStore} from "vuex";
import { UPDATE_CURRENT_TASK } from "@/api/api";
import { useStore } from "vuex";
const {
query: {courseId, projectId},
query: { courseId, projectId },
} = useRoute();
const router = useRouter();
const {commit, dispatch, state} = useStore()
const { commit, dispatch, state } = useStore()
const store = useStore()
const userInfo = computed(()=>state.userInfo)
const data = computed(()=>state.projectInfo)
const userInfo = computed(() => state.userInfo)
const data = computed(() => state.projectInfo)
onMounted(() => {
dispatch('getProjectInfo', {projectId})
dispatch('getProjectInfo', { projectId })
})
const tableRankData = ref([])
@@ -438,8 +389,8 @@ const choiceStatus = (e) => {
tabValue.value = e
stateValue.value = e
// 获取个人完成度
request(CompletionList, {projectId: projectId, type: e === 2 ? 0 : 1}).then(res => {
tableRankData.value =res.data.datas
request(CompletionList, { projectId: projectId, type: e === 2 ? 0 : 1 }).then(res => {
tableRankData.value = res.data.datas
myIndex.value = res.data.myIndex
myRate.value = res.data.myRate
myRateStr.value = res.data.myRateStr
@@ -452,17 +403,17 @@ const tabChange = (tabs) => {
stateValue.value = undefined;
tabValue.value = tabs;
// 获取项目积分
request(PointList, {projectId: projectId}).then(res => {
tableRankData.value =res.data.datas
request(PointList, { projectId: projectId }).then(res => {
tableRankData.value = res.data.datas
myIndex.value = res.data.myIndex
myPoint.value = res.data.myPointsCount
})
tableRankData.value =12
tableRankData.value = 12
}
const myIndex = ref('')
const myPoint = ref('')
// 获取项目积分
request(PointList, {projectId: projectId}).then(res => {
request(PointList, { projectId: projectId }).then(res => {
tableRankData.value = res.data.datas
myIndex.value = res.data.myIndex
myPoint.value = res.data.myPointsCount
@@ -472,7 +423,7 @@ const activeName = ref("first");
const handleClick = (tab, event) => {
console.log(tab, event);
};
const path = {1: "path"};
const path = { 1: "path" };
const dialogVisible = ref(false);
const dialogVisibleTip = ref('该任务无法学习,请联系管理员进行替换!');
@@ -487,10 +438,10 @@ function judgeTaskIsEnd(type, endTimes, status) {
case 1:
status == -1 ? 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 == -1 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
break;
@@ -623,7 +574,7 @@ async function toFinish(d, sName, chapterOrStageId) {
}
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 2023-02-04
if (d.type == 10) {
if(d.quizTaskId==null){
if (d.quizTaskId == null) {
// 肯定没有完成测评
// 调用接口 跳转页面
console.log('我是查询测评跳转链接所传递得参数', {
@@ -654,7 +605,7 @@ async function toFinish(d, sName, chapterOrStageId) {
console.log(err)
})
return
}else{
} else {
// 进行中 或者 已完成
// 调用接口 判断当前测评状态 跳转页面
console.log('我是查询测评跳转链接所传递得参数', {
@@ -665,10 +616,10 @@ async function toFinish(d, sName, chapterOrStageId) {
}).then(res => {
console.log(res)
if (res.code == 200) {
if(res.data.complete_status==2){
if (res.data.complete_status == 2) {
ElMessage.error("您已完成测评")
return
}else{
} else {
// 重新查询跳转
// 调用接口 跳转页面
console.log('我是查询测评跳转链接所传递得参数', {
@@ -713,7 +664,7 @@ async function toFinish(d, sName, chapterOrStageId) {
return;
}
//更新学员当前任务
await request(UPDATE_CURRENT_TASK, {id: d.id, type: PROJECT, pid: projectId, name: d.name})
await request(UPDATE_CURRENT_TASK, { id: d.id, type: PROJECT, pid: projectId, name: d.name })
if (d.type == 3 || d.type == 7 || (d.type === 5 && d.examType === 2)) {
d.status !== 1 && await request(STUDY_RECORD, {
studentId: userInfo.value.id,

View File

@@ -7,8 +7,7 @@
<div class="pdname">
{{ data.name }}
<el-popover v-if="data.chapterRemark" ref="popover" popper-class="jianjie" placement="right" trigger="hover"
:width="300"
:content="data.chapterRemark">
:width="300" :content="data.chapterRemark">
<template #reference><span style="font-size: 16px;font-weight: 600;">关卡说明></span></template>
</el-popover>
</div>
@@ -20,15 +19,14 @@
<div class="title">
<div class="titleL">{{ data.currentStageName }}</div>
<div class="titleR" :style="{ display: 'flex' }">
<img :src="data.currentChapterCnt ? circle : circle2"/>
<img :src="data.currentChapterCnt ? circle : circle2" />
<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 ? '未开始' : '未解锁') }}
</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">
@@ -63,36 +61,35 @@
<div>当前进度</div>
<div class="progress">
<div style="width: 291px">
<el-progress :percentage="parseInt(value.currentRatio)" :show-text="false" :stroke-width="8"
:color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(parseInt(value.currentRatio) / 20)]
"/>
<el-progress :percentage="parseInt(value.currentRatio)" :show-text="false" :stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(parseInt(value.currentRatio) / 20)]
" />
</div>
<div style="font-size: 14px;font-weight: 500;color: #277aff;margin-left: 10px;" :style="{
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(parseInt(value.currentRatio) / 20)],
}">
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(parseInt(value.currentRatio) / 20)],
}">
{{ parseInt(value.currentRatio) }}%
</div>
</div>
</div>
</div>
<div class="goclass"
:style="{background:(value.statusName !=='已结束' && (value.statusName || data.unlockMode === 1)) ?'#2478ff':'#999'}"
@click="toFinish(value)">
:style="{ background: (value.statusName !== '已结束' && (value.statusName || data.unlockMode === 1)) ? '#2478ff' : '#999' }"
@click="toFinish(value)">
{{ value.statusName || (data.unlockMode === 1 ? TASK_TYPES.toName[value.type] : '未解锁') }}
</div>
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
@@ -123,25 +120,19 @@
</div>
</el-tab-pane>
<el-tab-pane label="共享文档" name="second" v-if="data.attachSwitch =='1'">
<el-tab-pane label="共享文档" name="second" v-if="data.attachSwitch == '1'">
<div style="padding: 19px 30px 17px 28px">
<div
v-for="(value, index) in JSON.parse(data.attach?data.attach:'[]')"
:key="index"
style="
display: flex;
align-items: center;
margin-bottom: 15px;">
<div v-for="(value, index) in JSON.parse(data.attach ? data.attach : '[]')" :key="index" style="
display: flex;
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>
: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
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>
</div>
@@ -154,13 +145,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">
@@ -176,7 +167,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>
@@ -192,29 +183,33 @@
<div>总进度</div>
<div class="progress">
<div style="width: 291px">
<el-progress :percentage="parseInt(data.currentChapterCnt / data.totalChapterCnt * 100)"
:show-text="false" :stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[(parseInt(data.currentChapterCnt / data.totalChapterCnt) * 100) / 20]
"/>
<el-progress
:percentage="parseInt((data.currentChapterCnt ? data.currentChapterCnt : 0 / data.totalChapterCnt ? data.totalChapterCn : 0) * 100)"
:show-text="false" :stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[(parseInt(data.currentChapterCnt ? data.currentChapterCnt : 0 / data.totalChapterCnt ? data.totalChapterCnt : 0) * 100) / 20]
" />
</div>
<div style="font-size: 14px; font-weight: 500; margin-left: 10px" :style="{
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.currentChapterCnt / data.totalChapterCnt * 100) / 20)],
}">
{{ parseInt(data.currentChapterCnt / data.totalChapterCnt * 100) }}%
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: '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 ? data.currentChapterCnt : 0 /
data.totalChapterCnt ? data.totalChapterCnt : 0) > 1 ? 1 : (data.currentChapterCnt ?
data.currentChapterCnt : 0 /
data.totalChapterCnt ? data.totalChapterCnt : 0) * 100) }}%
</div>
</div>
</div>
@@ -224,34 +219,37 @@
<div>必修进度</div>
<div class="progress">
<div style="width: 291px">
<el-progress :percentage="parseInt(data.currentReqCnt / data.totalReqCnt * 100)" :show-text="false"
:stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.currentReqCnt / data.totalReqCnt * 100) / 20)]
"/>
<el-progress
:percentage="parseInt((data.currentReqCnt ? data.currentReqCnt : 0 / data.totalReqCnt ? data.totalReqCnt : 0) * 100)"
:show-text="false" :stroke-width="8" :color="
{
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(((data.currentReqCnt ? data.currentReqCnt : 0 / data.totalReqCnt ? data.totalReqCnt : 0) * 100) / 20)]
" />
</div>
<div style="
font-size: 14px;
font-weight: 500;
color: #277aff;
margin-left: 10px;
" :style="{
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.currentReqCnt / data.totalReqCnt * 100) / 20)],
}">
{{ parseInt(data.currentReqCnt?data.currentReqCnt:0 / data.totalReqCnt?data.totalReqCnt:0 * 100) }}%
font-size: 14px;
font-weight: 500;
color: #277aff;
margin-left: 10px;
" :style="{
color: {
0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)',
4: '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 ? data.currentReqCnt : 0 / data.totalReqCnt ? data.totalReqCnt :
0) > 1 ? 1 : (data.currentReqCnt ? data.currentReqCnt : 0 / data.totalReqCnt ? data.totalReqCnt : 0) *
100) }}%
</div>
</div>
</div>
@@ -264,51 +262,51 @@
<!-- 详细信息 -->
<!-- 弹框提示信息 -->
<el-dialog title="" top="347px" v-model="dialogVisible" :show-close="false"
style="display:flex;justify-content:center;align-items:center;height: 283px;padding:0;border-radius: 4px;"
width="502px">
style="display:flex;justify-content:center;align-items:center;height: 283px;padding:0;border-radius: 4px;"
width="502px">
<div style="width:288px;color:#333333;font-size: 22px;font-weight: 600;">{{ dialogVisibleTip }}</div>
<span slot="footer" style="display:inline-block;margin-top:60px;">
<el-button @click="dialogVisible = false" style="width:140px;height:40px;margin-right: 22px;">取消</el-button>
<el-button type="primary" @click="dialogVisible = false" style="width:140px;height:40px;">确定</el-button>
</span>
<el-button @click="dialogVisible = false" style="width:140px;height:40px;margin-right: 22px;">取消</el-button>
<el-button type="primary" @click="dialogVisible = false" style="width:140px;height:40px;">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script setup>
import {computed, onMounted, ref} from "vue";
import { computed, onMounted, ref } from "vue";
import circle from '@/assets/image/pathdetails/circle.png';
import circle2 from '@/assets/image/pathdetails/circle2.png';
import {request} from "@/api/request";
import {STUDY_RECORD, UPDATE_CURRENT_TASK, QueryEvaluationTaskStatusOne, EvaluationToLearn} from "@/api/api";
import {useRoute, useRouter} from "vue-router";
import {ElMessage} from "element-plus";
import {ROUTER, TASK_TYPES} from "@/api/CONST";
import { request } from "@/api/request";
import { STUDY_RECORD, UPDATE_CURRENT_TASK, QueryEvaluationTaskStatusOne, EvaluationToLearn } 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 {useStore} from "vuex";
import { useStore } from "vuex";
const {
query: {routerId, routerName},
query: { routerId, routerName },
} = useRoute();
const router = useRouter();
const returnclick = () => {
router.back();
};
const {commit, dispatch, state} = useStore()
const { commit, dispatch, state } = useStore()
const userInfo = computed(() => state.userInfo)
const data = computed(() => state.routerInfo)
console.log(data)
const activeName = ref("first");
onMounted(() => {
dispatch('getRouterInfo', {routerId})
dispatch('getRouterInfo', { routerId })
})
const handleClick = (tab, event) => {
console.log(tab, event);
};
const path = {1: "path"};
const path = { 1: "path" };
const dialogVisible = ref(false);
const dialogVisibleTip = ref('');
@@ -324,9 +322,9 @@ function judgeTaskIsEnd(type, endTimes, status) {
case 1:
status == -1 ? 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 == -1 ? isEnd = true : nowTime > endTime ? isEnd = true : isEnd = false;
break;
@@ -431,7 +429,7 @@ async function toFinish(d) {
}
}
//更新学员当前任务
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)) {
d.status !== 1 && await request(STUDY_RECORD, {
studentId: userInfo.value.id,
@@ -445,7 +443,7 @@ async function toFinish(d) {
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 2023-02-04
if (d.type == 10) {
if(d.quizTaskId==null){
if (d.quizTaskId == null) {
// 肯定没有完成测评
// 调用接口 跳转页面
console.log('我是查询测评跳转链接所传递得参数', {
@@ -476,7 +474,7 @@ async function toFinish(d) {
console.log(err)
})
return
}else{
} else {
// 进行中 或者 已完成
// 调用接口 判断当前测评状态 跳转页面
console.log('我是查询测评跳转链接所传递得参数', {
@@ -487,10 +485,10 @@ async function toFinish(d) {
}).then(res => {
console.log(res)
if (res.code == 200) {
if(res.data.complete_status==2){
if (res.data.complete_status == 2) {
ElMessage.error("您已完成测评")
return
}else{
} else {
// 重新查询跳转
// 调用接口 跳转页面
console.log('我是查询测评跳转链接所传递得参数', {
@@ -543,19 +541,19 @@ async function toFinish(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("/") ?
router.push({
path,
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
},
}) : ''
router.push({
path,
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
},
}) : ''
}