店铺管理-》员工管理增加权限设置

This commit is contained in:
2025-02-19 11:27:46 +08:00
parent 00ffce98c7
commit 0758aef0fb
15 changed files with 1843 additions and 1526 deletions

View File

@@ -4,14 +4,14 @@ const baseURL = Account_BaseUrl + "/admin";
const ShopStaffApi = {
// 获取店铺权限列表
getshopPermission() {
return request<any>({
return request<any, PermissionResonpseResponse>({
url: `${baseURL}/shopPermission`,
method: "get",
});
},
// 获取员工对应的权限id
getPermission(id: number | string) {
return request<any>({
return request<any, string[]>({
url: `${baseURL}/shopStaff/permission`,
method: "get",
params: { id }
@@ -20,3 +20,56 @@ const ShopStaffApi = {
};
export default ShopStaffApi;
/**
* 权限列表
*
* CzgResult«List«ShopPermission»»
*/
export interface PermissionResonpseResponse {
code?: number | null;
data?: ShopPermission[] | null;
msg?: null | string;
[property: string]: any;
}
/**
* 店铺权限 实体类。
*
* ShopPermission
*/
export interface ShopPermission {
children?: ShopPermission[] | null;
/**
* 权限code为了区分采用汉语拼音
*/
code?: null | string;
createTime?: null | string;
id: string;
/**
* 是否重要: 重要对应页面红色
*/
isImportant?: number | null;
/**
* 权限名称
*/
label?: null | string;
/**
* 层级
*/
level?: number | null;
/**
* 上级ID
*/
parentId?: number | null;
/**
* 排序
*/
sort?: number | null;
/**
* 权限类型staff 员工,
*/
type?: null | string;
updateTime?: null | string;
[property: string]: any;
}