import request from '@/utils/request'

export function getHandbookList(params) {
    return request.get('/v2/api/enforce-handbook', {params})
}

export function getUpdateUser() {
    return request.get('/v2/api/enforce-handbook/update_user')
}

export function getEnforceHandbook(id) {
    return request.get(`/v2/api/enforce-handbook/${id}`)
}

export function updateEnforceHandBook(id, params) {
    return request({
        url: `/v2/api/enforce-handbook/${id}`,
        method: 'put',
        data: params
    })
}

export function removeEnforce(id) {
    return request.delete(`/v2/api/enforce-obj/${id}`)
}

export function updateEnforceInfo(id) {
    return request.patch(`/v2/api/enforce-obj/${id}`)
}

export function getEnforceProblem(id, params) {
    return request.get(`/v2/api/enforce-obj/${id}/his-problem`, {params})
}

export function getHandbookTree() {
    return request.get('/v2/api/enforce-handbook/tree')
}