import { HcApi } from "../../request/index";

export default {
    async getLazytree(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/lazy-tree",
            method: "get",
            params: form,
        });
    },
    async detail(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/detail",
            method: "get",
            params: form,
        });
    },
    async submit(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/submit",
            method: "post",
            data: form,
        });
    },
    async del(pKeyId) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/remove",
            method: "post",
            params: { pKeyId },
        });
    },
    async removeTableByCondition(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/remove-table",
            method: "get",
            params: form,
        });
    },
    async findNodeTableByCondition(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/get-node-tables",
            method: "get",
            params: form,
        });
    },
    async wbsTreePrivateTableSort(data) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/submit-table-sort",
            method: "post",
            data: data,
        });
    },
    async getNodeTabAndParam(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/get-node-table-param",
            method: "get",
            params: form,
        });
    },
    async privateSubmitFullName(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/submit-full-name",
            method: "post",
            params: form,
        });
    },
    async syncNodeParam(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/sync-node-param",
            method: "post",
            params: form,
        });
    },
    //同步电签默认信息
    async syncProjecteVisa(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/sync-project-eVisa",
            method: "post",
            params: form,
        });
    },
    async syncNodeTable(primaryKeyId) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/sync-node-table",
            method: "post",
            params: { primaryKeyId },
        });
    },
    //同步项目基础信息到合同段接口sync-node-info
    async syncNodeinfo(pKeyId) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/sync-node-info",
            method: "post",
            params: { pKeyId },
        });
    },
    //同步元素表单排序到合同段
    async syncContractTabSort(projectId) {
        return HcApi({
            url: "/api/blade-manager/wbsTreeContract/syncContractTabSort",
            method: "get",
            params: { projectId },
        });
    },
    //清表树
    async tabTypeLazyTree(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/tab-Type-lazy-tree",
            method: "get",
            params: form,
        });
    },
    async tabTypeLazyTreeAll(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/tab-Type-lazy-tree-all",
            method: "get",
            params: form,
        });
    },
    async projecttabInfo(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/add-projecttab-info",
            method: "post",
            params: form,
        });
    },
    //后管-删除元素表
    async delTabInfoAll(pKeyId) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/del-tab-info-all",
            method: "post",
            params: { pKeyId },
        });
    },
    //后管-删除项目表单
    async delAprojectTab(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/del-aprojecttab-info",
            method: "post",
            params: form,
        });
    },
    //新增元素业务时间表
    async saveTabusstime(form) {
        return HcApi({
            url: "/api/blade-manager/tabbusstimeinfo/save-tabusstime-info",
            method: "post",
            data: form,
        });
    },
    //删除元素业务时间表
    async removeTabusstime(ids) {
        return HcApi({
            url: "/api/blade-manager/tabbusstimeinfo/remove",
            method: "post",
            params: { ids },
        });
    },
    //后管独立表单库表单同步到合同段所有选择的节点下
    async syncFormToContractNode(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/syncFormToContractNode",
            method: "get",
            params: form,
        });
    },
    //私有wbs关联节点
    async LinekNodeTreelist(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/getlinek-node-treelist",
            method: "post",
            params: form,
        });
    },
    async LinekNodeTree(form) {
        return HcApi({
            url: "/api/blade-manager/wbsPrivate/link-node-tree",
            method: "post",
            params: form,
        });
    },
};
