merge upstream

This commit is contained in:
Junong 2025-04-10 09:05:14 +08:00
commit 7f7fd003ff
13 changed files with 82 additions and 56 deletions

View File

@ -22,15 +22,15 @@
<ItemGroup>
<PackageReference Include="AlibabaCloud.SDK.Dysmsapi20170525" Version="3.1.2" />
<PackageReference Include="AlipaySDKNet.Standard" Version="4.9.448" />
<PackageReference Include="AlipaySDKNet.Standard" Version="4.9.481" />
<PackageReference Include="AngleSharp" Version="1.2.0" />
<PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.0" />
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
<PackageReference Include="BouncyCastle.Cryptography" Version="2.5.1" Aliases="BouncyCastleV2" />
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.17.3" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.7.38" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.7.38" />
<PackageReference Include="Furion.Pure" Version="4.9.7.38" />
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.17.4" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.7.39" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.7.39" />
<PackageReference Include="Furion.Pure" Version="4.9.7.39" />
<PackageReference Include="Hardware.Info" Version="101.0.1" />
<PackageReference Include="Hashids.net" Version="1.7.0" />
<PackageReference Include="IPTools.China" Version="1.6.0" />
@ -50,13 +50,13 @@
<PackageReference Include="QRCoder" Version="1.6.0" />
<PackageReference Include="RabbitMQ.Client" Version="7.1.2" />
<PackageReference Include="SixLabors.ImageSharp.Web" Version="3.1.4" />
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="3.7.0" />
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="3.8.0" />
<PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="3.11.0" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.188" />
<PackageReference Include="SSH.NET" Version="2024.2.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.6.0.2" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1216" />
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1217" />
<PackageReference Include="UAParser" Version="3.1.47" />
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
</ItemGroup>
@ -76,9 +76,9 @@
<PackageReference Include="AspNet.Security.OAuth.Gitee" Version="9.2.0" />
<PackageReference Include="AspNet.Security.OAuth.Weixin" Version="9.2.0" />
<PackageReference Include="Lazy.Captcha.Core" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="9.0.3" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.3" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="9.0.3" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="9.0.4" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.4" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="9.0.4" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.5.0" />
<PackageReference Include="My.Extensions.Localization.Json" Version="3.4.0" />
</ItemGroup>

View File

@ -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<SysDictType>().PageSize(300).BulkMergeAsync(updatedDictTypes);
// 需要更新的字典数据
if (updatedDictDatas.Count > 0)
await _db.Fastest<SysDictData>().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<SysDictData>().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<SysDictType>().PageSize(300).BulkMergeAsync(newDictTypes);
// 需要新增的字典数据
await _db.Insertable(newDictTypes).ExecuteCommandAsync();
if (newDictDatas.Count > 0)
await _db.Fastest<SysDictData>().PageSize(300).BulkMergeAsync(newDictDatas);
{
// 达梦用db.Insertable(newDictTypes).ExecuteCommandAsync(stoppingToken)插入400条以上会内容溢出错误所以改用逐条插入
// 达梦不支持storageable2.BulkUpdateAsync 功能
foreach (var dd in newDictDatas)
await _db.Insertable(dd).ExecuteCommandAsync();
}
}
/// <summary>

View File

@ -187,17 +187,19 @@ public class SysRegionService : IDynamicApiController, ITransient
var html = await _httpRemoteService.GetAsStringAsync("http://xzqh.mca.gov.cn/map");
var municipalityList = new List<string> { "北京", "天津", "上海", "重庆" };
var provList = JSON.Deserialize<List<Dictionary<string, string>>>(Regex.Match(html, @"(?<=var json = )(\[\{.*?\}\])(?=;)").Value);
foreach (var dict1 in provList)
var proJson = Regex.Match(html, @"(?<=var json = )(\[\{.*?\}\])(?=;)").Value;
dynamic provList = Clay.Parse(proJson);
var list = new List<SysRegion>();
foreach (var proItem in provList)
{
var list = new List<SysRegion>();
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<SysRegion>().BulkCopyAsync(list);
}
@ -251,14 +261,14 @@ public class SysRegionService : IDynamicApiController, ITransient
}
// 获取选择数据
async Task<List<Dictionary<string, string>>> GetSelectList(string prov, string prefecture = null)
async Task<Clay> 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<List<Dictionary<string, string>>>(json);
return Clay.Parse(json);
}
}

