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

export default {
    //分页
    async page(form) {
        return HcApi({
            url: '/api/blade-attach/workfocus/page',
            method: 'get',
            params: form,
        }, false)
    },
    //详情
    async detail(id) {
        return HcApi({
            url: '/api/blade-attach/workfocus/detail',
            method: 'get',
            params: { id },
        }, false)
    },
    //新增
    async add(form) {
        return HcApi({
            url: '/api/blade-attach/workfocus/save',
            method: 'post',
            data: form,
        }, false)
    },
    //新增或修改
    async submit(form) {
        return HcApi({
            url: '/api/blade-attach/workfocus/submitList',
            method: 'post',
            data: form,
        }, false)
    },
    //新增或修改
    async del(ids) {
        return HcApi({
            url: '/api/blade-attach/workfocus/remove',
            method: 'post',
            params: { ids },
        }, false)
    },
    //导出
    async exportWorkfocus(ids) {
        return HcApi({
            url: '/api/blade-attach/workfocus/export-workfocus',
            method: 'get',
            params: { id_equal: ids },
            responseType: 'blob',
        }, false)
    },
}
