fix: 列表筛选统一调用接口
This commit is contained in:
+11
-3
@@ -57,7 +57,7 @@ export interface Role extends RoleOption {
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
/** 员工列表是服务端分页,门店和角色当前由前端做轻量筛选。 */
|
||||
/** 员工列表是服务端分页,筛选条件统一通过查询参数传递。 */
|
||||
export interface EmployeeListParams {
|
||||
storeId?: number;
|
||||
status?: EmployeeStatus;
|
||||
@@ -68,6 +68,12 @@ export interface EmployeeListParams {
|
||||
|
||||
export interface StoreListParams {
|
||||
includeInactive?: boolean;
|
||||
status?: StoreStatus;
|
||||
keyword?: string;
|
||||
}
|
||||
|
||||
export interface RoleListParams {
|
||||
keyword?: string;
|
||||
}
|
||||
|
||||
export interface StorePayload {
|
||||
@@ -117,8 +123,10 @@ export const listStores = (params?: StoreListParams) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const listRoles = () => {
|
||||
return http.request<ApiResult<Role[]>>("get", `${API_PREFIX}/roles`);
|
||||
export const listRoles = (params?: RoleListParams) => {
|
||||
return http.request<ApiResult<Role[]>>("get", `${API_PREFIX}/roles`, {
|
||||
params
|
||||
});
|
||||
};
|
||||
|
||||
export const getStore = (id: number) => {
|
||||
|
||||
Reference in New Issue
Block a user