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

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