import {httpApi} from "../../request/httpApi";

export default {
    //获取归档划分树
    async getClassIfyList(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/archiveFile/tree',
            method: 'post',
            params: form
        }, msg);
    },
    //分页
    async getarchiveFilePage(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/archiveFile/page',
            method: 'post',
            params: form
        }, msg);
    },
    //批量新增
    async batchUploadSave(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/archiveFile/batchSave',
            method: 'post',
            data: form
        }, msg)
    },
    //逻辑删除
    async removeArchiveFile(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/archiveFile/remove',
            method: 'post',
            params: form
        }, msg);
    },
    //批量编辑
    async batchEditSave(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/archiveFile/batchEdit',
            method: 'post',
            data: form
        }, msg);
    },
    //批量废除
    async batchAbolishSave(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/archiveFile/batchAbolish',
            method: 'post',
            params: form
        }, msg);
    },
    //批量下载
    async batchDownloadFileToZip(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/archiveFile/batchDownloadFileToZip',
            method: 'post',
            params: form,
            responseType: 'blob'
        }, msg)
    },
    //批量认证
    async batchCertification(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/archiveFile/batchCertification',
            method: 'post',
            data: form
        }, msg)
    },
}
