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

export default {
    //新增或删除 合同段划分树首件关联
    async wbsTreeFirstSave(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/treeContractFirst/saveOrDelete',
            method: 'post',
            params: form
        },msg);
    },
    //修改树节点
    async wbsTreeUpdateNode(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/updateContractNodeParameter',
            method: 'post',
            params: form
        },msg);
    },
    //导图结构树节点查询
    async queryMappingStructureTree(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/queryMappingStructureTree',
            method: 'get',
            params: form
        },msg);
    },
    //保存或修改节点上传的图纸记录
    async saveContractTreeDrawings(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/contractTreeDrawings/saveContractTreeDrawings',
            method: 'post',
            params: form
        },msg);
    },
    //删除节点
    async removeContractTreeNode(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/removeContractTreeNode',
            method: 'post',
            params: form
        },msg);
    },
    //查询当前节点下所有元素表信息
    async searchNodeAllTable(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/wbsTreeContract/search-node-tables',
            method: 'get',
            params: form
        },msg);
    },
    //清表生成html
    async getExcelHtml(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/exceltab/get-excel-html_buss',
            method: 'get',
            params: form
        },msg);
    },
    //获取按键切换输入框的key列表
    async getHtmlBussCols(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/exceltab/get-html-buss-cols',
            method: 'get',
            params: form
        },msg);
    },
    //填报页面数据保存
    async saveExcelBussData(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/exceltab/save_buss_data',
            method: 'post',
            data: form
        },msg);
    },
    //懒加载项目级工程划分树
    async queryWbsTreePrivateByProjectIdAndId(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/queryWbsTreePrivateByProjectIdAndId',
            method: 'post',
            params: form
        },msg);
    },
    //新增节点及其子节点
    async saveContractTreeNode(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/saveContractTreeNode',
            method: 'post',
            data: form
        },msg);
    },
    //复制节点
    async copyContractTreeNode(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/copyContractTreeNode',
            method: 'post',
            data: form
        },msg);
    },
    //自定义排序
    async diySortTreeNode(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/diySort',
            method: 'post',
            data: form
        },msg);
    },
    //获取表单数据
    async getBussDataInfo(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/exceltab/get-buss-dataInfo',
            method: 'get',
            params: form
        },msg);
    },
    //查询节点状态
    async queryNodeStatus(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/queryNodeStatus',
            method: 'post',
            params: form
        },msg);
    },
    //查询监理节点状态
    async queryNodeStatusJl(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/queryNodeStatus-jl',
            method: 'post',
            params: form
        },msg);
    },
    //查询首件节点状态
    async queryNodeStatusSj(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/queryNodeStatus-sj',
            method: 'post',
            params: form
        },msg);
    },
    //查询试验上报按钮状态
    async queryNodeStatusTrial(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/queryNodeStatus-trial',
            method: 'post',
            params: form
        },msg);
    },
    //单个废除
    async abolishOne(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/abolishOne',
            method: 'post',
            params: form
        },msg);
    },

    //单个废除-首件
    async abolishOneSJ(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/abolishOne-sj',
            method: 'post',
            params: form
        },msg);
    },

    //隐藏表单
    async showBussTab(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/exceltab/show-buss-tab',
            method: 'get',
            params: form
        },msg);
    },
    //单表pdf预览
    async getBussPdfInfo(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/exceltab/get-buss-pdfInfo',
            method: 'get',
            params: form
        },msg);
    },
    //表单复制
    async copeBussTab(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/exceltab/cope-buss-tab',
            method: 'get',
            params: form
        },msg);
    },
    //多表预览
    async getBussPdfs(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/exceltab/get-buss-pdfs',
            method: 'get',
            params: form
        },msg);
    },
    //获取附件列表
    async getBussFileList(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/tablefile/get-buss-fileList',
            method: 'get',
            params: form
        },msg);
    },
    async getBussFileList1(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/detection/self/file-list',
            method: 'get',
            params: form
        },msg);
    },
    //逻辑删除
    async removeBussFile(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/tablefile/remove',
            method: 'post',
            params: form
        },msg);
    },
    //删除试验文件
    async removeBussFile1(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/tablefile/remove-trial',
            method: 'post',
            params: form
        },msg);
    },
    //用户端删除复制信息表
    async removeBussTabInfo(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/exceltab/remove-buss-tabInfo',
            method: 'post',
            params: form
        },msg);
    },
    //复制节点填报数据
    async copyContractNodeSubmitBusinessData(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/copyContractNodeSubmitBusinessData',
            method: 'post',
            data: form
        },msg);
    },
    //输入框查询合同段树
    async searchContractTree(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/searchContractTree',
            method: 'get',
            params: form
        },msg)
    },
    //设计值计算
    async queryFormulaRange(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/formula/range',
            method: 'get',
            params: form
        },msg)
    },
    //获取文件题名
    async queryDocumentTitle(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/informationWriteQuery/queryDocumentTitle',
            method: 'get',
            params: form
        },msg)
    },
    //查询公式参数面板
    async queryPanel(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/formula/panel',
            method: 'get',
            params: form
        },msg)
    },
    //保存公式参数

    async savePanel(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/formula/panel-save',
            method: 'post',
            data: form
        }, msg)
    },
}
