😎1、调整站内信接口 2、优化文件权限相关

This commit is contained in:
zuohuaijun 2024-08-14 01:16:05 +08:00
parent b1fbd40745
commit 8e81bad181
17 changed files with 88 additions and 166 deletions

View File

@ -17,7 +17,7 @@
<PackageReference Include="AngleSharp" Version="1.1.2" /> <PackageReference Include="AngleSharp" Version="1.1.2" />
<PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.0" /> <PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.0" />
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" /> <PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.15.0" /> <PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.15.1" />
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.2" /> <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.5.2" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.2" /> <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.5.2" />
<PackageReference Include="Furion.Pure" Version="4.9.5.2" /> <PackageReference Include="Furion.Pure" Version="4.9.5.2" />
@ -39,7 +39,7 @@
<PackageReference Include="SqlSugarCore" Version="5.1.4.166" /> <PackageReference Include="SqlSugarCore" Version="5.1.4.166" />
<PackageReference Include="SSH.NET" Version="2024.1.0" /> <PackageReference Include="SSH.NET" Version="2024.1.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.4" /> <PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.4" />
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1066" /> <PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1067" />
<PackageReference Include="UAParser" Version="3.1.47" /> <PackageReference Include="UAParser" Version="3.1.47" />
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" /> <PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
</ItemGroup> </ItemGroup>

View File

@ -104,8 +104,8 @@ public partial class SysFile : EntityBaseData
/// <summary> /// <summary>
/// 是否公开 /// 是否公开
/// 如果设置true所有人都可以查看,默认只有自己或有权限的可以查看 /// 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "是否公开", DefaultValue = "false")] [SugarColumn(ColumnDescription = "是否公开")]
public bool IsPublic { get; set; } = false; public bool IsPublic { get; set; } = false;
} }

View File

