mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-10 02:57:12 +08:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
29
src/apis/system/dept.ts
Normal file
29
src/apis/system/dept.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import http from '@/utils/http'
|
||||
import type * as System from './type'
|
||||
|
||||
const BASE_URL = '/system/dept'
|
||||
|
||||
/** @desc 查询部门列表 */
|
||||
export function listDept(query: System.DeptQuery) {
|
||||
return http.get<System.DeptResp[]>(`${BASE_URL}/tree`, query)
|
||||
}
|
||||
|
||||
/** @desc 查询部门详情 */
|
||||
export function getDept(id: string) {
|
||||
return http.get<System.DeptResp>(`${BASE_URL}/${id}`)
|
||||
}
|
||||
|
||||
/** @desc 新增部门 */
|
||||
export function addDept(data: any) {
|
||||
return http.post<boolean>(`${BASE_URL}`, data)
|
||||
}
|
||||
|
||||
/** @desc 修改部门 */
|
||||
export function updateDept(data: any, id: string) {
|
||||
return http.put(`${BASE_URL}/${id}`, data)
|
||||
}
|
||||
|
||||
/** @desc 删除部门 */
|
||||
export function deleteDept(id: string) {
|
||||
return http.del(`${BASE_URL}/${id}`)
|
||||
}
|
||||
@@ -1 +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}`)
|
||||
}
|
||||
@@ -1,3 +1,24 @@
|
||||
/** 系统部门类型 */
|
||||
export interface DeptResp {
|
||||
id: string
|
||||
name: string
|
||||
sort: number
|
||||
status: 1 | 2
|
||||
isSystem: boolean
|
||||
description: string
|
||||
createUserString: string
|
||||
createTime: string
|
||||
updateUserString: string
|
||||
updateTime: string
|
||||
parentId: string
|
||||
children: DeptResp[]
|
||||
}
|
||||
export interface DeptQuery {
|
||||
description?: string
|
||||
status?: number
|
||||
sort?: Array<string>
|
||||
}
|
||||
|
||||
/** 系统日志类型 */
|
||||
export interface LogResp {
|
||||
id: string
|
||||
@@ -31,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