From 923eb98a5c5b0c77f37f4bf23d5d623337d65420 Mon Sep 17 00:00:00 2001 From: Soybean Date: Sun, 20 Jul 2025 01:12:19 +0800 Subject: [PATCH 01/17] fix(readme): update GitHub stars and forks links for gitee --- README.en_US.md | 4 ++-- README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.en_US.md b/README.en_US.md index d329f266..c80c8af4 100644 --- a/README.en_US.md +++ b/README.en_US.md @@ -7,8 +7,8 @@ --- [![license](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE) -[![github stars](https://img.shields.io/github/stars/soybeanjs/soybean-admin)](https://github.com/soybeanjs/soybean-admin) -[![github forks](https://img.shields.io/github/forks/soybeanjs/soybean-admin)](https://github.com/soybeanjs/soybean-admin) +[![github stars](https://img.shields.io/github/stars/honghuangdc/soybean-admin)](https://github.com/soybeanjs/soybean-admin) +[![github forks](https://img.shields.io/github/forks/honghuangdc/soybean-admin)](https://github.com/soybeanjs/soybean-admin) [![gitee stars](https://gitee.com/honghuangdc/soybean-admin/badge/star.svg)](https://gitee.com/honghuangdc/soybean-admin) [![gitcode star](https://gitcode.com/soybeanjs/soybean-admin/star/badge.svg)](https://gitcode.com/soybeanjs/soybean-admin) [![Powered by DartNode](https://dartnode.com/branding/DN-Open-Source-sm.png)](https://dartnode.com "Powered by DartNode - Free VPS for Open Source") diff --git a/README.md b/README.md index f7745723..d0de71ba 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ --- [![license](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE) -[![github stars](https://img.shields.io/github/stars/soybeanjs/soybean-admin)](https://github.com/soybeanjs/soybean-admin) -[![github forks](https://img.shields.io/github/forks/soybeanjs/soybean-admin)](https://github.com/soybeanjs/soybean-admin) +[![github stars](https://img.shields.io/github/stars/honghuangdc/soybean-admin)](https://github.com/soybeanjs/soybean-admin) +[![github forks](https://img.shields.io/github/forks/honghuangdc/soybean-admin)](https://github.com/soybeanjs/soybean-admin) [![gitee stars](https://gitee.com/honghuangdc/soybean-admin/badge/star.svg)](https://gitee.com/honghuangdc/soybean-admin) [![gitcode star](https://gitcode.com/soybeanjs/soybean-admin/star/badge.svg)](https://gitcode.com/soybeanjs/soybean-admin) [![Powered by DartNode](https://dartnode.com/branding/DN-Open-Source-sm.png)](https://dartnode.com "Powered by DartNode - Free VPS for Open Source") From 8fcc70d73da6792c7694954eb358ea5cc6d45dd8 Mon Sep 17 00:00:00 2001 From: AN <1983933789@qq.com> Date: Fri, 25 Jul 2025 10:25:50 +0800 Subject: [PATCH 02/17] =?UTF-8?q?fix(projects):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=B8=80=E7=BA=A7=E8=8F=9C=E5=8D=95=E9=9A=90=E8=97=8F=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/route/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/modules/route/index.ts b/src/store/modules/route/index.ts index 146e8140..14ff0f8a 100644 --- a/src/store/modules/route/index.ts +++ b/src/store/modules/route/index.ts @@ -67,6 +67,8 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => { if (authRouteMode.value === 'dynamic') { if (route.path === '/' && route.children?.length) { const child = route.children[0]; + // @ts-expect-error no hidden field + child.hidden = route.hidden; parseRouter(child); child.name = Math.random().toString(36).slice(2, 12); Object.assign(route, child); @@ -123,7 +125,6 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => { } else if (!isNotNull(route.meta.icon)) { route.meta.icon = defaultIcon; } - // @ts-expect-error no hidden field route.meta.hideInMenu = route.hidden; if (route.meta.hideInMenu && parent) { From adca2e26be4855e3e12ac3e372ca114b66e1a240 Mon Sep 17 00:00:00 2001 From: NicholasLD Date: Fri, 25 Jul 2025 03:51:09 +0000 Subject: [PATCH 03/17] =?UTF-8?q?refactor(menu):=20=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E4=B8=AD=E9=9A=90=E8=97=8F=E7=9A=84=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=98=BE=E7=A4=BA=E7=81=B0=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: NicholasLD --- src/views/system/menu/index.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index e028bebc..a48289ab 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -113,6 +113,15 @@ function renderLabel({ option }: { option: TreeOption }) { if (label?.startsWith('route.') || label?.startsWith('menu.')) { label = $t(label as App.I18n.I18nKey); } + // 隐藏的菜单显示灰色 + if (option.visible === '1') { + return ( +
+ {label} + +
+ ); + } return
{label}
; } From f89835578c98a3544b21a6cce0fd1eb7fc5b5c88 Mon Sep 17 00:00:00 2001 From: xlsea Date: Sat, 26 Jul 2025 12:43:10 +0800 Subject: [PATCH 04/17] =?UTF-8?q?fix(hooks):=20=E9=9D=9E=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E4=B8=8B=E4=B8=8D=E4=BD=BF=E7=94=A8=E6=B5=81?= =?UTF-8?q?=E5=BC=8F=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/business/download.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hooks/business/download.ts b/src/hooks/business/download.ts index 060b4579..866aa78a 100644 --- a/src/hooks/business/download.ts +++ b/src/hooks/business/download.ts @@ -16,6 +16,12 @@ export function useDownload() { const isHttpProxy = import.meta.env.DEV && import.meta.env.VITE_HTTP_PROXY === 'Y'; const { baseURL } = getServiceBaseURL(import.meta.env, isHttpProxy); + const isHttps = () => { + const protocol = document.location.protocol; + const hostname = document.location.hostname; + return protocol === 'https' || hostname === 'localhost' || hostname === '127.0.0.1'; + }; + /** 获取通用请求头 */ const getCommonHeaders = (contentType = 'application/octet-stream') => ({ Authorization: `Bearer ${localStg.get('token')}`, @@ -111,7 +117,7 @@ export function useDownload() { const finalFilename = filename || response.headers.get('Download-Filename') || `download-${timestamp}`; - if (response.body) { + if (response.body && isHttps()) { const contentLength = Number(response.headers.get('Content-Length')); await downloadByStream(response.body, finalFilename, contentLength); return; From e538355f2bcde6a7006606d145b33ab50ec2e04f Mon Sep 17 00:00:00 2001 From: xlsea Date: Sat, 26 Jul 2025 12:55:19 +0800 Subject: [PATCH 05/17] =?UTF-8?q?refactor(projects):=20=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=96=B0=E5=A2=9E=E7=A6=81=E7=94=A8=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/menu/index.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index a48289ab..16675c67 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -113,6 +113,15 @@ function renderLabel({ option }: { option: TreeOption }) { if (label?.startsWith('route.') || label?.startsWith('menu.')) { label = $t(label as App.I18n.I18nKey); } + // 禁用的菜单显示红色 + if (option.status === '1') { + return ( +
+ {label} + +
+ ); + } // 隐藏的菜单显示灰色 if (option.visible === '1') { return ( From 2d31d7dc62867ef9f8345730840ea61a5b6e1055 Mon Sep 17 00:00:00 2001 From: AN <1983933789@qq.com> Date: Mon, 28 Jul 2025 17:56:12 +0800 Subject: [PATCH 06/17] =?UTF-8?q?fix(hooks):=20=E4=BF=AE=E5=A4=8Doss?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E6=97=B6=E6=9C=AA=E8=BD=AC=E7=A0=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/business/download.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/business/download.ts b/src/hooks/business/download.ts index 866aa78a..b3b70c14 100644 --- a/src/hooks/business/download.ts +++ b/src/hooks/business/download.ts @@ -115,7 +115,8 @@ export function useDownload() { await handleResponse(response); - const finalFilename = filename || response.headers.get('Download-Filename') || `download-${timestamp}`; + const rawHeader = response.headers.get('Download-Filename'); + const finalFilename = filename || (rawHeader ? decodeURIComponent(rawHeader) : null) || `download-${timestamp}`; if (response.body && isHttps()) { const contentLength = Number(response.headers.get('Content-Length')); From b96c46baa9f8d8a79794cefe6c3c54e1410ccc8e Mon Sep 17 00:00:00 2001 From: wang_rui Date: Wed, 30 Jul 2025 18:02:24 +0800 Subject: [PATCH 07/17] =?UTF-8?q?fix(project):=20=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E5=A4=9A=E7=A7=9F=E6=88=B7=E5=8A=9F=E8=83=BD=E5=90=8E=E4=BB=8D?= =?UTF-8?q?=E7=84=B6=E9=81=8D=E5=8E=86=E7=A7=9F=E6=88=B7=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/_builtin/login/modules/pwd-login.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/views/_builtin/login/modules/pwd-login.vue b/src/views/_builtin/login/modules/pwd-login.vue index 8af8916f..d42e7472 100644 --- a/src/views/_builtin/login/modules/pwd-login.vue +++ b/src/views/_builtin/login/modules/pwd-login.vue @@ -53,12 +53,14 @@ async function handleFetchTenantList() { const { data, error } = await fetchTenantList(); if (error) return; tenantEnabled.value = data.tenantEnabled; - tenantOption.value = data.voList.map(tenant => { - return { - label: tenant.companyName, - value: tenant.tenantId - }; - }); + if (data.tenantEnabled) { + tenantOption.value = data.voList.map(tenant => { + return { + label: tenant.companyName, + value: tenant.tenantId + }; + }); + } endTenantLoading(); } From 52318c106dfcc16bf3f82d66c2da366c838d1e5b Mon Sep 17 00:00:00 2001 From: AN <1983933789@qq.com> Date: Thu, 31 Jul 2025 13:30:51 +0800 Subject: [PATCH 08/17] =?UTF-8?q?fix(projects):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/config/modules/config-search.vue | 9 ++++++--- src/views/system/oss/modules/oss-search.vue | 9 ++++++--- src/views/system/role/modules/role-auth-user-drawer.vue | 9 ++++++--- src/views/system/role/modules/role-search.vue | 9 ++++++--- src/views/system/user/modules/user-search.vue | 9 ++++++--- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/views/system/config/modules/config-search.vue b/src/views/system/config/modules/config-search.vue index 0241b491..7e3688ab 100644 --- a/src/views/system/config/modules/config-search.vue +++ b/src/views/system/config/modules/config-search.vue @@ -21,9 +21,12 @@ const dateRangeCreateTime = ref<[string, string] | null>(null); const model = defineModel('model', { required: true }); function onDateRangeCreateTimeUpdate(value: [string, string] | null) { - if (value?.length) { - model.value.params!.beginTime = value[0]; - model.value.params!.endTime = value[1]; + const params = model.value.params!; + if (value && value.length === 2) { + [params.beginTime, params.endTime] = value; + } else { + params.beginTime = undefined; + params.endTime = undefined; } } diff --git a/src/views/system/oss/modules/oss-search.vue b/src/views/system/oss/modules/oss-search.vue index f13f5f8a..f0f3f041 100644 --- a/src/views/system/oss/modules/oss-search.vue +++ b/src/views/system/oss/modules/oss-search.vue @@ -21,9 +21,12 @@ const dateRangeCreateTime = ref<[string, string] | null>(null); const model = defineModel('model', { required: true }); function onDateRangeCreateTimeUpdate(value: [string, string] | null) { - if (value?.length) { - model.value.params!.beginCreateTime = value[0]; - model.value.params!.endCreateTime = value[1]; + const params = model.value.params!; + if (value && value.length === 2) { + [params.beginTime, params.endTime] = value; + } else { + params.beginTime = undefined; + params.endTime = undefined; } } diff --git a/src/views/system/role/modules/role-auth-user-drawer.vue b/src/views/system/role/modules/role-auth-user-drawer.vue index 6bb9e890..882e8f54 100644 --- a/src/views/system/role/modules/role-auth-user-drawer.vue +++ b/src/views/system/role/modules/role-auth-user-drawer.vue @@ -168,9 +168,12 @@ const dateRangeCreateTime = ref<[string, string] | null>(null); const datePickerRef = ref>(); function onDateRangeCreateTimeUpdate(value: [string, string] | null) { - if (value?.length) { - searchParams.params!.beginTime = value[0]; - searchParams.params!.endTime = value[1]; + const params = searchParams.params!; + if (value && value.length === 2) { + [params.beginTime, params.endTime] = value; + } else { + params.beginTime = undefined; + params.endTime = undefined; } } diff --git a/src/views/system/role/modules/role-search.vue b/src/views/system/role/modules/role-search.vue index 395ae278..0bea6a26 100644 --- a/src/views/system/role/modules/role-search.vue +++ b/src/views/system/role/modules/role-search.vue @@ -24,9 +24,12 @@ const model = defineModel('model', { required: true const { options: sysNormalDisableOptions } = useDict('sys_normal_disable', false); function onDateRangeCreateTimeUpdate(value: [string, string] | null) { - if (value?.length) { - model.value.params!.beginTime = `${value[0]} 00:00:00`; - model.value.params!.endTime = `${value[1]} 23:59:59`; + const params = model.value.params!; + if (value && value.length === 2) { + [params.beginTime, params.endTime] = value; + } else { + params.beginTime = undefined; + params.endTime = undefined; } } diff --git a/src/views/system/user/modules/user-search.vue b/src/views/system/user/modules/user-search.vue index f9476ade..5475953d 100644 --- a/src/views/system/user/modules/user-search.vue +++ b/src/views/system/user/modules/user-search.vue @@ -24,9 +24,12 @@ const datePickerRef = ref>(); const model = defineModel('model', { required: true }); function onDateRangeCreateTimeUpdate(value: [string, string] | null) { - if (value?.length) { - model.value.params!.beginTime = value[0]; - model.value.params!.endTime = value[1]; + const params = model.value.params!; + if (value && value.length === 2) { + [params.beginTime, params.endTime] = value; + } else { + params.beginTime = undefined; + params.endTime = undefined; } } From 710374398a70110637988e30d936ed17310dfbdf Mon Sep 17 00:00:00 2001 From: xlsea Date: Thu, 31 Jul 2025 13:52:07 +0800 Subject: [PATCH 09/17] =?UTF-8?q?fix(projects):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E8=BF=87=E6=9C=9F=E4=BA=8B=E4=BB=B6=E7=9B=91?= =?UTF-8?q?=E5=90=AC=E6=9C=AA=E8=A2=AB=E9=87=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/request/index.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/service/request/index.ts b/src/service/request/index.ts index 12ce410c..da579d37 100644 --- a/src/service/request/index.ts +++ b/src/service/request/index.ts @@ -77,7 +77,7 @@ export const request = createFlatRequest msg !== response.data.msg); + logoutAndCleanup(); } }); request.cancelAllRequest(); From a15b683b1da1845afcd7a3b34318551642d4a508 Mon Sep 17 00:00:00 2001 From: AN <1983933789@qq.com> Date: Wed, 6 Aug 2025 09:12:24 +0800 Subject: [PATCH 10/17] =?UTF-8?q?fix(projects):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=96=B0=E5=A2=9E=E6=97=B6=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=8C=85=E5=90=AB=E8=B6=85=E7=BA=A7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/custom/post-select.vue | 14 +++++++------- src/typings/api/system.api.d.ts | 2 ++ .../system/user/modules/user-operate-drawer.vue | 17 +++++++++++++++-- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/components/custom/post-select.vue b/src/components/custom/post-select.vue index 49dd8741..57cfee9e 100644 --- a/src/components/custom/post-select.vue +++ b/src/components/custom/post-select.vue @@ -21,27 +21,27 @@ const attrs: SelectProps = useAttrs(); const { loading: postLoading, startLoading: startPostLoading, endLoading: endPostLoading } = useLoading(); -/** the enabled role options */ -const roleOptions = ref[]>([]); +/** the enabled post options */ +const postOptions = ref[]>([]); watch( () => props.deptId, () => { if (!props.deptId) { - roleOptions.value = []; + postOptions.value = []; return; } - getRoleOptions(); + getPostOptions(); }, { immediate: true } ); -async function getRoleOptions() { +async function getPostOptions() { startPostLoading(); const { error, data } = await fetchGetPostSelect(props.deptId!); if (!error) { - roleOptions.value = data.map(item => ({ + postOptions.value = data.map(item => ({ label: item.postName, value: item.postId })); @@ -54,7 +54,7 @@ async function getRoleOptions() { diff --git a/src/typings/api/system.api.d.ts b/src/typings/api/system.api.d.ts index 8e779f31..64825d10 100644 --- a/src/typings/api/system.api.d.ts +++ b/src/typings/api/system.api.d.ts @@ -163,6 +163,8 @@ declare namespace Api { postIds: string[]; /** user role ids */ roleIds: string[]; + /** roles */ + roles: Role[]; }; /** user list */ diff --git a/src/views/system/user/modules/user-operate-drawer.vue b/src/views/system/user/modules/user-operate-drawer.vue index 68ecfa2c..f48c0b17 100644 --- a/src/views/system/user/modules/user-operate-drawer.vue +++ b/src/views/system/user/modules/user-operate-drawer.vue @@ -1,5 +1,5 @@