mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-10 03:16:47 +08:00
fix:增加面授课未开课-评估-作业-附件等不能操作判断
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
</botton>
|
||||
<botton
|
||||
:style="{
|
||||
background: `${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"
|
||||
@@ -130,7 +130,23 @@
|
||||
></FileTypeImg>
|
||||
<div style="margin-left: 20px">{{ el.name }}</div>
|
||||
</div>
|
||||
<div class="download">
|
||||
<div
|
||||
v-if="new Date(data.planDto.beginTime).getTime() > new Date().getTime()"
|
||||
class="download">
|
||||
<img
|
||||
style="width: 16px; height: 15px"
|
||||
src="../../assets/image/download.png"
|
||||
/>
|
||||
<div
|
||||
style="margin-left: 5px;color:#999;"
|
||||
@click="downloads(el.response.data)"
|
||||
>
|
||||
下载
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
class="download">
|
||||
<img
|
||||
style="width: 16px; height: 15px"
|
||||
src="../../assets/image/download.png"
|
||||
@@ -170,7 +186,9 @@
|
||||
<div v-if="isEndSubMitWork()" class="submit" style="background: #999">
|
||||
已结束
|
||||
</div>
|
||||
<div v-else class="submit" @click="toWork" v-if="data.workDto?.workId">
|
||||
<div
|
||||
:style="{background: new Date(data.planDto.beginTime).getTime() > new Date().getTime()?'#999':''}"
|
||||
v-else class="submit" @click="toWork" v-if="data.workDto?.workId">
|
||||
交作业
|
||||
</div>
|
||||
</div>
|
||||
@@ -204,7 +222,7 @@
|
||||
<div class="tag3" style="margin-left: 11px">考试</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submit" @click="toExamItem(data.examinationDto)">
|
||||
<div :style="{background: new Date(data.planDto.beginTime).getTime() > new Date().getTime()?'#999':''}" class="submit" @click="toExamItem(data.examinationDto)">
|
||||
去考试
|
||||
</div>
|
||||
</div>
|
||||
@@ -277,6 +295,9 @@ const handleClick = (tab, event) => {
|
||||
const download = (url) => {
|
||||
window.open(url);
|
||||
};
|
||||
const downloads = (url) => {
|
||||
ElMessage.info("面授课未开始");
|
||||
};
|
||||
let timer = null;
|
||||
//判断能否签到
|
||||
function isSignClick() {
|
||||
@@ -335,6 +356,14 @@ const signClick = () => {
|
||||
// state.isAllowSign,
|
||||
// !state.isAllowSign
|
||||
// );
|
||||
if(data.value.planDto.beginTime){
|
||||
let date1 = new Date(data.value.planDto.beginTime).getTime()
|
||||
let date2 = new Date().getTime()
|
||||
if(date1>date2){
|
||||
ElMessage.info("面授课未开始");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!state.isAllowSign) {
|
||||
// console.log("data.signFlag", data.value.signFlag, isAllowSign);
|
||||
ElMessage.info("未在签到范围内");
|
||||
@@ -355,6 +384,14 @@ function toSurvery() {
|
||||
if (data.value.isSurvery) {
|
||||
return;
|
||||
}
|
||||
if(data.value.planDto.beginTime){
|
||||
let date1 = new Date(data.value.planDto.beginTime).getTime()
|
||||
let date2 = new Date().getTime()
|
||||
if(date1>date2){
|
||||
ElMessage.info("面授课未开始");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (data.value.planDto.evalFlag == 0) {
|
||||
ElMessage.info("此课程无评估");
|
||||
return;
|
||||
@@ -383,6 +420,14 @@ function isEndSubMitWork() {
|
||||
}
|
||||
|
||||
function toWork() {
|
||||
if(data.value.planDto.beginTime){
|
||||
let date1 = new Date(data.value.planDto.beginTime).getTime()
|
||||
let date2 = new Date().getTime()
|
||||
if(date1>date2){
|
||||
ElMessage.info("面授课未开始");
|
||||
return;
|
||||
}
|
||||
}
|
||||
router.push({
|
||||
path: "/homeworkpage",
|
||||
query: {
|
||||
@@ -396,6 +441,14 @@ function toWork() {
|
||||
}
|
||||
|
||||
function toExamItem(obj) {
|
||||
if(data.value.planDto.beginTime){
|
||||
let date1 = new Date(data.value.planDto.beginTime).getTime()
|
||||
let date2 = new Date().getTime()
|
||||
if(date1>date2){
|
||||
ElMessage.info("面授课未开始");
|
||||
return;
|
||||
}
|
||||
}
|
||||
console.log("obj", obj.examinationTestId);
|
||||
window.open(import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId); //测评
|
||||
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
|
||||
|
||||
@@ -49,7 +49,10 @@
|
||||
</button>
|
||||
<button class="searchBtn" @click="resetClick">重置</button>
|
||||
</div>
|
||||
<div class="projectList" v-for="(i, k) in projectList" :key="k">
|
||||
<div v-if="projectList.length==0">
|
||||
暂时没有数据哦!!!
|
||||
</div>
|
||||
<div v-else class="projectList" v-for="(i, k) in projectList" :key="k">
|
||||
<div style="display: flex">
|
||||
<img
|
||||
style="width: 253px; height: 144px; border-radius: 4px"
|
||||
|
||||
Reference in New Issue
Block a user