--fix 面授课 查看作业bug

This commit is contained in:
yuping
2023-03-23 13:23:52 +08:00
parent 1d9379a090
commit e599e82bc9
2 changed files with 9 additions and 41 deletions

View File

@@ -106,8 +106,8 @@
</div> </div>
</div> </div>
<div class="btnn"> <div class="btnn">
<button class="btn1">取消</button> <button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2">确定</button> <button class="btn2" @click="closeDrawer">确定</button>
</div> </div>
</div> </div>

View File

@@ -125,7 +125,7 @@
<!-- 查看作业抽屉 --> <!-- 查看作业抽屉 -->
<CKWork <CKWork
v-model:CWvisible="CWvisible" v-model:CWvisible="CWvisible"
:workId="props.datasource?.courseId" :workId="homeWorkId"
:stuId="stuId" :stuId="stuId"
/> />
<ExportHomeWork <ExportHomeWork
@@ -297,43 +297,11 @@ const columns = ref([
key: "opacation", key: "opacation",
width: 100, width: 100,
align: "center", align: "center",
customRender: (text) => { customRender: ({record:{workStatus,answerId,examinationScore,studentId}}) =>
return (
<div style="display:flex;justify-content:center;"> <div style="display:flex;justify-content:center;">
{ <a class="opa" style={{color:examinationScore?'':'#666',marginRight:'12px'}} onClick={() =>examinationScore && showExamAnswer(answerId)}>查看答卷</a>
text.record.answerId ? <a class="opa" style={{color:workStatus?'':'#666'}} onClick={() => workStatus && showCWvisible(studentId)}>查看作业</a>
<a </div>
class="opa"
style="margin-right:12px;"
onClick={() => {
showExamAnswer(text);
}}>
查看答卷
</a>
: <div
class="opa"
style="margin-right:12px;color:#666">
查看答卷
</div>
}
{
text.record.workScore !== -2 ?
<a
class="opa"
onClick={() => {
showCWvisible(text.record.studentId);
}}>
查看作业
</a>
: <div
class="opa"
style="color:#666;">
查看作业
</div>
}
</div>);
}
}, },
]); ]);
watch(() => data.value, () => { watch(() => data.value, () => {
@@ -373,9 +341,9 @@ const batchFinish = () => {
const answerDatasource = ref(props.datasource); const answerDatasource = ref(props.datasource);
const showExamAnswer = (text) => { const showExamAnswer = (answerId) => {
console.log(answerDatasource.value) console.log(answerDatasource.value)
answerDatasource.value.answerId = String(text.record.answerId); answerDatasource.value.answerId = answerId;
CAvisible.value = true; CAvisible.value = true;
}; };