import request from '@/router/axios';

//分页获取清表
export const getList = (params) => {
    return request({
        url: '/api/blade-manager/exceltab/list',
        method: 'get',
        params
    })
}

// 关联清表树all
export const tabLazytreeAll = (params) => {
    return request({
        url: '/api/blade-manager/exceltab/tab-lazytree-all',
        method: 'get',
        params
    })
};



//清表树
export const tabLazytree = (params) => {
    return request({
        url: '/api/blade-manager/exceltab/tab-lazytree',
        method: 'get',
        params
    })
};

//获取列表信息
export const detailExcel = (params) => {
    return request({
        url: '/api/blade-manager/exceltab/detail',
        method: 'get',
        params
    })
}

//清表编辑 wbs 下拉框选择
export const getWbsTypeList = (params) => {
    return request({
        url: '/api/blade-manager/exceltab/getWbsTypeList',
        method: 'get',
        params
    })
}

//清表类型
export const excelType = (params) => {
    return request({
        url: ' /api/blade-system/dict-biz/dictionary',
        method: 'get',
        params
    })
}

//懒加载节点树形结构
export const wbstree = (params) => {
    return request({
        url: ' /api/blade-manager/exceltab/lazy-tree',
        method: 'get',
        params
    })
}

//wbs树获取表
export const selectByNodeTable = (params) => {
    return request({
        url: ' /api/blade-manager/exceltab/selectByNodeTable',
        method: 'get',
        params
    })
}

// 添加编辑清表
export const Excelmodify = (row) => {
    return request({
        url: '/api/blade-manager/exceltab/sava-dataInfo',
        method: 'post',
        data: row
    })
}

// 上传清表
export const uploadExcel = (row) => {
    return request({
        // ty  application/json
        url: '/api/blade-manager/exceltab/put-file-attach',
        method: 'post',
        data: row
    })
}

// 删除excel文件
export const deleteExcel = (row) => {
    return request({
        url: '/api/blade-manager/exceltab/update',
        method: 'post',
        data: row
    })
}
export const deleteExcelshu = (ids) => {
    return request({
        url: '/api/blade-manager/exceltab/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}

//关联清表保存
export const saveLinkTab = (params) => {
    return request({
        url: ' /api/blade-manager/exceltab/save-linkTab',
        method: 'get',
        params
    })
}

//清表生成html
export const getExcelHtml = (params) => {
    return request({
        url: ' /api/blade-manager/exceltab/get-excel-html',
        method: 'get',
        params
    })
}