View File

@ -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))

View File

@ -12,7 +12,7 @@
<ItemGroup>
<PackageReference Include="IGeekFan.AspNetCore.Knife4jUI" Version="0.0.16" />
<PackageReference Include="MQTTnet.AspNetCore" Version="5.0.1.1416" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="9.0.3" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="9.0.4" />
</ItemGroup>
<ItemGroup>

View File

@ -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,
}
}
}
},

View File

@ -26,7 +26,7 @@
<ItemGroup>
<PackageReference Include="DocumentFormat.OpenXml" Version="3.3.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.13.0" />
<PackageReference Include="Rezero.Api" Version="1.8.5" />
<PackageReference Include="Rezero.Api" Version="1.8.7" />
</ItemGroup>
<ItemGroup>

View File

@ -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",

View File

@ -70,7 +70,7 @@
</vxe-grid>
</el-card>
<EditMenu ref="editMenuRef" :title="state.title" :menuData="state.menuData" @handleQuery="handleQuery" />
<EditMenu ref="editMenuRef" :title="state.title" :menuData="state.menuData" @handleQuery="handleQuery(false)" />
</div>
</template>
@ -131,7 +131,11 @@ const options = useVxeTable<SysMenu>(
//
toolbarConfig: { export: false },
//
treeConfig: { expandAll: false },
treeConfig: { expandAll: false, reserve: true },
//
rowConfig: {
keyField: 'id',
},
}
);

View File

@ -134,7 +134,7 @@ const cancel = () => {
//
const submit = async () => {
state.ownApiList = treeRef.value?.getCheckedKeys() as Array<string>;
state.ownApiList = treeRef.value?.getCheckedKeys(true) as Array<string>;
await getAPI(SysRoleApi).apiSysRoleGrantApiPost({ id: state.roleId, apiList: state.ownApiList });
cancel();
};

View File

@ -97,7 +97,7 @@ const cancel = () => {
//
const submit = async () => {
state.menuIdList = treeRef.value?.getCheckedKeys() as Array<number>; //.concat(treeRef.value?.getHalfCheckedKeys());
state.menuIdList = treeRef.value?.getCheckedKeys(true) as Array<number>; //.concat(treeRef.value?.getHalfCheckedKeys());
await getAPI(SysRoleApi).apiSysRoleGrantMenuPost({ id: state.roleId, menuIdList: state.menuIdList });
cancel();
};

View File

@ -87,7 +87,7 @@ const cancel = () => {
//
const submit = async () => {
state.tableColumnList = treeRef.value?.getCheckedKeys() as Array<number>; //.concat(treeRef.value?.getHalfCheckedKeys());
state.tableColumnList = treeRef.value?.getCheckedKeys(true) as Array<number>; //.concat(treeRef.value?.getHalfCheckedKeys());
await getAPI(SysRoleApi).apiSysRoleGrantRoleTablePost({ id: state.roleId, tableColumnList: state.tableColumnList });
cancel();
};

View File

@ -91,7 +91,7 @@ const cancel = () => {
//
const submit = async () => {
state.ruleForm.menuIdList = treeRef.value?.getCheckedKeys() as Array<number>;
state.ruleForm.menuIdList = treeRef.value?.getCheckedKeys(true) as Array<number>;
await getAPI(SysTenantApi).apiSysTenantGrantMenuPost(state.ruleForm);
state.isShowDialog = false;
};