评估显示

This commit is contained in:
zhangsir
2024-02-05 11:16:58 +08:00
parent 42a510e059
commit e3fbb47fd9

View File

@@ -65,6 +65,22 @@
@click="signClick"
>{{ data.signFlag ? "已签到" : "签到" }}
</botton>
<botton
v-if="data.planDto?.evalFlag !== 0"
:style="{
background: `${
new Date(data.planDto?.beginTime).getTime() >
new Date().getTime()
? '#999'
: data.isSurvery
? '#999'
: 'rgb(57, 146, 249)'
}`,
}"
class="btn"
@click="toSurvery"
>{{ data.isSurvery ? "已评估" : "评估" }}
</botton>
</div>
</div>
</div>
@@ -175,7 +191,6 @@ watch(data, (newVal) => {
const teacherItem = ref([])
const teacherInfos = async (id) => {
const res = await boeRequest(GET_USER_INFO_OLDURL, { userId: id });
console.log(res.result, 'rea');
const userInfo = res.result;
userInfo.avatar = userInfo.avatar
? userInfo.avatar.includes('upload')
@@ -215,6 +230,28 @@ const signClick = () => {
ElMessage.warning("签到成功");
request(TASK_OFFCOURSE_NOTASK_SIGN, { courseId: courseId, taskId: courseId, type: 3 });
};
function toSurvery() {
if (dayjs().isBefore(data.value.planDto.beginTime)) {
ElMessage.warning("课程未开始,请耐心等待!");
return;
}
if (!data.value.planDto.evalFlag) {
ElMessage.warning("此课程无评估");
return;
}
router.push({
path: "/surveydetail",
query:{
id: data.value.planDto.id,
courseId: data.value.planDto.assessmentId,
pName: "面授课",
infoId: data.value.planDto.id,
chapterOrStageId: 0,
sName: data.value.planDto.name,
type: 3,
}
});
}
</script>
<style lang="scss">