mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-13 10:35:07 +08:00
feat: add vue3(element-plus)
This commit is contained in:
37
yudao-ui-admin-vue3/src/api/infra/fileConfig/index.ts
Normal file
37
yudao-ui-admin-vue3/src/api/infra/fileConfig/index.ts
Normal file
@ -0,0 +1,37 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import type { FileConfigVO } from './types'
|
||||
|
||||
// 查询文件配置列表
|
||||
export const getFileConfigPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<FileConfigVO>>({ url: '/infra/file-config/page', params })
|
||||
}
|
||||
|
||||
// 查询文件配置详情
|
||||
export const getFileConfigApi = (id: number) => {
|
||||
return defHttp.get<FileConfigVO>({ url: '/infra/file-config/get?id=' + id })
|
||||
}
|
||||
|
||||
// 更新文件配置为主配置
|
||||
export const updateFileConfigMasterApi = (id: number) => {
|
||||
return defHttp.get<FileConfigVO>({ url: '/infra/file-config/update-master?id=' + id })
|
||||
}
|
||||
|
||||
// 新增文件配置
|
||||
export const createFileConfigApi = (params: FileConfigVO) => {
|
||||
return defHttp.post({ url: '/infra/file-config/create', params })
|
||||
}
|
||||
|
||||
// 修改文件配置
|
||||
export const updateFileConfigApi = (params: FileConfigVO) => {
|
||||
return defHttp.put({ url: '/infra/file-config/update', params })
|
||||
}
|
||||
|
||||
// 删除文件配置
|
||||
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 })
|
||||
}
|
23
yudao-ui-admin-vue3/src/api/infra/fileConfig/types.ts
Normal file
23
yudao-ui-admin-vue3/src/api/infra/fileConfig/types.ts
Normal file
@ -0,0 +1,23 @@
|
||||
export type ConfigType = {
|
||||
basePath: string
|
||||
host: string
|
||||
port: string
|
||||
username: string
|
||||
password: string
|
||||
mode: string
|
||||
endpoint: string
|
||||
bucket: string
|
||||
accessKey: string
|
||||
accessSecret: string
|
||||
domain: string
|
||||
}
|
||||
export type FileConfigVO = {
|
||||
id: number
|
||||
name: string
|
||||
storage: string
|
||||
primary: number
|
||||
visible: boolean
|
||||
config: ConfigType
|
||||
remark: string
|
||||
createTime: string
|
||||
}
|
Reference in New Issue
Block a user