😎完善文件管理功能
This commit is contained in:
parent
5c6cfe079c
commit
8d4bd0854a
@ -28,6 +28,21 @@ public class FileInput : BaseIdInput
|
||||
/// 文件Url
|
||||
/// </summary>
|
||||
public string? Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属实体ID
|
||||
/// </summary>
|
||||
public long BelongId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联对象Id
|
||||
/// </summary>
|
||||
public long RelationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联对象名称
|
||||
/// </summary>
|
||||
public string RelationName { get; set; }
|
||||
}
|
||||
|
||||
public class PageFileInput : BasePageInput
|
||||
@ -84,6 +99,21 @@ public class UploadFileFromBase64Input
|
||||
/// 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
|
||||
/// </summary>
|
||||
public bool IsPublic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属实体ID
|
||||
/// </summary>
|
||||
public long BelongId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联对象Id
|
||||
/// </summary>
|
||||
public long RelationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联对象名称
|
||||
/// </summary>
|
||||
public string RelationName { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -112,6 +142,21 @@ public class FileUploadInput
|
||||
/// 文件路径
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属实体ID
|
||||
/// </summary>
|
||||
public long BelongId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联对象Id
|
||||
/// </summary>
|
||||
public long RelationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联对象名称
|
||||
/// </summary>
|
||||
public string RelationName { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -65,7 +65,7 @@ public class SysFileService : IDynamicApiController, ITransient
|
||||
[DisplayName("上传文件")]
|
||||
public async Task<SysFile> UploadFile([FromForm] FileUploadInput input)
|
||||
{
|
||||
return await HandleUploadFile(input.File, input.Path, fileType: input.FileType, isPublic: input.IsPublic);
|
||||
return await HandleUploadFile(input.File, input.Path, fileType: input.FileType, isPublic: input.IsPublic, belongId: input.BelongId, relationId: input.RelationId, relationName: input.RelationName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -297,8 +297,11 @@ public class SysFileService : IDynamicApiController, ITransient
|
||||
/// <param name="allowSuffix">允许格式:.jpg.png.gif.tif.bmp</param>
|
||||
/// <param name="fileType">类型</param>
|
||||
/// <param name="isPublic">是否公开</param>
|
||||
/// <param name="belongId">所属实体的ID</param>
|
||||
/// <param name="relationName"></param>
|
||||
/// <param name="relationId"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<SysFile> HandleUploadFile(IFormFile file, string savePath, string allowSuffix = "", string fileType = "", bool isPublic = false)
|
||||
private async Task<SysFile> HandleUploadFile(IFormFile file, string savePath, string allowSuffix = "", string fileType = "", bool isPublic = false, long belongId = 0, string relationName = "", long relationId = 0)
|
||||
{
|
||||
if (file == null) throw Oops.Oh(ErrorCodeEnum.D8000);
|
||||
|
||||
@ -364,6 +367,9 @@ public class SysFileService : IDynamicApiController, ITransient
|
||||
FileMd5 = fileMd5,
|
||||
FileType = fileType,
|
||||
IsPublic = isPublic,
|
||||
BelongId = belongId,
|
||||
RelationId = relationId,
|
||||
RelationName = relationName,
|
||||
};
|
||||
|
||||
var finalName = newFile.Id + suffix; // 文件最终名称
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "admin.net.pro",
|
||||
"type": "module",
|
||||
"version": "2.4.33",
|
||||
"lastBuildTime": "2024.10.18",
|
||||
"lastBuildTime": "2024.10.19",
|
||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||
"author": "zuohuaijun",
|
||||
"license": "MIT",
|
||||
@ -20,7 +20,7 @@
|
||||
"@microsoft/signalr": "^8.0.7",
|
||||
"@vue-office/docx": "^1.6.2",
|
||||
"@vue-office/excel": "^1.7.11",
|
||||
"@vue-office/pdf": "^2.0.6",
|
||||
"@vue-office/pdf": "^2.0.7",
|
||||
"@vueuse/core": "^11.1.0",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
@ -33,7 +33,7 @@
|
||||
"echarts": "^5.5.1",
|
||||
"echarts-gl": "^2.0.9",
|
||||
"echarts-wordcloud": "^2.1.0",
|
||||
"element-plus": "^2.8.5",
|
||||
"element-plus": "^2.8.6",
|
||||
"exceljs": "^4.4.0",
|
||||
"ezuikit-js": "^8.0.13-alpha.2",
|
||||
"gcoord": "^1.0.6",
|
||||
@ -71,7 +71,7 @@
|
||||
"vue-router": "^4.4.5",
|
||||
"vue-signature-pad": "^3.0.2",
|
||||
"vue3-tree-org": "^4.2.2",
|
||||
"vxe-pc-ui": "^4.2.23",
|
||||
"vxe-pc-ui": "^4.2.24",
|
||||
"vxe-table": "^4.7.59",
|
||||
"vxe-table-plugin-element": "^4.0.4",
|
||||
"vxe-table-plugin-export-xlsx": "^4.0.7",
|
||||
|
||||
@ -28,21 +28,27 @@ export const SysEmailApiAxiosParamCreator = function (configuration?: Configurat
|
||||
* @summary 发送邮件 📧
|
||||
* @param {string} content
|
||||
* @param {string} title
|
||||
* @param {string} toEmail
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysEmailSendEmailContentTitlePost: async (content: string, title: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
apiSysEmailSendEmailContentTitleToEmailPost: async (content: string, title: string, toEmail: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'content' is not null or undefined
|
||||
if (content === null || content === undefined) {
|
||||
throw new RequiredError('content','Required parameter content was null or undefined when calling apiSysEmailSendEmailContentTitlePost.');
|
||||
throw new RequiredError('content','Required parameter content was null or undefined when calling apiSysEmailSendEmailContentTitleToEmailPost.');
|
||||
}
|
||||
// verify required parameter 'title' is not null or undefined
|
||||
if (title === null || title === undefined) {
|
||||
throw new RequiredError('title','Required parameter title was null or undefined when calling apiSysEmailSendEmailContentTitlePost.');
|
||||
throw new RequiredError('title','Required parameter title was null or undefined when calling apiSysEmailSendEmailContentTitleToEmailPost.');
|
||||
}
|
||||
const localVarPath = `/api/sysEmail/sendEmail/{content}/{title}`
|
||||
// verify required parameter 'toEmail' is not null or undefined
|
||||
if (toEmail === null || toEmail === undefined) {
|
||||
throw new RequiredError('toEmail','Required parameter toEmail was null or undefined when calling apiSysEmailSendEmailContentTitleToEmailPost.');
|
||||
}
|
||||
const localVarPath = `/api/sysEmail/sendEmail/{content}/{title}/{toEmail}`
|
||||
.replace(`{${"content"}}`, encodeURIComponent(String(content)))
|
||||
.replace(`{${"title"}}`, encodeURIComponent(String(title)));
|
||||
.replace(`{${"title"}}`, encodeURIComponent(String(title)))
|
||||
.replace(`{${"toEmail"}}`, encodeURIComponent(String(toEmail)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
@ -92,11 +98,12 @@ export const SysEmailApiFp = function(configuration?: Configuration) {
|
||||
* @summary 发送邮件 📧
|
||||
* @param {string} content
|
||||
* @param {string} title
|
||||
* @param {string} toEmail
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysEmailSendEmailContentTitlePost(content: string, title: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysEmailApiAxiosParamCreator(configuration).apiSysEmailSendEmailContentTitlePost(content, title, options);
|
||||
async apiSysEmailSendEmailContentTitleToEmailPost(content: string, title: string, toEmail: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysEmailApiAxiosParamCreator(configuration).apiSysEmailSendEmailContentTitleToEmailPost(content, title, toEmail, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -116,11 +123,12 @@ export const SysEmailApiFactory = function (configuration?: Configuration, baseP
|
||||
* @summary 发送邮件 📧
|
||||
* @param {string} content
|
||||
* @param {string} title
|
||||
* @param {string} toEmail
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysEmailSendEmailContentTitlePost(content: string, title: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysEmailApiFp(configuration).apiSysEmailSendEmailContentTitlePost(content, title, options).then((request) => request(axios, basePath));
|
||||
async apiSysEmailSendEmailContentTitleToEmailPost(content: string, title: string, toEmail: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysEmailApiFp(configuration).apiSysEmailSendEmailContentTitleToEmailPost(content, title, toEmail, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -137,11 +145,12 @@ export class SysEmailApi extends BaseAPI {
|
||||
* @summary 发送邮件 📧
|
||||
* @param {string} content
|
||||
* @param {string} title
|
||||
* @param {string} toEmail
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysEmailApi
|
||||
*/
|
||||
public async apiSysEmailSendEmailContentTitlePost(content: string, title: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysEmailApiFp(this.configuration).apiSysEmailSendEmailContentTitlePost(content, title, options).then((request) => request(this.axios, this.basePath));
|
||||
public async apiSysEmailSendEmailContentTitleToEmailPost(content: string, title: string, toEmail: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysEmailApiFp(this.configuration).apiSysEmailSendEmailContentTitleToEmailPost(content, title, toEmail, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
@ -185,10 +185,13 @@ export const SysFileApiAxiosParamCreator = function (configuration?: Configurati
|
||||
* @param {string} [fileType] 文件类型
|
||||
* @param {boolean} [isPublic] 是否公开 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
|
||||
* @param {string} [url] 文件Url
|
||||
* @param {number} [belongId] 所属实体ID
|
||||
* @param {number} [relationId] 关联对象Id
|
||||
* @param {string} [relationName] 关联对象名称
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysFileFileGet: async (id: number, fileName?: string, fileType?: string, isPublic?: boolean, url?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
apiSysFileFileGet: async (id: number, fileName?: string, fileType?: string, isPublic?: boolean, url?: string, belongId?: number, relationId?: number, relationName?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysFileFileGet.');
|
||||
@ -229,6 +232,18 @@ export const SysFileApiAxiosParamCreator = function (configuration?: Configurati
|
||||
localVarQueryParameter['Url'] = url;
|
||||
}
|
||||
|
||||
if (belongId !== undefined) {
|
||||
localVarQueryParameter['BelongId'] = belongId;
|
||||
}
|
||||
|
||||
if (relationId !== undefined) {
|
||||
localVarQueryParameter['RelationId'] = relationId;
|
||||
}
|
||||
|
||||
if (relationName !== undefined) {
|
||||
localVarQueryParameter['RelationName'] = relationName;
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameter['Id'] = id;
|
||||
}
|
||||
@ -564,10 +579,13 @@ export const SysFileApiAxiosParamCreator = function (configuration?: Configurati
|
||||
* @param {string} [fileType]
|
||||
* @param {boolean} [isPublic]
|
||||
* @param {string} [path]
|
||||
* @param {number} [belongId]
|
||||
* @param {number} [relationId]
|
||||
* @param {string} [relationName]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysFileUploadFilePostForm: async (file?: Blob, fileType?: string, isPublic?: boolean, path?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
apiSysFileUploadFilePostForm: async (file?: Blob, fileType?: string, isPublic?: boolean, path?: string, belongId?: number, relationId?: number, relationName?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysFile/uploadFile`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
@ -606,6 +624,18 @@ export const SysFileApiAxiosParamCreator = function (configuration?: Configurati
|
||||
localVarFormParams.append('Path', path as any);
|
||||
}
|
||||
|
||||
if (belongId !== undefined) {
|
||||
localVarFormParams.append('BelongId', belongId as any);
|
||||
}
|
||||
|
||||
if (relationId !== undefined) {
|
||||
localVarFormParams.append('RelationId', relationId as any);
|
||||
}
|
||||
|
||||
if (relationName !== undefined) {
|
||||
localVarFormParams.append('RelationName', relationName as any);
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
@ -788,11 +818,14 @@ export const SysFileApiFp = function(configuration?: Configuration) {
|
||||
* @param {string} [fileType] 文件类型
|
||||
* @param {boolean} [isPublic] 是否公开 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
|
||||
* @param {string} [url] 文件Url
|
||||
* @param {number} [belongId] 所属实体ID
|
||||
* @param {number} [relationId] 关联对象Id
|
||||
* @param {string} [relationName] 关联对象名称
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysFileFileGet(id: number, fileName?: string, fileType?: string, isPublic?: boolean, url?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSysFile>>> {
|
||||
const localVarAxiosArgs = await SysFileApiAxiosParamCreator(configuration).apiSysFileFileGet(id, fileName, fileType, isPublic, url, options);
|
||||
async apiSysFileFileGet(id: number, fileName?: string, fileType?: string, isPublic?: boolean, url?: string, belongId?: number, relationId?: number, relationName?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSysFile>>> {
|
||||
const localVarAxiosArgs = await SysFileApiAxiosParamCreator(configuration).apiSysFileFileGet(id, fileName, fileType, isPublic, url, belongId, relationId, relationName, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -892,11 +925,14 @@ export const SysFileApiFp = function(configuration?: Configuration) {
|
||||
* @param {string} [fileType]
|
||||
* @param {boolean} [isPublic]
|
||||
* @param {string} [path]
|
||||
* @param {number} [belongId]
|
||||
* @param {number} [relationId]
|
||||
* @param {string} [relationName]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysFileUploadFilePostForm(file?: Blob, fileType?: string, isPublic?: boolean, path?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSysFile>>> {
|
||||
const localVarAxiosArgs = await SysFileApiAxiosParamCreator(configuration).apiSysFileUploadFilePostForm(file, fileType, isPublic, path, options);
|
||||
async apiSysFileUploadFilePostForm(file?: Blob, fileType?: string, isPublic?: boolean, path?: string, belongId?: number, relationId?: number, relationName?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSysFile>>> {
|
||||
const localVarAxiosArgs = await SysFileApiAxiosParamCreator(configuration).apiSysFileUploadFilePostForm(file, fileType, isPublic, path, belongId, relationId, relationName, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -977,11 +1013,14 @@ export const SysFileApiFactory = function (configuration?: Configuration, basePa
|
||||
* @param {string} [fileType] 文件类型
|
||||
* @param {boolean} [isPublic] 是否公开 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
|
||||
* @param {string} [url] 文件Url
|
||||
* @param {number} [belongId] 所属实体ID
|
||||
* @param {number} [relationId] 关联对象Id
|
||||
* @param {string} [relationName] 关联对象名称
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysFileFileGet(id: number, fileName?: string, fileType?: string, isPublic?: boolean, url?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSysFile>> {
|
||||
return SysFileApiFp(configuration).apiSysFileFileGet(id, fileName, fileType, isPublic, url, options).then((request) => request(axios, basePath));
|
||||
async apiSysFileFileGet(id: number, fileName?: string, fileType?: string, isPublic?: boolean, url?: string, belongId?: number, relationId?: number, relationName?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSysFile>> {
|
||||
return SysFileApiFp(configuration).apiSysFileFileGet(id, fileName, fileType, isPublic, url, belongId, relationId, relationName, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1053,11 +1092,14 @@ export const SysFileApiFactory = function (configuration?: Configuration, basePa
|
||||
* @param {string} [fileType]
|
||||
* @param {boolean} [isPublic]
|
||||
* @param {string} [path]
|
||||
* @param {number} [belongId]
|
||||
* @param {number} [relationId]
|
||||
* @param {string} [relationName]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysFileUploadFilePostForm(file?: Blob, fileType?: string, isPublic?: boolean, path?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSysFile>> {
|
||||
return SysFileApiFp(configuration).apiSysFileUploadFilePostForm(file, fileType, isPublic, path, options).then((request) => request(axios, basePath));
|
||||
async apiSysFileUploadFilePostForm(file?: Blob, fileType?: string, isPublic?: boolean, path?: string, belongId?: number, relationId?: number, relationName?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSysFile>> {
|
||||
return SysFileApiFp(configuration).apiSysFileUploadFilePostForm(file, fileType, isPublic, path, belongId, relationId, relationName, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1130,12 +1172,15 @@ export class SysFileApi extends BaseAPI {
|
||||
* @param {string} [fileType] 文件类型
|
||||
* @param {boolean} [isPublic] 是否公开 若为true则所有人都可以查看,默认只有自己或有权限的可以查看
|
||||
* @param {string} [url] 文件Url
|
||||
* @param {number} [belongId] 所属实体ID
|
||||
* @param {number} [relationId] 关联对象Id
|
||||
* @param {string} [relationName] 关联对象名称
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysFileApi
|
||||
*/
|
||||
public async apiSysFileFileGet(id: number, fileName?: string, fileType?: string, isPublic?: boolean, url?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSysFile>> {
|
||||
return SysFileApiFp(this.configuration).apiSysFileFileGet(id, fileName, fileType, isPublic, url, options).then((request) => request(this.axios, this.basePath));
|
||||
public async apiSysFileFileGet(id: number, fileName?: string, fileType?: string, isPublic?: boolean, url?: string, belongId?: number, relationId?: number, relationName?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSysFile>> {
|
||||
return SysFileApiFp(this.configuration).apiSysFileFileGet(id, fileName, fileType, isPublic, url, belongId, relationId, relationName, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -1213,12 +1258,15 @@ export class SysFileApi extends BaseAPI {
|
||||
* @param {string} [fileType]
|
||||
* @param {boolean} [isPublic]
|
||||
* @param {string} [path]
|
||||
* @param {number} [belongId]
|
||||
* @param {number} [relationId]
|
||||
* @param {string} [relationName]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysFileApi
|
||||
*/
|
||||
public async apiSysFileUploadFilePostForm(file?: Blob, fileType?: string, isPublic?: boolean, path?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSysFile>> {
|
||||
return SysFileApiFp(this.configuration).apiSysFileUploadFilePostForm(file, fileType, isPublic, path, options).then((request) => request(this.axios, this.basePath));
|
||||
public async apiSysFileUploadFilePostForm(file?: Blob, fileType?: string, isPublic?: boolean, path?: string, belongId?: number, relationId?: number, relationName?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSysFile>> {
|
||||
return SysFileApiFp(this.configuration).apiSysFileUploadFilePostForm(file, fileType, isPublic, path, belongId, relationId, relationName, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
||||
@ -59,4 +59,28 @@ export interface FileInput {
|
||||
* @memberof FileInput
|
||||
*/
|
||||
url?: string | null;
|
||||
|
||||
/**
|
||||
* 所属实体ID
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FileInput
|
||||
*/
|
||||
belongId?: number;
|
||||
|
||||
/**
|
||||
* 关联对象Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof FileInput
|
||||
*/
|
||||
relationId?: number;
|
||||
|
||||
/**
|
||||
* 关联对象名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof FileInput
|
||||
*/
|
||||
relationName?: string | null;
|
||||
}
|
||||
|
||||
@ -51,4 +51,28 @@ export interface SysFileUploadFileBody {
|
||||
* @memberof SysFileUploadFileBody
|
||||
*/
|
||||
path?: string;
|
||||
|
||||
/**
|
||||
* 所属实体ID
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysFileUploadFileBody
|
||||
*/
|
||||
belongId?: number;
|
||||
|
||||
/**
|
||||
* 关联对象Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysFileUploadFileBody
|
||||
*/
|
||||
relationId?: number;
|
||||
|
||||
/**
|
||||
* 关联对象名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysFileUploadFileBody
|
||||
*/
|
||||
relationName?: string;
|
||||
}
|
||||
|
||||
@ -67,4 +67,28 @@ export interface UploadFileFromBase64Input {
|
||||
* @memberof UploadFileFromBase64Input
|
||||
*/
|
||||
isPublic?: boolean;
|
||||
|
||||
/**
|
||||
* 所属实体ID
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UploadFileFromBase64Input
|
||||
*/
|
||||
belongId?: number;
|
||||
|
||||
/**
|
||||
* 关联对象Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UploadFileFromBase64Input
|
||||
*/
|
||||
relationId?: number;
|
||||
|
||||
/**
|
||||
* 关联对象名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UploadFileFromBase64Input
|
||||
*/
|
||||
relationName?: string | null;
|
||||
}
|
||||
|
||||
@ -33,6 +33,27 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-form-item label="关联对象名称" prop="relationName">
|
||||
<el-input v-model="state.ruleForm.relationName" placeholder="关联对象名称" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-form-item label="关联对象Id" prop="relationId">
|
||||
<el-input v-model="state.ruleForm.relationId" placeholder="关联对象ID" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-form-item label="所属ID" prop="fileName">
|
||||
<el-input v-model="state.ruleForm.belongId" placeholder="所属ID" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user