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

11

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