import request from '@/utils/request'


// 查询项目数据列表
export function getProListAPI(data) {
    return request({
        url: '/smartArchives/fileManage/getProjectList',
        method: 'GET',
        params: data,
    })
}


// 获取档案目录树
export function getFileManageTreeApi(params) {
    return request({
        url: '/smartArchives/fileManage/getFileManageTree',
        method: 'get',
        params:params,
    })
}

// 获取档案目录树(新增/编辑)
export function getFileManageTreeByAddOrUpdateApi(params) {
    return request({
        url: '/smartArchives/fileManage/getFileManageTreeByAddOrUpdate',
        method: 'get',
        params:params,
    })
}

// 新增档案目录
export function addFileManageLeftApi(data) {
    return request({
        url: '/smartArchives/fileManage/addFileManageLeft',
        method: 'post',
        data:data
    })
}

// 新增档案表格数据
export function addFileManageRightApi(data) {
    return request({
        url: '/smartArchives/fileManage/addFileManageRight',
        method: 'post',
        data:data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}

// 修改档案目录
export function updateFileManageLeftApi(data) {
    return request({
        url: '/smartArchives/fileManage/updateFileManageLeft',
        method: 'post',
        data:data
    })
}

// 修改档案目录
export function updateFileManageRightApi(data) {
    return request({
        url: '/smartArchives/fileManage/updateFileManageRight',
        method: 'post',
        data:data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}

// 删除档案目录
export function delFileManageApi(data) {
    return request({
        url: '/smartArchives/fileManage/delFileManage',
        method: 'post',
        data:data,
    })
}

// 编辑-详情
export function getArchivalCatalogueByIdApi(params) {
    return request({
        url: '/smartArchives/fileManage/getArchivalCatalogueById',
        method: 'get',
        params
    })
}

// 列表
export function getFileManageApi(params) {
    return request({
        url: '/smartArchives/fileManage/getFileManage',
        method: 'get',
        params
    })
}

// 查询序号
export function geMaxSortApi(params) {
    return request({
        url: '/smartArchives/fileManage/getMaxSort',
        method: 'get',
        params
    })
}

// 查询详情
export function getFileManageByIdApi(params) {
    return request({
        url: '/smartArchives/fileManage/getFileManageById',
        method: 'get',
        params
    })
}

// 档案移交确认
export function updateIntegrityStatusApi(data) {
    return request({
        url: '/smartArchives/fileManage/updateIntegrityStatus',
        method: 'post',
        data
    })
}

// 档案抽取
export function fileExtractApi(data) {
    return request({
        url: '/smartArchives/fileManage/fileExtract',
        method: 'post',
        data
    })
}

// 文件预览
export function getFileAsBase64Api(params) {
    return request({
        url: '/smartArchives/fileManage/getFileAsBase64',
        method: 'get',
        params:params
    })
}