import request from '@/utils/request'
import qs from 'qs'

/**
 * 地勤管理员接口
 */

// 获取地勤管理员列表
const getList = function(params) {
    return request({
        url: '/customer/findPageList.do',
        method: 'post',
        data: qs.stringify(params)
    })
}
// 添加地勤管理员
const addCustomer = function(params) {
    return request({
        url: '/customer/add.do',
        method: 'get',
        params
    })
}
// 更新地勤管理员
const updateCustomer = function(params) {
    return request({
        url: '/customer/update.do',
        method: 'get',
        params
    })
}
// 重置地勤管理员密码
const resetCustomer = function(params) {
    return request({
        url: '/customer/resetPassword.do',
        method: 'get',
        params
    })
}
// 删除地勤管理员
const delCustomer = function(params) {
    return request({
        url: '/customer/delete.do',
        method: 'get',
        params
    })
}
// 获取权限树形结构
const getRole = function() {
    return request({
        url: '/role/findPageList.do',
        method: 'get'
    })
}

export default {
    getList,
    addCustomer,
    updateCustomer,
    resetCustomer,
    delCustomer,
    getRole
}
