mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-06 17:36:44 +08:00
feat:增加面授课管理-查看答卷-查看作业
This commit is contained in:
@@ -120,6 +120,12 @@
|
||||
</div>
|
||||
</a-drawer>
|
||||
<CheckAnsware v-model:CAvisible="CAvisible" :datasource="datasource"/>
|
||||
<!-- 查看作业抽屉 -->
|
||||
<CKWork
|
||||
v-model:CWvisible="CWvisible"
|
||||
:workId="props.datasource?.courseId"
|
||||
:stuId="stuId"
|
||||
/>
|
||||
<ExportHomeWork
|
||||
v-model:exportHomeWorkV="exportHomeWorkV"
|
||||
:downloadUrl="downloadUrl"
|
||||
@@ -138,10 +144,12 @@ import CommonImport from "@/components/common/CommonImport";
|
||||
import CheckAnsware from "../CheckAnsware.vue";
|
||||
import {batchSendMessage} from "@/api/index1";
|
||||
import ExportHomeWork from "@/components/Modals/ExportHomeWork.vue";
|
||||
import CKWork from "../CheckWork.vue";
|
||||
|
||||
const coursePlanIndex = ref(0);
|
||||
const tableRef = ref();
|
||||
const CAvisible = ref(false);
|
||||
const CWvisible = ref(false);
|
||||
const exportHomeWorkV = ref(false);
|
||||
const downloadUrl = ref();
|
||||
const emit = defineEmits([]);
|
||||
@@ -193,6 +201,7 @@ const offcoursePlanId = computed(() => data.value[coursePlanIndex.value]?.id ||
|
||||
const homeWorkId = computed(() => data.value[coursePlanIndex.value]?.homeWorkId || "");
|
||||
const infoId = computed(() => props.type === 1 ? props.datasource.projectId : props.datasource.routerId);
|
||||
const scoreTemplateUrl = ref(`${process.env.VUE_APP_BASE_API}/admin/student/exportHomeWorkTemplate?taskId=0&type=3&pid=${offcoursePlanId.value}&thirdType=3`);
|
||||
const stuId = ref("");
|
||||
const columns = ref([
|
||||
{
|
||||
title: "工号",
|
||||
@@ -284,9 +293,53 @@ const columns = ref([
|
||||
className: "h",
|
||||
dataIndex: "opacation",
|
||||
key: "opacation",
|
||||
width: 50,
|
||||
width: 100,
|
||||
align: "center",
|
||||
customRender: (text) => <div class="opa" onClick={() => showExamAnswer(text)}>{data.value[coursePlanIndex.value]?.answerId ? "查看答卷" : ""}</div>
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div style="display:flex;justify-content:center;">
|
||||
<a
|
||||
class="opa"
|
||||
style="margin-right:12px;"
|
||||
onClick={() => {
|
||||
showExamAnswer(text)
|
||||
}}>
|
||||
{ text.record.answerId?"查看答卷":""}
|
||||
</a>
|
||||
{
|
||||
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==1?
|
||||
<a
|
||||
class="opa"
|
||||
onClick={() => {
|
||||
showCWvisible(text.record.studentId)
|
||||
}}>
|
||||
查看作业
|
||||
</a>
|
||||
:<div
|
||||
class="opa"
|
||||
style="color:#666;">
|
||||
查看作业
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>)
|
||||
}
|
||||
},
|
||||
]);
|
||||
watch(() => data.value.length, () => {
|
||||
@@ -328,6 +381,11 @@ const showExamAnswer = () => {
|
||||
CAvisible.value = true;
|
||||
};
|
||||
|
||||
const showCWvisible = (id) => {
|
||||
stuId.value = id;
|
||||
CWvisible.value = true;
|
||||
}
|
||||
|
||||
const searchTaskList = () => tableRef.value.fetch();
|
||||
|
||||
const exportTaskData = () => window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?type=3&pid=${offcoursePlanId.value}&thirdType=2`);
|
||||
@@ -375,7 +433,12 @@ function resetStudentPage() {
|
||||
padding: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.RouterFaceStu {
|
||||
.ant-drawer-content-wrapper{
|
||||
min-width: 1200px !important;
|
||||
width: 1200px !important;
|
||||
}
|
||||
}
|
||||
.CopyModal {
|
||||
.ant-modal {
|
||||
width: 424px !important;
|
||||
|
||||
Reference in New Issue
Block a user