import { HcApi } from '../../request/index'

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