From bb51b212104d70e7bc95b214d72e1866497722df Mon Sep 17 00:00:00 2001 From: lilinyuan <1084668738@qq.com> Date: Sun, 24 Mar 2024 22:57:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Duser=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=9F=A5=E8=AF=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 81b688c..7ec0a9f 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -25,7 +25,7 @@ const searchConfig = ref([ }, on: { change: async (val) =>{ - const { data } = await getDeptOpt({subCompanyId: val.value}) + const { data } = await getDeptOpt({subCompanyId: val}) searchConfig.value.find(item=>item.prop == 'departmentId').props.data = data } } From 365c4c9d697a64a87543ffa06b6c1eec7082d7c1 Mon Sep 17 00:00:00 2001 From: lilinyuan <1084668738@qq.com> Date: Sun, 24 Mar 2024 23:00:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/permisstion.js | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/stores/permisstion.js b/src/stores/permisstion.js index 5733e3d..ddf9255 100644 --- a/src/stores/permisstion.js +++ b/src/stores/permisstion.js @@ -43,14 +43,6 @@ export const usePermisstionStroe = defineStore('permisstion', () => { route.component = loadView(route.component) } } - if (route.pathParams != null) { - let pathParams = route.pathParams - route.pathParams = JSON.parse(route.pathParams) - route.query = {} - for (const key in route.pathParams) { - route.query = {[key]: route.pathParams[key]} - } - } if (route.children !== null && route.children && route.children.length !== 0) { route.children = formatAsyncRouters(route.children) } @@ -69,12 +61,32 @@ export const usePermisstionStroe = defineStore('permisstion', () => { if (item.children && item.children.length !== 0) { generateMenu(item.children) } + if (item.pathParams != null) { + item.path = formatPath(item.path, JSON.parse(item.pathParams)) + } item.title = item.meta.title item.icon = item.meta.icon return true }) } + // 拼接地址 + const formatPath = (path, query) => { + const queryArr = [] + let newPath = path + for (const key in query) { + queryArr.push({label: key, value: query[key]}) + } + queryArr.forEach((item, index)=>{ + if(!index) { + newPath += `?${item.label}=${item.value}` + } else { + newPath += `&${item.label}=${item.value}` + } + }) + return newPath + } + const loadView = (view) => { if (import.meta.env.MODE === 'development') { From 3efca32dbf9a41d2babf218c1560e0905230e15f Mon Sep 17 00:00:00 2001 From: lilinyuan <1084668738@qq.com> Date: Sun, 24 Mar 2024 23:00:34 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/appmain/AppMain.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/layout/appmain/AppMain.vue b/src/layout/appmain/AppMain.vue index 5be5f72..0c12187 100644 --- a/src/layout/appmain/AppMain.vue +++ b/src/layout/appmain/AppMain.vue @@ -3,10 +3,20 @@
- + + + + + + + + + +