You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.6 KiB
67 lines
1.6 KiB
2 years ago
|
import { defHttp } from '@/utils/http/axios'
|
||
|
|
||
|
export interface FileClientConfig {
|
||
|
basePath: string
|
||
|
host?: string
|
||
|
port?: number
|
||
|
username?: string
|
||
|
password?: string
|
||
|
mode?: string
|
||
|
endpoint?: string
|
||
|
bucket?: string
|
||
|
accessKey?: string
|
||
|
accessSecret?: string
|
||
|
domain: string
|
||
|
}
|
||
|
export interface FileConfigVO {
|
||
|
id: number
|
||
|
name: string
|
||
|
storage: number
|
||
|
master: boolean
|
||
|
visible: boolean
|
||
|
config: FileClientConfig
|
||
|
remark: string
|
||
|
createTime: Date
|
||
|
}
|
||
|
|
||
|
export interface FileConfigPageReqVO extends PageParam {
|
||
|
name?: string
|
||
|
storage?: number
|
||
|
createTime?: Date[]
|
||
|
}
|
||
|
|
||
|
// 查询文件配置列表
|
||
|
export const getFileConfigPageApi = (params: FileConfigPageReqVO) => {
|
||
|
return defHttp.get({ url: '/infra/file-config/page', params })
|
||
|
}
|
||
|
|
||
|
// 查询文件配置详情
|
||
|
export const getFileConfigApi = (id: number) => {
|
||
|
return defHttp.get({ url: '/infra/file-config/get?id=' + id })
|
||
|
}
|
||
|
|
||
|
// 更新文件配置为主配置
|
||
|
export const updateFileConfigMasterApi = (id: number) => {
|
||
|
return defHttp.put({ url: '/infra/file-config/update-master?id=' + id })
|
||
|
}
|
||
|
|
||
|
// 新增文件配置
|
||
|
export const createFileConfigApi = (data: FileConfigVO) => {
|
||
|
return defHttp.post({ url: '/infra/file-config/create', data })
|
||
|
}
|
||
|
|
||
|
// 修改文件配置
|
||
|
export const updateFileConfigApi = (data: FileConfigVO) => {
|
||
|
return defHttp.put({ url: '/infra/file-config/update', data })
|
||
|
}
|
||
|
|
||
|
// 删除文件配置
|
||
|
export const deleteFileConfigApi = (id: number) => {
|
||
|
return defHttp.delete({ url: '/infra/file-config/delete?id=' + id })
|
||
|
}
|
||
|
|
||
|
// 测试文件配置
|
||
|
export const testFileConfigApi = (id: number) => {
|
||
|
return defHttp.get({ url: '/infra/file-config/test?id=' + id })
|
||
|
}
|