😎1、调整站内信接口 2、优化文件权限相关
This commit is contained in:
parent
b1fbd40745
commit
8e81bad181
@ -17,7 +17,7 @@
|
||||
<PackageReference Include="AngleSharp" Version="1.1.2" />
|
||||
<PackageReference Include="AspectCore.Extensions.Reflection" Version="2.4.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.ObjectMapper.Mapster" 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="SSH.NET" Version="2024.1.0" />
|
||||
<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="Yitter.IdGenerator" Version="1.0.14" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -104,8 +104,8 @@ public partial class SysFile : EntityBaseData
|
||||
|
||||
/// <summary>
|
||||
/// 是否公开
|
||||
/// 如果设置true,所有人都可以查看,默认只有自己或有权限的人可以查看
|
||||
/// 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否公开", DefaultValue = "false")]
|
||||
[SugarColumn(ColumnDescription = "是否公开")]
|
||||
public bool IsPublic { get; set; } = false;
|
||||
}
|
||||
@ -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=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=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=1310000000182, Pid=1310000000181, Title="查询", Permission="sysOAuthUser/page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
|
||||
@ -20,7 +20,7 @@ public class FileInput : BaseIdInput
|
||||
|
||||
/// <summary>
|
||||
/// 是否公开
|
||||
/// 如果设置true,所有人都可以查看,默认只有自己或有权限的人可以查看
|
||||
/// 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
|
||||
/// </summary>
|
||||
public bool IsPublic { get; set; }
|
||||
|
||||
|
||||
@ -44,16 +44,17 @@ public class SysFileService : IDynamicApiController, ITransient
|
||||
[DisplayName("获取文件分页列表")]
|
||||
public async Task<SqlSugarPagedList<SysFile>> Page(PageFileInput input)
|
||||
{
|
||||
//获取所有公开附件
|
||||
// 获取所有公开附件
|
||||
var publicList = _sysFileRep.AsQueryable().ClearFilter().Where(u => u.IsPublic == true);
|
||||
//获取私有附件
|
||||
// 获取私有附件
|
||||
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()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.StartTime.ToString()) && !string.IsNullOrWhiteSpace(input.EndTime.ToString()),
|
||||
// 合并公开和私有附件并分页
|
||||
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()),
|
||||
u => u.CreateTime >= input.StartTime && u.CreateTime <= input.EndTime)
|
||||
.OrderBy(u => u.CreateTime, OrderByType.Desc)
|
||||
.ToPagedListAsync(input.Page, input.PageSize);
|
||||
.OrderBy(u => u.CreateTime, OrderByType.Desc)
|
||||
.ToPagedListAsync(input.Page, input.PageSize);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -141,7 +141,7 @@ public class SysNoticeService : IDynamicApiController, ITransient
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[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)
|
||||
.Where(u => u.UserId == _userManager.UserId)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.6 KiB |
@ -2,7 +2,7 @@
|
||||
"name": "admin.net.pro",
|
||||
"type": "module",
|
||||
"version": "2.4.33",
|
||||
"lastBuildTime": "2024.08.10",
|
||||
"lastBuildTime": "2024.08.14",
|
||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||
"author": "zuohuaijun",
|
||||
"license": "MIT",
|
||||
@ -75,7 +75,7 @@
|
||||
"vue-router": "^4.4.3",
|
||||
"vue-signature-pad": "^3.0.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-plugin-element": "^4.0.4",
|
||||
"vxe-table-plugin-export-xlsx": "^4.0.5",
|
||||
@ -102,7 +102,7 @@
|
||||
"prettier": "^3.3.3",
|
||||
"rollup-plugin-visualizer": "^5.12.0",
|
||||
"sass": "^1.77.8",
|
||||
"terser": "^5.31.5",
|
||||
"terser": "^5.31.6",
|
||||
"typescript": "^5.5.4",
|
||||
"vite": "^5.4.0",
|
||||
"vite-plugin-cdn-import": "^1.0.1",
|
||||
|
||||
@ -183,7 +183,7 @@ export const SysFileApiAxiosParamCreator = function (configuration?: Configurati
|
||||
* @param {number} id 主键Id
|
||||
* @param {string} [fileName] 文件名称
|
||||
* @param {string} [fileType] 文件类型
|
||||
* @param {boolean} [isPublic] 是否公开 如果设置true,所有人都可以查看,默认只有自己或有权限的人可以查看
|
||||
* @param {boolean} [isPublic] 是否公开 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
|
||||
* @param {string} [url] 文件Url
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -786,7 +786,7 @@ export const SysFileApiFp = function(configuration?: Configuration) {
|
||||
* @param {number} id 主键Id
|
||||
* @param {string} [fileName] 文件名称
|
||||
* @param {string} [fileType] 文件类型
|
||||
* @param {boolean} [isPublic] 是否公开 如果设置true,所有人都可以查看,默认只有自己或有权限的人可以查看
|
||||
* @param {boolean} [isPublic] 是否公开 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
|
||||
* @param {string} [url] 文件Url
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -975,7 +975,7 @@ export const SysFileApiFactory = function (configuration?: Configuration, basePa
|
||||
* @param {number} id 主键Id
|
||||
* @param {string} [fileName] 文件名称
|
||||
* @param {string} [fileType] 文件类型
|
||||
* @param {boolean} [isPublic] 是否公开 如果设置true,所有人都可以查看,默认只有自己或有权限的人可以查看
|
||||
* @param {boolean} [isPublic] 是否公开 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
|
||||
* @param {string} [url] 文件Url
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -1128,7 +1128,7 @@ export class SysFileApi extends BaseAPI {
|
||||
* @param {number} id 主键Id
|
||||
* @param {string} [fileName] 文件名称
|
||||
* @param {string} [fileType] 文件类型
|
||||
* @param {boolean} [isPublic] 是否公开 如果设置true,所有人都可以查看,默认只有自己或有权限的人可以查看
|
||||
* @param {boolean} [isPublic] 是否公开 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
|
||||
* @param {string} [url] 文件Url
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
||||
@ -22,11 +22,7 @@ import { AdminResultListSysNotice } from '../models';
|
||||
import { AdminResultSqlSugarPagedListSysNotice } from '../models';
|
||||
import { AdminResultSqlSugarPagedListSysNoticeUser } from '../models';
|
||||
import { DeleteNoticeInput } from '../models';
|
||||
import { Filter } from '../models';
|
||||
import { FilterLogicEnum } from '../models';
|
||||
import { FilterOperatorEnum } from '../models';
|
||||
import { NoticeInput } from '../models';
|
||||
import { NoticeTypeEnum } from '../models';
|
||||
import { PageNoticeInput } from '../models';
|
||||
import { UpdateNoticeInput } from '../models';
|
||||
/**
|
||||
@ -182,25 +178,11 @@ export const SysNoticeApiAxiosParamCreator = function (configuration?: Configura
|
||||
/**
|
||||
*
|
||||
* @summary 获取接收的通知公告
|
||||
* @param {string} [title] 标题
|
||||
* @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 {PageNoticeInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @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`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
@ -208,7 +190,7 @@ export const SysNoticeApiAxiosParamCreator = function (configuration?: Configura
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
@ -221,65 +203,7 @@ export const SysNoticeApiAxiosParamCreator = function (configuration?: Configura
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
if (title !== undefined) {
|
||||
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;
|
||||
}
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
@ -291,6 +215,8 @@ export const SysNoticeApiAxiosParamCreator = function (configuration?: Configura
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.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 {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
@ -538,26 +464,12 @@ export const SysNoticeApiFp = function(configuration?: Configuration) {
|
||||
/**
|
||||
*
|
||||
* @summary 获取接收的通知公告
|
||||
* @param {string} [title] 标题
|
||||
* @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 {PageNoticeInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @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>>> {
|
||||
const localVarAxiosArgs = await SysNoticeApiAxiosParamCreator(configuration).apiSysNoticePageReceivedGet(title, type, page, pageSize, field, order, descStr, searchFields, searchKeyword, keyword, filterLogic, filterFilters, filterField, filterOperator, filterValue, options);
|
||||
async apiSysNoticePageReceivedPost(body?: PageNoticeInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSqlSugarPagedListSysNoticeUser>>> {
|
||||
const localVarAxiosArgs = await SysNoticeApiAxiosParamCreator(configuration).apiSysNoticePageReceivedPost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -660,26 +572,12 @@ export const SysNoticeApiFactory = function (configuration?: Configuration, base
|
||||
/**
|
||||
*
|
||||
* @summary 获取接收的通知公告
|
||||
* @param {string} [title] 标题
|
||||
* @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 {PageNoticeInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @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>> {
|
||||
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));
|
||||
async apiSysNoticePageReceivedPost(body?: PageNoticeInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSqlSugarPagedListSysNoticeUser>> {
|
||||
return SysNoticeApiFp(configuration).apiSysNoticePageReceivedPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -766,27 +664,13 @@ export class SysNoticeApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary 获取接收的通知公告
|
||||
* @param {string} [title] 标题
|
||||
* @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 {PageNoticeInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @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>> {
|
||||
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));
|
||||
public async apiSysNoticePageReceivedPost(body?: PageNoticeInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSqlSugarPagedListSysNoticeUser>> {
|
||||
return SysNoticeApiFp(this.configuration).apiSysNoticePageReceivedPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
||||
@ -45,7 +45,7 @@ export interface FileInput {
|
||||
fileType?: string | null;
|
||||
|
||||
/**
|
||||
* 是否公开 如果设置true,所有人都可以查看,默认只有自己或有权限的人可以查看
|
||||
* 是否公开 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof FileInput
|
||||
|
||||
@ -36,6 +36,14 @@ export interface SysFileUploadFileBody {
|
||||
*/
|
||||
fileType?: string;
|
||||
|
||||
/**
|
||||
* 是否公开 如果设置true,所有人都可以查看,默认只有自己或有权限的人可以查看
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysFileUploadFileBody
|
||||
*/
|
||||
isPublic?: boolean;
|
||||
|
||||
/**
|
||||
* 文件路径
|
||||
*
|
||||
|
||||
@ -84,6 +84,22 @@ export interface SysFile {
|
||||
*/
|
||||
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
|
||||
*/
|
||||
fileType?: string | null;
|
||||
|
||||
/**
|
||||
* 是否公开 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysFile
|
||||
*/
|
||||
isPublic?: boolean;
|
||||
}
|
||||
|
||||
@ -59,4 +59,12 @@ export interface UploadFileFromBase64Input {
|
||||
* @memberof UploadFileFromBase64Input
|
||||
*/
|
||||
fileType?: string | null;
|
||||
|
||||
/**
|
||||
* 是否公开 如果设置true,所有人都可以查看,默认只有自己或有权限的人可以查看
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof UploadFileFromBase64Input
|
||||
*/
|
||||
isPublic?: boolean;
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<el-row :gutter="10">
|
||||
<el-col class="mb5" :xs="24" :sm="12" :md="8" :lg="6" :xl="6">
|
||||
<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-col>
|
||||
<el-col class="mb5" :xs="24" :sm="12" :md="8" :lg="6" :xl="6">
|
||||
@ -24,7 +24,7 @@
|
||||
<el-row>
|
||||
<el-col>
|
||||
<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-group>
|
||||
</el-col>
|
||||
@ -142,7 +142,7 @@ onMounted(() => {
|
||||
// 查询api
|
||||
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;
|
||||
return getAPI(SysNoticeApi).apiSysNoticePageReceivedGet(params);
|
||||
return getAPI(SysNoticeApi).apiSysNoticePageReceivedPost(params);
|
||||
};
|
||||
|
||||
// 查询操作
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
<vxe-grid ref="xGridDictType" class="xGrid-style" v-bind="optionsDictType" v-on="gridEventsDictType" @cell-click="handleDictData">
|
||||
<template #toolbar_buttons>
|
||||
<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 #toolbar_tools> </template>
|
||||
<template #empty>
|
||||
@ -88,7 +88,7 @@
|
||||
<vxe-grid ref="xGridDictData" class="xGrid-style" v-bind="optionsDictData" v-on="gridEventsDictData">
|
||||
<template #toolbar_buttons>
|
||||
<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 #toolbar_tools> </template>
|
||||
<template #empty>
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
</template>
|
||||
<template #row_isPublic="{ row }">
|
||||
<el-tag v-if="row.isPublic === true" type="success">是</el-tag>
|
||||
<el-tag v-else type="danger">否</el-tag>
|
||||
<el-tag v-else type="danger">否</el-tag>
|
||||
</template>
|
||||
<template #row_url="{ row }">
|
||||
<el-image
|
||||
@ -92,12 +92,11 @@
|
||||
<el-option label="归档文件" value="归档文件" />
|
||||
</el-select>
|
||||
是否公开:
|
||||
<el-radio-group v-model="state.isPublic">
|
||||
<el-radio-group v-model="state.isPublic">
|
||||
<el-radio :value="false">否</el-radio>
|
||||
<el-radio :value="true">是</el-radio>
|
||||
</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-icon class="el-icon--upload">
|
||||
<ele-UploadFilled />
|
||||
@ -133,7 +132,6 @@
|
||||
<script lang="ts" setup name="sysFile">
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage, UploadInstance } from 'element-plus';
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
@ -176,7 +174,7 @@ const state = reactive({
|
||||
pdfUrl: '',
|
||||
fileName: '',
|
||||
fileType: '',
|
||||
isPublic:false,
|
||||
isPublic: false,
|
||||
previewList: [] as string[],
|
||||
});
|
||||
|
||||
@ -196,7 +194,7 @@ const options = useVxeTable<SysFile>(
|
||||
{ field: 'url', title: '预览', minWidth: 100, slots: { default: 'row_url' } },
|
||||
{ field: 'bucketName', title: '存储位置', minWidth: 180, showOverflow: 'tooltip' },
|
||||
{ field: 'id', title: '存储标识', minWidth: 120, showOverflow: 'tooltip' },
|
||||
{ field: 'isPublic', title: '是否公开', minWidth: 140, showOverflow: 'tooltip', slots: { default: 'row_isPublic' } },
|
||||
{ field: 'isPublic', title: '是否公开', minWidth: 140, showOverflow: 'tooltip', slots: { default: 'row_isPublic' } },
|
||||
{ field: 'fileType', title: '文件类型', minWidth: 140, showOverflow: 'tooltip' },
|
||||
{ field: 'relationName', title: '关联对象名称', minWidth: 150, showOverflow: 'tooltip' },
|
||||
{ field: 'relationId', title: '关联对象ID', minWidth: 150, showOverflow: 'tooltip' },
|
||||
@ -250,7 +248,7 @@ const resetQuery = async () => {
|
||||
const showUpload = () => {
|
||||
state.fileList = [];
|
||||
state.visible = true;
|
||||
state.isPublic=false;
|
||||
state.isPublic = false;
|
||||
};
|
||||
|
||||
// 通过onChanne方法获得文件列表
|
||||
@ -261,7 +259,7 @@ const handleChange = (file: any, fileList: []) => {
|
||||
// 上传
|
||||
const handleUpload = async () => {
|
||||
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();
|
||||
ElMessage.success('上传成功');
|
||||
state.visible = false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user