|
|
@@ -1,6 +1,63 @@
|
|
|
<template>
|
|
|
- <div></div>
|
|
|
+ <div>
|
|
|
+ <page-header
|
|
|
+ :loading="detailLoading"
|
|
|
+ :routes="[{ name: '机器学习作业', path: 'dlwork' }, { name: '项目详情' }]"
|
|
|
+ :tab-list="[
|
|
|
+ {
|
|
|
+ name: '构建',
|
|
|
+ path: `code/${$route.params.homeworkId}/build`
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '部署',
|
|
|
+ path: `code/${$route.params.homeworkId}/deploy`
|
|
|
+ }
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ <template slot="title">
|
|
|
+ {{ projectDetail.name }}
|
|
|
+ </template>
|
|
|
+ <template slot="content">
|
|
|
+ <strong>git 地址 : </strong>
|
|
|
+ <a :href="projectDetail.url">{{ projectDetail.url }}</a>
|
|
|
+ </template>
|
|
|
+ </page-header>
|
|
|
+ <page-body>
|
|
|
+ <router-view
|
|
|
+ :project-detail="projectDetail"
|
|
|
+ :detail-loading="detailLoading"
|
|
|
+ />
|
|
|
+ </page-body>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
+
|
|
|
<script>
|
|
|
-export default {};
|
|
|
+import { getProjectDetail } from "@/api/codehw";
|
|
|
+import PageHeader from "@/components/PageHeader";
|
|
|
+import PageBody from "@/components/PageBody/index";
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ PageBody,
|
|
|
+ PageHeader
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ projectDetail: {},
|
|
|
+ detailLoading: false
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async mounted() {
|
|
|
+ const { projectId } = this.$route.params;
|
|
|
+ this.detailLoading = true;
|
|
|
+ const detail = await getProjectDetail(projectId);
|
|
|
+ this.projectDetail = detail.data;
|
|
|
+ this.detailLoading = false;
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.top-nav-section {
|
|
|
+ padding: 0 40px;
|
|
|
+}
|
|
|
+</style>
|