From f5410dfff4f4f8737a649047858be477d6e7c2e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 17 Dec 2024 09:41:11 +0800 Subject: [PATCH 1/8] =?UTF-8?q?update=20=E5=88=A0=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/index.vue | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 572f50c..0a35a1b 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -579,15 +579,6 @@ function submitFileForm() { uploadRef.value?.submit(); } -/** 初始化部门数据 */ -const initTreeData = async () => { - // 判断部门的数据是否存在,存在不获取,不存在则获取 - if (deptOptions.value === undefined) { - const { data } = await treeselect(); - deptOptions.value = data; - } -}; - /** 重置操作表单 */ const reset = () => { form.value = { ...initFormData }; @@ -605,7 +596,6 @@ const handleAdd = async () => { const { data } = await api.getUser(); dialog.visible = true; dialog.title = '新增用户'; - await initTreeData(); postOptions.value = data.posts; roleOptions.value = data.roles; form.value.password = initPassword.value.toString(); @@ -618,7 +608,6 @@ const handleUpdate = async (row?: UserForm) => { const { data } = await api.getUser(userId); dialog.visible = true; dialog.title = '修改用户'; - await initTreeData(); Object.assign(form.value, data.user); postOptions.value = data.posts; roleOptions.value = data.roles; From 1c280581414cb56c1d32978c4e8b9d1a8afa5745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Wed, 18 Dec 2024 13:22:47 +0800 Subject: [PATCH 2/8] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20TopNav?= =?UTF-8?q?=E5=86=85=E9=93=BE=E8=8F=9C=E5=8D=95=E7=82=B9=E5=87=BB=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E9=AB=98=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TopNav/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/TopNav/index.vue b/src/components/TopNav/index.vue index e93e005..cfe2cd7 100644 --- a/src/components/TopNav/index.vue +++ b/src/components/TopNav/index.vue @@ -91,8 +91,8 @@ const activeMenu = computed(() => { let activePath = path; if (path !== undefined && path.lastIndexOf('/') > 0 && hideList.indexOf(path) === -1) { const tmpPath = path.substring(1, path.length); - activePath = '/' + tmpPath.substring(0, tmpPath.indexOf('/')); if (!route.meta.link) { + activePath = '/' + tmpPath.substring(0, tmpPath.indexOf('/')); appStore.toggleSideBarHide(false); } } else if (!route.children) { From ed82954643b065728293990518345fc32193df0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 24 Dec 2024 09:22:48 +0000 Subject: [PATCH 3/8] update src/views/system/user/index.vue. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 疯狂的狮子Li <15040126243@163.com> --- 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 0a35a1b..43cee7c 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -68,7 +68,7 @@ - + 删除 From 7772c7c7d646452ac9a50cb76b1f2be10e7a1d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 24 Dec 2024 21:58:26 +0800 Subject: [PATCH 4/8] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=A1=B5=E9=9D=A2=20=E5=A2=9E=E5=8A=A0=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=88=B0=E5=A4=84=E6=9D=83=E9=99=90=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 43cee7c..4eddc50 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -81,8 +81,8 @@ From e29beed8bd5c7f7fa61efb62236d6bcd65d05b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 24 Dec 2024 21:58:48 +0800 Subject: [PATCH 5/8] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20hasRoles=20?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E5=A2=9E=E5=8A=A0=E8=B6=85=E7=AE=A1=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/directive/permission/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/directive/permission/index.ts b/src/directive/permission/index.ts index afde332..eb2dccc 100644 --- a/src/directive/permission/index.ts +++ b/src/directive/permission/index.ts @@ -31,7 +31,7 @@ export const hasRoles: Directive = { const { roles } = useUserStore(); if (value && value instanceof Array && value.length > 0) { const hasRole = roles.some((role: string) => { - return role === 'admin' || value.includes(role); + return role === 'superadmin' || role === 'admin' || value.includes(role); }); if (!hasRole) { el.parentNode && el.parentNode.removeChild(el); From b600fb34b56888e6cd4807047ec7bb3cb6b193aa Mon Sep 17 00:00:00 2001 From: QianRj <14974713+qianrj@user.noreply.gitee.com> Date: Wed, 25 Dec 2024 22:27:32 +0800 Subject: [PATCH 6/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=95=8C=E9=9D=A2=E4=BF=AE=E6=94=B9=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=9D=83=E9=99=90=E5=AD=97=E7=AC=A6=E4=B8=B2=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= 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 4eddc50..430c55a 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -63,7 +63,7 @@ 新增 - + 修改 From 2b1f5f2c7033eebee97de472b5f6195d95516b80 Mon Sep 17 00:00:00 2001 From: LiuHao Date: Fri, 27 Dec 2024 11:45:33 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E8=89=B2=E5=9C=A8=E6=B7=B1=E8=89=B2=E6=A8=A1=E5=BC=8F=E4=B8=8B?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BA=AE=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/variables.module.scss | 19 +++++++++++++++++++ src/layout/components/TagsView/index.vue | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/assets/styles/variables.module.scss b/src/assets/styles/variables.module.scss index 36a8df6..4405b97 100644 --- a/src/assets/styles/variables.module.scss +++ b/src/assets/styles/variables.module.scss @@ -21,7 +21,12 @@ // ele --brder-color: #e8e8e8; + + // 添加 tag 相关变量 + --tags-view-active-bg: var(--el-color-primary); + --tags-view-active-border-color: var(--el-color-primary); } + html.dark { --menuBg: #1d1e1f; --menuColor: #bfcbd9; @@ -41,6 +46,20 @@ html.dark { .el-tree-node__content { --el-color-primary-light-9: #262727; } + + .el-button--primary { + --el-button-bg-color: var(--el-color-primary-dark-6); + --el-button-border-color: var(--el-color-primary-light-2); + } + + .el-switch { + --el-switch-on-color: var(--el-color-primary-dark-6); + --el-switch-border-color: var(--el-color-primary-light-2); + } + + // 在深色模式下使用更深的颜色 + --tags-view-active-bg: var(--el-color-primary-dark-6); + --tags-view-active-border-color: var(--el-color-primary-light-2); // vxe-table 主题 --vxe-font-color: #98989e; --vxe-primary-color: #2c7ecf; diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index 0812feb..9bcf285 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -70,8 +70,8 @@ const isActive = (r: RouteLocationNormalized): boolean => { const activeStyle = (tag: RouteLocationNormalized) => { if (!isActive(tag)) return {}; return { - 'background-color': theme.value, - 'border-color': theme.value + 'background-color': 'var(--tags-view-active-bg)', + 'border-color': 'var(--tags-view-active-border-color)' }; }; const isAffix = (tag: RouteLocationNormalized) => { From b39e0ad6db13cb6c737cd4ef5dd867a44c928de3 Mon Sep 17 00:00:00 2001 From: LiuHao Date: Fri, 27 Dec 2024 12:55:27 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E8=89=B2=E5=9C=A8=E6=B7=B1=E8=89=B2=E6=A8=A1=E5=BC=8F=E4=B8=8B?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BA=AE=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/variables.module.scss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/assets/styles/variables.module.scss b/src/assets/styles/variables.module.scss index 4405b97..e5cd95d 100644 --- a/src/assets/styles/variables.module.scss +++ b/src/assets/styles/variables.module.scss @@ -57,6 +57,11 @@ html.dark { --el-switch-border-color: var(--el-color-primary-light-2); } + .el-tag--primary { + --el-tag-bg-color: var(--el-color-primary-dark-6); + --el-tag-border-color: var(--el-color-primary-light-2); + } + // 在深色模式下使用更深的颜色 --tags-view-active-bg: var(--el-color-primary-dark-6); --tags-view-active-border-color: var(--el-color-primary-light-2); @@ -137,4 +142,4 @@ $base-sidebar-width: 200px; dangerColor: $--color-danger; infoColor: $--color-info; warningColor: $--color-warning; -} +} \ No newline at end of file