😎1、增加获取行政区划子树和子列表接口 2、升级依赖
This commit is contained in:
parent
39d8ed7326
commit
1d001d9d72
@ -28,9 +28,9 @@
|
||||
<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.1" />
|
||||
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.7.22" />
|
||||
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.7.22" />
|
||||
<PackageReference Include="Furion.Pure" Version="4.9.7.22" />
|
||||
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.7.23" />
|
||||
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.7.23" />
|
||||
<PackageReference Include="Furion.Pure" Version="4.9.7.23" />
|
||||
<PackageReference Include="Hardware.Info" Version="101.0.1" />
|
||||
<PackageReference Include="Hashids.net" Version="1.7.0" />
|
||||
<PackageReference Include="IPTools.China" Version="1.6.0" />
|
||||
@ -56,7 +56,7 @@
|
||||
<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.1194" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1196" />
|
||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -95,12 +95,12 @@ public class SysOrgService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定层级机构树 🔖
|
||||
/// 获取指定层级机构子树 🔖
|
||||
/// </summary>
|
||||
/// <param name="pid"></param>
|
||||
/// <param name="level"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取指定层级机构树")]
|
||||
[DisplayName("获取指定层级机构子树")]
|
||||
public async Task<List<SysOrg>> GetChildTree(long pid, int level)
|
||||
{
|
||||
var iSugarQueryable = _sysOrgRep.AsQueryable().OrderBy(u => new { u.OrderNo });
|
||||
|
||||
@ -49,6 +49,30 @@ public class SysRegionService : IDynamicApiController, ITransient
|
||||
return await _sysRegionRep.GetListAsync(u => u.Pid == input.Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定层级行政区划子树 🔖
|
||||
/// </summary>
|
||||
/// <param name="pid"></param>
|
||||
/// <param name="level"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取指定层级行政区划子树")]
|
||||
public async Task<List<SysRegion>> GetChildTree(long pid, int level)
|
||||
{
|
||||
var iSugarQueryable = _sysRegionRep.AsQueryable().OrderBy(u => new { u.OrderNo });
|
||||
return await iSugarQueryable.Where(u => u.Level < level).ToTreeAsync(u => u.Children, u => u.Pid, pid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定层级行政区划子列表 🔖
|
||||
/// </summary>
|
||||
/// <param name="pid"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取指定层级行政区划子列表")]
|
||||
public async Task<List<SysRegion>> GetChildList(long pid)
|
||||
{
|
||||
return await _sysRegionRep.AsQueryable().Where(u => u.Pid == pid).OrderBy(u => new { u.OrderNo }).ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询行政区划列表 🔖
|
||||
/// </summary>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "admin.net.pro",
|
||||
"type": "module",
|
||||
"version": "2.4.33",
|
||||
"lastBuildTime": "2025.03.10",
|
||||
"lastBuildTime": "2025.03.12",
|
||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||
"author": "zuohuaijun",
|
||||
"license": "MIT",
|
||||
@ -24,7 +24,7 @@
|
||||
"@vue-office/docx": "^1.6.2",
|
||||
"@vue-office/excel": "^1.7.14",
|
||||
"@vue-office/pdf": "^2.0.9",
|
||||
"@vueuse/core": "^12.8.2",
|
||||
"@vueuse/core": "^13.0.0",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"animate.css": "^4.1.1",
|
||||
@ -76,8 +76,8 @@
|
||||
"vue-signature-pad": "^3.0.2",
|
||||
"vue3-flag-icons": "^0.0.3",
|
||||
"vue3-tree-org": "^4.2.2",
|
||||
"vxe-pc-ui": "^4.4.8",
|
||||
"vxe-table": "^4.11.19",
|
||||
"vxe-pc-ui": "^4.4.9",
|
||||
"vxe-table": "^4.11.20",
|
||||
"vxe-table-plugin-element": "^4.0.4",
|
||||
"vxe-table-plugin-export-xlsx": "^4.0.7",
|
||||
"xe-utils": "^3.7.4",
|
||||
@ -90,12 +90,12 @@
|
||||
"@types/node": "^20.17.24",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@typescript-eslint/eslint-plugin": "^8.26.0",
|
||||
"@typescript-eslint/parser": "^8.26.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.26.1",
|
||||
"@typescript-eslint/parser": "^8.26.1",
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
||||
"@vue/compiler-sfc": "^3.5.13",
|
||||
"code-inspector-plugin": "^0.20.2",
|
||||
"code-inspector-plugin": "^0.20.3",
|
||||
"eslint": "^9.22.0",
|
||||
"eslint-plugin-vue": "^10.0.0",
|
||||
"globals": "^16.0.0",
|
||||
|
||||
@ -78,7 +78,7 @@ export const SysOrgApiAxiosParamCreator = function (configuration?: Configuratio
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取指定层级机构树 🔖
|
||||
* @summary 获取指定层级机构子树 🔖
|
||||
* @param {number} pid
|
||||
* @param {number} level
|
||||
* @param {*} [options] Override http request option.
|
||||
@ -319,7 +319,7 @@ export const SysOrgApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取指定层级机构树 🔖
|
||||
* @summary 获取指定层级机构子树 🔖
|
||||
* @param {number} pid
|
||||
* @param {number} level
|
||||
* @param {*} [options] Override http request option.
|
||||
@ -398,7 +398,7 @@ export const SysOrgApiFactory = function (configuration?: Configuration, basePat
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取指定层级机构树 🔖
|
||||
* @summary 获取指定层级机构子树 🔖
|
||||
* @param {number} pid
|
||||
* @param {number} level
|
||||
* @param {*} [options] Override http request option.
|
||||
@ -463,7 +463,7 @@ export class SysOrgApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取指定层级机构树 🔖
|
||||
* @summary 获取指定层级机构子树 🔖
|
||||
* @param {number} pid
|
||||
* @param {number} level
|
||||
* @param {*} [options] Override http request option.
|
||||
|
||||
@ -82,6 +82,110 @@ export const SysRegionApiAxiosParamCreator = function (configuration?: Configura
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取指定层级行政区划子列表 🔖
|
||||
* @param {number} pid
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysRegionChildListPidGet: async (pid: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'pid' is not null or undefined
|
||||
if (pid === null || pid === undefined) {
|
||||
throw new RequiredError('pid','Required parameter pid was null or undefined when calling apiSysRegionChildListPidGet.');
|
||||
}
|
||||
const localVarPath = `/api/sysRegion/childList/{pid}`
|
||||
.replace(`{${"pid"}}`, encodeURIComponent(String(pid)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取指定层级行政区划子树 🔖
|
||||
* @param {number} pid
|
||||
* @param {number} level
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysRegionChildTreePidLevelGet: async (pid: number, level: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'pid' is not null or undefined
|
||||
if (pid === null || pid === undefined) {
|
||||
throw new RequiredError('pid','Required parameter pid was null or undefined when calling apiSysRegionChildTreePidLevelGet.');
|
||||
}
|
||||
// verify required parameter 'level' is not null or undefined
|
||||
if (level === null || level === undefined) {
|
||||
throw new RequiredError('level','Required parameter level was null or undefined when calling apiSysRegionChildTreePidLevelGet.');
|
||||
}
|
||||
const localVarPath = `/api/sysRegion/childTree/{pid}/{level}`
|
||||
.replace(`{${"pid"}}`, encodeURIComponent(String(pid)))
|
||||
.replace(`{${"level"}}`, encodeURIComponent(String(level)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除行政区划 🔖
|
||||
@ -586,6 +690,35 @@ export const SysRegionApiFp = function(configuration?: Configuration) {
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取指定层级行政区划子列表 🔖
|
||||
* @param {number} pid
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRegionChildListPidGet(pid: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListSysRegion>>> {
|
||||
const localVarAxiosArgs = await SysRegionApiAxiosParamCreator(configuration).apiSysRegionChildListPidGet(pid, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取指定层级行政区划子树 🔖
|
||||
* @param {number} pid
|
||||
* @param {number} level
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRegionChildTreePidLevelGet(pid: number, level: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListSysRegion>>> {
|
||||
const localVarAxiosArgs = await SysRegionApiAxiosParamCreator(configuration).apiSysRegionChildTreePidLevelGet(pid, level, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除行政区划 🔖
|
||||
@ -744,6 +877,27 @@ export const SysRegionApiFactory = function (configuration?: Configuration, base
|
||||
async apiSysRegionAddPost(body?: AddRegionInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultInt64>> {
|
||||
return SysRegionApiFp(configuration).apiSysRegionAddPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取指定层级行政区划子列表 🔖
|
||||
* @param {number} pid
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRegionChildListPidGet(pid: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListSysRegion>> {
|
||||
return SysRegionApiFp(configuration).apiSysRegionChildListPidGet(pid, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取指定层级行政区划子树 🔖
|
||||
* @param {number} pid
|
||||
* @param {number} level
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRegionChildTreePidLevelGet(pid: number, level: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListSysRegion>> {
|
||||
return SysRegionApiFp(configuration).apiSysRegionChildTreePidLevelGet(pid, level, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除行政区划 🔖
|
||||
@ -864,6 +1018,29 @@ export class SysRegionApi extends BaseAPI {
|
||||
public async apiSysRegionAddPost(body?: AddRegionInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultInt64>> {
|
||||
return SysRegionApiFp(this.configuration).apiSysRegionAddPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取指定层级行政区划子列表 🔖
|
||||
* @param {number} pid
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysRegionApi
|
||||
*/
|
||||
public async apiSysRegionChildListPidGet(pid: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListSysRegion>> {
|
||||
return SysRegionApiFp(this.configuration).apiSysRegionChildListPidGet(pid, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取指定层级行政区划子树 🔖
|
||||
* @param {number} pid
|
||||
* @param {number} level
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysRegionApi
|
||||
*/
|
||||
public async apiSysRegionChildTreePidLevelGet(pid: number, level: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListSysRegion>> {
|
||||
return SysRegionApiFp(this.configuration).apiSysRegionChildTreePidLevelGet(pid, level, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 删除行政区划 🔖
|
||||
|
||||
Loading…
Reference in New Issue
Block a user