diff --git a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj
index 614197aa..c44ee01c 100644
--- a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj
+++ b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj
@@ -47,7 +47,7 @@
-
+
diff --git a/Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs b/Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs
index 37e51fb4..8e02b2be 100644
--- a/Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs
+++ b/Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs
@@ -119,7 +119,7 @@ public class SysOrgService : IDynamicApiController, ITransient
if (!_userManager.SuperAdmin && input.Pid == 0)
throw Oops.Oh(ErrorCodeEnum.D2009);
- if (await _sysOrgRep.IsAnyAsync(u => u.Name == input.Name && u.Code == input.Code))
+ if (await _sysOrgRep.IsAnyAsync(u => u.Name == input.Name || u.Code == input.Code))
throw Oops.Oh(ErrorCodeEnum.D2002);
if (!_userManager.SuperAdmin && input.Pid != 0)
@@ -189,7 +189,7 @@ public class SysOrgService : IDynamicApiController, ITransient
if (input.Id == input.Pid)
throw Oops.Oh(ErrorCodeEnum.D2001);
- if (await _sysOrgRep.IsAnyAsync(u => u.Name == input.Name && u.Code == input.Code && u.Id != input.Id))
+ if (await _sysOrgRep.IsAnyAsync(u => (u.Name == input.Name || u.Code == input.Code) && u.Id != input.Id))
throw Oops.Oh(ErrorCodeEnum.D2002);
// 父Id不能为自己的子节点
diff --git a/Web/package.json b/Web/package.json
index 5f8e4962..9929759f 100644
--- a/Web/package.json
+++ b/Web/package.json
@@ -2,7 +2,7 @@
"name": "admin.net.pro",
"type": "module",
"version": "2.4.33",
- "lastBuildTime": "2025.10.08",
+ "lastBuildTime": "2025.10.10",
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
"author": "zuohuaijun",
"license": "MIT",
@@ -49,7 +49,7 @@
"jsplumb": "^2.15.6",
"lodash-es": "^4.17.21",
"magic-string": "^0.30.19",
- "md-editor-v3": "^6.0.1",
+ "md-editor-v3": "^6.1.0",
"mitt": "^3.0.1",
"monaco-editor": "^0.54.0",
"mqtt": "^5.14.0",
@@ -82,7 +82,7 @@
"vue-signature-pad": "^3.0.2",
"vue3-tree-org": "^4.2.2",
"vxe-pc-ui": "^4.9.41",
- "vxe-table": "^4.16.20",
+ "vxe-table": "^4.16.21",
"xe-utils": "^3.7.9",
"xlsx-js-style": "^1.2.0"
},
@@ -90,7 +90,7 @@
"@iconify/vue": "^5.0.0",
"@plugin-web-update-notification/vite": "^2.0.2",
"@types/lodash-es": "^4.17.12",
- "@types/node": "^22.18.8",
+ "@types/node": "^22.18.9",
"@types/nprogress": "^0.2.3",
"@types/sortablejs": "^1.15.8",
"@typescript-eslint/eslint-plugin": "^8.46.0",
diff --git a/Web/src/components/table/modifyRecord.vue b/Web/src/components/table/modifyRecord.vue
index 20113b94..e6e371e8 100644
--- a/Web/src/components/table/modifyRecord.vue
+++ b/Web/src/components/table/modifyRecord.vue
@@ -1,14 +1,14 @@
-
+
{{ t('message.list.detail') }}
-
+
{{ t('message.list.creator') }}
@@ -16,7 +16,7 @@
-
+
{{ t('message.list.createTime') }}
@@ -24,7 +24,7 @@
-
+
{{ t('message.list.modifier') }}
@@ -32,7 +32,7 @@
-
+
{{ t('message.list.modifyTime') }}
@@ -41,7 +41,7 @@
-
+
{{ t('message.list.organizationName') }}
@@ -49,7 +49,7 @@
-
+
{{ t('message.list.tenantName') }}
@@ -58,7 +58,7 @@
-
+
{{ t('message.list.remark') }}
@@ -76,3 +76,13 @@ const props = defineProps<{
data: ModifyRecord;
}>();
+
+
diff --git a/Web/src/utils/formRule.ts b/Web/src/utils/formRule.ts
index cd3422b8..343f6d10 100644
--- a/Web/src/utils/formRule.ts
+++ b/Web/src/utils/formRule.ts
@@ -1,5 +1,6 @@
import type { FormItemRule } from 'element-plus';
import { ElMessage } from 'element-plus';
+import { nextTick, Ref, watch } from 'vue';
const TRIGGER_INPUT: FormItemRule['trigger'] = 'change';
const TRIGGER_BLUR: FormItemRule['trigger'] = 'blur';
@@ -17,6 +18,27 @@ export function useFormRulePresets() {
trigger,
});
+ const validatorIf = (shouldError: () => boolean, formRef?: Ref, label: string = '此项') => {
+ let field = '';
+ watch(
+ () => shouldError(),
+ () => nextTick(() => formRef?.value?.validateField(field).catch(() => {})),
+ { immediate: false, deep: true }
+ );
+
+ return {
+ validator: (_: any, __: any, callback: (error?: Error) => void) => {
+ field = _.field;
+ if (shouldError()) {
+ callback(new Error(`${label}为必填`));
+ } else {
+ callback();
+ }
+ },
+ trigger: ['blur', 'change'] as const,
+ };
+ };
+
const maxLen = (len: number, label = '此项', trigger = TRIGGER_INPUT): FormItemRule => ({
max: len,
message: `${label}长度不能超过 ${len} 个字符`,
@@ -373,6 +395,7 @@ export function useFormRulePresets() {
return {
required,
requiredIf,
+ validatorIf,
maxLen,
minLen,
pattern,
diff --git a/Web/src/views/login/component/account.vue b/Web/src/views/login/component/account.vue
index fb2c6e05..c00c605e 100644
--- a/Web/src/views/login/component/account.vue
+++ b/Web/src/views/login/component/account.vue
@@ -95,6 +95,7 @@ import { initBackEndControlRoutes } from '/@/router/backEnd';
import { Local, Session } from '/@/utils/storage';
import { formatAxis } from '/@/utils/formatTime';
import { NextLoading } from '/@/utils/loading';
+import { loadSysInfo } from '/@/utils/sysInfo';
import { sm2 } from 'sm-crypto-v2';
import { useRoutesList } from '/@/stores/routesList';
import { useThemeConfig } from '/@/stores/themeConfig';
@@ -161,11 +162,9 @@ onMounted(async () => {
const accessToken = route.query.token;
if (accessToken) await saveTokenAndInitRoutes(accessToken);
- // 若系统配置为空则刷新页面
+ // 若系统配置为空则获取系统配置
if (themeConfig.value.captcha == undefined) {
- setTimeout(() => {
- window.location.reload();
- }, 1000);
+ await loadSysInfo(Local.get('tid') ?? 0);
}
// 获取登录配置