import config from "@/config" import http from "@/utils/request" export default { menu: { myMenus: { url: `${config.API_URL}/system/menu/my/1.6.1`, name: "获取我的菜单", get: async function(){ return await http.get(this.url); } }, list: { url: `${config.API_URL}/system/menu/list`, name: "获取菜单", get: async function(){ return await http.get(this.url); } } }, dept: { list: { url: `${config.API_URL}/system/dept/`, name: "获取部门列表", req: async function(data){ return await http.get(this.url, data); } }, create: { url: `${config.API_URL}/system/dept/`, name: "新增部门", req: async function(data){ return await http.post(this.url,data); } }, update: { name: "更新部门信息", req: async function(id, data){ return await http.put( `${config.API_URL}/system/dept/${id}/`, data ); } }, delete: { name: "删除部门", req: async function(id){ return await http.delete(`${config.API_URL}/hrm/employee/${id}/`); } } }, dicttype: { list: { url: `${config.API_URL}/system/dicttype/`, name: "获取字典类型列表", req: async function(data){ return await http.get(this.url, data); } }, create: { url: `${config.API_URL}/system/dicttype/`, name: "新增字典类型", req: async function(data){ return await http.post(this.url,data); } }, update: { name: "更新字典类型", req: async function(id, data){ return await http.put( `${config.API_URL}/system/dicttype/${id}/`, data ); } }, delete: { name: "删除字典类型", req: async function(id){ return await http.delete(`${config.API_URL}/system/dicttype/${id}/`); } } }, dict: { list: { url: `${config.API_URL}/system/dict/`, name: "获取字典列表", req: async function(data){ return await http.get(this.url, data); } }, create: { url: `${config.API_URL}/system/dict/`, name: "新增字典", req: async function(data){ return await http.post(this.url,data); } }, update: { name: "更新字典", req: async function(id, data){ return await http.put( `${config.API_URL}/system/dict/${id}/`, data ); } }, delete: { name: "删除字典", req: async function(id){ return await http.delete(`${config.API_URL}/system/dict/${id}/`); } } }, permission:{ list: { url: `${config.API_URL}/system/permission/`, name: "获取菜单权限列表", req: async function(data){ return await http.get(this.url, data); } }, codes: { url: `${config.API_URL}/system/permission/codes/`, name: "获取全部权限标识", req: async function(data){ return await http.get(this.url, data); } }, create: { url: `${config.API_URL}/system/permission/`, name: "新增菜单权限", req: async function(data){ return await http.post(this.url,data); } }, update: { name: "更新菜单权限", req: async function(id, data){ return await http.put( `${config.API_URL}/system/permission/${id}/`, data ); } }, delete: { name: "删除菜单权限", req: async function(id){ return await http.delete(`${config.API_URL}/system/permission/${id}/`); } }, deletes: { name: "批量删除菜单权限", url: `${config.API_URL}/system/permission/deletes/`, req: async function(data){ return await http.post(this.url,data); } }, }, role: { list: { url: `${config.API_URL}/system/role/list2`, name: "获取角色列表", get: async function(params){ return await http.get(this.url, params); } } }, user: { list: { url: `${config.API_URL}/system/user/list`, name: "获取用户列表", get: async function(params){ return await http.get(this.url, params); } } }, log: { list: { url: `${config.API_URL}/system/log/list`, name: "日志列表", get: async function(params){ return await http.get(this.url, params); } } }, }