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

export default {
    //获取类型列表(类型主页)
    async getClassIfyList(form) {
        return httpApi({
            url: '/api/blade-business/imageClassificationFile/getClassIfyList',
            method: 'get',
            params: form,
        })
    },
    async queryTreeList(form) {
        return httpApi({
            url: '/api/blade-manager/wbsTreeContract/image/lazyQueryContractWbsTree',
            method: 'get',
            params: form,
        });
    },
    async queryWorksTree(form) {
        return httpApi({
            url: '/api/blade-manager/wbsTreeContract/getConcealedWorksNodeTree',
            method: 'post',
            params: form,
        });
    },
    //获取当前项目类型的显隐配置列表
    async getClassifyShowConfigList(form) {
        return httpApi({
            url: '/api/blade-business/imageClassificationFile/getClassifyShowConfigList',
            method: 'get',
            params: form,
        })
    },
    //保存客户端分类显隐记录
    async saveClassifyShowConfig(form) {
        return httpApi({
            url: '/api/blade-business/imageClassificationFile/saveClassifyShowConfig',
            method: 'post',
            data: form,
        })
    },
    //获取时间结构
    async getYearDateTree(form) {
        return httpApi({
            url: '/api/blade-business/imageClassificationFile/getYearDateTree',
            method: 'get',
            params: form,
        })
    },
    //获取当前合同段的工程划分
    async getWbsTreeList(form) {
        return httpApi({
            url: '/api/blade-business/imageClassificationFile/queryContractWbsTreeByContractIdAndType',
            method: 'get',
            params: form,
        })
    },
    //获取分页数据
    async getPageList(form) {
        return httpApi({
            url: '/api/blade-business/imageClassificationFile/page',
            method: 'get',
            params: form,
        })
    },
    //新增影音资料信息
    async addImageclassifyFile(form) {
        return httpApi({
            url: '/api/blade-business/imageClassificationFile/save',
            method: 'post',
            data: form,
        })
    },
    //修改影音资料信息
    async updateImageclassifyFile(form) {
        return httpApi({
            url: '/api/blade-business/imageClassificationFile/update',
            method: 'post',
            data: form,
        })
    },
    //详情
    async queryById(form) {
        return httpApi({
            url: '/api/blade-business/imageClassificationFile/queryById',
            method: 'post',
            params: form,
        })
    },
    //影音资料信息逻辑删除
    async removeImageclassifyFile(form) {
        return httpApi({
            url: '/api/blade-business/imageClassificationFile/remove',
            method: 'post',
            params: form,
        })
    },
    //影音资料览(图片)
    async imageClassificationFile(form) {
        return httpApi({
            url: '/api/blade-business/imageClassificationFile/preview',
            method: 'post',
            params: form,
        })
    },
    //下载
    async batchDownloadFileToZip(form) {
        return httpApi({
            url: '/api/blade-business/imageClassificationFile/batchDownloadFileToZip',
            method: 'post',
            params: form,
            responseType: 'blob',
        })
    },
    //接口获取题名
    async getFileTitleName(form) {
        return httpApi({
            url: '/api/blade-business/imageClassificationFile/getFileTitleName',
            method: 'get',
            params: form,
        })
    },
}
