From 91033ece9d5dea2f00e34a7400dc59e687745d57 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 28 Apr 2022 15:19:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=A1=B5=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/achievement/list/index.vue | 19 ++++++++-- src/pages/assessment/list/index.vue | 5 ++- .../course/list/courseManagement/index.vue | 3 +- .../information/contentManage/contentList.vue | 3 +- src/pages/match/list/index.vue | 3 +- src/pages/project/add/index.vue | 2 +- src/pages/project/list/index.vue | 37 +++++++++++++------ 7 files changed, 51 insertions(+), 21 deletions(-) diff --git a/src/pages/achievement/list/index.vue b/src/pages/achievement/list/index.vue index 660d797..c7c53a0 100644 --- a/src/pages/achievement/list/index.vue +++ b/src/pages/achievement/list/index.vue @@ -141,7 +141,7 @@ export default { } ], date: "", - page: 1, + page: +this.$route.query.page || 1, pageSize: 10, total: 0, loadIns: null @@ -248,7 +248,13 @@ export default { }); }, perChange(val) { - this.$router.push(`list?per=${val}`) + this.$router.push({ + path: 'list', + query: { + ...this.$route.query, + per: val + } + }) this.getData() }, initData() { @@ -317,7 +323,14 @@ export default { this.multipleSelection = val; }, handleCurrentChange(val) { // 切换页码 - this.page = val; + this.page = val + this.$router.push({ + path: 'list', + query: { + ...this.$route.query, + page: val + } + }) this.getData(); } } diff --git a/src/pages/assessment/list/index.vue b/src/pages/assessment/list/index.vue index fda5e7c..b4f366d 100644 --- a/src/pages/assessment/list/index.vue +++ b/src/pages/assessment/list/index.vue @@ -180,7 +180,7 @@ export default { endTime: "", month: "" }, - pageNum: 1, // 当前页数 + pageNum: +this.$route.query.page || 1, // 当前页数 pageSize: 10, // 每页10条 total: 0, // 总数 listData: [], // 表格数据 @@ -422,7 +422,8 @@ export default { this.getData(); }, handleCurrentChange(val) { - this.pageNum = val; + this.pageNum = val + this.$router.push(`list?page=${val}`) this.sss = 0 this.getData(); }, diff --git a/src/pages/course/list/courseManagement/index.vue b/src/pages/course/list/courseManagement/index.vue index 93b7157..2f7a745 100644 --- a/src/pages/course/list/courseManagement/index.vue +++ b/src/pages/course/list/courseManagement/index.vue @@ -85,7 +85,7 @@ export default { courseData: [], multipleSelection: [], classificationList: [], - current: 1, // 当前页码 + current: +this.$route.query.page || 1, // 当前页码 pageSize: 10, totals: 0 }; @@ -195,6 +195,7 @@ export default { }, handleCurrentChange(val) { this.current = val; + this.$router.push(`list?page=${val}`) this.getData(); }, switchOff(val, row, index) { diff --git a/src/pages/information/contentManage/contentList.vue b/src/pages/information/contentManage/contentList.vue index be3f220..4a09749 100644 --- a/src/pages/information/contentManage/contentList.vue +++ b/src/pages/information/contentManage/contentList.vue @@ -72,7 +72,7 @@ export default { }, listData: [], multipleSelection: [], - pageNo: 1, + pageNo: +this.$route.query.page || 1, pageSize: 10, totals: 0 }; @@ -108,6 +108,7 @@ export default { }, handleCurrentChange(val) { this.pageNo = val; + this.$router.push(`list?page=${val}`) this.getData(); }, addArticle() { diff --git a/src/pages/match/list/index.vue b/src/pages/match/list/index.vue index 46a0f59..fe2f85f 100644 --- a/src/pages/match/list/index.vue +++ b/src/pages/match/list/index.vue @@ -134,7 +134,7 @@ export default { } ], date: [], - pageNo: 1, + pageNo: +this.$route.query.page || 1, pageSize: 10, totals: 0, transferPublishStatus: ["已发布", "未发布"] @@ -243,6 +243,7 @@ export default { }, handleCurrentChange(val) { this.pageNo = val; + this.$router.push(`list?page=${val}`) this.getData(); }, transferTime(date, type) { diff --git a/src/pages/project/add/index.vue b/src/pages/project/add/index.vue index 8dc7198..106eb77 100644 --- a/src/pages/project/add/index.vue +++ b/src/pages/project/add/index.vue @@ -679,7 +679,7 @@ export default { }, // 返回列表 toList() { - this.$router.push(`/project/list?founder=${this.founder}`) + this.$router.back() }, // 返回 back() { diff --git a/src/pages/project/list/index.vue b/src/pages/project/list/index.vue index b1f0573..b4b9496 100644 --- a/src/pages/project/list/index.vue +++ b/src/pages/project/list/index.vue @@ -9,7 +9,7 @@