From cdb0d7088e9334eeda2b8a8542da5acd18544a64 Mon Sep 17 00:00:00 2001 From: mycode99 <661753@qq.com> Date: Wed, 9 Apr 2025 19:48:37 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Admin.NET/Admin.NET.We?= =?UTF-8?q?b.Entry/wwwroot/template/web=5Fviews=5FList.vue.vm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加缺少时间范围查询字段 --- .../Admin.NET.Web.Entry/wwwroot/template/web_views_List.vue.vm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/web_views_List.vue.vm b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/web_views_List.vue.vm index b342c30b..8d7c8805 100644 --- a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/web_views_List.vue.vm +++ b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/web_views_List.vue.vm @@ -272,6 +272,9 @@ const state = reactive({ @if(Model.QueryWhetherList.Count > 0) { @foreach (var column in Model.QueryWhetherList) { @:@(@column.LowerPropertyName): undefined, + @if(@column.EffectType == "DatePicker"){ + @:@(@column.LowerPropertyName)Range: undefined, + } } } }, From be614cc0bb7cbdd64602a1437f9c9d45fd8c5edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=99=E6=84=8F?= Date: Wed, 9 Apr 2025 22:13:34 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20=E8=8F=9C=E5=8D=95=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E5=90=8E=E5=88=97=E8=A1=A8=E4=BF=9D=E7=95=99=E5=B1=95?= =?UTF-8?q?=E5=BC=80=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/views/system/menu/index.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Web/src/views/system/menu/index.vue b/Web/src/views/system/menu/index.vue index 2ae688b7..f5bfa13a 100644 --- a/Web/src/views/system/menu/index.vue +++ b/Web/src/views/system/menu/index.vue @@ -70,7 +70,7 @@ - + @@ -131,7 +131,11 @@ const options = useVxeTable( // 工具栏配置 toolbarConfig: { export: false }, // 树形配置 - treeConfig: { expandAll: false }, + treeConfig: { expandAll: false, reserve: true }, + // 行配置信息 + rowConfig: { + keyField: 'id', + }, } ); From f52c855e7b99fa3d014af1a4d999806e3d06efba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=99=E6=84=8F?= Date: Wed, 9 Apr 2025 22:36:29 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=E8=A7=92=E8=89=B2API=E3=80=81?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E3=80=81=E5=AD=97=E6=AE=B5=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=8F=AA=E8=BF=94=E5=9B=9E=E5=8F=B6=E5=AD=90?= =?UTF-8?q?=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免记录父节点后,当前父节点下新增了叶子节点时,打开授权界面会显示全选叶子节点的情况,而实际新增的叶子节点没有授权 --- Web/src/views/system/role/component/grantApi.vue | 2 +- Web/src/views/system/role/component/grantMenu.vue | 2 +- Web/src/views/system/role/component/grantTable.vue | 2 +- Web/src/views/system/tenant/component/grantMenu.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Web/src/views/system/role/component/grantApi.vue b/Web/src/views/system/role/component/grantApi.vue index ef159d77..44b19aac 100644 --- a/Web/src/views/system/role/component/grantApi.vue +++ b/Web/src/views/system/role/component/grantApi.vue @@ -134,7 +134,7 @@ const cancel = () => { // 授权角色接口资源 const submit = async () => { - state.ownApiList = treeRef.value?.getCheckedKeys() as Array; + state.ownApiList = treeRef.value?.getCheckedKeys(true) as Array; await getAPI(SysRoleApi).apiSysRoleGrantApiPost({ id: state.roleId, apiList: state.ownApiList }); cancel(); }; diff --git a/Web/src/views/system/role/component/grantMenu.vue b/Web/src/views/system/role/component/grantMenu.vue index 4126315f..3c385ebf 100644 --- a/Web/src/views/system/role/component/grantMenu.vue +++ b/Web/src/views/system/role/component/grantMenu.vue @@ -97,7 +97,7 @@ const cancel = () => { // 提交 const submit = async () => { - state.menuIdList = treeRef.value?.getCheckedKeys() as Array; //.concat(treeRef.value?.getHalfCheckedKeys()); + state.menuIdList = treeRef.value?.getCheckedKeys(true) as Array; //.concat(treeRef.value?.getHalfCheckedKeys()); await getAPI(SysRoleApi).apiSysRoleGrantMenuPost({ id: state.roleId, menuIdList: state.menuIdList }); cancel(); }; diff --git a/Web/src/views/system/role/component/grantTable.vue b/Web/src/views/system/role/component/grantTable.vue index 4b188b32..cf5c46f5 100644 --- a/Web/src/views/system/role/component/grantTable.vue +++ b/Web/src/views/system/role/component/grantTable.vue @@ -87,7 +87,7 @@ const cancel = () => { // 提交 const submit = async () => { - state.tableColumnList = treeRef.value?.getCheckedKeys() as Array; //.concat(treeRef.value?.getHalfCheckedKeys()); + state.tableColumnList = treeRef.value?.getCheckedKeys(true) as Array; //.concat(treeRef.value?.getHalfCheckedKeys()); await getAPI(SysRoleApi).apiSysRoleGrantRoleTablePost({ id: state.roleId, tableColumnList: state.tableColumnList }); cancel(); }; diff --git a/Web/src/views/system/tenant/component/grantMenu.vue b/Web/src/views/system/tenant/component/grantMenu.vue index 62d6c199..2d10b825 100644 --- a/Web/src/views/system/tenant/component/grantMenu.vue +++ b/Web/src/views/system/tenant/component/grantMenu.vue @@ -91,7 +91,7 @@ const cancel = () => { // 提交 const submit = async () => { - state.ruleForm.menuIdList = treeRef.value?.getCheckedKeys() as Array; + state.ruleForm.menuIdList = treeRef.value?.getCheckedKeys(true) as Array; await getAPI(SysTenantApi).apiSysTenantGrantMenuPost(state.ruleForm); state.isShowDialog = false; }; From 986de8e331a7cf138917d616d8cf3c69accd0561 Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Thu, 10 Apr 2025 02:58:10 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=98=8E1=E3=80=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E8=A1=8C=E6=94=BF=E5=8C=BA=E5=88=92=EF=BC=88?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=B0=91=E6=94=BF=E9=83=A8=EF=BC=89=20=20=20?= =?UTF-8?q?2=E3=80=81=E5=8D=87=E7=BA=A7=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin.NET.Core/Admin.NET.Core.csproj | 20 ++++---- .../Service/Region/SysRegionService.cs | 48 +++++++++++-------- .../Utils/VerifyFileExtensionName.cs | 2 +- .../Admin.NET.Web.Core.csproj | 2 +- .../Admin.NET.Plugin.ReZero.csproj | 2 +- Web/package.json | 14 +++--- 6 files changed, 49 insertions(+), 39 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj index 295882ec..e840e1cf 100644 --- a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj +++ b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj @@ -22,15 +22,15 @@ - + - - - - + + + + @@ -50,13 +50,13 @@ - + - + @@ -76,9 +76,9 @@ - - - + + + diff --git a/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs b/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs index 0142c165..6996d08e 100644 --- a/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs @@ -187,17 +187,19 @@ public class SysRegionService : IDynamicApiController, ITransient var html = await _httpRemoteService.GetAsStringAsync("http://xzqh.mca.gov.cn/map"); var municipalityList = new List { "北京", "天津", "上海", "重庆" }; - var provList = JSON.Deserialize>>(Regex.Match(html, @"(?<=var json = )(\[\{.*?\}\])(?=;)").Value); - foreach (var dict1 in provList) + var aa = Regex.Match(html, @"(?<=var json = )(\[\{.*?\}\])(?=;)").Value; + dynamic provList = Clay.Parse(aa); + + var list = new List(); + foreach (var proItem in provList) { - var list = new List(); - var provName = dict1.GetValueOrDefault("shengji"); + var provName = proItem.shengji; var province = new SysRegion { Id = YitIdHelper.NextId(), Name = Regex.Replace(provName, "[((].*?[))]", ""), - Code = dict1.GetValueOrDefault("quHuaDaiMa"), - CityCode = dict1.GetValueOrDefault("quhao"), + Code = proItem.quHuaDaiMa, + CityCode = proItem.quhao, Level = 1, Pid = 0, }; @@ -206,17 +208,17 @@ public class SysRegionService : IDynamicApiController, ITransient if (input.Level <= 1) continue; - var prefList = await GetSelectList(provName); - foreach (var dict2 in prefList) + var cityList = await GetSelectList(provName); + foreach (var cityItem in cityList) { - var prefName = dict2.GetValueOrDefault("diji"); + var cityName = cityItem.diji; var city = new SysRegion { Id = YitIdHelper.NextId(), - Code = dict2.GetValueOrDefault("quHuaDaiMa"), - CityCode = dict2.GetValueOrDefault("quhao"), + Code = cityItem.quHuaDaiMa, + CityCode = cityItem.quhao, Pid = province.Id, - Name = prefName, + Name = cityName, Level = 2 }; if (municipalityList.Any(m => city.Name.StartsWith(m))) city.Name += "(地)"; @@ -224,23 +226,31 @@ public class SysRegionService : IDynamicApiController, ITransient if (input.Level <= 2) continue; - var countyList = await GetSelectList(provName, prefName); - foreach (var dict3 in countyList) + var countyList = await GetSelectList(provName, cityName); + foreach (var countyItem in countyList) { - var countyName = dict3.GetValueOrDefault("xianji"); + var countyName = countyItem.xianji; var county = new SysRegion { Id = YitIdHelper.NextId(), - Code = dict3.GetValueOrDefault("quHuaDaiMa"), - CityCode = dict3.GetValueOrDefault("quhao"), + Code = countyItem.quHuaDaiMa, + CityCode = countyItem.quhao, Name = countyName, Pid = city.Id, Level = 3 }; + if (city.Code.IsNullOrEmpty()) + { + // 省直辖县级行政单位 节点无Code编码处理 + city.Code = county.Code.Substring(0, 3).PadRight(6, '0'); + } list.Add(county); } } + } + if (list.Count > 0) + { await _sysRegionRep.AsDeleteable().ExecuteCommandAsync(); await _sysRegionRep.Context.Fastest().BulkCopyAsync(list); } @@ -251,14 +261,14 @@ public class SysRegionService : IDynamicApiController, ITransient } // 获取选择数据 - async Task>> GetSelectList(string prov, string prefecture = null) + async Task GetSelectList(string prov, string prefecture = null) { var json = await _httpRemoteService.PostAsStringAsync("http://xzqh.mca.gov.cn/selectJson", builder => builder.SetJsonContent(new { shengji = prov, diji = prefecture, })); - return JSON.Deserialize>>(json); + return Clay.Parse(json); } } diff --git a/Admin.NET/Admin.NET.Core/Utils/VerifyFileExtensionName.cs b/Admin.NET/Admin.NET.Core/Utils/VerifyFileExtensionName.cs index 12c73bbc..2c8e8bee 100644 --- a/Admin.NET/Admin.NET.Core/Utils/VerifyFileExtensionName.cs +++ b/Admin.NET/Admin.NET.Core/Utils/VerifyFileExtensionName.cs @@ -109,7 +109,7 @@ public static class VerifyFileExtensionName foreach (var len in dic) { byte[] b = new byte[len]; - _ = stream.Read(b, 0, b.Length); + stream.ReadExactly(b); // string fileType = System.Text.Encoding.UTF8.GetString(b); string fileKey = GetFileHeader(b); if (DicsExt.ContainsKey(fileKey)) diff --git a/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj b/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj index 30ef2ad4..de625f1e 100644 --- a/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj +++ b/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj @@ -12,7 +12,7 @@ - + diff --git a/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/Admin.NET.Plugin.ReZero.csproj b/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/Admin.NET.Plugin.ReZero.csproj index 2c3486b7..1c792dc6 100644 --- a/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/Admin.NET.Plugin.ReZero.csproj +++ b/Admin.NET/Plugins/Admin.NET.Plugin.ReZero/Admin.NET.Plugin.ReZero.csproj @@ -26,7 +26,7 @@ - + diff --git a/Web/package.json b/Web/package.json index 1eefec74..85da970c 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.04.05", + "lastBuildTime": "2025.04.10", "description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架", "author": "zuohuaijun", "license": "MIT", @@ -25,7 +25,7 @@ "@vue-office/docx": "^1.6.2", "@vue-office/excel": "^1.7.14", "@vue-office/pdf": "^2.0.9", - "@vueuse/core": "^13.0.0", + "@vueuse/core": "^13.1.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.12", "animate.css": "^4.1.1", @@ -53,7 +53,7 @@ "mqtt": "^5.10.4", "nprogress": "^0.2.0", "ol": "^10.5.0", - "pinia": "^3.0.1", + "pinia": "^3.0.2", "print-js": "^1.6.0", "push.js": "^1.0.12", "qrcodejs2-fixes": "^0.0.2", @@ -77,7 +77,7 @@ "vue-signature-pad": "^3.0.2", "vue3-flag-icons": "^0.0.3", "vue3-tree-org": "^4.2.2", - "vxe-pc-ui": "^4.5.12", + "vxe-pc-ui": "^4.5.16", "vxe-table": "^4.12.5", "vxe-table-plugin-element": "^4.0.4", "vxe-table-plugin-export-xlsx": "^4.0.7", @@ -91,8 +91,8 @@ "@types/node": "^20.17.30", "@types/nprogress": "^0.2.3", "@types/sortablejs": "^1.15.8", - "@typescript-eslint/eslint-plugin": "^8.29.0", - "@typescript-eslint/parser": "^8.29.0", + "@typescript-eslint/eslint-plugin": "^8.29.1", + "@typescript-eslint/parser": "^8.29.1", "@vitejs/plugin-vue": "^5.2.3", "@vitejs/plugin-vue-jsx": "^4.1.2", "@vue/compiler-sfc": "^3.5.13", @@ -101,7 +101,7 @@ "eslint-plugin-vue": "^10.0.0", "globals": "^16.0.0", "less": "^4.3.0", - "openapi-ts-request": "^1.3.0", + "openapi-ts-request": "^1.3.1", "prettier": "^3.5.3", "rollup-plugin-visualizer": "^5.14.0", "sass": "^1.86.3", From 6b2adaf13be4c7cb87bc2ebc796be0caec83f843 Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Thu, 10 Apr 2025 03:01:35 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=98=8E=E6=81=A2=E5=A4=8D=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE=E8=BD=AC=E5=AD=97=E5=85=B8=E5=85=A5=E5=BA=93=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=EF=BC=88=E5=85=BC=E5=AE=B9=E8=BE=BE=E6=A2=A6=E5=92=8C?= =?UTF-8?q?oracle=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Enum/SysEnumService.cs | 31 ++++++++++++------- .../Service/Region/SysRegionService.cs | 4 +-- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/Service/Enum/SysEnumService.cs b/Admin.NET/Admin.NET.Core/Service/Enum/SysEnumService.cs index 297bf699..0a76b4a3 100644 --- a/Admin.NET/Admin.NET.Core/Service/Enum/SysEnumService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Enum/SysEnumService.cs @@ -123,22 +123,31 @@ public class SysEnumService : IDynamicApiController, ITransient var newEnumType = enumTypeList.Where(u => !updatedEnumCodes.Contains(u.TypeName)).ToList(); var (newDictTypes, newDictDatas) = GetNewSysDicts(newEnumType); - // 需要更新的字典类型 + // 执行数据库操作 if (updatedDictTypes.Count > 0) - await _db.Fastest().PageSize(300).BulkMergeAsync(updatedDictTypes); - // 需要更新的字典数据 - if (updatedDictDatas.Count > 0) - await _db.Fastest().PageSize(300).BulkMergeAsync(updatedDictDatas); + await _db.Updateable(updatedDictTypes).ExecuteCommandAsync(); + + if (updatedDictDatas.Count > 0) + await _db.Updateable(updatedDictDatas).ExecuteCommandAsync(); - // 需要新增的字典数据 if (newSysDictDatas.Count > 0) - await _db.Fastest().PageSize(300).BulkMergeAsync(newSysDictDatas); - // 需要新增的字典类型 + { + // 达梦:用db.Insertable(newDictTypes).ExecuteCommandAsync(stoppingToken);插入400条以上会内容溢出错误,所以改用逐条插入 + // 达梦:不支持storageable2.BulkUpdateAsync 功能 + foreach (var dd in newSysDictDatas) + await _db.Insertable(dd).ExecuteCommandAsync(); + } + if (newDictTypes.Count > 0) - await _db.Fastest().PageSize(300).BulkMergeAsync(newDictTypes); - // 需要新增的字典数据 + await _db.Insertable(newDictTypes).ExecuteCommandAsync(); + if (newDictDatas.Count > 0) - await _db.Fastest().PageSize(300).BulkMergeAsync(newDictDatas); + { + // 达梦:用db.Insertable(newDictTypes).ExecuteCommandAsync(stoppingToken);插入400条以上会内容溢出错误,所以改用逐条插入 + // 达梦:不支持storageable2.BulkUpdateAsync 功能 + foreach (var dd in newDictDatas) + await _db.Insertable(dd).ExecuteCommandAsync(); + } } /// diff --git a/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs b/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs index 6996d08e..7ac36a62 100644 --- a/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs @@ -187,8 +187,8 @@ public class SysRegionService : IDynamicApiController, ITransient var html = await _httpRemoteService.GetAsStringAsync("http://xzqh.mca.gov.cn/map"); var municipalityList = new List { "北京", "天津", "上海", "重庆" }; - var aa = Regex.Match(html, @"(?<=var json = )(\[\{.*?\}\])(?=;)").Value; - dynamic provList = Clay.Parse(aa); + var proJson = Regex.Match(html, @"(?<=var json = )(\[\{.*?\}\])(?=;)").Value; + dynamic provList = Clay.Parse(proJson); var list = new List(); foreach (var proItem in provList)