|
|
@@ -3,7 +3,7 @@
|
|
|
<page-header
|
|
|
:routes="[
|
|
|
{ name: '文档作业', path: 'document' },
|
|
|
- { name: `${assignmentInfo.name}`, path: 'document/detail' }
|
|
|
+ { name: `${assignmentInfo.name}`, path: 'document/123' }
|
|
|
]"
|
|
|
>
|
|
|
<template slot="title">
|
|
|
@@ -14,7 +14,33 @@
|
|
|
</template>
|
|
|
</page-header>
|
|
|
<page-body>
|
|
|
- <b-table :data="tableData" :columns="tableColumns"></b-table>
|
|
|
+ <div class="data-table">
|
|
|
+ <div class="detail-description">
|
|
|
+ <div class="subtitle">题目名称</div>
|
|
|
+ <div class="detail-content">
|
|
|
+ {{ detail.problem ? detail.problem.name : "" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="detail-description">
|
|
|
+ <div class="subtitle">作业详情</div>
|
|
|
+ <div class="detail-content">
|
|
|
+ {{ detail.problem ? detail.problem.description : "" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="detail-description">
|
|
|
+ <div class="subtitle">git地址</div>
|
|
|
+ <div class="detail-content">{{ detail.url }}</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="detail-description">
|
|
|
+ <div class="subtitle">所处阶段</div>
|
|
|
+ <div class="detail-content">{{ detail.status }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="detail-description">
|
|
|
+ <div class="subtitle">成绩</div>
|
|
|
+ <div class="detail-content">{{ result.result }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</page-body>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -22,68 +48,9 @@
|
|
|
<script>
|
|
|
import PageHeader from "../../../components/PageHeader";
|
|
|
import PageBody from "../../../components/PageBody";
|
|
|
-const tableData = [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- first_name: "Jesse",
|
|
|
- last_name: "Simmons",
|
|
|
- date: "2016-10-15 13:43:27",
|
|
|
- gender: "Male"
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- first_name: "John",
|
|
|
- last_name: "Jacobs",
|
|
|
- date: "2016-12-15 06:00:53",
|
|
|
- gender: "Male"
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3,
|
|
|
- first_name: "Tina",
|
|
|
- last_name: "Gilbert",
|
|
|
- date: "2016-04-26 06:26:28",
|
|
|
- gender: "Female"
|
|
|
- },
|
|
|
- {
|
|
|
- id: 4,
|
|
|
- first_name: "Clarence",
|
|
|
- last_name: "Flores",
|
|
|
- date: "2016-04-10 10:28:46",
|
|
|
- gender: "Male"
|
|
|
- },
|
|
|
- {
|
|
|
- id: 5,
|
|
|
- first_name: "Anne",
|
|
|
- last_name: "Lee",
|
|
|
- date: "2016-12-06 14:38:38",
|
|
|
- gender: "Female"
|
|
|
- }
|
|
|
-];
|
|
|
-const tableColumns = [
|
|
|
- {
|
|
|
- field: "id",
|
|
|
- label: "ID",
|
|
|
- width: "40",
|
|
|
- numeric: true
|
|
|
- },
|
|
|
- {
|
|
|
- field: "first_name",
|
|
|
- label: "First Name"
|
|
|
- },
|
|
|
- {
|
|
|
- field: "last_name",
|
|
|
- label: "Last Name"
|
|
|
- },
|
|
|
- {
|
|
|
- field: "date",
|
|
|
- label: "Date",
|
|
|
- centered: true
|
|
|
- },
|
|
|
- {
|
|
|
- field: "gender",
|
|
|
- label: "Gender"
|
|
|
- }
|
|
|
-];
|
|
|
+import { getDocAssignmentDetailByDocuId } from "@/api/assignment";
|
|
|
+import { getDocResultById } from "@/api/assignment";
|
|
|
+
|
|
|
const assignmentInfo = {
|
|
|
id: 0,
|
|
|
name: "",
|
|
|
@@ -91,6 +58,7 @@ const assignmentInfo = {
|
|
|
startAt: 0,
|
|
|
endAt: 0
|
|
|
};
|
|
|
+
|
|
|
export default {
|
|
|
components: {
|
|
|
PageBody,
|
|
|
@@ -98,15 +66,42 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.assignmentInfo = this.$route.query.assignmentInfo;
|
|
|
+ getDocAssignmentDetailByDocuId(123).then(res => {
|
|
|
+ console.log(res.data);
|
|
|
+ this.detail = res.data;
|
|
|
+ });
|
|
|
+ getDocResultById(123).then(res => {
|
|
|
+ console.log(res.data);
|
|
|
+ this.result = res.data;
|
|
|
+ });
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
assignmentInfo,
|
|
|
- tableData,
|
|
|
- tableColumns
|
|
|
+ detail: {},
|
|
|
+ result: {}
|
|
|
};
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style scoped></style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.tag {
|
|
|
+ margin-right: 10px;
|
|
|
+}
|
|
|
+.detail-description {
|
|
|
+ margin-bottom: 1.5rem;
|
|
|
+ .subtitle {
|
|
|
+ width: 100%;
|
|
|
+ font-weight: bold;
|
|
|
+ padding-bottom: 10px;
|
|
|
+ border-bottom: 1px solid #dbdbdb;
|
|
|
+ }
|
|
|
+ .file-info {
|
|
|
+ margin-bottom: 0.75rem;
|
|
|
+ span {
|
|
|
+ margin-left: 0.75rem;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|