|
|
@@ -4,14 +4,14 @@
|
|
|
:loading="loadingCommittedGroups"
|
|
|
:routes="[
|
|
|
{ name: '代码作业', path: 'code' },
|
|
|
- { name: '作业详情', path: 'code/${assignmentInfo.id}' }
|
|
|
+ { name: '作业详情', path: `${$route.path}` }
|
|
|
]"
|
|
|
>
|
|
|
<template slot="title">
|
|
|
- {{ assignmentInfo.name }}
|
|
|
+ {{ problemInfo.name }}
|
|
|
</template>
|
|
|
<template slot="content">
|
|
|
- 作业描述信息作业描述信息作业描述信息作业描述信息作业描述信息作业描述信息作业描述信息
|
|
|
+ {{ problemInfo.description }}
|
|
|
</template>
|
|
|
</page-header>
|
|
|
|
|
|
@@ -89,8 +89,7 @@
|
|
|
<b-table-column label="详情" centered>
|
|
|
<router-link
|
|
|
:to="{
|
|
|
- path: `/course-teacher/:courseId/code/detail/test`,
|
|
|
- query: { assignmentInfo: props.row }
|
|
|
+ path: `${$route.path}/test/${props.row.id}`
|
|
|
}"
|
|
|
>查看详情</router-link
|
|
|
>
|
|
|
@@ -152,15 +151,9 @@ import PageHeader from "@/components/PageHeader";
|
|
|
import PageBody from "@/components/PageBody/index";
|
|
|
import { getCodeProcedureListByCodeId } from "@/api/assignment";
|
|
|
import { getUnsubmittedCodeGroupsList } from "@/api/assignment";
|
|
|
-import PageSectionLoading from "@/components/PageBody/PageSectionLoading/index";
|
|
|
+import { getCodeAssignmentByTeacher } from "@/api/assignment";
|
|
|
|
|
|
-const assignmentInfo = {
|
|
|
- id: 0,
|
|
|
- name: "",
|
|
|
- description: "",
|
|
|
- startAt: 0,
|
|
|
- endAt: 0
|
|
|
-};
|
|
|
+import PageSectionLoading from "@/components/PageBody/PageSectionLoading/index";
|
|
|
|
|
|
const tag = {
|
|
|
success: "tag is-success",
|
|
|
@@ -181,15 +174,18 @@ export default {
|
|
|
PageSectionLoading
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.codeId = this.$route.params;
|
|
|
this.loadingUncommittedGroups = true;
|
|
|
this.loadingCommittedGroups = true;
|
|
|
- this.assignmentInfo = this.$route.query.assignmentInfo;
|
|
|
- getCodeProcedureListByCodeId(this.$route.params.codeId).then(res => {
|
|
|
+ getCodeAssignmentByTeacher(this.codeId).then(res => {
|
|
|
+ this.problemInfo = res.data.problem;
|
|
|
+ });
|
|
|
+ getCodeProcedureListByCodeId(this.codeId).then(res => {
|
|
|
this.codeProcedureList = res.data;
|
|
|
this.submitInfo.yes = "已提交:" + this.codeProcedureList.length;
|
|
|
this.loadingCommittedGroups = false;
|
|
|
});
|
|
|
- getUnsubmittedCodeGroupsList(this.$route.params.codeId).then(res => {
|
|
|
+ getUnsubmittedCodeGroupsList(this.codeId).then(res => {
|
|
|
this.unsubmitedGroups = res.data;
|
|
|
this.submitInfo.no = "未提交:" + this.unsubmitedGroups.length;
|
|
|
this.loadingUncommittedGroups = false;
|
|
|
@@ -197,10 +193,14 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ codeId: null,
|
|
|
codeProcedureList: [],
|
|
|
unsubmitedGroups: [],
|
|
|
- showResult: [],
|
|
|
- assignmentInfo,
|
|
|
+ problemInfo: {
|
|
|
+ id: null,
|
|
|
+ name: null,
|
|
|
+ description: null
|
|
|
+ },
|
|
|
tag,
|
|
|
status,
|
|
|
submitInfo: {
|