From 76869e270de1f96e1108519013465f993ab42d19 Mon Sep 17 00:00:00 2001 From: aBin Date: Wed, 2 Mar 2022 18:34:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93=E5=89=8D=E4=BD=8D=E7=BD=AE=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ListPage/ListPage.vue | 1 + src/components/Location/Location.vue | 14 ++++++++++++++ src/views/OtherPages/Department.vue | 26 ++++++++++++++++++++------ src/views/OtherPages/Information.vue | 15 ++++++++------- 4 files changed, 43 insertions(+), 13 deletions(-) diff --git a/src/components/ListPage/ListPage.vue b/src/components/ListPage/ListPage.vue index 4f1a528..b616ace 100644 --- a/src/components/ListPage/ListPage.vue +++ b/src/components/ListPage/ListPage.vue @@ -98,6 +98,7 @@ export default { async getYear() { try { const params = { showPage: this.code }; + console.log('params: ', params); const res = await getCondition(params); const { code, msg, data } = res.data; if (code === 200) { diff --git a/src/components/Location/Location.vue b/src/components/Location/Location.vue index bca3840..d373c88 100644 --- a/src/components/Location/Location.vue +++ b/src/components/Location/Location.vue @@ -995,7 +995,21 @@ export default { if (item.children && item.children.length) { for (let k = 0; k < item.children.length; k++) { const itemC = item.children[k]; + console.log('itemC: ', itemC.children); + + if (itemC.children && itemC.children.length) { + for (let m = 0; m < itemC.children.length; m++) { + const itemD = itemC.children[m]; + if (this.title === itemD.title && m !== 0) { + const path = window.location.href.split('?'); + window.location.href = path[0] + `?code=${itemC.children[0].code}`; + return; + } + } + } + if (this.title === itemC.title && k !== 0) { + console.log('itemC: ', itemC[k]); this.$router.push({ path: this.tabList[i].url, query: { code: item.children[0].code }, diff --git a/src/views/OtherPages/Department.vue b/src/views/OtherPages/Department.vue index 73a2052..788a096 100644 --- a/src/views/OtherPages/Department.vue +++ b/src/views/OtherPages/Department.vue @@ -7,7 +7,12 @@
-