mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-18 07:16:48 +08:00
feat:增加项目任务入口时间和状态判断
This commit is contained in:
@@ -19,10 +19,7 @@
|
||||
<img src="../../assets/image/pathdetails/circle.png" />
|
||||
<div class="titleRT">进行中</div>
|
||||
</div>
|
||||
<div
|
||||
class="titleR"
|
||||
:style="{ display: i.status === 2 ? 'flex' : 'none' }"
|
||||
>
|
||||
<div class="titleR" :style="{ display: i.status === 2 ? 'flex' : 'none' }">
|
||||
<img src="../../assets/image/pathdetails/circle2.png" />
|
||||
<div class="titleRT" style="color: rgba(102, 102, 102, 1)">
|
||||
未开始
|
||||
@@ -30,14 +27,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="i.stageId == '0' && i.taskProcessList.length == 0"></div>
|
||||
<div
|
||||
v-else
|
||||
class="course"
|
||||
v-for="(value, index) in i.taskProcessList.filter(
|
||||
<div v-else class="course" v-for="(value, index) in i.taskProcessList.filter(
|
||||
(e) => !whiteTypes(e.type)
|
||||
)"
|
||||
:key="index"
|
||||
>
|
||||
)" :key="index">
|
||||
<div style="width: 70%">
|
||||
<div class="coursename">{{ value.name }}</div>
|
||||
<div class="coursetag">
|
||||
@@ -56,18 +48,11 @@
|
||||
<!-- {{ item.name }}-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div
|
||||
class="progressBox"
|
||||
:style="{ display: value.status === 1 ? 'block' : 'none' }"
|
||||
>
|
||||
<div v-if="value.type == 1" class="progressBox">
|
||||
<div>当前进度</div>
|
||||
<div class="progress">
|
||||
<div style="width: 291px">
|
||||
<el-progress
|
||||
:percentage="value.currentRatio"
|
||||
:show-text="false"
|
||||
:stroke-width="8"
|
||||
:color="
|
||||
<el-progress :percentage="value.currentRatio" :show-text="false" :stroke-width="8" :color="
|
||||
{
|
||||
0: 'rgba(238, 112, 108, 1)',
|
||||
1: 'rgba(255, 151, 38, 1)',
|
||||
@@ -76,11 +61,9 @@
|
||||
4: 'rgba(57, 219, 183, 1)',
|
||||
5: 'rgba(57, 219, 183, 1)',
|
||||
}[parseInt(value.currentRatio / 20)]
|
||||
"
|
||||
/>
|
||||
" />
|
||||
</div>
|
||||
<div
|
||||
style="font-size: 14px;font-weight: 500;color: #277aff;margin-left: 10px;color:#677d86;">
|
||||
<div style="font-size: 14px;font-weight: 500;color: #277aff;margin-left: 10px;color:#677d86;">
|
||||
{{ value.currentRatio }}%
|
||||
</div>
|
||||
</div>
|
||||
@@ -154,18 +137,12 @@
|
||||
<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)' }"
|
||||
>
|
||||
<div class="teacheritem" :style="{ 'border-bottom': '1px solid rgba(56, 125, 247, 0.2)' }">
|
||||
<img class="peopleimg" :src="`/upload${userInfo.avatar}`" />
|
||||
<div style="margin-left: 17px">
|
||||
<div class="teacherName">
|
||||
@@ -182,10 +159,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>
|
||||
@@ -199,10 +173,7 @@
|
||||
<div>总进度</div>
|
||||
<div class="progress">
|
||||
<div style="width: 291px">
|
||||
<el-progress
|
||||
:percentage="parseInt(data.totalProgress * 100)"
|
||||
:show-text="false"
|
||||
:stroke-width="8"
|
||||
<el-progress :percentage="parseInt(data.totalProgress * 100)" :show-text="false" :stroke-width="8"
|
||||
:color="
|
||||
{
|
||||
0: 'rgba(238, 112, 108, 1)',
|
||||
@@ -212,11 +183,9 @@
|
||||
4: 'rgba(57, 219, 183, 1)',
|
||||
5: 'rgba(57, 219, 183, 1)',
|
||||
}[parseInt((data.totalProgress * 100) / 20)]
|
||||
"
|
||||
/>
|
||||
" />
|
||||
</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) }}%
|
||||
</div>
|
||||
</div>
|
||||
@@ -227,11 +196,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 * 100)" :show-text="false"
|
||||
:stroke-width="8" :color="
|
||||
{
|
||||
0: 'rgba(238, 112, 108, 1)',
|
||||
1: 'rgba(255, 151, 38, 1)',
|
||||
@@ -240,11 +206,9 @@
|
||||
4: 'rgba(57, 219, 183, 1)',
|
||||
5: 'rgba(57, 219, 183, 1)',
|
||||
}[parseInt((data.compulsoryProgress * 100) / 20)]
|
||||
"
|
||||
/>
|
||||
" />
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
<div style="
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #277aff;
|
||||
@@ -357,6 +321,62 @@ const types = ref({
|
||||
});
|
||||
function toFinish(d, sName, chapterId) {
|
||||
console.log("dddddd", d);
|
||||
// 作业过期判断
|
||||
if (d.type == 4) {
|
||||
let date1 = new Date(d.endTime).getTime();
|
||||
let date2 = new Date().getTime();
|
||||
if (date1 < date2) {
|
||||
ElMessage.error("当前作业已结束")
|
||||
return
|
||||
}
|
||||
}
|
||||
// 直播结束时间
|
||||
if (d.type == 6) {
|
||||
let date1 = new Date(d.endTime).getTime();
|
||||
let date2 = new Date().getTime();
|
||||
if (date1 < date2) {
|
||||
ElMessage.error("当前直播已结束")
|
||||
return
|
||||
}
|
||||
}
|
||||
// 考试 停用
|
||||
if (d.type == 5) {
|
||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||
ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||
return
|
||||
}
|
||||
}
|
||||
// 评估 停用
|
||||
if (d.type == 11) {
|
||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||
ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||
return
|
||||
}
|
||||
}
|
||||
// 其他活动 结束时间
|
||||
if (d.type == 9) {
|
||||
let date1 = new Date(d.endTime).getTime();
|
||||
let date2 = new Date().getTime();
|
||||
if (date1 < date2) {
|
||||
ElMessage.error("当前活动已结束")
|
||||
return
|
||||
}
|
||||
}
|
||||
// 在线课 停用 -- 暂时没有在线课停用标记
|
||||
if (d.type == 1) {
|
||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||
ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||
return
|
||||
}
|
||||
}
|
||||
// 面授课 停用
|
||||
if (d.type == 2) {
|
||||
if (d.taskStatus == 1 || d.taskStatus == 2) {
|
||||
ElMessage.error("该任务无法学习,请联系管理员进行替换。")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (!types.value.path[d.type]) {
|
||||
ElMessage.error("暂时未开放");
|
||||
return;
|
||||
@@ -403,16 +423,19 @@ function whiteTypes(type) {
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.pdname {
|
||||
font-size: 20px;
|
||||
font-weight: 800;
|
||||
color: #ffffff;
|
||||
margin-top: 17px;
|
||||
}
|
||||
|
||||
.detailinfo {
|
||||
width: 100%;
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
|
||||
.detailL {
|
||||
flex: 1;
|
||||
margin-right: 20px;
|
||||
@@ -421,6 +444,7 @@ function whiteTypes(type) {
|
||||
padding-left: 45px;
|
||||
padding-right: 45px;
|
||||
padding-top: 23px;
|
||||
|
||||
.title {
|
||||
height: 50px;
|
||||
display: flex;
|
||||
@@ -429,16 +453,19 @@ function whiteTypes(type) {
|
||||
background-color: rgba(249, 249, 249, 1);
|
||||
margin-top: 27px;
|
||||
margin-bottom: 19px;
|
||||
|
||||
.titleL {
|
||||
font-size: 16px;
|
||||
font-weight: 800;
|
||||
color: #333333;
|
||||
margin-left: 27px;
|
||||
}
|
||||
|
||||
.titleR {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.titleR .titleRT {
|
||||
font-size: 16px;
|
||||
font-weight: 800;
|
||||
@@ -447,6 +474,7 @@ function whiteTypes(type) {
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.course {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -454,6 +482,7 @@ function whiteTypes(type) {
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 32px;
|
||||
margin-left: 26px;
|
||||
|
||||
.coursename {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
@@ -463,23 +492,28 @@ function whiteTypes(type) {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.coursetag {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.progressBox {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #677d86;
|
||||
margin-top: 24px;
|
||||
|
||||
.progress {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.progress .el-progress-bar__outer {
|
||||
background-color: rgba(232, 241, 254, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.goclass {
|
||||
width: 126px;
|
||||
height: 46px;
|
||||
@@ -497,21 +531,26 @@ function whiteTypes(type) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detailR {
|
||||
width: 434px;
|
||||
|
||||
.detailRT {
|
||||
min-height: 298px;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
|
||||
.el-tabs__item {
|
||||
height: 56px;
|
||||
padding: 10px 33px 0px 27px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-tabs__nav-wrap::after {
|
||||
background-color: rgba(56, 125, 247, 0.2);
|
||||
}
|
||||
|
||||
.notice {
|
||||
padding: 15px 43px 30px 47px;
|
||||
font-size: 14px;
|
||||
@@ -519,6 +558,7 @@ function whiteTypes(type) {
|
||||
color: #333330;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.sharedocname {
|
||||
width: 259px;
|
||||
font-size: 14px;
|
||||
@@ -527,6 +567,7 @@ function whiteTypes(type) {
|
||||
margin-left: 20px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.download {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -537,11 +578,13 @@ function whiteTypes(type) {
|
||||
color: #2478ff;
|
||||
}
|
||||
}
|
||||
|
||||
.detailRB {
|
||||
min-height: 459px;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
margin-top: 17px;
|
||||
|
||||
.info .title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -549,12 +592,14 @@ function whiteTypes(type) {
|
||||
position: relative;
|
||||
margin-left: 48px;
|
||||
}
|
||||
|
||||
.info .title .text {
|
||||
margin-left: 8px;
|
||||
font-size: 16px;
|
||||
color: rgba(51, 51, 51, 1);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.info .title .box {
|
||||
width: 75px;
|
||||
height: 10px;
|
||||
@@ -563,6 +608,7 @@ function whiteTypes(type) {
|
||||
left: 23px;
|
||||
top: 53px;
|
||||
}
|
||||
|
||||
.info .teacheritem {
|
||||
margin-left: 48px;
|
||||
margin-right: 48px;
|
||||
@@ -570,11 +616,13 @@ function whiteTypes(type) {
|
||||
display: flex;
|
||||
// align-items: center;
|
||||
}
|
||||
|
||||
.info .teacheritem .peopleimg {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
.info .teacheritem .teacherName {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
@@ -583,6 +631,7 @@ function whiteTypes(type) {
|
||||
align-items: center;
|
||||
width: 260px;
|
||||
}
|
||||
|
||||
.info .teacheritem .teacherName .teacherMedal {
|
||||
width: 17px;
|
||||
height: 19px;
|
||||
@@ -590,6 +639,7 @@ function whiteTypes(type) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.info .teacheritem .introduce {
|
||||
width: 260px;
|
||||
font-size: 14px;
|
||||
@@ -598,6 +648,7 @@ function whiteTypes(type) {
|
||||
margin-top: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.info .rate {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -606,6 +657,7 @@ function whiteTypes(type) {
|
||||
margin-left: 48px;
|
||||
margin-right: 26px;
|
||||
}
|
||||
|
||||
.info .rate .ratetext {
|
||||
width: 259px;
|
||||
font-size: 14px;
|
||||
@@ -613,6 +665,7 @@ function whiteTypes(type) {
|
||||
color: #677d86;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.info .rate .ratebtn {
|
||||
width: 86px;
|
||||
height: 36px;
|
||||
@@ -627,16 +680,19 @@ function whiteTypes(type) {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.info .progressBox {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #677d86;
|
||||
margin-top: 16px;
|
||||
margin-left: 44px;
|
||||
|
||||
.progress {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.progress .el-progress-bar__outer {
|
||||
background-color: rgba(232, 241, 254, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user