diff --git a/src/router/index.js b/src/router/index.js index 5d9bd46..3980abe 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -7,6 +7,10 @@ import Project from "@/views/Project.vue"; import OngoingProject from "../views/OngoingProject"; import ClosedProject from "../views/ClosedProject"; +import ProjectGroup from "../views/ProjectGroup"; +import ProjectInfo from "../views/ProjectInfo"; +import ProjectWorkitem from "../views/ProjectWorkitem"; +import ProjectDemand from "../views/ProjectDemand"; const routes = [ { path: '/', @@ -18,11 +22,34 @@ const routes = [ component: OngoingProject, }, { - path: '/ClosedProject', + path: '/project/closed', component: ClosedProject, }, ], }, + { + path: '/project/:projectId(\\d+)', + name: 'Project', + component: Project, + children: [ + { + path: '/project/:projectId(\\d+)', + component: ProjectInfo, + }, + { + path: '/project/:projectId(\\d+)/workitem', + component: ProjectWorkitem, + }, + { + path: '/project/:projectId(\\d+)/demand', + component: ProjectDemand, + }, + { + path: '/project/:projectId(\\d+)/group', + component: ProjectGroup, + }, + ], + }, { path: '/login', name: 'Login', diff --git a/src/views/Home.vue b/src/views/Home.vue index 73a85a0..fc87e7e 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -14,7 +14,7 @@ 在途项目 - + 已结项项目 diff --git a/src/views/OngoingProject.vue b/src/views/OngoingProject.vue index fb4ddcb..1ee29f0 100644 --- a/src/views/OngoingProject.vue +++ b/src/views/OngoingProject.vue @@ -12,6 +12,7 @@ @@ -28,9 +29,12 @@ @@ -115,11 +119,12 @@ export default { mounted() { }, methods: { + onRowClick(row, column, event) { + router.push({path: '/project/'+row.projectId}) + }, onCreateProject() { this.getProjectClass() - this.dialogFormVisible = true - }, // 选择一页显示多少条数据 handleSizeChange(val) { diff --git a/src/views/Project.vue b/src/views/Project.vue index 1722148..e744740 100644 --- a/src/views/Project.vue +++ b/src/views/Project.vue @@ -1,7 +1,61 @@ \ No newline at end of file diff --git a/src/views/ProjectDemand.vue b/src/views/ProjectDemand.vue new file mode 100644 index 0000000..0b2677c --- /dev/null +++ b/src/views/ProjectDemand.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/src/views/ProjectGroup.vue b/src/views/ProjectGroup.vue new file mode 100644 index 0000000..65e48c3 --- /dev/null +++ b/src/views/ProjectGroup.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/src/views/ProjectInfo.vue b/src/views/ProjectInfo.vue new file mode 100644 index 0000000..86f744a --- /dev/null +++ b/src/views/ProjectInfo.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/src/views/ProjectWorkitem.vue b/src/views/ProjectWorkitem.vue new file mode 100644 index 0000000..a67d37b --- /dev/null +++ b/src/views/ProjectWorkitem.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file