import request from '@/utils/request'

// 分页条件查询省重点企业
export function listEnterprise(query) {
    return request({
        url: '/pharmaceuticals/bKeyEnterprise',
        method: 'get',
        params: query
    })
}

// 新增省重点企业
export function addEnterprise(data) {
    return request({
        url: '/pharmaceuticals/bKeyEnterprise',
        method: 'post',
        data
    })
}
//修改省重点企业
export function updateEnterprise(data) {
    return request({
        url: '/pharmaceuticals/bKeyEnterprise',
        method: 'put',
        data
    })
}
//删除省重点企业
export function deleteEnterprise(data) {
    return request({
        url: '/pharmaceuticals/bKeyEnterprise',
        method: 'delete',
        params: data
    })
}
//导入省重点企业
export function exportEnterprise(data) {
    return request({
        url: '/pharmaceuticals/bKeyEnterprise/common/importExcel',
        method: 'post',
        data,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    })
}
//通过主键查询单条省重点企业
export function getEnterprise(id) {
    return request({
        url: `/pharmaceuticals/bKeyEnterprise/${id}`,
        method: 'get',
    })
}
//查询企业信息列表
export function businessList(data) {
    return request({
        url: `/pharmaceuticals/info/list`,
        method: 'get',
        params: data
    })
}
//查询执法列表
export function enforcingDetail(data) {
    return request({
        url: `/pharmaceuticals/bPlanEnterprise/getZhifa`,
        method: 'get',
        params: data

    })
}
//执法列表详情
export function enforcingGet(id) {
    return request({
        url: `/pharmaceuticals/examine/${id}`,
        method: 'get',
    })
}

// 根据字段查询字典信息
export function listDist(query) {
    return request({
        url: '/pharmaceuticals/dictdata',
        method: 'get',
        params: query
    })
}
//计划企业表数结构
export function planeEnTree(data) {
    return request({
        url: '/pharmaceuticals/bPlanEnterprise/tree',
        method: 'get',
        params:data
    })
}
// 行政区划树结构
export function xzTree() {
    return request({
        url: '/pharmaceuticals/administrative/tree',
        method: 'get',
    })
}
//执法计划工作情况统计
export function workStatistics(data) {
    return request({
        url: '/pharmaceuticals/bPlanEnterprise/getZhifaCount',
        method: 'get',
        params:data
    })
}
//各区域执法计划
export function quyuPlan(data) {
    return request({
        url: '/pharmaceuticals/bPlanEnterprise/getplan',
        method: 'get',
        params:data
    })
}
