import { HcApi } from '../../request/index'

export default {
    //根据类型获取项目或者公司的列表
    async selectProjectOrCompanyList(form) {
        return HcApi({
            url: '/api/blade-attach/ibaProject/selectProjectOrCompanyList',
            method: 'get',
            params: form,
        }, false)
    },
   // 分页查询
    async ibaProject(form) {
        return HcApi({
            url: '/api/blade-attach/ibaProject/getOne',
            method: 'get',
            params: form,
        }, false)
    },
    //通过主键查询单条数据
    async page(form) {
        return HcApi({
            url: '/api/blade-attach/ibaProject/page',
            method: 'post',
            data: form,
        }, false)
    },
    //新增
    async add(form) {
        return HcApi({
            url: '/api/blade-attach/ibaProject/add',
            method: 'post',
            data: form,
        }, false)
    },
    //修改  
    
    async edit(form) {
        return HcApi({
            url: '/api/blade-attach/ibaProject/edit',
            method: 'post',
            data: form,
        }, false)
    },
    //删除
    async del(ids) {
        return HcApi({
            url: '/api/blade-attach/ibaProject/delete',
            method: 'delete',
            params: { ids },
        }, false)
    },
    //统计项目数和公司数
    async total(form) {
        return HcApi({
            url: '/api/blade-attach/ibaProject/total',
            method: 'get',
            params: form,
        }, false)
    },
    //根据类型统计
    async typeTotal(form) {
        return HcApi({
            url: '/api/blade-attach/ibaProject/typeTotal',
            method: 'get',
            params: form,
        }, false)
    
    },
    //根据公司统计
    async companyTotal(form) {
        return HcApi({
            url: '/api/blade-attach/ibaProject/companyTotal',
            method: 'get',
            params: form,
        }, false)
    
    },
    //收益统计
    async incomeTotalList(form) {
        return HcApi({
            url: '/api/blade-attach/ibaProject/incomeTotalList',
            method: 'post',
            data: form,
        }, false)
    },
    //车流量统计
    async companyList(form) {
        return HcApi({
            url: '/api/blade-attach/ibaProject/companyList',
            method: 'post',
            data: form,
        }, false)
    },
}
