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

export default {
  // 分页档案调整
  async pageByArchive(form, msg = true) {
    return httpApi({
        url: '/api/blade-archive/archivesauto/page',
        method: 'get',
        params: form
    }, msg)
  },
  //根据档案获取文件
  async getarchiveFilePage(form, msg = true) {
        return httpApi({
            url: '/api/blade-archive/archiveFile/page',
            method: 'post',
            params: form
        }, msg);
 },
 //锁定案卷
 async archivesautoLock(form, msg = true) {
    return httpApi({
        url: '/api/blade-archive/archivesauto/lock',
        method: 'post',
        params: form
    }, msg);
},
//解锁案卷 /archivesauto/unlock
async archivesautoUnLock(form, msg = true) {
    return httpApi({
        url: '/api/blade-archive/archivesauto/unlock',
        method: 'post',
        params: form
    }, msg);
},
//预览案卷
async printArchive(form, msg = true) {
    return httpApi({
        url: '/api/blade-archive/archivesauto/printArchive',
        method: 'get',
        params: form
    }, msg)
  },
  //删除案卷里的文件案卷里删除文件/
  async removeFiles(form, msg = true) {
    return httpApi({
        url: '/api/blade-archive/archivesauto/removeFiles',
        method: 'post',
        params: form
    }, msg);
  },
//案卷迁移/archivesauto/move
    async moveArchive(form, msg = true) {
    return httpApi({
        url: '/api/blade-archive/archivesauto/move',
        method: 'post',
        params: form
    }, msg);
  },
//拆卷/archivesauto/split
async splitArchive(form, msg = true) {
    return httpApi({
        url: '/api/blade-archive/archivesauto/split',
        method: 'post',
        params: form
    }, msg);
  },
  //立即更新立卷/blade-archive/archivesauto/archiveAutoMethod
  async archiveAutoMethod(form, msg = true) {
    return httpApi({
        url: '/api/blade-archive/archivesauto/archiveAutoMethod',
        method: 'post',
        params: form
    }, msg);
  },
  //更新立卷进度接口
  async archiveAutoPercentComplete(form, msg = true) {
    return httpApi({
        url: '/api/blade-archive/archivesauto/archiveAutoPercentComplete',
        method: 'post',
        params: form
    }, msg);
  },
    //档案整理
    async refreshFileNumber(form, msg = true) {
        return httpApi({
            url: '/api/blade-archive/archivesauto/refreshFileNumber',
            method: 'post',
            params: form
        }, msg);
    },
    //编辑卷内文件/
    async archiveFileBatchUpdate(form, msg = true) {
        return httpApi({
            url: '/api/blade-archive/archiveFile/batchUpdate',
            method: 'post',
            data: form
        }, msg);
    },
    //获取元数据信息/
    async getMetadataFileByid(form, msg = true) {
        return httpApi({
            url: '/api/blade-archive/archiveFile/getMetadataFile',
            method: 'get',
            params: form
        }, msg)
    },
    //编辑元数据信息/archiveFile/updateMetadata
    async updateMetadata(form, msg = true) {
        return httpApi({
            url: '/api/blade-archive/archiveFile/updateMetadata',
            method: 'post',
            data: form
        }, msg);
    },
}
