From 2ae6aadd3891c72462315381f14d35ad88414118 Mon Sep 17 00:00:00 2001 From: wuyize Date: Sat, 9 Jul 2022 09:29:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=9B=A2=E9=98=9F=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CreatePersonDialog.vue | 189 ++++++++++++++++++++ src/views/OngoingProject.vue | 13 +- src/views/ProjectGroup.vue | 244 ++++++++++++++++---------- 3 files changed, 344 insertions(+), 102 deletions(-) create mode 100644 src/components/CreatePersonDialog.vue diff --git a/src/components/CreatePersonDialog.vue b/src/components/CreatePersonDialog.vue new file mode 100644 index 0000000..4801f6a --- /dev/null +++ b/src/components/CreatePersonDialog.vue @@ -0,0 +1,189 @@ + + + + diff --git a/src/views/OngoingProject.vue b/src/views/OngoingProject.vue index 3465522..73114de 100644 --- a/src/views/OngoingProject.vue +++ b/src/views/OngoingProject.vue @@ -104,16 +104,17 @@ export default { }, created() { + const that = this // watch 路由的参数,以便再次获取数据 this.$watch( - () => this.$route.query, + () => that.$route.query, () => { - if (this.$route.query.currentPage) - this.currentPage = parseInt(this.$route.query.currentPage) - if (this.$route.query.pageSize) - this.pageSize = parseInt(this.$route.query.pageSize) + if (that.$route.query.currentPage) + that.currentPage = parseInt(that.$route.query.currentPage) + if (that.$route.query.pageSize) + that.pageSize = parseInt(that.$route.query.pageSize) - this.getProjects() + that.getProjects() }, // 组件创建完后获取数据, // 此时 data 已经被 observed 了 diff --git a/src/views/ProjectGroup.vue b/src/views/ProjectGroup.vue index 3aafc12..b90645e 100644 --- a/src/views/ProjectGroup.vue +++ b/src/views/ProjectGroup.vue @@ -4,19 +4,25 @@

项目团队

- 新增成员 + 新增成员
- - + :data="tableData" + > + - + + + @@ -56,7 +60,14 @@ v-model:page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" - style="padding: 15px 15px 15px 15px;box-sizing:border-box;background: #fff;display: flex;justify-content: flex-end;"> + style=" + padding: 15px 15px 15px 15px; + box-sizing: border-box; + background: #fff; + display: flex; + justify-content: flex-end; + " + >
@@ -76,6 +87,11 @@ +