@ -74,7 +74,6 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData<SysMenu>
new SysMenu{ Id=1310000000174, Pid=1310000000171, Title="增加", Permission="sysNotice/add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1310000000174, Pid=1310000000171, Title="增加", Permission="sysNotice/add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
new SysMenu{ Id=1310000000175, Pid=1310000000171, Title="删除", Permission="sysNotice/delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1310000000175, Pid=1310000000171, Title="删除", Permission="sysNotice/delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
new SysMenu{ Id=1310000000176, Pid=1310000000171, Title="发布", Permission="sysNotice/public", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1310000000176, Pid=1310000000171, Title="发布", Permission="sysNotice/public", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
new SysMenu{ Id=1310000000177, Pid=1310000000171, Title="撤回", Permission="sysNotice/cancel", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
new SysMenu{ Id=1310000000181, Pid=1310000000101, Title="三方账号", Path="/system/oAuthUser", Name="sysOAuthUser", Component="/system/oAuthUser/index",Icon="ele-ChatDotRound", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=160 }, new SysMenu{ Id=1310000000181, Pid=1310000000101, Title="三方账号", Path="/system/oAuthUser", Name="sysOAuthUser", Component="/system/oAuthUser/index",Icon="ele-ChatDotRound", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=160 },
new SysMenu{ Id=1310000000182, Pid=1310000000181, Title="查询", Permission="sysOAuthUser/page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 }, new SysMenu{ Id=1310000000182, Pid=1310000000181, Title="查询", Permission="sysOAuthUser/page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },

View File

@ -20,7 +20,7 @@ public class FileInput : BaseIdInput
/// <summary> /// <summary>
/// 是否公开 /// 是否公开
/// 如果设置true所有人都可以查看,默认只有自己或有权限的可以查看 /// 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
/// </summary> /// </summary>
public bool IsPublic { get; set; } public bool IsPublic { get; set; }

View File

@ -44,12 +44,13 @@ public class SysFileService : IDynamicApiController, ITransient
[DisplayName("获取文件分页列表")] [DisplayName("获取文件分页列表")]
public async Task<SqlSugarPagedList<SysFile>> Page(PageFileInput input) public async Task<SqlSugarPagedList<SysFile>> Page(PageFileInput input)
{ {
//获取所有公开附件 // 获取所有公开附件
var publicList = _sysFileRep.AsQueryable().ClearFilter().Where(u => u.IsPublic == true); var publicList = _sysFileRep.AsQueryable().ClearFilter().Where(u => u.IsPublic == true);
//获取私有附件 // 获取私有附件
var privateList = _sysFileRep.AsQueryable().Where(u => u.IsPublic == false); var privateList = _sysFileRep.AsQueryable().Where(u => u.IsPublic == false);
//合并公开和私有附件并分页 // 合并公开和私有附件并分页
return await _sysFileRep.Context.UnionAll(publicList, privateList).WhereIF(!string.IsNullOrWhiteSpace(input.FileName), u => u.FileName.Contains(input.FileName.Trim())) return await _sysFileRep.Context.UnionAll(publicList, privateList)
.WhereIF(!string.IsNullOrWhiteSpace(input.FileName), u => u.FileName.Contains(input.FileName.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(input.StartTime.ToString()) && !string.IsNullOrWhiteSpace(input.EndTime.ToString()), .WhereIF(!string.IsNullOrWhiteSpace(input.StartTime.ToString()) && !string.IsNullOrWhiteSpace(input.EndTime.ToString()),
u => u.CreateTime >= input.StartTime && u.CreateTime <= input.EndTime) u => u.CreateTime >= input.StartTime && u.CreateTime <= input.EndTime)
.OrderBy(u => u.CreateTime, OrderByType.Desc) .OrderBy(u => u.CreateTime, OrderByType.Desc)

View File

@ -141,7 +141,7 @@ public class SysNoticeService : IDynamicApiController, ITransient
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[DisplayName("获取接收的通知公告")] [DisplayName("获取接收的通知公告")]
public async Task<SqlSugarPagedList<SysNoticeUser>> GetPageReceived([FromQuery] PageNoticeInput input) public async Task<SqlSugarPagedList<SysNoticeUser>> PageReceived(PageNoticeInput input)
{ {
return await _sysNoticeUserRep.AsQueryable().Includes(u => u.SysNotice) return await _sysNoticeUserRep.AsQueryable().Includes(u => u.SysNotice)
.Where(u => u.UserId == _userManager.UserId) .Where(u => u.UserId == _userManager.UserId)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -2,7 +2,7 @@
"name": "admin.net.pro", "name": "admin.net.pro",
"type": "module", "type": "module",
"version": "2.4.33", "version": "2.4.33",
"lastBuildTime": "2024.08.10", "lastBuildTime": "2024.08.14",
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架", "description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
"author": "zuohuaijun", "author": "zuohuaijun",
"license": "MIT", "license": "MIT",
@ -75,7 +75,7 @@
"vue-router": "^4.4.3", "vue-router": "^4.4.3",
"vue-signature-pad": "^3.0.2", "vue-signature-pad": "^3.0.2",
"vue3-tree-org": "^4.2.2", "vue3-tree-org": "^4.2.2",
"vxe-pc-ui": "^4.0.93", "vxe-pc-ui": "^4.0.94",
"vxe-table": "^4.7.59", "vxe-table": "^4.7.59",
"vxe-table-plugin-element": "^4.0.4", "vxe-table-plugin-element": "^4.0.4",
"vxe-table-plugin-export-xlsx": "^4.0.5", "vxe-table-plugin-export-xlsx": "^4.0.5",
@ -102,7 +102,7 @@
"prettier": "^3.3.3", "prettier": "^3.3.3",
"rollup-plugin-visualizer": "^5.12.0", "rollup-plugin-visualizer": "^5.12.0",
"sass": "^1.77.8", "sass": "^1.77.8",
"terser": "^5.31.5", "terser": "^5.31.6",
"typescript": "^5.5.4", "typescript": "^5.5.4",
"vite": "^5.4.0", "vite": "^5.4.0",
"vite-plugin-cdn-import": "^1.0.1", "vite-plugin-cdn-import": "^1.0.1",

View File

@ -183,7 +183,7 @@ export const SysFileApiAxiosParamCreator = function (configuration?: Configurati
* @param {number} id Id * @param {number} id Id
* @param {string} [fileName] * @param {string} [fileName]
* @param {string} [fileType] * @param {string} [fileType]
* @param {boolean} [isPublic] true * @param {boolean} [isPublic] true则所有人都可以查
* @param {string} [url] Url * @param {string} [url] Url
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
@ -786,7 +786,7 @@ export const SysFileApiFp = function(configuration?: Configuration) {
* @param {number} id Id * @param {number} id Id
* @param {string} [fileName] * @param {string} [fileName]
* @param {string} [fileType] * @param {string} [fileType]
* @param {boolean} [isPublic] true * @param {boolean} [isPublic] true则所有人都可以查
* @param {string} [url] Url * @param {string} [url] Url
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
@ -975,7 +975,7 @@ export const SysFileApiFactory = function (configuration?: Configuration, basePa
* @param {number} id Id * @param {number} id Id
* @param {string} [fileName] * @param {string} [fileName]
* @param {string} [fileType] * @param {string} [fileType]
* @param {boolean} [isPublic] true * @param {boolean} [isPublic] true则所有人都可以查
* @param {string} [url] Url * @param {string} [url] Url
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
@ -1128,7 +1128,7 @@ export class SysFileApi extends BaseAPI {
* @param {number} id Id * @param {number} id Id
* @param {string} [fileName] * @param {string} [fileName]
* @param {string} [fileType] * @param {string} [fileType]
* @param {boolean} [isPublic] true * @param {boolean} [isPublic] true则所有人都可以查
* @param {string} [url] Url * @param {string} [url] Url
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}

View File

@ -22,11 +22,7 @@ import { AdminResultListSysNotice } from '../models';
import { AdminResultSqlSugarPagedListSysNotice } from '../models'; import { AdminResultSqlSugarPagedListSysNotice } from '../models';
import { AdminResultSqlSugarPagedListSysNoticeUser } from '../models'; import { AdminResultSqlSugarPagedListSysNoticeUser } from '../models';
import { DeleteNoticeInput } from '../models'; import { DeleteNoticeInput } from '../models';
import { Filter } from '../models';
import { FilterLogicEnum } from '../models';
import { FilterOperatorEnum } from '../models';
import { NoticeInput } from '../models'; import { NoticeInput } from '../models';
import { NoticeTypeEnum } from '../models';
import { PageNoticeInput } from '../models'; import { PageNoticeInput } from '../models';
import { UpdateNoticeInput } from '../models'; import { UpdateNoticeInput } from '../models';
/** /**
@ -182,25 +178,11 @@ export const SysNoticeApiAxiosParamCreator = function (configuration?: Configura
/** /**
* *
* @summary * @summary
* @param {string} [title] * @param {PageNoticeInput} [body]
* @param {NoticeTypeEnum} [type] 1 2
* @param {number} [page]
* @param {number} [pageSize]
* @param {string} [field]
* @param {string} [order]
* @param {string} [descStr]
* @param {Array<string>} [searchFields]
* @param {string} [searchKeyword]
* @param {string} [keyword]
* @param {FilterLogicEnum} [filterLogic]
* @param {Array<Filter>} [filterFilters]
* @param {string} [filterField]
* @param {FilterOperatorEnum} [filterOperator]
* @param {any} [filterValue]
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
apiSysNoticePageReceivedGet: async (title?: string, type?: NoticeTypeEnum, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, searchFields?: Array<string>, searchKeyword?: string, keyword?: string, filterLogic?: FilterLogicEnum, filterFilters?: Array<Filter>, filterField?: string, filterOperator?: FilterOperatorEnum, filterValue?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => { apiSysNoticePageReceivedPost: async (body?: PageNoticeInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/sysNotice/pageReceived`; const localVarPath = `/api/sysNotice/pageReceived`;
// use dummy base URL string because the URL constructor only accepts absolute URLs. // use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com'); const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@ -208,7 +190,7 @@ export const SysNoticeApiAxiosParamCreator = function (configuration?: Configura
if (configuration) { if (configuration) {
baseOptions = configuration.baseOptions; baseOptions = configuration.baseOptions;
} }
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any; const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any; const localVarQueryParameter = {} as any;
@ -221,65 +203,7 @@ export const SysNoticeApiAxiosParamCreator = function (configuration?: Configura
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
} }
if (title !== undefined) { localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
localVarQueryParameter['Title'] = title;
}
if (type !== undefined) {
localVarQueryParameter['Type'] = type;
}
if (page !== undefined) {
localVarQueryParameter['Page'] = page;
}
if (pageSize !== undefined) {
localVarQueryParameter['PageSize'] = pageSize;
}
if (field !== undefined) {
localVarQueryParameter['Field'] = field;
}
if (order !== undefined) {
localVarQueryParameter['Order'] = order;
}
if (descStr !== undefined) {
localVarQueryParameter['DescStr'] = descStr;
}
if (searchFields) {
localVarQueryParameter['Search.Fields'] = searchFields;
}
if (searchKeyword !== undefined) {
localVarQueryParameter['Search.Keyword'] = searchKeyword;
}
if (keyword !== undefined) {
localVarQueryParameter['Keyword'] = keyword;
}
if (filterLogic !== undefined) {
localVarQueryParameter['Filter.Logic'] = filterLogic;
}
if (filterFilters) {
localVarQueryParameter['Filter.Filters'] = filterFilters;
}
if (filterField !== undefined) {
localVarQueryParameter['Filter.Field'] = filterField;
}
if (filterOperator !== undefined) {
localVarQueryParameter['Filter.Operator'] = filterOperator;
}
if (filterValue !== undefined) {
localVarQueryParameter['Filter.Value'] = filterValue;
}
const query = new URLSearchParams(localVarUrlObj.search); const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) { for (const key in localVarQueryParameter) {
@ -291,6 +215,8 @@ export const SysNoticeApiAxiosParamCreator = function (configuration?: Configura
localVarUrlObj.search = (new URLSearchParams(query)).toString(); localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
return { return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
@ -538,26 +464,12 @@ export const SysNoticeApiFp = function(configuration?: Configuration) {
/** /**
* *
* @summary * @summary
* @param {string} [title] * @param {PageNoticeInput} [body]
* @param {NoticeTypeEnum} [type] 1 2
* @param {number} [page]
* @param {number} [pageSize]
* @param {string} [field]
* @param {string} [order]
* @param {string} [descStr]
* @param {Array<string>} [searchFields]
* @param {string} [searchKeyword]
* @param {string} [keyword]
* @param {FilterLogicEnum} [filterLogic]
* @param {Array<Filter>} [filterFilters]
* @param {string} [filterField]
* @param {FilterOperatorEnum} [filterOperator]
* @param {any} [filterValue]
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
async apiSysNoticePageReceivedGet(title?: string, type?: NoticeTypeEnum, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, searchFields?: Array<string>, searchKeyword?: string, keyword?: string, filterLogic?: FilterLogicEnum, filterFilters?: Array<Filter>, filterField?: string, filterOperator?: FilterOperatorEnum, filterValue?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSqlSugarPagedListSysNoticeUser>>> { async apiSysNoticePageReceivedPost(body?: PageNoticeInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSqlSugarPagedListSysNoticeUser>>> {
const localVarAxiosArgs = await SysNoticeApiAxiosParamCreator(configuration).apiSysNoticePageReceivedGet(title, type, page, pageSize, field, order, descStr, searchFields, searchKeyword, keyword, filterLogic, filterFilters, filterField, filterOperator, filterValue, options); const localVarAxiosArgs = await SysNoticeApiAxiosParamCreator(configuration).apiSysNoticePageReceivedPost(body, options);
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
return axios.request(axiosRequestArgs); return axios.request(axiosRequestArgs);
@ -660,26 +572,12 @@ export const SysNoticeApiFactory = function (configuration?: Configuration, base
/** /**
* *
* @summary * @summary
* @param {string} [title] * @param {PageNoticeInput} [body]
* @param {NoticeTypeEnum} [type] 1 2
* @param {number} [page]
* @param {number} [pageSize]
* @param {string} [field]
* @param {string} [order]
* @param {string} [descStr]
* @param {Array<string>} [searchFields]
* @param {string} [searchKeyword]
* @param {string} [keyword]
* @param {FilterLogicEnum} [filterLogic]
* @param {Array<Filter>} [filterFilters]
* @param {string} [filterField]
* @param {FilterOperatorEnum} [filterOperator]
* @param {any} [filterValue]
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
async apiSysNoticePageReceivedGet(title?: string, type?: NoticeTypeEnum, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, searchFields?: Array<string>, searchKeyword?: string, keyword?: string, filterLogic?: FilterLogicEnum, filterFilters?: Array<Filter>, filterField?: string, filterOperator?: FilterOperatorEnum, filterValue?: any, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSqlSugarPagedListSysNoticeUser>> { async apiSysNoticePageReceivedPost(body?: PageNoticeInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSqlSugarPagedListSysNoticeUser>> {
return SysNoticeApiFp(configuration).apiSysNoticePageReceivedGet(title, type, page, pageSize, field, order, descStr, searchFields, searchKeyword, keyword, filterLogic, filterFilters, filterField, filterOperator, filterValue, options).then((request) => request(axios, basePath)); return SysNoticeApiFp(configuration).apiSysNoticePageReceivedPost(body, options).then((request) => request(axios, basePath));
}, },
/** /**
* *
@ -766,27 +664,13 @@ export class SysNoticeApi extends BaseAPI {
/** /**
* *
* @summary * @summary
* @param {string} [title] * @param {PageNoticeInput} [body]
* @param {NoticeTypeEnum} [type] 1 2
* @param {number} [page]
* @param {number} [pageSize]
* @param {string} [field]
* @param {string} [order]
* @param {string} [descStr]
* @param {Array<string>} [searchFields]
* @param {string} [searchKeyword]
* @param {string} [keyword]
* @param {FilterLogicEnum} [filterLogic]
* @param {Array<Filter>} [filterFilters]
* @param {string} [filterField]
* @param {FilterOperatorEnum} [filterOperator]
* @param {any} [filterValue]
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
* @memberof SysNoticeApi * @memberof SysNoticeApi
*/ */
public async apiSysNoticePageReceivedGet(title?: string, type?: NoticeTypeEnum, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, searchFields?: Array<string>, searchKeyword?: string, keyword?: string, filterLogic?: FilterLogicEnum, filterFilters?: Array<Filter>, filterField?: string, filterOperator?: FilterOperatorEnum, filterValue?: any, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSqlSugarPagedListSysNoticeUser>> { public async apiSysNoticePageReceivedPost(body?: PageNoticeInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSqlSugarPagedListSysNoticeUser>> {
return SysNoticeApiFp(this.configuration).apiSysNoticePageReceivedGet(title, type, page, pageSize, field, order, descStr, searchFields, searchKeyword, keyword, filterLogic, filterFilters, filterField, filterOperator, filterValue, options).then((request) => request(this.axios, this.basePath)); return SysNoticeApiFp(this.configuration).apiSysNoticePageReceivedPost(body, options).then((request) => request(this.axios, this.basePath));
} }
/** /**
* *

View File

@ -45,7 +45,7 @@ export interface FileInput {
fileType?: string | null; fileType?: string | null;
/** /**
* true * true则所有人都可以查
* *
* @type {boolean} * @type {boolean}
* @memberof FileInput * @memberof FileInput

View File

@ -36,6 +36,14 @@ export interface SysFileUploadFileBody {
*/ */
fileType?: string; fileType?: string;
/**
* true
*
* @type {boolean}
* @memberof SysFileUploadFileBody
*/
isPublic?: boolean;
/** /**
* *
* *

View File

@ -84,6 +84,22 @@ export interface SysFile {
*/ */
isDelete?: boolean; isDelete?: boolean;
/**
* Id
*
* @type {number}
* @memberof SysFile
*/
createOrgId?: number | null;
/**
*
*
* @type {string}
* @memberof SysFile
*/
createOrgName?: string | null;
/** /**
* *
* *
@ -187,4 +203,12 @@ export interface SysFile {
* @memberof SysFile * @memberof SysFile
*/ */
fileType?: string | null; fileType?: string | null;
/**
* true则所有人都可以查看
*
* @type {boolean}
* @memberof SysFile
*/
isPublic?: boolean;
} }

View File

@ -59,4 +59,12 @@ export interface UploadFileFromBase64Input {
* @memberof UploadFileFromBase64Input * @memberof UploadFileFromBase64Input
*/ */
fileType?: string | null; fileType?: string | null;
/**
* true
*
* @type {boolean}
* @memberof UploadFileFromBase64Input
*/
isPublic?: boolean;
} }

View File

@ -5,7 +5,7 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col class="mb5" :xs="24" :sm="12" :md="8" :lg="6" :xl="6"> <el-col class="mb5" :xs="24" :sm="12" :md="8" :lg="6" :xl="6">
<el-form-item label="标题" prop="title"> <el-form-item label="标题" prop="title">
<el-input v-model="state.queryParams.title" placeholder="标题" clearable @keyup.enter.native="handleQuery(true)" /> <el-input v-model="state.queryParams.title" placeholder="标题" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col class="mb5" :xs="24" :sm="12" :md="8" :lg="6" :xl="6"> <el-col class="mb5" :xs="24" :sm="12" :md="8" :lg="6" :xl="6">
@ -24,7 +24,7 @@
<el-row> <el-row>
<el-col> <el-col>
<el-button-group> <el-button-group>
<el-button type="primary" icon="ele-Search" @click="handleQuery(true)" :loading="options.loading"> 查询 </el-button> <el-button type="primary" icon="ele-Search" @click="handleQuery" :loading="options.loading"> 查询 </el-button>
<el-button icon="ele-Refresh" @click="resetQuery" :loading="options.loading"> 重置 </el-button> <el-button icon="ele-Refresh" @click="resetQuery" :loading="options.loading"> 重置 </el-button>
</el-button-group> </el-button-group>
</el-col> </el-col>
@ -142,7 +142,7 @@ onMounted(() => {
// api // api
const handleQueryApi = async (page: VxeGridPropTypes.ProxyAjaxQueryPageParams, sort: VxeGridPropTypes.ProxyAjaxQuerySortCheckedParams) => { const handleQueryApi = async (page: VxeGridPropTypes.ProxyAjaxQueryPageParams, sort: VxeGridPropTypes.ProxyAjaxQuerySortCheckedParams) => {
const params = Object.assign(state.queryParams, { page: page.currentPage, pageSize: page.pageSize, field: sort.field, order: sort.order, descStr: 'desc' }) as PageNoticeInput; const params = Object.assign(state.queryParams, { page: page.currentPage, pageSize: page.pageSize, field: sort.field, order: sort.order, descStr: 'desc' }) as PageNoticeInput;
return getAPI(SysNoticeApi).apiSysNoticePageReceivedGet(params); return getAPI(SysNoticeApi).apiSysNoticePageReceivedPost(params);
}; };
// //

View File

@ -32,7 +32,7 @@
<vxe-grid ref="xGridDictType" class="xGrid-style" v-bind="optionsDictType" v-on="gridEventsDictType" @cell-click="handleDictData"> <vxe-grid ref="xGridDictType" class="xGrid-style" v-bind="optionsDictType" v-on="gridEventsDictType" @cell-click="handleDictData">
<template #toolbar_buttons> <template #toolbar_buttons>
<el-icon size="16" style="margin-right: 3px; margin-top: 2px; display: inline; vertical-align: middle"><ele-Collection /></el-icon> <el-icon size="16" style="margin-right: 3px; margin-top: 2px; display: inline; vertical-align: middle"><ele-Collection /></el-icon>
<el-button type="primary" style="margin-left: 10px" icon="ele-Plus" @click="handleAdd" v-auth="'sysDictType/add'"> 新增 </el-button> <el-button type="primary" style="margin-left: 20px" icon="ele-Plus" @click="handleAdd" v-auth="'sysDictType/add'"> 新增 </el-button>
</template> </template>
<template #toolbar_tools> </template> <template #toolbar_tools> </template>
<template #empty> <template #empty>
@ -88,7 +88,7 @@
<vxe-grid ref="xGridDictData" class="xGrid-style" v-bind="optionsDictData" v-on="gridEventsDictData"> <vxe-grid ref="xGridDictData" class="xGrid-style" v-bind="optionsDictData" v-on="gridEventsDictData">
<template #toolbar_buttons> <template #toolbar_buttons>
<el-icon size="16" style="margin-right: 3px; margin-top: 2px; display: inline; vertical-align: middle"><ele-Collection /></el-icon> <el-icon size="16" style="margin-right: 3px; margin-top: 2px; display: inline; vertical-align: middle"><ele-Collection /></el-icon>
<el-button type="primary" style="margin-left: 10px" icon="ele-Plus" @click="handleAddDictData" v-auth="'sysDictType/add'"> 新增 </el-button> <el-button type="primary" style="margin-left: 20px" icon="ele-Plus" @click="handleAddDictData" v-auth="'sysDictType/add'"> 新增 </el-button>
</template> </template>
<template #toolbar_tools> </template> <template #toolbar_tools> </template>
<template #empty> <template #empty>

View File

@ -97,7 +97,6 @@
<el-radio :value="true"></el-radio> <el-radio :value="true"></el-radio>
</el-radio-group> </el-radio-group>
<el-upload ref="uploadRef" drag :auto-upload="false" :limit="1" :file-list="state.fileList" action="" :on-change="handleChange" accept=".jpg,.png,.bmp,.gif,.txt,.pdf,.xlsx,.docx"> <el-upload ref="uploadRef" drag :auto-upload="false" :limit="1" :file-list="state.fileList" action="" :on-change="handleChange" accept=".jpg,.png,.bmp,.gif,.txt,.pdf,.xlsx,.docx">
<el-icon class="el-icon--upload"> <el-icon class="el-icon--upload">
<ele-UploadFilled /> <ele-UploadFilled />
@ -133,7 +132,6 @@
<script lang="ts" setup name="sysFile"> <script lang="ts" setup name="sysFile">
import { onMounted, reactive, ref } from 'vue'; import { onMounted, reactive, ref } from 'vue';
import { ElMessageBox, ElMessage, UploadInstance } from 'element-plus'; import { ElMessageBox, ElMessage, UploadInstance } from 'element-plus';
import { auth } from '/@/utils/authFunction';
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table'; import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook'; import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
import { Local } from '/@/utils/storage'; import { Local } from '/@/utils/storage';
@ -176,7 +174,7 @@ const state = reactive({
pdfUrl: '', pdfUrl: '',
fileName: '', fileName: '',
fileType: '', fileType: '',
isPublic:false, isPublic: false,
previewList: [] as string[], previewList: [] as string[],
}); });
@ -250,7 +248,7 @@ const resetQuery = async () => {
const showUpload = () => { const showUpload = () => {
state.fileList = []; state.fileList = [];
state.visible = true; state.visible = true;
state.isPublic=false; state.isPublic = false;
}; };
// onChanne // onChanne
@ -261,7 +259,7 @@ const handleChange = (file: any, fileList: []) => {
// //
const handleUpload = async () => { const handleUpload = async () => {
if (state.fileList.length < 1) return; if (state.fileList.length < 1) return;
await getAPI(SysFileApi).apiSysFileUploadFilePostForm(state.fileList[0].raw, state.fileType, state.isPublic,undefined); await getAPI(SysFileApi).apiSysFileUploadFilePostForm(state.fileList[0].raw, state.fileType, state.isPublic, undefined);
handleQuery(); handleQuery();
ElMessage.success('上传成功'); ElMessage.success('上传成功');
state.visible = false; state.visible = false;