|
|
@@ -55,7 +55,7 @@
|
|
|
>
|
|
|
<template slot-scope="props">
|
|
|
<b-table-column field="id" label="ID" width="40" numeric sortable>
|
|
|
- {{ props.row.id }}
|
|
|
+ <!--{{ props.row.id }}-->1
|
|
|
</b-table-column>
|
|
|
|
|
|
<b-table-column field="user.first_name" label="题目名称">
|
|
|
@@ -66,7 +66,12 @@
|
|
|
{{ props.row.description }}
|
|
|
</b-table-column>
|
|
|
|
|
|
- <b-table-column field="date" label="题目难度" sortable centered>
|
|
|
+ <b-table-column
|
|
|
+ field="difficulty"
|
|
|
+ label="题目难度"
|
|
|
+ sortable
|
|
|
+ centered
|
|
|
+ >
|
|
|
<span class="tag is-success"> {{ props.row.difficulty }} </span>
|
|
|
</b-table-column>
|
|
|
|
|
|
@@ -79,7 +84,7 @@
|
|
|
{{ props.row.expectTime }}
|
|
|
</b-table-column>
|
|
|
<b-table-column label="题目标签">
|
|
|
- {{ props.row.assignmentType }}
|
|
|
+ {{ props.row.assignmentType.value }}
|
|
|
</b-table-column>
|
|
|
</template>
|
|
|
|
|
|
@@ -109,33 +114,34 @@
|
|
|
<script>
|
|
|
import { mapState } from "vuex";
|
|
|
import { getStudentCourseReviewList } from "@/api/review";
|
|
|
+import { getTeacherQuestions } from "@/api/question";
|
|
|
|
|
|
-const data = [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- name: "第一题",
|
|
|
- description: "这题xxxxxxxx",
|
|
|
- difficulty: "easy",
|
|
|
- expectTime: 20,
|
|
|
- assignmentType: "文档作业"
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- name: "第一题",
|
|
|
- description: "这题xxxxxxxx",
|
|
|
- difficulty: "easy",
|
|
|
- expectTime: 25,
|
|
|
- assignmentType: "文档作业"
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3,
|
|
|
- name: "第一题",
|
|
|
- description: "这题xxxxxxxx",
|
|
|
- difficulty: "easy",
|
|
|
- expectTime: 35,
|
|
|
- assignmentType: "文档作业"
|
|
|
- }
|
|
|
-];
|
|
|
+// const data = [
|
|
|
+// {
|
|
|
+// id: 1,
|
|
|
+// name: "第一题",
|
|
|
+// description: "这题xxxxxxxx",
|
|
|
+// difficulty: "easy",
|
|
|
+// expectTime: 20,
|
|
|
+// assignmentType: "文档作业"
|
|
|
+// },
|
|
|
+// {
|
|
|
+// id: 2,
|
|
|
+// name: "第一题",
|
|
|
+// description: "这题xxxxxxxx",
|
|
|
+// difficulty: "easy",
|
|
|
+// expectTime: 25,
|
|
|
+// assignmentType: "文档作业"
|
|
|
+// },
|
|
|
+// {
|
|
|
+// id: 3,
|
|
|
+// name: "第一题",
|
|
|
+// description: "这题xxxxxxxx",
|
|
|
+// difficulty: "easy",
|
|
|
+// expectTime: 35,
|
|
|
+// assignmentType: "文档作业"
|
|
|
+// }
|
|
|
+// ];
|
|
|
|
|
|
export default {
|
|
|
components: {},
|
|
|
@@ -152,13 +158,14 @@ export default {
|
|
|
{ id: 1, title: "文档作业题目" },
|
|
|
{ id: 2, title: "代码作业题目" }
|
|
|
],
|
|
|
- data
|
|
|
+ data: []
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
getStudentCourseReviewList(this.courses.id).then(
|
|
|
value => (this.review = value.data)
|
|
|
);
|
|
|
+ getTeacherQuestions().then(value => (this.data = value.data));
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
@@ -174,6 +181,7 @@ export default {
|
|
|
}
|
|
|
.question-list {
|
|
|
margin-top: 30px;
|
|
|
+ font-size: 0.9rem;
|
|
|
}
|
|
|
.form-group {
|
|
|
display: flex;
|