mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
Merge branch 'dev' of https://gitee.com/xlsea/ruoyi-plus-soybean into flow
This commit is contained in:
@ -59,3 +59,11 @@ export function fetchGetTenantPackageMenuTreeSelect(packageId: CommonType.IdType
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 级联删除菜单
|
||||
export function fetchCascadeDeleteMenu(menuIds: CommonType.IdType[]) {
|
||||
return request<boolean>({
|
||||
url: `/system/menu/cascade/${menuIds.join(',')}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
import type { AxiosRequestConfig, GenericAbortSignal } from 'axios';
|
||||
import { request } from '@/service/request';
|
||||
|
||||
/** 获取文件管理列表 */
|
||||
@ -18,36 +17,10 @@ export function fetchBatchDeleteOss(ossIds: CommonType.IdType[]) {
|
||||
});
|
||||
}
|
||||
|
||||
/** Axios上传进度事件 */
|
||||
export type AxiosProgressEvent = AxiosRequestConfig['onUploadProgress'];
|
||||
|
||||
/** 默认上传结果 */
|
||||
export interface UploadResult {
|
||||
url: string;
|
||||
fileName: string;
|
||||
ossId: string;
|
||||
}
|
||||
|
||||
export interface UploadApiOptions {
|
||||
onUploadProgress?: AxiosProgressEvent;
|
||||
signal?: GenericAbortSignal;
|
||||
}
|
||||
|
||||
/** 上传文件接口 */
|
||||
export function uploadApi(file: File | Blob, options?: UploadApiOptions) {
|
||||
const { onUploadProgress, signal } = options ?? {};
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
|
||||
return request<UploadResult>({
|
||||
url: '/resource/oss/upload',
|
||||
method: 'post',
|
||||
data: formData,
|
||||
onUploadProgress,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
},
|
||||
signal
|
||||
// 查询OSS对象基于id串
|
||||
export function fetchGetOssListByIds(ossIds: CommonType.IdType[]) {
|
||||
return request<Api.System.Oss[]>({
|
||||
url: `/resource/oss/listByIds/${ossIds.join(',')}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -36,6 +36,15 @@ export function fetchUpdateRoleStatus(data: Api.System.RoleOperateParams) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 修改角色数据权限 */
|
||||
export function fetchUpdateRoleDataScope(data: Api.System.RoleOperateParams) {
|
||||
return request<boolean>({
|
||||
url: '/system/role/dataScope',
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
/** 批量删除角色信息 */
|
||||
export function fetchBatchDeleteRole(roleIds: CommonType.IdType[]) {
|
||||
return request<boolean>({
|
||||
|
Reference in New Issue
Block a user