Commit e6739dad authored by 杨梦雪's avatar 杨梦雪

11

parent 1653f7d2
...@@ -126,9 +126,7 @@ export default { ...@@ -126,9 +126,7 @@ export default {
closeCFSUDialog(val, type) { closeCFSUDialog(val, type) {
console.log(val, "val"); console.log(val, "val");
this.confirmSignUpDialogFu = val; this.confirmSignUpDialogFu = val;
if (type) {
clearInterval(this.timer);
}
}, },
toWeichat() { toWeichat() {
// this.dialogChoose = false; // this.dialogChoose = false;
......
...@@ -19,11 +19,23 @@ ...@@ -19,11 +19,23 @@
<span class="status_1" v-if="item.student_status == 1">待评分</span> <span class="status_1" v-if="item.student_status == 1">待评分</span>
<span class="status_2" v-if="item.student_status == 2">已评分</span> <span class="status_2" v-if="item.student_status == 2">已评分</span>
</div> </div>
<div class="btn_refer" @click="toRefer(item)">查看作业</div> <el-button
class="btn_refer"
:disabled="
!(
(item.is_submit == 0 && !disabled) ||
(item.is_submit == 1 && disabled)
)
"
@click="toRefer(item)"
>查看作业</el-button
>
<!-- <el-button type="info" plain disabled>警告按钮</el-button> -->
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="bottom"> <div class="bottom">
<div v-html="item.work_context">></div> <div v-html="item.work_context"></div>
<div class="time flex"> <div class="time flex">
<div>发布时间:{{ item.start_time }}</div> <div>发布时间:{{ item.start_time }}</div>
...@@ -78,6 +90,7 @@ export default { ...@@ -78,6 +90,7 @@ export default {
work_num: 0, work_num: 0,
order_num: 0, order_num: 0,
student_status: 0, student_status: 0,
disabled: false,
}; };
}, },
created() { created() {
...@@ -102,6 +115,8 @@ export default { ...@@ -102,6 +115,8 @@ export default {
toRefer(item) { toRefer(item) {
//time_out:提交作业时间状态 //time_out:提交作业时间状态
if (item.time_out == 1) { if (item.time_out == 1) {
if (item.is_submit == 1) {
}
this.dialogVisibleFu = true; this.dialogVisibleFu = true;
// console.log(item.work_num,'val') // console.log(item.work_num,'val')
this.work_context = item.work_context; this.work_context = item.work_context;
...@@ -127,7 +142,11 @@ export default { ...@@ -127,7 +142,11 @@ export default {
return this.$message.error(res.data.message); return this.$message.error(res.data.message);
} }
this.homeworkList = res.data.data.list; this.homeworkList = res.data.data.list;
console.log(this.homeworkList, " this.homeworkList"); this.homeworkList.forEach((item) => {
if (item.is_submit == 1) {
this.disabled = true;
}
});
this.isShowinfo = true; this.isShowinfo = true;
this.total = res.data.data.count; this.total = res.data.data.count;
// this.$message.success(res.data.message); // this.$message.success(res.data.message);
...@@ -224,16 +243,22 @@ export default { ...@@ -224,16 +243,22 @@ export default {
} }
} }
.btn_refer { .btn_refer {
width: 88px; // width: 88px;
background: #60194a; background: var(--color);
border-radius: 4px; border-radius: 4px;
border-color: var(--color);
opacity: 0.9; opacity: 0.9;
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
font-weight: 400; font-weight: 400;
color: #ffffff; color: #ffffff;
line-height: 33px; // line-height: 33px;
cursor: pointer; // cursor: pointer;
&.is-disabled {
color: #fff;
background-color: #c8c9cc;
border-color: #c8c9cc;
}
} }
} }
.line { .line {
......
...@@ -441,7 +441,7 @@ export default { ...@@ -441,7 +441,7 @@ export default {
}; };
}); });
} }
this.$forceUpdate();//强制刷新 this.$forceUpdate(); //强制刷新
} }
}); });
}, },
...@@ -655,13 +655,30 @@ export default { ...@@ -655,13 +655,30 @@ export default {
}, },
// 提交按钮 // 提交按钮
confirm() { confirm() {
this.$refs["formRef_stu"].validate((valid) => { this.$confirm(
if (!valid) return; "提交后不可以修改本次作业和填写其他作业,您确认要提交本次作业吗?",
console.log(valid, "valid"); "提示",
// 未完成 {
// return confirmButtonText: "确定",
this.notReadHandle(); cancelButtonText: "取消",
}); type: "warning",
}
)
.then(() => {
this.$refs["formRef_stu"].validate((valid) => {
if (!valid) return;
console.log(valid, "valid");
// 未完成
// return
this.notReadHandle();
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消",
});
});
}, },
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment