fix(layout): add OptStore
This commit is contained in:
32
components/label/api/user/index.ts
Normal file
32
components/label/api/user/index.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import httpFetch from "@/api/fetch"
|
||||
import { BASE_LABEL_API } from "../const"
|
||||
import { Organization } from "./typing"
|
||||
|
||||
// 获取用户组织树
|
||||
export const getUserGroupTree = () => {
|
||||
return httpFetch<Organization.Response[]>({
|
||||
url: "/api/v1/label_server/user/group/tree",
|
||||
method: "GET",
|
||||
})
|
||||
}
|
||||
|
||||
/* ****************************** Options ****************************** */
|
||||
interface Option {
|
||||
label: string
|
||||
value: string
|
||||
}
|
||||
// 获取所有用户组
|
||||
export const getUserGroupAll = () => {
|
||||
return httpFetch<Array<Option>>({
|
||||
url: BASE_LABEL_API + `/api/v1/label_server/user/group/all`,
|
||||
method: "GET",
|
||||
})
|
||||
}
|
||||
|
||||
// 获取所有用户
|
||||
export const getUserAll = () => {
|
||||
return httpFetch<Array<Option>>({
|
||||
url: BASE_LABEL_API + "/api/v1/label_server/user/all",
|
||||
method: "GET",
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user