mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-24 20:57:16 +08:00
feat: 新增存储管理
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
export * from './dept'
|
||||
export * from './log'
|
||||
export * from './storage'
|
||||
|
29
src/apis/system/storage.ts
Normal file
29
src/apis/system/storage.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import http from '@/utils/http'
|
||||
import type * as System from './type'
|
||||
|
||||
const BASE_URL = '/system/storage'
|
||||
|
||||
/** @desc 查询存储列表 */
|
||||
export function listStorage(query: System.StorageQuery) {
|
||||
return http.get<PageRes<System.StorageResp[]>>(`${BASE_URL}`, query)
|
||||
}
|
||||
|
||||
/** @desc 查询存储详情 */
|
||||
export function getStorage(id: string) {
|
||||
return http.get<System.StorageResp>(`${BASE_URL}/${id}`)
|
||||
}
|
||||
|
||||
/** @desc 新增存储 */
|
||||
export function addStorage(data: any) {
|
||||
return http.post(`${BASE_URL}`, data)
|
||||
}
|
||||
|
||||
/** @desc 修改存储 */
|
||||
export function updateStorage(data: any, id: string) {
|
||||
return http.put(`${BASE_URL}/${id}`, data)
|
||||
}
|
||||
|
||||
/** @desc 删除存储 */
|
||||
export function deleteStorage(id: string) {
|
||||
return http.del(`${BASE_URL}/${id}`)
|
||||
}
|
@@ -52,3 +52,28 @@ export interface LogQuery extends PageQuery {
|
||||
createTime?: string
|
||||
status?: number
|
||||
}
|
||||
|
||||
/** 系统存储类型 */
|
||||
export type StorageResp = {
|
||||
id: string
|
||||
name: string
|
||||
code: string
|
||||
type: number
|
||||
accessKey: string
|
||||
secretKey: string
|
||||
endpoint: string
|
||||
bucketName: string
|
||||
domain: string
|
||||
description: string
|
||||
isDefault: boolean
|
||||
sort: number
|
||||
status: number
|
||||
createUserString: string
|
||||
createTime: string
|
||||
updateUserString: string
|
||||
updateTime: string
|
||||
}
|
||||
export interface StorageQuery extends PageQuery {
|
||||
description?: string
|
||||
status?: number
|
||||
}
|
Reference in New Issue
Block a user