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

@@ -26,11 +26,9 @@
</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(
<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">
)" :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,11 +60,7 @@
<div>当前进度</div>
<div class="progress">
<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)',
1: 'rgba(255, 151, 38, 1)',
@@ -119,10 +113,7 @@
</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="
<div v-for="(value, index) in JSON.parse(data.attach ? data.attach : '[]')" :key="index" style="
display: flex;
align-items: center;
margin-bottom: 15px;">
@@ -132,10 +123,7 @@
: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>
@@ -182,8 +170,8 @@
<div>总进度</div>
<div class="progress">
<div style="width: 291px">
<el-progress :percentage="parseInt(data.totalProgress * 100)" :show-text="false" :stroke-width="8"
:color="
<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)',
@@ -191,11 +179,11 @@
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.totalProgress * 100) / 20)]
}[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,8 +193,8 @@
<div>必修进度</div>
<div class="progress">
<div style="width: 291px">
<el-progress :percentage="parseInt(data.compulsoryProgress * 100)" :show-text="false"
:stroke-width="8" :color="
<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)',
@@ -214,7 +202,7 @@
3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.compulsoryProgress * 100) / 20)]
}[parseInt(((data.compulsoryProgress ? data.compulsoryProgress : 0) * 100) / 20)]
" />
</div>
<div style="
@@ -222,7 +210,9 @@
font-weight: 500;
color: #277aff;
margin-left: 10px;color:#677d86;">
{{ parseInt(data.compulsoryProgress * 100) }}%
{{
parseInt(((data.compulsoryProgress ? data.compulsoryProgress : 0) > 1 ? 1 : (data.compulsoryProgress ? data.compulsoryProgress : 0))
* 100) }}%
</div>
</div>
</div>
@@ -235,34 +225,21 @@
<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="{}"
>积分排行榜
<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="完成度排行榜"
<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-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-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 -->
@@ -292,39 +269,20 @@
</div>
<!-- 学员列表 -->
<div>
<div
v-for="(item,i) in tableRankData" :key="i"
<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;">
{{ 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"
/>
<img style="width: 28px; height: 28px;border-radius: 28px;" :src="item?.avatar" />
{{ item.name }}
</div>
<div
@@ -334,8 +292,7 @@
</div>
<!-- 我的排名 -->
<div
v-if="myIndex > tableRankData.length"
<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;">
@@ -351,23 +308,17 @@
</div>
</div>
<div
v-if="myIndex > tableRankData.length"
<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;">
{{ 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"
/>
<img style="width: 28px; height: 28px;border-radius: 28px;" :src="tableRankData[myIndex - 1]?.avatar" />
{{ tableRankData[myIndex - 1]?.name }}
</div>
<div

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>
@@ -27,8 +26,7 @@
</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,8 +61,7 @@
<div>当前进度</div>
<div class="progress">
<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)',
1: 'rgba(255, 151, 38, 1)',
@@ -125,10 +122,7 @@
<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="
<div v-for="(value, index) in JSON.parse(data.attach ? data.attach : '[]')" :key="index" style="
display: flex;
align-items: center;
margin-bottom: 15px;">
@@ -138,10 +132,7 @@
: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>
@@ -192,7 +183,8 @@
<div>总进度</div>
<div class="progress">
<div style="width: 291px">
<el-progress :percentage="parseInt(data.currentChapterCnt / data.totalChapterCnt * 100)"
<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)',
@@ -201,7 +193,7 @@
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.currentChapterCnt : 0 / data.totalChapterCnt ? data.totalChapterCnt : 0) * 100) / 20]
" />
</div>
<div style="font-size: 14px; font-weight: 500; margin-left: 10px" :style="{
@@ -212,9 +204,12 @@
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.currentChapterCnt : 0 / data.totalChapterCnt ? data.totalChapterCnt : 0) * 100) / 20)],
}">
{{ parseInt(data.currentChapterCnt / data.totalChapterCnt * 100) }}%
{{ 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,8 +219,9 @@
<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="
<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)',
@@ -233,7 +229,7 @@
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) / 20)]
" />
</div>
<div style="
@@ -249,9 +245,11 @@
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) / 20)],
}">
{{ parseInt(data.currentReqCnt?data.currentReqCnt:0 / data.totalReqCnt?data.totalReqCnt:0 * 100) }}%
{{ 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>