import service from "./index";
const apiAdmin = '/mediate/'

const systemLogApi = {
    
    //========================start::用户管理======================================
    // 用户管理
    getUserList: data => {
        return service.service.post(`${apiAdmin}system/user/getUserList`, data)
    },
    // 删除用户管理
    deleteUserById: data => {
        return service.service.post(`${apiAdmin}system/user/deleteUserById`, data)
    },
    // 新增用户
    addUser: data => {
        return service.service.post(`${apiAdmin}system/user/addUser`, data)
    },
    // 修改用户
    updateUserById: data => {
        return service.service.post(`${apiAdmin}system/user/updateUserById`, data)
    },
    // 修改用户状态
    editStatus: data => {
        return service.service.post(`${apiAdmin}system/user/editStatus`, data)
    },
    // 重置密码
    resetPassWord: data => {
        return service.service.post(`${apiAdmin}system/user/reset`, data)
    },
    // 解除锁定状态
    unlockUser: data => {
        return service.service.post(`${apiAdmin}system/user/unlock`, data)
    },
    // 
    getUserById: data => {
        return service.service.post(`${apiAdmin}system/user/getUserById`, data)
    },
    // 获取个人二维码
    getQrCode: data => {
        return service.service.get(`${apiAdmin}system/user/getQrCode`, data)
    },
    // 根据部门id列表查看用户列表
    getUserByDeptList: data => {
        return service.service.post(`${apiAdmin}system/user/getUserByDeptList`, data)
    },


    //========================end::用户管理======================================

    //========================start::角色相关======================================
    // 角色列表
    getRoleList: data => {
        return service.service.post(`${apiAdmin}system/role/getRoleList`, data)
    },
    // 根据用户id查询角色信息
    getRoleListByUserId: data => {
        return service.service.post(`${apiAdmin}system/role/getRoleListByUserId`, data)
    },
    // 根据角色id获取角色详情
    getRoleById: data => {
        return service.service.post(`${apiAdmin}system/role/getRoleById`, data)
    },

    // 增加角色
    addRole: data => {
        return service.service.post(`${apiAdmin}system/role/addRole`, data)
    },
    // 修改角色
    updateRoleById: data => {
        return service.service.post(`${apiAdmin}system/role/updateRoleById`, data)
    },
    // 删除角色
    deleteRoleById: data => {
        return service.service.post(`${apiAdmin}system/role/deleteRoleById`, data)
    },
    
    //========================end::角色相关======================================


    //========================start::坐席相关======================================
    // 角色列表
    getSeatList: data => {
        return service.service.post(`${apiAdmin}system/user/seat/page`, data)
    },
    // 座席绑定
    seatBind: data => {
        return service.service.post(`${apiAdmin}system/user/seat/bind`, data)
    },
    // 座席解绑
    seatUnbind: data => {
        return service.service.post(`${apiAdmin}system/user/seat/unbind`, data)
    },
    // 获取坐席电话
    getSeatPhone: data => {
        return service.service.get(`${apiAdmin}system/user/seat/phone`, data)
    },
    // 获取未绑定坐席用户
    getSeatUnbindUser: data => {
        return service.service.post(`${apiAdmin}system/user/seat/unbind/user`, data)
    },
    //========================end::坐席相关======================================

    //========================start::菜单管理======================================
    // 菜单列表
    getResourceList: data => {
        return service.service.post(`${apiAdmin}system/resource/getResourceList`, data)
    },
    // 新增菜单
    addResource: data => {
        return service.service.post(`${apiAdmin}system/resource/addResource`, data)
    },
    // 修改菜单
    updateResourceById: data => {
        return service.service.post(`${apiAdmin}system/resource/updateResourceById`, data)
    },
    // 删除菜单
    deleteResourceById: data => {
        return service.service.post(`${apiAdmin}system/resource/deleteResourceById`, data)
    },
    // 菜单id获取菜单详情
    getResourceById: data => {
        return service.service.post(`${apiAdmin}system/resource/getResourceById`, data)
    },
    // 获取所有父级菜单
    getSelectList: data => {
        return service.service.post(`${apiAdmin}system/resource/getSelectList`, data)
    },
    //========================end::菜单管理======================================

    // 更新角色权限
    updateRoleResource: data => {
        return service.service.post(`${apiAdmin}system/role/updateRoleResource`, data)
    },

    //========================start::区域管理======================================
    // 区域列表
    getDeptList: data => {
        return service.service.post(`${apiAdmin}company/dept/getDeptList`, data)
    },
    // 区域列表
    getDeptTree: data => {
        return service.service.post(`${apiAdmin}company/dept/getDeptTree`, data)
    },
    
    // 新增区域
    addDept: data => {
        return service.service.post(`${apiAdmin}company/dept/addDept`, data)
    },
    // 修改区域
    updateDeptById: data => {
        return service.service.post(`${apiAdmin}company/dept/updateDeptById`, data)
    },
    // 删除区域
    deleteDeptById: data => {
        return service.service.post(`${apiAdmin}company/dept/deleteDeptById`, data)
    },
    // 区域详情查看
    getDeptById: data => {
        return service.service.post(`${apiAdmin}company/dept/getDeptById`, data)
    },
    //========================end::区域管理======================================
        
}
export default systemLogApi;
