面授里作业状态

This commit is contained in:
zhangyc
2022-12-25 19:09:01 +08:00
parent b78c1e38c8
commit 14925f0af3
3 changed files with 11 additions and 21 deletions

View File

@@ -35,9 +35,8 @@
</div>
</div>
<div style="display: flex">
<botton v-if="!isAllowSign" class="btn" style="margin-right: 20px; background: #999" @click="signClick">签到
</botton>
<botton v-if="isAllowSign" class="btn" style="margin-right: 20px" :style="{
<botton class="btn" style="margin-right: 20px" :style="{
background: data.signFlag ? '#999' : 'rgb(57, 146, 249)',
}" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }}
</botton>
@@ -112,13 +111,10 @@
</div>
</div>
<div v-if="dayjs(data.workDto.submitEndTime).isBefore(dayjs())" @click="toWork" class="submit"
style="background: #999">已结束</div>
<div v-if="dayjs().isBefore(dayjs(data.workDto.submitStartTime))" @click="toWork" class="submit"
style="background: #999">未开始</div>
<div
:style="{ background: new Date(data.planDto.beginTime).getTime() > new Date().getTime() ? '#999' : '' }"
class="submit" @click="toWork" v-else>
:style="{ background: new Date(data.planDto?.beginTime).getTime() > new Date().getTime() ? '#999' : '' }"
class="submit" @click="toWork" >
交作业
</div>
</div>
@@ -141,11 +137,8 @@
<div class="tag3" style="margin-left: 11px">考试</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
<div
:style="{ background: new Date(data.planDto.beginTime).getTime() > new Date().getTime() ? '#999' : '' }"
class="submit" @click="toExamItem(data.examinationDto)">
去考试
@@ -348,7 +341,7 @@ function toWork() {
let date2 = new Date().getTime()
if (date1 > date2) {
ElMessage.warning("未到开始时间,请耐心等待!");
return;
}
}
router.push({
@@ -372,7 +365,7 @@ function toExamItem(obj) {
let date2 = new Date().getTime()
if (date1 > date2) {
ElMessage.warning("未到开始时间,请耐心等待!");
return;
}
}
console.log("obj", obj.examinationTestId);

View File

@@ -50,9 +50,8 @@
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : 'rgb(59, 191, 252)'}`,
}" @click="showClick">观看
</botton>
<botton v-if="!isAllowSign" class="btn" style="margin-right: 20px; background: #999" @click="signClick">签到
</botton>
<botton v-else class="btn" :style="{
<botton class="btn" :style="{
background: `${new Date(data.liveStartTime).getTime() > new Date().getTime() ? '#999' : data.signFlag ? '#999' : 'rgb(57, 146, 249)'}`,
}" @click="signClick">{{ data.signFlag ? "已签到" : "签到" }}
</botton>

View File

@@ -45,8 +45,6 @@
<div style="margin-left: 8px">{{ data?.activityAddress }}</div>
</div>
</div>
<botton v-if="!isAllowSign" class="btn" style="margin-right: 20px; background: #999" @click="signClick">签到
</botton>
<botton class="btn" :style="{background: `${data.signFlag ? '#999' : 'rgb(57, 146, 249)'}`, }" @click="signClick" >{{ data.signFlag ? "已签到" : "签到" }}
</botton>
</div>