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