--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 class="btnn">
<button class="btn1">取消</button>
<button class="btn2">确定</button>
<button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="closeDrawer">确定</button>
</div>
</div>

View File

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