import request from '@/utils/request'

// 查询重大安全生产事故通报信息列表
export function listAccidents(query) {
    return request({
        url: '/crmMajorWorkSafetyAccidents/findByPage',
        method: 'get',
        params: query
    })
}

// 查询重大安全生产事故通报信息详细
export function getAccidents(id) {
    return request({
        url: '/crmMajorWorkSafetyAccidents/' + id,
        method: 'get'
    })
}

// 新增重大安全生产事故通报信息
export function addAccidents(data) {
    return request({
        url: '/crmMajorWorkSafetyAccidents',
        method: 'post',
        data: data
    })
}

// 修改重大安全生产事故通报信息
export function updateAccidents(data) {
    return request({
        url: '/crmMajorWorkSafetyAccidents',
        method: 'put',
        data: data
    })
}

// 删除重大安全生产事故通报信息
export function delAccidents(id) {
    return request({
        url: '/crmMajorWorkSafetyAccidents/deleteAll',
        method: 'delete'
    })
}
// 批量删除行政许可
export function delAccidentsBatch(ids) {
    console.log(ids);
    return request.post('/crmMajorWorkSafetyAccidents/delete',ids)
}