mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-12 20:36:48 +08:00
修改阶段状态
This commit is contained in:
@@ -18,21 +18,11 @@
|
|||||||
<div v-if="i.stageId == '0' && i.taskProcessList.length == 0"></div>
|
<div v-if="i.stageId == '0' && i.taskProcessList.length == 0"></div>
|
||||||
<div v-else class="title">
|
<div v-else class="title">
|
||||||
<div class="titleL">{{ i.stageName }}</div>
|
<div class="titleL">{{ i.stageName }}</div>
|
||||||
<!-- 当前任务已结束的时候显示下面 -->
|
<div class="titleR" :style="{ display: 'flex' }">
|
||||||
<div v-if="i.status==3" class="titleR" :style="{ display: 'flex' }">
|
<img src="../../assets/image/pathdetails/circle.png"/>
|
||||||
<div style="width:8px;height:8px;border-radius:8px;border:2px solid #999;"></div>
|
<div class="titleRT"
|
||||||
<div class="titleRT" style="color:#999;">已结束</div>
|
:style="(i.stageStatusName === '未开始' || i.stageStatusName === '已结束') && 'color:#999'">
|
||||||
</div>
|
{{ i.stageStatusName }}
|
||||||
<!-- 未开始 -->
|
|
||||||
<div v-else-if="i.status==2" class="titleR" :style="{ display: 'flex' }">
|
|
||||||
<div style="width:8px;height:8px;border-radius:8px;border:2px solid #999;"></div>
|
|
||||||
<div class="titleRT" style="color:#999;">未开始</div>
|
|
||||||
</div>
|
|
||||||
<!-- 默认进行中状态 -->
|
|
||||||
<div v-else class="titleR" :style="{ display: 'flex' }">
|
|
||||||
<img src="../../assets/image/pathdetails/circle.png" />
|
|
||||||
<div class="titleRT">
|
|
||||||
{{ queryAllStatus(i.taskProcessList) ? '已完成' : '进行中' }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="titleR" :style="{ display: i.status === 2 ? 'flex' : 'none' }">
|
<!-- <div class="titleR" :style="{ display: i.status === 2 ? 'flex' : 'none' }">
|
||||||
@@ -149,7 +139,9 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 15px;">
|
margin-bottom: 15px;">
|
||||||
<!-- <img :src="value.img" style="width: 22px; height: 26px"/> -->
|
<!-- <img :src="value.img" style="width: 22px; height: 26px"/> -->
|
||||||
<FileTypeImg :v-model="value.name? value.name : value.slice(value.lastIndexOf('/')+1,value.indexOf('-')) + value.slice(value.lastIndexOf('.'))" :style="{width: '22px',height: '26px'}"></FileTypeImg>
|
<FileTypeImg
|
||||||
|
:v-model="value.name? value.name : value.slice(value.lastIndexOf('/')+1,value.indexOf('-')) + value.slice(value.lastIndexOf('.'))"
|
||||||
|
:style="{width: '22px',height: '26px'}"></FileTypeImg>
|
||||||
<div class="sharedocname">{{ value.name }}</div>
|
<div class="sharedocname">{{ value.name }}</div>
|
||||||
<div class="download">
|
<div class="download">
|
||||||
<img
|
<img
|
||||||
@@ -168,13 +160,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">
|
||||||
@@ -187,7 +179,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>
|
||||||
@@ -212,7 +204,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((data.totalProgress * 100) / 20)]
|
}[parseInt((data.totalProgress * 100) / 20)]
|
||||||
" />
|
"/>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 14px; font-weight: 500; margin-left: 10px;color:#677d86;">
|
<div style="font-size: 14px; font-weight: 500; margin-left: 10px;color:#677d86;">
|
||||||
{{ parseInt(data.totalProgress * 100) }}%
|
{{ parseInt(data.totalProgress * 100) }}%
|
||||||
@@ -235,7 +227,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((data.compulsoryProgress * 100) / 20)]
|
}[parseInt((data.compulsoryProgress * 100) / 20)]
|
||||||
" />
|
"/>
|
||||||
</div>
|
</div>
|
||||||
<div style="
|
<div style="
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -253,12 +245,14 @@
|
|||||||
<!-- 学员积分及个人完成度排行榜 -->
|
<!-- 学员积分及个人完成度排行榜 -->
|
||||||
<div class="detailRB">
|
<div class="detailRB">
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div style="display:flex;justify-content: space-between;align-items: center;height: 56px;padding-left: 27px;padding-right: 27px;">
|
<div
|
||||||
|
style="display:flex;justify-content: space-between;align-items: center;height: 56px;padding-left: 27px;padding-right: 27px;">
|
||||||
<div
|
<div
|
||||||
@click="tabChange(1)"
|
@click="tabChange(1)"
|
||||||
style="font-size: 14px;color: rgba(51, 51, 51, 1);font-weight: 600;cursor: pointer;"
|
style="font-size: 14px;color: rgba(51, 51, 51, 1);font-weight: 600;cursor: pointer;"
|
||||||
:style="{}"
|
:style="{}"
|
||||||
>积分排行榜</div>
|
>积分排行榜
|
||||||
|
</div>
|
||||||
<!-- <div style="font-size: 14px;color: rgba(51, 51, 51, 1);font-weight: 600;">完成度排行榜</div> -->
|
<!-- <div style="font-size: 14px;color: rgba(51, 51, 51, 1);font-weight: 600;">完成度排行榜</div> -->
|
||||||
<el-select
|
<el-select
|
||||||
@change="choiceStatus"
|
@change="choiceStatus"
|
||||||
@@ -279,24 +273,33 @@
|
|||||||
<div style="display: flex;height: 1px;background-color: #ecf5ff;justify-content: space-between;">
|
<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-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 v-else style="width:146px;height: 2px;background-color: rgba(0,0,0,0);margin-right: 18px;"></div>
|
||||||
</div>
|
</div>
|
||||||
<!-- line -->
|
<!-- line -->
|
||||||
<div style="width: 100%;display: flex;flex-direction: column;height: 66px;justify-content: center;">
|
<div style="width: 100%;display: flex;flex-direction: column;height: 66px;justify-content: center;">
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<div style="width:90px;margin-left: 50px;font-size: 14px;color: rgba(103, 125, 134, 1);">我的排名:{{ myIndex }}</div>
|
<div style="width:90px;margin-left: 50px;font-size: 14px;color: rgba(103, 125, 134, 1);">
|
||||||
|
我的排名:{{ myIndex }}
|
||||||
|
</div>
|
||||||
<div style="width:146px;margin-right: -30px;font-size: 14px;color: rgba(103, 125, 134, 1);">
|
<div style="width:146px;margin-right: -30px;font-size: 14px;color: rgba(103, 125, 134, 1);">
|
||||||
{{tabValue==1?"项目积分 :":"完成度 :"}} {{ tabValue==1? myPoint : myRateStr }}
|
{{ tabValue == 1 ? "项目积分 :" : "完成度 :" }} {{ tabValue == 1 ? myPoint : myRateStr }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 排行榜列表 -->
|
<!-- 排行榜列表 -->
|
||||||
<div style="display: flex;padding-top: 30px;padding-bottom: 100px;background: linear-gradient(0deg, rgba(36,120,255,0) 0%, rgba(36,120,255,0.15) 100%);">
|
<div
|
||||||
|
style="display: flex;padding-top: 30px;padding-bottom: 100px;background: linear-gradient(0deg, rgba(36,120,255,0) 0%, rgba(36,120,255,0.15) 100%);">
|
||||||
<div style="display: flex;justify-content: center;align-items: center;width: 100%;">
|
<div style="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="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;">排名</div>
|
||||||
<div style="margin-left: 110px;margin-right: 110px;font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;">名称</div>
|
<div
|
||||||
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;">{{tabValue==1?"积分":"进度"}}</div>
|
style="margin-left: 110px;margin-right: 110px;font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;">
|
||||||
|
名称
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;">
|
||||||
|
{{ tabValue == 1 ? "积分" : "进度" }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 学员列表 -->
|
<!-- 学员列表 -->
|
||||||
@@ -304,8 +307,9 @@
|
|||||||
<div
|
<div
|
||||||
v-for="(item,i) in tableRankData" :key="i"
|
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;">
|
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;">
|
<div
|
||||||
{{ i + 1 == 1 || i + 1 == 2 || i + 1 == 3 ? '': i + 1 }}
|
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
|
<img
|
||||||
v-if="i + 1 == 1"
|
v-if="i + 1 == 1"
|
||||||
style="width: 24px; height: 24px;"
|
style="width: 24px; height: 24px;"
|
||||||
@@ -327,15 +331,17 @@
|
|||||||
src="../../assets/image/rankme.png"
|
src="../../assets/image/rankme.png"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
|
<div
|
||||||
|
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
|
||||||
<img
|
<img
|
||||||
style="width: 28px; height: 28px;border-radius: 28px;"
|
style="width: 28px; height: 28px;border-radius: 28px;"
|
||||||
:src="item?.avatar"
|
:src="item?.avatar"
|
||||||
/>
|
/>
|
||||||
{{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
|
||||||
{{tabValue==1?item?.pointsCount:item?.rateStr}}
|
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>
|
</div>
|
||||||
|
|
||||||
@@ -343,36 +349,42 @@
|
|||||||
<div
|
<div
|
||||||
v-if="myIndex > tableRankData.length"
|
v-if="myIndex > tableRankData.length"
|
||||||
style="display: flex;justify-content: center;align-items: center;width: 100%;position: relative;top:-60px;margin-bottom: 38px;">
|
style="display: flex;justify-content: center;align-items: center;width: 100%;position: relative;top:-60px;margin-bottom: 38px;">
|
||||||
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
<div
|
||||||
|
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
||||||
{{ '...' }}
|
{{ '...' }}
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
|
<div
|
||||||
{{''}}
|
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
|
||||||
|
{{ '' }}
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
<div
|
||||||
{{''}}
|
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
||||||
|
{{ '' }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="myIndex > tableRankData.length"
|
v-if="myIndex > tableRankData.length"
|
||||||
style="display: flex;justify-content: center;align-items: center;width: 100%;position: relative;top:-60px;margin-bottom: 38px;">
|
style="display: flex;justify-content: center;align-items: center;width: 100%;position: relative;top:-60px;margin-bottom: 38px;">
|
||||||
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
<div
|
||||||
|
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:30%;display: flex;justify-content: center;align-items: center;">
|
||||||
{{ myIndex }}
|
{{ myIndex }}
|
||||||
<img
|
<img
|
||||||
style="width: 24px; height: 24px;position: absolute;left:110px;"
|
style="width: 24px; height: 24px;position: absolute;left:110px;"
|
||||||
src="../../assets/image/rankme.png"
|
src="../../assets/image/rankme.png"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
|
<div
|
||||||
|
style="font-size: 14px;color:rgba(36, 120, 255, 1);font-weight: 600;width:34%;display: flex;justify-content: center;align-items: center;">
|
||||||
<img
|
<img
|
||||||
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
|
||||||
{{tabValue==1?tableRankData[myIndex-1]?.pointsCount:tableRankData[myIndex-1]?.rateStr}}
|
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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -397,10 +409,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, reactive, ref } from "vue";
|
import {computed, reactive, ref, watch} from "vue";
|
||||||
import { ElLoading } from 'element-plus'
|
import {ElLoading} from 'element-plus'
|
||||||
import img from "@/assets/image/uploadimg.png";
|
import img from "@/assets/image/uploadimg.png";
|
||||||
import { useRequest, request } from "@/api/request";
|
import {useRequest, request} from "@/api/request";
|
||||||
import {
|
import {
|
||||||
PROJECT_PROCESS,
|
PROJECT_PROCESS,
|
||||||
ONLINE_PROCESS,
|
ONLINE_PROCESS,
|
||||||
@@ -412,30 +424,35 @@ import {
|
|||||||
PointList,
|
PointList,
|
||||||
SubmitExternalExam
|
SubmitExternalExam
|
||||||
} from "@/api/api";
|
} from "@/api/api";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import {useRoute, useRouter} from "vue-router";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import { ElMessage } from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import {PROJECT} from "@/api/CONST";
|
import {PROJECT} from "@/api/CONST";
|
||||||
import FileTypeImg from "@/components/FileTypeImg.vue";
|
import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||||
import {UPDATE_CURRENT_TASK} from "../../api/api";
|
import {UPDATE_CURRENT_TASK} from "../../api/api";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
query: { courseId, projectId },
|
query: {courseId, projectId},
|
||||||
} = useRoute();
|
} = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const { data } = useRequest(PROJECT_PROCESS, {
|
const {data} = useRequest(PROJECT_PROCESS, {
|
||||||
projectId: projectId || courseId,
|
projectId: projectId || courseId,
|
||||||
});
|
});
|
||||||
|
watch(() => data.value.stageProcessList, () => {
|
||||||
|
data.value.stageProcessList.forEach((t)=>{t.stageStatusName = getTaskStatus(t)})
|
||||||
|
}, {deep: true})
|
||||||
|
|
||||||
|
|
||||||
const studyProgress = [
|
const studyProgress = [
|
||||||
{
|
{
|
||||||
value:2,
|
value: 2,
|
||||||
label:"个人完成度"
|
label: "个人完成度"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value:3,
|
value: 3,
|
||||||
label:"小组完成度"
|
label: "小组完成度"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
const stateValue = ref(undefined)
|
const stateValue = ref(undefined)
|
||||||
@@ -446,30 +463,30 @@ const choiceStatus = (e) => {
|
|||||||
console.log(e)
|
console.log(e)
|
||||||
tabValue.value = e
|
tabValue.value = e
|
||||||
stateValue.value = e
|
stateValue.value = e
|
||||||
if(e==2){
|
if (e == 2) {
|
||||||
// 获取个人完成度
|
// 获取个人完成度
|
||||||
request(CompletionList, {projectId:projectId,type:0}).then(res=>{
|
request(CompletionList, {projectId: projectId, type: 0}).then(res => {
|
||||||
console.log('获取个人完成度---》', res)
|
console.log('获取个人完成度---》', res)
|
||||||
if(res.code==200){
|
if (res.code == 200) {
|
||||||
tableRankData.value = res.data.datas
|
tableRankData.value = res.data.datas
|
||||||
myIndex.value = res.data.myIndex
|
myIndex.value = res.data.myIndex
|
||||||
myRate.value = res.data.myRate
|
myRate.value = res.data.myRate
|
||||||
myRateStr.value = res.data.myRateStr
|
myRateStr.value = res.data.myRateStr
|
||||||
}
|
}
|
||||||
}).catch(err=>{
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
// 获取小组完成度
|
// 获取小组完成度
|
||||||
request(CompletionList, {projectId:projectId,type:1}).then(res=>{
|
request(CompletionList, {projectId: projectId, type: 1}).then(res => {
|
||||||
console.log('获取小组完成度---》', res)
|
console.log('获取小组完成度---》', res)
|
||||||
if(res.code==200){
|
if (res.code == 200) {
|
||||||
tableRankData.value = res.data.datas
|
tableRankData.value = res.data.datas
|
||||||
myIndex.value = res.data.myIndex
|
myIndex.value = res.data.myIndex
|
||||||
myRate.value = res.data.myRate
|
myRate.value = res.data.myRate
|
||||||
myRateStr.value = res.data.myRateStr
|
myRateStr.value = res.data.myRateStr
|
||||||
}
|
}
|
||||||
}).catch(err=>{
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -481,14 +498,14 @@ const tabChange = (tabs) => {
|
|||||||
stateValue.value = undefined;
|
stateValue.value = undefined;
|
||||||
tabValue.value = tabs;
|
tabValue.value = tabs;
|
||||||
// 获取项目积分
|
// 获取项目积分
|
||||||
request(PointList, {projectId:projectId}).then(res=>{
|
request(PointList, {projectId: projectId}).then(res => {
|
||||||
console.log('我是获取的项目积分---》', res)
|
console.log('我是获取的项目积分---》', res)
|
||||||
if(res.code==200){
|
if (res.code == 200) {
|
||||||
tableRankData.value = res.data.datas
|
tableRankData.value = res.data.datas
|
||||||
myIndex.value = res.data.myIndex
|
myIndex.value = res.data.myIndex
|
||||||
myPoint.value = res.data.myPointsCount
|
myPoint.value = res.data.myPointsCount
|
||||||
}
|
}
|
||||||
}).catch(err=>{
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -496,19 +513,33 @@ const tableRankData = ref([])
|
|||||||
const myIndex = ref('')
|
const myIndex = ref('')
|
||||||
const myPoint = ref('')
|
const myPoint = ref('')
|
||||||
// 获取项目积分
|
// 获取项目积分
|
||||||
request(PointList, {projectId:projectId}).then(res=>{
|
request(PointList, {projectId: projectId}).then(res => {
|
||||||
console.log('我是获取的项目积分---》', res)
|
console.log('我是获取的项目积分---》', res)
|
||||||
if(res.code==200){
|
if (res.code == 200) {
|
||||||
tableRankData.value = res.data.datas
|
tableRankData.value = res.data.datas
|
||||||
myIndex.value = res.data.myIndex
|
myIndex.value = res.data.myIndex
|
||||||
myPoint.value = res.data.myPointsCount
|
myPoint.value = res.data.myPointsCount
|
||||||
}
|
}
|
||||||
}).catch(err=>{
|
}).catch(err => {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
console.log("datadata", data);
|
function getTaskStatus(d){
|
||||||
|
if (data.value.status !== 3) {
|
||||||
|
return '已结束'
|
||||||
|
}
|
||||||
|
if (dayjs().isBefore(dayjs(d.beginTime)) || !d.taskProcessList?.filter(t => t.status === 1)?.length) {
|
||||||
|
return '未开始'
|
||||||
|
}
|
||||||
|
if (dayjs().isAfter(dayjs(data.value.endTime))) {
|
||||||
|
return '已结束'
|
||||||
|
}
|
||||||
|
if (d.taskProcessList?.filter(t => t.status === 1)?.length === d.taskProcessList?.length) {
|
||||||
|
return '已完成'
|
||||||
|
}
|
||||||
|
return '进行中'
|
||||||
|
}
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
loading.value = ElLoading.service({
|
loading.value = ElLoading.service({
|
||||||
@@ -539,7 +570,7 @@ const activeName = ref("first");
|
|||||||
const handleClick = (tab, event) => {
|
const handleClick = (tab, event) => {
|
||||||
console.log(tab, event);
|
console.log(tab, event);
|
||||||
};
|
};
|
||||||
const path = { 1: "path" };
|
const path = {1: "path"};
|
||||||
const types = ref({
|
const types = ref({
|
||||||
typeName: {
|
typeName: {
|
||||||
1: "在线",
|
1: "在线",
|
||||||
@@ -573,20 +604,20 @@ const types = ref({
|
|||||||
},
|
},
|
||||||
path: {
|
path: {
|
||||||
1: window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
|
1: window.location.protocol + import.meta.env.VITE_BOE_ONLINE_CLASS_URL, //在线
|
||||||
2: ({ courseId }) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${courseId}`, '_top'),
|
2: ({courseId}) => window.open(`${location.protocol}//${location.host}${import.meta.env.VITE_BASE_API}/stu/project/redirectDetail?courseId=${courseId}`, '_top'),
|
||||||
3: window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
|
3: window.location.protocol + import.meta.env.VITE_BOE_CASS_DETAIL_URL, //案例
|
||||||
4: "/homeworkpage",
|
4: "/homeworkpage",
|
||||||
5: window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
|
5: window.location.protocol + import.meta.env.VITE_BOE_EXAM_DETAIL_URL, //考试
|
||||||
6: "/livebroadcast",
|
6: "/livebroadcast",
|
||||||
7: ({ targetId }) => window.open(targetId, '_top'),
|
7: ({targetId}) => window.open(targetId, '_top'),
|
||||||
8: "/discusspage",
|
8: "/discusspage",
|
||||||
9: "/moreactive",
|
9: "/moreactive",
|
||||||
10: ({ evaType, targetId }) =>
|
10: ({evaType, targetId}) =>
|
||||||
window.open(
|
window.open(
|
||||||
evaType == 0
|
evaType == 0
|
||||||
? window.location.protocol + import.meta.env.VITE_BOE_TEST_DETAIL_URL+ targetId
|
? window.location.protocol + import.meta.env.VITE_BOE_TEST_DETAIL_URL + targetId
|
||||||
: window.location.protocol + import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL+targetId+`&quizTaskKid=${projectId}&channelCode=project`
|
: window.location.protocol + import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL + targetId + `&quizTaskKid=${projectId}&channelCode=project`
|
||||||
,'_top'), //测评
|
, '_top'), //测评
|
||||||
11: "/surveydetail",
|
11: "/surveydetail",
|
||||||
12: "/ballotpage",
|
12: "/ballotpage",
|
||||||
13: "/projectdetails",
|
13: "/projectdetails",
|
||||||
@@ -845,15 +876,17 @@ async function toFinish(d, sName, chapterOrStageId) {
|
|||||||
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 + "-");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询当前阶段所有任务是否都完成
|
// 查询当前阶段所有任务是否都完成
|
||||||
const queryAllStatus = (data) => {
|
const queryAllStatus = (data) => {
|
||||||
// status === 1 已完成
|
// status === 1 已完成
|
||||||
console.log(data)
|
console.log(data)
|
||||||
for(let i=0;i<data.length;i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
if(data[i].status!==1){
|
if (data[i].status !== 1) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -861,15 +894,15 @@ const queryAllStatus = (data) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 共享文档下载
|
// 共享文档下载
|
||||||
function downloadFile(url){
|
function downloadFile(url) {
|
||||||
window.open(url);
|
window.open(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 继续学习
|
// 继续学习
|
||||||
function continueLearn(lastLearnedId){
|
function continueLearn(lastLearnedId) {
|
||||||
data.value.stageProcessList.forEach(stage=>{
|
data.value.stageProcessList.forEach(stage => {
|
||||||
stage?.taskProcessList?.forEach(d=>{
|
stage?.taskProcessList?.forEach(d => {
|
||||||
if(d.projectTaskId == lastLearnedId){
|
if (d.projectTaskId == lastLearnedId) {
|
||||||
toFinish(d, stage.stageName, stage.stageId)
|
toFinish(d, stage.stageName, stage.stageId)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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((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">
|
||||||
@@ -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,11 +390,11 @@ 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)){
|
if (judgeTaskIsEnd(d.type, data.value.endTime, data.value.status)) {
|
||||||
ElMessage.error("当前任务已结束")
|
ElMessage.error("当前任务已结束")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -437,7 +442,7 @@ function toFinish(d) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 此处判断外部考试跳转
|
// 此处判断外部考试跳转
|
||||||
if(d.examType==2){
|
if (d.examType == 2) {
|
||||||
|
|
||||||
// 点击即更新状态 进行中
|
// 点击即更新状态 进行中
|
||||||
request(SubmitExternalExam, {
|
request(SubmitExternalExam, {
|
||||||
@@ -446,16 +451,16 @@ function toFinish(d) {
|
|||||||
"externalName": d.name,
|
"externalName": d.name,
|
||||||
"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.routerTaskId,
|
id: d.id,
|
||||||
type: ROUTER,
|
type: ROUTER,
|
||||||
infoId: routerId,
|
infoId: routerId,
|
||||||
courseId: d.courseId,
|
courseId: d.courseId,
|
||||||
@@ -506,22 +511,22 @@ function toFinish(d) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//更新学员当前任务
|
//更新学员当前任务
|
||||||
request(UPDATE_CURRENT_TASK,{id:d.routerTaskId,type:ROUTER,pid:routerId,name:d.name})
|
await request(UPDATE_CURRENT_TASK, {id: d.id, type: ROUTER, pid: routerId, name: d.name})
|
||||||
if (d.type === 3 || d.type === 7) {
|
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,
|
||||||
@@ -536,14 +541,14 @@ function toFinish(d) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 测评模块 请求接口跳转新的页面 - 新增 暂时未调试 目前无测评数据 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.routerTaskId,
|
id: d.id,
|
||||||
type: ROUTER,
|
type: ROUTER,
|
||||||
infoId: routerId,
|
infoId: routerId,
|
||||||
courseId: d.courseId,
|
courseId: d.courseId,
|
||||||
@@ -557,7 +562,7 @@ function toFinish(d) {
|
|||||||
return
|
return
|
||||||
|
|
||||||
// 调用接口 跳转页面
|
// 调用接口 跳转页面
|
||||||
console.log('我是查询测评跳转链接所传递得参数',{
|
console.log('我是查询测评跳转链接所传递得参数', {
|
||||||
"businessType": "learningpath",
|
"businessType": "learningpath",
|
||||||
"chapterId": data.value.currentStageId,
|
"chapterId": data.value.currentStageId,
|
||||||
"courseId": d.courseId,
|
"courseId": d.courseId,
|
||||||
@@ -574,14 +579,14 @@ function toFinish(d) {
|
|||||||
"routerOrProjectId": routerId,
|
"routerOrProjectId": routerId,
|
||||||
"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
|
||||||
@@ -590,13 +595,13 @@ function toFinish(d) {
|
|||||||
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.routerTaskId,
|
id: d.id,
|
||||||
type: ROUTER,
|
type: ROUTER,
|
||||||
infoId: routerId,
|
infoId: routerId,
|
||||||
courseId: d.courseId,
|
courseId: d.courseId,
|
||||||
|
|||||||
Reference in New Issue
Block a user