作业考试开始结束按钮状态

This commit is contained in:
zhangyc
2022-12-25 09:16:03 +08:00
parent d6b76b5549
commit c2e44dc0ad
6 changed files with 183 additions and 142 deletions

View File

@@ -23,10 +23,10 @@
<div class="time" style="margin-top: 26px"> <div class="time" style="margin-top: 26px">
<img style="width: 15px; height: 17px" src="../../assets/image/time.png" /> <img style="width: 15px; height: 17px" src="../../assets/image/time.png" />
<div style="margin-left: 8px"> <div style="margin-left: 8px">
{{ data.planDto?.beginTime + "" + data.planDto?.endTime }} {{ dayjs(data.planDto?.beginTime).format('YYYY-MM-DD HH:MM') + "" + dayjs(data.planDto?.endTime).format('YYYY-MM-DD HH:MM') }}
</div> </div>
</div> </div>
<div class="time" style="margin-top: 23px"> <div v-if="data.planDto.address" class="time" style="margin-top: 23px">
<img style="width: 16px; height: 18px" src="../../assets/image/position.png" /> <img style="width: 16px; height: 18px" src="../../assets/image/position.png" />
<div style="margin-left: 8px">{{ data.planDto?.address }}</div> <div style="margin-left: 8px">{{ data.planDto?.address }}</div>
</div> </div>
@@ -38,14 +38,12 @@
background: data.signFlag ? '#999' : 'rgb(57, 146, 249)', background: data.signFlag ? '#999' : 'rgb(57, 146, 249)',
}" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }} }" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }}
</botton> </botton>
<botton style="background: #999" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag == 0"> <botton style="background: #999" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag == 0 ">
评估 评估
</botton> </botton>
<botton :style="{ <botton :style="{
background: `${new Date(data.planDto.beginTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`, background: `${new Date(data.planDto.beginTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
}" class="btn" @click="toSurvery" v-if="data.planDto?.evalFlag && data.planDto?.evalFlag == 1">{{ }" class="btn" @click="toSurvery" v-else>{{data.isSurvery ? "已评估" : "评估"}}
data.isSurvery ? "已评估" : "评估"
}}
</botton> </botton>
</div> </div>
</div> </div>
@@ -66,17 +64,11 @@
</div> </div>
</div> </div>
</div> </div>
<div class="detailB"> <div class="detailB">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick" >
<el-tab-pane label="课程附件" name="first"> <el-tab-pane label="课程附件" name="first">
<div v-if="data.planDto?.attach === '[]'" style=" <div v-if="data.planDto?.attach === '[]'" style="font-size: 14px;font-weight: 400; line-height: 24px; cursor: pointer;margin-left: 40px; margin-top: 20px;">
font-size: 14px;
font-weight: 400;
line-height: 24px;
cursor: pointer;
margin-left: 40px;
margin-top: 20px;
">
此课程无附件 此课程无附件
</div> </div>
<div v-else> <div v-else>
@@ -106,16 +98,7 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="课程作业" name="second"> <el-tab-pane label="课程作业" name="second">
<div v-if="data.planDto?.attach === '[]'" style="
font-size: 14px;
font-weight: 400;
line-height: 24px;
cursor: pointer;
margin-left: 40px;
margin-top: 20px;
">
此课程无作业
</div>
<div class="work" v-if="data.workDto?.workName"> <div class="work" v-if="data.workDto?.workName">
<div> <div>
<div class="question">{{ data.workDto?.workName }}</div> <div class="question">{{ data.workDto?.workName }}</div>
@@ -125,27 +108,19 @@
</div> </div>
</div> </div>
<div v-if="isEndSubMitWork()" class="submit" style="background: #999"> <div v-if="dayjs(data.value.workDto.submitEndTime).isBefore(dayjs())" @click="toWork" class="submit" style="background: #999">已结束</div>
已结束 <div v-if="dayjs().isBefore(dayjs(data.value.workDto.submitStartTime))" @click="toWork" class="submit" style="background: #999">未开始</div>
</div>
<div <div
:style="{ background: new Date(data.planDto.beginTime).getTime() > new Date().getTime() ? '#999' : '' }" :style="{ background: new Date(data.planDto.beginTime).getTime() > new Date().getTime() ? '#999' : '' }" class="submit" @click="toWork" v-else>
v-else class="submit" @click="toWork" v-if="data.workDto?.workId">
交作业 交作业
</div> </div>
</div> </div>
</el-tab-pane> <div v-else style=" font-size: 14px; font-weight: 400; line-height: 24px; cursor: pointer;margin-left: 40px;margin-top: 20px; ">
<el-tab-pane label="课程考试" name="third"> 此课程无作业
<div v-if="data.planDto?.attach === '[]'" style="
font-size: 14px;
font-weight: 400;
line-height: 24px;
cursor: pointer;
margin-left: 40px;
margin-top: 20px;
">
此课程无考试
</div> </div>
</el-tab-pane>
<el-tab-pane label="课程考试" name="third" :disabed=dayjs().isBefore(dayjs(data.planDto.beginTime)) >
<div class="work" v-if="data.examinationDto?.examinationTestName"> <div class="work" v-if="data.examinationDto?.examinationTestName">
<div> <div>
<div class="question"> <div class="question">
@@ -158,12 +133,17 @@
<div class="tag3" style="margin-left: 11px">考试</div> <div class="tag3" style="margin-left: 11px">考试</div>
</div> </div>
</div> </div>
<div <div v-if="dayjs(data.value.workDto.examinationEndTime).isBefore(dayjs())" class="submit" style="background: #999" @click="toExamItem(data.examinationDto)">已结束</div>
<div v-if="dayjs().isBefore(dayjs(data.value.workDto.examinationStartTime))" class="submit" style="background: #999">未开始</div>
<div v-else
:style="{ background: new Date(data.planDto.beginTime).getTime() > new Date().getTime() ? '#999' : '' }" :style="{ background: new Date(data.planDto.beginTime).getTime() > new Date().getTime() ? '#999' : '' }"
class="submit" @click="toExamItem(data.examinationDto)"> class="submit" @click="toExamItem(data.examinationDto)">
去考试 去考试
</div> </div>
</div> </div>
<div v-else style=" font-size: 14px; font-weight: 400;line-height: 24px;cursor: pointer; margin-left: 40px; margin-top: 20px; ">
此课程无考试
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@@ -177,7 +157,7 @@
<!-- todo #面授课接口 讲师缺少img和介绍--> <!-- todo #面授课接口 讲师缺少img和介绍-->
<div class="teacheritem"> <div class="teacheritem">
<img class="peopleimg" :src="teacherInfo.avatar" /> <img class="peopleimg" :src="teacherInfo.avatar" />
<div style="margin-left: 17px; width: 190px"> <div class="nameSpan">
<div class="teacherName" style="margin-right: 5px"> <div class="teacherName" style="margin-right: 5px">
{{ data.planDto?.teacher }} {{ data.planDto?.teacher }}
</div> </div>
@@ -204,6 +184,7 @@ import {
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils"; import { useUserInfo } from "@/api/utils";
import { ElMessage, messageConfig } from "element-plus"; import { ElMessage, messageConfig } from "element-plus";
import dayjs from "dayjs";
const router = useRouter(); const router = useRouter();
const returnclick = () => { const returnclick = () => {
router.back(); router.back();
@@ -225,13 +206,13 @@ const state = reactive({
}); });
const { activeName, enclosure, isAllowSign } = toRefs(state); const { activeName, enclosure, isAllowSign } = toRefs(state);
const handleClick = (tab, event) => { const handleClick = (tab, event) => {
console.log(tab, event); console.log("附件",tab, event);
}; };
const download = (url) => { const download = (url) => {
window.open(url); window.open(url);
}; };
const downloads = (url) => { const downloads = (url) => {
ElMessage.info("未到开始时间,请耐心等待!"); ElMessage.warning("未到开始时间,请耐心等待!");
}; };
let timer = null; let timer = null;
//判断能否签到 //判断能否签到
@@ -291,22 +272,22 @@ const signClick = () => {
// state.isAllowSign, // state.isAllowSign,
// !state.isAllowSign // !state.isAllowSign
// ); // );
if (data.value.planDto.beginTime) { //if (data.value.planDto.beginTime) {
let date1 = new Date(data.value.planDto.beginTime).getTime() // let date1 = new Date(data.value.planDto.beginTime).getTime()
let date2 = new Date().getTime() // let date2 = new Date().getTime()
if (date1 > date2) { // if (date1 > date2) {
ElMessage.info("未到开始时间,请耐心等待!"); // ElMessage.info("未到开始时间,请耐心等待!");
return; // return;
} // }
} //}
if (!state.isAllowSign) { if (!state.isAllowSign) {
// console.log("data.signFlag", data.value.signFlag, isAllowSign); // console.log("data.signFlag", data.value.signFlag, isAllowSign);
ElMessage.info("未在签到范围内"); ElMessage.warning("未在允许签到时间范围内");
return; return;
} }
2;
data.value.signFlag = 1; data.value.signFlag = 1;
ElMessage.info("签到成功"); ElMessage.warning("签到成功");
if (taskId) { if (taskId) {
request(TASK_OFFCOURSE_SIGN, { courseId: courseId, taskId, type }); request(TASK_OFFCOURSE_SIGN, { courseId: courseId, taskId, type });
@@ -319,16 +300,12 @@ function toSurvery() {
if (data.value.isSurvery) { if (data.value.isSurvery) {
// return; // return;
} }
if (data.value.planDto.beginTime) { if (data.value.planDto.beginTime && dayjs().isBefore(data.value.planDto.beginTime)) {
let date1 = new Date(data.value.planDto.beginTime).getTime() ElMessage.warning("课程未开始,请耐心等待!");
let date2 = new Date().getTime() return;
if (date1 > date2) {
ElMessage.info("未到开始时间,请耐心等待!");
return;
}
} }
if (data.value.planDto.evalFlag == 0) { if (data.value.planDto.evalFlag == 0) {
ElMessage.info("此课程无评估"); ElMessage.warning("此课程无评估");
return; return;
} }
router.push({ router.push({
@@ -345,25 +322,14 @@ function toSurvery() {
}); });
} }
function isEndSubMitWork() {
if (data.value.workDto.submitEndTime) {
let date1 = new Date(data.value.workDto.submitEndTime).getTime();
let date2 = new Date().getTime();
console.log(date1, date2, date1 > date2, data.value.workDto.submitEndTime)
if (date1 < date2) {
return true;
}
} else {
return false;
}
}
function toWork() { function toWork() {
if (data.value.planDto.beginTime) { if (data.value.planDto.beginTime) {
let date1 = new Date(data.value.planDto.beginTime).getTime() let date1 = new Date(data.value.planDto.beginTime).getTime()
let date2 = new Date().getTime() let date2 = new Date().getTime()
if (date1 > date2) { if (date1 > date2) {
ElMessage.info("未到开始时间,请耐心等待!"); ElMessage.warning("未到开始时间,请耐心等待!");
return; return;
} }
} }
@@ -387,7 +353,7 @@ function toExamItem(obj) {
let date1 = new Date(data.value.planDto.beginTime).getTime() let date1 = new Date(data.value.planDto.beginTime).getTime()
let date2 = new Date().getTime() let date2 = new Date().getTime()
if (date1 > date2) { if (date1 > date2) {
ElMessage.info("未到开始时间,请耐心等待!"); ElMessage.warning("未到开始时间,请耐心等待!");
return; return;
} }
} }
@@ -524,7 +490,11 @@ onUnmounted(() => {
background: #ffffff; background: #ffffff;
border-radius: 8px; border-radius: 8px;
margin-top: 20px; margin-top: 20px;
.wenxintishi{
display: flex;
justify-content: stretch;
padding: 72px;
}
.el-tabs__item { .el-tabs__item {
height: 69px; height: 69px;
padding: 25px 7px 0px 52px; padding: 25px 7px 0px 52px;
@@ -634,9 +604,11 @@ onUnmounted(() => {
margin-left: 48px; margin-left: 48px;
margin-right: 48px; margin-right: 48px;
// min-height: 115px; // min-height: 115px;
margin-top: 20px;
padding: 25px 0px; padding: 25px 0px;
display: flex; display: flex;
position: relative; position: relative;
// align-items: center; // align-items: center;
} }
@@ -646,12 +618,41 @@ onUnmounted(() => {
border-radius: 30px; border-radius: 30px;
} }
.teacheritem .teacherName { .teacheritem {
font-size: 14px; .nameSpan{
font-weight: bold; width: 190px;
color: #394145; display: flex;
display: flex; align-items: center;
align-items: center; justify-content: center;
.teacherName {
font-size: 14px;
font-weight: bold;
color: #394145;
display: flex;
align-items: center;
}
}
}
.teacheritem {
.nameSpan{
width: 190px;
display: flex;
align-items: center;
justify-content: center;
.teacherName {
font-size: 14px;
font-weight: bold;
color: #394145;
display: flex;
align-items: center;
}
}
} }
.teacheritem .introduce { .teacheritem .introduce {
@@ -679,6 +680,8 @@ onUnmounted(() => {
cursor: pointer; cursor: pointer;
} }
} }
} }
} }
</style> </style>

View File

@@ -46,7 +46,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="!dayjs(data?.submitEndTime).isSameOrBefore(dayjs())" > <div v-if="dayjs().isBefore(dayjs(data?.submitEndTime)) && dayjs(data?.submitStartTime).isBefore(dayjs())" >
<UploadImg v-model:value="fileList" ref="uploadRef"> <UploadImg v-model:value="fileList" ref="uploadRef">
<button class="shangchuan" style="cursor: pointer"> <button class="shangchuan" style="cursor: pointer">
上传 上传
@@ -107,12 +107,17 @@
<div class="text">作业内容</div> <div class="text">作业内容</div>
<div class="box"></div> <div class="box"></div>
</div> </div>
<div v-if="dayjs().isBefore(dayjs(data?.submitEndTime)) && dayjs(data?.submitStartTime).isBefore(dayjs())" >
<div class="join"> <el-input v-model="sbValue.content" :autosize="{ minRows: 12.5, maxRows: 12.5 }" resize="none"
<el-input :disabled ="dayjs(data?.submitEndTime).isSameOrBefore(dayjs())" v-model="sbValue.content" :autosize="{ minRows: 12.5, maxRows: 12.5 }" resize="none"
type="textarea" /> type="textarea" />
</div> </div>
<div v-if="!dayjs(data?.submitEndTime).isSameOrBefore(dayjs())" > <div v-else class="join">
<el-input disabled v-model="sbValue.content" :autosize="{ minRows: 12.5, maxRows: 12.5 }" resize="none"
type="textarea" />
</div>
<div v-if="dayjs().isBefore(dayjs(data?.submitEndTime)) && dayjs(data?.submitStartTime).isBefore(dayjs())" >
<div style="display: flex; justify-content: center"> <div style="display: flex; justify-content: center">
<button class="tijiao" @click="handleClick">{{ submitList && submitList.length > 0 ? "再次" : "" <button class="tijiao" @click="handleClick">{{ submitList && submitList.length > 0 ? "再次" : ""
}}提交</button> }}提交</button>
@@ -149,9 +154,7 @@
</div> </div>
</div> </div>
<div class="content3"> <div class="content3">
<div> <div><span style="margin-left: 10px">
<span style="margin-left: 10px">
<el-link target="_blank" type="primary" :href="value.workUploadAddress?.split(',')[0] || ''">{{ <el-link target="_blank" type="primary" :href="value.workUploadAddress?.split(',')[0] || ''">{{
value.workUploadAddress?.split(',')[0].split('/').at(-1) || value.workUploadAddress?.split(',')[0].split('/').at(-1) ||
'' ''
@@ -172,33 +175,12 @@
</div> </div>
<div class="timebox clearfix"> <div class="timebox clearfix">
<div class="innertime"> <div class="innertime">
{{ {{data?.submitStartTime}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{data?.submitEndTime}}
data?.submitStartTime
}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
data?.submitEndTime
}}
</div> </div>
<div class="endtime clearfix"> <div class="endtime clearfix">
<div v-if="dayjs(data?.submitEndTime).isBefore(dayjs())" class="endtimetext">改任务已结束</div>
<div v-else class="endtimetext">距离结束还有&nbsp;&nbsp;<span class="te">{{parseInt(dayjs(data?.submitEndTime).diff(dayjs(), "minute") / 60)}}</span>&nbsp;&nbsp; 小时&nbsp;&nbsp;
<span class="te">{{dayjs(data?.submitEndTime).diff(dayjs(), "minute") % 60}}</span>&nbsp;&nbsp;分钟</div>
<div v-if="dayjs(data?.submitEndTime).isSameOrBefore(dayjs())" class="endtimetext">
改任务已结束
</div>
<div v-else class="endtimetext">
距离结束还有&nbsp;&nbsp;
<span class="te">{{
parseInt(
dayjs(data?.submitEndTime).diff(dayjs(), "minute") / 60
)
}}</span>&nbsp;&nbsp; 小时&nbsp;&nbsp;<span class="te">{{
dayjs(data?.submitEndTime).diff(dayjs(), "minute") % 60
}}</span>&nbsp;&nbsp;分钟
</div>
</div> </div>
</div> </div>
<div class="righttitle"> <div class="righttitle">

View File

@@ -31,7 +31,7 @@
<div class="time" style="margin-top: 26px"> <div class="time" style="margin-top: 26px">
<img style="width: 15px; height: 17px" src="../../assets/image/time.png" /> <img style="width: 15px; height: 17px" src="../../assets/image/time.png" />
<div style="margin-left: 8px"> <div style="margin-left: 8px">
{{ data?.liveStartTime + "" + data?.liveEndTime }} {{ data?.liveStartTime + "" + data?.liveEndTime }}
</div> </div>
</div> </div>
<!-- todo #直播详情 没有位置字段--> <!-- todo #直播详情 没有位置字段-->
@@ -53,15 +53,13 @@
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.signFlag ? '#999' : 'rgb(57, 146, 249)'}`, background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.signFlag ? '#999' : 'rgb(57, 146, 249)'}`,
}" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }} }" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }}
</botton> </botton>
<botton style="background: #999" class="btn" @click="commitClick" v-if="data.isEvaluate == 0"> <botton style="background: #999" class="btn" @click="commitClick" v-if="data.isEvaluate == 0 ">
评估 评估
</botton> </botton>
<botton :style="{ <botton :style="{
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`, background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.isSurvery ? '#999' : 'rgb(57, 146, 249)'}`,
}" class="btn" @click="commitClick" v-if="data.isEvaluate && data.isEvaluate == 1">{{ data.isSurvery ? "已评估" }" class="btn" @click="commitClick" v-if="data.isEvaluate && data.isEvaluate == 1">{{ data.isSurvery ? "已评估": "评估"}}
: "评估"
}}
</botton> </botton>
</div> </div>
</div> </div>
@@ -138,7 +136,7 @@
</template> </template>
<script setup> <script setup>
import { computed, reactive, toRefs } from "vue"; import { computed, reactive, toRefs,onUnmounted } from "vue";
import img from "@/assets/image/uploadimg.png"; import img from "@/assets/image/uploadimg.png";
import { request, useRequest } from "@/api/request"; import { request, useRequest } from "@/api/request";
import { TASK_BROADCAST_DETAIL, TASK_BROADCAST_SIGN } from "@/api/api"; import { TASK_BROADCAST_DETAIL, TASK_BROADCAST_SIGN } from "@/api/api";
@@ -146,6 +144,7 @@ import { useRoute } from "vue-router/dist/vue-router";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { useUserInfo } from "@/api/utils"; import { useUserInfo } from "@/api/utils";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import dayjs from "dayjs";
const { const {
query: { courseId: liveId, id: taskId, type, pName, sName }, query: { courseId: liveId, id: taskId, type, pName, sName },
@@ -175,27 +174,70 @@ const state = reactive({
}); });
const { activeName, teacher } = toRefs(state); const { activeName, teacher } = toRefs(state);
const signClick = () => { const signClick = () => {
if (data.value.liveStartTime) { if (!state.isAllowSign) {
let date1 = new Date(data.value.liveStartTime).getTime() // console.log("data.signFlag", data.value.signFlag, isAllowSign);
let date2 = new Date().getTime() ElMessage.warning("未在允许签到时间范围内");
if (date1 > date2) { return;
ElMessage.info("未到开始时间,请耐心等待!");
return;
}
} }
if (data.value.signFlag) { if (data.value.signFlag) {
return; return;
} }
data.value.signFlag = 1; data.value.signFlag = 1;
ElMessage.info("签到成功"); ElMessage.warning("签到成功");
request(TASK_BROADCAST_SIGN, { courseId: liveId, taskId, type }); request(TASK_BROADCAST_SIGN, { courseId: liveId, taskId, type });
}; };
let timer = null;
//判断能否签到
function isSignClick() {
timer = setInterval(() => {
let beginTime = new Date(data.value.liveStartTime).getTime();
let endTime = !data.value.afterSignIn
? new Date(data.value.liveEndTime).getTime()
: new Date(data.value.liveStartTime).getTime();
let nowTime = new Date().getTime();
if (data.value.beforeSignIn && data.value.afterSignIn) {
//有开始前有开始后
beginTime = beginTime - data.value.beforeSignIn * 60 * 1000;
endTime = endTime + data.value.afterSignIn * 60 * 1000;
console.log("1111");
} else if (
data.value.beforeSignIn &&
!data.value.afterSignIn
) {
//只有开始前无开始后
beginTime = beginTime - data.value.beforeSignIn * 60 * 1000;
console.log("11112222");
} else if (
!data.value.beforeSignIn &&
data.value.afterSignIn
) {
//无开始前有开始后
endTime = endTime + data.value.afterSignIn * 60 * 1000;
console.log("1111333");
}
if (nowTime < endTime && nowTime > beginTime) {
state.isAllowSign = true;
} else {
state.isAllowSign = false;
}
// console.log(
// "isAllowSign",
// state.isAllowSign,
// nowTime,
// endTime,
// beginTime,
// nowTime < endTime,
// nowTime > beginTime
// );
}, 1000);
}
isSignClick();
const commitClick = () => { const commitClick = () => {
if (data.value.liveStartTime) { if (data.value.liveStartTime) {
let date1 = new Date(data.value.liveStartTime).getTime() let date1 = new Date(data.value.liveStartTime).getTime()
let date2 = new Date().getTime() let date2 = new Date().getTime()
if (date1 > date2) { if (date1 > date2) {
ElMessage.info("未到开始时间,请耐心等待!"); ElMessage.warning("未到时间,请耐心等待!");
return; return;
} }
} }
@@ -203,7 +245,7 @@ const commitClick = () => {
// return; // return;
} }
if (data.value.isEvaluate == 0) { if (data.value.isEvaluate == 0) {
ElMessage.info("此直播无评估"); ElMessage.warning("此直播无评估");
return; return;
} }
@@ -235,12 +277,17 @@ function showClick() {
let date1 = new Date(data.value.liveStartTime).getTime() let date1 = new Date(data.value.liveStartTime).getTime()
let date2 = new Date().getTime() let date2 = new Date().getTime()
if (date1 > date2) { if (date1 > date2) {
ElMessage.info("未到开始时间,请耐心等待!"); ElMessage.warning("未到开始时间,请耐心等待!");
return; return;
} }
} }
window.open(data.value.liveLink); window.open(data.value.liveLink);
} }
onUnmounted(() => {
if (timer) {
clearInterval(timer);
}
});
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->

View File

@@ -160,7 +160,7 @@ const signClick = (tab, event) => {
return; return;
} }
data.value.signFlag = true; data.value.signFlag = true;
ElMessage.info("签到成功"); ElMessage.warning("签到成功");
request(TASK_ACTIVITY_SIGN, { request(TASK_ACTIVITY_SIGN, {
courseId: activityId, courseId: activityId,
taskId, taskId,

View File

@@ -17,7 +17,7 @@
<!-- 面包屑导航 --> <!-- 面包屑导航 -->
<div class="pdname"> <div class="pdname">
{{ userInfo.bandDesc }} {{ userInfo.bandDesc }}
<el-popover v-if="!data.remark" ref="popover" popper-class="jianjie" placement="right" trigger="hover" :width="300" :content="data.remark"> <el-popover v-if="data.remark" ref="popover" popper-class="jianjie" placement="right" trigger="hover" :width="300" :content="data.remark">
<template #reference><span style="font-size: 16px;font-weight: 600;">简介></span></template> <template #reference><span style="font-size: 16px;font-weight: 600;">简介></span></template>
</el-popover> </el-popover>
</div> </div>
@@ -45,10 +45,13 @@
(e) => !whiteTypes(e.type) (e) => !whiteTypes(e.type)
)" :key="index"> )" :key="index">
<div style="width: 70%"> <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"> <el-popover ref="popover" placement="right" trigger="hover" :width="300" :content="value.name">
<template #reference><div class="coursename" :title="value.name">{{ value.name }}</div></template> <template #reference>{{ value.name }}</template>
</el-popover> </el-popover>
</div>
<div v-else class="coursename" :title="value.name"></div>
<div class="coursetag"> <div class="coursetag">
<div v-if="value.flag" class="tag1" style="margin-right: 11px; margin-top: 16px"> <div v-if="value.flag" class="tag1" style="margin-right: 11px; margin-top: 16px">
必修 必修

View File

@@ -19,7 +19,7 @@
<div class="pdname"> <div class="pdname">
{{ userInfo.bandDesc }} {{ userInfo.bandDesc }}
<el-popover v-if="!data.remark" ref="popover" popper-class="jianjie" placement="right" trigger="hover" :width="300" :content="data.remark"> <el-popover v-if="data.remark" ref="popover" popper-class="jianjie" placement="right" trigger="hover" :width="300" :content="data.remark">
<template #reference><span style="font-size: 16px;font-weight: 600;">简介></span></template> <template #reference><span style="font-size: 16px;font-weight: 600;">简介></span></template>
</el-popover> </el-popover>
</div> </div>
@@ -46,9 +46,15 @@
:key="index" :key="index"
> >
<div style="width: 70%"> <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"> <el-popover ref="popover" placement="right" trigger="hover" :width="300" :content="value.name">
<template #reference><div class="coursename" :title="value.name">{{ value.name }}</div></template> <template #reference>{{ value.name }}</template>
</el-popover> </el-popover>
</div>
<div v-else class="coursename" :title="value.name">
{{ value.name }}
</div>
<div class="coursetag"> <div class="coursetag">
<div <div
class="tag1" class="tag1"