|
|
@@ -6,22 +6,44 @@
|
|
|
{ name: '作业详情', path: `code/${$route.params.codeId}` },
|
|
|
{ name: '测试信息', path: `${$route.path}` }
|
|
|
]"
|
|
|
+ :tab-list="[
|
|
|
+ {
|
|
|
+ name: '构建',
|
|
|
+ path: `code/${$route.params.homeworkId}/${$route.params.projectId}`
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '部署',
|
|
|
+ path: `code/${$route.params.homeworkId}/${
|
|
|
+ $route.params.projectId
|
|
|
+ }/deploy`
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '测试',
|
|
|
+ path: `code/${$route.params.homeworkId}/${
|
|
|
+ $route.params.projectId
|
|
|
+ }/test`
|
|
|
+ }
|
|
|
+ ]"
|
|
|
>
|
|
|
<template slot="title">
|
|
|
- 测试信息
|
|
|
+ 测试信息: {{ projectDetail.name }}
|
|
|
</template>
|
|
|
<template slot="content">
|
|
|
- 可查看最近五条测试数据
|
|
|
+ <strong>git 地址 : </strong>
|
|
|
+ <a :href="projectDetail.url">{{ projectDetail.url }}</a>
|
|
|
</template>
|
|
|
</page-header>
|
|
|
-
|
|
|
<page-body>
|
|
|
- <div class="data-table">和学生代码作业的测试信息的显示格式和接口相同</div>
|
|
|
+ <router-view
|
|
|
+ :project-detail="projectDetail"
|
|
|
+ :detail-loading="detailLoading"
|
|
|
+ />
|
|
|
</page-body>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { getProjectDetail } from "@/api/codehw";
|
|
|
import PageHeader from "@/components/PageHeader";
|
|
|
import PageBody from "@/components/PageBody/index";
|
|
|
|
|
|
@@ -30,22 +52,30 @@ export default {
|
|
|
PageBody,
|
|
|
PageHeader
|
|
|
},
|
|
|
- mounted() {
|
|
|
- const { testId } = this.$route.params;
|
|
|
- console.log(testId);
|
|
|
- },
|
|
|
data() {
|
|
|
- return {};
|
|
|
+ return {
|
|
|
+ projectDetail: {},
|
|
|
+ detailLoading: false
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async mounted() {
|
|
|
+ // console.log(
|
|
|
+ // "code/" +
|
|
|
+ // this.$route.params.homeworkId +
|
|
|
+ // "/" +
|
|
|
+ // this.$route.params.projectId
|
|
|
+ // );
|
|
|
+ const { projectId } = this.$route.params;
|
|
|
+ this.detailLoading = true;
|
|
|
+ const detail = await getProjectDetail(projectId);
|
|
|
+ this.projectDetail = detail.data;
|
|
|
+ this.detailLoading = false;
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-.breadcrumb a {
|
|
|
- /*color: #7957d5;*/
|
|
|
- font-weight: bold;
|
|
|
-}
|
|
|
-.collapseeeeeee {
|
|
|
- margin-bottom: 10px;
|
|
|
+.top-nav-section {
|
|
|
+ padding: 0 40px;
|
|
|
}
|
|
|
</style>
|